Преглед на файлове

feat: 调整表格中时间范围的格式化

Jack Zhou преди 4 месеца
родител
ревизия
a5982c2f9e

+ 8 - 0
src/views/DestinationDelivery/src/components/TableView/src/TableView.vue

@@ -49,6 +49,14 @@ const handleColumns = (columns: any, status?: string) => {
         ...curColumn,
         formatter: ({ cellValue }: any) => formatTimezone(cellValue)
       }
+    } else if (item.formatter === 'range') {
+      curColumn = {
+        ...curColumn,
+        formatter: ({ cellValue }: any) => {
+          const rangeData = cellValue.split(';')
+          return formatTimezone(rangeData[0]) + ' -- ' + formatTimezone(rangeData[1])
+        }
+      }
     }
     return curColumn
   })

+ 4 - 1
src/views/DestinationDelivery/src/components/TableView/src/components/ShipmentInforTable.vue

@@ -36,7 +36,10 @@ const tableData = ref<VxeGridProps<any>>({
       field: 'Recommended Delivery Date',
       title: 'Recommended Delivery Date',
       width: 220,
-      formatter: ({ cellValue }: any) => formatTimezone(cellValue)
+      formatter: ({ cellValue }: any) => {
+        const rangeData = cellValue.split(';')
+        return formatTimezone(rangeData[0]) + ' -- ' + formatTimezone(rangeData[1])
+      }
     }
   ],
   data: [],