Browse Source

feat: 空调pac项目控制开关禁用

珍珍 2 months ago
parent
commit
d2f3008968

+ 16 - 34
src/views/envmonitor/components/Air/index.vue

@@ -33,7 +33,7 @@
           class="switch-btn"
           :size="23"
           :loading="loadingAir || firstLoadingAir"
-          :disabled="!userIsControl || loadingAir || firstLoadingAir"
+          :disabled="!userIsControl || loadingAir || firstLoadingAir || disable"
           inactive-color="rgba(196, 196, 196, 0.4)"
           @click="airChange"
           :model-value="airData.isOpen"
@@ -45,10 +45,7 @@
     <div class="air-control" v-if="userIsControl && airData.isOpen">
       <div class="control-title">温度调节</div>
       <div class="btn-box">
-        <div
-          class="control-btn mr20"
-          @click.stop="changeAir(4, 'temp', 'toCold')"
-        >
+        <div class="control-btn mr20" @click.stop="changeAir(4, 'temp', 'toCold')">
           <img :src="parseImgUrl('envmonitor', 'arrow-top.png')" alt="" />
         </div>
         <div class="control-btn" @click.stop="changeAir(2, 'temp', 'toWarm')">
@@ -56,28 +53,14 @@
         </div>
       </div>
     </div>
-    <div
-      class="air-control"
-      v-if="userIsControl && airData.isOpen && showAirVolumeBtn"
-    >
+    <div class="air-control" v-if="userIsControl && airData.isOpen && showAirVolumeBtn">
       <div class="control-title">风量调节</div>
       <div class="btn-box">
-        <div
-          class="control-btn mr20"
-          @click.stop="changeAir(5, 'wind', 'toWindLow')"
-        >
-          <img
-            class="temp-img"
-            :src="parseImgUrl('envmonitor', 'fengshan.png')"
-            alt=""
-          />
+        <div class="control-btn mr20" @click.stop="changeAir(5, 'wind', 'toWindLow')">
+          <img class="temp-img" :src="parseImgUrl('envmonitor', 'fengshan.png')" alt="" />
         </div>
         <div class="control-btn" @click.stop="changeAir(6, 'wind', 'toWindUp')">
-          <img
-            class="temp-img"
-            :src="parseImgUrl('envmonitor', 'wendu.png')"
-            alt=""
-          />
+          <img class="temp-img" :src="parseImgUrl('envmonitor', 'wendu.png')" alt="" />
         </div>
       </div>
     </div>
@@ -129,10 +112,7 @@
               />
             </div> -->
           </div>
-          <p
-            v-if="airSetText.remark && airSetText.remark.length"
-            class="air-notice"
-          >
+          <p v-if="airSetText.remark && airSetText.remark.length" class="air-notice">
             <span
               v-for="(remarkItem, index) in airSetText.remark"
               :key="'remark' + index"
