-
需求设定值:
+
+ 电流负载限制值:
{
+ let param = null;
+ if (item) {
+ param = 1;
+ } else {
+ param = 0;
+ }
+ this.hadleOperationConrol(itemId, param);
+ })
+ .catch(() => {
+ // 用户取消操作,恢复开关状态
+ console.log("item后", item);
+ item = !item;
+ console.log("item原始", item);
+ this.remoteSwitch = item;
+ console.log("this.remoteSwitch", this.remoteSwitch);
+ console.log("不请求后台");
+ });
+ },
hadleOperationConrol(id, param) {
let data = {
id: id,
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();
+ // });
},
},
};
@@ -837,14 +905,20 @@ export default {
.startClass {
z-index: 10;
position: absolute;
- top: 2.9rem;
- left: 3.4rem;
width: 0.18rem;
height: 0.18rem;
border-radius: 50%;
animation: blink 1s infinite;
background-color: #38fc52 !important;
}
+ .startClass1 {
+ top: 2.9rem;
+ left: 3.4rem;
+ }
+ .startClass2 {
+ top: 2.3rem;
+ left: 3.2rem;
+ }
.water-flow3 {
z-index: 10;
position: absolute;
@@ -1195,3 +1269,48 @@ export default {
}
}
+