([
{
- label: '维修工角色编号',
+ label: '维修工角色',
field: 'workerRoleId',
sort: 'custom',
+ isForm: false,
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return roleList.find((item) => item.id == cellValue)?.name
+ },
+ },
+ {
+ label: '维修工角色',
+ field: 'workerRoleName',
+ sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@@ -80,13 +89,22 @@ export const ClassType = useCrudSchemas(reactive([
]
}
},
+ isDetail: false,
+ isTable: false,
+ isTableForm: false,
+ },
+ {
+ label: '工程师角色',
+ field: 'engineerRoleId',
+ sort: 'custom',
+ isForm: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
- return roleList.find((item) => item.id == cellValue)?.name
+ return roleList.find((account) => account.id == cellValue)?.name
},
},
{
- label: '工程师角色编号',
- field: 'engineerRoleId',
+ label: '工程师角色',
+ field: 'engineerRoleName',
sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
@@ -106,9 +124,9 @@ export const ClassType = useCrudSchemas(reactive([
]
}
},
- formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
- return roleList.find((account) => account.id == cellValue)?.name
- },
+ isDetail: false,
+ isTable: false,
+ isTableForm: false,
},
{
label: '班组类型',
@@ -127,10 +145,11 @@ export const ClassType = useCrudSchemas(reactive([
sort: 'custom',
},
{
- label: '所属厂区编号',
+ label: '所属厂区',
field: 'factoryAreaNumber',
isSearch: true,
sort: 'custom',
+ isForm: false,
search: {
show: true,
component: 'Select',
@@ -143,6 +162,16 @@ export const ClassType = useCrudSchemas(reactive([
filterable: true,
}
},
+ //给列表用的
+ formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name
+ },
+ },
+ {
+ label: '所属厂区',
+ field: 'factoryAreaName',
+ isSearch: true,
+ sort: 'custom',
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
@@ -161,10 +190,9 @@ export const ClassType = useCrudSchemas(reactive([
]
}
},
- //给列表用的
- formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
- return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name
- },
+ isDetail: false,
+ isTable: false,
+ isTableForm: false,
},
{
label: '创建时间',
diff --git a/src/views/eam/basic/classType/index.vue b/src/views/eam/basic/classType/index.vue
index d8c3521..c94e73a 100644
--- a/src/views/eam/basic/classType/index.vue
+++ b/src/views/eam/basic/classType/index.vue
@@ -80,7 +80,18 @@ const tableColumns = ref(ClassType.allSchemas.tableColumns)
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
- setV[formField] = val[0][searchField]
+ if (formField == 'workerRoleName') {
+ setV['workerRoleId'] = val[0][searchField]
+ setV['workerRoleName'] = val[0]['name']
+ } else if (formField == 'engineerRoleName') {
+ setV['engineerRoleId'] = val[0][searchField]
+ setV['engineerRoleName'] = val[0]['name']
+ } else if (formField == 'factoryAreaName') {
+ setV['factoryAreaNumber'] = val[0][searchField]
+ setV['factoryAreaName'] = val[0]['name']
+ } else {
+ setV[formField] = val[0][searchField]
+ }
formRef.setValues(setV)
})
}
diff --git a/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts b/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
index c4ecebc..18eca4c 100644
--- a/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
+++ b/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts
@@ -278,31 +278,31 @@ export const DeviceInternalAudit = useCrudSchemas(reactive([
sort: 'custom',
isSearch: false,
},
- {
- label: '是否可用',
- field: 'available',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string',
- isSearch: false,
- isTable: true,
- sort: 'custom',
- table: {
- width: 150
- },
- tableForm: {
- type: 'Select',
- inactiveValue: 'FALSE',
- disabled: true
- },
- form: {
- component: 'Switch',
- value: 'TRUE',
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE'
- }
- }
- },
+ // {
+ // label: '是否可用',
+ // field: 'available',
+ // dictType: DICT_TYPE.TRUE_FALSE,
+ // dictClass: 'string',
+ // isSearch: false,
+ // isTable: true,
+ // sort: 'custom',
+ // table: {
+ // width: 150
+ // },
+ // tableForm: {
+ // type: 'Select',
+ // inactiveValue: 'FALSE',
+ // disabled: true
+ // },
+ // form: {
+ // component: 'Switch',
+ // value: 'TRUE',
+ // componentProps: {
+ // inactiveValue: 'FALSE',
+ // activeValue: 'TRUE'
+ // }
+ // }
+ // },
{
label: '创建时间',
field: 'createTime',
diff --git a/src/views/eam/device/deviceInternalAudit/index.vue b/src/views/eam/device/deviceInternalAudit/index.vue
index 64f9355..1da3997 100644
--- a/src/views/eam/device/deviceInternalAudit/index.vue
+++ b/src/views/eam/device/deviceInternalAudit/index.vue
@@ -54,7 +54,15 @@
-
+