@@ -202,6 +182,10 @@ export default defineComponent({
       type: Boolean,
       default: () => false,
     },
+    disable: {
+      type: Boolean,
+      default: () => false,
+    },
   },
   components: {
     Switch,
@@ -382,13 +366,13 @@ export default defineComponent({
           .catch(() => {
             proxyData.getAirInfoToTimer();
             proxyData.firstLoadingAir = false;
-            proxyData.airData.airImg = parseImgUrl(
-              "page-officehome",
-              "air_close.png"
-            );
+            proxyData.airData.airImg = parseImgUrl("page-officehome", "air_close.png");
           });
       },
       airChange() {
+        if (props.disable) {
+          return;
+        }
         // 先不更新状态等确认框弹出后再更新状
         if (proxyData.userIsControl) {
           if (!proxyData.loadingAir) {
@@ -402,9 +386,7 @@ export default defineComponent({
       },
       // 确认
       airComfir() {
-        const message = proxyData.airData.isOpen
-          ? "要关闭空调吗?"
-          : "要开启空调吗?";
+        const message = proxyData.airData.isOpen ? "要关闭空调吗?" : "要开启空调吗?";
         const confirmBtnText = proxyData.airData.isOpen ? "关闭" : "开启";
         Dialog.confirm({
           cancelButtonText: "取消",

+ 156 - 155
src/views/envmonitor/components/Air/manualIndex.vue

@@ -14,164 +14,166 @@
           :src="parseImgUrl('page-officehome', 'openair.svg')"
           alt=""
         />
-        <img
-          v-else
-          :src="parseImgUrl('page-officehome', 'air_close.svg')"
-          alt=""
-        />
+        <img v-else :src="parseImgUrl('page-officehome', 'air_close.svg')" alt="" />
         <!-- <van-loading style="padding-top: 20px" v-else /> -->
       </div>
     </div>
     <!--温度调节-->
     <div class="top-switch">
       <div class="top-nav" v-if="equipList && equipList.length > 1">
-        <span
-          :class="navType == 'all' ? 'nav-active' : ''"
-          @click="checkNav('all')"
-        >
+        <span :class="navType == 'all' ? 'nav-active' : ''" @click="checkNav('all')">
           总控制
         </span>
-        <span
-          :class="navType == 'child' ? 'nav-active' : ''"
-          @click="checkNav('child')"
-        >
+        <span :class="navType == 'child' ? 'nav-active' : ''" @click="checkNav('child')">
           子设备
         </span>
       </div>
       <div v-else></div>
       <Switch
         class="switch-btn"
-        v-if="navType == 'all' && airData.boundPoint && airData.boundPoint.switchSetBound "
+        v-if="navType == 'all' && airData.boundPoint && airData.boundPoint.switchSetBound"
         :size="23"
         inactive-color="rgba(196, 196, 196, 0.4)"
         @click="airChange"
         :model-value="airData.isOpen"
-        />
+      />
     </div>
-    
+
     <!--温度调节的box-->
-    <template v-if="airData.boundPoint && (airData.boundPoint.tempSetBound || airData.boundPoint.gearSetBound || airData.boundPoint.modeSetBound)">
+    <template
+      v-if="
+        airData.boundPoint &&
+        (airData.boundPoint.tempSetBound ||
+          airData.boundPoint.gearSetBound ||
+          airData.boundPoint.modeSetBound)
+      "
+    >
       <div class="line" v-if="airData.isOpen"></div>
       <div class="main-temp" v-if="navType == 'all' && airData.isOpen">
-          <div class="com-control com-control-padding" v-show="airData.boundPoint && airData.boundPoint.tempSetBound" >
-            <div class="temp-slider" id="sliderId">
-              <div class="slider-bar" id="barId">
-                <div class="bar-temp">{{ realTemp }}℃</div>
-                <div
-                  class="bar-circle"
-                  style="border: 2px solid rgba(255, 255, 255, 1)"
-                  id="handId"
-                ></div>
+        <div
+          class="com-control com-control-padding"
+          v-show="airData.boundPoint && airData.boundPoint.tempSetBound"
+        >
+          <div class="temp-slider" id="sliderId">
+            <div class="slider-bar" id="barId">
+              <div class="bar-temp">{{ realTemp }}℃</div>
+              <div
+                class="bar-circle"
+                style="border: 2px solid rgba(255, 255, 255, 1)"
+                id="handId"
+              ></div>
+            </div>
+            <div class="temp-left" id="tempManualLeftId">
+              {{ airData.minTempSet }}
+            </div>
+            <div class="temp-right">
+              {{ airData.maxTempSet }}
+            </div>
+          </div>
+        </div>
+        <div
+          class="com-control"
+          v-if="airData.boundPoint && airData.boundPoint.gearSetBound"
+        >
+          <div class="control-box">
+            <div class="volume-box">
+              <div class="number">
+                <span
+                  v-for="(item, index) in windGearArr"
+                  :class="airData.gear === item ? 'number-active' : ''"
+                  :key="'volume' + index"
+                  >{{ item }}</span
+                >
               </div>
-              <div class="temp-left" id="tempManualLeftId">
-                {{ airData.minTempSet }}
+              <div class="text">风量调节</div>
+            </div>
+            <div class="volume-icon">
+              <div
+                class="icon-item"
+                :style="{
+                  opacity: airData.gear <= 1 ? '0.6' : 1,
+                }"
+                @click="changeZongAir('gear', 'windLow')"
+              >
+                <img :src="parseImgUrl('ipdImages', 'wind_small.svg')" />
+              </div>
+              <div
+                class="icon-item"
+                :style="{ opacity: airData.gear >= 3 ? '0.6' : 1 }"
+                @click="changeZongAir('gear', 'windUp')"
+              >
+                <img :src="parseImgUrl('ipdImages', 'wind_big.svg')" />
               </div>
-              <div class="temp-right">
-                {{ airData.maxTempSet }}
+              <div
+                class="icon-item"
+                @click="changeZongAir('gear', 'auto')"
+                :class="airData.isAutoGear ? 'active-color' : ''"
+              >
+                <img :src="parseImgUrl('ipdImages', 'A.svg')" />
               </div>
             </div>
           </div>
-          <div class="com-control" v-if="airData.boundPoint && airData.boundPoint.gearSetBound">
-            <div class="control-box">
-              <div class="volume-box">
-                <div class="number">
-                  <span
-                    v-for="(item, index) in windGearArr"
-                    :class="airData.gear === item ? 'number-active' : ''"
-                    :key="'volume' + index"
-                    >{{ item }}</span
-                  >
-                </div>
-                <div class="text">风量调节</div>
-              </div>
-              <div class="volume-icon">
-                <div
-                  class="icon-item"
-                  :style="{
-                    opacity: airData.gear <= 1 ? '0.6' : 1,
-                  }"
-                  @click="changeZongAir('gear', 'windLow')"
-                >
-                  <img :src="parseImgUrl('ipdImages', 'wind_small.svg')" />
-                </div>
-                <div
-                  class="icon-item"
-                  :style="{ opacity: airData.gear >= 3 ? '0.6' : 1 }"
-                  @click="changeZongAir('gear', 'windUp')"
-                >
-                  <img :src="parseImgUrl('ipdImages', 'wind_big.svg')" />
-                </div>
-                <div
-                  class="icon-item"
-                  @click="changeZongAir('gear', 'auto')"
-                  :class="airData.isAutoGear ? 'active-color' : ''"
-                >
-                  <img :src="parseImgUrl('ipdImages', 'A.svg')" />
-                </div>
+        </div>
+        <div
+          class="com-control"
+          v-if="airData.boundPoint && airData.boundPoint.modeSetBound"
+        >
+          <div class="control-box">
+            <div class="volume-box">
+              <div class="model">
+                {{
+                  airData.workMode == 1 ? "制冷" : airData.workMode == 2 ? "制热" : "通风"
+                }}
               </div>
+              <div class="text">模式设定</div>
             </div>
-          </div>
-          <div class="com-control" v-if="airData.boundPoint && airData.boundPoint.modeSetBound">
-            <div class="control-box">
-              <div class="volume-box">
-                <div class="model">
-                  {{
-                    airData.workMode == 1
-                      ? "制冷"
-                      : airData.workMode == 2
-                      ? "制热"
-                      : "通风"
-                  }}
-                </div>
-                <div class="text">模式设定</div>
+            <div class="volume-icon">
+              <div
+                class="icon-item"
+                :class="airData.workMode === 1 ? 'active-color' : ''"
+                @click="changeZongAir('mode', 1)"
+              >
+                <img
+                  :src="
+                    airData.workMode === 1
+                      ? parseImgUrl('ipdImages', 'aircoldblue.svg')
+                      : parseImgUrl('ipdImages', 'aircoldblack.svg')
+                  "
+                />
+              </div>
+              <div
+                class="icon-item"
+                :class="airData.workMode === 2 ? 'active-color' : ''"
+                @click="changeZongAir('mode', 2)"
+              >
+                <img
+                  :src="
+                    airData.workMode === 2
+                      ? parseImgUrl('ipdImages', 'airsunred.svg')
+                      : parseImgUrl('ipdImages', 'airsunblack.svg')
+                  "
+                />
               </div>
-              <div class="volume-icon">
-                <div
-                  class="icon-item"
-                  :class="airData.workMode === 1 ? 'active-color' : ''"
-                  @click="changeZongAir('mode', 1)"
-                >
-                  <img
-                    :src="
-                      airData.workMode === 1
-                        ? parseImgUrl('ipdImages', 'aircoldblue.svg')
-                        : parseImgUrl('ipdImages', 'aircoldblack.svg')
-                    "
-                  />
-                </div>
-                <div
-                  class="icon-item"
-                  :class="airData.workMode === 2 ? 'active-color' : ''"
-                  @click="changeZongAir('mode', 2)"
-                >
-                  <img
-                    :src="
-                      airData.workMode === 2
-                        ? parseImgUrl('ipdImages', 'airsunred.svg')
-                        : parseImgUrl('ipdImages', 'airsunblack.svg')
-                    "
-                  />
-                </div>
 
-                <div
-                  class="icon-item"
-                  :class="airData.workMode === 3 ? 'active-color' : ''"
-                  @click="changeZongAir('mode', 3)"
-                >
-                  <img
-                    :src="
-                      airData.workMode === 3
-                        ? parseImgUrl('ipdImages', 'aircloudgreen.svg')
-                        : parseImgUrl('ipdImages', 'aircloudblack.svg')
-                    "
-                  />
-                </div>
+              <div
+                class="icon-item"
+                :class="airData.workMode === 3 ? 'active-color' : ''"
+                @click="changeZongAir('mode', 3)"
+              >
+                <img
+                  :src="
+                    airData.workMode === 3
+                      ? parseImgUrl('ipdImages', 'aircloudgreen.svg')
+                      : parseImgUrl('ipdImages', 'aircloudblack.svg')
+                  "
+                />
               </div>
             </div>
           </div>
+        </div>
       </div>
     </template>
-    
+
     <!--子设备-->
     <div class="air-child" v-if="navType == 'child'">
       <div
@@ -182,25 +184,21 @@
       >
         <div class="open-title">
           <div class="open-temp-box">
-            <span>{{ childItem.tempSet? childItem.tempSet:'--' }}<sup>°C</sup></span>
+            <span>{{ childItem.tempSet ? childItem.tempSet : "--" }}<sup>°C</sup></span>
             <template v-if="childItem.boundPoint && childItem.boundPoint.modeSetBound">
               <div class="text-box" v-if="childItem.workMode == 2">
-              <img :src="parseImgUrl('ipdImages', 'hot-small.svg')" alt="" />
-              <span>制热模式</span>
-            </div>
-            <div class="text-box" v-else-if="childItem.workMode == 1">
-              <img :src="parseImgUrl('ipdImages', 'cold-small.svg')" alt="" />
-              <span>制冷模式</span>
-            </div>
-            <div class="text-box" v-else>
-              <img
-                :src="parseImgUrl('ipdImages', 'tongfeng-small.svg')"
-                alt=""
-              />
-              <span>通风模式</span>
-            </div>
+                <img :src="parseImgUrl('ipdImages', 'hot-small.svg')" alt="" />
+                <span>制热模式</span>
+              </div>
+              <div class="text-box" v-else-if="childItem.workMode == 1">
+                <img :src="parseImgUrl('ipdImages', 'cold-small.svg')" alt="" />
+                <span>制冷模式</span>
+              </div>
+              <div class="text-box" v-else>
+                <img :src="parseImgUrl('ipdImages', 'tongfeng-small.svg')" alt="" />
+                <span>通风模式</span>
+              </div>
             </template>
-            
           </div>
           <Switch
             v-if="childItem.boundPoint && childItem.boundPoint.switchSetBound"
@@ -216,7 +214,12 @@
             {{ childItem.localName }}
           </div>
           <img
-           v-if="childItem.boundPoint && (childItem.boundPoint.tempSetBound || childItem.boundPoint.gearSetBound || childItem.boundPoint.modeSetBound)"
+            v-if="
+              childItem.boundPoint &&
+              (childItem.boundPoint.tempSetBound ||
+                childItem.boundPoint.gearSetBound ||
+                childItem.boundPoint.modeSetBound)
+            "
             :class="childItem.isOpen ? '' : 'img-disabled'"
             :src="lightColorImg"
             alt=""
@@ -226,8 +229,8 @@
     </div>
   </div>
 </template>
-  
-  <script lang="ts">
+
+<script lang="ts">
 import {
   defineComponent,
   onMounted,
@@ -286,6 +289,10 @@ export default defineComponent({
       type: Array,
       default: () => [],
     },
+    disable: {
+      type: Boolean,
+      default: () => false,
+    },
   },
   components: {
     Switch,
@@ -434,8 +441,7 @@ export default defineComponent({
             barBox.style.left = 0;
           } else if (proxyData.airTemp > proxyData.airData.maxTempSet) {
             let barWidth: any = barBox.offsetWidth;
-            barBox.style.left =
-              sliderWidth - barWidth + proxyData.sliderPading + "px";
+            barBox.style.left = sliderWidth - barWidth + proxyData.sliderPading + "px";
           }
         }
       },
@@ -461,27 +467,26 @@ export default defineComponent({
           sliderWidth = sliderWidth - barWidth;
         }
         let tempPart =
-          (proxyData.airData.maxTempSet - proxyData.airData.minTempSet) /
-          sliderWidth;
+          (proxyData.airData.maxTempSet - proxyData.airData.minTempSet) / sliderWidth;
         let part: any = tempPart;
         proxyData.part = tempPart;
         if (!handBox) {
           return;
         }
 
-        handBox.addEventListener("touchstart", function(e: any) {
+        handBox.addEventListener("touchstart", function (e: any) {
           let oldBarLeft = (barBox && barBox.style && barBox.style.left) || 0;
           barLeft = isNaN(parseInt(oldBarLeft)) ? 0 : parseInt(oldBarLeft);
           isMove = true;
         });
-        handBox.addEventListener("touchend", function(e: any) {
+        handBox.addEventListener("touchend", function (e: any) {
           isMove = false;
           proxyData.changeZongAir("temp", proxyData.realTemp);
           proxyData.airTemp = proxyData.realTemp;
         });
         proxyData.swiperIinit = true;
         swiper(handBox, {
-          swipeLeft: function(e: any) {
+          swipeLeft: function (e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -496,7 +501,7 @@ export default defineComponent({
               // console.log(proxyData.realTemp);
             }
           },
-          swipeRight: function(e: any) {
+          swipeRight: function (e: any) {
             if (isMove) {
               barLeft = Math.abs(barLeft);
               let moveRealX: any = Math.abs(e.mation.moveX - e.mation.startX);
@@ -647,9 +652,7 @@ export default defineComponent({
       // 子设备开关控制
       changeChildItemAir(btnType: any, childItem: any, symbol: any) {
         const domAirOpen = !childItem.isOpen;
-        let isExeSpaceTime: Boolean = proxyData.checkDeviceIsExeSpaceTime([
-          childItem,
-        ]);
+        let isExeSpaceTime: Boolean = proxyData.checkDeviceIsExeSpaceTime([childItem]);
         if (
           proxyData.forceOverTimeFlag &&
           domAirOpen &&
@@ -1082,8 +1085,7 @@ export default defineComponent({
     width: 100%;
     height: 100%;
     background: rgba(#000000, 0.3);
-    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.07),
-      0px 4px 10px rgba(0, 0, 0, 0.05);
+    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.07), 0px 4px 10px rgba(0, 0, 0, 0.05);
     text-align: center;
     z-index: 999;
     // line-height: 50px;
@@ -1474,4 +1476,3 @@ export default defineComponent({
   }
 }
 </style>
-  

+ 73 - 101
src/views/envmonitor/index.vue

@@ -16,7 +16,7 @@
         @touchmove="gtouchmove()"
         @touchend="showDeleteButton"
       >
-      <!--
+        <!--
         <div class="logo-box">
           <img class="logo-icon" v-if="logImg" :src="logImg" alt="" />
           <img
@@ -38,9 +38,7 @@
             class="weather-icon"
             alt=""
           />
-          <span
-            >{{ outWeather.temperature ? outWeather.temperature : "--" }}℃</span
-          >
+          <span>{{ outWeather.temperature ? outWeather.temperature : "--" }}℃</span>
         </div>
         <div class="weixiin" v-if="contantDetail" @click="showContact">
           <img :src="parseImgUrl('ipdImages', 'weixin.svg')" />
@@ -49,7 +47,7 @@
       </div>
       <div class="left-space">
         <div class="text">
-          <div  @click.stop="refreshSpace">
+          <div @click.stop="refreshSpace">
             {{ officeData.localName }}
           </div>
           <!-- <div
@@ -74,8 +72,7 @@
           <div class="space-temp">
             <img :src="parseImgUrl('ipdImages', 'template-icon.svg')" alt="" />
             <span class="temp-text">温度</span>
-            <span class="temp-num"
-            @click="handleDetail(envlist[3])"
+            <span class="temp-num" @click="handleDetail(envlist[3])"
               >{{ officeData.temperature ? officeData.temperature : "--"
               }}<sup>℃</sup></span
             >
@@ -118,9 +115,20 @@
           >
             <img
               v-if="item.active"
-              :src="index==0?parseImgUrl('ipdImages', 'rectangle1-active.svg'):parseImgUrl('ipdImages', 'rectangle-active.svg')"
+              :src="
+                index == 0
+                  ? parseImgUrl('ipdImages', 'rectangle1-active.svg')
+                  : parseImgUrl('ipdImages', 'rectangle-active.svg')
+              "
+            />
+            <img
+              :src="
+                index == 0
+                  ? parseImgUrl('ipdImages', 'rectangle1.svg')
+                  : parseImgUrl('ipdImages', 'rectangle2.svg')
+              "
+              v-else
             />
-            <img :src="index==0?parseImgUrl('ipdImages', 'rectangle1.svg'):parseImgUrl('ipdImages', 'rectangle2.svg')" v-else />
 
             <span>{{ item.spaceName }} </span>
           </div>
@@ -190,6 +198,7 @@
         :temperature="officeData.temperature"
         :spaceId="spaceInfo.spaceId"
         :projectId="projectId"
+        :disable="officeData.disable"
         :userIsControl="userIsControl"
       >
       </manual-index>
@@ -209,6 +218,7 @@
         :projectId="projectId"
         :isACATVA="isACATVA"
         :userIsControl="userIsControl"
+        :disable="officeData.disable"
       />
       <!--空调自动控制 end-->
 
@@ -308,10 +318,7 @@
       class="popup-content"
       teleport="#app"
     >
-      <scenario-dailog
-        :secenaroStatus="secenaroStatus"
-        @closeDailog="closeDailog"
-      >
+      <scenario-dailog :secenaroStatus="secenaroStatus" @closeDailog="closeDailog">
       </scenario-dailog>
     </van-popup>
     <!--环境数据详情-->
@@ -373,10 +380,7 @@
       teleport="#app"
     >
       <div>
-        <ChildTempSet
-          :floorData="floorData"
-          v-if="isFloorHeatingTemp"
-        ></ChildTempSet>
+        <ChildTempSet :floorData="floorData" v-if="isFloorHeatingTemp"></ChildTempSet>
       </div>
     </van-popup>
 
@@ -406,10 +410,7 @@
       teleport="#app"
     >
       <div v-if="isChildAirControl">
-        <ChildAirControl
-          :airData="airData"
-          v-if="isChildAirControl"
-        ></ChildAirControl>
+        <ChildAirControl :airData="airData" v-if="isChildAirControl"></ChildAirControl>
       </div>
     </van-popup>
   </div>
@@ -576,7 +577,7 @@ export default defineComponent({
     };
     let curtainRef: any = {};
     let manualAirRef: any = {};
-    let lightRef:any={};
+    let lightRef: any = {};
     // let mapRef: any = {}
     let intervalTimer: any = null;
     const workInfo: any = {};
@@ -752,7 +753,7 @@ export default defineComponent({
       opacityV: 1,
       curtainRef: curtainRef,
       manualAirRef: manualAirRef,
-      lightRef:lightRef,
+      lightRef: lightRef,
       hideTopImg: false,
       isBottom: false,
       isScrool: false,
@@ -1042,8 +1043,8 @@ export default defineComponent({
         });
         proxyData.seviceEquipmentList = proxyData.spaceEquipList;
       },
-      leaveWork(){
-        proxyData.manualAirRef && proxyData.manualAirRef.updateCloseSwitchFromWork()
+      leaveWork() {
+        proxyData.manualAirRef && proxyData.manualAirRef.updateCloseSwitchFromWork();
         proxyData.lightRef && proxyData.lightRef.updateSwitchFromWork();
       },
       /**
@@ -1052,13 +1053,13 @@ export default defineComponent({
       closeWork(type: any = "confirm") {
         proxyData.isShowWork = false;
         proxyData.queryCustomAndScence(2); // 关闭弹窗立即调用刷新加班数据
-        if(type == "confirm"){
-          let lightRefTimer:any=setTimeout(()=>{
-          proxyData.manualAirRef && proxyData.manualAirRef.updateCloseSwitchFromWork()
-          proxyData.lightRef && proxyData.lightRef.updateSwitchFromWork();
+        if (type == "confirm") {
+          let lightRefTimer: any = setTimeout(() => {
+            proxyData.manualAirRef && proxyData.manualAirRef.updateCloseSwitchFromWork();
+            proxyData.lightRef && proxyData.lightRef.updateSwitchFromWork();
             clearTimeout(lightRefTimer);
-            lightRefTimer=null;
-          },1000)
+            lightRefTimer = null;
+          }, 1000);
         }
       },
       forceOverTimeFlag: false,
@@ -1097,16 +1098,18 @@ export default defineComponent({
           projectId: store.state.user.projectId,
         };
         const str: string = setQueryConfig(params);
-        getWeather(str).then((res) => {
-          const content: any = res?.content ?? {};
-          proxyData.outWeather = content;
-          const text: string = content.text;
-          proxyData.getWeatherIcon(text);
-          proxyData.getnowTime(text);
-          proxyData.getWeatherTimer();
-        }).catch(()=>{
-          proxyData.getWeatherTimer(5000);
-        });
+        getWeather(str)
+          .then((res) => {
+            const content: any = res?.content ?? {};
+            proxyData.outWeather = content;
+            const text: string = content.text;
+            proxyData.getWeatherIcon(text);
+            proxyData.getnowTime(text);
+            proxyData.getWeatherTimer();
+          })
+          .catch(() => {
+            proxyData.getWeatherTimer(5000);
+          });
       },
       // 设置当前背景图
       getnowTime(text: string) {
@@ -1131,10 +1134,7 @@ export default defineComponent({
             proxyData.outWeather.imgname = parseImgUrl("weather", "sun.png");
           } else if (text && text.indexOf("雨") > -1) {
             proxyData.outWeather.imgname = parseImgUrl("weather", "rain.png");
-          } else if (
-            (text && text.indexOf("阴") > -1) ||
-            text.indexOf("云") > -1
-          ) {
+          } else if ((text && text.indexOf("阴") > -1) || text.indexOf("云") > -1) {
             proxyData.outWeather.imgname = parseImgUrl("weather", "cloudy.png");
           } else if (text && text.indexOf("霾") > -1) {
             proxyData.outWeather.imgname = parseImgUrl("weather", "mai.png");
@@ -1143,10 +1143,7 @@ export default defineComponent({
           } else if (text && text.indexOf("风") > -1) {
             proxyData.outWeather.imgname = parseImgUrl("weather", "wind.png");
           } else if (text && text.indexOf("雷") > -1) {
-            proxyData.outWeather.imgname = parseImgUrl(
-              "weather",
-              "thunder.png"
-            );
+            proxyData.outWeather.imgname = parseImgUrl("weather", "thunder.png");
           } else {
             proxyData.outWeather.imgname = parseImgUrl("weather", "sun.png");
           }
@@ -1199,9 +1196,7 @@ export default defineComponent({
         let flag: any = false;
         // let flag: any = true
         for (let i = 0; i < proxyData.userSpaceInfo.length; i++) {
-          if (
-            proxyData.spaceInfo.spaceId === proxyData.userSpaceInfo[i].sp_id
-          ) {
+          if (proxyData.spaceInfo.spaceId === proxyData.userSpaceInfo[i].sp_id) {
             flag = true;
             break;
           }
@@ -1246,9 +1241,7 @@ export default defineComponent({
             if (content[0]) {
               proxyData.officeData = content[0];
             }
-            proxyData.officeData = proxyData.officeData
-              ? proxyData.officeData
-              : {};
+            proxyData.officeData = proxyData.officeData ? proxyData.officeData : {};
             if (proxyData.officeData.localName) {
               proxyData.localName = proxyData.officeData.localName;
             }
@@ -1313,26 +1306,22 @@ export default defineComponent({
         if (key === "humidity") {
           // 湿度
           if (text === "干燥" || text === "潮湿") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)";
           } else {
             bgColor = "";
           }
         } else if (key === "hcho") {
           // 甲醛
           if (text === "超标") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 0) 0%, #CD0B00 100%)";
           } else {
             bgColor = "";
           }
         } else if (key === "co2") {
           if (text === "略高") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 0.5) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 0.5) 0%, #CD0B00 100%)";
           } else if (text === "超标") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)";
           } else {
             bgColor = "";
           }
@@ -1342,17 +1331,13 @@ export default defineComponent({
             //   "linear-gradient(180deg, rgba(205, 11, 0, 0.2) 0%, #CD0B00 100%)";
             bgColor = "";
           } else if (text === "轻度污染") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 0.2) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 0.2) 0%, #CD0B00 100%)";
           } else if (text === "中度污染") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 0.5) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 0.5) 0%, #CD0B00 100%)";
           } else if (text === "重度污染") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 0.8) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 0.8) 0%, #CD0B00 100%)";
           } else if (text === "严重污染") {
-            bgColor =
-              "linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)";
+            bgColor = "linear-gradient(180deg, rgba(205, 11, 0, 1) 0%, #CD0B00 100%)";
           } else {
             bgColor = "";
           }
@@ -1599,11 +1584,11 @@ export default defineComponent({
       },
       equimentsTimer: equimentsTimer,
       // 定时查空间下面的展示设备
-      setEquimentsTimer(len:any=3600000) {
-        proxyData.equimentsTimer = setTimeout(()=>{
+      setEquimentsTimer(len: any = 3600000) {
+        proxyData.equimentsTimer = setTimeout(() => {
           proxyData.getEquipments();
           proxyData.clearTimeoutValEquiment();
-        },len)
+        }, len);
       },
       // 获取空间下的设备信息
       getEquipments() {
@@ -1886,12 +1871,9 @@ export default defineComponent({
         let data: any = paramsData || [];
         for (let i = 0; i < data.length; i++) {
           let item: any = data[i];
-          let spaceCustomContentList: any =
-            data[i].spaceCustomContentList || [];
+          let spaceCustomContentList: any = data[i].spaceCustomContentList || [];
           if (spaceCustomContentList && spaceCustomContentList.length) {
-            spaceCustomContentList = spaceCustomContentList.sort(
-              proxyData.compare
-            );
+            spaceCustomContentList = spaceCustomContentList.sort(proxyData.compare);
             item.spaceCustomContentList = spaceCustomContentList;
             let nowTime: any = getRelNowTime();
             let nowDate: any = formatDate("YYYY-MM-DD");
@@ -1909,10 +1891,7 @@ export default defineComponent({
             }
             for (let j = 0; j < spaceCustomContentList.length; j++) {
               if (item.cusStartTime && item.cusEndTime) {
-                if (
-                  item.cusEndTime + 1 ===
-                  spaceCustomContentList[j].startTime
-                ) {
+                if (item.cusEndTime + 1 === spaceCustomContentList[j].startTime) {
                   item.cusEndTime = spaceCustomContentList[j].endTime;
                 }
               } else {
@@ -2005,9 +1984,7 @@ export default defineComponent({
             //   proxyData.spaceInfo = item;
             // }
           });
-          proxyData.copySpaceData = JSON.parse(
-            JSON.stringify(proxyData.spaceData)
-          );
+          proxyData.copySpaceData = JSON.parse(JSON.stringify(proxyData.spaceData));
         });
       },
       // 重置空间状态
@@ -2027,7 +2004,7 @@ export default defineComponent({
           item.active = false;
         });
         // proxyData.controlMode = ''; // 模式变成自动的
-        proxyData.controlMode='';
+        proxyData.controlMode = "";
         proxyData.isWork = false;
         proxyData.roomType = "";
         proxyData.officeData.temperature = "";
@@ -2062,19 +2039,19 @@ export default defineComponent({
           proxyData.spaceData[index2] = temp;
         }
       },
-      refreshSpace(){
+      refreshSpace() {
         console.log("被点击了--");
-        let space:any={}
-        proxyData.spaceData.map((item:any)=>{
-          if(item.spaceId===proxyData.spaceInfo.spaceId){
-            space=item
+        let space: any = {};
+        proxyData.spaceData.map((item: any) => {
+          if (item.spaceId === proxyData.spaceInfo.spaceId) {
+            space = item;
           }
-        })
-        proxyData.changeSpace(space,2);
+        });
+        proxyData.changeSpace(space, 2);
       },
       // 切换空间
       changeSpace(item: any, type: any = 0) {
-        if( proxyData.spaceInfo.spaceId==item.spaceId && type!==2){
+        if (proxyData.spaceInfo.spaceId == item.spaceId && type !== 2) {
           return;
         }
         //清除空间下所有的定时器
@@ -2208,11 +2185,7 @@ export default defineComponent({
   box-sizing: border-box;
   padding: 3.5vh 25px 0 25px;
   font-size: 0;
-  background-image: linear-gradient(
-    0deg,
-    rgba(69, 33, 0, 0.2),
-    rgba(69, 33, 0, 0.2)
-  );
+  background-image: linear-gradient(0deg, rgba(69, 33, 0, 0.2), rgba(69, 33, 0, 0.2));
   background-size: 100% 100%;
   overflow: hidden;
 
@@ -2617,4 +2590,3 @@ export default defineComponent({
   background: $elBg;
 }
 </style>
-