根据状态返回显示提示

master
fanluyan 2 years ago
parent 685dce7b1c
commit f41ad2f5ca

@ -684,3 +684,15 @@ export function updateMarkEnableStatus(data) {
}, },
}); });
} }
///api/getTermStatus
export function getTermStatus(data) {
return request({
url: "/api/getTermStatus",
method: "post",
data,
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
},
});
}

@ -48,7 +48,11 @@
<img src="../../assets/img/nopic.jpg" /> <img src="../../assets/img/nopic.jpg" />
</div> </div>
<p class="infoTop"> <p class="infoTop">
{{ item.linename }}-{{ item.displayname }}-{{ {{ item.linename }}-{{
item.displayname !== null && item.displayname !== ""
? item.displayname
: item.cmdid
}}-{{
item.alias !== null && item.alias !== "" item.alias !== null && item.alias !== ""
? item.alias ? item.alias
: item.channnelname : item.channnelname

@ -114,11 +114,7 @@
<h3>操作项</h3> <h3>操作项</h3>
<div class="buttonGroup"> <div class="buttonGroup">
<el-dropdown trigger="click" @command="handleCommandpic"> <el-dropdown trigger="click" @command="handleCommandpic">
<el-button <el-button type="primary" :loading="btnpicloading">
type="primary"
:loading="btnpicloading"
:disabled="zzstatus == 0"
>
主动拍照<i class="el-icon-arrow-down el-icon--right"></i> 主动拍照<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown" class="picdropStyle"> <el-dropdown-menu slot="dropdown" class="picdropStyle">
@ -135,11 +131,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-dropdown trigger="click" @command="handleCommandvideo"> <el-dropdown trigger="click" @command="handleCommandvideo">
<el-button <el-button type="primary" :loading="btnvideoloading">
type="primary"
:loading="btnvideoloading"
:disabled="zzstatus == 0"
>
主动录像<i class="el-icon-arrow-down el-icon--right"></i> 主动录像<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown" class="videodropStyle"> <el-dropdown-menu slot="dropdown" class="videodropStyle">
@ -156,17 +148,10 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button <el-button type="primary" @click="handleShowInfo">
type="primary"
@click="handleShowInfo"
:disabled="zzstatus == 0"
>
装置信息</el-button 装置信息</el-button
> >
<el-button <el-button type="primary" @click.native.stop="handleSetSchedule()"
type="primary"
@click.native.stop="handleSetSchedule()"
:disabled="zzstatus == 0"
>拍照时间表</el-button >拍照时间表</el-button
> >
<!-- <el-dropdown <!-- <el-dropdown
@ -187,7 +172,7 @@
trigger="click" trigger="click"
@command="handleCommandWarn" @command="handleCommandWarn"
> >
<el-button type="primary" :disabled="zzstatus == 0"> <el-button type="primary">
声光报警<i class="el-icon-arrow-down el-icon--right"></i> 声光报警<i class="el-icon-arrow-down el-icon--right"></i>
</el-button> </el-button>
<el-dropdown-menu slot="dropdown" class="gpsdropStyle"> <el-dropdown-menu slot="dropdown" class="gpsdropStyle">
@ -231,6 +216,7 @@ import {
getLatestPhotoJoggle, getLatestPhotoJoggle,
getReturnedPhotoJoggle, getReturnedPhotoJoggle,
alarmMarkJoggle, alarmMarkJoggle,
getTermStatus,
} from "@/utils/api/index"; } from "@/utils/api/index";
import { mapState } from "vuex"; import { mapState } from "vuex";
import carouselChart from "../components/carouselChart.vue"; import carouselChart from "../components/carouselChart.vue";
@ -537,7 +523,14 @@ export default {
handleWarn(val) { handleWarn(val) {
console.log("声光报警"); console.log("声光报警");
console.log(this.cmdid); console.log(this.cmdid);
alarmMarkJoggle({ cmdId: this.cmdid, ctrl: val }) getTermStatus({ termId: this.newTermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
alarmMarkJoggle({
cmdId: this.cmdid,
ctrl: val,
termId: this.newTermId,
})
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
@ -566,6 +559,15 @@ export default {
type: "error", type: "error",
}); });
}); });
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
}, },
//线 //线
handleCommandLine(command) { handleCommandLine(command) {
@ -590,8 +592,11 @@ export default {
// //
handleCommandpic(command) { handleCommandpic(command) {
this.btnpicloading = true;
console.log(command); console.log(command);
getTermStatus({ termId: this.newTermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
this.btnpicloading = true;
getLatestPhotoJoggle({ getLatestPhotoJoggle({
captureType: 0, captureType: 0,
channel: command, channel: command,
@ -619,10 +624,24 @@ export default {
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
}); });
} else {
this.btnpicloading = false;
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
}, },
// //
handleCommandvideo(command) { handleCommandvideo(command) {
console.log(command); console.log(command);
getTermStatus({ termId: this.newTermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
this.btnvideoloading = true; this.btnvideoloading = true;
getLatestPhotoJoggle({ getLatestPhotoJoggle({
captureType: 1, captureType: 1,
@ -650,6 +669,15 @@ export default {
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err); //
}); });
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
}, },
// //
// handleShowPic() { // handleShowPic() {
@ -725,8 +753,20 @@ export default {
//handleShowInfo //handleShowInfo
handleShowInfo() { handleShowInfo() {
getTermStatus({ termId: this.newTermId }).then((res) => {
console.log(res);
if (res.data.isonline) {
this.$refs.infodialog_ref.display(); this.$refs.infodialog_ref.display();
this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid); this.$refs.infodialog_ref.getListData(this.channelId, this.cmdid);
} else {
this.$message({
duration: 1500,
showClose: true,
message: "装置下线,发送指令失败",
type: "error",
});
}
});
}, },
// //
// handlehistoryPic() { // handlehistoryPic() {

Loading…
Cancel
Save