riku
2025-09-11 307b17ef15c73a071912a262834f2a5f68e1fa87
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// import { ref } from 'vue';
// import { defineStore } from 'pinia';
// import gridApi from '@/api/gridApi';
// import { useFetchData } from '@/composables/fetchData';
 
// // 走航任务
// export const useMissionStore = defineStore('mission', () => {
//   const missionList = ref([]);
//   const { loading, fetchData } = useFetchData(1000);
 
//   function fetchMission(type) {
//     return fetchData((page, pageSize) => {
//       return missionApi
//         .fethchMission({ type: type, page, pageSize })
//         .then((res) => {
//           missionList.value = res.data;
//           return res;
//         });
//     });
//   }
 
//   function fetchFusionData() {
//     return fetchData((page, pageSize) => {
//        missionApi
//         .fethchMission({ type: type, page, pageSize })
//         .then((res) => {
//           missionList.value = res.data;
//           return res;
//         });
 
//         return  gridApi
//       .fetchGridData(props.groupId, undefined, 3)
//       .then((res) => {
//         fusionDataList.value = res.data;
//       })
//       .finally(() => (fusionLoading.value = false));
//     });
//   }
 
//   function deleteMission(missionCode) {
//     return fetchData(() => {
//       return missionApi.deleteMission(missionCode).then((res) => {
//         let index = -1;
//         for (let i = 0; i < missionList.value.length; i++) {
//           const e = missionList.value[i];
//           if (e.missionCode == missionCode) {
//             index = i;
//             break;
//           }
//         }
//         if (index != -1) {
//           missionList.value.splice(index, 1);
//         }
//         return res;
//       });
//     });
//   }
 
//   return { missionList, loading, fetchMission, deleteMission };
// });