From 3832a82fb79d4cec4cca5e2854e54953f2095ef8 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 06 九月 2024 16:55:08 +0800
Subject: [PATCH] 1. 添加溯源清单功能 2. 修复切换至走航监测界面后,之前正在加载的历史数据依旧展示至地图的问题 3. 添加折线图下载图片功能; 4. 添加数据导出功能; 5. 添加设备管理功能; 6. 添加数据弹框和溯源清单开关功能; 7. 优化3D里面的颜色展示逻辑,底部颜色由原来的因子最小值颜色改为当前量级的上一个量级对应的颜色

---
 src/components/mission/MissionManage.vue |   46 ++++++++++++++++++++++++++++++++++++----------
 1 files changed, 36 insertions(+), 10 deletions(-)

diff --git a/src/components/mission/MissionManage.vue b/src/components/mission/MissionManage.vue
index 5884383..1cf433f 100644
--- a/src/components/mission/MissionManage.vue
+++ b/src/components/mission/MissionManage.vue
@@ -1,13 +1,17 @@
 <template>
-  <el-button
+  <!-- <el-button
     type="primary"
     icon="Memo"
     class="el-button-custom p-events-auto"
     @click="dialogVisible = !dialogVisible"
   >
     浠诲姟绠$悊
-  </el-button>
-  <CardDialog v-model="dialogVisible" title="璧拌埅浠诲姟绠$悊">
+  </el-button> -->
+  <CardDialog
+    :model-value="modelValue"
+    @changed="handleChange"
+    title="璧拌埅浠诲姟绠$悊"
+  >
     <el-row class="mission-table">
       <el-col :span="20">
         <el-table
@@ -41,7 +45,7 @@
             align="center"
             :formatter="timeFormatter"
           />
-          <el-table-column label="绠$悊" width="70" align="center">
+          <el-table-column label="绠$悊" width="140" align="center">
             <template #default="{ row }">
               <el-button
                 type="primary"
@@ -50,6 +54,14 @@
                 @click="deleteMission(row)"
                 >鍒犻櫎</el-button
               >
+              <!-- <el-button
+                :loading="row.downloadLoading"
+                type="primary"
+                size="small"
+                class="el-button-custom"
+                @click="downloadReport(row)"
+                >鎶ュ憡</el-button
+              > -->
             </template>
           </el-table-column>
         </el-table>
@@ -61,16 +73,16 @@
               </el-button> -->
           <MissionCreate></MissionCreate>
         </div>
-        <div>
+        <!-- <div>
           <el-button type="primary" class="el-button-custom">
             鏁版嵁瀵煎叆
           </el-button>
-        </div>
-        <div>
+        </div> -->
+        <!-- <div>
           <el-button type="primary" class="el-button-custom">
             涓嬭浇妯℃澘
           </el-button>
-        </div>
+        </div> -->
       </el-col>
     </el-row>
   </CardDialog>
@@ -84,6 +96,7 @@
 </template>
 <script>
 import moment from 'moment';
+import missionApi from '@/api/missionApi';
 import { mapStores } from 'pinia';
 import { useMissionStore } from '@/stores/mission';
 import { useFetchData } from '@/composables/fetchData';
@@ -93,7 +106,10 @@
     const { loading, fetchData } = useFetchData();
     return { loading, fetchData };
   },
-  props: {},
+  props: {
+    modelValue: Boolean
+  },
+  emits: ['update:modelValue'],
   data() {
     return {
       dialogVisible: false,
@@ -105,12 +121,22 @@
     ...mapStores(useMissionStore)
   },
   methods: {
+    handleChange(value) {
+      this.$emit('update:modelValue', value);
+    },
     deleteMission(row) {
       this.onConfirm = () => {
         this.missionStore.deleteMission(row.missionCode);
       };
       this.msgBoxVisible = true;
     },
+    downloadReport(row) {
+      row.downloadLoading = true;
+      missionApi
+        .downloadReport(row.missionCode)
+        .finally(() => (row.downloadLoading = false));
+    },
+    // eslint-disable-next-line no-unused-vars
     timeFormatter(row, col, cellValue, index) {
       return moment(cellValue).format('YYYY-MM-DD HH:mm:ss');
     }
@@ -138,6 +164,6 @@
 }
 
 .mission-table {
-  height: 60vh;
+  /* height: 60vh; */
 }
 </style>

--
Gitblit v1.9.3