|
|
|
@ -1487,44 +1487,93 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//装置复位
|
|
|
|
|
//命令行装置复位
|
|
|
|
|
handleDeviceReset() {
|
|
|
|
|
console.log(this.rowData);
|
|
|
|
|
this.$confirm("此操作将复位装置, 是否继续?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
if (this.rowData.isonline || this.rowData.onlinestatus === 1) {
|
|
|
|
|
this.statusLoading = true;
|
|
|
|
|
let params = [
|
|
|
|
|
{
|
|
|
|
|
name: "act",
|
|
|
|
|
value: "reset",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "mode",
|
|
|
|
|
value: 0,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
this.resetTermFn(params);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "装置下线,发送指令失败",
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
resetTermFn(dataParams) {
|
|
|
|
|
console.log("点击了统一的接口", "runningstatus");
|
|
|
|
|
setTermCamera({
|
|
|
|
|
termId: this.rowData.id,
|
|
|
|
|
list: dataParams,
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
resetTerminalApi({ cmId: this.rowData.cmdId || this.rowData.cmdid })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "装置已复位",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
.then((res) => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: "装置已复位",
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
showClose: true,
|
|
|
|
|
message: res.msg,
|
|
|
|
|
type: "error",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// duration: 1500,
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// type: "info",
|
|
|
|
|
// message: "已取消删除",
|
|
|
|
|
// });
|
|
|
|
|
});
|
|
|
|
|
.catch((err) => {});
|
|
|
|
|
},
|
|
|
|
|
//装置复位
|
|
|
|
|
// handleDeviceReset() {
|
|
|
|
|
// console.log(this.rowData);
|
|
|
|
|
// this.$confirm("此操作将复位装置, 是否继续?", "提示", {
|
|
|
|
|
// confirmButtonText: "确定",
|
|
|
|
|
// cancelButtonText: "取消",
|
|
|
|
|
// type: "warning",
|
|
|
|
|
// })
|
|
|
|
|
// .then(() => {
|
|
|
|
|
// resetTerminalApi({ cmId: this.rowData.cmdId || this.rowData.cmdid })
|
|
|
|
|
// .then((res) => {
|
|
|
|
|
// if (res.code == 200) {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// duration: 1500,
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// message: "装置已复位",
|
|
|
|
|
// type: "success",
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// duration: 1500,
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// message: res.msg,
|
|
|
|
|
// type: "error",
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// .catch((err) => {});
|
|
|
|
|
// })
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
// // this.$message({
|
|
|
|
|
// // duration: 1500,
|
|
|
|
|
// // showClose: true,
|
|
|
|
|
// // type: "info",
|
|
|
|
|
// // message: "已取消删除",
|
|
|
|
|
// // });
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
display(val) {
|
|
|
|
|
this.isShow = true;
|
|
|
|
|
this.rowData = val;
|
|
|
|
|