فهرست منبع

fix:窗帘部分的内容修改

chenzhen2 1 سال پیش
والد
کامیت
a7a7e2b23c

+ 3 - 4
public/images/page-officehome/curtain_down.svg

@@ -1,5 +1,4 @@
-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="20" cy="20" r="20" fill="#F1F4F6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M25.8051 19.8523C26.0655 20.1126 26.0655 20.5347 25.8051 20.7951L20.8363 25.7639C20.3156 26.2846 19.4714 26.2846 18.9507 25.7639L13.9819 20.7951C13.7215 20.5347 13.7215 20.1126 13.9819 19.8523C14.2422 19.5919 14.6643 19.5919 14.9247 19.8523L19.8935 24.8211L24.8623 19.8523C25.1226 19.5919 25.5448 19.5919 25.8051 19.8523Z" fill="#626C78"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19.8316 24.9899C19.4634 24.9899 19.165 24.6915 19.165 24.3233V14.5592C19.165 14.1911 19.4634 13.8926 19.8316 13.8926C20.1998 13.8926 20.4983 14.1911 20.4983 14.5592V24.3233C20.4983 24.6915 20.1998 24.9899 19.8316 24.9899Z" fill="#626C78"/>
+<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3002 8.29027C14.5606 8.55062 14.5606 8.97273 14.3002 9.23308L9.33142 14.2019C8.81072 14.7226 7.9665 14.7226 7.4458 14.2019L2.477 9.23308C2.21665 8.97273 2.21665 8.55062 2.477 8.29027C2.73735 8.02992 3.15946 8.02992 3.41981 8.29027L8.38861 13.2591L13.3574 8.29027C13.6178 8.02992 14.0399 8.02992 14.3002 8.29027Z" fill="#626C78"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.32674 13.4279C7.95855 13.4279 7.66008 13.1294 7.66008 12.7612V2.99723C7.66008 2.62904 7.95855 2.33057 8.32674 2.33057C8.69493 2.33057 8.99341 2.62904 8.99341 2.99723V12.7612C8.99341 13.1294 8.69493 13.4279 8.32674 13.4279Z" fill="#626C78"/>
 </svg>

+ 3 - 4
public/images/page-officehome/curtain_left.svg

@@ -1,5 +1,4 @@
-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="20" cy="20" r="20" fill="#F1F4F6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M26.8448 15.9023C26.5845 15.6419 26.1624 15.6419 25.902 15.9023L22.4132 19.3911C21.8925 19.9118 21.8925 20.756 22.4132 21.2767L25.902 24.7655C26.1624 25.0259 26.5845 25.0259 26.8448 24.7655C27.1052 24.5052 27.1052 24.0831 26.8448 23.8227L23.356 20.3339L26.8448 16.8451C27.1052 16.5848 27.1052 16.1626 26.8448 15.9023Z" fill="#626C78"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3818 16.0488C13.6421 15.7884 14.0642 15.7884 14.3246 16.0488L17.667 19.3912C18.1877 19.9119 18.1877 20.7561 17.667 21.2768L14.3246 24.6192C14.0642 24.8795 13.6421 24.8795 13.3818 24.6192C13.1214 24.3588 13.1214 23.9367 13.3818 23.6764L16.7242 20.334L13.3818 16.9916C13.1214 16.7312 13.1214 16.3091 13.3818 16.0488Z" fill="#626C78"/>
+<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5065 4.33979C15.2461 4.07944 14.824 4.07944 14.5637 4.33979L11.0748 7.82861C10.5541 8.34931 10.5541 9.19353 11.0748 9.71423L14.5637 13.203C14.824 13.4634 15.2461 13.4634 15.5065 13.203C15.7668 12.9427 15.7668 12.5206 15.5065 12.2602L12.0176 8.77142L15.5065 5.2826C15.7668 5.02225 15.7668 4.60014 15.5065 4.33979Z" fill="#626C78"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M2.04341 4.48628C2.30376 4.22593 2.72587 4.22593 2.98622 4.48628L6.32861 7.82867C6.84931 8.34937 6.84931 9.19359 6.32861 9.71429L2.98622 13.0567C2.72587 13.317 2.30376 13.317 2.04341 13.0567C1.78306 12.7963 1.78306 12.3742 2.04341 12.1139L5.3858 8.77148L2.04341 5.42909C1.78306 5.16874 1.78306 4.74663 2.04341 4.48628Z" fill="#626C78"/>
 </svg>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 3 - 4
