Browse Source

158分站修改更新

lxh 2 tháng trước cách đây
mục cha
commit
a7847e2c78
1 tập tin đã thay đổi với 7 bổ sung8 xóa
  1. 7 8
      src/views/vent/safetyList/common/detail.vue

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

@@ -512,11 +512,13 @@ function onChangeTab(tab) {
   clearTimeout(timer1);
   clearTimeout(timer);
   if (activeKey.value == 'device') {
-    getSubStationList();
     getMonitor()
-  } else if (activeKey.value == 'history') {
     getSubStationList();
+    getStationList1();
+  } else if (activeKey.value == 'history') {
     getMonitor()
+    getSubStationList();
+    getStationList();
   } else {
     getStationList();
     getMonitor1();
@@ -711,11 +713,6 @@ async function getSubStationList() {
     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') {
-      getStationList1();
-    } else if (activeKey.value == 'history') {
-      getStationList();
-    }
   } else {
     cardList.value = [];
   }
@@ -978,13 +975,15 @@ async function handleDelStation() {
   console.log(res, '删除左侧分站')
   if (res) {
     getSubStationList();
+    getStationList1();
   }
 }
 //取消删除左侧分站
 function handleCancelDelStation() { }
 onMounted(() => {
-  getSubStationList();
   getMonitor()
+  getSubStationList();
+  getStationList1();
 });
 onUnmounted(() => {
   if (timer) {