lxh 2 月之前
父節點
當前提交
ddcab8fa07
共有 1 個文件被更改,包括 5 次插入8 次删除
  1. 5 8
      src/views/vent/safetyList/common/detail.vue

+ 5 - 8
src/views/vent/safetyList/common/detail.vue

@@ -705,7 +705,7 @@ async function getSubStationList() {
   let res = await subStationList({ strtype: 'modbus' });
   if (res.length != 0) {
     cardList.value = res;
-    stationId.value = stationId.value ? stationId.value : cardList[0].id
+    stationId.value = stationId.value ? stationId.value : cardList.value[0].id
     openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
     clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
     if (activeKey.value == 'device') {
@@ -750,11 +750,10 @@ async function getStationList1() {
     el.stripC = el.strip || '';
     el.linkstatusC = el.linkstatus ? '连接' : '断开';
     el.gdmsC = el.gdms == '1' ? '直流供电' : el.gdms == '0' ? '交流供电' : '';
-    // el.debugTitle = '调试'
     el.children = el.devInfoList;
     el.children.forEach((v) => {
       v.key = v.id;
-      v.debugTitle = '调试';
+      v.debugTitle =v.deviceType=='windrect_ds_25x' || v.deviceType=='windrect_ds_two' ?  '调试' : '';
       v.stripC = v.strserno || '';
       v.linkstatusC = v.netStatus ? '连接' : '断开';
       v.linkIdC = v.linkId == '0' ? '未启用' : v.linkId == '1' ? '启用' : v.linkId == '2' ? '设备异常' : '';
@@ -775,11 +774,10 @@ async function getStationListAll() {
     el.stripC = el.strip || '';
     el.linkstatusC = el.linkstatus ? '连接' : '断开';
     el.gdmsC = el.gdms == '1' ? '直流供电' : el.gdms == '0' ? '交流供电' : '';
-    // el.debugTitle = '调试'
     el.children = el.devInfoList;
     el.children.forEach((v) => {
       v.key = v.id;
-      v.debugTitle = '调试';
+      v.debugTitle =v.deviceType=='windrect_ds_25x' || v.deviceType=='windrect_ds_two' ?  '调试' : '';
       v.stripC = v.strserno || '';
       v.linkstatusC = v.netStatus ? '连接' : '断开';
       v.linkIdC = v.linkId == '0' ? '未启用' : v.linkId == '1' ? '启用' : v.linkId == '2' ? '设备异常' : '';
@@ -851,7 +849,7 @@ function debugClick(record) {
     //     })
     //     record.debugTitle = '结束调试'
     // }
-  } else {
+  } else if(record.debugTitle == '结束调试') {
     debugFlag.value = 'device';
     debugDeviceId.value = record.id;
     tableData.value.forEach((el) => {
@@ -957,9 +955,8 @@ async function handleOkDebug() {
 function handleCancelDebug() {
   visibleModalDebug.value = false;
   tableData.value.forEach((el) => {
-    // el.debugTitle = '调试'
     el.devInfoList.forEach((v) => {
-      v.debugTitle = '调试';
+      v.debugTitle =v.deviceType=='windrect_ds_25x' || v.deviceType=='windrect_ds_two' ?  '调试' : '';
     });
   });
   debugFlag.value = '';