config.d.ts
2.73 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import { BasicColumn, FormSchema } from '/@/components/Table';
import { Tinymce } from '/@/components/Tinymce/index';
import { h } from 'vue';
export const columns: BasicColumn[] = [
{
title: '类型',
dataIndex: 'type',
width: 200,
format: (text: string, record: Recordable) => {
return record.type === 'MEETING'
? '公告'
: record.type === 'MEETING1'
? '会议'
: record.type === 'MEETING2'
? '其他'
: '';
},
},
{
title: '标题',
dataIndex: 'title',
width: 200,
},
{
title: '内容',
dataIndex: 'content',
width: 120,
},
{
title: '发送者',
dataIndex: 'senderName',
width: 200,
},
{
title: '状态',
dataIndex: 'status',
width: 200,
format: (text: string, record: Recordable) => {
return record.status == 0
? '草稿'
: record.type == 1
? '已发'
: record.type == 2
? '其他'
: '其他';
},
},
];
export const formSchema: FormSchema[] = [
{
field: 'type',
label: '类型',
colProps: { span: 24 },
required: true,
component: 'RadioGroup',
componentProps: {
options: [
{
label: '公告',
value: '1',
},
{
label: '会议',
value: '2',
},
{
label: '其他',
value: '3',
},
],
},
},
{
field: 'title',
label: '标题',
required: true,
colProps: { span: 24 },
component: 'Input',
componentProps: {
placeholder: '请输入标题',
},
},
{
field: 'content',
component: 'Input',
colProps: { span: 24 },
label: '内容',
defaultValue: '请输入内容',
rules: [{ required: true }],
render: ({ model, field }) => {
return h(Tinymce, {
value: model[field],
onChange: (value: string) => {
model[field] = value;
},
});
},
},
{
field: 'receiverTypeIds',
label: '接收者',
colProps: { span: 24 },
component: 'RadioGroup',
componentProps: {
options: [
{
label: '全部',
value: '1',
},
{
label: '部门',
value: '2',
},
],
},
},
{
field: '',
component: 'Input',
label: '',
colProps: {
span: 12,
},
slot: 'add',
},
];
export const searchFormSchema: FormSchema[] = [
{
field: 'orderField',
label: '',
colProps: { span: 8 },
component: 'ApiSelect',
componentProps: {
// api: async () => {
// const data = await screenLinkOrganizationGetApi();
// copyTransFun(data as any as any[]);
// return data;
// },
},
},
];