super-page-runtime 2.2.23 → 2.2.29
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/dist/es/components/runtime/utils/events/event-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/event-util.js +147 -135
- package/dist/es/components/runtime/utils/events/standard-event.js +35 -35
- package/dist/es/components/runtime/utils/page-helper-util.js +56 -55
- package/dist/es/components/runtime/utils/page-init-util.js +61 -54
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +39 -37
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +72 -71
- package/dist/es/components/runtime/views/home-chart.vue.js +3 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -6
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/package.json +2 -2
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
3
|
import { PageDimensions as s } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as
|
|
4
|
+
import { getFormPropName as i, getValueFromVariable as n, setVariableValue as o, formatVariableValue as r } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as l } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as a } from "./api/page-expose-util.js";
|
|
7
7
|
import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
|
|
8
8
|
import { packageCustomValidator as d } from "./events/validator-util.js";
|
|
9
|
-
|
|
9
|
+
import { isMobileBrowser as m } from "agilebuilder-ui/src/utils/common-util";
|
|
10
|
+
function f(t2) {
|
|
10
11
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
|
|
11
12
|
}
|
|
12
13
|
function c(e2) {
|
|
13
14
|
var _a;
|
|
14
15
|
if (null == e2) return null;
|
|
15
|
-
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList:
|
|
16
|
+
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: g(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
16
17
|
if (e2.props && e2.props.notIdInitializationList) {
|
|
17
18
|
let s2 = e2.props.notIdInitializationList;
|
|
18
19
|
"string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
|
|
@@ -21,13 +22,19 @@ function c(e2) {
|
|
|
21
22
|
const s2 = t2.entity.page;
|
|
22
23
|
for (const t3 of e2.variables) t3.name && (t3.isArrayElement ? s2[t3.name] = [] : t3.defaultValue ? s2[t3.name] = t3.defaultValue : s2[t3.name] = void 0);
|
|
23
24
|
}
|
|
24
|
-
return
|
|
25
|
+
return function(e3) {
|
|
26
|
+
if (m()) {
|
|
27
|
+
e3.entity.page._isMobile = "true";
|
|
28
|
+
const t3 = navigator ? navigator.userAgent : null;
|
|
29
|
+
t3 ? t3.indexOf(" uni-app ") > 0 ? (e3.entity.page._isMobileApp = "true", e3.entity.page._isMobileBrowser = "false") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "true") : (e3.entity.page._isMobileApp = "false", e3.entity.page._isMobileBrowser = "false");
|
|
30
|
+
} else e3.entity.page._isMobile = "false";
|
|
31
|
+
}(t2), Object.assign(t2, e2), t2.dimensions = function() {
|
|
25
32
|
const e3 = window.outerWidth;
|
|
26
33
|
if (!e3) return s.PC;
|
|
27
34
|
return e3 > 768 ? s.PC : e3 > 414 ? s.IPAD : s.PHONE;
|
|
28
35
|
}(), t2.events = e2.runtime && e2.runtime.events ? e2.runtime.events : [], t2;
|
|
29
36
|
}
|
|
30
|
-
function
|
|
37
|
+
function g(e2) {
|
|
31
38
|
try {
|
|
32
39
|
return e2.props && e2.props.judgeHeavyList.length > 0 ? (e2.props.judgeHeavyList.forEach((e3) => {
|
|
33
40
|
e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
|
|
@@ -35,7 +42,7 @@ function f(e2) {
|
|
|
35
42
|
} catch (e3) {
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
|
-
function
|
|
45
|
+
function b(e2) {
|
|
39
46
|
let t2 = decodeURI(window.location.href);
|
|
40
47
|
if (t2 && t2.includes("?")) {
|
|
41
48
|
t2 = t2.substring(t2.lastIndexOf("?") + 1);
|
|
@@ -47,19 +54,19 @@ function g(e2) {
|
|
|
47
54
|
}
|
|
48
55
|
e2._t_;
|
|
49
56
|
}
|
|
50
|
-
function
|
|
57
|
+
function y(e2, t2) {
|
|
51
58
|
if (e2) {
|
|
52
59
|
Object.assign(t2, e2);
|
|
53
|
-
|
|
60
|
+
E(e2.paramStoreId, t2), delete e2.paramStoreId, e2.jumpMode && (t2.jumpMode = e2.jumpMode);
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
function h(e2, t2) {
|
|
57
64
|
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
58
65
|
Object.assign(t2, e2.query);
|
|
59
|
-
|
|
66
|
+
E(e2.query.paramStoreId, t2);
|
|
60
67
|
}
|
|
61
68
|
}
|
|
62
|
-
function
|
|
69
|
+
function E(e2, t2) {
|
|
63
70
|
if (e2) {
|
|
64
71
|
const s2 = l(e2);
|
|
65
72
|
if (s2) {
|
|
@@ -68,98 +75,98 @@ function y(e2, t2) {
|
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
|
-
function
|
|
72
|
-
let s2,
|
|
73
|
-
t2 || (s2 = e2.props.base ? e2.props.base : {},
|
|
74
|
-
let
|
|
75
|
-
return t2 && !t2.startsWith("${") ?
|
|
78
|
+
function v(e2, t2) {
|
|
79
|
+
let s2, i2 = t2;
|
|
80
|
+
t2 || (s2 = e2.props.base ? e2.props.base : {}, i2 = s2.prop);
|
|
81
|
+
let n2 = null;
|
|
82
|
+
return t2 && !t2.startsWith("${") ? n2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), n2 = i2.split("."), e2 && n2.length < 2 && (n2 = [e2.uuid])) : e2 && (n2 = ["page", e2.uuid]) : n2 = ["page", e2.uuid], n2 || e2 ? n2 : ["temp"];
|
|
76
83
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
84
|
+
function w(e2, t2, s2) {
|
|
85
|
+
const i2 = v(t2, s2), r2 = e2.entity;
|
|
79
86
|
if (null == r2.data.ID && null == r2.data.id) {
|
|
80
87
|
let l2, a2, p2 = false;
|
|
81
88
|
t2 && (l2 = t2.props.base ? t2.props.base : {}, a2 = t2.name, p2 = l2.multiple);
|
|
82
|
-
const u2 =
|
|
89
|
+
const u2 = n(r2, s2, null);
|
|
83
90
|
if (null == u2) {
|
|
84
91
|
const t3 = P(e2, l2 ? l2.defaultValue : null, a2, p2);
|
|
85
|
-
null != t3 && o(r2,
|
|
92
|
+
null != t3 && o(r2, i2, t3);
|
|
86
93
|
}
|
|
87
94
|
}
|
|
88
|
-
return
|
|
95
|
+
return i2;
|
|
89
96
|
}
|
|
90
|
-
function P(e2, t2, s2,
|
|
91
|
-
let
|
|
92
|
-
if (t2 && (
|
|
97
|
+
function P(e2, t2, s2, i2) {
|
|
98
|
+
let n2;
|
|
99
|
+
if (t2 && (n2 = r(e2, t2), null != n2 && null != n2 && s2)) {
|
|
93
100
|
let e3 = false;
|
|
94
|
-
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 =
|
|
101
|
+
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (n2 = (n2 + "").split(","));
|
|
95
102
|
}
|
|
96
|
-
return
|
|
103
|
+
return n2;
|
|
97
104
|
}
|
|
98
|
-
function
|
|
105
|
+
function M(e2, t2) {
|
|
99
106
|
if (!t2 || !e2 || t2.isTest) return "true";
|
|
100
107
|
const s2 = [];
|
|
101
|
-
if (e2.autoPermissions) for (const
|
|
108
|
+
if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
|
|
102
109
|
if (e2.functionCodes) {
|
|
103
|
-
const
|
|
104
|
-
for (let e3 = 0; e3 <
|
|
105
|
-
const o2 =
|
|
110
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], n2 = e2.functionCodes;
|
|
111
|
+
for (let e3 = 0; e3 < n2.length; e3++) {
|
|
112
|
+
const o2 = n2[e3];
|
|
106
113
|
let r2 = "";
|
|
107
|
-
r2 = "service" == (e3 <
|
|
114
|
+
r2 = "service" == (e3 < i2.length ? i2[e3] : "") ? o2 : t2.code + "." + o2, s2.includes(r2) || s2.push(r2);
|
|
108
115
|
}
|
|
109
116
|
}
|
|
110
117
|
return s2.join(",");
|
|
111
118
|
}
|
|
112
|
-
function
|
|
113
|
-
const o2 = s2.tableRuntimes, r2 = t(
|
|
119
|
+
function j(s2, i2, n2) {
|
|
120
|
+
const o2 = s2.tableRuntimes, r2 = t(i2);
|
|
114
121
|
let l2;
|
|
115
|
-
const a2 =
|
|
116
|
-
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion:
|
|
122
|
+
const a2 = i2.code;
|
|
123
|
+
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: n2, pageType: s2.pageType });
|
|
117
124
|
}
|
|
118
|
-
function
|
|
125
|
+
function C(e2, t2) {
|
|
119
126
|
var _a, _b;
|
|
120
127
|
const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
|
|
121
|
-
let
|
|
128
|
+
let n2 = false;
|
|
122
129
|
if (p(e2) && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
123
130
|
const s3 = e2.fieldPermissionMap.get("all_fields");
|
|
124
|
-
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled",
|
|
131
|
+
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", n2 = true);
|
|
125
132
|
}
|
|
126
133
|
if (s2) {
|
|
127
|
-
const o2 =
|
|
134
|
+
const o2 = i(s2);
|
|
128
135
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[o2] || (e2.rules[o2] = []), t2.props.rules.forEach((e3) => {
|
|
129
136
|
d(e3);
|
|
130
|
-
}), e2.rules[o2] = t2.props.rules), !
|
|
137
|
+
}), e2.rules[o2] = t2.props.rules), !n2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
131
138
|
const s3 = e2.fieldPermissionMap.get(o2);
|
|
132
139
|
t2.runtime.props || (t2.runtime.props = {}), s3 ? false === s3.canEdit ? t2.runtime.props.state = "disabled" : s3.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true) : t2.runtime.props.state = "";
|
|
133
140
|
}
|
|
134
141
|
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: o2, events: t2.props.customRuleEvents }));
|
|
135
142
|
}
|
|
136
143
|
}
|
|
137
|
-
function
|
|
144
|
+
function I(e2, t2) {
|
|
138
145
|
if (e2.initInfo) {
|
|
139
146
|
["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((s2) => {
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
let s3 =
|
|
147
|
+
const i2 = e2.initInfo[s2];
|
|
148
|
+
if (i2) if ("dynamicControlFormEdit" === s2) {
|
|
149
|
+
let s3 = i2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
|
|
143
150
|
if (s3 && s3.length > 0 && (s3 = s3.filter((e3) => "_all_fields" === e3.name), s3 && s3.length > 0)) {
|
|
144
151
|
const e3 = u(s3[0]);
|
|
145
152
|
e3.name = t2, s3 = [e3];
|
|
146
153
|
}
|
|
147
154
|
a.dynamicControlFormEdit(e2, s3, false);
|
|
148
|
-
} else "disableElement" === s2 ?
|
|
155
|
+
} else "disableElement" === s2 ? i2.indexOf(t2) >= 0 && a.disableElement(e2, [t2], false) : "enableElement" === s2 ? i2.indexOf(t2) >= 0 && a.enableElement(e2, [t2], false) : "hideElement" === s2 ? i2.indexOf(t2) >= 0 && a.hideElement(e2, [t2], false) : "showElement" === s2 && i2.indexOf(t2) >= 0 && a.showElement(e2, [t2], false);
|
|
149
156
|
});
|
|
150
157
|
}
|
|
151
158
|
}
|
|
152
159
|
export {
|
|
153
|
-
|
|
160
|
+
I as controlObjectRenderState,
|
|
154
161
|
c as convertToPageContext,
|
|
155
162
|
P as getDefaultValue,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
w as getFormModelFields,
|
|
164
|
+
v as getModelFields,
|
|
165
|
+
M as getPermissionCodes,
|
|
166
|
+
b as packageAdditionalMapWithLocationSearch,
|
|
167
|
+
y as packageAdditionalMapWithPageRequest,
|
|
161
168
|
h as packageAdditionalMapWithRoute,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
169
|
+
C as packageFormRules,
|
|
170
|
+
f as queryPageDesignByCode,
|
|
171
|
+
j as queryPageSuperGrids
|
|
165
172
|
};
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
2
|
-
import { getVariableValue as
|
|
3
|
-
import { handleAfterInitEvent as
|
|
4
|
-
import
|
|
5
|
-
import { FsUploadNew as
|
|
6
|
-
import
|
|
7
|
-
import { $t as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
if (
|
|
11
|
-
const e3 =
|
|
1
|
+
import { defineComponent as e, ref as l, onMounted as t, nextTick as i, onUnmounted as o, resolveComponent as a, createBlock as s, createCommentVNode as u, openBlock as n, normalizeStyle as p, normalizeClass as r, unref as m, withCtx as f, createElementBlock as v, toDisplayString as c } from "vue";
|
|
2
|
+
import { getVariableValue as d, setVariableValue as h } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { handleAfterInitEvent as y, fileUploadBeforeUpload as g } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import C from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import { FsUploadNew as x } from "agilebuilder-ui";
|
|
6
|
+
import b from "../../../../utils/eventBus.js";
|
|
7
|
+
import { $t as k } from "../../../../utils/i18n-util.js";
|
|
8
|
+
const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
9
|
+
const _2 = e2, w = _2.configure.runtime ? _2.configure.runtime : {}, P = l(w.props ? w.props : {}), j = w.style, R = w.class, T = w.headerStyle, z = w.titleExceedStyle, I = _2.pageContext.entity ? _2.pageContext.entity : {}, O = _2.configure.props.base ? _2.configure.props.base : {}, S = E(O.prop), F = E(O.propName), N = _2.pageContext.code, q = l(S ? N + "__" + S.join("__") : null), D = d(I, S), U = l(null), $ = l(false), W = l([]), B = l({});
|
|
10
|
+
if (D) {
|
|
11
|
+
const e3 = D.split(",");
|
|
12
12
|
if (e3.length > 0) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
13
|
+
const l2 = _2.pageContext.backendUrl;
|
|
14
|
+
C.post(l2 + "/common/fs-upload/search-file-names", e3).then((l3) => {
|
|
15
|
+
const t2 = [];
|
|
16
16
|
for (let i2 = 0; i2 < e3.length; i2++) {
|
|
17
17
|
const o2 = e3[i2];
|
|
18
|
-
|
|
18
|
+
t2.push(l3[o2]), W.value.push({ showName: l3[o2], serverPath: o2 });
|
|
19
19
|
}
|
|
20
|
-
"input" ===
|
|
20
|
+
"input" === P.value.displayType && (B.value.showName = t2.join(","), B.value.serverPath = e3.join(","));
|
|
21
|
+
}).finally(() => {
|
|
22
|
+
$.value = true;
|
|
21
23
|
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
+
} else $.value = true;
|
|
25
|
+
} else $.value = true;
|
|
24
26
|
function E(e3) {
|
|
25
27
|
return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
|
|
26
28
|
}
|
|
27
29
|
function A(e3) {
|
|
28
|
-
return
|
|
30
|
+
return g(e3);
|
|
29
31
|
}
|
|
30
|
-
const G = (e3,
|
|
32
|
+
const G = (e3, l2, t2) => {
|
|
31
33
|
J();
|
|
32
34
|
}, H = (e3) => {
|
|
33
35
|
J();
|
|
34
36
|
}, J = () => {
|
|
35
|
-
const e3 = [],
|
|
36
|
-
if (
|
|
37
|
-
const e4 = W.value.length -
|
|
38
|
-
for (let
|
|
37
|
+
const e3 = [], l2 = [];
|
|
38
|
+
if (P.value.limit && W.value.length > P.value.limit) {
|
|
39
|
+
const e4 = W.value.length - P.value.limit;
|
|
40
|
+
for (let l3 = 0; l3 < e4; l3++) W.value.shift();
|
|
39
41
|
}
|
|
40
|
-
for (let
|
|
41
|
-
|
|
42
|
-
}, K =
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
for (let t2 = 0; t2 < W.value.length; t2++) e3.push(W.value[t2].showName), l2.push(W.value[t2].serverPath);
|
|
43
|
+
h(_2.pageContext.entity, S, l2.join(",")), h(_2.pageContext.entity, F, e3.join(","));
|
|
44
|
+
}, K = l(null), L = l(null);
|
|
45
|
+
return t(() => {
|
|
46
|
+
b.$on(q.value + "-pickFileDone", (e3) => {
|
|
47
|
+
U.value.pickFileDone(e3);
|
|
46
48
|
}), i(() => {
|
|
47
|
-
const e3 =
|
|
48
|
-
|
|
49
|
+
const e3 = d(I, S), l2 = { showName: d(I, F), serverPath: e3 };
|
|
50
|
+
y(l2, _2.pageContext, _2.configure, { formItemRef: K.value, componentRef: U.value, titleRef: L.value, value: l2, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
|
|
49
51
|
});
|
|
50
52
|
}), o(() => {
|
|
51
|
-
|
|
52
|
-
}), (e3,
|
|
53
|
-
const
|
|
54
|
-
return
|
|
53
|
+
b.$off(q.value + "-pickFileDone");
|
|
54
|
+
}), (e3, l2) => {
|
|
55
|
+
const t2 = a("el-form-item");
|
|
56
|
+
return P.value.tittleShow ? (n(), s(t2, { key: 0, ref_key: "formItemRef", ref: K, required: P.value.required, class: r(m(R)), "label-width": P.value.labelWidth, style: p(m(j)) }, { label: f(() => [P.value.tittleShow ? (n(), v("div", { key: 0, ref_key: "titleRef", ref: L, style: p({ ...m(T), ...m(z) }) }, c(m(k)(P.value.title)), 5)) : u("", true)]), default: f(() => [$.value ? (n(), s(m(x), { key: 0, ref_key: "fileUploadRef", ref: U, style: { width: "100%" }, disabled: "disabled" === P.value.state, displayType: P.value.displayType, accept: P.value.accept, multiple: P.value.multiple, placeholder: P.value.placeholder, limit: P.value.limit, "limit-file-size": P.value.limitFileSize, openCameraOrChoosePhoto: P.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : $.value ? (n(), s(m(x), { key: 1, ref_key: "fileUploadRef", ref: U, style: { width: "100%" }, disabled: "disabled" === P.value.state, displayType: P.value.displayType, accept: P.value.accept, multiple: P.value.multiple, placeholder: P.value.placeholder, limit: P.value.limit, "limit-file-size": P.value.limitFileSize, openCameraOrChoosePhoto: P.value.openCameraOrChoosePhoto, "file-info": B.value, "file-list": W.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": G, "on-remove": H, "before-upload": A, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
|
|
55
57
|
};
|
|
56
58
|
} });
|
|
57
59
|
export {
|
|
58
|
-
|
|
60
|
+
_ as default
|
|
59
61
|
};
|
|
@@ -6,138 +6,139 @@ import { addComponentRef as h, addComponentRefByCode as y } from "../../utils/gl
|
|
|
6
6
|
import { getPermissionCodes as w, packageFormRules as j, controlObjectRenderState as _ } from "../../utils/page-init-util.js";
|
|
7
7
|
import { caculateShowCondition as N, getFormPropName as P, getSizeConfig as B } from "../../utils/page-helper-util.js";
|
|
8
8
|
import { isWorkflowPage as L, getPropClassName as O, isNumber as R } from "../../utils/common-util.js";
|
|
9
|
-
import {
|
|
10
|
-
import { usePageContextStore as
|
|
11
|
-
const
|
|
9
|
+
import { isShowMobileEvent as S, isShowComponent as M } from "../../utils/events/event-util.js";
|
|
10
|
+
import { usePageContextStore as T } from "../../utils/page-store.js";
|
|
11
|
+
const $ = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
const
|
|
14
|
-
null ==
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
13
|
+
const $2 = e2;
|
|
14
|
+
null == $2.configure.style && ($2.configure.style = {});
|
|
15
|
+
const E = w($2.configure, $2.pageContext);
|
|
16
|
+
$2.configure && $2.configure.props && $2.configure.props.base && ($2.configure.props.base.functionCode = E), j($2.pageContext, $2.configure);
|
|
17
|
+
let H = o(true), k = o(true), F = o("");
|
|
18
|
+
if ($2.configure && $2.configure.props) {
|
|
19
19
|
let e3 = [];
|
|
20
|
-
((_a =
|
|
20
|
+
((_a = $2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof $2.configure.props.base.showConditions ? JSON.parse($2.configure.props.base.showConditions) : $2.configure.props.base.showConditions), k = t(() => {
|
|
21
21
|
var _a2;
|
|
22
22
|
let o2 = true;
|
|
23
|
-
if (
|
|
23
|
+
if (H.value) if (S($2.pageContext, $2.configure)) if (e3 && e3.length > 0) o2 = N($2.pageContext, e3);
|
|
24
24
|
else {
|
|
25
|
-
const e4 = (_a2 =
|
|
25
|
+
const e4 = (_a2 = $2.configure.props.base) == null ? void 0 : _a2.state;
|
|
26
26
|
e4 && "hidden" === e4 && (o2 = false);
|
|
27
27
|
}
|
|
28
28
|
else o2 = false;
|
|
29
|
+
else o2 = false;
|
|
29
30
|
return o2;
|
|
30
31
|
});
|
|
31
|
-
if (
|
|
32
|
-
const e4 =
|
|
32
|
+
if ($2.configure._dynamicShowFlag = k, (_b = $2.configure.props.base) == null ? void 0 : _b.editConditions) {
|
|
33
|
+
const e4 = $2.configure.props.base.editConditions;
|
|
33
34
|
if (e4.length > 0) {
|
|
34
|
-
const o2 =
|
|
35
|
-
if (n2.rawSate = n2.state, L(
|
|
36
|
-
const e5 =
|
|
37
|
-
if (false === (e5 == null ? void 0 : e5.canEdit))
|
|
35
|
+
const o2 = $2.configure.runtime ? $2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
|
|
36
|
+
if (n2.rawSate = n2.state, L($2.pageContext) && $2.pageContext.fieldPermissionMap) {
|
|
37
|
+
const e5 = $2.pageContext.fieldPermissionMap.get("all_fields");
|
|
38
|
+
if (false === (e5 == null ? void 0 : e5.canEdit)) F.value = "disabled";
|
|
38
39
|
else {
|
|
39
|
-
const e6 =
|
|
40
|
+
const e6 = $2.configure.props.base;
|
|
40
41
|
if (e6 && e6.prop) {
|
|
41
42
|
let o3 = e6.prop;
|
|
42
43
|
o3 = P(o3);
|
|
43
|
-
const t2 =
|
|
44
|
-
t2 && false === t2.canEdit && (
|
|
44
|
+
const t2 = $2.pageContext.fieldPermissionMap.get(o3);
|
|
45
|
+
t2 && false === t2.canEdit && (F.value = "disabled");
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
n2.state = t({ get() {
|
|
49
|
-
if ("disabled" ===
|
|
50
|
-
return N(
|
|
50
|
+
if ("disabled" === F.value) return F.value;
|
|
51
|
+
return N($2.pageContext, e4) ? "" : "disabled";
|
|
51
52
|
}, set() {
|
|
52
53
|
} });
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
null ==
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
Object.assign(
|
|
65
|
-
const e3 =
|
|
66
|
-
o2 && Object.assign(
|
|
67
|
-
const t2 =
|
|
68
|
-
t2 && (
|
|
57
|
+
const J = o({});
|
|
58
|
+
J.value = n(b($2.configure.name));
|
|
59
|
+
const W = o(true);
|
|
60
|
+
null == J.value && (J.value = C, W.value = false);
|
|
61
|
+
const q = o(null), z = o({}), A = o(""), D = O($2.configure);
|
|
62
|
+
D && (A.value = D);
|
|
63
|
+
const G = $2.configure.runtime && $2.configure.runtime.common ? $2.configure.runtime.common : {};
|
|
64
|
+
if (G.class && (A.value += " " + G.class), G.style) {
|
|
65
|
+
Object.assign(z.value, G.style);
|
|
66
|
+
const e3 = $2.pageContext && $2.pageContext.dimensions ? $2.pageContext.dimensions : x.PC, o2 = G.style[e3 + "_style"];
|
|
67
|
+
o2 && Object.assign(z.value, o2);
|
|
68
|
+
const t2 = G.style[e3 + "_class"];
|
|
69
|
+
t2 && (A.value += " " + t2);
|
|
69
70
|
}
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
if (
|
|
73
|
-
|
|
71
|
+
const I = T();
|
|
72
|
+
function K(e3) {
|
|
73
|
+
if (q.value = e3, e3 && !e3.show && (e3.show = function() {
|
|
74
|
+
H.value = true;
|
|
74
75
|
}), e3 && !e3.hide && (e3.hide = function() {
|
|
75
|
-
|
|
76
|
+
H.value = false;
|
|
76
77
|
}), e3 && !e3.getConfigure && (e3.getConfigure = function() {
|
|
77
|
-
return
|
|
78
|
-
}),
|
|
79
|
-
else if (
|
|
80
|
-
const e4 =
|
|
78
|
+
return $2.configure;
|
|
79
|
+
}), $2.configure.uuid && h($2.pageContext, $2.configure.uuid, q), $2.configure.code) y($2.pageContext, $2.configure.code, q);
|
|
80
|
+
else if ($2.configure.props && $2.configure.props.base) {
|
|
81
|
+
const e4 = $2.configure.props.base;
|
|
81
82
|
if (e4.prop) {
|
|
82
83
|
let o3 = e4.prop;
|
|
83
|
-
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y(
|
|
84
|
+
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y($2.pageContext, o3, q);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
const o2 =
|
|
87
|
+
const o2 = $2.configure.props ? $2.configure.props.base : null;
|
|
87
88
|
if (o2 && o2.prop) {
|
|
88
89
|
let e4 = o2.prop;
|
|
89
|
-
e4 = P(e4), _(
|
|
90
|
+
e4 = P(e4), _($2.pageContext, e4);
|
|
90
91
|
}
|
|
91
92
|
!function() {
|
|
92
|
-
if (!
|
|
93
|
-
const e4 = B(
|
|
94
|
-
"table" !==
|
|
95
|
-
let e5 =
|
|
96
|
-
e5 || (e5 =
|
|
93
|
+
if (!q.value) return;
|
|
94
|
+
const e4 = B($2.pageContext, $2.configure);
|
|
95
|
+
"table" !== $2.configure.name && e4 && e4.isCalcHeight && v(() => {
|
|
96
|
+
let e5 = q.value.$el;
|
|
97
|
+
e5 || (e5 = q.value);
|
|
97
98
|
const o3 = e5.parentNode;
|
|
98
99
|
if (!e5 || !o3) return;
|
|
99
100
|
const t2 = e5.getBoundingClientRect();
|
|
100
101
|
let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
|
|
101
|
-
R(n2) && (i2 = n2 + "px"),
|
|
102
|
+
R(n2) && (i2 = n2 + "px"), z.value.height = i2, z.value["overflow-y"] = "auto", z.value["overflow-x"] = "hidden", $2.configure.sytle || ($2.configure.sytle = {}), $2.configure.sytle._heightStyle = i2;
|
|
102
103
|
});
|
|
103
104
|
}();
|
|
104
105
|
}
|
|
105
|
-
let
|
|
106
|
+
let Q;
|
|
106
107
|
i(() => {
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
U(), I.countComponentsLoadedNumber(), Q = setTimeout(() => {
|
|
109
|
+
I.componentsTotalNmber !== I.componentsLoadedNumber || I.pageComponentsLoaded || I.setPageComponentsLoaded(true);
|
|
109
110
|
}, 100);
|
|
110
111
|
}), s(() => {
|
|
111
|
-
|
|
112
|
+
Q && clearTimeout(Q);
|
|
112
113
|
});
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
115
|
-
let e3 =
|
|
116
|
-
e3 || (e3 =
|
|
114
|
+
const U = () => {
|
|
115
|
+
if (!q.value) return;
|
|
116
|
+
let e3 = q.value.$el;
|
|
117
|
+
e3 || (e3 = q.value);
|
|
117
118
|
const o2 = e3.parentNode;
|
|
118
119
|
if (!e3 || !o2) return;
|
|
119
|
-
const t2 =
|
|
120
|
+
const t2 = $2.configure.props ? $2.configure.props : {}, n2 = $2.configure.style ? $2.configure.style : {}, i2 = t2.position;
|
|
120
121
|
if ("top" == i2 || "bottom" == i2) {
|
|
121
122
|
const t3 = [o2];
|
|
122
123
|
if (t3 && t3.length > 0) {
|
|
123
124
|
const e4 = t3[0].getBoundingClientRect();
|
|
124
|
-
"top" == i2 && (
|
|
125
|
+
"top" == i2 && (z.value.top = e4.top + "px"), "bottom" == i2 && (z.value.bottom = "10px");
|
|
125
126
|
}
|
|
126
127
|
const n3 = e3.getBoundingClientRect();
|
|
127
|
-
|
|
128
|
-
} else if (n2.position && (
|
|
129
|
-
if (!
|
|
128
|
+
z.value.width = n3.width + "px";
|
|
129
|
+
} else if (n2.position && (z.value.position = n2.position, "relative" != z.value.position)) {
|
|
130
|
+
if (!z.value.width) {
|
|
130
131
|
const o3 = e3.getBoundingClientRect();
|
|
131
|
-
|
|
132
|
+
z.value.width = o3.width + "px";
|
|
132
133
|
}
|
|
133
|
-
n2.left && (
|
|
134
|
+
n2.left && (z.value.left = n2.left + "px"), n2.top && (z.value.top = n2.top + "px");
|
|
134
135
|
}
|
|
135
136
|
};
|
|
136
137
|
return (e3, o2) => {
|
|
137
138
|
const t2 = r("permission");
|
|
138
|
-
return p(
|
|
139
|
+
return p(M)(e3.configure) ? u((c(), a(g(J.value), { key: 0, ref: K, style: d(z.value), class: f(A.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, p(k)], [t2, p(E) ? p(E) : "true"]]) : l("", true);
|
|
139
140
|
};
|
|
140
141
|
} });
|
|
141
142
|
export {
|
|
142
|
-
|
|
143
|
+
$ as default
|
|
143
144
|
};
|
|
@@ -9,6 +9,7 @@ const C = { "element-loading-text": "加载中..." }, v = e({ name: "HomeChart",
|
|
|
9
9
|
const v2 = e2, y = t(true), S = t(false), b = t({});
|
|
10
10
|
let I, U = t(null);
|
|
11
11
|
return v2.chartCode && g.get(window.$vueApp.config.globalProperties.baseAPI + "/mms/home-chart-layout/" + v2.chartCode).then((e3) => {
|
|
12
|
+
var _a, _b;
|
|
12
13
|
if (e3 && e3.designJson) {
|
|
13
14
|
const t2 = JSON.parse(e3.designJson);
|
|
14
15
|
let a2 = window.localStorage.getItem("HOME_MY_CHARTS_ALIAS");
|
|
@@ -18,8 +19,8 @@ const C = { "element-loading-text": "加载中..." }, v = e({ name: "HomeChart",
|
|
|
18
19
|
}
|
|
19
20
|
const i2 = window.frameElement;
|
|
20
21
|
b.value = t2.chartJson, b.value.homeChartSettingUserId = v2.homeChartSettingUserId, i2 && (b.value.runtime.common.style.pc_style.height = i2.clientHeight + "px");
|
|
21
|
-
const n2 = { showHomepageSearch:
|
|
22
|
-
if (t2.variables) {
|
|
22
|
+
const n2 = { showHomepageSearch: false, name: e3.pageName, code: e3.pageCode, label: "", dimensions: "", version: 1, isWorkflowEntity: false, variables: t2.variables, systemCode: e3.systemCode, uuid: e3.uuid, allChartUuids: [], backendUrl: e3.backendUrl, rules: {}, pageType: "chart", beanName: t2.beanName, initChartServiceConfigs: [t2.initChartServiceConfigs], entity: { data: {}, task: {}, request: {}, page: {}, context: e3.contextParam, system: e3.systemParam } };
|
|
23
|
+
if (((_a = b.value.pushHomepage) == null ? void 0 : _a.searchConditions) && ((_b = b.value.pushHomepage) == null ? void 0 : _b.searchConditions.length) > 0 && (n2.showHomepageSearch = true), t2.variables) {
|
|
23
24
|
const e4 = n2.entity.page;
|
|
24
25
|
for (const a3 of t2.variables) a3.name && (a3.isArrayElement ? e4[a3.name] = [] : a3.defaultValue ? e4[a3.name] = a3.defaultValue : e4[a3.name] = void 0);
|
|
25
26
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as e, ref as a, resolveComponent as l, createBlock as t, openBlock as u, withCtx as o, createElementBlock as n, createCommentVNode as r } from "vue";
|
|
2
|
-
import
|
|
3
|
-
const d = ["src"],
|
|
4
|
-
const g = e2, v = p2, m = a(true), c = g.jumpPageSetting ? g.jumpPageSetting : null, P = a(null), f = a(null), h = a(null), j = a(null),
|
|
2
|
+
import s from "./super-page.vue.js";
|
|
3
|
+
const d = ["src"], i = ["src"], p = e({ __name: "super-page-dialog", props: { parentPageContext: {}, parentPageEventParams: {}, jumpPageSetting: {}, isTest: { type: Boolean }, customParams: {} }, emits: ["open", "opened", "close", "closed"], setup(e2, { emit: p2 }) {
|
|
4
|
+
const g = e2, v = p2, m = a(true), c = g.jumpPageSetting ? g.jumpPageSetting : null, P = a(null), f = a(null), h = a(null), j = a(null), w = a(null), C = a(null), y = a({}), b = a(false), k = a(false), O = a("rtl"), I = a(null), _ = a(false), V = a(null);
|
|
5
5
|
if (c) {
|
|
6
|
-
_.value = !(!c || void 0 === c._isIframe) && c._isIframe, V.value = c && c._path ? c._path : null,
|
|
6
|
+
_.value = !(!c || void 0 === c._isIframe) && c._isIframe, V.value = c && c._path ? c._path : null, C.value = c && c.dialogType ? c.dialogType : "dialog", b.value = !(!c || !c.draggable) && c.draggable, k.value = !(!c || !c.overflow) && c.overflow, O.value = c && c.showPosition ? c.showPosition : "rtl", f.value = c && c.jumpPageTitle ? c.jumpPageTitle : null, P.value = c && c.jumpPageWidth ? c.jumpPageWidth : "100%", I.value = c && c.jumpPageHeight ? c.jumpPageHeight : null, h.value = c && c.pageCode, j.value = c && c.dataId ? c.dataId : null, w.value = c && c.taskId ? c.taskId : null;
|
|
7
7
|
const e3 = !!c.isNeedId;
|
|
8
8
|
if (g.parentPageEventParams) {
|
|
9
9
|
try {
|
|
@@ -13,11 +13,11 @@ const d = ["src"], s = ["src"], p = e({ __name: "super-page-dialog", props: { pa
|
|
|
13
13
|
}
|
|
14
14
|
null !== j.value && void 0 !== j.value || (j.value = g.parentPageEventParams.id);
|
|
15
15
|
}
|
|
16
|
-
y.value.parentPageCode = c && c.parentPageCode ? c.parentPageCode : null, y.value.parentPageVersion = c && c.parentPageVersion ? c.parentPageVersion : null, y.value.jumpMode = c ? c.jumpMode : null, y.value.id = j.value, y.value.isNeedId = e3, y.value.taskId =
|
|
16
|
+
y.value.parentPageCode = c && c.parentPageCode ? c.parentPageCode : null, y.value.parentPageVersion = c && c.parentPageVersion ? c.parentPageVersion : null, y.value.jumpMode = c ? c.jumpMode : null, y.value.id = j.value, y.value.isNeedId = e3, y.value.taskId = w.value, g.customParams && Object.assign(y.value, g.customParams);
|
|
17
17
|
}
|
|
18
18
|
return (e3, a2) => {
|
|
19
19
|
const p3 = l("el-drawer"), g2 = l("el-dialog");
|
|
20
|
-
return
|
|
20
|
+
return C.value && "drawer" === C.value ? (u(), t(p3, { key: 0, modelValue: m.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => m.value = e4), title: f.value, direction: O.value, size: P.value, class: "content-drawer", onOpen: a2[1] || (a2[1] = (e4) => v("open")), onOpened: a2[2] || (a2[2] = (e4) => v("opened")), onClose: a2[3] || (a2[3] = (e4) => v("close")), onClosed: a2[4] || (a2[4] = (e4) => v("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(s, { key: 0, pageCode: h.value, pageRequest: y.value, isDialog: true }, null, 8, ["pageCode", "pageRequest"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, d)) : r("", true)]), _: 1 }, 8, ["modelValue", "title", "direction", "size"])) : (u(), t(g2, { key: 1, "model-value": "", title: f.value, "close-on-click-modal": false, "append-to-body": "", width: P.value, draggable: b.value, overflow: k.value, onOpen: a2[5] || (a2[5] = (a3) => e3.$emit("open")), onOpend: a2[6] || (a2[6] = (a3) => e3.$emit("opend")), onClose: a2[7] || (a2[7] = (e4) => v("close")), onClosed: a2[8] || (a2[8] = (a3) => e3.$emit("closed")) }, { default: o(() => [!_.value && h.value ? (u(), t(s, { key: 0, pageCode: h.value, pageRequest: y.value, contentHeight: I.value, isDialog: true }, null, 8, ["pageCode", "pageRequest", "contentHeight"])) : _.value ? (u(), n("iframe", { key: 1, height: "98%", width: "100%", src: V.value, frameborder: "0", allowtransparency: "no" }, null, 8, i)) : r("", true)]), _: 1 }, 8, ["title", "width", "draggable", "overflow"]));
|
|
21
21
|
};
|
|
22
22
|
} });
|
|
23
23
|
export {
|