panelDetail.ts
1.13 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
import { getOrganizationList } from '/@/api/system/system';
import { FormSchema } from '/@/components/Form';
import { copyTransFun } from '/@/utils/fnUtils';
export enum ViewType {
PRIVATE_VIEW = 'PRIVATE_VIEW',
PUBLIC_VIEW = 'PUBLIC_VIEW',
}
export const formSchema: FormSchema[] = [
{
field: 'name',
label: '名称',
component: 'Input',
rules: [{ required: true, message: '请输入看板名称' }],
componentProps: {
placeholder: '请输入看板名称',
maxLength: 32,
},
},
{
field: 'organizationId',
component: 'ApiTreeSelect',
label: '组织',
rules: [{ required: true, message: '组织为必填项' }],
componentProps() {
return {
placeholder: '请选择组织',
api: async () => {
const data = await getOrganizationList();
copyTransFun(data as any as any[]);
return data;
},
getPopupContainer: () => document.body,
};
},
},
{
field: 'remark',
label: '备注',
component: 'InputTextArea',
componentProps: {
placeholder: '请输入看板备注',
maxLength: 255,
},
},
];