fanluyan 2 years ago
parent fca1b3b13a
commit 62be779dba

@ -1487,44 +1487,93 @@ export default {
}) })
.catch((err) => {}); .catch((err) => {});
}, },
// //
handleDeviceReset() { handleDeviceReset() {
console.log(this.rowData); if (this.rowData.isonline || this.rowData.onlinestatus === 1) {
this.$confirm("此操作将复位装置, 是否继续?", "提示", { this.statusLoading = true;
confirmButtonText: "确定", let params = [
cancelButtonText: "取消", {
type: "warning", 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(() => { .then((res) => {
resetTerminalApi({ cmId: this.rowData.cmdId || this.rowData.cmdid }) if (res.code == 200) {
.then((res) => { this.$message({
if (res.code == 200) { duration: 1500,
this.$message({ showClose: true,
duration: 1500, message: "装置已复位",
showClose: true, type: "success",
message: "装置已复位", });
type: "success", } else {
}); this.$message({
} else { duration: 1500,
this.$message({ showClose: true,
duration: 1500, message: res.msg,
showClose: true, type: "error",
message: res.msg, });
type: "error", }
});
}
})
.catch((err) => {});
}) })
.catch(() => { .catch((err) => {});
// this.$message({
// duration: 1500,
// showClose: true,
// type: "info",
// message: "",
// });
});
}, },
//
// 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) { display(val) {
this.isShow = true; this.isShow = true;
this.rowData = val; this.rowData = val;

Loading…
Cancel
Save