public/images/page-officehome/curtain_opening.svg


+ 6 - 7
public/images/page-officehome/curtain_right.svg

@@ -1,12 +1,11 @@
-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="20" cy="20" r="20" fill="#F1F4F6"/>
-<g clip-path="url(#clip0_2414_59132)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M23.2353 15.9023C23.4956 15.6419 23.9177 15.6419 24.1781 15.9023L27.6669 19.3911C28.1876 19.9118 28.1876 20.756 27.6669 21.2767L24.1781 24.7655C23.9177 25.0259 23.4956 25.0259 23.2353 24.7655C22.9749 24.5052 22.9749 24.0831 23.2353 23.8227L26.7241 20.3339L23.2353 16.8451C22.9749 16.5848 22.9749 16.1626 23.2353 15.9023Z" fill="#626C78"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M16.9912 16.0488C16.7308 15.7884 16.3087 15.7884 16.0483 16.0488L12.706 19.3912C12.1853 19.9119 12.1853 20.7561 12.706 21.2768L16.0483 24.6192C16.3087 24.8795 16.7308 24.8795 16.9912 24.6192C17.2515 24.3588 17.2515 23.9367 16.9912 23.6764L13.6488 20.334L16.9912 16.9916C17.2515 16.7312 17.2515 16.3091 16.9912 16.0488Z" fill="#626C78"/>
+<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_2414_60089)">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.8969 4.33979C12.1572 4.07944 12.5793 4.07944 12.8397 4.33979L16.3285 7.82861C16.8492 8.34931 16.8492 9.19353 16.3285 9.71423L12.8397 13.203C12.5793 13.4634 12.1572 13.4634 11.8969 13.203C11.6365 12.9427 11.6365 12.5206 11.8969 12.2602L15.3857 8.77142L11.8969 5.2826C11.6365 5.02225 11.6365 4.60014 11.8969 4.33979Z" fill="#626C78"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.65278 4.48628C5.39243 4.22593 4.97032 4.22593 4.70997 4.48628L1.36758 7.82867C0.846876 8.34937 0.846876 9.19359 1.36758 9.71429L4.70997 13.0567C4.97032 13.317 5.39243 13.317 5.65278 13.0567C5.91313 12.7963 5.91313 12.3742 5.65278 12.1139L2.31038 8.77148L5.65278 5.42909C5.91313 5.16874 5.91313 4.74663 5.65278 4.48628Z" fill="#626C78"/>
 </g>
 <defs>
-<clipPath id="clip0_2414_59132">
-<rect width="16" height="16" fill="white" transform="translate(12 12)"/>
+<clipPath id="clip0_2414_60089">
+<rect width="16" height="16" fill="white" transform="translate(0.661621 0.437988)"/>
 </clipPath>
 </defs>
 </svg>

+ 3 - 4
public/images/page-officehome/curtain_stop.svg

@@ -1,5 +1,4 @@
-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="20" cy="20" r="20" fill="#F1F4F6"/>
-<rect x="15.3335" y="14.667" width="1.33333" height="10.6667" rx="0.666667" fill="#626C78"/>
-<rect x="23.333" y="14.667" width="1.33333" height="10.6667" rx="0.666667" fill="#626C78"/>
+<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect x="0.995117" y="0.104492" width="1.33333" height="10.6667" rx="0.666667" fill="#626C78"/>
+<rect x="8.99463" y="0.104492" width="1.33333" height="10.6667" rx="0.666667" fill="#626C78"/>
 </svg>

+ 3 - 4
public/images/page-officehome/curtain_up.svg

