diff --git a/src/views/eam/basic/inspection/inspection.data.ts b/src/views/eam/basic/inspection/inspection.data.ts index 39125a3..5176616 100644 --- a/src/views/eam/basic/inspection/inspection.data.ts +++ b/src/views/eam/basic/inspection/inspection.data.ts @@ -202,3 +202,100 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ } } ])) + +export const DeviceMoldItemsTwo = useCrudSchemas(reactive([ + { + label: '巡检点检项', + field: 'name', + sort: 'custom', + isSearch: true, + form: { + componentProps: { + type: 'textarea', + } + } + }, + { + label: '类型', + field: 'type', + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: false, + form: { + value: 'DEVICE', + componentProps: { + disabled: true, + } + } + }, + { + label: '项类型', + field: 'status', + dictType: DICT_TYPE.DEVICEMOLDITEMS_STATUS, + dictClass: 'string', + sort: 'custom', + isSearch: false, + form: { + component: 'Select', + value: 'INSPECTION', + componentProps: { + disabled: true + } + }, + }, + + { + label: '模具部位', + field: 'equipmentParts', + sort: 'custom', + isSearch: true, + }, + + { + label: '记录是否必填', + field: 'numberNeedSwitch', + sort: 'custom', + isSearch: false, + formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { + return trueOrFalse.find((account) => account.value == cellValue)?.label + }, + form: { + component: 'Switch', + value: false, + } + }, + + { + label: '是否点检', + field: 'needInspection', + sort: 'custom', + isSearch: false, + formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { + return trueOrFalse.find((account) => account.value == cellValue)?.label + }, + form: { + component: 'Switch', + value: false, + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + }, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/eam/basic/moldInspectionConfig/index.vue b/src/views/eam/basic/moldInspectionConfig/index.vue index bd2c01a..38bda35 100644 --- a/src/views/eam/basic/moldInspectionConfig/index.vue +++ b/src/views/eam/basic/moldInspectionConfig/index.vue @@ -99,7 +99,7 @@ import { SearchTable } from '@/components/SearchTable' import * as DeviceInspectionApi from '@/api/eam/basic/inspection' // import { DeviceAccounts } from '@/views/eam/device/deviceAccounts/deviceAccounts.data' // import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' -import {DeviceMoldItems} from '@/views/eam/basic/inspection/inspection.data' +import {DeviceMoldItems, DeviceMoldItemsTwo} from '@/views/eam/basic/inspection/inspection.data' defineOptions({ name: 'moldInspectionConfig' }) @@ -347,10 +347,10 @@ const searchTableRef = ref() const openFormNewFuction = ()=>{ searchTableRef.value.open( '选择模具巡检点检项', - DeviceMoldItems.allSchemas, + DeviceMoldItemsTwo.allSchemas, DeviceInspectionApi.getMoldItemsPage, null, - DeviceMoldItems.allSchemas.searchSchema, + DeviceMoldItemsTwo.allSchemas.searchSchema, true, null, null, diff --git a/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts b/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts index 98a759e..a9aea10 100644 --- a/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts +++ b/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts @@ -1,7 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' import * as DeviceMoldItemsApi from '@/api/eam/basic/inspection' -import {DeviceMoldItems} from '@/views/eam/basic/inspection/inspection.data' +import {DeviceMoldItemsTwo} from '@/views/eam/basic/inspection/inspection.data' // 表单校验 export const DeviceInspectionConfigRules = reactive({ @@ -133,7 +133,7 @@ export const DeviceInspectionTwo = useCrudSchemas(reactive([ searchListPlaceholder: '请选择模具保养项', // 输入框占位文本 searchField: 'name', // 查询弹窗赋值字段 searchTitle: '模具巡检点检项信息', // 查询弹窗标题 - searchAllSchemas: DeviceMoldItems.allSchemas, // 查询弹窗所需类 + searchAllSchemas: DeviceMoldItemsTwo.allSchemas, // 查询弹窗所需类 searchPage: DeviceMoldItemsApi.getMoldItemsPage, // 查询弹窗所需分页方法 searchCondition: [ { @@ -155,7 +155,7 @@ export const DeviceInspectionTwo = useCrudSchemas(reactive([ searchListPlaceholder: '请选择模具保养项', searchField: 'name', searchTitle: '模具巡检点检项信息', - searchAllSchemas: DeviceMoldItems.allSchemas, // 查询弹窗所需类 + searchAllSchemas: DeviceMoldItemsTwo.allSchemas, // 查询弹窗所需类 searchPage: DeviceMoldItemsApi.getMoldItemsPage, // 查询弹窗所需分页方法 searchCondition: [ {