fanluyan 2 years ago
parent fca1b3b13a
commit 62be779dba

@ -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;

Loading…
Cancel
Save