From 559b2e34c983f615b6d6747f52c801022c561803 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期一, 27 十月 2025 23:05:08 +0800
Subject: [PATCH] feat: 优化任务显示列表

---
 app/pages/task/index.vue |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/app/pages/task/index.vue b/app/pages/task/index.vue
index 6fa2349..c80265c 100644
--- a/app/pages/task/index.vue
+++ b/app/pages/task/index.vue
@@ -220,6 +220,7 @@
   import uniDatetimePicker from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
   import { listTask, changeTaskStatus } from '@/api/task'
   import { mapState } from 'vuex'
+  import { formatDateTime } from '@/utils/common'
   
   export default {
     components: {
@@ -359,7 +360,7 @@
               vehicleList: task.assignedVehicles || [],
               startLocation: this.formatAddress(task.departureAddress || task.startLocation || '鏈缃�'),
               endLocation: this.formatAddress(task.destinationAddress || task.endLocation || '鏈缃�'),
-              startTime: task.plannedStartTime ? this.formatDateTime(task.plannedStartTime) : '鏈缃�',
+              startTime: task.plannedStartTime ? formatDateTime(task.plannedStartTime, 'YYYY-MM-DD HH:mm') : '鏈缃�',
               assignee: task.assigneeName || '鏈垎閰�'
             }
           })
@@ -367,19 +368,6 @@
           this.loading = false
           console.error('鍔犺浇浠诲姟鍒楄〃澶辫触:', error)
           this.$modal.showToast('鍔犺浇浠诲姟鍒楄〃澶辫触')
-        })
-      },
-      
-      // 鏍煎紡鍖栨棩鏈熸椂闂�
-      formatDateTime(dateTime) {
-        if (!dateTime) return ''
-        const date = new Date(dateTime)
-        return date.toLocaleString('zh-CN', {
-          year: 'numeric',
-          month: '2-digit',
-          day: '2-digit',
-          hour: '2-digit',
-          minute: '2-digit'
         })
       },
       
@@ -587,7 +575,7 @@
           'MAINTENANCE': '缁翠慨淇濆吇',
           'FUEL': '鍔犳补',
           'OTHER': '鍏朵粬',
-          'EMERGENCY_TRANSFER': '鎬ユ晳杞繍',
+          'EMERGENCY_TRANSFER': '杞繍浠诲姟',
           'WELFARE': '绂忕杞�'
         }
         return typeMap[type] || '鏈煡绫诲瀷'

--
Gitblit v1.9.1