Преглед на файлове

delete 环境调节-控制权限

anxiaoxia преди 1 година
родител
ревизия
1d7933e149

+ 3 - 1
src/packagesEnv/pages/officehome/Header/space-basic.wpy

@@ -26,12 +26,13 @@
             <div class="g-fl room-name">
                 <span class="name_text">{{officeData.localName}}</span>
                 <has-person
-                    v-if="officeData.isPassengerPass !== undefined"
+                    v-if="officeData.isPassengerPass !== undefined && IsShowPerson"
                     :isPassengerPass="officeData.isPassengerPass"
                 ></has-person>
             </div>
             <div>
                 <residen-work
+                    v-if="options.roomType =='开放'"
                     :IsResiden="true"
                     :spaceId="options.spaceId"
                     :userInfo="userInfo"
@@ -47,6 +48,7 @@ import config from '@/config'
 
 wepy.component({
   props: {
+    IsShowPerson: Boolean,
     officeData: Object,
     options: Object,
     userInfo: Object

+ 0 - 5
src/packagesEnv/pages/officehome/airHand/air-hand-card.wpy

@@ -171,14 +171,12 @@ import config from '@config'
 import { isWithinLocation } from '@/service/location'
 import store from '@/store'
 import { mapState } from '@wepy/x'
-import { checkSpaceControl } from '@/packagesEnv/pages/common.js'
 
 let infoTimer
 const barWidth = 17
 
 wepy.component({
   props: {
-    isControl: Boolean, // 是否可控
     roomType: String, // 房间类型
     // hasBlowing: Boolean, // 有无变风量
     roomHasScene: Boolean, // 加班场景
@@ -313,7 +311,6 @@ wepy.component({
         })
     },
     allAirClick(val) {
-      if (!checkSpaceControl(this.isControl)) return
       this.getAirInfo()
       this.allAirShow = !val
     },
@@ -326,7 +323,6 @@ wepy.component({
       this.$emit('setCanScroll', true)
     },
     eachAirOpen(aindex) {
-      if (!checkSpaceControl(this.isControl)) return
       isWithinLocation()
         .then(() => {
           this.allDevices[aindex].open = !this.allDevices[aindex].open
@@ -498,7 +494,6 @@ wepy.component({
       return true
     },
     changeZongAir(btnType, value) {
-      if (!checkSpaceControl(this.isControl)) return
       if (!this.airData.isOpen && btnType != 'sw') return
       isWithinLocation()
         .then(() => {

+ 72 - 80
src/packagesEnv/pages/officehome/components/lamp-adjust.wpy

@@ -293,17 +293,15 @@
 </template>
 
 <script>
-import wepy from '@wepy/core';
+import wepy from '@wepy/core'
 import { setallLampHttp, getLampHttp, getStatusHttp } from '@/packagesEnv/api/officehome.js'
-import { isWithinLocation } from '@/service/location';
-import { checkSpaceControl } from '@/packagesEnv/pages/common.js'
-import config from '@/config';
-import store from '@/store';
-import { mapState } from '@wepy/x';
-let fifteenTimer = null;
+import { isWithinLocation } from '@/service/location'
+import config from '@/config'
+import store from '@/store'
+import { mapState } from '@wepy/x'
+let fifteenTimer = null
 wepy.component({
   props: {
-    isControl: Boolean, // 是否可控
     equipConfig: Array, // 设备配置情况
     controlMode: Number, // 手动模式
     roomType: String, // 房间类型
@@ -332,11 +330,11 @@ wepy.component({
   },
   watch: {
     spaceId() {
-      this.showLamps = false; // 恢复初始化值
-      this.allowSvg = 'down_Arrow.svg';
+      this.showLamps = false // 恢复初始化值
+      this.allowSvg = 'down_Arrow.svg'
 
-      this.getLampList();
-      this.getTwoTimerLoop();
+      this.getLampList()
+      this.getTwoTimerLoop()
     },
     lampHide(nval) {
       if (this.showLamps) {
@@ -346,14 +344,13 @@ wepy.component({
 
   },
   detached() {
-    clearInterval(this.lightsStatusTimer);
-    this.lightsStatusTimer = null;
-    clearTimeout(fifteenTimer);
-    fifteenTimer = null;
+    clearInterval(this.lightsStatusTimer)
+    this.lightsStatusTimer = null
+    clearTimeout(fifteenTimer)
+    fifteenTimer = null
   },
   methods: {
     openColourPop(obj) {
-      if (!checkSpaceControl(this.isControl)) return;
             //  灯开时 才能调节色温
       if (obj.runStatus && (obj.bright || obj.colorTemperature)) {
         this.$emit('component-open-colourPop', obj)
@@ -363,89 +360,89 @@ wepy.component({
     setLampItem(item) {
       if (item.lightType === 1) {
         if (item.switch) {
-          item.lampImg = 'lamp_small_open.png';
+          item.lampImg = 'lamp_small_open.png'
         } else {
-          item.lampImg = 'lamp_small_close.png';
+          item.lampImg = 'lamp_small_close.png'
         }
       } else {
         if (item.switch) {
-          item.lampImg = 'atmLamp_small_open.png';
+          item.lampImg = 'atmLamp_small_open.png'
         } else {
-          item.lampImg = 'atmLamp_small_close.png';
+          item.lampImg = 'atmLamp_small_close.png'
         }
       }
     },
     // 大于三个灯时,展示的数量
     showLampCount() {
-      let arr = [];
+      let arr = []
       this.initData.map((item, idx) => {
-        this.setLampItem(item);
+        this.setLampItem(item)
         if (this.initData.length < 3 || !this.showLamps) {
           if (idx < 2) {
-            arr.push(item);
+            arr.push(item)
           }
         } else {
-          arr = [...this.initData];
+          arr = [...this.initData]
         }
       })
       this.lampList = JSON.parse(JSON.stringify(arr))
     },
     getLampList() {
       getLampHttp({ spaceId: this.spaceId }).then(res => {
-        const content = res.content || [];
-        if (!content.length) return;
-        let flag = false;
+        const content = res.content || []
+        if (!content.length) return
+        let flag = false
         for (let index = 0; index < content.length; index++) {
-          let item = content[index];
-          item.switch = !!item.runStatus;
+          let item = content[index]
+          item.switch = !!item.runStatus
           if (item.runStatus) {
-            flag = true;
+            flag = true
           }
         }
-        this.lampSw = flag;
-        this.initData = JSON.parse(JSON.stringify(res.content));//  灯的数据
-        this.total = this.initData.length;
+        this.lampSw = flag
+        this.initData = JSON.parse(JSON.stringify(res.content))//  灯的数据
+        this.total = this.initData.length
         this.showLampCount()
       })
     },
     vibrateShort() {
       if (wx.canIUse('vibrateShort')) {
-        wx.vibrateShort();
+        wx.vibrateShort()
       } else {
-        wx.vibrateLong();
+        wx.vibrateLong()
       }
     },
         // 手动模式下设备是否可控
     checkControlMode(id) {
-      let flag = false;
+      let flag = false
       if (!this.controlMode) {
         return flag
       }
 
             //  总开关
       if (id === 'allLamp') {
-        let canOpen = true;
+        let canOpen = true
         for (let i = 0; i < this.equipConfig.length; i++) {
-          const ele = this.equipConfig[i];
+          const ele = this.equipConfig[i]
           for (let j = 0; j < this.lampList.length; j++) {
-            const jele = this.lampList[j];
+            const jele = this.lampList[j]
                         // 有可控设备
             if (ele.equipmentId === jele.id && ele.isExeSpaceTime) {
-              canOpen = false;
-              return;
+              canOpen = false
+              return
             }
           }
         }
-        flag = canOpen;
+        flag = canOpen
       } else {
         this.equipConfig.map(item => {
                     //  设备不受控制 可直接开灯
           if (item.equipmentId === id && !item.isExeSpaceTime) {
-            flag = true;
+            flag = true
           }
                     // 设备受控 且有当前工作时间 可直接开灯
           if (item.equipmentId === id && this.isNowTime && item.isExeSpaceTime) {
-            flag = true;
+            flag = true
           }
         })
       }
@@ -455,97 +452,92 @@ wepy.component({
     checkLampCanOpen(value, id) { // 判断灯是否能开启
       if (value) {
                 // 手动模式下设备是否可控
-        let canControl = this.checkControlMode(id);
+        let canControl = this.checkControlMode(id)
                 // 有场景无时间 得预约
         if (this.roomHasScene && !this.isNowTime && !canControl) {
                     // 手动模式下
-          this.controlMode && this.$emit('component-EquipType-workTimePop', id);
-          this.$emit('component-open-workTimePop', true);
+          this.controlMode && this.$emit('component-EquipType-workTimePop', id)
+          this.$emit('component-open-workTimePop', true)
           return false
         }
       }
       return true
     },
     eqChange(value, id, index) {
-      if (!checkSpaceControl(this.isControl)) return;
       isWithinLocation().then(() => {
         if (this.roomType === '开放') {
-          this.showWorkTime = this.checkLampCanOpen(value, id);
-          if (!this.showWorkTime) return;
+          this.showWorkTime = this.checkLampCanOpen(value, id)
+          if (!this.showWorkTime) return
         }
-        this.fifteenTimeout();
-        let params = [];
+        this.fifteenTimeout()
+        let params = []
         if (id === 'allLamp') {
-          wx.uma.trackEvent(`officeHome_lamp_card_Switch_${value}`, { key: value ? '卡片-开灯' : '卡片-关灯' });
-          params = this.initData;
+          params = this.initData
           params.forEach(item => {
             item.switch = value
           })
          // 前端现更改灯的状态,15s后获取设备状态
           this.lampList.map(item => {
-            item.switch = value;
+            item.switch = value
             this.setLampItem(item)
           })
           this.initData.map(item => {
-            item.switch = value;
+            item.switch = value
             this.setLampItem(item)
           })
-          this.lampSw = value;
+          this.lampSw = value
         } else {
-          wx.uma.trackEvent(`officeHome_lamp_list_Switch_${value}`, { key: value ? '列表-开灯' : '列表-关灯' });
-          params = [{ id: id, switch: value }];
+          params = [{ id: id, switch: value }]
           //  前端现更改灯的状态,15s后获取设备状态
           if (this.lampList.length === 1) {
-            this.lampSw = value;
+            this.lampSw = value
           }
           this.lampList.map(item => {
             if (item.id === id) {
-              item.switch = value;
+              item.switch = value
               this.setLampItem(item)
             }
           })
           this.initData.map(item => {
             if (item.id === id) {
-              item.switch = value;
+              item.switch = value
               this.setLampItem(item)
             }
           })
         }
-        this.fifteenTimeout();
-        setallLampHttp(params).then(res => {});
-        this.vibrateShort();
+        this.fifteenTimeout()
+        setallLampHttp(params).then(res => {})
+        this.vibrateShort()
       })
     },
     // 15s 之后再请求状态
     fifteenTimeout() {
-      clearInterval(this.lightsStatusTimer);
-      this.lightsStatusTimer = null;
-      clearTimeout(fifteenTimer);
-      fifteenTimer = null;
+      clearInterval(this.lightsStatusTimer)
+      this.lightsStatusTimer = null
+      clearTimeout(fifteenTimer)
+      fifteenTimer = null
       fifteenTimer = setTimeout(() => {
-        this.getTwoTimerLoop();
-      }, 1000 * 15);
+        this.getTwoTimerLoop()
+      }, 1000 * 15)
     },
     getTwoTimerLoop() {
-      clearInterval(this.lightsStatusTimer);
-      this.lightsStatusTimer = null;
+      clearInterval(this.lightsStatusTimer)
+      this.lightsStatusTimer = null
       this.lightsStatusTimer = setInterval(() => {
-        this.getLampList();
-      }, 2 * 1000); // 2秒描刷接口
+        this.getLampList()
+      }, 2 * 1000) // 2秒描刷接口
     },
 
         // 灯列表
     handleShow() {
-      if (!checkSpaceControl(this.isControl)) return;
-      if (!this.lampList.length) return;
+      if (!this.lampList.length) return
       this.showLamps = !this.showLamps
       if (!this.showLamps) {
         this.allowSvg = 'down_Arrow.svg'
       } else {
         this.allowSvg = 'up_Arrow.svg'
       }
-      this.setLampList();
-      wx.uma.trackEvent('officeHome_lamp_show', { key: this.showLamps ? '展开' : '收起' });
+      this.setLampList()
     },
     setLampList() {
       this.showLampCount()

+ 41 - 45
src/packagesEnv/pages/officehome/components/socket-card.wpy

@@ -56,17 +56,15 @@
 </template>
 
 <script>
-import wepy from '@wepy/core';
+import wepy from '@wepy/core'
 import { setSocketHttp, getSocketHttp } from '@/packagesEnv/api/officehome.js'
-import { isWithinLocation } from '@/service/location';
-import config from '@/config';
-import store from '@/store';
-import { checkSpaceControl } from '@/packagesEnv/pages/common.js'
-import { mapState, mapActions } from '@wepy/x';
-let timer = null;
+import { isWithinLocation } from '@/service/location'
+import config from '@/config'
+import store from '@/store'
+import { mapState, mapActions } from '@wepy/x'
+let timer = null
 wepy.component({
   props: {
-    isControl: Boolean, // 是否可控
     roomHasScene: String,
     roomType: String,
     controlMode: Number,
@@ -97,28 +95,28 @@ wepy.component({
     ...mapState({ isNowTime: state => state.officehome.isNowTime }),
     socketLength() {
             // 灯的个数 大于 1 为true,
-      let length = false;
+      let length = false
       if (this.socketList.length > 1) {
-        length = true;
+        length = true
       } else {
-        length = false;
+        length = false
       }
       return length
     }
   },
   watch: {
     spaceId() {
-      this.showsockets = false; // 恢复初始化值
-      this.allowSvg = 'down_Arrow.svg';
-      this.onlyOne = true; // 切换空间重新触发
-      this.handlerTimer();
+      this.showsockets = false // 恢复初始化值
+      this.allowSvg = 'down_Arrow.svg'
+      this.onlyOne = true // 切换空间重新触发
+      this.handlerTimer()
     },
     openEquipList(newVal) {
       if (newVal.length) {
         let arr = []
         newVal.map(item => {
           if (item.type === 'CFIDSC') {
-            item.switch = true;
+            item.switch = true
             item.id = item.objectId
             item.switchCode = 'EquipSwitchSet'
             item.value = 1
@@ -127,23 +125,23 @@ wepy.component({
         })
         if (arr.length) {
           setSocketHttp(arr).then(res => {
-            this.handlerTimer();
+            this.handlerTimer()
           })
         }
       }
     }
   },
   detached() {
-    clearInterval(timer);
-    timer = null;
+    clearInterval(timer)
+    timer = null
   },
   methods: {
      // 判断窗帘是否能开启
     checkSocketCanOpen(value, id) {
       if (value) {
         if (this.roomHasScene && !this.isNowTime) { // 有场景无时间 得预约
-          this.controlMode && this.$emit('component-EquipType-workTimePop', id);
-          this.$emit('component-open-workTimePop', true);
+          this.controlMode && this.$emit('component-EquipType-workTimePop', id)
+          this.$emit('component-open-workTimePop', true)
 
           return false
         }
@@ -154,67 +152,65 @@ wepy.component({
     allsocket() {
       this.socketSw = !this.socketSw
       this.socketList.forEach(item => {
-        item.value = this.socketSw ? 1 : 0;
-      });
-      return this.socketList;
+        item.value = this.socketSw ? 1 : 0
+      })
+      return this.socketList
     },
 
         // 控制插座
     eqChange(value, id, item) {
-      if (!checkSpaceControl(this.isControl)) return;
       isWithinLocation().then(() => {
       /* 插座功能暂时没有加班功能  if (this.roomType === '开放') {
           this.showWorkTime = this.checkSocketCanOpen(value, id);
           if (!this.showWorkTime) return;
         } */
-        let paramsArr = [];
+        let paramsArr = []
         if (id === 'allsocket') {
-          paramsArr = this.allsocket();
+          paramsArr = this.allsocket()
         } else {
-          item.value = value ? 1 : 0;
+          item.value = value ? 1 : 0
           paramsArr.push(item)
         }
         setSocketHttp(paramsArr).then(() => {
-          this.handlerTimer();
+          this.handlerTimer()
         })
-        this.vibrateShort();
+        this.vibrateShort()
       })
     },
     // 定时调
     handlerTimer() {
-      this.getsocketList();
-      clearInterval(timer);
-      timer = null;
+      this.getsocketList()
+      clearInterval(timer)
+      timer = null
       timer = setInterval(() => {
-        this.getsocketList();
-      }, 1000 * 8);
+        this.getsocketList()
+      }, 1000 * 8)
     },
     getsocketList() {
       getSocketHttp({ spaceId: this.spaceId }).then(res => {
-        this.socketSw = res.data.runStatus;
+        this.socketSw = res.data.runStatus
         this.socketList = res.data.equipList || []
-        this.onlyOne && this.$emit('component-showSocket', this.socketList.length);
-        this.onlyOne = false;
+        this.onlyOne && this.$emit('component-showSocket', this.socketList.length)
+        this.onlyOne = false
         for (let index = 0; index < this.socketList.length; index++) {
-          const element = this.socketList[index];
-          element.runStatus = !!element.runStatus;
+          const element = this.socketList[index]
+          element.runStatus = !!element.runStatus
           element.code = element.switchCode
         }
       })
     },
     vibrateShort() {
       if (wx.canIUse('vibrateShort')) {
-        wx.vibrateShort();
+        wx.vibrateShort()
       } else {
-        wx.vibrateLong();
+        wx.vibrateLong()
       }
     },
 
         // 灯列表
     changeSwitchLR(val) {
-      if (!checkSpaceControl(this.isControl)) return;
-      if (!this.socketLength) return;
-      this.showsockets = !val;
+      if (!this.socketLength) return
+      this.showsockets = !val
     }
   }
 })

+ 31 - 528
src/packagesEnv/pages/officehome/index.wpy

@@ -33,7 +33,7 @@
                 class="map-wrap"
                 v-show="transY"
             >
-            <!--      <map-home    v-if="userInfo&& userInfo.userId" -->
+                <!--      <map-home    v-if="userInfo&& userInfo.userId" -->
                 <map-home
                     :spaceIdProp="spaceIdProp"
                     :companyIdProp="companyIdProp"
@@ -77,6 +77,7 @@
                         v-show="moveToBottom"
                     >
                         <space-basic
+                            :IsShowPerson="false"
                             :officeData="officeData"
                             :options="options"
                             :userInfo="userInfo"
@@ -89,6 +90,7 @@
                         v-show="!moveToBottom"
                     >
                         <space-basic
+                            :IsShowPerson="true"
                             :officeData="officeData"
                             :options="options"
                             :userInfo="userInfo"
@@ -125,22 +127,12 @@
                         </div>
                         <div v-if="roomHasScene && options.roomType =='开放'">
                             <work-scene-hand
-                                v-if="controlMode==1"
                                 @component-open-workTimePop="handlePopup"
                                 @component-get-workTimeData="getWorkDayTime"
                                 @component-open-sceneShowpop="handleWorkOff"
                                 @component-EquipType-workTimePop="dialogShowEquipType"
                                 :workDayTime="workDayTime"
-                                :isControl="isControl"
                             ></work-scene-hand>
-                            <work-scene
-                                v-if="controlMode==0"
-                                @component-open-workTimePop="handlePopup"
-                                @component-get-workTimeData="getWorkDayTime"
-                                @component-open-sceneShowpop="handleWorkOff"
-                                :workDayTime="workDayTime"
-                                :isControl="isControl"
-                            ></work-scene>
                         </div>
                     </div>
                     <all-close
@@ -150,36 +142,11 @@
                         v-if="(nowTime>eightTime||nowTime<sixTime)&&projectId=='Pj1101080259'"
                         ref="allclose"
                     ></all-close>
-
-                    <!-- 空调调节卡片 -->
-                    <air-adjust
-                        v-if="(officeData.temperature || spaceEqFlagObj.hasAir)&&controlMode==0"
-                        id="inToView0"
-                        :isControl="isControl"
-                        :airVisible="airVisible"
-                        :cardWidth="cardWidth"
-                        :roomHasScene="roomHasScene"
-                        :hasAir="spaceEqFlagObj.hasAir"
-                        :hasBlowing="spaceEqFlagObj.hasBlowing"
-                        :airVolumes="officeData.airVolumes"
-                        :temperature="officeData.temperature"
-                        :objectId="options.spaceId"
-                        :roomType="options.roomType"
-                        :projectId="projectId"
-                        :isACATVA="isACATVA"
-                        :isACATFC="isACATFC"
-                        @showDetail="handleDetail"
-                        @airShowVisible="airShowVisible"
-                        @component-open-workTimePop="handlePopup"
-                        @airTemp="airTemp"
-                        v-bind:key="airKey"
-                    ></air-adjust>
                     <air-hand-card
                         ref="airHandCard"
-                        v-if="spaceEqFlagObj.hasAir&&controlMode==1"
+                        v-if="spaceEqFlagObj.hasAir"
                         id="inToView02"
                         :cardWidth="cardWidth"
-                        :isControl="isControl"
                         :airVisible="airVisible"
                         :roomHasScene="roomHasScene"
                         :hasAir="spaceEqFlagObj.hasAir"
@@ -214,7 +181,6 @@
                     <lamp-adjust
                         v-if="spaceEqFlagObj.hasLamp"
                         id="inToView1"
-                        :isControl="isControl"
                         :roomHasScene="roomHasScene"
                         :lampHide="lampHide"
                         :spaceId="options.spaceId"
@@ -231,7 +197,6 @@
                     <div v-show="spaceEqFlagObj.hasCurtain">
                         <curtain-card
                             id="inToView2"
-                            :isControl="isControl"
                             :projectId="projectId"
                             :spaceId="options.spaceId"
                             :curtainVisible="curtainVisible"
@@ -244,7 +209,6 @@
                     <div v-show="spaceEqFlagObj.hasSocket">
                         <socket-card
                             id="inToView3"
-                            :isControl="isControl"
                             :roomHasScene="roomHasScene"
                             :roomType="options.roomType"
                             :controlMode="controlMode"
@@ -265,68 +229,11 @@
                         class="pageBottom"
                         :style="{height:windowHeightpx / 2+'px'}"
                     >
-                        <image
+                        <!-- <image
                             class="log-text"
                             src="{{h5StaticLogo}}/page-home/tenatslink.svg"
-                        />
+                        /> -->
                     </div>
-
-                    <!--场景 - 帮忙预约 -->
-                    <van-popup
-                        overlay-style="background: rgba(0, 0, 0, 0.4)"
-                        round
-                        :show="helpOrderShow"
-                        @close="handleOrderPopup"
-                    >
-                        <div class="scene-popup order-popup">
-                            <div class="scene-popup-head">
-                                <div class="head-imgbg">
-                                    <div class="head-imgbox">
-                                        <image :src="h5StaticPath+sceneDetail.img" />
-                                    </div>
-                                </div>
-                                <span>临时使用会议室?</span>
-                            </div>
-                            <div class="scene-popup-body">
-                                <div class="order-item">为您预约至 <span class="time-span">{{orderMeetTimeStr}}</span></div>
-                            </div>
-                            <div class="popup-btns order-btns">
-                                <span
-                                    class="btnspan btn_com"
-                                    @click="handleOrderPopup"
-                                >不预约</span><span
-                                    class="btnspan surespan"
-                                    @click="orderMeeting"
-                                >预约</span>
-                            </div>
-                        </div>
-                    </van-popup>
-                    <van-popup
-                        overlay-style="background: rgba(0, 0, 0, 0.4)"
-                        round
-                        :show="hasOrderShow"
-                        @close="handleHasPopup"
-                    >
-                        <div class="scene-popup order-popup">
-                            <div class="scene-popup-head">
-                                <div class="head-imgbg">
-                                    <div class="head-imgbox">
-                                        <image :src="h5StaticPath+sceneDetail.img" />
-                                    </div>
-                                </div>
-                                <span>该会议室已被预定!</span>
-                            </div>
-                            <div class="scene-popup-body">
-                                <div class="order-item"> 如需预约,<br />请切换其他会议室。</div>
-                            </div>
-                            <div
-                                class="btns"
-                                @click.stop="handleHasPopup"
-                            >
-                                <span class="btn btn_com">隐藏</span>
-                            </div>
-                        </div>
-                    </van-popup>
                 </div>
             </div>
 
@@ -417,7 +324,6 @@
         </van-popup>
         <!-- 浮层场景 popUp 手动 -->
         <van-popup
-            v-if="controlMode==1"
             :custom-style="'height:'+handPopHight+'%'"
             overlay-style="background: rgba(0, 0, 0, 0.4)"
             position="bottom"
@@ -445,34 +351,6 @@
                 </work-overtime-hand>
             </div>
         </van-popup>
-        <!-- 浮层场景 popUp 自动 -->
-        <van-popup
-            v-if="controlMode==0"
-            custom-style="height: 55%"
-            overlay-style="background: rgba(0, 0, 0, 0.4)"
-            position="bottom"
-            round
-            :show="visible"
-            @close="handlePopup(false)"
-        >
-            <div
-                class="popup-box"
-                v-if="options.roomType =='开放' && visible"
-            >
-                <work-overtime
-                    @component-close-visible="handlePopup"
-                    @component-get-workTime="getWorkDayTime"
-                    @component-set-countDown="handlecountDown"
-                    :visible="visible"
-                    :localName="officeData.localName"
-                    :workDayTime="workDayTime"
-                    :objectId="options.spaceId"
-                    :countDownTwoMin="countDownTwoMin"
-                >
-
-                </work-overtime>
-            </div>
-        </van-popup>
 
         <!--场景 - 详情 -->
         <van-popup
@@ -494,10 +372,11 @@
                 v-if="options.roomType !='开放'"
                 class="meet-popup"
             >
-                <pop-scene 
-                    :sceneDetail="sceneDetail" 
-                    @close-scene-show="hideScene">
-                </pop-scene>  
+                <pop-scene
+                    :sceneDetail="sceneDetail"
+                    @close-scene-show="hideScene"
+                >
+                </pop-scene>
             </div>
 
         </van-popup>
@@ -625,10 +504,7 @@ import {
     switchoverSceneHttp,
     querySpaceSceneConfigHttp,
     queryCustomAndScence,
-    queryEquipmentRunConfig,
-    queryProjectConfig,
-    queryUserControlInfo,
-    querySpaceMeetingInfo
+    queryEquipmentRunConfig
 } from '../../api/officehome.js'
 
 import {
@@ -642,11 +518,9 @@ import loadFont from '@/common/loadFont'
 import { getCompanyMapData } from '@/api/home'
 import { saveCompanyConfig } from '@/service/companyConfig'
 import { checkHasUserInfo } from '@/service/user'
-import { checkSpaceControl } from '../common.js'
 // import { floorInfo, defalutSelectedId } from '../intelligentControl/data/map';
 import { getNowDate, getTowNum } from '@/service/meetingTimes'
 
-import { umaInit } from '../common.js'
 let spaceInfoStatusTimer = null
 let pageSelectedAreaRecord = {
     // key为楼层ID,value 为spceId
@@ -723,8 +597,7 @@ wepy.page({
       data: [],
       curtainName: '窗帘'
     },
-    isControlAll: false, // 所有空间可控否
-    isControlSpace: false, // 当前空间可控否
+    vanPopupIndex: '',
     colourConfig: {}, // 色温设置
     colourVisible: false, // 色温弹窗
     equipmentsConfig: [], // 设备配置
@@ -743,13 +616,10 @@ wepy.page({
     opacityV: 1,
     transYCopy: 0,
     windowHeightpx: 0,
-    viewheight: 'auto',
     startY: 0,
     movesign: false,
     scale: 1,
-    moveToTop: true,
     moveToBottom: false,
-        // pscrollTop: 0,
     spaceIdProp: '',
     companyIdProp: '',
     preDataFinsh: false,
@@ -763,9 +633,6 @@ wepy.page({
     navFixed: false, // 滑动置顶
 
     showWorkOff: false, // 开放办公室的 提前关闭是否展示
-    nextCusStartTime: null, // 第二天服务定制开始时间
-    cusStartTime: null, // 当天服务定制-开始时间
-    cusEndTime: null, // 当天服务定制-结束时间
     officeData: null,
     headScene: '', // 头部文案
     headImg: '', // 头部背景图片
@@ -828,17 +695,8 @@ wepy.page({
     topBarHeight: 72,
     roomPicTop: roomPicTop,
     stopScrollCheck: false, // 点击导航
-    toView: 'inToView',
     navId: 0,
     visible: false,
-    sceneShow: false,
-    filtermeeting: {}, // 找到该会议室的数据
-    helpOrderShow: false, // 显示帮忙预约窗口
-    hasOrderShow: false, // 显示已经被预约窗口
-    orderMeetTimeStr: null, // 页面显示的预约时间
-    endOrderTime: null,
-    startOrderTime: null,
-    vanPopupIndex: null,
         // 空间设备
     spaceEqFlagObj: {
       hasAir: true, // 有无空调
@@ -859,9 +717,6 @@ wepy.page({
     currcompanyId: '',
     saveCompanyIdRes: '',
     routeParams: {},
-    nowBooking: null,
-    visit: false, // 是否是访客
-    currentTimeValue: [0, 0],
     isACATVA: false,
     isACATFC: false,
     eightTime: 0,
@@ -869,8 +724,7 @@ wepy.page({
     nowTime: new Date().valueOf(),
     isWorkOff: false, // 我要离开 点击否
     bookEquipList: '', // 预约显示的设备
-    controlMode: 0,
-    userRoleList: []
+    controlMode: 1
   },
   computed: {
     ...mapState({
@@ -887,11 +741,6 @@ wepy.page({
                 this.options.roomType === '会议室' &&
                 this.spaceEqFlagObj.hasLamp
       return meetingScene
-    },
-        // 空间受控
-    isControl() {
-      const can = this.isControlAll || this.isControlSpace
-      return can
     }
   },
   watch: {
@@ -915,8 +764,6 @@ wepy.page({
     // 加载字体
   onLoad(routeParams) {
     this.getCardWidth()
-    this.getConfig()
-    umaInit()
     if (!this.homePageHasHidden) return
     var nowTimeStr = moment().format('YYYY-MM-DD')
     var eightTime = moment(nowTimeStr + ' 20:00:00').valueOf()
@@ -924,9 +771,7 @@ wepy.page({
     this.sixTime = sixTime
     this.eightTime = eightTime
 
-    var _this = this
     this.routeParams = routeParams
-        // console.log('routeParams', routeParams)
 
     console.log('this.userInfo==', this.userInfo)
 
@@ -989,7 +834,6 @@ wepy.page({
         this.getData() // 获取数据
         wx.removeStorageSync('lastSearchedSpace')
       } else {
-        console.log('onshow', this.spaceEqFlagObj)
                 // 这个是从地图切换按钮回来
 
         this.getHistorySelectedArea().then(res => {
@@ -1016,15 +860,6 @@ wepy.page({
             // console.log('onready');
     }
   },
-    // onPageScroll(t) {
-    // this.pscrollTop = t.scrollTop                                                                                                                                                                                                                                                                        ;
-    // if (this.timer) clearTimeout(this.timer)
-    // this.timer = setTimeout(() => {
-    // this.stopScrollCheck = false                                                                                                                                                                                                                                                                         ;
-    // }, 60)                                                                                                                                                                                                                                                                                               ;
-    // this.scrollActive()                                                                                                                                                                                                                                                                                  ;
-    // },
-
   onHide() {
         // this.spaceEqFlagObj = {
         // hasAir: true,
@@ -1037,63 +872,6 @@ wepy.page({
     spaceInfoStatusTimer = clearInterval(spaceInfoStatusTimer)
   },
   methods: {
-        // 权限
-    async getConfig() {
-      const isOpenPermission = await this.projectConfig()
-      if (isOpenPermission) {
-        await this.userControlConfig()
-      } else {
-        this.isControlAll = true // 没有开启权限控制,可控所有空间
-      }
-    },
-    checkControl() {
-      if (this.isControlAll) return
-      this.isControlAll = false // 所有空间可控
-      this.isControlSpace = false // 当前空间可控
-            // operator项目运营人员身份operator.admin运营管理员operator.regular运营管理
-            // 可控全部空间
-      for (let i = 0; i < this.userRoleList.length; i++) {
-        let item = this.userRoleList[i]
-        const has = item.indexOf('operator')
-        if (has != '-1') {
-          this.isControlAll = true
-          break
-        }
-      }
-
-      for (let i = 0; i < this.controlSpaceList.length; i++) {
-        let item = this.controlSpaceList[i]
-        if (item === this.options.spaceId) {
-          this.isControlSpace = true
-          break
-        }
-      }
-    },
-        // 空间控制权限
-    userControlConfig() {
-      return queryUserControlInfo().then(res => {
-        this.userRoleList = res.data.userRoleList || []
-        this.controlSpaceList = res.data.controlSpaceList || []
-        this.checkControl()
-      })
-    },
-        // 会议室控制权限
-    spaceMeetingConfig() {
-            // 该用户当前时间参会的会议室
-      querySpaceMeetingInfo([this.options.spaceId]).then(res => {
-        const resArr = res.data || []
-        if (resArr.length) {
-          this.isControlSpace = true
-        }
-      })
-    },
-        // 项目控制权限
-    projectConfig() {
-            // 当前项目是否开启权限控制功能
-      return queryProjectConfig().then(res => {
-        return res.data.isOpenPermission
-      })
-    },
     setCanScroll(val) {
       this.canscroll = val
     },
@@ -1191,7 +969,6 @@ wepy.page({
       }
     },
     showAllClose() {
-      if (!checkSpaceControl(this.isControl)) return
       this.closeAllShow = true
       this.closeShowNum = 0
       this.closeStatus = false
@@ -1390,9 +1167,6 @@ wepy.page({
         type: code,
         pubname: config.brsgServer.pubname
       }
-      if (this.nowBooking) {
-        Object.assign(params, { id: this.nowBooking.id })
-      }
       return switchoverSceneHttp(params)
     },
     spaceInfoStatusTimer() {
@@ -1405,12 +1179,9 @@ wepy.page({
     mapChangeSpaceInfo(spaceId) {
       this.options.spaceId = spaceId
       this.getData()
-      console.log(this.controlSpaceList, '-----this.controlSpaceList---')
-      this.checkControl()
     },
     getSpaceInfo() {
             // 空间信息
-      var _this = this
       if (!this.options.spaceId) return
       const params = {
         criteria: {
@@ -1425,8 +1196,7 @@ wepy.page({
         this.checkSpaceType(this.officeData.roomFuncType)
         if (res && res.content) {
           res.content.forEach(item => {
-            this.controlMode = item.controlMode || 0
-            this.viewOne = this.inToview()
+            this.controlMode = item.controlMode || 1
 
             var envlist = [
               {
@@ -1477,44 +1247,22 @@ wepy.page({
               envlist[2].level = '--'
               envlist[2].num = '--'
             }
-            if (_this.controlMode == 0) {
-              var humidityNum =
-                                item.humidity || item.humidity == 0
-                                    ? item.humidity.toFixed(0)
-                                    : '--'
-              var humidityText =
-                                item.humidity || item.humidity == 0
-                                    ? this.checkLevel(item.humidity, 'humidity').levelTxt
-                                    : '--'
-              var humidityObj = {
-                id: 4,
-                name: '湿度',
-                num: humidityNum,
-                level: humidityText,
-                funcid: 'Tdb,RH',
-                code: 'shidu'
-              }
-              envlist.push(humidityObj)
-            }
-            if (_this.controlMode == 1) {
-              var temperNum = this.officeData.temperature
-                                ? this.officeData.temperature
-                                : '--'
-              var temperText = this.officeData.temperature
-                                ? this.checkLevel(this.officeData.temperature, 'temper')
-                                    .levelTxt
-                                : '--'
-              var tempObj = {
-                id: 0,
-                name: '温度',
-                num: temperNum,
-                level: temperText,
-                funcid: 'Tdb,RH',
-                code: 'wendu'
-              }
-              envlist.unshift(tempObj)
+            var temperNum = this.officeData.temperature
+                            ? this.officeData.temperature
+                            : '--'
+            var temperText = this.officeData.temperature
+                            ? this.checkLevel(this.officeData.temperature, 'temper')
+                                .levelTxt
+                            : '--'
+            var tempObj = {
+              id: 0,
+              name: '温度',
+              num: temperNum,
+              level: temperText,
+              funcid: 'Tdb,RH',
+              code: 'wendu'
             }
-                        // console.log("_this.controlMode", _this.controlMode, envlist)                                                                                                                                                                                                                                         ;
+            envlist.unshift(tempObj)
             this.envlist = envlist
           })
         } else {
@@ -1604,26 +1352,6 @@ wepy.page({
         this.options.roomType = '其它'
         this.headImg = 'office_publi_2.png'
       }
-            // 当前空间为会议室,但用户没有所有空间的控制权
-      if (this.options.roomType === '会议室' && !this.isControl) {
-        this.spaceMeetingConfig()
-      }
-    },
-    hourMiChange(str) {
-            // 转为时间 19.3 - 19:30 19.41-19:41 19-19:00
-      str = str.toString()
-      let newStr = ''
-      let dLen = str.length > 2 ? str.split('.')[1].length : str
-      if (dLen === 1) {
-        str = str.replace('.', '') + '0'
-        newStr = str.slice(0, 2) + ':' + str.slice(2)
-      } else if (dLen === 2) {
-        str = str.replace('.', '')
-        newStr = str.slice(0, 2) + ':' + str.slice(2)
-      } else {
-        newStr = str + ':00'
-      }
-      return newStr
     },
     checkLevel(value, name, seasonType) {
       let tdbParam = {
@@ -1669,20 +1397,6 @@ wepy.page({
       let levelTxt = objList[name].text[level]
       return { level, levelTxt }
     },
-    inToview() {
-      let inToViewOne = ''
-      if (
-                (this.officeData.temperature || this.spaceEqFlagObj.hasAir) &&
-                this.controlMode == 0
-            ) {
-        inToViewOne = '#inToView0'
-      }
-      if (this.spaceEqFlagObj.hasAir && this.controlMode == 1) {
-        inToViewOne = '#inToView02'
-      }
-      return inToViewOne
-    },
-
     getCardWidth() {
             // 获取每一个卡片的top height
       var _this = this
@@ -1702,7 +1416,7 @@ wepy.page({
       const query = wx.createSelectorQuery()
       var halfWindowHeightpx = this.windowHeightpx / 2
       query.select('#roomDetail').boundingClientRect()
-      query.select(this.viewOne).boundingClientRect()
+      query.select('#inToView02').boundingClientRect()
       query.select('#inToView5').boundingClientRect()
       query.select('#inToView1').boundingClientRect()
       query.select('#inToView2').boundingClientRect()
@@ -1745,9 +1459,6 @@ wepy.page({
       var targetNav = this.navList.find(function (item) {
         return item.id == id
       })
-      wx.uma.trackEvent(`officeHome_navigation_${targetNav.code}`, {
-        key: '环境调节-导航栏'
-      })
       this.scrollTop = targetNav.top // 实现点击导航 滚动
     },
     async scrollEvent(event) {
@@ -1783,20 +1494,12 @@ wepy.page({
     },
         // 进入 detail 页
     handleDetail(data) {
-      if (!checkSpaceControl(this.isControl)) return
-      data.code &&
-                wx.uma.trackEvent(`officeHome_header_${data.code}`, {
-                  key: '环境调节-空间照片-环境指标'
-                })
       wx.navigateTo({
         url: `./detail?spaceId=${this.officeData.id}&funcid=${data.funcid}`
       })
     },
         // 进入地图页
     toRoom() {
-      wx.uma.trackEvent('officeHome_navigation_map', {
-        key: '环境调节-导航栏-地图'
-      })
             // wx.navigateTo({
             // url: `../intelligentControl/home?id=${this.officeData.id}&from=officehome&companyIdProp=${this.companyIdProp}`
             // })                                                                                                                                                                                                                                                                                                   ;
@@ -1843,65 +1546,9 @@ wepy.page({
       this.visible = val
       if (this.options.roomType == '开放') {
         this.handlecountDown() // 倒计时两分钟
-        wx.uma.trackEvent('officeHome_header_overtime', {
-          key: '环境调节-空间照片-加班时间'
-        })
-      } else if (this.options.roomType == '会议室') {
-        wx.uma.trackEvent('officeHome_header_meeting', {
-          key: '环境调节-空间照片-会议场景切换'
-        })
       }
     },
 
-    handleOrderPopup() {
-      this.helpOrderShow = false
-    },
-    handleHasPopup() {
-      this.hasOrderShow = false
-    },
-
-    orderMeeting() {
-      var _this = this
-      var date = getNowDate()
-      var startOrderTimeStr =
-                date +
-                ' ' +
-                getTowNum(this.startOrderTime.getHours()) +
-                ':' +
-                getTowNum(this.startOrderTime.getMinutes()) +
-                ':00'
-      var endOrderTimeStr =
-                date +
-                ' ' +
-                getTowNum(this.endOrderTime.getHours()) +
-                ':' +
-                getTowNum(this.endOrderTime.getMinutes()) +
-                ':00'
-      let params = {
-        startTime: startOrderTimeStr,
-        endTime: endOrderTimeStr
-      }
-      console.log('startOrderTimeStr:---------::', startOrderTimeStr)
-      console.log('endOrderTimeStr::--------:', endOrderTimeStr)
-      return reserveMeetingroom(this.filtermeeting.meeting.id, params).then(
-                res => {
-                    // 进行跳转
-                  if (res.code == 1) {
-                    _this.helpOrderShow = false
-                    _this.getAlllMeeting()
-                  }
-                },
-                res => {
-                    // 预定失败的时候
-                  if (res.code == -1) {
-                    wx.showToast({
-                      content: res.data,
-                      duration: 2000
-                    })
-                  }
-                }
-            )
-    },
         // 取得所有的会议室
     getAlllMeeting() {
       var _this = this
@@ -1920,153 +1567,18 @@ wepy.page({
         _this.filtermeeting = filtermeetingArr[0] || {}
       })
     },
-        // 释放预约
-    async releaseMeeting(name) {
-      var _this = this
-      var startTimeArr = []
-      var nowTimeNum = new Date().getTime()
-      await this.getAlllMeeting()
-      var meetingBooking = _this.filtermeeting.meetingBooking || []
-            // console.log('meetingBooking22', meetingBooking)                                                                                                                                                                                                                                                      ;
-      var nowBooking = null
-      for (var i = 0; i < meetingBooking.length; i++) {
-        var booking = meetingBooking[i]
-        var startTimeNum = new Date(
-                    booking.startTime.replace(/-/g, '/')
-                ).getTime()
-        var endTimeNum = new Date(booking.endTime.replace(/-/g, '/')).getTime()
-        if (nowTimeNum >= startTimeNum && nowTimeNum <= endTimeNum) {
-          console.log('在预约的时间段')
-          nowBooking = booking
-          break
-        }
-        startTimeArr.push(startTimeNum)
-      }
-      this.nowBooking = nowBooking
-      if (nowBooking && name === '散会') {
-                // 如果已经预约
-        console.log('nowBooking', nowBooking)
-        endMeetingReserve(nowBooking.id).then(function (res) {
-                    // 结束预约
-          console.log('endMeetingReserve', res)
-        })
-      }
-    },
-        // 判断是否被预约
-    judgeHasOrder() {
-      var _this = this
-      var startTimeArr = []
-      var nowTimeNum = new Date().getTime()
-      var nowCopy = new Date()
-      var meetingBooking = _this.filtermeeting.meetingBooking || []
-      var hasOrder = false
-      for (var i = 0; i < meetingBooking.length; i++) {
-        var booking = meetingBooking[i]
-        var startTimeNum = new Date(
-                    booking.startTime.replace(/-/g, '/')
-                ).getTime()
-        var endTimeNum = new Date(booking.endTime.replace(/-/g, '/')).getTime()
-        if (nowTimeNum >= startTimeNum && nowTimeNum <= endTimeNum) {
-                    // console.log('在预约的时间段');
-          hasOrder = true
-          break
-        }
-        startTimeArr.push(startTimeNum)
-      }
-      if (hasOrder) {
-                // 如果已经预约
-      } else {
-        startTimeArr.sort(function (a, b) {
-          return a - b
-        })
-                // 这是距离最近的 预约时间
-        var alreadyStartTimeNum = null
-        for (var j = 0; j < startTimeArr.length; i++) {
-          if (startTimeArr[j] > nowTimeNum) {
-            alreadyStartTimeNum = startTimeArr[j]
-            break
-          }
-        }
-                // console.log('______alreadyStartTimeNum', alreadyStartTimeNum)                                                                                                                                                                                                                                        ;
-        var getMinutesV = nowCopy.getMinutes()
-        var setMinuteV = 0
-        if (getMinutesV >= 30) {
-          setMinuteV = 30
-        }
-
-                // 设置开始时间
-        nowCopy.setMinutes(setMinuteV)
-                // 预约开始时间
-        _this.startOrderTime = new Date(nowCopy.getTime())
-
-        var endOrderTime = null
-        if (alreadyStartTimeNum === null) {
-                    // 没有预约时段,帮忙约一个半小时
-          nowCopy.setMinutes(setMinuteV + 90)
-          endOrderTime = new Date(nowCopy.getTime())
-          _this.helpOrderShow = true
-          _this.orderMeetTimeStr =
-                        getTowNum(endOrderTime.getHours()) +
-                        ':' +
-                        getTowNum(endOrderTime.getMinutes())
-        } else {
-          var gapTime = (alreadyStartTimeNum - nowTimeNum) / 60000
-          if (gapTime < 30) {
-                        // 小于30分钟,不能帮忙预约
-            _this.hasOrderShow = true
-          } else if (gapTime >= 30 && gapTime <= 90) {
-                        // endOrderTime=alreadyStartTimeNum                                                                                                                                                                                                                                                                     ;
-                        // console.log('等于30分钟,帮忙约半个小时');
-                        // } else if (gapTime <= 60) {
-                        // endOrderTime=alreadyStartTimeNum                                                                                                                                                                                                                                                                     ;
-                        // console.log('小于等于60分钟,帮忙约一个小时');
-                        // if (gapTime <= 90)
-            endOrderTime = new Date(alreadyStartTimeNum)
-                        // 帮忙约半个小时 1个小时 一个半小时
-            _this.helpOrderShow = true
-            _this.orderMeetTimeStr =
-                            getTowNum(endOrderTime.getHours()) +
-                            ':' +
-                            getTowNum(endOrderTime.getMinutes())
-          } else {
-            nowCopy.setMinutes(setMinuteV + 90)
-            endOrderTime = new Date(nowCopy.getTime())
-                        // console.log('大于90分钟', nowCopy)                                                                                                                                                                                                                                                               ;
-            _this.helpOrderShow = true
-            _this.orderMeetTimeStr =
-                            getTowNum(endOrderTime.getHours()) +
-                            ':' +
-                            getTowNum(endOrderTime.getMinutes())
-          }
-        }
-        _this.endOrderTime = endOrderTime
-      }
-    },
     hideScene() {
       this.sceneShow = false
     },
         // 调出场景-浮层 切换场景
     handleScene(mitem, idx) {
-      if (!checkSpaceControl(this.isControl)) return
-            // this.judgeHasOrder()                                                                                                                                                                                                                                                                                 ;
             //   isWithinLocation()
             //             .then(() => {
       var name = mitem.name
-      if (this.helpOrderShow || this.hasOrderShow) return
       this.visible = false // 关闭 切换场景
       if (!this.visible) {
         this.sceneShow = !this.sceneShow // 场景详细信息
       }
-      if (this.options.roomType == '个人') {
-        wx.uma.trackEvent(`officeHome_personscene_${mitem.code}`, {
-          key: '环境调节-个人场景弹窗'
-        })
-      } else if (this.options.roomType == '会议室') {
-        wx.uma.trackEvent(`officeHome_meetingscene_${mitem.code}`, {
-          key: '环境调节-会议室场景弹窗'
-        })
-      }
-
       this.popList.forEach((item, idx) => {
         if (name === item.name) {
           this.sceneDetail = JSON.parse(JSON.stringify(item))
@@ -2079,9 +1591,6 @@ wepy.page({
           })
         }
       })
-      if (!this.visit) {
-                // this.releaseMeeting(name)                                                                                                                                                                                                                                                                            ;
-      }
             // 放在这个位置 是为了 切换场景时直接改变场景 不等待后台
       this.headScene = this.sceneDetail.name
       this.vanPopupIndex = this.sceneDetail.code
@@ -2189,9 +1698,6 @@ wepy.page({
           if (this.transY <= 60) {
             this.transY = 0
           } else {
-            wx.uma.trackEvent('officeHome_header_move', {
-              key: '环境调节-空间照片-下滑动'
-            })
             this.transY = this.transYCopy
           }
                     // console.log('下滑下滑下滑下滑xia', this.nowScrollY, this.transY)                                                                                                                                                                                                                             ;
@@ -2199,9 +1705,6 @@ wepy.page({
           if (this.transY >= this.transYCopy - 60) {
             this.transY = this.transYCopy
           } else {
-            wx.uma.trackEvent('officeHome_header_moveup', {
-              key: '环境调节-空间照片-上滑动'
-            })
             this.transY = 0
           }
                     // console.log('上滑上滑上滑', moveY)                                                                                                                                                                                                                                                             ;