1
0
lxh vor 4 Monaten
Ursprung
Commit
984fc5f972

+ 1 - 0
src/assets/icons/unselect-control.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1766106105037" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1593" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m345.344 334.848l-399.36 414.464a44.288 44.288 0 0 1-67.84 5.12 43.264 43.264 0 0 1-3.328-5.12l-220.16-228.096a47.36 47.36 0 0 1 0-65.28 43.264 43.264 0 0 1 62.72 0l192.768 199.936L793.6 269.824a43.264 43.264 0 0 1 62.72 0 47.36 47.36 0 0 1 1.024 65.024z" p-id="1594"></path></svg>

+ 8 - 5
src/views/vent/monitorManager/airDoor/components/door-content-r.vue

@@ -19,14 +19,12 @@
       <a-button :class="index % 2 == 1 ? 'btn-control' : ''" v-for="(item, index) in dictCodes" :key="index"
         type="primary" @click="handlerFz(item)">{{ item.title }}</a-button>
       <a-button class="device-control-btn" type="primary" @click="handlerDeviceChoice">集控设备选择</a-button>
-
-
-
     </div>
     <div class="content-r-container">
       <div class="content-r-box" v-for="(item, index) in infoDatas" :key="index" @click="handlerAddorDel(item)">
         <div class="box-title">
           <SvgIcon v-show="item.iconControl" class="title-icon" size="16" name="select-control" />
+          <SvgIcon v-show="!item.iconControl" class="title-icon" size="16" name="unselect-control" />
           <div class="title-text">{{ item.strinstallpos }}</div>
           <div class="title-detail" @click="handlerDetail(item.deviceID)">详情</div>
         </div>
@@ -144,6 +142,8 @@ let cameraData = ref<any[]>([])
 const dictCodes = getDictItemsByCode('gateCentralizedControl');
 //是否开启分组
 let isOpenFz = ref('')
+//分组选中
+let choiceFzData=ref<any[]>([])
 
 const setChildRef = (el, index) => {
   childRefs.value[index] = el
@@ -158,7 +158,7 @@ function handlerOpenOrClose(data) {
 //确定
 async function handleOk(param) {
   if (isTbOrJk.value == 'Tb') {
-    let deviceStr = infoDatas.value.map(v => v.deviceID).join(',')
+    let deviceStr = isOpenFz ? choiceFzData.value.map(v => v.deviceID).join(',') : infoDatas.value.map(v => v.deviceID).join(',')
     let paramcode = visibleStatus.value == 'open' ? 'sameTimeOpen' : 'sameTimeClose'
     let res = await devicecontrol({ deviceids: deviceStr, paramcode: paramcode, password: param.pass || globalConfig?.simulatedPassword })
     if (res) {
@@ -290,6 +290,7 @@ function handlerFz(item) {
     infoDatas.value.forEach(el => {
       el.iconControl = true
     })
+    choiceFzData.value=infoDatas.value
   } else {
     infoDatas.value.forEach(el => {
       if (el.gateCentralizedControl == item.value) {
@@ -298,12 +299,14 @@ function handlerFz(item) {
         el.iconControl = false
       }
     })
+   choiceFzData.value=infoDatas.value.filter(v=>v.gateCentralizedControl==item.value)
   }
 }
 //分组中添加或删除元素
 async function handlerAddorDel(item) {
-  if (isOpenFz.value ) {
+  if (isOpenFz.value) {
     item.iconControl = !item.iconControl
+    choiceFzData.value.push(item)
     // // let res = await editDoor({ gateCentralizedControl: isOpenFz.value, id: item.deviceID })
     // console.log(isOpenFz.value, '开启分组并且当前点击项已有分组')
   } else {

+ 3 - 3
src/views/vent/monitorManager/airDoor/index.vue

@@ -25,7 +25,7 @@ let visibleTs30 = ref(false);
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor(flag?) {
+function getMonitor() {
   timer = setTimeout(
     async () => {
       await upcomingList()
@@ -34,9 +34,9 @@ function getMonitor(flag?) {
       if (timer) {
         timer = null;
       }
-      getMonitor(false);
+      getMonitor();
     },
-    flag ? 0 : 15000
+    15000
   );
 }