@jeecg/online 1.0.1 → 3.4.3
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 +15 -9
- package/AuthButtonTree.js +4 -7
- package/AuthDataConfig.js +10 -8
- package/AuthDataTree.js +4 -7
- package/AuthFieldConfig.js +16 -14
- package/AuthFieldTree.js +25 -20
- package/AuthManagerDrawer.js +2 -3
- package/AuthSetterModal.js +2 -2
- package/CgformCopyList.js +34 -24
- package/CgformModal.js +57 -50
- package/CgreportModal.js +32 -39
- package/CheckDictTable.js +146 -26
- package/CodeFileListModal.js +174 -0
- package/CodeFileViewModal.js +324 -0
- package/CodeGeneratorModal.js +42 -40
- package/CustomButtonList.js +19 -23
- package/DBAttributeTable.js +250 -14
- package/DbToOnlineModal.js +28 -27
- package/DetailForm.js +607 -0
- package/EnhanceJavaModal.js +12 -19
- package/EnhanceJsHistory.js +6 -8
- package/EnhanceJsModal.js +17 -18
- package/EnhanceSqlModal.js +12 -19
- package/ExtendConfigModal.js +26 -17
- package/FileSelectModal.js +1 -2
- package/ForeignKeyTable.js +6 -5
- package/FormSchemaFactory.js +163 -30
- package/IndexTable.js +8 -7
- package/JModalTip.js +54 -0
- package/LeftDepart.js +3 -3
- package/LeftRole.js +8 -6
- package/LeftUser.js +8 -6
- package/LinkTableConfigModal.js +288 -0
- package/LinkTableFieldConfigModal.js +217 -0
- package/LinkTableListPiece.js +36 -0
- package/ModalFormDemo.js +4 -4
- package/OnlCgReportList.js +34 -0
- package/OnlineAutoList.js +155 -58
- package/OnlineAutoModal.js +91 -132
- package/OnlineAutoTreeList.js +92 -54
- package/OnlineCustomModal.js +31 -17
- package/OnlineDetailModal.js +182 -0
- package/OnlineForm.js +272 -141
- package/OnlineFormDetail.js +324 -0
- package/OnlineQueryForm.js +72 -42
- package/OnlineSearchFormItem.js +28 -23
- package/OnlineSubFormDetail.js +165 -0
- package/OnlineSuperQuery.js +72 -76
- package/OnlineSuperQueryValComponent.js +1 -0
- package/OnlineSuperQueryValComponent.vue_vue_type_script_lang.js +1 -17
- package/PageAttributeTable.js +233 -31
- package/ProcessOnlineForm.js +41 -18
- package/QueryTable.js +6 -5
- package/README.md +3 -8
- package/_arrayPush.js +5 -3
- package/{cloneDeep.js → _baseClone.js} +5 -9
- package/_baseSlice.js +18 -0
- package/_commonjsHelpers.js +5 -0
- package/_flatRest.js +174 -0
- package/auth.data.js +1 -3
- package/cgform.data.js +18 -9
- package/enhance.api.js +27 -18
- package/index.js +358 -34
- package/index2.js +49 -48
- package/index3.js +29 -26
- package/isArray.js +1 -1
- package/main.index.js +3 -3
- package/omit.js +60 -0
- package/package.json +1 -1
- package/pick.js +3 -173
- package/style.css +1 -1
- package/toString.js +2 -2
- package/useAutoForm.js +3457 -3792
- package/useCgformList.js +44 -31
- package/{useTableColumns.js → useListButton.js} +218 -409
- package/useOnlineTest.js +5 -26827
- package/useSchemas.js +382 -234
- package/useTableSync.js +19 -7
- package/ChartAutoRender.js +0 -69
- package/ChartDoubleRender.js +0 -154
- package/ChartSingleRender.js +0 -132
- package/ChartTabsRender.js +0 -218
- package/ErrorTip.js +0 -21
- package/FieldTable.js +0 -185
- package/GraphreportAutoChart.js +0 -352
- package/GraphreportList.js +0 -239
- package/GraphreportModal.js +0 -559
- package/JOnlineSearchSelect.js +0 -107
- package/LICENSE +0 -7
- package/OnlineSelectCascade.js +0 -217
- package/OnlineSubForm.js +0 -200
- package/ParamsTable.js +0 -71
- package/graphreport.api.js +0 -23
- package/useChartRender.js +0 -405
- package/useMessageOnline.js +0 -71
package/useSchemas.js
CHANGED
|
@@ -2,30 +2,36 @@ import { computed, h } from "vue";
|
|
|
2
2
|
import { Input, Button } from "ant-design-vue";
|
|
3
3
|
import { FolderOpenOutlined } from "@ant-design/icons-vue";
|
|
4
4
|
import { bindMapFormSchema } from "/@/utils/common/compUtils";
|
|
5
|
+
import { usePermission } from "/@/hooks/web/usePermission";
|
|
6
|
+
import { rules } from "/@/utils/helper/validator";
|
|
7
|
+
usePermission();
|
|
5
8
|
function useFormSchemas(_props, handlers) {
|
|
6
|
-
const mapFormSchema = bindMapFormSchema(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const mapFormSchema = bindMapFormSchema(
|
|
10
|
+
{
|
|
11
|
+
one: {
|
|
12
|
+
colProps: { xs: 24, sm: 24 },
|
|
13
|
+
itemProps: {
|
|
14
|
+
labelCol: { xs: 24, sm: 2 },
|
|
15
|
+
wrapperCol: { xs: 24, sm: 22 }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
tow: {
|
|
19
|
+
colProps: { xs: 24, sm: 12 },
|
|
20
|
+
itemProps: {
|
|
21
|
+
labelCol: { xs: 24, sm: 4 },
|
|
22
|
+
wrapperCol: { xs: 24, sm: 20 }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
three: {
|
|
26
|
+
colProps: { xs: 24, sm: 8 },
|
|
27
|
+
itemProps: {
|
|
28
|
+
labelCol: { xs: 24, sm: 6 },
|
|
29
|
+
wrapperCol: { xs: 24, sm: 18 }
|
|
30
|
+
}
|
|
19
31
|
}
|
|
20
32
|
},
|
|
21
|
-
three
|
|
22
|
-
|
|
23
|
-
itemProps: {
|
|
24
|
-
labelCol: { xs: 24, sm: 6 },
|
|
25
|
-
wrapperCol: { xs: 24, sm: 18 }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}, "three");
|
|
33
|
+
"three"
|
|
34
|
+
);
|
|
29
35
|
const formSchemas = [
|
|
30
36
|
{ label: "", field: "id", component: "Input", show: false },
|
|
31
37
|
{ label: "", field: "tableVersion", component: "Input", show: false },
|
|
@@ -34,7 +40,8 @@ function useFormSchemas(_props, handlers) {
|
|
|
34
40
|
field: "tableName",
|
|
35
41
|
component: "Input",
|
|
36
42
|
required: true,
|
|
37
|
-
dynamicDisabled: ({ model }) => model.tableVersion && model.tableVersion != 1
|
|
43
|
+
dynamicDisabled: ({ model }) => model.tableVersion && model.tableVersion != 1,
|
|
44
|
+
dynamicRules: ({ model, schema }) => rules.duplicateCheckRule("onl_cgform_head", "table_name", model, schema, true)
|
|
38
45
|
}),
|
|
39
46
|
mapFormSchema({
|
|
40
47
|
label: "\u8868\u63CF\u8FF0",
|
|
@@ -145,10 +152,7 @@ function useFormSchemas(_props, handlers) {
|
|
|
145
152
|
defaultValue: "normal",
|
|
146
153
|
componentProps: {
|
|
147
154
|
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" }
|
|
155
|
+
{ label: "\u9ED8\u8BA4\u4E3B\u9898", value: "normal" }
|
|
152
156
|
]
|
|
153
157
|
},
|
|
154
158
|
dynamicDisabled: ({ model }) => model.tableType === 1
|
|
@@ -257,17 +261,20 @@ function useFormSchemas(_props, handlers) {
|
|
|
257
261
|
component: "Input",
|
|
258
262
|
ifShow: fieldIfShow
|
|
259
263
|
}),
|
|
260
|
-
mapFormSchema(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
mapFormSchema(
|
|
265
|
+
{
|
|
266
|
+
label: "\u9644\u8868",
|
|
267
|
+
field: "subTableStr",
|
|
268
|
+
component: "Input",
|
|
269
|
+
componentProps: {
|
|
270
|
+
disabled: true,
|
|
271
|
+
placeholder: " ",
|
|
272
|
+
allowClear: false
|
|
273
|
+
},
|
|
274
|
+
ifShow: handlers.ifShowOfSubTableStr
|
|
268
275
|
},
|
|
269
|
-
|
|
270
|
-
|
|
276
|
+
"one"
|
|
277
|
+
)
|
|
271
278
|
];
|
|
272
279
|
function fieldIfShow({ field, model }) {
|
|
273
280
|
switch (field) {
|
|
@@ -286,218 +293,359 @@ function useFormSchemas(_props, handlers) {
|
|
|
286
293
|
return { formSchemas };
|
|
287
294
|
}
|
|
288
295
|
function useExtendConfigFormSchemas(_props, handlers) {
|
|
289
|
-
const mapFormSchema = bindMapFormSchema(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
296
|
+
const mapFormSchema = bindMapFormSchema(
|
|
297
|
+
{
|
|
298
|
+
left: {
|
|
299
|
+
colProps: { xs: 24, sm: 7 },
|
|
300
|
+
itemProps: {
|
|
301
|
+
labelCol: { xs: 24, sm: 11 },
|
|
302
|
+
wrapperCol: { xs: 24, sm: 13 }
|
|
303
|
+
},
|
|
304
|
+
style: { width: "100%" }
|
|
295
305
|
},
|
|
296
|
-
|
|
306
|
+
right: {
|
|
307
|
+
colProps: { xs: 24, sm: 17 },
|
|
308
|
+
itemProps: {
|
|
309
|
+
labelCol: { xs: 24, sm: 3 },
|
|
310
|
+
wrapperCol: { xs: 24, sm: 20 }
|
|
311
|
+
},
|
|
312
|
+
style: { width: "100%" }
|
|
313
|
+
}
|
|
297
314
|
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
itemProps: {
|
|
301
|
-
labelCol: { xs: 24, sm: 3 },
|
|
302
|
-
wrapperCol: { xs: 24, sm: 20 }
|
|
303
|
-
},
|
|
304
|
-
style: { width: "100%" }
|
|
305
|
-
}
|
|
306
|
-
}, "left");
|
|
315
|
+
"left"
|
|
316
|
+
);
|
|
307
317
|
const formSchemas = [
|
|
308
|
-
mapFormSchema(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
mapFormSchema({
|
|
322
|
-
label: "\u8868\u5355\u7F16\u7801",
|
|
323
|
-
field: "desFormCode",
|
|
324
|
-
component: "Input",
|
|
325
|
-
componentProps: {
|
|
326
|
-
style: "width: 80%"
|
|
318
|
+
mapFormSchema(
|
|
319
|
+
{
|
|
320
|
+
label: "\u96C6\u6210\u8BBE\u8BA1\u8868\u5355",
|
|
321
|
+
field: "isDesForm",
|
|
322
|
+
component: "RadioButtonGroup",
|
|
323
|
+
componentProps: {
|
|
324
|
+
options: [
|
|
325
|
+
{ label: "\u5F00\u542F", value: "Y" },
|
|
326
|
+
{ label: "\u5173\u95ED", value: "N" }
|
|
327
|
+
],
|
|
328
|
+
buttonStyle: "solid",
|
|
329
|
+
onChange: handlers.onIsDesformChange
|
|
330
|
+
}
|
|
327
331
|
},
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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%"
|
|
332
|
+
"left"
|
|
333
|
+
),
|
|
334
|
+
mapFormSchema(
|
|
335
|
+
{
|
|
336
|
+
label: "\u8868\u5355\u7F16\u7801",
|
|
337
|
+
field: "desFormCode",
|
|
338
|
+
component: "Input",
|
|
339
|
+
componentProps: {
|
|
340
|
+
style: "width: 80%"
|
|
341
|
+
},
|
|
342
|
+
dynamicDisabled: ({ model }) => model.isDesForm !== "Y",
|
|
343
|
+
dynamicRules: ({ model }) => {
|
|
344
|
+
return [{ required: model.isDesForm === "Y", message: "\u8BF7\u8F93\u5165\u8868\u5355\u7F16\u7801\uFF01" }];
|
|
345
|
+
}
|
|
354
346
|
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
347
|
+
"right"
|
|
348
|
+
),
|
|
349
|
+
mapFormSchema(
|
|
350
|
+
{
|
|
351
|
+
label: "\u96C6\u6210\u79EF\u6728\u62A5\u8868",
|
|
352
|
+
field: "reportPrintShow",
|
|
353
|
+
component: "RadioButtonGroup",
|
|
354
|
+
componentProps: {
|
|
355
|
+
options: [
|
|
356
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
357
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
358
|
+
],
|
|
359
|
+
buttonStyle: "solid",
|
|
360
|
+
onChange: handlers.onReportPrintShowChange
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"left"
|
|
364
|
+
),
|
|
365
|
+
mapFormSchema(
|
|
366
|
+
{
|
|
367
|
+
label: "\u62A5\u8868\u5730\u5740",
|
|
368
|
+
field: "reportPrintUrl",
|
|
369
|
+
component: "Input",
|
|
370
|
+
componentProps: {
|
|
371
|
+
style: "width: 80%"
|
|
372
|
+
},
|
|
373
|
+
dynamicDisabled: ({ model }) => !model.reportPrintShow,
|
|
374
|
+
dynamicRules: ({ model }) => {
|
|
375
|
+
return [
|
|
376
|
+
{ required: !!model.reportPrintShow, message: "\u8BF7\u8F93\u5165\u62A5\u8868\u5730\u5740\uFF01" },
|
|
377
|
+
{
|
|
378
|
+
validator({}, value) {
|
|
379
|
+
if (/\/jmreport\/view\/{积木报表ID}/.test(value)) {
|
|
380
|
+
return Promise.reject("\u8BF7\u5C06{\u79EF\u6728\u62A5\u8868ID}\u66FF\u6362\u4E3A\u771F\u5B9E\u7684\u79EF\u6728\u62A5\u8868ID\uFF01");
|
|
381
|
+
}
|
|
382
|
+
return Promise.resolve();
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
];
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"right"
|
|
389
|
+
),
|
|
390
|
+
mapFormSchema(
|
|
391
|
+
{
|
|
392
|
+
label: "\u56FA\u5B9A\u64CD\u4F5C\u5217",
|
|
393
|
+
field: "tableFixedAction",
|
|
394
|
+
component: "RadioButtonGroup",
|
|
395
|
+
componentProps: {
|
|
396
|
+
options: [
|
|
397
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
398
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
399
|
+
],
|
|
400
|
+
buttonStyle: "solid"
|
|
401
|
+
},
|
|
402
|
+
defaultValue: 0
|
|
403
|
+
},
|
|
404
|
+
"left"
|
|
405
|
+
),
|
|
406
|
+
mapFormSchema(
|
|
407
|
+
{
|
|
408
|
+
label: "\u56FA\u5B9A\u65B9\u5F0F",
|
|
409
|
+
field: "tableFixedActionType",
|
|
410
|
+
component: "Select",
|
|
411
|
+
componentProps: {
|
|
412
|
+
options: [
|
|
413
|
+
{ label: "\u56FA\u5B9A\u5230\u53F3\u4FA7", value: "right" },
|
|
414
|
+
{ label: "\u56FA\u5B9A\u5230\u5DE6\u4FA7", value: "left" }
|
|
415
|
+
],
|
|
416
|
+
style: "width: 80%"
|
|
417
|
+
},
|
|
418
|
+
defaultValue: "right",
|
|
419
|
+
dynamicDisabled: ({ model }) => !model.tableFixedAction,
|
|
420
|
+
dynamicRules: ({ model }) => {
|
|
421
|
+
return [{ required: !!model.tableFixedAction, message: "\u8BF7\u9009\u62E9\u56FA\u5B9A\u65B9\u5F0F\uFF01" }];
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
"right"
|
|
425
|
+
),
|
|
426
|
+
mapFormSchema(
|
|
427
|
+
{
|
|
428
|
+
label: "\u542F\u7528\u8054\u5408\u67E5\u8BE2",
|
|
429
|
+
field: "joinQuery",
|
|
430
|
+
component: "RadioButtonGroup",
|
|
431
|
+
componentProps: {
|
|
432
|
+
options: [
|
|
433
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
434
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
435
|
+
],
|
|
436
|
+
buttonStyle: "solid",
|
|
437
|
+
onChange: handlers.onJoinQueryChange
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"left"
|
|
441
|
+
),
|
|
442
|
+
mapFormSchema(
|
|
443
|
+
{
|
|
444
|
+
label: "",
|
|
445
|
+
field: "joinQuery",
|
|
446
|
+
component: "InputNumber",
|
|
447
|
+
render: () => ""
|
|
448
|
+
},
|
|
449
|
+
"right"
|
|
450
|
+
),
|
|
451
|
+
mapFormSchema(
|
|
452
|
+
{
|
|
453
|
+
label: "\u5F39\u7A97\u9ED8\u8BA4\u5168\u5C4F",
|
|
454
|
+
field: "modelFullscreen",
|
|
455
|
+
component: "RadioButtonGroup",
|
|
456
|
+
componentProps: {
|
|
457
|
+
options: [
|
|
458
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
459
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
460
|
+
],
|
|
461
|
+
buttonStyle: "solid"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"left"
|
|
465
|
+
),
|
|
466
|
+
mapFormSchema(
|
|
467
|
+
{
|
|
468
|
+
label: "\u5F39\u7A97\u5BBD\u5EA6",
|
|
469
|
+
field: "modalMinWidth",
|
|
470
|
+
component: "InputNumber",
|
|
471
|
+
componentProps: {
|
|
472
|
+
style: "width: 80%",
|
|
473
|
+
placeholder: "\u5F39\u7A97\u6700\u5C0F\u5BBD\u5EA6\uFF08\u5355\u4F4D\uFF1Apx\uFF09"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"right"
|
|
477
|
+
),
|
|
478
|
+
mapFormSchema(
|
|
479
|
+
{
|
|
480
|
+
label: "\u5F00\u542F\u8868\u5355\u8BC4\u8BBA",
|
|
481
|
+
field: "commentStatus",
|
|
482
|
+
component: "RadioButtonGroup",
|
|
483
|
+
componentProps: {
|
|
484
|
+
options: [
|
|
485
|
+
{ label: "\u5F00\u542F", value: 1 },
|
|
486
|
+
{ label: "\u5173\u95ED", value: 0 }
|
|
487
|
+
],
|
|
488
|
+
buttonStyle: "solid"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"left"
|
|
492
|
+
),
|
|
493
|
+
mapFormSchema(
|
|
494
|
+
{
|
|
495
|
+
label: "",
|
|
496
|
+
field: "commentStatus",
|
|
497
|
+
component: "InputNumber",
|
|
498
|
+
render: () => ""
|
|
499
|
+
},
|
|
500
|
+
"right"
|
|
501
|
+
)
|
|
402
502
|
];
|
|
403
503
|
return { formSchemas };
|
|
404
504
|
}
|
|
405
505
|
function useCodeGeneratorFormSchemas(_, handlers, single) {
|
|
406
|
-
const mapFormSchema = bindMapFormSchema(
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
506
|
+
const mapFormSchema = bindMapFormSchema(
|
|
507
|
+
{
|
|
508
|
+
one: {
|
|
509
|
+
colProps: { xs: 24, sm: 24 },
|
|
510
|
+
itemProps: {
|
|
511
|
+
labelCol: { xs: 24, sm: 5 },
|
|
512
|
+
wrapperCol: { xs: 24, sm: 16 }
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
towOne: {
|
|
516
|
+
colProps: { xs: 24, sm: 24 },
|
|
517
|
+
itemProps: {
|
|
518
|
+
labelCol: { xs: 24, sm: 3 },
|
|
519
|
+
wrapperCol: { xs: 24, sm: 20 }
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
tow: {
|
|
523
|
+
colProps: { xs: 24, sm: 12 },
|
|
524
|
+
itemProps: {
|
|
525
|
+
labelCol: { xs: 24, sm: 6 },
|
|
526
|
+
wrapperCol: { xs: 24, sm: 16 }
|
|
527
|
+
}
|
|
419
528
|
}
|
|
420
529
|
},
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
itemProps: {
|
|
424
|
-
labelCol: { xs: 24, sm: 6 },
|
|
425
|
-
wrapperCol: { xs: 24, sm: 16 }
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}, "one");
|
|
530
|
+
"one"
|
|
531
|
+
);
|
|
429
532
|
const getColSize = computed(() => single.value ? "one" : "tow");
|
|
430
533
|
const formSchemas = computed(() => [
|
|
431
|
-
mapFormSchema(
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
534
|
+
mapFormSchema(
|
|
535
|
+
{
|
|
536
|
+
label: "\u4EE3\u7801\u751F\u6210\u76EE\u5F55",
|
|
537
|
+
field: "projectPath",
|
|
538
|
+
render: ({ model, field }) => h(
|
|
539
|
+
Input.Search,
|
|
540
|
+
{
|
|
541
|
+
value: model[field],
|
|
542
|
+
onChange: (e) => {
|
|
543
|
+
model[field] = e.target.value;
|
|
544
|
+
handlers.onProjectPathChange(e);
|
|
545
|
+
},
|
|
546
|
+
onSearch: handlers.onProjectPathSearch
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
enterButton: () => h(
|
|
550
|
+
Button,
|
|
551
|
+
{
|
|
552
|
+
preIcon: "ant-design:folder-open"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
default: () => "\u6D4F\u89C8",
|
|
556
|
+
icon: () => h(FolderOpenOutlined)
|
|
557
|
+
}
|
|
558
|
+
)
|
|
559
|
+
}
|
|
560
|
+
),
|
|
561
|
+
component: "InputSearch",
|
|
562
|
+
required: true
|
|
563
|
+
},
|
|
564
|
+
single.value ? "one" : "towOne"
|
|
565
|
+
),
|
|
566
|
+
mapFormSchema(
|
|
567
|
+
{
|
|
568
|
+
label: "\u9875\u9762\u98CE\u683C",
|
|
569
|
+
field: "jspMode",
|
|
570
|
+
component: "Select",
|
|
571
|
+
componentProps: {
|
|
572
|
+
options: handlers.jspModeOptions.value
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
getColSize.value
|
|
576
|
+
),
|
|
577
|
+
mapFormSchema(
|
|
578
|
+
{
|
|
579
|
+
label: "\u529F\u80FD\u8BF4\u660E",
|
|
580
|
+
field: "ftlDescription",
|
|
581
|
+
component: "Input"
|
|
582
|
+
},
|
|
583
|
+
getColSize.value
|
|
584
|
+
),
|
|
466
585
|
{ label: "\u6570\u636E\u6A21\u578B", field: "jformType", component: "Input", show: false },
|
|
467
|
-
mapFormSchema(
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
mapFormSchema(
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
586
|
+
mapFormSchema(
|
|
587
|
+
{
|
|
588
|
+
label: "\u8868\u540D",
|
|
589
|
+
field: "tableName_tmp",
|
|
590
|
+
required: true,
|
|
591
|
+
dynamicDisabled: true,
|
|
592
|
+
component: "Input"
|
|
593
|
+
},
|
|
594
|
+
getColSize.value
|
|
595
|
+
),
|
|
596
|
+
mapFormSchema(
|
|
597
|
+
{
|
|
598
|
+
label: "\u5B9E\u4F53\u7C7B\u540D",
|
|
599
|
+
field: "entityName",
|
|
600
|
+
required: true,
|
|
601
|
+
component: "Input",
|
|
602
|
+
componentProps: {
|
|
603
|
+
placeholder: "\u8BF7\u8F93\u5165\u5B9E\u4F53\u7C7B\u540D(\u9996\u5B57\u6BCD\u5927\u5199)"
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
getColSize.value
|
|
607
|
+
),
|
|
608
|
+
mapFormSchema(
|
|
609
|
+
{
|
|
610
|
+
label: "\u5305\u540D(\u5C0F\u5199)",
|
|
611
|
+
field: "entityPackage",
|
|
612
|
+
required: true,
|
|
613
|
+
component: "Input"
|
|
614
|
+
},
|
|
615
|
+
getColSize.value
|
|
616
|
+
),
|
|
617
|
+
mapFormSchema(
|
|
618
|
+
{
|
|
619
|
+
label: "\u4EE3\u7801\u5206\u5C42\u6837\u5F0F",
|
|
620
|
+
field: "packageStyle",
|
|
621
|
+
component: "Select",
|
|
622
|
+
componentProps: {
|
|
623
|
+
disabled: true,
|
|
624
|
+
options: [
|
|
625
|
+
{ label: "\u4E1A\u52A1\u5206\u5C42", value: "service" },
|
|
626
|
+
{ label: "\u4EE3\u7801\u5206\u5C42", value: "project" }
|
|
627
|
+
]
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
getColSize.value
|
|
631
|
+
),
|
|
632
|
+
mapFormSchema(
|
|
633
|
+
{
|
|
634
|
+
label: "\u9875\u9762\u4EE3\u7801",
|
|
635
|
+
field: "vueStyle",
|
|
636
|
+
required: true,
|
|
637
|
+
component: "RadioGroup",
|
|
638
|
+
defaultValue: "vue3",
|
|
639
|
+
componentProps: {
|
|
640
|
+
options: [
|
|
641
|
+
{ label: "Vue3", value: "vue3" },
|
|
642
|
+
{ label: "Vue3 \u539F\u751F", value: "vue3Native" },
|
|
643
|
+
{ label: "Vue2", value: "vue" }
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
getColSize.value
|
|
648
|
+
),
|
|
501
649
|
{ label: "\u9700\u8981\u751F\u6210\u7684\u4EE3\u7801", field: "codeTypes", component: "Input", show: false }
|
|
502
650
|
]);
|
|
503
651
|
return { formSchemas };
|