|
@ -4,6 +4,7 @@ import * as deptApi from '@/api/system/dept' |
|
|
import * as roleApi from '@/api/system/role' |
|
|
import * as roleApi from '@/api/system/role' |
|
|
import { Role } from '@/views/system/role/role.data' |
|
|
import { Role } from '@/views/system/role/role.data' |
|
|
import { selectAllFactoryArea } from '@/api/system/dept' |
|
|
import { selectAllFactoryArea } from '@/api/system/dept' |
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const ClassTypeRules = reactive({ |
|
|
export const ClassTypeRules = reactive({ |
|
|
workerRoleId: [required], |
|
|
workerRoleId: [required], |
|
@ -11,9 +12,14 @@ export const ClassTypeRules = reactive({ |
|
|
type: [required], |
|
|
type: [required], |
|
|
factoryAreaNumber: [required], |
|
|
factoryAreaNumber: [required], |
|
|
}) |
|
|
}) |
|
|
|
|
|
const userStore = useUserStore() |
|
|
const FactoryAreaNoPage = await deptApi.getDeptPage({'deptGroup':'factory'}) |
|
|
const FactoryAreaNoPage = await deptApi.getDeptPage({'deptGroup':'factory'}) |
|
|
const roleList = await roleApi.getSimpleRoleList({}) |
|
|
const roleList = await roleApi.getSimpleRoleList({}) |
|
|
const factoryList = await selectAllFactoryArea() |
|
|
const factoryList = await selectAllFactoryArea() |
|
|
|
|
|
// 假设你想添加一个新的工厂区域
|
|
|
|
|
|
// const factoryList = [...factoryListResult, {
|
|
|
|
|
|
// ...userStore.userSelfInfo.dept
|
|
|
|
|
|
// }]
|
|
|
console.log('FactoryAreaNoPage',FactoryAreaNoPage); |
|
|
console.log('FactoryAreaNoPage',FactoryAreaNoPage); |
|
|
console.log('roleList',roleList); |
|
|
console.log('roleList',roleList); |
|
|
|
|
|
|
|
@ -53,7 +59,7 @@ console.log('roleList',roleList); |
|
|
])) |
|
|
])) |
|
|
export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
{ |
|
|
{ |
|
|
label: '维修工角色', |
|
|
label: '维修工角色编号', |
|
|
field: 'workerRoleId', |
|
|
field: 'workerRoleId', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
form: { |
|
|
form: { |
|
@ -79,7 +85,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '工程师角色', |
|
|
label: '工程师角色编号', |
|
|
field: 'engineerRoleId', |
|
|
field: 'engineerRoleId', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
form: { |
|
|
form: { |
|
@ -121,7 +127,7 @@ export const ClassType = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '所属厂区', |
|
|
label: '所属厂区编号', |
|
|
field: 'factoryAreaNumber', |
|
|
field: 'factoryAreaNumber', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|