Browse Source

添加窗帘,空调,隐藏本次更新不需要的设备

voice
zmt 4 years ago
parent
commit
6ed73980ac
  1. 6
      src/pages.json
  2. 8
      src/subpackage/device/pages/index/airC_manage.vue
  3. 12
      src/subpackage/device/pages/index/index.vue
  4. 23
      src/subpackage/device/pages/index/sunblind_manage.vue
  5. 8
      src/subpackage/device/pages/switch_manage/switch_manage.vue

6
src/pages.json

@ -270,6 +270,12 @@
}
},
{
"path": "pages/index/airC_manage",
"style" : {
"navigationBarTitleText": "空调管理"
}
},
{
"path": "pages/index/lease_ball_box_manage",
"style" : {
"navigationBarTitleText": "租球机管理"

8
src/subpackage/device/pages/index/airC_manage.vue

@ -0,0 +1,8 @@
<template>
</template>
<script>
</script>
<style>
</style>

12
src/subpackage/device/pages/index/index.vue

@ -43,18 +43,18 @@ const tabArr = [
{id: 3, name: '风扇', path: `/pages/switch_manage/switch_manage`},
{id: 4, name: '门禁', path: `/pages/switch_manage/switch_manage`},
{id: 5, name: '门闸', path: `/pages/switch_manage/switch_manage`},
{id: 6, name: '平板', path: `/pages/switch_manage/switch_manage`},
// {id: 6, name: '', path: `/pages/switch_manage/switch_manage`},
{id: 7, name: '售货柜', path: `/pages/device_manage/device_manage`},
{id: 8, name: '租售柜', path: `/pages/device_manage/device_manage`},
{id: 9, name: '储物柜', path: `/pages/device_manage/device_manage`},
{id: 10, name: '咖啡机', path: `/pages/device_manage/device_manage`},
{id: 11, name: '水阀', path: `/pages/switch_manage/switch_manage`},
{id: 12, name: '互动设备', path: `/pages/switch_manage/switch_manage`},
{id: 13, name: '监控', path: `/pages/switch_manage/switch_manage`},
// {id: 12, name: '', path: `/pages/switch_manage/switch_manage`},
// {id: 13, name: '', path: `/pages/switch_manage/switch_manage`},
{id: 14, name: '音响', path: `/pages/audio_manage/audio_manage`}, //audio_manage
{id: 15, name: '机器人', path: ``},
{id: 16, name: '租球机', path: ``},
{id: 17, name: '窗帘', path: `/pages/switch_manage/switch_manage`},
// {id: 15, name: '', path: ``},
// {id: 16, name: '', path: ``},
// {id: 17, name: '', path: `/pages/switch_manage/switch_manage`},
{id: 18, name: '路由器', path: `/pages/switch_manage/switch_manage`},
{id: 19, name: '物联卡', path: `/pages/switch_manage/switch_manage`},

23
src/subpackage/device/pages/index/sunblind_manage.vue

@ -33,8 +33,8 @@
</view>
<view class="slider-box">
<text>目前状态{{voiceLevel}}%</text>
<slider :value="voiceLevel" activeColor="#009874" block-color="#009874" block-size="22"
<text>目前状态{{sliderLevel}}%</text>
<slider :value="sliderLevel" activeColor="#009874" block-color="#009874" block-size="22"
@change="sliderChange" min="0" max="100" />
<view class="">
<text>0%</text>
@ -43,7 +43,7 @@
</view>
<view class="list-box">
<view class="l-item">
<view class="l-item" @click="handleClose">
<image src="../../static/images/sunblind_close.png" mode=""></image>
<text>关闭</text>
</view>
@ -51,7 +51,7 @@
<image src="../../static/images/close.png" mode=""></image>
<text>暂停</text>
</view>
<view class="l-item">
<view class="l-item" @click="handleOpen">
<image src="../../static/images/sunblind_open.png" mode=""></image>
<text>开启</text>
</view>
@ -91,7 +91,7 @@
return {
update_time: new Date(),
accountList: false,
voiceLevel:10,//10
sliderLevel:10,//10
sliceLength:0,
boxOne:false, // true: , false:
}
@ -100,7 +100,7 @@
console.log("opts:", opts);
this.mac = opts.mac;
this.updateList()
this.setSliceLength(this.voiceLevel)
this.setSliceLength(this.sliderLevel)
// try {
// util.showLoad();
// let _brandInfo = await this.$store.dispatch('getBrandInfo');
@ -145,9 +145,18 @@
isTip: true
})
},
handleClose(){
let val = this.sliderLevel>95 ? 100 : this.sliderLevel+5
this.setSliceLength(val)
},
handleOpen(){
let val = this.sliderLevel<5 ? 0 : this.sliderLevel-5
this.setSliceLength(val)
},
setSliceLength(value){
// this.level = value
this.voiceLevel = value
this.sliderLevel = value
this.sliceLength = Math.floor(value/(this.boxOne?5:10))
},
clickGoMonitorAccount() {

8
src/subpackage/device/pages/switch_manage/switch_manage.vue

@ -25,7 +25,7 @@
</view>
<!-- 不同设备的可操作按钮区分,目前无明显规律,so 按需求单独 if 判断 -->
<view class="si-bottom" v-if="pageInfo.isOpen || pageInfo.isClose || pageInfo.isDetail">
<view class="si-bottom" v-if="pageInfo.isOpen || pageInfo.isClose || pageInfo.isDetail||pageInfo.isTiming">
<view v-if="pageInfo.isOpen" @click="operateBtn({ switchInfo: e, status: 1 })" :style="{width:getIconWidth()}">
<image mode="aspectFit" :src="pageInfo.openIcon || ''"></image>
<view>{{pageInfo.openName || '-'}}</view>
@ -225,7 +225,9 @@ export default {
})
.catch(util.hideLoad)
},
controlDevice(e){
util.routeTo(`/subpackage/device/pages/index/lot_manage?mac=${switchInfo.hardware_standard}`, 'nT');
},
// status 0 -> 1 -> ,2 -> ,3 -> , 4 ->()
operateBtn: util.debounce(function({ switchInfo, status }){
console.log("icon tap status: ",status,switchInfo)
@ -234,7 +236,7 @@ export default {
//->& 20201224 5
///
if(status == 2) return util.showNone("未对接,前端等待接口中...")
if(status == 2) return util.showNone("该功能暂未开放")
if(status == 4){

Loading…
Cancel
Save