@@ -1,5 +1,4 @@
-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="20" cy="20" r="20" fill="#F1F4F6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M25.8051 20.4711C26.0655 20.2107 26.0655 19.7886 25.8051 19.5283L20.8363 14.5595C20.3156 14.0388 19.4714 14.0388 18.9507 14.5595L13.9819 19.5283C13.7215 19.7886 13.7215 20.2107 13.9819 20.4711C14.2422 20.7314 14.6643 20.7314 14.9247 20.4711L19.8935 15.5023L24.8623 20.4711C25.1226 20.7314 25.5448 20.7314 25.8051 20.4711Z" fill="#626C78"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19.8316 15.3334C19.4634 15.3334 19.165 15.6319 19.165 16.0001V25.7641C19.165 26.1323 19.4634 26.4308 19.8316 26.4308C20.1998 26.4308 20.4983 26.1323 20.4983 25.7641V16.0001C20.4983 15.6319 20.1998 15.3334 19.8316 15.3334Z" fill="#626C78"/>
+<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M14.3005 8.90907C14.5608 8.64872 14.5608 8.22661 14.3005 7.96626L9.33166 2.99746C8.81097 2.47676 7.96675 2.47676 7.44605 2.99746L2.47724 7.96626C2.21689 8.22661 2.21689 8.64872 2.47724 8.90907C2.73759 9.16942 3.1597 9.16942 3.42005 8.90907L8.38886 3.94027L13.3577 8.90907C13.618 9.16942 14.0401 9.16942 14.3005 8.90907Z" fill="#626C78"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.32699 3.77142C7.9588 3.77142 7.66032 4.0699 7.66032 4.43809V14.2021C7.66032 14.5703 7.9588 14.8688 8.32699 14.8688C8.69518 14.8688 8.99365 14.5703 8.99365 14.2021V4.43809C8.99365 4.0699 8.69518 3.77142 8.32699 3.77142Z" fill="#626C78"/>
 </svg>

+ 81 - 11
src/views/envmonitor/components/Curtain/CurtainOpening.vue

@@ -1,11 +1,12 @@
 <template>
   <div class="curtain-temp">
     <div class="curtain-tep-top">
-      <span>氛围灯</span>
+      <span>窗帘</span>
     </div>
     <div class="bright-box">
       <div class="bight-text">
         <span>亮度</span>
+        <span class="line"></span>
         <span>20%</span>
       </div>
       <div class="curtain-control">
@@ -15,6 +16,42 @@
         </div>
       </div>
     </div>
+
+    <div class="curtain-control top-control">
+      <!--左边-->
+      <div class="control-item">
+        <img
+          v-if="curtainObj.equipmentType == 4 || curtainObj.equipmentType == 5"
+          :src="parseImgUrl('page-officehome', 'curtain_left.svg')"
+          alt=""
+        />
+        <img
+          v-else
+          :src="parseImgUrl('page-officehome', 'curtain_down.svg')"
+          alt=""
+        />
+      </div>
+
+      <!--暂停-->
+      <div class="control-item">
+        <img :src="parseImgUrl('page-officehome', 'curtain_stop.svg')" alt="" />
+      </div>
+
+      <!-- {{ item }} -->
+      <!--右边-->
+      <div class="control-item">
+        <img
+          v-if="curtainObj.equipmentType == 4 || curtainObj.equipmentType == 5"
+          :src="parseImgUrl('page-officehome', 'curtain_right.svg')"
+          alt=""
+        />
+        <img
+          v-else
+          :src="parseImgUrl('page-officehome', 'curtain_up.svg')"
+          alt=""
+        />
+      </div>
+    </div>
   </div>
 </template>
       
