From f19e5267cc23b1c714dc746239864f33ed715dd9 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 05 十二月 2025 17:55:02 +0800
Subject: [PATCH] 完成地图制作任务功能初版

---
 src/views/fysp/task/components/CompSubTaskList.vue |   77 ++++++++++++++++++++++++++++----------
 1 files changed, 57 insertions(+), 20 deletions(-)

diff --git a/src/views/fysp/task/components/CompSubTaskList.vue b/src/views/fysp/task/components/CompSubTaskList.vue
index 03ef062..5b6d1e0 100644
--- a/src/views/fysp/task/components/CompSubTaskList.vue
+++ b/src/views/fysp/task/components/CompSubTaskList.vue
@@ -1,13 +1,22 @@
 <template>
   <el-row justify="space-between">
-    <el-text>鍗曟棩璁″垝</el-text>
-    <el-button
-      v-show="create && data && data.length > 0"
-      type="success"
-      size="small"
-      @click="add"
-      >浠诲姟璋冩暣</el-button
-    >
+    <el-text>{{ dateStr }}璁″垝</el-text>
+    <div v-show="create && data && data.length > 0">
+      <el-button
+        icon="IconPrinter"
+        type="success"
+        size="small"
+        plain
+        @click="handleInspectFileDownload"
+        >鍗曟嵁鎵撳嵃</el-button
+      >
+      <el-button type="success" size="small" @click="add" icon="Switch"
+        >浠诲姟璋冩暣</el-button
+      >
+      <el-button type="primary" size="small" @click="openMap">
+        杩涘叆鍦板浘<el-icon class="el-icon--right"><Right /></el-icon>
+      </el-button>
+    </div>
   </el-row>
   <el-divider />
   <div>
@@ -21,22 +30,24 @@
       >
         <ItemSubTask v-for="s in data" :key="s.guid" :item="s">
           <template #default="{ item }">
-            <el-space direction="vertical">
+            <el-space direction="horizontal">
               <el-button
                 :disabled="item.status != '鏈墽琛�'"
                 plain
                 type="primary"
                 size="small"
+                icon="EditPen"
                 @click="edit(item)"
-                >缂栬緫</el-button
-              >
+                title="淇敼"
+              ></el-button>
               <el-button
                 :disabled="item.status != '鏈墽琛�'"
-                type="default"
+                type="danger"
                 size="small"
+                icon="Delete"
                 @click="remove(item)"
-                >绉婚櫎</el-button
-              >
+                title="绉婚櫎"
+              ></el-button>
             </el-space>
           </template>
         </ItemSubTask>
@@ -55,6 +66,7 @@
       </div>
     </el-scrollbar>
   </div>
+  <!-- 缂栬緫宸℃煡瀛愪换鍔� -->
   <el-dialog
     v-model="dialogVisible"
     width="600"
@@ -70,15 +82,22 @@
       @cancel="dialogVisible = false"
     ></CompSubTaskEdit>
   </el-dialog>
+  <!-- 宸℃煡鍗曚笅杞� -->
+  <SceneInspectFile
+    v-model="downloadDialog"
+    :value="downloadSceneList"
+  ></SceneInspectFile>
 </template>
 <script setup>
 import { ref, computed, watch, onMounted, onUnmounted } from 'vue';
-import { ElMessageBox, ElNotification, ElMessage } from 'element-plus';
+import { ElMessageBox, ElNotification, ElMessage, dayjs } from 'element-plus';
 import CompSubTaskEdit from './CompSubTaskEdit.vue';
+import SceneInspectFile from '@/views/fysp/scene/SceneInspectFile.vue';
 import subtaskApi from '@/api/fysp/subtaskApi';
 
 const props = defineProps({
   modelValue: Array,
+  date: Date,
   height: {
     type: String,
     default: '70vh'
@@ -86,14 +105,18 @@
   // 鏄惁鏄剧ず娣诲姞浠诲姟鎸夐挳
   create: Boolean,
   loading: Boolean,
-  createLoading:Boolean,
+  createLoading: Boolean
 });
 
 const dialogVisible = ref(false);
 const activeItem = ref(null);
 const data = computed(() => props.modelValue);
+const downloadDialog = ref(false);
+const downloadSceneList = ref([]);
 
-const emit = defineEmits(['submit', 'add', 'remove', 'update:modelValue']);
+const emit = defineEmits(['submit', 'add', 'openMap', 'remove', 'update:modelValue']);
+
+const dateStr = computed(() => dayjs(props.date).format('MM鏈圖D鏃�'));
 
 function remove(item) {
   if (item.status == '鏈墽琛�') {
@@ -102,7 +125,7 @@
       cancelButtonText: '鍙栨秷',
       type: 'warning'
     }).then(() => {
-      return subtaskApi.deleteSubtask(item.stguid).then(res=>{
+      return subtaskApi.deleteSubtask(item.stguid).then((res) => {
         if (res == 1) {
           const index = data.value.indexOf(item);
           data.value.splice(index, 1);
@@ -110,9 +133,9 @@
           emit('update:modelValue', data.value);
           emit('remove', item);
         } else {
-          Promise.reject('鍒犻櫎宸℃煡浠诲姟澶辫触')
+          Promise.reject('鍒犻櫎宸℃煡浠诲姟澶辫触');
         }
-      })
+      });
     });
   }
 }
@@ -136,7 +159,21 @@
   emit('add');
 }
 
+/**
+ * 鎵撳紑鍦烘櫙鍦板浘
+ */
+function openMap() {
+  emit('openMap');
+}
+
+
+
 onUnmounted(() => {
   dialogVisible.value = false;
 });
+
+function handleInspectFileDownload() {
+  downloadSceneList.value = data.value.map((v) => v.scenseid);
+  downloadDialog.value = true;
+}
 </script>

--
Gitblit v1.9.3