@jeecg/online 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AuthButtonConfig.js +140 -0
- package/AuthButtonTree.js +183 -0
- package/AuthDataConfig.js +243 -0
- package/AuthDataTree.js +160 -0
- package/AuthFieldConfig.js +167 -0
- package/AuthFieldTree.js +273 -0
- package/AuthManagerDrawer.js +125 -0
- package/AuthSetterModal.js +317 -0
- package/CgformCopyList.js +253 -0
- package/CgformModal.js +748 -0
- package/CgreportModal.js +673 -0
- package/ChartAutoRender.js +69 -0
- package/ChartDoubleRender.js +154 -0
- package/ChartSingleRender.js +132 -0
- package/ChartTabsRender.js +218 -0
- package/CheckDictTable.js +121 -0
- package/CodeGeneratorModal.js +293 -0
- package/CustomButtonList.js +413 -0
- package/DBAttributeTable.js +278 -0
- package/DbToOnlineModal.js +190 -0
- package/EnhanceJavaModal.js +304 -0
- package/EnhanceJsHistory.js +231 -0
- package/EnhanceJsModal.js +293 -0
- package/EnhanceSqlModal.js +305 -0
- package/ErrorTip.js +21 -0
- package/ExtendConfigModal.js +142 -0
- package/FieldTable.js +185 -0
- package/FileSelectModal.js +102 -0
- package/ForeignKeyTable.js +78 -0
- package/FormSchemaFactory.js +938 -0
- package/GraphreportAutoChart.js +352 -0
- package/GraphreportList.js +239 -0
- package/GraphreportModal.js +559 -0
- package/IndexTable.js +96 -0
- package/JOnlineSearchSelect.js +107 -0
- package/LICENSE +7 -0
- package/LeftDepart.js +96 -0
- package/LeftRole.js +95 -0
- package/LeftUser.js +114 -0
- package/ModalFormDemo.js +84 -0
- package/OnlineAutoList.js +410 -0
- package/OnlineAutoModal.js +265 -0
- package/OnlineAutoTreeList.js +513 -0
- package/OnlineCustomModal.js +269 -0
- package/OnlineForm.js +809 -0
- package/OnlineQueryForm.js +442 -0
- package/OnlineSearchFormItem.js +428 -0
- package/OnlineSelectCascade.js +217 -0
- package/OnlineSubForm.js +200 -0
- package/OnlineSuperQuery.js +912 -0
- package/OnlineSuperQueryValComponent.js +8 -0
- package/OnlineSuperQueryValComponent.vue_vue_type_script_lang.js +172 -0
- package/PageAttributeTable.js +242 -0
- package/ParamsTable.js +71 -0
- package/ProcessOnlineForm.js +183 -0
- package/QueryTable.js +128 -0
- package/README.md +23 -0
- package/_arrayPush.js +276 -0
- package/auth.api.js +43 -0
- package/auth.data.js +144 -0
- package/cgform.data.js +235 -0
- package/cloneDeep.js +475 -0
- package/enhance.api.js +120 -0
- package/enhance.data.js +196 -0
- package/graphreport.api.js +23 -0
- package/index.js +64 -0
- package/index2.js +336 -0
- package/index3.js +799 -0
- package/isArray.js +47 -0
- package/main.index.js +6 -0
- package/package.json +6 -0
- package/pick.js +238 -0
- package/style.css +1 -0
- package/toString.js +31 -0
- package/useAutoForm.js +4274 -0
- package/useCgformList.js +353 -0
- package/useChartRender.js +405 -0
- package/useMessageOnline.js +71 -0
- package/useOnlineTest.js +26866 -0
- package/useSchemas.js +505 -0
- package/useTableColumns.js +1154 -0
- package/useTableSync.js +105 -0
package/useSchemas.js
ADDED
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
import { computed, h } from "vue";
|
|
2
|
+
import { Input, Button } from "ant-design-vue";
|
|
3
|
+
import { FolderOpenOutlined } from "@ant-design/icons-vue";
|
|
4
|
+
import { bindMapFormSchema } from "/@/utils/common/compUtils";
|
|
5
|
+
function useFormSchemas(_props, handlers) {
|
|
6
|
+
const mapFormSchema = bindMapFormSchema({
|
|
7
|
+
one: {
|
|
8
|
+
colProps: { xs: 24, sm: 24 },
|
|
9
|
+
itemProps: {
|
|
10
|
+
labelCol: { xs: 24, sm: 2 },
|
|
11
|
+
wrapperCol: { xs: 24, sm: 22 }
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
tow: {
|
|
15
|
+
colProps: { xs: 24, sm: 12 },
|
|
16
|
+
itemProps: {
|
|
17
|
+
labelCol: { xs: 24, sm: 4 },
|
|
18
|
+
wrapperCol: { xs: 24, sm: 20 }
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
three: {
|
|
22
|
+
colProps: { xs: 24, sm: 8 },
|
|
23
|
+
itemProps: {
|
|
24
|
+
labelCol: { xs: 24, sm: 6 },
|
|
25
|
+
wrapperCol: { xs: 24, sm: 18 }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, "three");
|
|
29
|
+
const formSchemas = [
|
|
30
|
+
{ label: "", field: "id", component: "Input", show: false },
|
|
31
|
+
{ label: "", field: "tableVersion", component: "Input", show: false },
|
|
32
|
+
mapFormSchema({
|
|
33
|
+
label: "\u8868\u540D",
|
|
34
|
+
field: "tableName",
|
|
35
|
+
component: "Input",
|
|
36
|
+
required: true,
|
|
37
|
+
dynamicDisabled: ({ model }) => model.tableVersion && model.tableVersion != 1
|
|
38
|
+
}),
|
|
39
|
+
mapFormSchema({
|
|
40
|
+
label: "\u8868\u63CF\u8FF0",
|
|
41
|
+
field: "tableTxt",
|
|
42
|
+
component: "Input",
|
|
43
|
+
required: true
|
|
44
|
+
}),
|
|
45
|
+
mapFormSchema({
|
|
46
|
+
label: "\u8868\u7C7B\u578B",
|
|
47
|
+
field: "tableType",
|
|
48
|
+
component: "Select",
|
|
49
|
+
defaultValue: 1,
|
|
50
|
+
componentProps: {
|
|
51
|
+
options: [
|
|
52
|
+
{ label: "\u5355\u8868", value: 1 },
|
|
53
|
+
{ label: "\u4E3B\u8868", value: 2 },
|
|
54
|
+
{ label: "\u9644\u8868", value: 3 }
|
|
55
|
+
],
|
|
56
|
+
onChange: handlers.onTableTypeChange
|
|
57
|
+
}
|
|
58
|
+
}),
|
|
59
|
+
{
|
|
60
|
+
label: "",
|
|
61
|
+
field: "relationType",
|
|
62
|
+
component: "InputNumber",
|
|
63
|
+
render: () => "",
|
|
64
|
+
colProps: { xs: 0, sm: 17 },
|
|
65
|
+
ifShow: fieldIfShow
|
|
66
|
+
},
|
|
67
|
+
mapFormSchema({
|
|
68
|
+
label: "",
|
|
69
|
+
field: "relationType",
|
|
70
|
+
component: "RadioGroup",
|
|
71
|
+
defaultValue: 0,
|
|
72
|
+
componentProps: {
|
|
73
|
+
options: [
|
|
74
|
+
{ label: "\u4E00\u5BF9\u591A", value: 0 },
|
|
75
|
+
{ label: "\u4E00\u5BF9\u4E00", value: 1 }
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
colProps: { xs: 24, sm: 4 },
|
|
79
|
+
itemProps: {
|
|
80
|
+
colon: false,
|
|
81
|
+
labelCol: { xs: 0, sm: 0 },
|
|
82
|
+
wrapperCol: { xs: 24, sm: 24 }
|
|
83
|
+
},
|
|
84
|
+
ifShow: fieldIfShow
|
|
85
|
+
}),
|
|
86
|
+
mapFormSchema({
|
|
87
|
+
label: "\u5E8F\u53F7",
|
|
88
|
+
field: "tabOrderNum",
|
|
89
|
+
component: "InputNumber",
|
|
90
|
+
componentProps: {
|
|
91
|
+
style: {
|
|
92
|
+
width: "100%"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
colProps: { xs: 24, sm: 3 },
|
|
96
|
+
itemProps: {
|
|
97
|
+
labelCol: { xs: 24, sm: 7 },
|
|
98
|
+
wrapperCol: { xs: 24, sm: 24 - 7 }
|
|
99
|
+
},
|
|
100
|
+
ifShow: fieldIfShow
|
|
101
|
+
}),
|
|
102
|
+
mapFormSchema({
|
|
103
|
+
label: "\u8868\u5355\u5206\u7C7B",
|
|
104
|
+
field: "formCategory",
|
|
105
|
+
component: "JDictSelectTag",
|
|
106
|
+
defaultValue: "temp",
|
|
107
|
+
componentProps: {
|
|
108
|
+
dictCode: "ol_form_biz_type"
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
mapFormSchema({
|
|
112
|
+
label: "\u4E3B\u952E\u7B56\u7565",
|
|
113
|
+
field: "idType",
|
|
114
|
+
component: "Select",
|
|
115
|
+
defaultValue: "UUID",
|
|
116
|
+
componentProps: {
|
|
117
|
+
options: [
|
|
118
|
+
{ label: "ID_WORKER(\u5206\u5E03\u5F0F\u81EA\u589E)", value: "UUID" }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}),
|
|
122
|
+
mapFormSchema({
|
|
123
|
+
label: "\u5E8F\u53F7\u540D\u79F0",
|
|
124
|
+
field: "idSequence",
|
|
125
|
+
component: "Input",
|
|
126
|
+
componentProps: {},
|
|
127
|
+
ifShow: fieldIfShow
|
|
128
|
+
}),
|
|
129
|
+
mapFormSchema({
|
|
130
|
+
label: "\u663E\u793A\u590D\u9009\u6846",
|
|
131
|
+
field: "isCheckbox",
|
|
132
|
+
component: "Select",
|
|
133
|
+
defaultValue: "Y",
|
|
134
|
+
componentProps: {
|
|
135
|
+
options: [
|
|
136
|
+
{ label: "\u662F", value: "Y" },
|
|
137
|
+
{ label: "\u5426", value: "N" }
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}),
|
|
141
|
+
mapFormSchema({
|
|
142
|
+
label: "\u4E3B\u9898\u6A21\u677F",
|
|
143
|
+
field: "themeTemplate",
|
|
144
|
+
component: "Select",
|
|
145
|
+
defaultValue: "normal",
|
|
146
|
+
componentProps: {
|
|
147
|
+
options: [
|
|
148
|
+
{ label: "\u9ED8\u8BA4\u4E3B\u9898", value: "normal" },
|
|
149
|
+
{ label: "ERP\u4E3B\u9898(\u4E00\u5BF9\u591A)", value: "erp" },
|
|
150
|
+
{ label: "\u5185\u5D4C\u5B50\u8868\u4E3B\u9898(\u4E00\u5BF9\u591A)", value: "innerTable" },
|
|
151
|
+
{ label: "TAB\u4E3B\u9898(\u4E00\u5BF9\u591A)", value: "tab" }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
dynamicDisabled: ({ model }) => model.tableType === 1
|
|
155
|
+
}),
|
|
156
|
+
mapFormSchema({
|
|
157
|
+
label: "\u8868\u5355\u98CE\u683C",
|
|
158
|
+
field: "formTemplate",
|
|
159
|
+
component: "Select",
|
|
160
|
+
defaultValue: "1",
|
|
161
|
+
componentProps: {
|
|
162
|
+
options: [
|
|
163
|
+
{ label: "\u4E00\u5217", value: "1" },
|
|
164
|
+
{ label: "\u4E24\u5217", value: "2" },
|
|
165
|
+
{ label: "\u4E09\u5217", value: "3" },
|
|
166
|
+
{ label: "\u56DB\u5217", value: "4" }
|
|
167
|
+
],
|
|
168
|
+
placeholder: "\u8BF7\u9009\u62E9PC\u8868\u5355\u98CE\u683C"
|
|
169
|
+
}
|
|
170
|
+
}),
|
|
171
|
+
mapFormSchema({
|
|
172
|
+
label: "\u79FB\u52A8\u8868\u5355\u98CE\u683C",
|
|
173
|
+
field: "formTemplateMobile",
|
|
174
|
+
component: "Select",
|
|
175
|
+
defaultValue: "1",
|
|
176
|
+
componentProps: {
|
|
177
|
+
options: [
|
|
178
|
+
{ label: "AntDesign\u6A21\u677F", value: "1" },
|
|
179
|
+
{ label: "Bootstrap\u6A21\u677F", value: "2" }
|
|
180
|
+
],
|
|
181
|
+
placeholder: "\u8BF7\u9009\u62E9\u79FB\u52A8\u8868\u5355\u98CE\u683C"
|
|
182
|
+
},
|
|
183
|
+
ifShow: false
|
|
184
|
+
}),
|
|
185
|
+
mapFormSchema({
|
|
186
|
+
label: "\u6EDA\u52A8\u6761",
|
|
187
|
+
field: "scroll",
|
|
188
|
+
component: "Select",
|
|
189
|
+
defaultValue: 1,
|
|
190
|
+
componentProps: {
|
|
191
|
+
options: [
|
|
192
|
+
{ label: "\u6709", value: 1 },
|
|
193
|
+
{ label: "\u65E0", value: 0 }
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
}),
|
|
197
|
+
mapFormSchema({
|
|
198
|
+
label: "\u662F\u5426\u5206\u9875",
|
|
199
|
+
field: "isPage",
|
|
200
|
+
component: "Select",
|
|
201
|
+
defaultValue: "Y",
|
|
202
|
+
componentProps: {
|
|
203
|
+
options: [
|
|
204
|
+
{ label: "\u662F", value: "Y" },
|
|
205
|
+
{ label: "\u5426", value: "N" }
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
}),
|
|
209
|
+
mapFormSchema({
|
|
210
|
+
label: "\u662F\u5426\u6811",
|
|
211
|
+
field: "isTree",
|
|
212
|
+
component: "Select",
|
|
213
|
+
defaultValue: "N",
|
|
214
|
+
componentProps: {
|
|
215
|
+
options: [
|
|
216
|
+
{ label: "\u662F", value: "Y" },
|
|
217
|
+
{ label: "\u5426", value: "N" }
|
|
218
|
+
],
|
|
219
|
+
onChange: handlers.onIsTreeChange
|
|
220
|
+
},
|
|
221
|
+
dynamicRules({ model }) {
|
|
222
|
+
return [
|
|
223
|
+
{
|
|
224
|
+
validator({}, value) {
|
|
225
|
+
if (value === "Y" && (model.tableType == 2 || model.tableType == 3)) {
|
|
226
|
+
return Promise.reject("\u4E3B\u8868\u548C\u9644\u8868\u4E0D\u652F\u6301\u6811\u7C7B\u578B\uFF01");
|
|
227
|
+
}
|
|
228
|
+
return Promise.resolve();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
}),
|
|
234
|
+
mapFormSchema({
|
|
235
|
+
label: " ",
|
|
236
|
+
field: "extConfigJson",
|
|
237
|
+
component: "Input",
|
|
238
|
+
slot: "extConfigButton",
|
|
239
|
+
itemProps: { colon: false }
|
|
240
|
+
}),
|
|
241
|
+
mapFormSchema({
|
|
242
|
+
label: "\u6811\u8868\u5355\u7236ID",
|
|
243
|
+
field: "treeParentIdField",
|
|
244
|
+
component: "Input",
|
|
245
|
+
ifShow: fieldIfShow
|
|
246
|
+
}),
|
|
247
|
+
mapFormSchema({
|
|
248
|
+
label: "\u662F\u5426\u6709\u5B50\u8282\u70B9\u5B57\u6BB5",
|
|
249
|
+
field: "treeIdField",
|
|
250
|
+
component: "Input",
|
|
251
|
+
show: false
|
|
252
|
+
}),
|
|
253
|
+
mapFormSchema({
|
|
254
|
+
label: "\u6811\u5F00\u8868\u5355\u5217",
|
|
255
|
+
field: "treeFieldname",
|
|
256
|
+
required: true,
|
|
257
|
+
component: "Input",
|
|
258
|
+
ifShow: fieldIfShow
|
|
259
|
+
}),
|
|
260
|
+
mapFormSchema({
|
|
261
|
+
label: "\u9644\u8868",
|
|
262
|
+
field: "subTableStr",
|
|
263
|
+
component: "Input",
|
|
264
|
+
componentProps: {
|
|
265
|
+
disabled: true,
|
|
266
|
+
placeholder: " ",
|
|
267
|
+
allowClear: false
|
|
268
|
+
},
|
|
269
|
+
ifShow: handlers.ifShowOfSubTableStr
|
|
270
|
+
}, "one")
|
|
271
|
+
];
|
|
272
|
+
function fieldIfShow({ field, model }) {
|
|
273
|
+
switch (field) {
|
|
274
|
+
case "relationType":
|
|
275
|
+
case "tabOrderNum":
|
|
276
|
+
return model.tableType === 3;
|
|
277
|
+
case "treeParentIdField":
|
|
278
|
+
case "treeIdField":
|
|
279
|
+
case "treeFieldname":
|
|
280
|
+
return model.isTree === "Y";
|
|
281
|
+
case "idSequence":
|
|
282
|
+
return model.idType === "SEQUENCE";
|
|
283
|
+
}
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
return { formSchemas };
|
|
287
|
+
}
|
|
288
|
+
function useExtendConfigFormSchemas(_props, handlers) {
|
|
289
|
+
const mapFormSchema = bindMapFormSchema({
|
|
290
|
+
left: {
|
|
291
|
+
colProps: { xs: 24, sm: 7 },
|
|
292
|
+
itemProps: {
|
|
293
|
+
labelCol: { xs: 24, sm: 11 },
|
|
294
|
+
wrapperCol: { xs: 24, sm: 13 }
|
|
295
|
+
},
|
|
296
|
+
style: { width: "100%" }
|
|
297
|
+
},
|
|
298
|
+
right: {
|
|
299
|
+
colProps: { xs: 24, sm: 17 },
|
|
300
|
+
itemProps: {
|
|
301
|
+
labelCol: { xs: 24, sm: 3 },
|
|
302
|
+
wrapperCol: { xs: 24, sm: 20 }
|
|
303
|
+
},
|
|
304
|
+
style: { width: "100%" }
|
|
305
|
+
}
|
|
306
|
+
}, "left");
|
|
307
|
+
const formSchemas = [
|
|
308
|
+
mapFormSchema({
|
|
309
|
+
label: "\u96C6\u6210\u8BBE\u8BA1\u8868\u5355",
|
|
310
|
+
field: "isDesForm",
|
|
311
|
+
component: "RadioButtonGroup",
|
|
312
|
+
componentProps: {
|
|
313
|
+
options: [
|
|
314
|
+
{ label: "\u5F00\u542F", value: "Y" },
|
|
315
|
+
{ label: "\u5173\u95ED", value: "N" }
|
|
316
|
+
],
|
|
317
|
+
buttonStyle: "solid",
|
|
318
|
+
onChange: handlers.onIsDesformChange
|
|
319
|
+
}
|
|
320
|
+
}, "left"),
|
|
321
|
+
mapFormSchema({
|
|
322
|
+
label: "\u8868\u5355\u7F16\u7801",
|
|
323
|
+
field: "desFormCode",
|
|
324
|
+
component: "Input",
|
|
325
|
+
componentProps: {
|
|
326
|
+
style: "width: 80%"
|
|
327
|
+
},
|
|
328
|
+
dynamicDisabled: ({ model }) => model.isDesForm !== "Y",
|
|
329
|
+
dynamicRules: ({ model }) => {
|
|
330
|
+
return [
|
|
331
|
+
{ required: model.isDesForm === "Y", message: "\u8BF7\u8F93\u5165\u8868\u5355\u7F16\u7801\uFF01" }
|
|
332
|
+
];
|
|
333
|
+
}
|
|
334
|
+
}, "right"),
|
|
335
|
+
mapFormSchema({
|
|
336
|
+
label: "\u96C6\u6210\u79EF\u6728\u62A5\u8868",
|
|
337
|
+
field: "reportPrintShow",
|
|
338
|
+
component: "RadioButtonGroup",
|
|
339
|
+
componentProps: {
|
|
340
|
+
options: [
|
|
341
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
342
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
343
|
+
],
|
|
344
|
+
buttonStyle: "solid",
|
|
345
|
+
onChange: handlers.onReportPrintShowChange
|
|
346
|
+
}
|
|
347
|
+
}, "left"),
|
|
348
|
+
mapFormSchema({
|
|
349
|
+
label: "\u62A5\u8868\u5730\u5740",
|
|
350
|
+
field: "reportPrintUrl",
|
|
351
|
+
component: "Input",
|
|
352
|
+
componentProps: {
|
|
353
|
+
style: "width: 80%"
|
|
354
|
+
},
|
|
355
|
+
dynamicDisabled: ({ model }) => !model.reportPrintShow,
|
|
356
|
+
dynamicRules: ({ model }) => {
|
|
357
|
+
return [
|
|
358
|
+
{ required: !!model.reportPrintShow, message: "\u8BF7\u8F93\u5165\u62A5\u8868\u5730\u5740\uFF01" }
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
}, "right"),
|
|
362
|
+
mapFormSchema({
|
|
363
|
+
label: "\u542F\u7528\u8054\u5408\u67E5\u8BE2",
|
|
364
|
+
field: "joinQuery",
|
|
365
|
+
component: "RadioButtonGroup",
|
|
366
|
+
componentProps: {
|
|
367
|
+
options: [
|
|
368
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
369
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
370
|
+
],
|
|
371
|
+
buttonStyle: "solid",
|
|
372
|
+
onChange: handlers.onJoinQueryChange
|
|
373
|
+
}
|
|
374
|
+
}, "left"),
|
|
375
|
+
mapFormSchema({
|
|
376
|
+
label: "",
|
|
377
|
+
field: "joinQuery",
|
|
378
|
+
component: "InputNumber",
|
|
379
|
+
render: () => ""
|
|
380
|
+
}, "right"),
|
|
381
|
+
mapFormSchema({
|
|
382
|
+
label: "\u5F39\u7A97\u9ED8\u8BA4\u5168\u5C4F",
|
|
383
|
+
field: "modelFullscreen",
|
|
384
|
+
component: "RadioButtonGroup",
|
|
385
|
+
componentProps: {
|
|
386
|
+
options: [
|
|
387
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
388
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
389
|
+
],
|
|
390
|
+
buttonStyle: "solid"
|
|
391
|
+
}
|
|
392
|
+
}, "left"),
|
|
393
|
+
mapFormSchema({
|
|
394
|
+
label: "\u5F39\u7A97\u5BBD\u5EA6",
|
|
395
|
+
field: "modalMinWidth",
|
|
396
|
+
component: "InputNumber",
|
|
397
|
+
componentProps: {
|
|
398
|
+
style: "width: 80%",
|
|
399
|
+
placeholder: "\u5F39\u7A97\u6700\u5C0F\u5BBD\u5EA6\uFF08\u5355\u4F4D\uFF1Apx\uFF09"
|
|
400
|
+
}
|
|
401
|
+
}, "right")
|
|
402
|
+
];
|
|
403
|
+
return { formSchemas };
|
|
404
|
+
}
|
|
405
|
+
function useCodeGeneratorFormSchemas(_, handlers, single) {
|
|
406
|
+
const mapFormSchema = bindMapFormSchema({
|
|
407
|
+
one: {
|
|
408
|
+
colProps: { xs: 24, sm: 24 },
|
|
409
|
+
itemProps: {
|
|
410
|
+
labelCol: { xs: 24, sm: 5 },
|
|
411
|
+
wrapperCol: { xs: 24, sm: 16 }
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
towOne: {
|
|
415
|
+
colProps: { xs: 24, sm: 24 },
|
|
416
|
+
itemProps: {
|
|
417
|
+
labelCol: { xs: 24, sm: 3 },
|
|
418
|
+
wrapperCol: { xs: 24, sm: 20 }
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
tow: {
|
|
422
|
+
colProps: { xs: 24, sm: 12 },
|
|
423
|
+
itemProps: {
|
|
424
|
+
labelCol: { xs: 24, sm: 6 },
|
|
425
|
+
wrapperCol: { xs: 24, sm: 16 }
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}, "one");
|
|
429
|
+
const getColSize = computed(() => single.value ? "one" : "tow");
|
|
430
|
+
const formSchemas = computed(() => [
|
|
431
|
+
mapFormSchema({
|
|
432
|
+
label: "\u4EE3\u7801\u751F\u6210\u76EE\u5F55",
|
|
433
|
+
field: "projectPath",
|
|
434
|
+
render: ({ model, field }) => h(Input.Search, {
|
|
435
|
+
value: model[field],
|
|
436
|
+
onChange: (e) => {
|
|
437
|
+
model[field] = e.target.value;
|
|
438
|
+
handlers.onProjectPathChange(e);
|
|
439
|
+
},
|
|
440
|
+
onSearch: handlers.onProjectPathSearch
|
|
441
|
+
}, {
|
|
442
|
+
enterButton: () => h(Button, {
|
|
443
|
+
preIcon: "ant-design:folder-open"
|
|
444
|
+
}, {
|
|
445
|
+
default: () => "\u6D4F\u89C8",
|
|
446
|
+
icon: () => h(FolderOpenOutlined)
|
|
447
|
+
})
|
|
448
|
+
}),
|
|
449
|
+
component: "InputSearch",
|
|
450
|
+
required: true,
|
|
451
|
+
dynamicDisabled: () => false
|
|
452
|
+
}, single.value ? "one" : "towOne"),
|
|
453
|
+
mapFormSchema({
|
|
454
|
+
label: "\u9875\u9762\u98CE\u683C",
|
|
455
|
+
field: "jspMode",
|
|
456
|
+
component: "Select",
|
|
457
|
+
componentProps: {
|
|
458
|
+
options: handlers.jspModeOptions.value
|
|
459
|
+
}
|
|
460
|
+
}, getColSize.value),
|
|
461
|
+
mapFormSchema({
|
|
462
|
+
label: "\u529F\u80FD\u8BF4\u660E",
|
|
463
|
+
field: "ftlDescription",
|
|
464
|
+
component: "Input"
|
|
465
|
+
}, getColSize.value),
|
|
466
|
+
{ label: "\u6570\u636E\u6A21\u578B", field: "jformType", component: "Input", show: false },
|
|
467
|
+
mapFormSchema({
|
|
468
|
+
label: "\u8868\u540D",
|
|
469
|
+
field: "tableName_tmp",
|
|
470
|
+
required: true,
|
|
471
|
+
dynamicDisabled: true,
|
|
472
|
+
component: "Input"
|
|
473
|
+
}, getColSize.value),
|
|
474
|
+
mapFormSchema({
|
|
475
|
+
label: "\u5B9E\u4F53\u7C7B\u540D",
|
|
476
|
+
field: "entityName",
|
|
477
|
+
required: true,
|
|
478
|
+
component: "Input",
|
|
479
|
+
componentProps: {
|
|
480
|
+
placeholder: "\u8BF7\u8F93\u5165\u5B9E\u4F53\u7C7B\u540D(\u9996\u5B57\u6BCD\u5927\u5199)"
|
|
481
|
+
}
|
|
482
|
+
}, getColSize.value),
|
|
483
|
+
mapFormSchema({
|
|
484
|
+
label: "\u5305\u540D(\u5C0F\u5199)",
|
|
485
|
+
field: "entityPackage",
|
|
486
|
+
required: true,
|
|
487
|
+
component: "Input"
|
|
488
|
+
}, getColSize.value),
|
|
489
|
+
mapFormSchema({
|
|
490
|
+
label: "\u4EE3\u7801\u5206\u5C42\u6837\u5F0F",
|
|
491
|
+
field: "packageStyle",
|
|
492
|
+
component: "Select",
|
|
493
|
+
componentProps: {
|
|
494
|
+
disabled: true,
|
|
495
|
+
options: [
|
|
496
|
+
{ label: "\u4E1A\u52A1\u5206\u5C42", value: "service" },
|
|
497
|
+
{ label: "\u4EE3\u7801\u5206\u5C42", value: "project" }
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
}, getColSize.value),
|
|
501
|
+
{ label: "\u9700\u8981\u751F\u6210\u7684\u4EE3\u7801", field: "codeTypes", component: "Input", show: false }
|
|
502
|
+
]);
|
|
503
|
+
return { formSchemas };
|
|
504
|
+
}
|
|
505
|
+
export { useExtendConfigFormSchemas as a, useCodeGeneratorFormSchemas as b, useFormSchemas as u };
|