@@ -48,10 +85,12 @@ export default defineComponent({
   setup(props, contx) {
     const propsVal = props;
     let timeTemp: any = null;
-    let timeColor: any = null;
+    let curtainObj: any = {};
     const proxyData = reactive({
       lampSw: false,
       itemWidth: "0%",
+      parseImgUrl: parseImgUrl,
+      curtainObj: curtainObj,
       curtainData: props.curtainData,
       //亮度滑块滑动
       endBoxSwiper() {
@@ -112,6 +151,7 @@ export default defineComponent({
     watch(props, (newProps: any) => {});
     onBeforeUnmount(() => {});
     onMounted(() => {
+      proxyData.curtainObj = proxyData.curtainData[0];
       proxyData.barSwiperInit();
     });
     return {
@@ -122,10 +162,10 @@ export default defineComponent({
 </script>
   <style lang="scss" scoped>
 .curtain-temp {
-  padding: 10px;
+  padding: 24px 20px;
   .curtain-tep-top {
     display: flex;
-    padding-bottom: 60px;
+    padding-bottom: 48px;
     line-height: 31px;
     justify-content: space-between;
     span {
@@ -138,19 +178,26 @@ export default defineComponent({
     }
   }
   .bright-box {
-    margin-bottom: 60px;
     .bight-text {
-      display: flex;
-      justify-content: space-between;
-      padding-bottom: 15px;
+      line-height: 22px;
+      padding-bottom: 17px;
       span {
+        display: inline-block;
+        vertical-align: middle;
         font-family: "PingFang SC";
         font-style: normal;
-        font-weight: 400;
-        font-size: 18px;
-        line-height: 25px;
+        font-weight: 600;
+        font-size: 16px;
+        line-height: 22px;
         color: #1b2129;
       }
+      .line {
+        width: 1px;
+        margin-left: 12px;
+        margin-right: 12px;
+        height: 22px;
+        border-left: 1px solid #e1e5eb;
+      }
     }
     .curtain-control {
       .bight-slider {
@@ -195,6 +242,29 @@ export default defineComponent({
       padding-bottom: 15px;
     }
   }
+
+  .top-control {
+    display: flex;
+    justify-content: space-between;
+    padding: 51px 27px;
+    padding-bottom: 0;
+    .control-item {
+      position: relative;
+      display: inline-block;
+      width: 56px;
+      height: 56px;
+      background: #f1f4f6;
+      border-radius: 50%;
+      img {
+        position: absolute;
+        left: 50%;
+        top: 50%;
+        width: 16px;
+        height: 16px;
+        transform: translate(-50%, -50%);
+      }
+    }
+  }
 }
 </style>
       

+ 136 - 187
src/views/envmonitor/components/Curtain/index.vue

@@ -45,76 +45,51 @@
     <template v-if="type == 'all'">
       <div class="line"></div>
       <div class="top-control">
-        <img
-          :src="parseImgUrl('page-officehome', 'curtain_opening.svg')"
-          @click="openCurtainOpening()"
-          alt=""
-        />
-
-        <!--左边-->
-        <img
-          v-if="
-            curtainData[0].equipmentType == 4 ||
-            curtainData[0].equipmentType == 5
-          "
-          :src="parseImgUrl('page-officehome', 'curtain_left.svg')"
-          alt=""
-        />
-        <img
-          v-else
-          :src="parseImgUrl('page-officehome', 'curtain_down.svg')"
-          alt=""
-        />
-
-        <!--暂停-->
-        <img :src="parseImgUrl('page-officehome', 'curtain_stop.svg')" alt="" />
-
-        <!--右边-->
-        <img
-          v-if="
-            curtainData[0].equipmentType == 4 ||
-            curtainData[0].equipmentType == 5
-          "
-          :src="parseImgUrl('page-officehome', 'curtain_right.svg')"
-          alt=""
-        />
-        <img
-          v-else
-          :src="parseImgUrl('page-officehome', 'curtain_up.svg')"
-          alt=""
-        />
-      </div>
-    </template>
-
-    <div class="curtain-child" v-if="type == 'child'">
-      <div class="child-item" :key="item.id" v-for="item in curtainData">
-        <div class="curtain-name">
-          <div class="name">{{ item.name }}</div>
-          <span>开度90%</span>
-        </div>
-        <div class="curtain-control">
-          <!--左边-->
+        <div class="control-item" @click="openCurtainOpening(curtainData)">
           <img
-            v-if="item.equipmentType == 4 || item.equipmentType == 5"
-            :src="parseImgUrl('page-officehome', 'curtain_left.svg')"
-            alt=""
-          />
-          <img
-            v-else
-            :src="parseImgUrl('page-officehome', 'curtain_down.svg')"
+            :src="parseImgUrl('page-officehome', 'curtain_opening.svg')"
             alt=""
           />
+        </div>
+        <!--左边-->
+        <div
+          class="control-item"
+          :class="allActive == 1 ? 'control-item-active' : ''"
+          @click="openCurtainMain(1)"
+        >
+          <template v-if="allActive !== 1">
+            <img
+              v-if="
+                curtainData[0].equipmentType == 4 ||
+                curtainData[0].equipmentType == 5
+              "
+              :src="parseImgUrl('page-officehome', 'curtain_left.svg')"
+              alt=""
+            />
+            <img
+              v-else
+              :src="parseImgUrl('page-officehome', 'curtain_down.svg')"
+              alt=""
+            />
+          </template>
+          <span v-else>{{ count }}</span>
+        </div>
 
+        <div class="control-item">
           <!--暂停-->
           <img
             :src="parseImgUrl('page-officehome', 'curtain_stop.svg')"
             alt=""
           />
-
-          <!-- {{ item }} -->
-          <!--右边-->
+        </div>
+        <!--右边-->
+        <div class="control-item">
           <img
-            v-if="item.equipmentType == 4 || item.equipmentType == 5"
+            v-if="
+              curtainData[0].equipmentType == 4 ||
+              curtainData[0].equipmentType == 5
+            "
+            @click="openCurtainMain(1)"
             :src="parseImgUrl('page-officehome', 'curtain_right.svg')"
             alt=""
           />
@@ -125,6 +100,53 @@
           />
         </div>
       </div>
+    </template>
+
+    <div class="curtain-child" v-if="type == 'child'">
+      <div class="child-item" :key="item.id" v-for="item in curtainData">
+        <div class="curtain-name">
+          <div class="name">{{ item.name }}</div>
+          <span>开度90%</span>
+        </div>
+        <div class="curtain-control top-control">
+          <!--左边-->
+          <div class="control-item">
+            <img
+              v-if="item.equipmentType == 4 || item.equipmentType == 5"
+              :src="parseImgUrl('page-officehome', 'curtain_left.svg')"
+              alt=""
+            />
+            <img
+              v-else
+              :src="parseImgUrl('page-officehome', 'curtain_down.svg')"
+              alt=""
+            />
+          </div>
+
+          <!--暂停-->
+          <div class="control-item">
+            <img
+              :src="parseImgUrl('page-officehome', 'curtain_stop.svg')"
+              alt=""
+            />
+          </div>
+
+          <!-- {{ item }} -->
+          <!--右边-->
+          <div class="control-item">
+            <img
+              v-if="item.equipmentType == 4 || item.equipmentType == 5"
+              :src="parseImgUrl('page-officehome', 'curtain_right.svg')"
+              alt=""
+            />
+            <img
+              v-else
+              :src="parseImgUrl('page-officehome', 'curtain_up.svg')"
+              alt=""
+            />
+          </div>
+        </div>
+      </div>
     </div>
   </div>
 </template>
@@ -162,6 +184,7 @@ export default defineComponent({
     let timer: any = null;
     let projectId: any = props.projectId;
     let type: any = "all";
+    let interval: any = {};
     const proxyData = reactive({
       curtainData: curtainData,
       userIsControl: props.userIsControl,
@@ -169,12 +192,13 @@ export default defineComponent({
       projectId: projectId,
       type: type,
       countText: "", // 到记时文案
-      count: 0, // 到记时
+      count: 2, // 到记时
       curtainOpen: false,
       curtainClose: false,
       parseImgUrl: parseImgUrl,
       timer: timer,
       // 开度弹窗
+      allActive: 0,
       openCurtainOpening(selectData: any) {
         contx.emit("showCurtainOpening", selectData);
       },
@@ -223,117 +247,25 @@ export default defineComponent({
           return false;
         }
       },
-      // 窗帘总开关
-      handleTotal(setType: string) {
-        if (proxyData.userIsControl) {
-          let flag = proxyData.checkCount();
-          /**
-           * flag:true 代表指令正在发送中,false:代表当前没有指令在发送
-           */
-          if (!flag) {
-            // 只要有一条指令在发送中,要求其它指令不能再发送
-            proxyData.changeStatus(setType);
-            let arr = JSON.parse(JSON.stringify(proxyData.curtainData)); // 窗帘数据
-            let paramsArr = proxyData.setParams(arr, setType);
-            // 更新窗帘的按钮可点击状态
-            proxyData.setSwitchStatus(setType);
-            // 发送窗帘指令
-            setEquipeHttp(paramsArr).then((res) => {});
-          }
-        } else {
-          Toast("您没有当前空间的控制权限!");
-        }
-      },
-      handleChild(setType: string, id: any, index: any) {
-        if (proxyData.userIsControl) {
-          let flag = proxyData.checkCount();
-          /**
-           * flag:true 代表指令正在发送中,false:代表当前没有指令在发送
-           */
-          if (!flag) {
-            // 只要有一条指令在发送中,要求其它指令不能再发送
-            let childItem: any = proxyData.curtainData[index];
-            const params = {
-              projectId: proxyData.projectId,
-              objectId: id, // 设备ID/窗帘组ID
-              equipmentCategory: "CFSSES", // 设备编码 窗帘:CFSSES
-              infoCode: setType, // 窗帘开设定:EquipOnSet 窗帘关设定:EquipOffSet
-              value: 1, // 窗帘 1 移动/停止
-            };
-            let paramsArr = [];
-            paramsArr.push(params);
-            // 更新窗帘的按钮可点击状态
-            proxyData.changeStatus(setType, childItem);
-            proxyData.setSwitchStatus(setType, childItem);
-            // 发送窗帘指令
-            setEquipeHttp(paramsArr).then((res) => {});
-          }
-        } else {
-          Toast("您没有当前空间的控制权限!");
-        }
-      },
-      clearCurtain() {
-        proxyData.curtainData.map((item: any) => {
-          item.curtainClose = false;
-          item.curtainOpen = false;
-          proxyData.curtainClose = false;
-          proxyData.curtainOpen = false;
-        });
-      },
-      changeStatus(setType: any, item: any = null) {
-        proxyData.clearCurtain();
-        if (setType === "EquipOffSet") {
-          if (item) {
-            item.curtainClose = true;
-          } else {
-            proxyData.curtainClose = true;
-          }
-        } else {
-          if (item) {
-            item.curtainOpen = true;
-          } else {
-            proxyData.curtainOpen = true;
-          }
-        }
-      },
-      // 窗帘状态数据
-      setSwitchStatus(setType: any, item: any = null) {
-        proxyData.count = 2; // 恢复count
-        proxyData.countText = "指令下发中";
-        proxyData.timer = setInterval(() => {
-          if (proxyData.count === 0) {
-            proxyData.countText = "";
-            clearInterval(proxyData.timer);
-            proxyData.clearCurtain();
-          }
-          if (proxyData.count === 1) {
-            proxyData.countText = "再次点击停止窗帘";
-          }
-          if (proxyData.count > 0) {
-            proxyData.count--;
-          } else {
-            proxyData.count = 0;
+      interval: interval,
+      // 定时器定时计算
+      countInterval() {
+        proxyData.interval = setInterval(() => {
+          proxyData.count--;
+          if (proxyData.count == 0) {
+            proxyData.count = 2;
+            proxyData.allActive = 0;
+            clearInterval(proxyData.interval);
           }
         }, 1000);
       },
-      // 设置发送给后台的窗帘数据
-      setParams(arr: any, setType: any) {
-        let paramsArr = [];
-        for (let i = 0; i < arr.length; i++) {
-          let obj = {
-            objectId: arr[i].id, // 设备ID/窗帘组ID
-            equipmentCategory: "CFSSES", // 设备编码 窗帘:CFSSES
-            infoCode: setType, // 窗帘开设定:EquipOnSet 窗帘关设定:EquipOffSet
-            value: 1,
-          };
-          paramsArr.push(obj);
-        }
-        return paramsArr;
+      // 调节总开关
+      openCurtainMain(type: any) {
+        proxyData.allActive = type;
+        proxyData.countInterval();
       },
     });
-    const isShowChildLight = computed(() => {
-      return proxyData.curtainData.length && proxyData.curtainData.length > 1;
-    });
+
     watch(props, (newProps: any) => {
       if (newProps.spaceId) {
         // 当前空间的控制权限
@@ -346,7 +278,6 @@ export default defineComponent({
       proxyData.getEqpGroup();
     });
     return {
-      isShowChildLight,
       ...toRefs(proxyData),
     };
   },
@@ -429,18 +360,6 @@ export default defineComponent({
 
 .line {
   border-top: 1px solid #e8ecf0;
-  // margin-bottom: 16px;
-}
-
-.top-control {
-  text-align: right;
-  padding: 16px 20px;
-  padding-bottom: 0;
-  img {
-    width: 40px;
-    height: 40px;
-    margin-left: 8px;
-  }
 }
 
 .curtain-child {
@@ -452,13 +371,6 @@ export default defineComponent({
     padding-left: 20px;
     padding-right: 20px;
     border-top: 1px solid #e8ecf0;
-    .curtain-control {
-      img {
-        width: 40px;
-        height: 40px;
-        margin-left: 8px;
-      }
-    }
     .curtain-name {
       .name {
         font-family: "PingFang SC";
@@ -481,4 +393,41 @@ export default defineComponent({
     }
   }
 }
+
+.top-control {
+  text-align: right;
+  padding: 16px 20px;
+  padding-bottom: 0;
+  .control-item {
+    position: relative;
+    display: inline-block;
+    margin-left: 8px;
+    width: 40px;
+    height: 40px;
+    background: #f1f4f6;
+    border-radius: 50%;
+    img {
+      position: absolute;
+      width: 16px;
+      height: 16px;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+    }
+  }
+
+  .control-item-active {
+    background: rgba(206, 159, 39, 0.4);
+    span {
+      position: absolute;
+      font-family: "Persagy";
+      font-style: normal;
+      font-weight: 400;
+      font-size: 16px;
+      left: 50%;
+      top: 50%;
+      transform: translate(-50%, -50%);
+    }
+  }
+}
 </style>

+ 1 - 1
src/views/envmonitor/components/Light/LightTemp.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="light-temp">
     <div class="light-tep-top">
-      <span>氛围灯</span>
+      <span>{{ lightData.localName }}</span>
       <!-- <Switch
         v-model="lampSw"
         inactive-color="rgba(196, 196, 196, 0.4)"

+ 11 - 2
src/views/envmonitor/index.vue

@@ -236,7 +236,7 @@
         :spaceId="spaceInfo.spaceId"
         :projectId="projectId"
       />
-      <Curtain
+      <!-- <Curtain
         :spaceId="spaceInfo.spaceId"
         id="curtainId"
         key="curtainKey"
@@ -244,6 +244,15 @@
         :userIsControl="userIsControl"
         v-if="spaceExistenceDevice.curtain && spaceInfo.spaceId"
         :projectId="projectId"
+      /> -->
+
+      <Curtain
+        :spaceId="spaceInfo.spaceId"
+        id="curtainId"
+        key="curtainKey"
+        :userIsControl="userIsControl"
+        v-if="spaceExistenceDevice.curtain && spaceInfo.spaceId"
+        :projectId="projectId"
       />
     </div>
     <!--加班场景-->
@@ -394,7 +403,7 @@ import Air from "@/views/envmonitor/components/Air/index.vue";
 import FloorHeating from "@/views/envmonitor/components/FloorHeating/index.vue";
 import ManualIndex from "@/views/envmonitor/components/Air/manualIndex.vue";
 import Light from "@/views/envmonitor/components/Light/index.vue";
-import Curtain from "@/views/envmonitor/components/Curtain/index.vue";
+import Curtain from "@/views/envmonitor/components/CurtainCopy/index.vue";
 import CurtainOpening from "@/views/envmonitor/components/Curtain/CurtainOpening.vue";
 import TimeBox from "@/views/envmonitor/TimeBox.vue";
 import NavBar from "@/views/envmonitor/NavBar.vue";