@jeecg/online 3.4.4-beta2 → 3.5.3-beta2
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/AuthButtonTree.js +3 -1
- package/AuthDataTree.js +3 -1
- package/AuthFieldTree.js +3 -1
- package/AuthSetterModal.js +2 -4
- package/CgformCopyList.js +5 -6
- package/CgformModal.js +10 -2
- package/CheckDictTable.js +3 -2
- package/CodeGeneratorModal.js +2 -1
- package/DBAttributeTable.js +14 -2
- package/DetailForm.js +7 -8
- package/EnhanceJsHistory.js +1 -1
- package/FieldExtendJsonModal.js +14 -1
- package/LICENSE +4 -2
- package/OnlineAutoList.js +37 -23
- package/OnlineAutoModal.js +11 -11
- package/OnlineAutoTreeList.js +11 -12
- package/OnlineCustomModal.js +14 -13
- package/OnlineDetailModal.js +17 -11
- package/OnlineForm.js +108 -40
- package/OnlineFormDetail.js +34 -13
- package/OnlineQueryForm.js +17 -11
- package/OnlineSubFormDetail.js +8 -9
- package/PageAttributeTable.js +2 -2
- package/ProcessOnlineForm.js +11 -11
- package/SuperQuery.js +33 -8
- package/cgform.data.js +3 -1
- package/enhance.data.js +1 -1
- package/index.js +19 -17
- package/index2.js +4 -5
- package/package.json +1 -1
- package/style.css +1 -1
- package/useCgformList.js +15 -3
- package/{useAutoForm.js → useExtendComponent.js} +4750 -3501
- package/useListButton.js +13 -53
- package/useSchemas.js +82 -82
- package/FormSchemaFactory.js +0 -1211
package/OnlineCustomModal.js
CHANGED
|
@@ -20,26 +20,22 @@ var __async = (__this, __arguments, generator) => {
|
|
|
20
20
|
};
|
|
21
21
|
import { defineComponent, ref, nextTick, watch, reactive, markRaw, defineAsyncComponent, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode, resolveDynamicComponent } from "vue";
|
|
22
22
|
import { BasicModal, useModalInner } from "/@/components/Modal";
|
|
23
|
-
import { g as getRefPromise } from "./
|
|
23
|
+
import { g as getRefPromise } from "./useExtendComponent.js";
|
|
24
24
|
import { defHttp } from "/@/utils/http/axios";
|
|
25
|
-
import OnlineForm from "./OnlineForm.js";
|
|
25
|
+
import { O as OnlineForm } from "./OnlineForm.js";
|
|
26
26
|
import { importViewsFile } from "/@/utils";
|
|
27
27
|
import { _ as _export_sfc } from "./index.js";
|
|
28
|
-
import "
|
|
28
|
+
import "/@/components/Form/src/componentMap";
|
|
29
|
+
import "/@/utils/propTypes";
|
|
30
|
+
import "@ant-design/icons-vue";
|
|
31
|
+
import "/@/hooks/web/useMessage";
|
|
32
|
+
import "/@/components/Form/index";
|
|
29
33
|
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
30
34
|
import "/@/views/system/user/user.api";
|
|
31
35
|
import "./_commonjsHelpers.js";
|
|
32
36
|
import "/@/store/modules/user";
|
|
33
37
|
import "/@/utils/desform/customExpression";
|
|
34
|
-
import "/@/components/Form/src/componentMap";
|
|
35
|
-
import "./OnlineSelectCascade.js";
|
|
36
|
-
import "/@/hooks/web/useMessage";
|
|
37
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
38
|
-
import "vue-router";
|
|
39
38
|
import "/@/store/modules/permission";
|
|
40
|
-
import "/@/utils/propTypes";
|
|
41
|
-
import "@ant-design/icons-vue";
|
|
42
|
-
import "/@/components/Form/index";
|
|
43
39
|
import "/@/utils/dict/JDictSelectUtil";
|
|
44
40
|
import "/@/utils/common/compUtils";
|
|
45
41
|
import "./pick.js";
|
|
@@ -49,9 +45,12 @@ import "./toString.js";
|
|
|
49
45
|
import "./_arrayPush.js";
|
|
50
46
|
import "/@/components/Table";
|
|
51
47
|
import "/@/hooks/system/useListPage";
|
|
48
|
+
import "vue-router";
|
|
52
49
|
import "/@/components/Form/src/utils/Area";
|
|
53
50
|
import "/@/components/Preview/index";
|
|
54
51
|
import "./LinkTableListPiece.js";
|
|
52
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
53
|
+
import "./OnlineSelectCascade.js";
|
|
55
54
|
import "/@/components/Loading";
|
|
56
55
|
import "/@/utils/auth";
|
|
57
56
|
import "./JModalTip.js";
|
|
@@ -60,6 +59,7 @@ import "@vueuse/core";
|
|
|
60
59
|
import "/@/components/jeecg/JVxeTable/types";
|
|
61
60
|
import "/@/hooks/core/useContext";
|
|
62
61
|
import "/@/utils/mitt";
|
|
62
|
+
import "/@/utils/cache";
|
|
63
63
|
import "./omit.js";
|
|
64
64
|
import "./_baseClone.js";
|
|
65
65
|
import "./_baseSlice.js";
|
|
@@ -233,7 +233,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
233
233
|
}, _ctx.$attrs, {
|
|
234
234
|
style: _ctx.modalStyle,
|
|
235
235
|
onRegister: _ctx.registerModal,
|
|
236
|
-
wrapClassName: "jeecg-online-
|
|
236
|
+
wrapClassName: "jeecg-online-modal2",
|
|
237
237
|
onOk: _ctx.handleSubmit
|
|
238
238
|
}), {
|
|
239
239
|
footer: withCtx(() => [
|
|
@@ -266,7 +266,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
266
266
|
id: _ctx.id,
|
|
267
267
|
"form-template": _ctx.formTemplate,
|
|
268
268
|
onRendered: _ctx.renderSuccess,
|
|
269
|
-
onSuccess: _ctx.handleSuccess
|
|
269
|
+
onSuccess: _ctx.handleSuccess,
|
|
270
|
+
modalClass: "jeecg-online-modal2"
|
|
270
271
|
}, null, 8, ["id", "form-template", "onRendered", "onSuccess"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.customFormComponent.is), {
|
|
271
272
|
key: 1,
|
|
272
273
|
ref: "customFormRef",
|
package/OnlineDetailModal.js
CHANGED
|
@@ -18,10 +18,10 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import { defineComponent, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode } from "vue";
|
|
21
|
+
import { defineComponent, ref, watch, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createTextVNode } from "vue";
|
|
22
22
|
import { BasicModal } from "/@/components/Modal";
|
|
23
23
|
import OnlineFormDetail from "./OnlineFormDetail.js";
|
|
24
|
-
import {
|
|
24
|
+
import { p as useAutoModal } from "./useExtendComponent.js";
|
|
25
25
|
import CommentPanel from "/@/components/jeecg/comment/CommentPanel.vue";
|
|
26
26
|
import { _ as _export_sfc } from "./index.js";
|
|
27
27
|
import "/@/hooks/web/useMessage";
|
|
@@ -39,18 +39,14 @@ import "/@/utils/http/axios";
|
|
|
39
39
|
import "/@/components/Form/src/utils/Area";
|
|
40
40
|
import "/@/utils/common/compUtils";
|
|
41
41
|
import "/@/components/Preview/index";
|
|
42
|
-
import "
|
|
42
|
+
import "/@/components/Form/src/componentMap";
|
|
43
|
+
import "/@/components/Form/index";
|
|
43
44
|
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
44
45
|
import "/@/views/system/user/user.api";
|
|
45
46
|
import "./_commonjsHelpers.js";
|
|
46
47
|
import "/@/store/modules/user";
|
|
47
48
|
import "/@/utils/desform/customExpression";
|
|
48
|
-
import "/@/components/Form/src/componentMap";
|
|
49
|
-
import "./OnlineSelectCascade.js";
|
|
50
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
51
|
-
import "vue-router";
|
|
52
49
|
import "/@/store/modules/permission";
|
|
53
|
-
import "/@/components/Form/index";
|
|
54
50
|
import "./pick.js";
|
|
55
51
|
import "./_flatRest.js";
|
|
56
52
|
import "./isArray.js";
|
|
@@ -58,7 +54,10 @@ import "./toString.js";
|
|
|
58
54
|
import "./_arrayPush.js";
|
|
59
55
|
import "/@/components/Table";
|
|
60
56
|
import "/@/hooks/system/useListPage";
|
|
57
|
+
import "vue-router";
|
|
61
58
|
import "./LinkTableListPiece.js";
|
|
59
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
60
|
+
import "./OnlineSelectCascade.js";
|
|
62
61
|
import "./JModalTip.js";
|
|
63
62
|
import "ant-design-vue";
|
|
64
63
|
import "@vueuse/core";
|
|
@@ -78,8 +77,13 @@ const _sfc_main = defineComponent({
|
|
|
78
77
|
CommentPanel
|
|
79
78
|
},
|
|
80
79
|
emits: ["success", "register"],
|
|
81
|
-
setup(props) {
|
|
80
|
+
setup(props, { emit }) {
|
|
82
81
|
console.log("\u8FDB\u5165\u8868\u5355\u5F39\u6846\u300B\u300B\u300B\u300Bmodal");
|
|
82
|
+
const commentPanelRef = ref();
|
|
83
|
+
function reloadComment() {
|
|
84
|
+
if (commentPanelRef.value)
|
|
85
|
+
commentPanelRef.value.reload();
|
|
86
|
+
}
|
|
83
87
|
const {
|
|
84
88
|
title,
|
|
85
89
|
modalWidth,
|
|
@@ -101,7 +105,7 @@ const _sfc_main = defineComponent({
|
|
|
101
105
|
tableName,
|
|
102
106
|
formDataId,
|
|
103
107
|
enableComment
|
|
104
|
-
} = useAutoModal();
|
|
108
|
+
} = useAutoModal(false, { emit }, reloadComment);
|
|
105
109
|
watch(() => props.id, renderFormItems, { immediate: true });
|
|
106
110
|
function renderFormItems() {
|
|
107
111
|
return __async(this, null, function* () {
|
|
@@ -131,7 +135,8 @@ const _sfc_main = defineComponent({
|
|
|
131
135
|
showSub,
|
|
132
136
|
tableName,
|
|
133
137
|
formDataId,
|
|
134
|
-
enableComment
|
|
138
|
+
enableComment,
|
|
139
|
+
commentPanelRef
|
|
135
140
|
};
|
|
136
141
|
return that;
|
|
137
142
|
}
|
|
@@ -164,6 +169,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
164
169
|
]),
|
|
165
170
|
comment: withCtx(() => [
|
|
166
171
|
createVNode(_component_comment_panel, {
|
|
172
|
+
ref: "commentPanelRef",
|
|
167
173
|
tableName: _ctx.tableName,
|
|
168
174
|
dataId: _ctx.formDataId
|
|
169
175
|
}, null, 8, ["tableName", "dataId"])
|
package/OnlineForm.js
CHANGED
|
@@ -34,13 +34,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
34
34
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
+
import * as HOOK_MESSAGE from "/@/hooks/web/useMessage";
|
|
37
38
|
import { useMessage } from "/@/hooks/web/useMessage";
|
|
39
|
+
import * as vue from "vue";
|
|
38
40
|
import { ref, reactive, computed, resolveComponent, openBlock, createElementBlock, createVNode, createCommentVNode, createBlock, withCtx, Fragment, renderList, normalizeStyle, renderSlot, unref, nextTick, toRaw } from "vue";
|
|
39
41
|
import { BasicForm, useForm } from "/@/components/Form/index";
|
|
40
|
-
import { V as VALIDATE_FAILED, S as SUBMIT_FLOW_KEY,
|
|
42
|
+
import { O as OnlineSubForm, a as OnlinePopModal, b as useOnlineFormContext, c as useFormItems, d as useEnhance, l as loadFormFieldsDefVal, g as getRefPromise, V as VALIDATE_FAILED, S as SUBMIT_FLOW_KEY, e as SUBMIT_FLOW_ID, f as ONL_FORM_TABLE_NAME } from "./useExtendComponent.js";
|
|
43
|
+
import * as UTIL_AXIOS from "/@/utils/http/axios";
|
|
41
44
|
import { defHttp } from "/@/utils/http/axios";
|
|
42
45
|
import { sleep, goJmReportViewPage } from "/@/utils";
|
|
43
|
-
import { O as OnlineSubForm, a as OnlinePopModal, u as useOnlineFormContext, b as useFormItems, c as useEnhance, l as loadFormFieldsDefVal, g as getRefPromise } from "./useAutoForm.js";
|
|
44
46
|
import { Loading } from "/@/components/Loading";
|
|
45
47
|
import "/@/components/jeecg/JVxeTable/types";
|
|
46
48
|
import { getToken } from "/@/utils/auth";
|
|
@@ -48,36 +50,64 @@ import { PrinterOutlined, DiffOutlined, FormOutlined } from "@ant-design/icons-v
|
|
|
48
50
|
import "/@/hooks/core/useContext";
|
|
49
51
|
import "/@/utils/mitt";
|
|
50
52
|
import { useModal } from "/@/components/Modal";
|
|
53
|
+
import * as UTIL_CACHE from "/@/utils/cache";
|
|
54
|
+
import { randomString } from "/@/utils/common/compUtils";
|
|
55
|
+
import * as HOOK_USERINFO from "/@/store/modules/user";
|
|
51
56
|
import { _ as _export_sfc } from "./index.js";
|
|
52
57
|
import { p as pick } from "./pick.js";
|
|
53
58
|
import { o as omit } from "./omit.js";
|
|
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
|
-
|
|
59
|
+
const $exports = {
|
|
60
|
+
vue,
|
|
61
|
+
"@": {
|
|
62
|
+
hooks: {
|
|
63
|
+
useMessage: HOOK_MESSAGE,
|
|
64
|
+
useUserStore: HOOK_USERINFO
|
|
65
|
+
},
|
|
66
|
+
utils: {
|
|
67
|
+
axios: UTIL_AXIOS,
|
|
68
|
+
cache: UTIL_CACHE
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
function useCustomHook(otherExports, context) {
|
|
73
|
+
const assignExports = Object.assign({}, $exports, otherExports);
|
|
74
|
+
function doImport(path) {
|
|
75
|
+
if (path != null && path != "") {
|
|
76
|
+
let paths = path.toString().split("/");
|
|
77
|
+
let result = assignExports[paths[0]];
|
|
78
|
+
for (let i = 1; i < paths.length; i++) {
|
|
79
|
+
result = result[paths[i]];
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function doExport() {
|
|
86
|
+
}
|
|
87
|
+
function executeJsEnhanced(code, row) {
|
|
88
|
+
let randomKey = randomString(6);
|
|
89
|
+
let exportKey = "__export_" + randomKey;
|
|
90
|
+
if (row) {
|
|
91
|
+
const executeCode = `return function (row, customImport, ${exportKey}) {"use strict"; ${code}}`;
|
|
92
|
+
console.group("executeJsEnhanced");
|
|
93
|
+
console.log(executeCode);
|
|
94
|
+
console.groupEnd();
|
|
95
|
+
const fun = new Function(executeCode)();
|
|
96
|
+
fun.call(context, row, doImport, doExport);
|
|
97
|
+
} else {
|
|
98
|
+
const executeCode = `return function (customImport, ${exportKey}) {"use strict"; ${code}}`;
|
|
99
|
+
console.group("executeJsEnhanced");
|
|
100
|
+
console.log(executeCode);
|
|
101
|
+
console.groupEnd();
|
|
102
|
+
const fun = new Function(executeCode)();
|
|
103
|
+
fun.call(context, doImport, doExport);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return {
|
|
107
|
+
executeJsEnhanced
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
const GET_FUN_BODY_REG = /(?:\/\*[\s\S]*?\*\/|\/\/.*?\r?\n|[^{])+\{([\s\S]*)\}$/;
|
|
81
111
|
const urlObject = {
|
|
82
112
|
optPre: "/online/cgform/api/form/",
|
|
83
113
|
urlButtonAction: "/online/cgform/api/doButton"
|
|
@@ -117,6 +147,10 @@ const _sfc_main = {
|
|
|
117
147
|
submitTip: {
|
|
118
148
|
type: Boolean,
|
|
119
149
|
default: true
|
|
150
|
+
},
|
|
151
|
+
modalClass: {
|
|
152
|
+
type: String,
|
|
153
|
+
default: ""
|
|
120
154
|
}
|
|
121
155
|
},
|
|
122
156
|
emits: ["success", "rendered"],
|
|
@@ -156,6 +190,7 @@ const _sfc_main = {
|
|
|
156
190
|
fieldDisplayStatus
|
|
157
191
|
} = useFormItems(props, onlineFormRef);
|
|
158
192
|
let { EnhanceJS, initCgEnhanceJs } = useEnhance(onlineFormContext, false);
|
|
193
|
+
const { executeJsEnhanced } = useCustomHook({}, onlineFormContext);
|
|
159
194
|
const [registerForm, { setProps, validate, resetFields, setFieldsValue, updateSchema, getFieldsValue, scrollToField }] = useForm({
|
|
160
195
|
schemas: formSchemas,
|
|
161
196
|
showActionButtonGroup: false,
|
|
@@ -296,11 +331,21 @@ const _sfc_main = {
|
|
|
296
331
|
if (changeFormData) {
|
|
297
332
|
setFieldsValue(changeFormData);
|
|
298
333
|
}
|
|
334
|
+
onChangeEvent(field, value, changeFormData);
|
|
299
335
|
};
|
|
336
|
+
if (EnhanceJS && EnhanceJS["setup"]) {
|
|
337
|
+
executeEnhanceFormJsHook(EnhanceJS["setup"]);
|
|
338
|
+
}
|
|
300
339
|
});
|
|
301
340
|
}
|
|
341
|
+
function onChangeEvent(field, value, changeFormData) {
|
|
342
|
+
onlineFormContext.changEvent(field, value, changeFormData);
|
|
343
|
+
}
|
|
344
|
+
function onlineFormValueChange(callback) {
|
|
345
|
+
onlineFormContext.addObject2Context("changEvent", callback);
|
|
346
|
+
}
|
|
302
347
|
function handleExtConfigJson(jsonStr) {
|
|
303
|
-
let extConfigJson = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen:
|
|
348
|
+
let extConfigJson = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 0, modalMinWidth: "", commentStatus: 0 };
|
|
304
349
|
if (jsonStr) {
|
|
305
350
|
extConfigJson = JSON.parse(jsonStr);
|
|
306
351
|
}
|
|
@@ -532,7 +577,9 @@ const _sfc_main = {
|
|
|
532
577
|
}
|
|
533
578
|
function handleAdded(sub, event) {
|
|
534
579
|
console.log("handleAdded", sub, event);
|
|
535
|
-
|
|
580
|
+
if (!event.isModalData) {
|
|
581
|
+
handleSubTableDefaultValue(sub, event);
|
|
582
|
+
}
|
|
536
583
|
}
|
|
537
584
|
function getSubTableAuthPre(table) {
|
|
538
585
|
return "online_" + table + ":";
|
|
@@ -557,10 +604,21 @@ const _sfc_main = {
|
|
|
557
604
|
}
|
|
558
605
|
});
|
|
559
606
|
}
|
|
607
|
+
function executeEnhanceFormJsHook(funStr) {
|
|
608
|
+
let str = funStr.toLocaleString();
|
|
609
|
+
let arr = str.match(GET_FUN_BODY_REG);
|
|
610
|
+
if (arr.length > 1) {
|
|
611
|
+
let temp = arr[1];
|
|
612
|
+
executeJsEnhanced(temp);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
560
615
|
function handleCgButtonClick(optType, buttonCode) {
|
|
561
616
|
if ("js" == optType) {
|
|
617
|
+
let hookFunName = buttonCode + "_hook";
|
|
562
618
|
if (EnhanceJS && EnhanceJS[buttonCode]) {
|
|
563
619
|
EnhanceJS[buttonCode].call(onlineFormContext, onlineFormContext);
|
|
620
|
+
} else if (EnhanceJS && EnhanceJS[hookFunName]) {
|
|
621
|
+
executeEnhanceFormJsHook(EnhanceJS[hookFunName]);
|
|
564
622
|
}
|
|
565
623
|
} else if ("action" == optType) {
|
|
566
624
|
let formData = dbData.value;
|
|
@@ -653,7 +711,7 @@ const _sfc_main = {
|
|
|
653
711
|
}
|
|
654
712
|
function handleCustomFormEdit(record, editSubmitUrl) {
|
|
655
713
|
return __async(this, null, function* () {
|
|
656
|
-
console.log("\u81EA\u5B9A\u4E49\u5F39\u7A97\u6253\u5F00online\u8868\
|
|
714
|
+
console.log("\u81EA\u5B9A\u4E49\u5F39\u7A97\u6253\u5F00online\u8868\u53552\u300B\u300Bform", record);
|
|
657
715
|
customEditSubmitUrl.value = editSubmitUrl;
|
|
658
716
|
yield resetFields();
|
|
659
717
|
dbData.value = "";
|
|
@@ -688,7 +746,7 @@ const _sfc_main = {
|
|
|
688
746
|
console.log("openSubFormModalForAdd", sub);
|
|
689
747
|
popTableName.value = sub.id;
|
|
690
748
|
popModalRequest.value = false;
|
|
691
|
-
openPopModal(true, { isUpdate: false });
|
|
749
|
+
openPopModal(true, { isUpdate: false, tableType: "3" });
|
|
692
750
|
}
|
|
693
751
|
function openSubFormModalForEdit(sub) {
|
|
694
752
|
let ref2 = getSubTableInstance(sub.key);
|
|
@@ -711,7 +769,7 @@ const _sfc_main = {
|
|
|
711
769
|
instance.setValues(arr);
|
|
712
770
|
} else {
|
|
713
771
|
let instance = getSubTableInstance(tableName2);
|
|
714
|
-
instance.addRows(record, { isOnlineJS: false, setActive: false, emitChange: true });
|
|
772
|
+
instance.addRows(record, { isOnlineJS: false, setActive: false, emitChange: true, isModalData: true });
|
|
715
773
|
}
|
|
716
774
|
}
|
|
717
775
|
function onCloseModal() {
|
|
@@ -780,7 +838,10 @@ const _sfc_main = {
|
|
|
780
838
|
getSubTableInstance,
|
|
781
839
|
updateSchema,
|
|
782
840
|
executeMainFillRule,
|
|
783
|
-
executeSubFillRule
|
|
841
|
+
executeSubFillRule,
|
|
842
|
+
changEvent: () => {
|
|
843
|
+
},
|
|
844
|
+
onlineFormValueChange
|
|
784
845
|
};
|
|
785
846
|
resetContext(context);
|
|
786
847
|
return {
|
|
@@ -902,7 +963,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
902
963
|
onExecuteFillRule: ($event) => $setup.handleSubTableDefaultValue(sub, $event)
|
|
903
964
|
}, {
|
|
904
965
|
toolbarSuffix: withCtx(() => [
|
|
905
|
-
|
|
966
|
+
!$setup.onlineFormDisabled ? (openBlock(), createBlock(_component_a_button, {
|
|
967
|
+
key: 0,
|
|
906
968
|
type: "primary",
|
|
907
969
|
onClick: ($event) => $setup.openSubFormModalForAdd(sub)
|
|
908
970
|
}, {
|
|
@@ -910,8 +972,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
910
972
|
createVNode(_component_diff_outlined)
|
|
911
973
|
]),
|
|
912
974
|
_: 2
|
|
913
|
-
}, 1032, ["onClick"]),
|
|
914
|
-
|
|
975
|
+
}, 1032, ["onClick"])) : createCommentVNode("", true),
|
|
976
|
+
!$setup.onlineFormDisabled ? (openBlock(), createBlock(_component_a_button, {
|
|
977
|
+
key: 1,
|
|
915
978
|
type: "primary",
|
|
916
979
|
onClick: ($event) => $setup.openSubFormModalForEdit(sub)
|
|
917
980
|
}, {
|
|
@@ -919,7 +982,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
919
982
|
createVNode(_component_form_outlined)
|
|
920
983
|
]),
|
|
921
984
|
_: 2
|
|
922
|
-
}, 1032, ["onClick"])
|
|
985
|
+
}, 1032, ["onClick"])) : createCommentVNode("", true)
|
|
923
986
|
]),
|
|
924
987
|
_: 2
|
|
925
988
|
}, 1032, ["height", "disabled", "columns", "dataSource", "onValueChange", "authPre", "onAdded", "onExecuteFillRule"])
|
|
@@ -937,6 +1000,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
937
1000
|
}, null, 8, ["loading"]),
|
|
938
1001
|
renderSlot(_ctx.$slots, "bottom"),
|
|
939
1002
|
createVNode(_component_online_pop_modal, {
|
|
1003
|
+
formTableType: "3",
|
|
940
1004
|
request: $setup.popModalRequest,
|
|
941
1005
|
id: $setup.popTableName,
|
|
942
1006
|
onRegister: $setup.registerPopModal,
|
|
@@ -947,4 +1011,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
947
1011
|
], 8, _hoisted_1);
|
|
948
1012
|
}
|
|
949
1013
|
var OnlineForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
950
|
-
|
|
1014
|
+
var OnlineForm$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1015
|
+
__proto__: null,
|
|
1016
|
+
"default": OnlineForm
|
|
1017
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1018
|
+
export { GET_FUN_BODY_REG as G, OnlineForm as O, OnlineForm$1 as a, useCustomHook as u };
|
package/OnlineFormDetail.js
CHANGED
|
@@ -42,7 +42,7 @@ import { goJmReportViewPage } from "/@/utils";
|
|
|
42
42
|
import { PrinterOutlined } from "@ant-design/icons-vue";
|
|
43
43
|
import DetailForm from "./DetailForm.js";
|
|
44
44
|
import OnlineSubFormDetail from "./OnlineSubFormDetail.js";
|
|
45
|
-
import {
|
|
45
|
+
import { h as getDetailFormSchemas } from "./useExtendComponent.js";
|
|
46
46
|
import { defHttp } from "/@/utils/http/axios";
|
|
47
47
|
import { _ as _export_sfc } from "./index.js";
|
|
48
48
|
import "/@/utils/propTypes";
|
|
@@ -54,18 +54,14 @@ import "/@/components/Form/src/utils/Area";
|
|
|
54
54
|
import "/@/utils/common/compUtils";
|
|
55
55
|
import "/@/components/Preview/index";
|
|
56
56
|
import "/@/components/Form/index";
|
|
57
|
-
import "
|
|
57
|
+
import "/@/components/Form/src/componentMap";
|
|
58
|
+
import "/@/components/Modal";
|
|
58
59
|
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
59
60
|
import "/@/views/system/user/user.api";
|
|
60
61
|
import "./_commonjsHelpers.js";
|
|
61
62
|
import "/@/store/modules/user";
|
|
62
63
|
import "/@/utils/desform/customExpression";
|
|
63
|
-
import "/@/components/Form/src/componentMap";
|
|
64
|
-
import "./OnlineSelectCascade.js";
|
|
65
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
66
|
-
import "vue-router";
|
|
67
64
|
import "/@/store/modules/permission";
|
|
68
|
-
import "/@/components/Modal";
|
|
69
65
|
import "./pick.js";
|
|
70
66
|
import "./_flatRest.js";
|
|
71
67
|
import "./isArray.js";
|
|
@@ -73,7 +69,10 @@ import "./toString.js";
|
|
|
73
69
|
import "./_arrayPush.js";
|
|
74
70
|
import "/@/components/Table";
|
|
75
71
|
import "/@/hooks/system/useListPage";
|
|
72
|
+
import "vue-router";
|
|
76
73
|
import "./LinkTableListPiece.js";
|
|
74
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
75
|
+
import "./OnlineSelectCascade.js";
|
|
77
76
|
import "./JModalTip.js";
|
|
78
77
|
import "ant-design-vue";
|
|
79
78
|
import "@vueuse/core";
|
|
@@ -133,7 +132,7 @@ const _sfc_main = {
|
|
|
133
132
|
modelFullscreen: 0,
|
|
134
133
|
modalMinWidth: ""
|
|
135
134
|
});
|
|
136
|
-
const { detailFormSchemas, hasSubTable, subTabInfo, refMap, subDataSource, createFormSchemas, formSpan } = getDetailFormSchemas(props);
|
|
135
|
+
const { detailFormSchemas, hasSubTable, subTabInfo, refMap, showStatus, subDataSource, createFormSchemas, formSpan } = getDetailFormSchemas(props);
|
|
137
136
|
function handleExtConfigJson(jsonStr) {
|
|
138
137
|
let extConfigJson = { reportPrintShow: 0, reportPrintUrl: "", joinQuery: 0, modelFullscreen: 1, modalMinWidth: "" };
|
|
139
138
|
if (jsonStr) {
|
|
@@ -157,6 +156,7 @@ const _sfc_main = {
|
|
|
157
156
|
return __async(this, null, function* () {
|
|
158
157
|
console.log("\u8FDB\u5165\u8868\u5355\u8BE6\u60C5\u300B\u300Bform", record);
|
|
159
158
|
yield edit(record);
|
|
159
|
+
changeShowStatus(true);
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
function getFormData(dataId) {
|
|
@@ -174,6 +174,17 @@ const _sfc_main = {
|
|
|
174
174
|
});
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
+
function changeShowStatus(flag) {
|
|
178
|
+
Object.keys(showStatus).map((k) => {
|
|
179
|
+
showStatus[k] = flag;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function onTabChange() {
|
|
183
|
+
changeShowStatus(false);
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
changeShowStatus(true);
|
|
186
|
+
}, 300);
|
|
187
|
+
}
|
|
177
188
|
function edit(record) {
|
|
178
189
|
return __async(this, null, function* () {
|
|
179
190
|
let temp = yield getFormData(record.id);
|
|
@@ -235,13 +246,15 @@ const _sfc_main = {
|
|
|
235
246
|
subFormHeight,
|
|
236
247
|
subTableHeight,
|
|
237
248
|
refMap,
|
|
249
|
+
onTabChange,
|
|
238
250
|
subDataSource,
|
|
239
251
|
getSubTableAuthPre,
|
|
240
252
|
show,
|
|
241
253
|
createRootProperties,
|
|
242
254
|
onOpenReportPrint,
|
|
243
255
|
onlineExtConfigJson,
|
|
244
|
-
getSubTableForeignKeyValue
|
|
256
|
+
getSubTableForeignKeyValue,
|
|
257
|
+
showStatus
|
|
245
258
|
};
|
|
246
259
|
}
|
|
247
260
|
};
|
|
@@ -256,6 +269,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
256
269
|
const _component_detail_form = resolveComponent("detail-form");
|
|
257
270
|
const _component_online_sub_form_detail = resolveComponent("online-sub-form-detail");
|
|
258
271
|
const _component_JVxeTable = resolveComponent("JVxeTable");
|
|
272
|
+
const _component_a_spin = resolveComponent("a-spin");
|
|
259
273
|
const _component_a_tab_pane = resolveComponent("a-tab-pane");
|
|
260
274
|
const _component_a_tabs = resolveComponent("a-tabs");
|
|
261
275
|
const _component_Loading = resolveComponent("Loading");
|
|
@@ -274,7 +288,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
274
288
|
data: $setup.formData,
|
|
275
289
|
span: $setup.formSpan
|
|
276
290
|
}, null, 8, ["schemas", "data", "span"]),
|
|
277
|
-
$setup.hasSubTable && $props.showSub ? (openBlock(), createBlock(_component_a_tabs, {
|
|
291
|
+
$setup.hasSubTable && $props.showSub ? (openBlock(), createBlock(_component_a_tabs, {
|
|
292
|
+
key: 1,
|
|
293
|
+
onChange: $setup.onTabChange
|
|
294
|
+
}, {
|
|
278
295
|
default: withCtx(() => [
|
|
279
296
|
(openBlock(true), createElementBlock(Fragment, null, renderList($setup.subTabInfo, (sub, index) => {
|
|
280
297
|
return openBlock(), createBlock(_component_a_tab_pane, {
|
|
@@ -294,7 +311,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
294
311
|
properties: sub.properties
|
|
295
312
|
}, null, 8, ["table", "form-template", "main-id", "properties"])
|
|
296
313
|
], 4)) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
297
|
-
|
|
314
|
+
$setup.showStatus[sub.key] ? (openBlock(), createBlock(_component_JVxeTable, {
|
|
315
|
+
key: 0,
|
|
298
316
|
ref_for: true,
|
|
299
317
|
ref: $setup.refMap[sub.key],
|
|
300
318
|
toolbar: "",
|
|
@@ -306,7 +324,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
306
324
|
columns: sub.columns,
|
|
307
325
|
dataSource: $setup.subDataSource[sub.key],
|
|
308
326
|
authPre: $setup.getSubTableAuthPre(sub.key)
|
|
309
|
-
}, null, 8, ["height", "columns", "dataSource", "authPre"])
|
|
327
|
+
}, null, 8, ["height", "columns", "dataSource", "authPre"])) : (openBlock(), createBlock(_component_a_spin, {
|
|
328
|
+
key: 1,
|
|
329
|
+
spinning: true
|
|
330
|
+
}))
|
|
310
331
|
]))
|
|
311
332
|
]),
|
|
312
333
|
_: 2
|
|
@@ -314,7 +335,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
314
335
|
}), 128))
|
|
315
336
|
]),
|
|
316
337
|
_: 1
|
|
317
|
-
})) : createCommentVNode("", true),
|
|
338
|
+
}, 8, ["onChange"])) : createCommentVNode("", true),
|
|
318
339
|
createVNode(_component_Loading, {
|
|
319
340
|
loading: $setup.loading,
|
|
320
341
|
absolute: false
|
package/OnlineQueryForm.js
CHANGED
|
@@ -38,23 +38,19 @@ import { BasicForm, useForm } from "/@/components/Form/index";
|
|
|
38
38
|
import { ref, reactive, watch, toRaw, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createCommentVNode, pushScopeId, popScopeId } from "vue";
|
|
39
39
|
import { defHttp } from "/@/utils/http/axios";
|
|
40
40
|
import { useMessage } from "/@/hooks/web/useMessage";
|
|
41
|
-
import {
|
|
42
|
-
import { g as getRefPromise, e as loadOneFieldDefVal, f as LINK_DOWN, h as handleLinkDown, i as getFieldIndex } from "./useAutoForm.js";
|
|
41
|
+
import { u as useExtendComponent, g as getRefPromise, i as FORM_VIEW_TO_QUERY_VIEW, j as loadOneFieldDefVal, F as FormSchemaFactory, k as LINK_DOWN, m as handleLinkDown, n as getFieldIndex } from "./useExtendComponent.js";
|
|
43
42
|
import { _ as _export_sfc } from "./index.js";
|
|
43
|
+
import "/@/components/Form/src/componentMap";
|
|
44
|
+
import "/@/utils/propTypes";
|
|
45
|
+
import "@ant-design/icons-vue";
|
|
46
|
+
import "/@/components/Modal";
|
|
44
47
|
import "/@/components/Form/src/jeecg/components/JUpload";
|
|
45
48
|
import "/@/views/system/user/user.api";
|
|
46
49
|
import "./_commonjsHelpers.js";
|
|
47
50
|
import "/@/store/modules/user";
|
|
48
51
|
import "/@/utils";
|
|
49
52
|
import "/@/utils/desform/customExpression";
|
|
50
|
-
import "/@/components/Form/src/componentMap";
|
|
51
|
-
import "./OnlineSelectCascade.js";
|
|
52
|
-
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
53
|
-
import "vue-router";
|
|
54
53
|
import "/@/store/modules/permission";
|
|
55
|
-
import "/@/utils/propTypes";
|
|
56
|
-
import "@ant-design/icons-vue";
|
|
57
|
-
import "/@/components/Modal";
|
|
58
54
|
import "/@/utils/dict/JDictSelectUtil";
|
|
59
55
|
import "/@/utils/common/compUtils";
|
|
60
56
|
import "./pick.js";
|
|
@@ -64,9 +60,12 @@ import "./toString.js";
|
|
|
64
60
|
import "./_arrayPush.js";
|
|
65
61
|
import "/@/components/Table";
|
|
66
62
|
import "/@/hooks/system/useListPage";
|
|
63
|
+
import "vue-router";
|
|
67
64
|
import "/@/components/Form/src/utils/Area";
|
|
68
65
|
import "/@/components/Preview/index";
|
|
69
66
|
import "./LinkTableListPiece.js";
|
|
67
|
+
import "/@/components/jeecg/OnLine/JPopupOnlReport.vue";
|
|
68
|
+
import "./OnlineSelectCascade.js";
|
|
70
69
|
import "/@/components/Loading";
|
|
71
70
|
import "/@/utils/auth";
|
|
72
71
|
import "./JModalTip.js";
|
|
@@ -95,6 +94,7 @@ const _sfc_main = {
|
|
|
95
94
|
const queryParams = ref({});
|
|
96
95
|
const hideList = ref([]);
|
|
97
96
|
const { createMessage: $message } = useMessage();
|
|
97
|
+
const { linkTableCard2Select } = useExtendComponent();
|
|
98
98
|
const defaultValues = reactive({
|
|
99
99
|
config: {},
|
|
100
100
|
cache: {},
|
|
@@ -136,6 +136,11 @@ const _sfc_main = {
|
|
|
136
136
|
let keys = Object.keys(formProperties);
|
|
137
137
|
for (let key of keys) {
|
|
138
138
|
const item = formProperties[key];
|
|
139
|
+
if (key === "sys_org_code") {
|
|
140
|
+
if (!item.fieldExtendJson) {
|
|
141
|
+
item.fieldExtendJson = '{"store":"orgCode"}';
|
|
142
|
+
}
|
|
143
|
+
}
|
|
139
144
|
let view = item.view;
|
|
140
145
|
if (FORM_VIEW_TO_QUERY_VIEW[view]) {
|
|
141
146
|
item.view = FORM_VIEW_TO_QUERY_VIEW[view];
|
|
@@ -186,6 +191,7 @@ const _sfc_main = {
|
|
|
186
191
|
if (item.slot == "groupDatetime") {
|
|
187
192
|
tempSchema["colProps"] = { xs: 24, sm: 24, md: 12, lg: 8, xl: 8 };
|
|
188
193
|
}
|
|
194
|
+
linkTableCard2Select(tempSchema);
|
|
189
195
|
schemaArray.push(tempSchema);
|
|
190
196
|
}
|
|
191
197
|
hideList.value = hideFieldName;
|
|
@@ -350,7 +356,7 @@ const _sfc_main = {
|
|
|
350
356
|
};
|
|
351
357
|
}
|
|
352
358
|
};
|
|
353
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
359
|
+
const _withScopeId = (n) => (pushScopeId("data-v-4b8f6d7a"), n = n(), popScopeId(), n);
|
|
354
360
|
const _hoisted_1 = {
|
|
355
361
|
key: 0,
|
|
356
362
|
class: "jeecg-basic-table-form-container p-0"
|
|
@@ -474,5 +480,5 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
474
480
|
}, 8, ["onRegister"])
|
|
475
481
|
])) : createCommentVNode("", true);
|
|
476
482
|
}
|
|
477
|
-
var OnlineQueryForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
483
|
+
var OnlineQueryForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-4b8f6d7a"]]);
|
|
478
484
|
export { OnlineQueryForm as default };
|