Commit 705ad9a5 by zhangzhen

细节优化

parent 9caf358d
...@@ -127,6 +127,9 @@ import moment from "@/common/moment"; ...@@ -127,6 +127,9 @@ import moment from "@/common/moment";
cleanStatusEnum:{}, cleanStatusEnum:{},
switchDoor:true, switchDoor:true,
switchEl:true, switchEl:true,
deviceTime:{
}
}; };
}, },
filters:{ filters:{
...@@ -217,6 +220,15 @@ import moment from "@/common/moment"; ...@@ -217,6 +220,15 @@ import moment from "@/common/moment";
this.$forceUpdate(); this.$forceUpdate();
}, },
onDeviceRun(opType,devId){ onDeviceRun(opType,devId){
let that = this;
if(this.deviceTime[devId]){
uni.showToast({
icon:"none",
title:"操作频繁,请稍微再试"
})
return
}
this.deviceTime[devId] = true;
uni.showLoading({ uni.showLoading({
title:"请求中" title:"请求中"
}) })
...@@ -230,6 +242,13 @@ import moment from "@/common/moment"; ...@@ -230,6 +242,13 @@ import moment from "@/common/moment";
icon:"success", icon:"success",
title:"操作成功" title:"操作成功"
}) })
return ((id)=>{
setTimeout(()=>{
that.deviceTime[id] = false;
},5000)
})(devId)
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment