|
|
|
|
@ -683,31 +683,31 @@ export default {
|
|
|
|
|
param: param, |
|
|
|
|
}; |
|
|
|
|
console.log("操作参数", data); |
|
|
|
|
// operationConrol([data]) |
|
|
|
|
// .then((res) => { |
|
|
|
|
// if (res.code == 200) { |
|
|
|
|
// this.$modal.msgSuccess("指令下发成功!"); |
|
|
|
|
// // 开启 loading 效果 |
|
|
|
|
// this.loading = true; |
|
|
|
|
// // 更新所有设备状态; |
|
|
|
|
// setTimeout(() => { |
|
|
|
|
// this.getPolicyList().finally(() => { |
|
|
|
|
// // 关闭 loading 效果 |
|
|
|
|
// this.loading = false; |
|
|
|
|
// }); |
|
|
|
|
// }, 5000); |
|
|
|
|
// } else { |
|
|
|
|
// // this.$modal.msgError("操作失败"); |
|
|
|
|
// console.log("应该更新状态的"); |
|
|
|
|
// // 更新所有设备状态; |
|
|
|
|
// this.getPolicyList(); |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// .catch((error) => { |
|
|
|
|
// console.log("请求发生错误,更新设备状态", error); |
|
|
|
|
// // 更新所有设备状态; |
|
|
|
|
// this.getPolicyList(); |
|
|
|
|
// }); |
|
|
|
|
operationConrol([data]) |
|
|
|
|
.then((res) => { |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
this.$modal.msgSuccess("指令下发成功!"); |
|
|
|
|
// 开启 loading 效果 |
|
|
|
|
this.loading = true; |
|
|
|
|
// 更新所有设备状态; |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.getPolicyList().finally(() => { |
|
|
|
|
// 关闭 loading 效果 |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, 5000); |
|
|
|
|
} else { |
|
|
|
|
// this.$modal.msgError("操作失败"); |
|
|
|
|
console.log("应该更新状态的"); |
|
|
|
|
// 更新所有设备状态; |
|
|
|
|
this.getPolicyList(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch((error) => { |
|
|
|
|
console.log("请求发生错误,更新设备状态", error); |
|
|
|
|
// 更新所有设备状态; |
|
|
|
|
this.getPolicyList(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
|