From a0ac379b28daeac8deddfae34f0015935a811bac Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期五, 07 二月 2025 17:39:47 +0800
Subject: [PATCH] 修改细分网格的展示逻辑

---
 src/stores/satellite-grid.js |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/stores/satellite-grid.js b/src/stores/satellite-grid.js
index d88a13f..ef778cd 100644
--- a/src/stores/satellite-grid.js
+++ b/src/stores/satellite-grid.js
@@ -1,4 +1,4 @@
-import { ref } from 'vue';
+import { ref, computed } from 'vue';
 import { defineStore } from 'pinia';
 import gridApi from '@/api/gridApi';
 import { useFetchData } from '@/composables/fetchData';
@@ -7,8 +7,20 @@
 export const useSatelliteGridStore = defineStore('satelliteGrid', () => {
   // 缃戞牸淇℃伅
   const gridInfo = ref([]);
-  // 缃戞牸鏁版嵁缁�
-  const gridDataList = ref([]);
+  // 鎵�鏈夌綉鏍兼暟鎹粍
+  const allGridDataList = ref([]);
+  // 鍘熷缃戞牸鏁版嵁缁�
+  const gridDataList = computed(() => {
+    return allGridDataList.value.filter((v) => {
+      return v.type != 1;
+    });
+  });
+  // 铻嶅悎缃戞牸鏁版嵁缁�
+  const mixGridDataList = computed(() => {
+    return allGridDataList.value.filter((v) => {
+      return v.type == 1;
+    });
+  });
 
   // 鑾峰彇缃戞牸淇℃伅
   function fetchGridCell(groupId) {
@@ -20,7 +32,7 @@
   // 鑾峰彇閬ユ祴鍗曟棩鏁版嵁淇℃伅
   function fetchGridData(groupId) {
     return gridApi.fetchGridData(groupId).then((res) => {
-      gridDataList.value = res.data;
+      allGridDataList.value = res.data;
     });
   }
 
@@ -35,7 +47,9 @@
 
   return {
     gridInfo,
+    allGridDataList,
     gridDataList,
+    mixGridDataList,
     fetchGridCell,
     fetchGridData,
     fetchGridDataDetail

--
Gitblit v1.9.3