From 600fe725775e28af1f86f7f7f1e2521f494252b1 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 01 九月 2026 15:27:26 +0800
Subject: [PATCH] feat(mes): 新增管理驾驶舱页面
---
src/views/mes/trace/crossregion/data.ts | 165 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 165 insertions(+), 0 deletions(-)
diff --git a/src/views/mes/trace/crossregion/data.ts b/src/views/mes/trace/crossregion/data.ts
new file mode 100644
index 0000000..c702144
--- /dev/null
+++ b/src/views/mes/trace/crossregion/data.ts
@@ -0,0 +1,165 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { MesTraceCrossRegionApi } from '#/api/mes/trace/crossregion';
+
+import { getRangePickerDefaultProps } from '#/utils';
+
+/** 棰勮绫诲瀷閫夐」 */
+export const WARNING_TYPE_OPTIONS = [
+ { label: '璺ㄧ渷绐滆揣', value: 'CROSS_PROVINCE' },
+ { label: '璺ㄥ競绐滆揣', value: 'CROSS_CITY' },
+];
+
+/** 棰勮鐘舵�侀�夐」 */
+export const WARNING_STATUS_OPTIONS = [
+ { label: '寰呭鐞�', value: 10 },
+ { label: '宸插鐞�', value: 20 },
+ { label: '璇姤', value: 30 },
+];
+
+/** 鍒ゅ畾绮掑害閫夐」 */
+export const WARNING_LEVEL_OPTIONS = [
+ { label: '璺ㄧ渷鍒ゅ畾', value: 'PROVINCE' },
+ { label: '璺ㄥ競鍒ゅ畾', value: 'CITY' },
+];
+
+/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'status',
+ label: '鐘舵��',
+ component: 'Select',
+ componentProps: {
+ allowClear: true,
+ options: WARNING_STATUS_OPTIONS,
+ placeholder: '璇烽�夋嫨鐘舵��',
+ },
+ },
+ {
+ fieldName: 'warningType',
+ label: '棰勮绫诲瀷',
+ component: 'Select',
+ componentProps: {
+ allowClear: true,
+ options: WARNING_TYPE_OPTIONS,
+ placeholder: '璇烽�夋嫨棰勮绫诲瀷',
+ },
+ },
+ {
+ fieldName: 'batchCode',
+ label: '鎵规鍙�',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ユ壒娆″彿',
+ },
+ },
+ {
+ fieldName: 'bagCode',
+ label: '琚嬬爜',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ヨ鐮�',
+ },
+ },
+ {
+ fieldName: 'clientName',
+ label: '缁忛攢鍟�',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ョ粡閿�鍟嗗悕绉�',
+ },
+ },
+ {
+ fieldName: 'eventTime',
+ label: '棰勮鏃堕棿',
+ component: 'RangePicker',
+ componentProps: {
+ ...getRangePickerDefaultProps(),
+ allowClear: true,
+ },
+ },
+ ];
+}
+
+/** 鍒楄〃鐨勫瓧娈� */
+export function useGridColumns(): VxeTableGridOptions<MesTraceCrossRegionApi.Warning>['columns'] {
+ return [
+ {
+ field: 'warningNo',
+ title: '棰勮缂栧彿',
+ fixed: 'left',
+ minWidth: 190,
+ },
+ {
+ field: 'bagCode',
+ title: '琚嬬爜',
+ minWidth: 150,
+ slots: { default: 'bagCode' },
+ },
+ {
+ field: 'batchCode',
+ title: '鎵规鍙�',
+ minWidth: 190,
+ },
+ {
+ field: 'itemName',
+ title: '鐗╂枡鍚嶇О',
+ minWidth: 120,
+ },
+ {
+ field: 'salesCode',
+ title: '鍑哄簱鍗曞彿',
+ minWidth: 150,
+ },
+ {
+ field: 'clientName',
+ title: '缁忛攢鍟�',
+ minWidth: 120,
+ },
+ {
+ field: 'dealerProvince',
+ title: '缁忛攢鍟嗗湴鍖�',
+ minWidth: 130,
+ slots: { default: 'dealerRegion' },
+ },
+ {
+ field: 'scanProvince',
+ title: '鎵爜鍦板尯',
+ minWidth: 130,
+ slots: { default: 'scanRegion' },
+ },
+ {
+ field: 'warningTypeName',
+ title: '棰勮绫诲瀷',
+ width: 110,
+ slots: { default: 'warningType' },
+ },
+ {
+ field: 'statusName',
+ title: '鐘舵��',
+ width: 90,
+ slots: { default: 'status' },
+ },
+ {
+ field: 'eventTime',
+ title: '棰勮鏃堕棿',
+ width: 170,
+ formatter: 'formatDateTime',
+ },
+ {
+ field: 'handleUserName',
+ title: '澶勭悊浜�',
+ width: 90,
+ },
+ {
+ title: '鎿嶄綔',
+ width: 120,
+ fixed: 'right',
+ slots: { default: 'actions' },
+ },
+ ];
+}
--
Gitblit v1.9.3