Commit 077d4999 by zhangzhen

设备操作细节优化

parent 7c01e522
......@@ -62,7 +62,7 @@
<view v-if="val.deviceList.el.status >=1" class="">
<!-- <button @tap="onDeviceRun(20,val.deviceList.el.devId)" class="cu-btn bg-blue margin-right-sm">开启</button>
<button @tap="onDeviceRun(40,val.deviceList.el.devId)" class="cu-btn bg-blue">关闭</button> -->
<switch class='red' data-type="door" :data-index="index" :data-k="k" :data-id="val.deviceList.el.devId" @change="onSwitchDoor" :class="val.deviceList.el.status==3?'checked':''" :checked="val.deviceList.el.status==3?true:false" color="#e54d42"></switch>
<switch data-type="door" :data-index="index" :data-k="k" :data-id="val.deviceList.el.devId" @change="onSwitchDoor" :class="val.deviceList.el.status==3?'checked':''" :checked="val.deviceList.el.status==3?true:false" color="#e54d42"></switch>
</view>
<view v-else class="">
<text>离线</text>
......@@ -134,8 +134,12 @@ import moment from "@/common/moment";
cleanStatusEnum:{},
switchDoor:true,
switchEl:true,
deviceTime:{
deviceTime:{},
optionStatus:{
10:'开门',
20:'取电',
30:'锁门',
40:'断电'
}
};
},
......@@ -257,7 +261,7 @@ import moment from "@/common/moment";
if(res.data.code ===200){
uni.showToast({
icon:"success",
title:"操作成功"
title:this.optionStatus[opType]+"成功"
})
return ((id)=>{
......
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