|
|
@ -3,6 +3,7 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import * as deptApi from '@/api/system/dept' |
|
|
|
import * as roleApi from '@/api/system/role' |
|
|
|
import { Role } from '@/views/system/role/role.data' |
|
|
|
import { selectAllFactoryArea } from '@/api/system/dept' |
|
|
|
// 表单校验
|
|
|
|
export const ClassTypeRules = reactive({ |
|
|
|
workerRoleId: [required], |
|
|
@ -12,6 +13,7 @@ export const ClassTypeRules = reactive({ |
|
|
|
}) |
|
|
|
const FactoryAreaNoPage = await deptApi.getDeptPage({'deptGroup':'factory'}) |
|
|
|
const roleList = await roleApi.getSimpleRoleList({}) |
|
|
|
const factoryList = await selectAllFactoryArea() |
|
|
|
console.log('FactoryAreaNoPage',FactoryAreaNoPage); |
|
|
|
console.log('roleList',roleList); |
|
|
|
|
|
|
@ -51,7 +53,7 @@ console.log('roleList',roleList); |
|
|
|
])) |
|
|
|
export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '维修工角色id', |
|
|
|
label: '维修工角色', |
|
|
|
field: 'workerRoleId', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
@ -77,7 +79,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '工程师角色id', |
|
|
|
label: '工程师角色', |
|
|
|
field: 'engineerRoleId', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
@ -123,6 +125,18 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'factoryAreaNumber', |
|
|
|
isSearch: true, |
|
|
|
sort: 'custom', |
|
|
|
search: { |
|
|
|
show: true, |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryList, |
|
|
|
componentProps: { |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|