|
|
@ -13,7 +13,7 @@ |
|
|
|
<!-- 门闸没有状态查询 --> |
|
|
|
<!-- 请求接口自定义字段设备状态 1->在线,0->离线 --> |
|
|
|
<view class="sr-bot-router" v-if="pageInfo.name =='物联卡管理'"> |
|
|
|
sim状态: <text>{{e.hardware_model}}</text> |
|
|
|
sim状态: <text>{{getLotStatus(e)}}</text> |
|
|
|
</view> |
|
|
|
<view class="sr-bot" v-else-if="pageInfo.id !=5"> |
|
|
|
<view :class="[e.defineStatusCode == 1?'active':'']"> |
|
|
@ -101,7 +101,7 @@ const showArr = { |
|
|
|
openIcon: '/subpackage/device/static/images/open.png', |
|
|
|
closeIcon: '/subpackage/device/static/images/close.png', |
|
|
|
longOpenIcon: '/subpackage/device/static/images/longOpen.png',timingIcon: '/subpackage/device/static/images/timing.png', |
|
|
|
openName: '开', closeName: '关', hardware_type: 'Fan',longOpenName: '长按', timingName: '定时',iconNum:4, |
|
|
|
openName: '开', closeName: '关', hardware_type: 'WaterValve',longOpenName: '长按', timingName: '定时',iconNum:4, |
|
|
|
}, |
|
|
|
's12': { |
|
|
|
id: 12, name: '互动设备管理', isOpen: true, isClose: true, |
|
|
@ -139,6 +139,11 @@ export default { |
|
|
|
return 100/this.pageInfo.iconNum+'%' |
|
|
|
} |
|
|
|
}, |
|
|
|
getLotStatus(){//sim卡状态, 0 : 华为文档中没有 |
|
|
|
return (e)=>{ |
|
|
|
return ["未知","注册","重启","在线","离线"][e.extension['HWC'].device_status] |
|
|
|
} |
|
|
|
}, |
|
|
|
getViewWidth(){//计算按钮区域的宽度 |
|
|
|
return ()=>{ |
|
|
|
let widthViewArr = ["照明管理","水阀管理","风扇管理"] |
|
|
@ -168,7 +173,7 @@ export default { |
|
|
|
|
|
|
|
this.getDeviceList({ |
|
|
|
stadium_id: this.curStoreInfo.id, |
|
|
|
hardware_type: _pageInfo.hardware_type |
|
|
|
hardware_type: this.pageInfo.hardware_type |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -193,6 +198,12 @@ export default { |
|
|
|
.then(res=>{ |
|
|
|
util.hideLoad(); |
|
|
|
let _list = res.list || []; |
|
|
|
if(hardware_type=="Router4G"){ //路由器在线状态设置 |
|
|
|
_list = _list.map((e,i)=>{ |
|
|
|
e['defineStatusCode'] = e.extension.online? 1 : 0; |
|
|
|
return e |
|
|
|
}) |
|
|
|
} |
|
|
|
this.deviceList = _list; |
|
|
|
console.log(res) |
|
|
|
}) |
|
|
@ -202,9 +213,6 @@ export default { |
|
|
|
// 按钮操作, status 0 -> 关(左), 1 -> 开(右) ,2 -> 长开 ,3 -> 定时, 4 ->详情(自定义) |
|
|
|
operateBtn: util.debounce(function({ switchInfo, status }){ |
|
|
|
console.log("icon tap status: ",status,switchInfo) |
|
|
|
|
|
|
|
|
|
|
|
//todo 配置page.json ,写新的setting 页 |
|
|
|
|
|
|
|
let _data = this.getOperateReqData({ switchInfo, status }) |
|
|
|
//针对门禁没有关按钮发两条命令->开&关 20201224 后端: 直接发两条 关的那条这里填5 然后你那边不用管返回 |
|
|
@ -284,6 +292,14 @@ export default { |
|
|
|
}, |
|
|
|
// |
|
|
|
refreshStatusBtn: util.debounce(function({switchInfo, index}){ |
|
|
|
|
|
|
|
if(switchInfo.hardware_type == "Router4G"){ |
|
|
|
return this.getDeviceList({ |
|
|
|
stadium_id: this.curStoreInfo.id, |
|
|
|
hardware_type: this.pageInfo.hardware_type |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
this.getStatusReq({ |
|
|
|
data: this.getSwitchStatusQuery(switchInfo), |
|
|
|
index, |
|
|
|