Explorar el Código

fix: 修复航站楼和上岗位置映射错误及上传组件问题

- 修正表格中航站楼字段从areaName改为terminalName
- 添加上传组件的data参数和加载状态
- 修复航站楼ID和上岗位置ID的映射逻辑错误
huoyi hace 1 mes
padre
commit
bacaaa9a2b
Se han modificado 1 ficheros con 10 adiciones y 8 borrados
  1. 10 8
      src/views/blockingData/missedInspectionList/index.vue

+ 10 - 8
src/views/blockingData/missedInspectionList/index.vue

@@ -61,7 +61,7 @@
61 61
     <el-table v-loading="loading" :data="missedInspectionList" @selection-change="handleSelectionChange">
62 62
       <el-table-column type="selection" width="55" align="center" />
63 63
       <el-table-column label="大队" align="center" prop="brigadeName" min-width="120" />
64
-      <el-table-column label="航站楼" align="center" prop="areaName" min-width="120" />
64
+      <el-table-column label="航站楼" align="center" prop="terminalName" min-width="120" />
65 65
       <el-table-column label="被回查人" align="center" prop="reviewedUserName" min-width="120" />
66 66
       <el-table-column label="回查日期" align="center" prop="reviewDate" min-width="120" />
67 67
       <el-table-column label="漏检时间" align="center" prop="missCheckTime" min-width="180" />
@@ -311,7 +311,7 @@
311 311
     <!-- 导入对话框 -->
312 312
     <el-dialog title="导入" v-model="upload.open" width="500px" append-to-body>
313 313
       <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url"
314
-        :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
314
+        :data="upload.data" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess"
315 315
         :auto-upload="false" drag>
316 316
         <el-icon class="el-icon--upload"><upload-filled /></el-icon>
317 317
         <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
@@ -325,7 +325,7 @@
325 325
       </el-upload>
326 326
       <template #footer>
327 327
         <div class="dialog-footer">
328
-          <el-button type="primary" @click="submitFileForm">确 定</el-button>
328
+          <el-button type="primary" @click="submitFileForm" :loading="upload.isUploading">确 定</el-button>
329 329
           <el-button @click="upload.open = false">取 消</el-button>
330 330
         </div>
331 331
       </template>
@@ -373,7 +373,8 @@ const upload = reactive({
373 373
   open: false,
374 374
   isUploading: false,
375 375
   headers: { Authorization: 'Bearer ' + getToken() },
376
-  url: import.meta.env.VITE_APP_BASE_API + '/blocked/missReview/importData'
376
+  url: import.meta.env.VITE_APP_BASE_API + '/blocked/missReview/importData',
377
+  data: { updateSupport: true }
377 378
 })
378 379
 
379 380
 // 查询参数
@@ -633,8 +634,8 @@ function submitForm() {
633 634
 
634 635
       // 处理航站楼ID和名称映射
635 636
       if (form.areaId) {
636
-
637
-        const area = areaOptions.value.find(item => item.id === form.areaId)
637
+       
638
+        const area = channelOptions.value.find(item => item.id === form.areaId)
638 639
         form.areaName = area ? area.name : null
639 640
       }
640 641
 
@@ -646,7 +647,8 @@ function submitForm() {
646 647
 
647 648
       // 处理上岗位置ID和名称映射
648 649
       if (form.channelId) {
649
-        const channel = channelOptions.value.find(item => item.id === form.channelId)
650
+      
651
+        const channel = areaOptions.value.find(item => item.id === form.channelId)
650 652
         form.channelName = channel ? channel.name : null
651 653
       }
652 654
 
@@ -658,7 +660,7 @@ function submitForm() {
658 660
 
659 661
       // 处理代管主管ID和名称映射
660 662
       if (form.actingSupervisorId) {
661
-
663
+      
662 664
         const actingSupervisor = supervisorOptions.value.find(item => item.value === form.actingSupervisorId)
663 665
         form.actingSupervisorName = actingSupervisor ? actingSupervisor.label : null
664 666
       }