From f48cbf6529686b943c55d4a89c00cfe29179bb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Mon, 8 Jul 2024 11:04:49 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentMainPart.data.ts | 274 +++++++++--------- src/views/eam/itemAccounts/index.vue | 44 ++- .../SparePartsApply.data.ts | 3 +- src/views/eam/sparePartsApplyMain/index.vue | 10 +- 4 files changed, 176 insertions(+), 155 deletions(-) diff --git a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts index ed90c0233..04decb155 100644 --- a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts +++ b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts @@ -5,148 +5,150 @@ import { dateFormatter } from '@/utils/formatTime' export const EquipmentMainPartRules = reactive({ name: [required], code: [required], - type: [required], + type: [required] }) -export const EquipmentMainPart = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '编码', - field: 'code', - sort: 'custom', - isSearch: true, - }, - { - label: '名称', - field: 'name', - sort: 'custom', - isSearch: true, - }, - { - label: '类型', - field: 'type', - sort: 'custom', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'Select' - } - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } +export const EquipmentMainPart = useCrudSchemas( + reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true }, - isForm: false, - }, - { - label: '部门id', - field: 'departmentCode', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - isSearch: false, - }, - { - label: '地点ID', - field: 'siteId', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '是否启用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: true, - isDetail: false, - isSearch: false, - isTableForm: false, - isForm: false, - }, - { - label: '删除时间', - field: 'deletionTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' } }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + { + label: '部门id', + field: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } } }, - }, - { - label: '删除人id', - field: 'deleterId', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - form: { - component: 'InputNumber', - value: 0 + { + label: '删除人id', + field: 'deleterId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false }, - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } } - } -])) + ]) +) diff --git a/src/views/eam/itemAccounts/index.vue b/src/views/eam/itemAccounts/index.vue index 2369ba9cb..3e8f617a3 100644 --- a/src/views/eam/itemAccounts/index.vue +++ b/src/views/eam/itemAccounts/index.vue @@ -31,9 +31,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -