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/integrity/data.ts | 76 ++++++++++++++++++++++++++++++++++++++
1 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/src/views/mes/trace/integrity/data.ts b/src/views/mes/trace/integrity/data.ts
new file mode 100644
index 0000000..d154635
--- /dev/null
+++ b/src/views/mes/trace/integrity/data.ts
@@ -0,0 +1,76 @@
+import type { VbenFormSchema } from '#/adapter/form';
+import type { VxeTableGridOptions } from '#/adapter/vxe-table';
+import type { MesTraceIntegrityApi } from '#/api/mes/trace/integrity';
+
+/** 涓氬姟绫诲瀷閫夐」 */
+export const BIZ_TYPE_OPTIONS = [
+ { label: '鐢熶骇鎵规', value: 'BATCH' },
+ { label: '閿�鍞嚭搴�', value: 'SALES' },
+ { label: '娑堣垂鑰呮壂鐮�', value: 'SCAN' },
+];
+
+/** 涓氬姟绫诲瀷涓枃鍚� */
+export function getBizTypeLabel(bizType?: string): string {
+ return (
+ BIZ_TYPE_OPTIONS.find((opt) => opt.value === bizType)?.label || bizType || '-'
+ );
+}
+
+/** 鍒楄〃鐨勬悳绱㈣〃鍗� */
+export function useGridFormSchema(): VbenFormSchema[] {
+ return [
+ {
+ fieldName: 'bizType',
+ label: '涓氬姟绫诲瀷',
+ component: 'Select',
+ componentProps: {
+ allowClear: true,
+ options: BIZ_TYPE_OPTIONS,
+ placeholder: '璇烽�夋嫨涓氬姟绫诲瀷',
+ },
+ },
+ {
+ fieldName: 'bizCode',
+ label: '涓氬姟缂栫爜',
+ component: 'Input',
+ componentProps: {
+ allowClear: true,
+ placeholder: '璇疯緭鍏ユ壒娆″彿/鍑哄簱鍗曞彿/杩芥函鐮�',
+ },
+ },
+ ];
+}
+
+/** 鍒楄〃鐨勫瓧娈� */
+export function useGridColumns(): VxeTableGridOptions<MesTraceIntegrityApi.Record>['columns'] {
+ return [
+ {
+ field: 'bizType',
+ title: '涓氬姟绫诲瀷',
+ width: 110,
+ slots: { default: 'bizType' },
+ },
+ {
+ field: 'bizId',
+ title: '涓氬姟缂栧彿',
+ width: 110,
+ },
+ {
+ field: 'bizCode',
+ title: '涓氬姟缂栫爜',
+ minWidth: 220,
+ },
+ {
+ field: 'contentHash',
+ title: '鍐呭鎽樿',
+ minWidth: 300,
+ slots: { default: 'contentHash' },
+ },
+ {
+ field: 'eventTime',
+ title: '鎽樿鐢熸垚鏃堕棿',
+ width: 170,
+ formatter: 'formatDateTime',
+ },
+ ];
+}
--
Gitblit v1.9.3