super-page-runtime 2.3.13-sit4 → 2.3.14-sit1
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/ai-chat-util.js +16 -0
- package/dist/es/components/runtime/utils/assemblys-config.js +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +4 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +343 -296
- package/dist/es/components/runtime/utils/events/validator-util.js +76 -71
- package/dist/es/components/runtime/utils/page-init-util.js +107 -87
- package/dist/es/components/runtime/utils/page-permission-util.js +12 -12
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +12 -11
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +19 -18
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +38 -27
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +17 -17
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue.js +7 -0
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +37 -0
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +12 -12
- package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +184 -180
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +82 -79
- package/package.json +2 -2
|
@@ -4,8 +4,9 @@ import { getComponentRefByCode as n, getComponentRef as s, getAllComponentRefs a
|
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
5
|
import { getAdditionalParamMap as o } from "./standard-event.js";
|
|
6
6
|
import { isPromise as l } from "agilebuilder-ui/src/utils/common-util";
|
|
7
|
-
import {
|
|
8
|
-
|
|
7
|
+
import { parseSubTablePermissionCondition as a } from "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
8
|
+
import { getListCode as u, isWorkflowPage as f } from "../common-util.js";
|
|
9
|
+
function c(e2, t2, n2) {
|
|
9
10
|
const s2 = {};
|
|
10
11
|
t2 || (t2 = {});
|
|
11
12
|
let r2 = 0;
|
|
@@ -33,10 +34,10 @@ function f(e2, t2, n2) {
|
|
|
33
34
|
r2++;
|
|
34
35
|
}), s2;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
37
|
+
function d(e2, t2, n2, s2, r2, i2) {
|
|
38
|
+
return p(e2, t2, n2, s2, true, r2, i2);
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function m(e2) {
|
|
40
41
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
41
42
|
if (t2.indexOf(".") >= 0) {
|
|
42
43
|
let n2 = [];
|
|
@@ -44,8 +45,8 @@ function d(e2) {
|
|
|
44
45
|
}
|
|
45
46
|
}), e2;
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
let f2, c2 =
|
|
48
|
+
function p(s2, r2, i2, o2, l2, a2, u2) {
|
|
49
|
+
let f2, c2 = m(r2);
|
|
49
50
|
if (r2 && null !== r2 || !i2 || (c2 = {}), !c2 || 0 === Object.keys(c2).length) return s2.validateErrorField = "", true;
|
|
50
51
|
return new e(c2).validate(s2, { first: true }, (e2, c3) => {
|
|
51
52
|
let d2;
|
|
@@ -57,59 +58,63 @@ function m(s2, r2, i2, o2, l2, a2, u2) {
|
|
|
57
58
|
if (d2 && true === l2) {
|
|
58
59
|
if (/[A-Z]+/.test(d2) && void 0 !== s2[d2.toLowerCase()]) {
|
|
59
60
|
const e3 = JSON.parse(JSON.stringify(s2));
|
|
60
|
-
e3[d2.toUpperCase()] = s2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 =
|
|
61
|
+
e3[d2.toUpperCase()] = s2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 = p(e3, r2, i2, o2, false, a2, u2);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}), f2;
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
-
const l2 = e2.entity.data,
|
|
67
|
-
return null !=
|
|
66
|
+
function g(e2, s2, r2) {
|
|
67
|
+
const l2 = e2.entity.data, u2 = { ...e2.entity.page, ...l2 }, c2 = e2.rules, d2 = s2.props.base ? s2.props.base.isEnableRequired : null;
|
|
68
|
+
return null != d2 && (r2 = d2), null == r2 && (r2 = false), function(e3, s3, r3, l3) {
|
|
68
69
|
if (e3) {
|
|
69
|
-
return
|
|
70
|
-
return new Promise((l4,
|
|
71
|
-
const
|
|
72
|
-
|
|
70
|
+
return f(l3) ? function(e4, s4, r4) {
|
|
71
|
+
return new Promise((l4, u3) => {
|
|
72
|
+
const f2 = o(s4), c3 = s4.entity.context, d3 = s4.entity.task, m2 = true, p2 = s4.subTablePageInfo;
|
|
73
|
+
h(e4, s4, r4).then((r5) => {
|
|
73
74
|
if (r5) {
|
|
74
|
-
let o2,
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
75
|
+
let o2, u4, g2, b2, h2 = r5;
|
|
76
|
+
const y2 = s4.workflowRules;
|
|
77
|
+
if (y2) {
|
|
77
78
|
if (!function(e5, s5) {
|
|
79
|
+
var _a, _b, _c;
|
|
78
80
|
if (!e5.actionPermissions) return true;
|
|
79
81
|
const r7 = Object.keys(e5.actionPermissions);
|
|
80
82
|
for (let o3 = 0; o3 < r7.length; o3++) {
|
|
81
|
-
const l5 = r7[o3],
|
|
82
|
-
if (
|
|
83
|
+
const l5 = r7[o3], u5 = e5.actionPermissions[l5];
|
|
84
|
+
if (u5 && u5.notEmpty) {
|
|
83
85
|
let r8 = false;
|
|
84
86
|
if (s5[l5] ? Array.isArray(s5[l5]) && 0 === s5[l5].length && (r8 = true) : r8 = true, r8) {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
+
const r9 = n(e5, l5).getConfigure();
|
|
88
|
+
if ((_a = u5.notEmptyCondition) == null ? void 0 : _a.parentCondition) {
|
|
89
|
+
if (false === a(u5.notEmptyCondition.parentCondition.replaceAll("${field[", "${parent["), e5.dataTypeMaps, s5, {}, (_b = e5.entity) == null ? void 0 : _b.request, (_c = e5.entity) == null ? void 0 : _c.task, e5.contextParam)) return true;
|
|
90
|
+
}
|
|
91
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: r9.title ? r9.title : l5 }), type: "warning" }), false;
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
95
|
return true;
|
|
91
96
|
}(s4, e4)) return void l4(false);
|
|
92
|
-
const r6 = true,
|
|
93
|
-
|
|
94
|
-
} else
|
|
95
|
-
if (true !==
|
|
96
|
-
if (t({ showClose: true, message:
|
|
97
|
-
const e5 = n(s4,
|
|
98
|
-
e5 && e5.addRequiredClass && e5.addRequiredClass(o2,
|
|
97
|
+
const r6 = true, w2 = window.$vueApp.config.globalProperties.$formValidator(e4, y2, m2, f2, d3, c3, p2, r6);
|
|
98
|
+
h2 = w2.msg, o2 = w2.field, u4 = w2.listCode, g2 = w2.rowIndex, b2 = w2.pageNum;
|
|
99
|
+
} else h2 = true;
|
|
100
|
+
if (true !== h2) {
|
|
101
|
+
if (t({ showClose: true, message: h2 + "", type: "warning" }), u4) {
|
|
102
|
+
const e5 = n(s4, u4);
|
|
103
|
+
e5 && e5.addRequiredClass && e5.addRequiredClass(o2, g2, b2);
|
|
99
104
|
} else {
|
|
100
105
|
const e5 = n(s4, o2);
|
|
101
106
|
e5 && e5.addRequiredClass && e5.addRequiredClass();
|
|
102
107
|
}
|
|
103
108
|
l4(false);
|
|
104
109
|
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4);
|
|
105
|
-
} else
|
|
110
|
+
} else u3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
106
111
|
}).catch((e5) => {
|
|
107
|
-
|
|
112
|
+
u3(e5);
|
|
108
113
|
});
|
|
109
114
|
});
|
|
110
115
|
}(s3, l3, r3) : function(e4, t2, n2) {
|
|
111
116
|
return new Promise((s4, r4) => {
|
|
112
|
-
|
|
117
|
+
h(e4, t2, n2).then((t3) => {
|
|
113
118
|
if (t3) {
|
|
114
119
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
115
120
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
|
|
@@ -123,9 +128,9 @@ function p(e2, s2, r2) {
|
|
|
123
128
|
return new Promise((e4, t2) => {
|
|
124
129
|
e4(true);
|
|
125
130
|
});
|
|
126
|
-
}(r2,
|
|
131
|
+
}(r2, u2, c2, e2);
|
|
127
132
|
}
|
|
128
|
-
function
|
|
133
|
+
function b(e2) {
|
|
129
134
|
return new Promise((t2, n2) => {
|
|
130
135
|
const r2 = [], i2 = e2.customValidatorUuids;
|
|
131
136
|
i2 && i2.forEach((t3) => {
|
|
@@ -136,11 +141,11 @@ function g(e2) {
|
|
|
136
141
|
}) : t2(true);
|
|
137
142
|
});
|
|
138
143
|
}
|
|
139
|
-
function
|
|
144
|
+
function h(e2, n2, r2) {
|
|
140
145
|
return new Promise((o2, a2) => {
|
|
141
146
|
const u2 = JSON.parse(JSON.stringify(e2));
|
|
142
147
|
if (r2 && 0 !== Object.keys(r2).length) {
|
|
143
|
-
if (true ===
|
|
148
|
+
if (true === d(u2, r2, null, null, true, n2)) {
|
|
144
149
|
const e3 = function(e4) {
|
|
145
150
|
var _a;
|
|
146
151
|
if (!e4) return true;
|
|
@@ -183,10 +188,10 @@ function b(e2, n2, r2) {
|
|
|
183
188
|
return null;
|
|
184
189
|
}(n2);
|
|
185
190
|
e4 && l(e4) ? e4.then((e5) => {
|
|
186
|
-
e5 ?
|
|
191
|
+
e5 ? b(n2).then((e6) => {
|
|
187
192
|
o2(e6);
|
|
188
193
|
}) : o2(false);
|
|
189
|
-
}) :
|
|
194
|
+
}) : b(n2).then((e5) => {
|
|
190
195
|
o2(e5);
|
|
191
196
|
});
|
|
192
197
|
} else a2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
@@ -194,7 +199,7 @@ function b(e2, n2, r2) {
|
|
|
194
199
|
} else o2(true);
|
|
195
200
|
});
|
|
196
201
|
}
|
|
197
|
-
function
|
|
202
|
+
function y(e2, t2) {
|
|
198
203
|
if (!e2) return t2;
|
|
199
204
|
t2 || (t2 = {});
|
|
200
205
|
const n2 = Object.keys(e2), s2 = e2;
|
|
@@ -204,34 +209,34 @@ function h(e2, t2) {
|
|
|
204
209
|
Object.keys(e4).forEach((n3) => {
|
|
205
210
|
t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
|
|
206
211
|
});
|
|
207
|
-
} else
|
|
208
|
-
}),
|
|
212
|
+
} else x(s2[e3]), t2[e3] = s2[e3];
|
|
213
|
+
}), m(t2);
|
|
209
214
|
}
|
|
210
|
-
function
|
|
215
|
+
function w(e2) {
|
|
211
216
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
212
217
|
const t2 = {}, n2 = Object.keys(e2);
|
|
213
218
|
for (let s2 = 0; s2 < n2.length; s2++) {
|
|
214
219
|
const r2 = n2[s2], i2 = e2[r2];
|
|
215
|
-
|
|
220
|
+
R(i2), r2.indexOf(".") > 0 ? c(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
216
221
|
}
|
|
217
222
|
return t2;
|
|
218
223
|
}
|
|
219
|
-
function
|
|
224
|
+
function R(e2, t2) {
|
|
220
225
|
e2.forEach((e3) => {
|
|
221
226
|
e3.message;
|
|
222
227
|
const t3 = e3.label, n2 = i().t(t3);
|
|
223
228
|
e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label: n2 })), e3.myType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: n2 })), e3.patternType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: n2 })), void 0 !== e3.max && null !== e3.max && (e3.message = i().t("superPageRuntimeMessage.overMaxLength", { label: n2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = i().t("superPageRuntimeMessage.limitMinLength", { label: n2, value: e3.min }));
|
|
224
229
|
});
|
|
225
230
|
}
|
|
226
|
-
function
|
|
231
|
+
function v(e2) {
|
|
227
232
|
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = o(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
228
233
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
229
234
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
230
235
|
});
|
|
231
236
|
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
|
|
232
|
-
return l2 =
|
|
237
|
+
return l2 = y(e2.customRules, l2), l2;
|
|
233
238
|
}
|
|
234
|
-
function
|
|
239
|
+
function P(e2, t2) {
|
|
235
240
|
if (!t2) return;
|
|
236
241
|
const s2 = {};
|
|
237
242
|
t2.forEach((e3) => {
|
|
@@ -239,31 +244,31 @@ function v(e2, t2) {
|
|
|
239
244
|
n2 ? s2[t3] = n2 : false === e3.required && (s2[t3] = []);
|
|
240
245
|
});
|
|
241
246
|
let r2 = e2.rules ? e2.rules : {};
|
|
242
|
-
r2 =
|
|
247
|
+
r2 = y(s2, r2), e2.rules = r2;
|
|
243
248
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
244
|
-
i2 =
|
|
249
|
+
i2 = y(s2, i2), e2.workflowRules = i2;
|
|
245
250
|
const o2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
246
|
-
o2 && o2.length > 0 &&
|
|
251
|
+
o2 && o2.length > 0 && k(e2, o2[0]), t2.forEach((t3) => {
|
|
247
252
|
if ("_all_fields" !== t3.name) {
|
|
248
253
|
O(n(e2, t3.name), t3);
|
|
249
254
|
}
|
|
250
255
|
});
|
|
251
256
|
}
|
|
252
|
-
function
|
|
253
|
-
|
|
257
|
+
function E(e2) {
|
|
258
|
+
k(e2, { disabled: true });
|
|
254
259
|
}
|
|
255
|
-
function
|
|
260
|
+
function k(e2, t2) {
|
|
256
261
|
const n2 = r(e2);
|
|
257
262
|
if (n2) for (const e3 in n2) {
|
|
258
263
|
const s2 = n2[e3];
|
|
259
264
|
O(s2 ? s2.value : s2, t2);
|
|
260
265
|
}
|
|
261
266
|
}
|
|
262
|
-
function
|
|
267
|
+
function C(e2, t2, r2) {
|
|
263
268
|
var _a;
|
|
264
269
|
let i2, o2;
|
|
265
270
|
if (r2 ? (i2 = n(e2, r2), o2 = i2 ? i2.getTableUuid() : null) : (o2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = o2 ? s(e2, o2) : null), !i2) return;
|
|
266
|
-
const l2 = e2.code,
|
|
271
|
+
const l2 = e2.code, a2 = e2.version, f2 = u(l2, a2, o2);
|
|
267
272
|
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
|
|
268
273
|
const n2 = e2.workflowRules.subRules[r2];
|
|
269
274
|
t2.forEach((e3) => {
|
|
@@ -279,31 +284,31 @@ function O(e2, t2) {
|
|
|
279
284
|
void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _a.props) && (n2.runtime.props.required = t2.required), void 0 !== t2.readonly && ((_b = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _b.props) && (t2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== t2.disabled && n2 && (((_c = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _c.props) && (t2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled"), "table" === n2.name && e2.changeOperationAddState(false));
|
|
280
285
|
}
|
|
281
286
|
}
|
|
282
|
-
function
|
|
287
|
+
function x(e2) {
|
|
283
288
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
284
289
|
const t2 = j[e2.type];
|
|
285
290
|
t2 && (e2.validator = t2.validator);
|
|
286
291
|
}
|
|
287
292
|
const j = { boolean: { validator: function(e2, t2, n2) {
|
|
288
|
-
return true ===
|
|
293
|
+
return true === M(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
289
294
|
} }, date: { validator: function(e2, t2, n2) {
|
|
290
|
-
if (true !==
|
|
295
|
+
if (true !== M(e2, t2)) return false;
|
|
291
296
|
const s2 = new Date(t2);
|
|
292
297
|
return !isNaN(s2.getTime());
|
|
293
298
|
} }, number: { validator: function(e2, t2, n2) {
|
|
294
|
-
return true ===
|
|
295
|
-
} } },
|
|
299
|
+
return true === M(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
300
|
+
} } }, M = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
296
301
|
export {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
E as disabledAllFields,
|
|
303
|
+
C as dynamicControlTableEdit,
|
|
304
|
+
v as getWorkflowRules,
|
|
305
|
+
R as i18nValidatePropRulesMessage,
|
|
306
|
+
w as i18nValidateRulesMessage,
|
|
307
|
+
y as packageCustomRules,
|
|
308
|
+
x as packageCustomValidator,
|
|
309
|
+
c as setObjectPropRule,
|
|
305
310
|
O as updateComponentDisplayState,
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
311
|
+
P as updateFormItemEditState,
|
|
312
|
+
g as validateDataModelFunc,
|
|
313
|
+
d as validator
|
|
309
314
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
|
-
import { PageDimensions as
|
|
4
|
-
import { getFormPropName as
|
|
3
|
+
import { PageDimensions as i } from "./interfaces/page-design-types.js";
|
|
4
|
+
import { getFormPropName as s, getVariableValue as o, setVariableValue as n, 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 f } from "agilebuilder-ui/src/utils/common-util";
|
|
10
|
-
function
|
|
10
|
+
function c(t2) {
|
|
11
11
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function m(e2) {
|
|
14
14
|
var _a, _b, _c;
|
|
15
15
|
if (null == e2) return null;
|
|
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: void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, branchFieldAuth: e2.branchFieldAuth, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
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, listCodesInitSearchForm: e2.listCodesInitSearchForm, 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: void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, branchFieldAuth: e2.branchFieldAuth, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam }, propTitleMap: {} };
|
|
17
17
|
if (e2.props && e2.props.notIdInitializationList) {
|
|
18
|
-
let
|
|
19
|
-
"string" == typeof
|
|
18
|
+
let i2 = e2.props.notIdInitializationList;
|
|
19
|
+
"string" == typeof i2 && (i2 = JSON.parse(i2)), i2.length > 0 && (t2.notIdInitializationList = i2);
|
|
20
20
|
}
|
|
21
21
|
if (e2.variables) {
|
|
22
|
-
const
|
|
23
|
-
for (const t3 of e2.variables) t3.name && (t3.isArrayElement ?
|
|
22
|
+
const i2 = t2.entity.page;
|
|
23
|
+
for (const t3 of e2.variables) t3.name && (t3.isArrayElement ? i2[t3.name] = [] : t3.defaultValue ? i2[t3.name] = t3.defaultValue : i2[t3.name] = void 0);
|
|
24
24
|
}
|
|
25
25
|
return function(e3) {
|
|
26
26
|
if (f()) {
|
|
@@ -30,8 +30,8 @@ function c(e2) {
|
|
|
30
30
|
} else e3.entity.page._isMobile = "false";
|
|
31
31
|
}(t2), Object.assign(t2, e2), t2.dimensions = function() {
|
|
32
32
|
const e3 = window.outerWidth;
|
|
33
|
-
if (!e3) return
|
|
34
|
-
return e3 > 768 ?
|
|
33
|
+
if (!e3) return i.PC;
|
|
34
|
+
return e3 > 768 ? i.PC : e3 > 414 ? i.IPAD : i.PHONE;
|
|
35
35
|
}(), t2.events = e2.runtime && e2.runtime.events ? e2.runtime.events : [], t2;
|
|
36
36
|
}
|
|
37
37
|
function g(e2) {
|
|
@@ -44,23 +44,31 @@ function g(e2) {
|
|
|
44
44
|
}
|
|
45
45
|
function b(e2) {
|
|
46
46
|
let t2 = decodeURI(window.location.href);
|
|
47
|
+
try {
|
|
48
|
+
window.top && !Array.isArray(window.top) && (t2 = decodeURI(window.top.location.href));
|
|
49
|
+
} catch (e3) {
|
|
50
|
+
}
|
|
47
51
|
if (t2 && t2.includes("?")) {
|
|
48
52
|
t2 = t2.substring(t2.lastIndexOf("?") + 1);
|
|
49
|
-
const
|
|
50
|
-
for (const t3 of
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
+
const i2 = t2.split("&");
|
|
54
|
+
for (const t3 of i2) {
|
|
55
|
+
const i3 = t3.split("=");
|
|
56
|
+
let s2 = i3[0];
|
|
57
|
+
if (s2) {
|
|
58
|
+
const t4 = i3.length > 1 ? i3[1] : "";
|
|
59
|
+
s2.indexOf("ai__") >= 0 && (s2 = s2.substring(s2.indexOf("ai__") + 4)), e2[s2] = t4;
|
|
60
|
+
}
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
e2._t_;
|
|
56
64
|
}
|
|
57
|
-
function
|
|
65
|
+
function h(e2, t2) {
|
|
58
66
|
if (e2) {
|
|
59
67
|
Object.assign(t2, e2);
|
|
60
68
|
w(e2.paramStoreId, t2), delete e2.paramStoreId, e2.jumpMode && (t2.jumpMode = e2.jumpMode);
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
|
-
function
|
|
71
|
+
function y(e2, t2) {
|
|
64
72
|
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
65
73
|
Object.assign(t2, e2.query);
|
|
66
74
|
w(e2.query.paramStoreId, t2);
|
|
@@ -68,133 +76,145 @@ function h(e2, t2) {
|
|
|
68
76
|
}
|
|
69
77
|
function w(e2, t2) {
|
|
70
78
|
if (e2) {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const e3 = JSON.parse(
|
|
79
|
+
const i2 = l(e2);
|
|
80
|
+
if (i2) {
|
|
81
|
+
const e3 = JSON.parse(i2);
|
|
74
82
|
Object.assign(t2, e3);
|
|
75
83
|
}
|
|
76
84
|
}
|
|
77
85
|
}
|
|
78
86
|
function E(e2, t2) {
|
|
79
|
-
let
|
|
80
|
-
t2 || (
|
|
81
|
-
let
|
|
82
|
-
return t2 && !t2.startsWith("${") ?
|
|
87
|
+
let i2, s2 = t2;
|
|
88
|
+
t2 || (i2 = e2.props.base ? e2.props.base : {}, s2 = i2.prop);
|
|
89
|
+
let o2 = null;
|
|
90
|
+
return t2 && !t2.startsWith("${") ? o2 = ["data", t2] : !e2 || s2 && s2.startsWith("${") ? s2.startsWith("${") ? (s2 = s2.substring(2, s2.length - 1), o2 = s2.split("."), e2 && o2.length < 2 && (o2 = [e2.uuid])) : e2 && (o2 = ["page", e2.uuid]) : o2 = ["page", e2.uuid], o2 || e2 ? o2 : ["temp"];
|
|
83
91
|
}
|
|
84
|
-
function v(e2, t2,
|
|
85
|
-
|
|
92
|
+
function v(e2, t2, i2) {
|
|
93
|
+
var _a;
|
|
94
|
+
const s2 = E(t2, i2), r2 = e2.entity;
|
|
86
95
|
if (null == r2.data.ID && null == r2.data.id) {
|
|
87
|
-
let
|
|
88
|
-
t2 && (
|
|
89
|
-
const p2 =
|
|
96
|
+
let i3, l2, a2 = false;
|
|
97
|
+
t2 && (i3 = t2.props.base ? t2.props.base : {}, l2 = t2.name, a2 = i3.multiple);
|
|
98
|
+
const p2 = o(r2, s2);
|
|
90
99
|
if (null == p2) {
|
|
91
|
-
const t3 =
|
|
92
|
-
if (t3) {
|
|
93
|
-
const
|
|
94
|
-
null !=
|
|
100
|
+
const t3 = i3 ? i3.defaultValue : null;
|
|
101
|
+
if (t3) try {
|
|
102
|
+
const o2 = P(e2, t3, l2, a2);
|
|
103
|
+
if (null != o2 && "" !== o2) n(r2, s2, o2);
|
|
104
|
+
else if (((_a = i3.moreDefaultValue) == null ? void 0 : _a.length) > 0) {
|
|
105
|
+
const t4 = i3.moreDefaultValue;
|
|
106
|
+
for (let i4 = 0; i4 < t4.length; i4++) {
|
|
107
|
+
const o3 = P(e2, t4[i4], l2, a2);
|
|
108
|
+
if (null != o3 && "" !== o3) {
|
|
109
|
+
n(r2, s2, o3);
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} catch (e3) {
|
|
95
115
|
}
|
|
96
116
|
}
|
|
97
117
|
}
|
|
98
|
-
return
|
|
118
|
+
return s2;
|
|
99
119
|
}
|
|
100
|
-
function P(e2, t2,
|
|
101
|
-
let
|
|
102
|
-
if (t2 && (
|
|
120
|
+
function P(e2, t2, i2, s2) {
|
|
121
|
+
let o2;
|
|
122
|
+
if (t2 && (o2 = r(e2, t2), null != o2 && null != o2 && i2)) {
|
|
103
123
|
let e3 = false;
|
|
104
|
-
"checkbox" ==
|
|
124
|
+
"checkbox" == i2 ? e3 = true : "select" == i2 && (e3 = s2), e3 && (o2 = (o2 + "").split(","));
|
|
105
125
|
}
|
|
106
|
-
return
|
|
126
|
+
return o2;
|
|
107
127
|
}
|
|
108
128
|
function M(e2, t2) {
|
|
109
129
|
var _a, _b;
|
|
110
130
|
if (false === ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isPermission)) return "true";
|
|
111
|
-
const
|
|
112
|
-
if (e2.autoPermissions) for (const
|
|
131
|
+
const i2 = [];
|
|
132
|
+
if (e2.autoPermissions) for (const s2 of e2.autoPermissions) i2.push(t2.code + "." + s2.simpleCode);
|
|
113
133
|
if (e2.functionCodes) {
|
|
114
|
-
const
|
|
115
|
-
for (let e3 = 0; e3 <
|
|
116
|
-
const
|
|
134
|
+
const s2 = e2.sourceTypes ? e2.sourceTypes : [], o2 = e2.functionCodes;
|
|
135
|
+
for (let e3 = 0; e3 < o2.length; e3++) {
|
|
136
|
+
const n2 = o2[e3], r2 = e3 < s2.length ? s2[e3] : "";
|
|
117
137
|
let l2 = "";
|
|
118
|
-
if ("service" == r2) l2 =
|
|
119
|
-
else if ("standard" === r2) l2 = t2.code + "." +
|
|
138
|
+
if ("service" == r2) l2 = n2;
|
|
139
|
+
else if ("standard" === r2) l2 = t2.code + "." + n2;
|
|
120
140
|
else {
|
|
121
|
-
l2 = "custom" === k(
|
|
141
|
+
l2 = "custom" === k(n2, t2).type ? n2 : t2.code + "." + n2;
|
|
122
142
|
}
|
|
123
|
-
|
|
143
|
+
i2.includes(l2) || i2.push(l2);
|
|
124
144
|
}
|
|
125
145
|
}
|
|
126
|
-
return
|
|
146
|
+
return i2.join(",");
|
|
127
147
|
}
|
|
128
148
|
function k(e2, t2) {
|
|
129
|
-
const
|
|
130
|
-
if (
|
|
131
|
-
for (let t3 = 0; t3 <
|
|
149
|
+
const i2 = t2.pagePermissions;
|
|
150
|
+
if (i2 && i2.length > 0) {
|
|
151
|
+
for (let t3 = 0; t3 < i2.length; t3++) if (i2[t3].simpleCode === e2) return i2[t3];
|
|
132
152
|
}
|
|
133
153
|
return null;
|
|
134
154
|
}
|
|
135
|
-
function
|
|
136
|
-
const
|
|
155
|
+
function C(i2, s2, o2) {
|
|
156
|
+
const n2 = i2.tableRuntimes, r2 = t(s2);
|
|
137
157
|
let l2;
|
|
138
|
-
const a2 =
|
|
139
|
-
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes:
|
|
158
|
+
const a2 = s2.code;
|
|
159
|
+
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: n2, additionalParamMapJson: l2, pageCode: a2, publishVersion: o2, pageType: i2.pageType });
|
|
140
160
|
}
|
|
141
|
-
const
|
|
142
|
-
function
|
|
161
|
+
const I = ["button-detail", "print-label"];
|
|
162
|
+
function j(e2, t2, i2) {
|
|
143
163
|
var _a, _b;
|
|
144
|
-
const
|
|
164
|
+
const o2 = t2.props && t2.props.base ? t2.props.base.prop : null, n2 = p(e2);
|
|
145
165
|
let r2 = false;
|
|
146
|
-
if (
|
|
147
|
-
const
|
|
148
|
-
false === (
|
|
166
|
+
if (n2 && I.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
167
|
+
const i3 = e2.fieldPermissionMap.get("all_fields");
|
|
168
|
+
false === (i3 == null ? void 0 : i3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", r2 = true);
|
|
149
169
|
}
|
|
150
|
-
if (
|
|
151
|
-
const l2 =
|
|
170
|
+
if (o2) {
|
|
171
|
+
const l2 = s(o2);
|
|
152
172
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[l2] || (e2.rules[l2] = []), t2.props.rules.forEach((e3) => {
|
|
153
|
-
d(e3), !
|
|
154
|
-
}), e2.rules[l2] = t2.props.rules),
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
173
|
+
d(e3), !i2 && e3 && e3.required && (e3.required = false);
|
|
174
|
+
}), e2.rules[l2] = t2.props.rules), n2 && !r2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
175
|
+
const s2 = e2.fieldPermissionMap.get(l2);
|
|
176
|
+
if (!i2 && e2.workflowRules && (e2.workflowRules[l2] || e2.workflowRules.rules && e2.workflowRules.rules[l2])) {
|
|
157
177
|
let t3 = e2.workflowRules[l2];
|
|
158
178
|
if (!t3 && e2.workflowRules.rules && (t3 = e2.workflowRules.rules[l2]), t3 && Array.isArray(t3) && t3.length > 0) for (let e3 = 0; e3 < t3.length; e3++) {
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
|
|
179
|
+
const i3 = t3[e3];
|
|
180
|
+
if (i3 && i3.required) {
|
|
181
|
+
i3.required = false;
|
|
162
182
|
break;
|
|
163
183
|
}
|
|
164
184
|
}
|
|
165
185
|
else t3 && t3.required && (t3.required = false);
|
|
166
186
|
}
|
|
167
|
-
t2.runtime.props || (t2.runtime.props = {}),
|
|
187
|
+
t2.runtime.props || (t2.runtime.props = {}), s2 ? (!i2 && s2.canEdit && (s2.canEdit = false), false === s2.canEdit ? t2.runtime.props.state = "disabled" : s2.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true)) : t2.runtime.props.state = "";
|
|
168
188
|
}
|
|
169
189
|
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: l2, events: t2.props.customRuleEvents }));
|
|
170
190
|
}
|
|
171
191
|
}
|
|
172
192
|
function O(e2, t2) {
|
|
173
193
|
if (e2.initInfo) {
|
|
174
|
-
["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
177
|
-
let
|
|
178
|
-
if (
|
|
179
|
-
const e3 = u(
|
|
180
|
-
e3.name = t2,
|
|
194
|
+
["dynamicControlFormEdit", "disableElement", "enableElement", "hideElement", "showElement"].forEach((i2) => {
|
|
195
|
+
const s2 = e2.initInfo[i2];
|
|
196
|
+
if (s2) if ("dynamicControlFormEdit" === i2) {
|
|
197
|
+
let i3 = s2.filter((e3) => "_all_fields" === e3.name || e3.name === t2);
|
|
198
|
+
if (i3 && i3.length > 0 && (i3 = i3.filter((e3) => "_all_fields" === e3.name), i3 && i3.length > 0)) {
|
|
199
|
+
const e3 = u(i3[0]);
|
|
200
|
+
e3.name = t2, i3 = [e3];
|
|
181
201
|
}
|
|
182
|
-
a.dynamicControlFormEdit(e2,
|
|
183
|
-
} else "disableElement" ===
|
|
202
|
+
a.dynamicControlFormEdit(e2, i3, false);
|
|
203
|
+
} else "disableElement" === i2 ? s2.indexOf(t2) >= 0 && a.disableElement(e2, [t2], false) : "enableElement" === i2 ? s2.indexOf(t2) >= 0 && a.enableElement(e2, [t2], false) : "hideElement" === i2 ? s2.indexOf(t2) >= 0 && a.hideElement(e2, [t2], false) : "showElement" === i2 && s2.indexOf(t2) >= 0 && a.showElement(e2, [t2], false);
|
|
184
204
|
});
|
|
185
205
|
}
|
|
186
206
|
}
|
|
187
207
|
export {
|
|
188
208
|
O as controlObjectRenderState,
|
|
189
|
-
|
|
209
|
+
m as convertToPageContext,
|
|
190
210
|
P as getDefaultValue,
|
|
191
211
|
v as getFormModelFields,
|
|
192
212
|
E as getModelFields,
|
|
193
213
|
M as getPermissionCodes,
|
|
194
214
|
b as packageAdditionalMapWithLocationSearch,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
215
|
+
h as packageAdditionalMapWithPageRequest,
|
|
216
|
+
y as packageAdditionalMapWithRoute,
|
|
217
|
+
j as packageFormRules,
|
|
218
|
+
c as queryPageDesignByCode,
|
|
219
|
+
C as queryPageSuperGrids
|
|
200
220
|
};
|