1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
| import { FormSchema } from '/@/components/Table';
| import { useGlobSetting } from '/@/hooks/setting';
|
| const globSetting = useGlobSetting();
| export const accountFormSchema: FormSchema[] = [
| {
| field: 'dept',
| label: '',
| component: 'TreeSelect',
| componentProps: {
| fieldNames: {
| label: 'deptName',
| key: 'id',
| value: 'deptCode',
| },
| placeholder: globSetting.useOrg == 'true' ? '请选择据点' : '请选择工厂',
| getPopupContainer: () => document.body,
| },
| rules: [
| {
| required: true,
| // @ts-ignore
| validator: async (rule, value) => {
| if (!value) {
| /* eslint-disable-next-line */
| return Promise.reject('请选择据点');
| }
| return Promise.resolve();
| },
| trigger: 'change',
| },
| ],
| },
| ];
|
|