From 3baaad59171ded6aca17340fcc907acbeeb45b7b Mon Sep 17 00:00:00 2001 From: zhuguifei <zhuguifei@zhuguifeideiMac.local> Date: 星期二, 08 四月 2025 08:14:43 +0800 Subject: [PATCH] Merge branch 'main' of http://lanpucloud.cn:1111/r/eims-master --- eims-ui/apps/web-antd/src/views/eims/fault-know/data.tsx | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 205 insertions(+), 0 deletions(-) diff --git a/eims-ui/apps/web-antd/src/views/eims/fault-know/data.tsx b/eims-ui/apps/web-antd/src/views/eims/fault-know/data.tsx new file mode 100644 index 0000000..8cc1cef --- /dev/null +++ b/eims-ui/apps/web-antd/src/views/eims/fault-know/data.tsx @@ -0,0 +1,205 @@ +import type { VxeGridProps } from '#/adapter/vxe-table'; + +import { DictEnum } from '@vben/constants'; + +import { type FormSchemaGetter } from '#/adapter/form'; +import { getDictOptions } from '#/utils/dict'; +import { renderDict } from '#/utils/render'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'faultCode', + label: '鐭ヨ瘑缂栧彿' + }, + { + component: 'Input', + fieldName: 'equName', + label: '璁惧鍚嶇О' + }, + { + component: 'Input', + fieldName: 'assetNo', + label: '璧勪骇缂栧彿' + }, + { + component: 'Select', + componentProps: { + options: getDictOptions(DictEnum.EIMS_EQU_PART) + }, + fieldName: 'equPart', + label: '璁惧閮ㄤ綅' + }, + { + component: 'Select', + componentProps: { + options: getDictOptions(DictEnum.REPAIR_FAULT_TYPE) + }, + fieldName: 'faultType', + label: '鏁呴殰绫诲埆' + }, + { + component: 'Select', + componentProps: { + options: getDictOptions(DictEnum.EIMS_FAULT_REASON) + }, + fieldName: 'faultReason', + label: '鏁呴殰鍘熷洜' + }, + { + component: 'Input', + fieldName: 'reqDesc', + label: '鏁呴殰鎻忚堪' + }, + { + component: 'Input', + fieldName: 'resHandle', + label: '澶勭悊鎺柦' + } +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60, fixed: 'left' }, + { + title: '鐭ヨ瘑缂栫爜', + field: 'faultCode', + minWidth: 200 + }, + { + title: '璁惧鍚嶇О', + field: 'equName', + minWidth: 140, + fixed: 'left', + slots: { default: 'equName' } + }, + { + title: '璧勪骇缂栧彿', + field: 'assetNo', + sortable: true, + minWidth: 140, + fixed: 'left' + }, + { + title: '璁惧绫诲瀷', + field: 'equTypeName', + minWidth: 140 + }, + { + title: '璁惧閮ㄤ綅', + field: 'equPart', + sortable: true, + slots: { + default: ({ row }) => { + if (row.equPart === null || row.equPart === '') { + return ''; + } + return renderDict(row.equPart, DictEnum.EIMS_EQU_PART); + } + }, + minWidth: 120 + }, + { + title: '鏁呴殰绫诲埆', + field: 'faultType', + sortable: true, + slots: { + default: ({ row }) => { + if (row.faultType === null || row.faultType === '') { + return ''; + } + return renderDict(row.faultType, DictEnum.REPAIR_FAULT_TYPE); + } + }, + minWidth: 120 + }, + { + title: '鏁呴殰鍘熷洜', + field: 'faultReason', + sortable: true, + slots: { + default: ({ row }) => { + if (row.faultReason === null || row.faultReason === '') { + return ''; + } + return renderDict(row.faultReason, DictEnum.EIMS_FAULT_REASON); + } + }, + minWidth: 120 + }, + { + title: '鎶ヤ慨鎻忚堪', + field: 'reqDesc', + minWidth: 300 + }, + { + title: '澶勭悊鎺柦', + field: 'resHandle', + minWidth: 300 + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '鎿嶄綔', + width: 200 + } +]; + +export const drawerSchema: FormSchemaGetter = () => [ + { + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''] + }, + fieldName: 'equId' + }, + { + component: 'Input', + fieldName: 'faultCode', + label: '鐭ヨ瘑缂栫爜', + rules: 'required' + }, + { + component: 'Input', + fieldName: 'equName', + label: '璁惧鍚嶇О', + rules: 'required' + }, + { + component: 'Select', + componentProps: { + options: getDictOptions(DictEnum.EIMS_EQU_PART) + }, + fieldName: 'equPart', + label: '璁惧閮ㄤ綅' + }, + { + component: 'Select', + componentProps: { + options: getDictOptions(DictEnum.REPAIR_FAULT_TYPE) + }, + fieldName: 'faultType', + label: '鏁呴殰绫诲埆' + }, + { + component: 'Select', + componentProps: { + options: getDictOptions(DictEnum.EIMS_FAULT_REASON) + }, + fieldName: 'faultReason', + label: '鏁呴殰鍘熷洜' + }, + { + component: 'Textarea', + formItemClass: 'items-baseline', + fieldName: 'reqDesc', + label: '鎶ヤ慨鎻忚堪' + }, + { + component: 'Textarea', + formItemClass: 'items-baseline', + fieldName: 'resHandle', + label: '澶勭悊鎺柦' + } +]; -- Gitblit v1.9.3