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. 10
      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", "path": "pages/index/lease_ball_box_manage",
"style" : { "style" : {
"navigationBarTitleText": "租球机管理" "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: 3, name: '风扇', path: `/pages/switch_manage/switch_manage`},
{id: 4, 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: 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: 7, name: '售货柜', path: `/pages/device_manage/device_manage`},
{id: 8, 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: 9, name: '储物柜', path: `/pages/device_manage/device_manage`},
{id: 10, 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: 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: 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: 18, name: '路由器', path: `/pages/switch_manage/switch_manage`},
{id: 19, 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>
<view class="slider-box"> <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" /> @change="sliderChange" min="0" max="100" />
<view class=""> <view class="">
<text>0%</text> <text>0%</text>
@ -43,7 +43,7 @@
</view> </view>
<view class="list-box"> <view class="list-box">
<view class="l-item">
<view class="l-item" @click="handleClose">
<image src="../../static/images/sunblind_close.png" mode=""></image> <image src="../../static/images/sunblind_close.png" mode=""></image>
<text>关闭</text> <text>关闭</text>
</view> </view>
@ -51,7 +51,7 @@
<image src="../../static/images/close.png" mode=""></image> <image src="../../static/images/close.png" mode=""></image>
<text>暂停</text> <text>暂停</text>
</view> </view>
<view class="l-item">
<view class="l-item" @click="handleOpen">
<image src="../../static/images/sunblind_open.png" mode=""></image> <image src="../../static/images/sunblind_open.png" mode=""></image>
<text>开启</text> <text>开启</text>
</view> </view>
@ -91,7 +91,7 @@
return { return {
update_time: new Date(), update_time: new Date(),
accountList: false, accountList: false,
voiceLevel:10,//10
sliderLevel:10,//10
sliceLength:0, sliceLength:0,
boxOne:false, // true: , false: boxOne:false, // true: , false:
} }
@ -100,7 +100,7 @@
console.log("opts:", opts); console.log("opts:", opts);
this.mac = opts.mac; this.mac = opts.mac;
this.updateList() this.updateList()
this.setSliceLength(this.voiceLevel)
this.setSliceLength(this.sliderLevel)
// try { // try {
// util.showLoad(); // util.showLoad();
// let _brandInfo = await this.$store.dispatch('getBrandInfo'); // let _brandInfo = await this.$store.dispatch('getBrandInfo');
@ -145,9 +145,18 @@
isTip: true 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){ setSliceLength(value){
// this.level = value // this.level = value
this.voiceLevel = value
this.sliderLevel = value
this.sliceLength = Math.floor(value/(this.boxOne?5:10)) this.sliceLength = Math.floor(value/(this.boxOne?5:10))
}, },
clickGoMonitorAccount() { clickGoMonitorAccount() {

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

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

Loading…
Cancel
Save