@jeecg/online 3.4.3-beta → 3.4.4-RC
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/AuthFieldConfig.js +1 -1
- package/CgformCopyList.js +3 -1
- package/CgformModal.js +19 -2
- package/CgreportModal.js +1 -0
- package/CheckDictTable.js +1 -1
- package/DetailForm.js +14 -10
- package/EnhanceJsHistory.js +1 -1
- package/EnhanceJsModal.js +7 -0
- package/ExtendConfigModal.js +1 -1
- package/FieldExtendJsonModal.js +270 -0
- package/FormSchemaFactory.js +150 -10
- package/LinkTableConfigModal.js +1 -1
- package/OnlineAutoList.js +3 -3
- package/OnlineAutoModal.js +7 -3
- package/OnlineAutoTreeList.js +3 -3
- package/OnlineDetailModal.js +1 -1
- package/OnlineForm.js +64 -41
- package/OnlineFormDetail.js +1 -1
- package/OnlineQueryForm.js +8 -4
- package/OnlineSearchFormItem.js +3 -3
- package/OnlineSelectCascade.js +27 -30
- package/PageAttributeTable.js +68 -27
- package/README.md +6 -1
- package/{OnlineSuperQuery.js → SuperQuery.js} +215 -127
- package/SuperQueryValComponent.js +8 -0
- package/{OnlineSuperQueryValComponent.vue_vue_type_script_lang.js → SuperQueryValComponent.vue_vue_type_script_lang.js} +15 -3
- package/_arrayPush.js +1 -1
- package/_baseClone.js +1 -1
- package/_flatRest.js +1 -1
- package/cgform.data.js +8 -8
- package/clipboard.js +565 -0
- package/index.js +16 -5
- package/index2.js +3 -1
- package/index3.js +33 -571
- package/isArray.js +1 -1
- package/main.index.js +2 -2
- package/omit.js +1 -1
- package/package.json +1 -1
- package/pick.js +1 -1
- package/style.css +1 -1
- package/toString.js +1 -1
- package/useAutoForm.js +84 -48
- package/useCgformList.js +97 -5
- package/useListButton.js +8 -4
- package/useSchemas.js +18 -4
- package/OnlineSuperQueryValComponent.js +0 -9
package/FormSchemaFactory.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __async = (__this, __arguments, generator) => {
|
|
18
21
|
return new Promise((resolve, reject) => {
|
|
19
22
|
var fulfilled = (value) => {
|
|
@@ -74,6 +77,7 @@ class IFormSchema {
|
|
|
74
77
|
this.disabled = false;
|
|
75
78
|
this.popContainer = "";
|
|
76
79
|
this.handleWidgetAttr(data);
|
|
80
|
+
this.inPopover = false;
|
|
77
81
|
}
|
|
78
82
|
getFormItemSchema() {
|
|
79
83
|
let schema = this.getItem();
|
|
@@ -241,6 +245,8 @@ class IFormSchema {
|
|
|
241
245
|
getPopContainer() {
|
|
242
246
|
if (this.searchForm === true) {
|
|
243
247
|
return "body";
|
|
248
|
+
} else if (this.inPopover === true) {
|
|
249
|
+
return `.${this.popContainer}`;
|
|
244
250
|
} else if (this.popContainer) {
|
|
245
251
|
return `.${this.popContainer} .ant-modal-content`;
|
|
246
252
|
} else {
|
|
@@ -264,6 +270,9 @@ class IFormSchema {
|
|
|
264
270
|
}
|
|
265
271
|
setOtherInfo(_arg) {
|
|
266
272
|
}
|
|
273
|
+
isInPopover() {
|
|
274
|
+
this.inPopover = true;
|
|
275
|
+
}
|
|
267
276
|
}
|
|
268
277
|
class InputWidget extends IFormSchema {
|
|
269
278
|
getItem() {
|
|
@@ -310,6 +319,7 @@ class SelectWidget extends IFormSchema {
|
|
|
310
319
|
this.dictTable = data["dictTable"];
|
|
311
320
|
this.dictText = data["dictText"];
|
|
312
321
|
this.dictCode = data["dictCode"];
|
|
322
|
+
this.multi = data["multi"] || false;
|
|
313
323
|
}
|
|
314
324
|
getItem() {
|
|
315
325
|
let item = super.getItem();
|
|
@@ -328,8 +338,10 @@ class SelectWidget extends IFormSchema {
|
|
|
328
338
|
}
|
|
329
339
|
}
|
|
330
340
|
getComponentProps() {
|
|
341
|
+
let mode = this.multi === true ? "multiple" : "combobox";
|
|
331
342
|
let props = {
|
|
332
343
|
allowClear: true,
|
|
344
|
+
mode,
|
|
333
345
|
style: {
|
|
334
346
|
width: "100%"
|
|
335
347
|
},
|
|
@@ -495,6 +507,11 @@ class PopupWidget extends IFormSchema {
|
|
|
495
507
|
} else {
|
|
496
508
|
props["setFieldsValue"] = this.setFieldsValue;
|
|
497
509
|
}
|
|
510
|
+
if (this.inPopover === true) {
|
|
511
|
+
props["getContainer"] = () => {
|
|
512
|
+
return this.getModalAsContainer();
|
|
513
|
+
};
|
|
514
|
+
}
|
|
498
515
|
return props;
|
|
499
516
|
}
|
|
500
517
|
getFieldConfig(data) {
|
|
@@ -520,6 +537,7 @@ class TreeCategoryWidget extends IFormSchema {
|
|
|
520
537
|
super(key, data);
|
|
521
538
|
this.multi = false;
|
|
522
539
|
this.pid = data["pidValue"];
|
|
540
|
+
this.pcode = data["pcode"];
|
|
523
541
|
this.textField = data["textField"];
|
|
524
542
|
}
|
|
525
543
|
getItem() {
|
|
@@ -531,17 +549,24 @@ class TreeCategoryWidget extends IFormSchema {
|
|
|
531
549
|
});
|
|
532
550
|
}
|
|
533
551
|
getComponentProps() {
|
|
534
|
-
let
|
|
552
|
+
let param = {
|
|
553
|
+
placeholder: "\u8BF7\u9009\u62E9" + this.label
|
|
554
|
+
};
|
|
555
|
+
if (this.pcode) {
|
|
556
|
+
param["pcode"] = this.pcode;
|
|
557
|
+
} else {
|
|
558
|
+
let pidValue = this.pid || "EMPTY_PID";
|
|
559
|
+
param["pid"] = pidValue;
|
|
560
|
+
}
|
|
535
561
|
if (!this.textField) {
|
|
536
|
-
return {
|
|
537
|
-
multiple: this.multi
|
|
538
|
-
|
|
539
|
-
};
|
|
562
|
+
return __spreadValues({
|
|
563
|
+
multiple: this.multi
|
|
564
|
+
}, param);
|
|
540
565
|
} else {
|
|
541
|
-
return {
|
|
566
|
+
return __spreadProps(__spreadValues({
|
|
542
567
|
loadTriggleChange: true,
|
|
543
|
-
multiple: this.multi
|
|
544
|
-
|
|
568
|
+
multiple: this.multi
|
|
569
|
+
}, param), {
|
|
545
570
|
back: this.textField,
|
|
546
571
|
onChange: (val, backVal) => {
|
|
547
572
|
if (this.formRef) {
|
|
@@ -549,7 +574,7 @@ class TreeCategoryWidget extends IFormSchema {
|
|
|
549
574
|
this.formRef.value.$formValueChange(this.field, val);
|
|
550
575
|
}
|
|
551
576
|
}
|
|
552
|
-
};
|
|
577
|
+
});
|
|
553
578
|
}
|
|
554
579
|
}
|
|
555
580
|
getRelatedHideFields() {
|
|
@@ -584,10 +609,19 @@ class SelectDepartWidget extends IFormSchema {
|
|
|
584
609
|
if (extend.multiSelect === false) {
|
|
585
610
|
props["multiple"] = false;
|
|
586
611
|
}
|
|
612
|
+
if (this.inPopover === true) {
|
|
613
|
+
props["getContainer"] = () => {
|
|
614
|
+
return this.getModalAsContainer();
|
|
615
|
+
};
|
|
616
|
+
}
|
|
587
617
|
return props;
|
|
588
618
|
}
|
|
589
619
|
}
|
|
590
620
|
class SelectUserWidget extends IFormSchema {
|
|
621
|
+
constructor(key, data) {
|
|
622
|
+
super(key, data);
|
|
623
|
+
this.showButton = data.showButton === false ? false : true;
|
|
624
|
+
}
|
|
591
625
|
getItem() {
|
|
592
626
|
let item = super.getItem();
|
|
593
627
|
let componentProps = this.getComponentProps();
|
|
@@ -601,7 +635,8 @@ class SelectUserWidget extends IFormSchema {
|
|
|
601
635
|
let props = {
|
|
602
636
|
showSelected: false,
|
|
603
637
|
allowClear: true,
|
|
604
|
-
isRadioSelection: false
|
|
638
|
+
isRadioSelection: false,
|
|
639
|
+
showButton: this.showButton
|
|
605
640
|
};
|
|
606
641
|
if (extend.text) {
|
|
607
642
|
props["labelKey"] = extend.text;
|
|
@@ -612,6 +647,11 @@ class SelectUserWidget extends IFormSchema {
|
|
|
612
647
|
if (extend.multiSelect === false) {
|
|
613
648
|
props["isRadioSelection"] = true;
|
|
614
649
|
}
|
|
650
|
+
if (this.inPopover === true) {
|
|
651
|
+
props["getContainer"] = () => {
|
|
652
|
+
return this.getModalAsContainer();
|
|
653
|
+
};
|
|
654
|
+
}
|
|
615
655
|
return props;
|
|
616
656
|
}
|
|
617
657
|
}
|
|
@@ -981,6 +1021,97 @@ class LinkTableFieldWidget extends IFormSchema {
|
|
|
981
1021
|
return arr;
|
|
982
1022
|
}
|
|
983
1023
|
}
|
|
1024
|
+
class LinkTableForQueryWidget extends IFormSchema {
|
|
1025
|
+
constructor(key, data) {
|
|
1026
|
+
super(key, data);
|
|
1027
|
+
this.code = data["code"];
|
|
1028
|
+
this.titleField = data["titleField"];
|
|
1029
|
+
this.multi = data["multi"] || false;
|
|
1030
|
+
}
|
|
1031
|
+
getItem() {
|
|
1032
|
+
let item = super.getItem();
|
|
1033
|
+
return Object.assign({}, item, {
|
|
1034
|
+
component: "LinkTableForQuery",
|
|
1035
|
+
componentProps: {
|
|
1036
|
+
code: this.code,
|
|
1037
|
+
multi: this.multi,
|
|
1038
|
+
field: this.titleField,
|
|
1039
|
+
style: {
|
|
1040
|
+
width: "100%"
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
class CascaderPcaForQueryWidget extends IFormSchema {
|
|
1047
|
+
getItem() {
|
|
1048
|
+
let item = super.getItem();
|
|
1049
|
+
return Object.assign({}, item, {
|
|
1050
|
+
component: "CascaderPcaForQuery",
|
|
1051
|
+
componentProps: {
|
|
1052
|
+
style: {
|
|
1053
|
+
width: "100%"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
class SelectUser2Widget extends IFormSchema {
|
|
1060
|
+
constructor(key, data) {
|
|
1061
|
+
super(key, data);
|
|
1062
|
+
this.multi = data.multi === true ? true : false;
|
|
1063
|
+
this.store = data.store || "";
|
|
1064
|
+
this.query = data.query || false;
|
|
1065
|
+
}
|
|
1066
|
+
getItem() {
|
|
1067
|
+
let item = super.getItem();
|
|
1068
|
+
let componentProps = this.getComponentProps();
|
|
1069
|
+
return Object.assign({}, item, {
|
|
1070
|
+
component: "UserSelect",
|
|
1071
|
+
componentProps
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
getComponentProps() {
|
|
1075
|
+
let props = {
|
|
1076
|
+
multi: this.multi,
|
|
1077
|
+
store: this.store,
|
|
1078
|
+
query: this.query
|
|
1079
|
+
};
|
|
1080
|
+
if (this.inPopover === true) {
|
|
1081
|
+
props["getContainer"] = () => {
|
|
1082
|
+
return this.getModalAsContainer();
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
return props;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
class RangeWidget extends IFormSchema {
|
|
1089
|
+
constructor(key, data) {
|
|
1090
|
+
super(key, data);
|
|
1091
|
+
let view = data.view;
|
|
1092
|
+
this.datetime = false;
|
|
1093
|
+
if ("rangeNumber" === view) {
|
|
1094
|
+
this.componentType = "JRangeNumber";
|
|
1095
|
+
} else {
|
|
1096
|
+
this.componentType = "RangeDate";
|
|
1097
|
+
if (data.datetime === true) {
|
|
1098
|
+
this.datetime = true;
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
getItem() {
|
|
1103
|
+
let item = super.getItem();
|
|
1104
|
+
return Object.assign({}, item, {
|
|
1105
|
+
component: this.componentType,
|
|
1106
|
+
componentProps: {
|
|
1107
|
+
datetime: this.datetime,
|
|
1108
|
+
getPopupContainer: (_node) => {
|
|
1109
|
+
return this.getModalAsContainer();
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
984
1115
|
class FormSchemaFactory {
|
|
985
1116
|
static createFormSchema(key, data) {
|
|
986
1117
|
let view = data.view;
|
|
@@ -1034,6 +1165,15 @@ class FormSchemaFactory {
|
|
|
1034
1165
|
return new LinkTableFieldWidget(key, data);
|
|
1035
1166
|
case "slot":
|
|
1036
1167
|
return new SlotWidget(key, data);
|
|
1168
|
+
case "LinkTableForQuery":
|
|
1169
|
+
return new LinkTableForQueryWidget(key, data);
|
|
1170
|
+
case "CascaderPcaForQuery":
|
|
1171
|
+
return new CascaderPcaForQueryWidget(key, data);
|
|
1172
|
+
case "select_user2":
|
|
1173
|
+
return new SelectUser2Widget(key, data);
|
|
1174
|
+
case "rangeDate":
|
|
1175
|
+
case "rangeNumber":
|
|
1176
|
+
return new RangeWidget(key, data);
|
|
1037
1177
|
case "hidden":
|
|
1038
1178
|
return new InputWidget(key, data).isHidden();
|
|
1039
1179
|
default:
|
package/LinkTableConfigModal.js
CHANGED
|
@@ -152,7 +152,7 @@ const _sfc_main = {
|
|
|
152
152
|
required: true,
|
|
153
153
|
componentProps: ({ formActionType }) => {
|
|
154
154
|
return {
|
|
155
|
-
dict: "onl_cgform_head,table_txt,table_name",
|
|
155
|
+
dict: "onl_cgform_head where copy_type = 0,table_txt,table_name",
|
|
156
156
|
pageSize: 10,
|
|
157
157
|
async: true,
|
|
158
158
|
immediateChange: true,
|
package/OnlineAutoList.js
CHANGED
|
@@ -28,7 +28,7 @@ import JImportModal from "/@/components/Form/src/jeecg/components/JImportModal.v
|
|
|
28
28
|
import { u as useOnlineTableContext, a as useListButton } from "./useListButton.js";
|
|
29
29
|
import { a as OnlinePopModal, c as useEnhance, j as useTableColumns, g as getRefPromise } from "./useAutoForm.js";
|
|
30
30
|
import OnlineQueryForm from "./OnlineQueryForm.js";
|
|
31
|
-
import OnlineSuperQuery from "./
|
|
31
|
+
import OnlineSuperQuery from "./SuperQuery.js";
|
|
32
32
|
import { createContext } from "/@/hooks/core/useContext";
|
|
33
33
|
import mitt from "/@/utils/mitt";
|
|
34
34
|
import { _ as _export_sfc } from "./index.js";
|
|
@@ -81,8 +81,7 @@ import "/@/router";
|
|
|
81
81
|
import "/@/utils/cache";
|
|
82
82
|
import "/@/hooks/core/onMountedOrActivated";
|
|
83
83
|
import "/@/hooks/system/useMethods";
|
|
84
|
-
import "./
|
|
85
|
-
import "/@/components/Form/src/helper";
|
|
84
|
+
import "./SuperQueryValComponent.vue_vue_type_script_lang.js";
|
|
86
85
|
import "/@/utils/is";
|
|
87
86
|
const key = Symbol();
|
|
88
87
|
const EVENT_OPEN_CODE = "openpopmodal";
|
|
@@ -417,6 +416,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
417
416
|
_ctx.buttonSwitch.super_query ? (openBlock(), createBlock(_component_online_super_query, {
|
|
418
417
|
key: 5,
|
|
419
418
|
ref: "superQueryButtonRef",
|
|
419
|
+
online: "",
|
|
420
420
|
status: _ctx.superQueryStatus,
|
|
421
421
|
onSearch: _ctx.handleSuperQuery
|
|
422
422
|
}, null, 8, ["status", "onSearch"])) : createCommentVNode("", true)
|
package/OnlineAutoModal.js
CHANGED
|
@@ -105,11 +105,13 @@ const _sfc_main = defineComponent({
|
|
|
105
105
|
formRendered,
|
|
106
106
|
tableName,
|
|
107
107
|
formDataId,
|
|
108
|
-
enableComment
|
|
108
|
+
enableComment,
|
|
109
|
+
onCloseEvent
|
|
109
110
|
} = useAutoModal(false, { emit }, reloadComment);
|
|
110
111
|
function handleSuccess(formData) {
|
|
111
112
|
emit("success", formData);
|
|
112
113
|
closeModal();
|
|
114
|
+
onCloseEvent();
|
|
113
115
|
}
|
|
114
116
|
watch(() => props.id, renderFormItems, { immediate: true });
|
|
115
117
|
function renderFormItems() {
|
|
@@ -141,7 +143,8 @@ const _sfc_main = defineComponent({
|
|
|
141
143
|
tableName,
|
|
142
144
|
formDataId,
|
|
143
145
|
enableComment,
|
|
144
|
-
commentPanelRef
|
|
146
|
+
commentPanelRef,
|
|
147
|
+
onCloseEvent
|
|
145
148
|
};
|
|
146
149
|
return that;
|
|
147
150
|
}
|
|
@@ -153,6 +156,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
153
156
|
const _component_BasicModal = resolveComponent("BasicModal");
|
|
154
157
|
return openBlock(), createBlock(_component_BasicModal, mergeProps({
|
|
155
158
|
title: _ctx.title,
|
|
159
|
+
onCancel: _ctx.onCloseEvent,
|
|
156
160
|
enableComment: _ctx.enableComment,
|
|
157
161
|
width: _ctx.modalWidth
|
|
158
162
|
}, _ctx.$attrs, {
|
|
@@ -216,7 +220,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
216
220
|
}, null, 8, ["id", "disabled", "form-template", "isTree", "pidField", "onRendered", "onSuccess"])
|
|
217
221
|
]),
|
|
218
222
|
_: 1
|
|
219
|
-
}, 16, ["title", "enableComment", "width", "onRegister", "onOk"]);
|
|
223
|
+
}, 16, ["title", "onCancel", "enableComment", "width", "onRegister", "onOk"]);
|
|
220
224
|
}
|
|
221
225
|
var OnlineAutoModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
222
226
|
export { OnlineAutoModal as default };
|
package/OnlineAutoTreeList.js
CHANGED
|
@@ -29,7 +29,7 @@ import { u as useOnlineTableContext, a as useListButton } from "./useListButton.
|
|
|
29
29
|
import { c as useEnhance, j as useTableColumns, g as getRefPromise } from "./useAutoForm.js";
|
|
30
30
|
import { defHttp } from "/@/utils/http/axios";
|
|
31
31
|
import OnlineQueryForm from "./OnlineQueryForm.js";
|
|
32
|
-
import OnlineSuperQuery from "./
|
|
32
|
+
import OnlineSuperQuery from "./SuperQuery.js";
|
|
33
33
|
import { _ as _export_sfc } from "./index.js";
|
|
34
34
|
import "/@/components/Modal";
|
|
35
35
|
import "./OnlineForm.js";
|
|
@@ -81,8 +81,7 @@ import "/@/router";
|
|
|
81
81
|
import "/@/utils/cache";
|
|
82
82
|
import "/@/hooks/core/onMountedOrActivated";
|
|
83
83
|
import "/@/hooks/system/useMethods";
|
|
84
|
-
import "./
|
|
85
|
-
import "/@/components/Form/src/helper";
|
|
84
|
+
import "./SuperQueryValComponent.vue_vue_type_script_lang.js";
|
|
86
85
|
import "/@/utils/is";
|
|
87
86
|
var OnlineAutoTreeList_vue_vue_type_style_index_0_lang = "";
|
|
88
87
|
const _sfc_main = {
|
|
@@ -474,6 +473,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
474
473
|
_ctx.buttonSwitch.super_query ? (openBlock(), createBlock(_component_online_super_query, {
|
|
475
474
|
key: 5,
|
|
476
475
|
ref: "superQueryButtonRef",
|
|
476
|
+
online: "",
|
|
477
477
|
status: _ctx.superQueryStatus,
|
|
478
478
|
onSearch: _ctx.handleSuperQuery
|
|
479
479
|
}, null, 8, ["status", "onSearch"])) : createCommentVNode("", true)
|
package/OnlineDetailModal.js
CHANGED
|
@@ -149,7 +149,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
149
149
|
defaultFullscreen: false
|
|
150
150
|
}, _ctx.$attrs, {
|
|
151
151
|
onRegister: _ctx.registerModal,
|
|
152
|
-
wrapClassName: "jeecg-online-modal"
|
|
152
|
+
wrapClassName: "jeecg-online-detail-modal"
|
|
153
153
|
}), {
|
|
154
154
|
footer: withCtx(() => [
|
|
155
155
|
createVNode(_component_a_button, {
|
package/OnlineForm.js
CHANGED
|
@@ -156,9 +156,6 @@ const _sfc_main = {
|
|
|
156
156
|
fieldDisplayStatus
|
|
157
157
|
} = useFormItems(props, onlineFormRef);
|
|
158
158
|
let { EnhanceJS, initCgEnhanceJs } = useEnhance(onlineFormContext, false);
|
|
159
|
-
console.log("--------v3_hello-----------");
|
|
160
|
-
console.log("--formSchemas----------", formSchemas);
|
|
161
|
-
tableName.value = "v3_hello";
|
|
162
159
|
const [registerForm, { setProps, validate, resetFields, setFieldsValue, updateSchema, getFieldsValue, scrollToField }] = useForm({
|
|
163
160
|
schemas: formSchemas,
|
|
164
161
|
showActionButtonGroup: false,
|
|
@@ -363,8 +360,7 @@ const _sfc_main = {
|
|
|
363
360
|
}
|
|
364
361
|
subActiveKey.value = activeKey;
|
|
365
362
|
if (arr[i].relationType === 0) {
|
|
366
|
-
let instance =
|
|
367
|
-
instance = Array.isArray(instance) ? instance[0] : instance;
|
|
363
|
+
let instance = getSubTableInstance(key);
|
|
368
364
|
sleep(300, () => instance == null ? void 0 : instance.validateTable());
|
|
369
365
|
}
|
|
370
366
|
break;
|
|
@@ -378,10 +374,7 @@ const _sfc_main = {
|
|
|
378
374
|
let arr = subTabInfo.value;
|
|
379
375
|
for (let i = 0; i < arr.length; i++) {
|
|
380
376
|
let key = arr[i].key;
|
|
381
|
-
let instance =
|
|
382
|
-
if (instance instanceof Array) {
|
|
383
|
-
instance = instance[0];
|
|
384
|
-
}
|
|
377
|
+
let instance = getSubTableInstance(key);
|
|
385
378
|
if (arr[i].relationType == 1) {
|
|
386
379
|
try {
|
|
387
380
|
let subFormData = yield instance.getAll();
|
|
@@ -507,10 +500,7 @@ const _sfc_main = {
|
|
|
507
500
|
let tableChangeObj = EnhanceJS[tableKey + "_onlChange"]();
|
|
508
501
|
let columnKey = Object.keys(valueObj)[0];
|
|
509
502
|
if (tableChangeObj[columnKey]) {
|
|
510
|
-
let subRef =
|
|
511
|
-
if (subRef instanceof Array) {
|
|
512
|
-
subRef = subRef[0];
|
|
513
|
-
}
|
|
503
|
+
let subRef = getSubTableInstance(tableKey);
|
|
514
504
|
let formEvent = subRef.getFormEvent();
|
|
515
505
|
let event = __spreadValues({
|
|
516
506
|
column: { key: columnKey },
|
|
@@ -596,7 +586,7 @@ const _sfc_main = {
|
|
|
596
586
|
}
|
|
597
587
|
}
|
|
598
588
|
function clearSubRows(tbname) {
|
|
599
|
-
let instance =
|
|
589
|
+
let instance = getSubTableInstance(tbname);
|
|
600
590
|
let rows = [...instance.getNewDataWithId(), ...subDataSource.value[tbname]];
|
|
601
591
|
if (!rows || rows.length == 0) {
|
|
602
592
|
return false;
|
|
@@ -611,7 +601,7 @@ const _sfc_main = {
|
|
|
611
601
|
if (!rows) {
|
|
612
602
|
return false;
|
|
613
603
|
}
|
|
614
|
-
let instance =
|
|
604
|
+
let instance = getSubTableInstance(tbname);
|
|
615
605
|
if (typeof rows == "object") {
|
|
616
606
|
instance.addRows(rows, true);
|
|
617
607
|
} else {
|
|
@@ -679,6 +669,10 @@ const _sfc_main = {
|
|
|
679
669
|
if (instance instanceof Array) {
|
|
680
670
|
instance = instance[0];
|
|
681
671
|
}
|
|
672
|
+
if (!instance) {
|
|
673
|
+
$message.warning("\u5B50\u8868ref\u627E\u4E0D\u5230:" + tableName2);
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
682
676
|
return instance;
|
|
683
677
|
}
|
|
684
678
|
function onOpenReportPrint() {
|
|
@@ -694,18 +688,10 @@ const _sfc_main = {
|
|
|
694
688
|
console.log("openSubFormModalForAdd", sub);
|
|
695
689
|
popTableName.value = sub.id;
|
|
696
690
|
popModalRequest.value = false;
|
|
697
|
-
openPopModal(true, {});
|
|
691
|
+
openPopModal(true, { isUpdate: false });
|
|
698
692
|
}
|
|
699
693
|
function openSubFormModalForEdit(sub) {
|
|
700
|
-
let ref2 =
|
|
701
|
-
if (!ref2 || !ref2.value) {
|
|
702
|
-
$message.warning("\u5B50\u8868ref\u627E\u4E0D\u5230:" + sub.key);
|
|
703
|
-
return;
|
|
704
|
-
}
|
|
705
|
-
ref2 = ref2.value;
|
|
706
|
-
if (Array.isArray(ref2)) {
|
|
707
|
-
ref2 = ref2[0];
|
|
708
|
-
}
|
|
694
|
+
let ref2 = getSubTableInstance(sub.key);
|
|
709
695
|
let arr = ref2.getSelectedData();
|
|
710
696
|
if (arr.length != 1) {
|
|
711
697
|
$message.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u6570\u636E");
|
|
@@ -719,26 +705,59 @@ const _sfc_main = {
|
|
|
719
705
|
const tableName2 = data[ONL_FORM_TABLE_NAME];
|
|
720
706
|
let record = omit(data, [ONL_FORM_TABLE_NAME]);
|
|
721
707
|
if (record.id) {
|
|
722
|
-
const ref2 = refMap[tableName2];
|
|
723
|
-
if (!ref2 || !ref2.value) {
|
|
724
|
-
$message.warning("\u5B50\u8868ref\u627E\u4E0D\u5230:" + tableName2);
|
|
725
|
-
return;
|
|
726
|
-
}
|
|
727
708
|
let values = omit(__spreadValues({}, record), "id");
|
|
728
709
|
let arr = [{ rowKey: record.id, values }];
|
|
729
|
-
let instance =
|
|
730
|
-
if (instance instanceof Array) {
|
|
731
|
-
instance = instance[0];
|
|
732
|
-
}
|
|
710
|
+
let instance = getSubTableInstance(tableName2);
|
|
733
711
|
instance.setValues(arr);
|
|
734
712
|
} else {
|
|
735
|
-
let instance =
|
|
736
|
-
if (instance instanceof Array) {
|
|
737
|
-
instance = instance[0];
|
|
738
|
-
}
|
|
713
|
+
let instance = getSubTableInstance(tableName2);
|
|
739
714
|
instance.addRows(record, { isOnlineJS: false, setActive: false, emitChange: true });
|
|
740
715
|
}
|
|
741
716
|
}
|
|
717
|
+
function onCloseModal() {
|
|
718
|
+
let arr = subTabInfo.value;
|
|
719
|
+
if (arr && arr.length > 0) {
|
|
720
|
+
for (let item of arr) {
|
|
721
|
+
if (item.relationType == 1)
|
|
722
|
+
;
|
|
723
|
+
else {
|
|
724
|
+
let inst = getSubTableInstance(item.key);
|
|
725
|
+
if (inst) {
|
|
726
|
+
inst.clearSelection();
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
function executeMainFillRule() {
|
|
733
|
+
let formData = getFieldsValue();
|
|
734
|
+
let fieldProperties = toRaw(defaultValueFields[tableName.value]);
|
|
735
|
+
loadFormFieldsDefVal(fieldProperties, (values) => {
|
|
736
|
+
setFieldsValue(values);
|
|
737
|
+
}, formData);
|
|
738
|
+
}
|
|
739
|
+
function executeSubFillRule(subKey, $event) {
|
|
740
|
+
let subList = subTabInfo.value;
|
|
741
|
+
if (subList && subList.length > 0) {
|
|
742
|
+
let arr = subList.filter((sub) => sub.key === subKey);
|
|
743
|
+
if (arr.length == 0) {
|
|
744
|
+
console.error("\u6CA1\u627E\u5230\u4E0E\u4E4B\u5339\u914D\u7684\u5B50\u8868", subKey);
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
if (arr[0].relationType == 1) {
|
|
748
|
+
let subInstance = getSubTableInstance(subKey);
|
|
749
|
+
subInstance.executeFillRule();
|
|
750
|
+
} else {
|
|
751
|
+
let subFieldProperties = toRaw(defaultValueFields[subKey]);
|
|
752
|
+
let row = toRaw($event.row);
|
|
753
|
+
loadFormFieldsDefVal(subFieldProperties, (values) => {
|
|
754
|
+
const { row: row2, target } = $event;
|
|
755
|
+
let v = [{ rowKey: row2.id, values: __spreadValues({}, values) }];
|
|
756
|
+
target.setValues(v);
|
|
757
|
+
}, row);
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}
|
|
742
761
|
let context = {
|
|
743
762
|
tableName,
|
|
744
763
|
loading,
|
|
@@ -759,7 +778,9 @@ const _sfc_main = {
|
|
|
759
778
|
changeOptions,
|
|
760
779
|
isUpdate,
|
|
761
780
|
getSubTableInstance,
|
|
762
|
-
updateSchema
|
|
781
|
+
updateSchema,
|
|
782
|
+
executeMainFillRule,
|
|
783
|
+
executeSubFillRule
|
|
763
784
|
};
|
|
764
785
|
resetContext(context);
|
|
765
786
|
return {
|
|
@@ -797,7 +818,8 @@ const _sfc_main = {
|
|
|
797
818
|
registerPopModal,
|
|
798
819
|
popTableName,
|
|
799
820
|
getPopFormData,
|
|
800
|
-
popModalRequest
|
|
821
|
+
popModalRequest,
|
|
822
|
+
onCloseModal
|
|
801
823
|
};
|
|
802
824
|
}
|
|
803
825
|
};
|
|
@@ -919,7 +941,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
919
941
|
id: $setup.popTableName,
|
|
920
942
|
onRegister: $setup.registerPopModal,
|
|
921
943
|
onSuccess: $setup.getPopFormData,
|
|
922
|
-
topTip: ""
|
|
944
|
+
topTip: "",
|
|
945
|
+
isVxeTableData: ""
|
|
923
946
|
}, null, 8, ["request", "id", "onRegister", "onSuccess"])
|
|
924
947
|
], 8, _hoisted_1);
|
|
925
948
|
}
|
package/OnlineFormDetail.js
CHANGED
|
@@ -155,7 +155,7 @@ const _sfc_main = {
|
|
|
155
155
|
}
|
|
156
156
|
function show(_status, record) {
|
|
157
157
|
return __async(this, null, function* () {
|
|
158
|
-
console.log("\u8FDB\u5165\u8BE6\u60C5\
|
|
158
|
+
console.log("\u8FDB\u5165\u8868\u5355\u8BE6\u60C5\u300B\u300Bform", record);
|
|
159
159
|
yield edit(record);
|
|
160
160
|
});
|
|
161
161
|
}
|
package/OnlineQueryForm.js
CHANGED
|
@@ -89,7 +89,7 @@ const _sfc_main = {
|
|
|
89
89
|
const LOAD_URL = "/online/cgform/api/getQueryInfoVue3/";
|
|
90
90
|
const onlineQueryFormRef = ref(null);
|
|
91
91
|
const formSchemas = ref([]);
|
|
92
|
-
const baseColProps = ref({ xs: 24, sm: 24, md: 12, lg:
|
|
92
|
+
const baseColProps = ref({ xs: 24, sm: 24, md: 12, lg: 6, xl: 6 });
|
|
93
93
|
const toggleButtonShow = ref(false);
|
|
94
94
|
const toggleSearchStatus = ref(false);
|
|
95
95
|
const queryParams = ref({});
|
|
@@ -182,7 +182,11 @@ const _sfc_main = {
|
|
|
182
182
|
hideFieldName.push(item.field);
|
|
183
183
|
item.isHidden();
|
|
184
184
|
}
|
|
185
|
-
|
|
185
|
+
let tempSchema = item.getFormItemSchema();
|
|
186
|
+
if (item.slot == "groupDatetime") {
|
|
187
|
+
tempSchema["colProps"] = { xs: 24, sm: 24, md: 12, lg: 8, xl: 8 };
|
|
188
|
+
}
|
|
189
|
+
schemaArray.push(tempSchema);
|
|
186
190
|
}
|
|
187
191
|
hideList.value = hideFieldName;
|
|
188
192
|
formSchemas.value = schemaArray;
|
|
@@ -346,7 +350,7 @@ const _sfc_main = {
|
|
|
346
350
|
};
|
|
347
351
|
}
|
|
348
352
|
};
|
|
349
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
353
|
+
const _withScopeId = (n) => (pushScopeId("data-v-716ddf4f"), n = n(), popScopeId(), n);
|
|
350
354
|
const _hoisted_1 = {
|
|
351
355
|
key: 0,
|
|
352
356
|
class: "jeecg-basic-table-form-container p-0"
|
|
@@ -470,5 +474,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
470
474
|
}, 8, ["onRegister"])
|
|
471
475
|
])) : createCommentVNode("", true);
|
|
472
476
|
}
|
|
473
|
-
var OnlineQueryForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
477
|
+
var OnlineQueryForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-716ddf4f"]]);
|
|
474
478
|
export { OnlineQueryForm as default };
|
package/OnlineSearchFormItem.js
CHANGED
|
@@ -219,7 +219,7 @@ const __default__ = defineComponent({
|
|
|
219
219
|
});
|
|
220
220
|
const __injectCSSVars__ = () => {
|
|
221
221
|
useCssVars((_ctx) => ({
|
|
222
|
-
"
|
|
222
|
+
"1e41a56d": _ctx.labelTextMaxWidth
|
|
223
223
|
}));
|
|
224
224
|
};
|
|
225
225
|
const __setup__ = __default__.setup;
|
|
@@ -228,7 +228,7 @@ __default__.setup = __setup__ ? (props, ctx) => {
|
|
|
228
228
|
return __setup__(props, ctx);
|
|
229
229
|
} : __injectCSSVars__;
|
|
230
230
|
const _sfc_main = __default__;
|
|
231
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
231
|
+
const _withScopeId = (n) => (pushScopeId("data-v-76dfb908"), n = n(), popScopeId(), n);
|
|
232
232
|
const _hoisted_1 = ["title"];
|
|
233
233
|
const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "group-query-strig" }, "~", -1));
|
|
234
234
|
const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "group-query-strig" }, "~", -1));
|
|
@@ -432,5 +432,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
432
432
|
_: 1
|
|
433
433
|
}, 8, ["labelCol"]);
|
|
434
434
|
}
|
|
435
|
-
var OnlineSearchFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
435
|
+
var OnlineSearchFormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-76dfb908"]]);
|
|
436
436
|
export { OnlineSearchFormItem as default };
|