fanluyan 2 years ago
parent fca1b3b13a
commit 62be779dba

@ -1487,16 +1487,36 @@ 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(() => {
resetTerminalApi({ cmId: this.rowData.cmdId || this.rowData.cmdid })
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$message({ this.$message({
@ -1515,16 +1535,45 @@ export default {
} }
}) })
.catch((err) => {}); .catch((err) => {});
}) },
.catch(() => { //
// 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({ // this.$message({
// duration: 1500, // duration: 1500,
// showClose: true, // showClose: true,
// type: "info", // message: "",
// 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