riku
2025-03-14 8372d022614a1897120802cf1bac90d61651177f
src/stores/grid-info.js
@@ -1,29 +1,22 @@
// import { ref } from 'vue';
// import { defineStore } from 'pinia';
// import { useFetchData } from '@/composables/fetchData';
// import sceneInfoApi from '@/api/sceneInfoApi';
// import { useToolboxStore } from '@/stores/toolbox';
import { ref } from 'vue';
import { defineStore } from 'pinia';
// const toolboxStore = useToolboxStore();
export const useGridStore = defineStore('grid', () => {
  // 网格控制类集合
  const gridClzList = ref([]);
// // 走航设备
// export const useGridStore = defineStore('grid', () => {
//   const selectedGrid = ref(undefined);
  const selectedSatelliteProxy = undefined;
//   function searchScene(lng, lat) {
//     // if (toolboxStore.sceneSearchStatus) {
//       return fetchData(() => {
//         return sceneInfoApi
//           .searchByCoordinate(lng, lat, radius.value * 1000)
//           .then((res) => {
//             sceneList.value = res.data.filter((v) => {
//               return v.typeId != 19 && v.typeId != 20;
//             });
//             return res;
//           });
//       });
//     // }
//   }
  const selectedGridCellAndDataDetail = ref(undefined);
//   return { radius, sceneList, loading, searchScene };
// });
  function pushGridClz(clz) {
    gridClzList.value.push(clz);
  }
  return {
    gridClzList,
    selectedSatelliteProxy,
    selectedGridCellAndDataDetail,
    pushGridClz
  };
});