diff --git a/src/utils/dict.ts b/src/utils/dict.ts index dabd5d4..2763fb5 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -272,4 +272,5 @@ export enum DICT_TYPE { LABEL_STATUS = 'label_status', // 标签状态 BIND_TYPE = 'bind_type', // 器具绑定类型 CONTAINER_STATUS = 'container_status', // 容器状态 + LOCATION_AREA_TYPE = 'location_area_type', // 库区类型 } diff --git a/src/views/eam/basic/factoryArea/factoryArea.data.ts b/src/views/eam/basic/factoryArea/factoryArea.data.ts index 562ac2d..d5f901e 100644 --- a/src/views/eam/basic/factoryArea/factoryArea.data.ts +++ b/src/views/eam/basic/factoryArea/factoryArea.data.ts @@ -14,6 +14,11 @@ export const FactoryArea = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, + isForm: false, + table: { + width: 180, + fixed: 'left' + }, }, { label: '名称', @@ -21,12 +26,7 @@ export const FactoryArea = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, - { - label: '是否可用', - field: 'available', - sort: 'custom', - isSearch: true, - }, + { label: '负责人', @@ -40,6 +40,31 @@ export const FactoryArea = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + 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: 'description', @@ -57,4 +82,4 @@ export const FactoryArea = useCrudSchemas(reactive([ fixed: 'right' } } -])) +])) \ No newline at end of file diff --git a/src/views/eam/basic/factoryArea/index.vue b/src/views/eam/basic/factoryArea/index.vue index f5c6964..267e449 100644 --- a/src/views/eam/basic/factoryArea/index.vue +++ b/src/views/eam/basic/factoryArea/index.vue @@ -53,8 +53,7 @@ - - +