From 105119f987e6e16d3a152649394f6052e5936b8f Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期二, 24 十二月 2024 11:17:53 +0800 Subject: [PATCH] 调整动画速率 --- src/stores/satellite-grid.js | 39 ++++++++++++++++++++++++++++++++------- 1 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/stores/satellite-grid.js b/src/stores/satellite-grid.js index 2b83df2..02e0494 100644 --- a/src/stores/satellite-grid.js +++ b/src/stores/satellite-grid.js @@ -5,14 +5,39 @@ // 鍗槦閬ユ祴缃戞牸 export const usesatelliteGridStore = defineStore('satelliteGrid', () => { - const gridGropiList = ref([]); - const { loading, fetchData } = useFetchData(); + // 缃戞牸淇℃伅 + const gridInfo = ref([]); + // 缃戞牸鏁版嵁缁� + const gridDataList = ref([]); - function fetchGridGroup(area) { - return fetchData((page, pageSize) => { - return gridApi.fetchGridGroup(area, page, pageSize).then((res) => { - return res; - }); + // 鑾峰彇缃戞牸淇℃伅 + function fetchGridCell(groupId) { + return gridApi.fetchGridCell(groupId).then((res) => { + gridInfo.value = res.data; }); } + + // 鑾峰彇閬ユ祴鍗曟棩鏁版嵁淇℃伅 + function fetchGridData(groupId) { + return gridApi.fetchGridData(groupId).then((res) => { + gridDataList.value = res.data; + }); + } + + // 鑾峰彇閬ユ祴鍗曟棩鍏蜂綋缃戞牸鐩戞祴鏁版嵁 + function fetchGridDataDetail(gridData) { + return gridApi + .fetchGridDataDetail(gridData.id, gridData.groupId) + .then((res) => { + gridData.dataDetail = res.data; + }); + } + + return { + gridInfo, + gridDataList, + fetchGridCell, + fetchGridData, + fetchGridDataDetail + }; }); -- Gitblit v1.9.3