super-page-runtime 2.3.39-sit1 → 2.3.39-sit2
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { isMobileBrowser as e, isPromise as n } from "agilebuilder-ui/src/utils/common-util";
|
|
2
2
|
import { getAdditionalParamMap as t, standardEvents as i, judgeDataNumber as o, dealAfterOperate as r } from "./standard-event.js";
|
|
3
|
-
import {
|
|
4
|
-
import { getComponentRef as
|
|
5
|
-
import { ElMessage as
|
|
6
|
-
import { analysisCondition as
|
|
7
|
-
import { getListCode as
|
|
8
|
-
import
|
|
9
|
-
import { getValueFromSource as
|
|
10
|
-
import { expressJump as
|
|
11
|
-
const
|
|
3
|
+
import { isNotNeedValidateRequired as u, validateDataModelFunc as c } from "./validator-util.js";
|
|
4
|
+
import { getComponentRef as l, getComponentRefByCode as a } from "../global-refs.js";
|
|
5
|
+
import { ElMessage as s } from "element-plus";
|
|
6
|
+
import { analysisCondition as f } from "agilebuilder-ui/src/utils/util";
|
|
7
|
+
import { getListCode as m, deepCopy as g } from "../common-util.js";
|
|
8
|
+
import d from "../eventBus.js";
|
|
9
|
+
import { getValueFromSource as p } from "../page-helper-util.js";
|
|
10
|
+
import { expressJump as v } from "../table-utils.js";
|
|
11
|
+
const b = ["downloadTemplate", "exportForm", "exportPDF", "export", "exportCharts"], C = ["import"];
|
|
12
12
|
function x(e2, n2) {
|
|
13
13
|
if (e2 && e2.customEvents) {
|
|
14
14
|
const t2 = function(e3) {
|
|
@@ -24,7 +24,7 @@ function x(e2, n2) {
|
|
|
24
24
|
n3[e4.eventName] = t3;
|
|
25
25
|
} catch (n4) {
|
|
26
26
|
const t4 = `自定义方法${e4.eventName}解析失败,请检查函数体是否正确`;
|
|
27
|
-
|
|
27
|
+
s.error(t4);
|
|
28
28
|
}
|
|
29
29
|
} else {
|
|
30
30
|
let t3 = e4.componentUuid + "_";
|
|
@@ -33,7 +33,7 @@ function x(e2, n2) {
|
|
|
33
33
|
n3[t3] = new Function("params", e4.jsContent);
|
|
34
34
|
} catch (n4) {
|
|
35
35
|
let t4 = "";
|
|
36
|
-
e4.title && (t4 += e4.title + "的"), e4.label && (t4 += e4.label), t4 += "事件解析失败,请检查事件函数体是否正确",
|
|
36
|
+
e4.title && (t4 += e4.title + "的"), e4.label && (t4 += e4.label), t4 += "事件解析失败,请检查事件函数体是否正确", s.error(t4);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
}), n3;
|
|
@@ -41,24 +41,24 @@ function x(e2, n2) {
|
|
|
41
41
|
!function(e3, n3) {
|
|
42
42
|
if (!n3) return;
|
|
43
43
|
for (const t3 in n3) {
|
|
44
|
-
|
|
44
|
+
k(n3[t3], e3);
|
|
45
45
|
}
|
|
46
46
|
}(n2, t2), n2.customEvents = t2;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function j(e2, n2) {
|
|
50
50
|
if (e2.customEvents) return e2.customEvents[n2];
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function k(e2, n2) {
|
|
53
53
|
e2.get = function(e3) {
|
|
54
|
-
return e3 ?
|
|
54
|
+
return e3 ? a(n2, e3) : void 0;
|
|
55
55
|
}, e2.getByUuid = function(e3) {
|
|
56
|
-
return e3 ?
|
|
56
|
+
return e3 ? l(n2, e3) : void 0;
|
|
57
57
|
}, e2.getPageContext = function() {
|
|
58
58
|
return n2;
|
|
59
59
|
}, e2.getContextValue = function(e3) {
|
|
60
60
|
let t2 = n2 && n2.entity ? n2.entity.context : null;
|
|
61
|
-
return t2 = t2 || {},
|
|
61
|
+
return t2 = t2 || {}, p(t2, e3, "context");
|
|
62
62
|
}, e2.getContext = function() {
|
|
63
63
|
return n2 && n2.entity ? n2.entity.context : {};
|
|
64
64
|
}, e2.getSystem = function() {
|
|
@@ -70,7 +70,7 @@ function j(e2, n2) {
|
|
|
70
70
|
}, e2.getPage = function() {
|
|
71
71
|
return n2 && n2.entity ? n2.entity.page : {};
|
|
72
72
|
}, e2.getCustomFunc = function(e3) {
|
|
73
|
-
return
|
|
73
|
+
return j(n2, e3);
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
function O(e2) {
|
|
@@ -90,7 +90,7 @@ function y(e2, n2, t2, i2, o2) {
|
|
|
90
90
|
const e3 = n2.subTableWatchProps;
|
|
91
91
|
if (e3) for (const n3 in e3) {
|
|
92
92
|
const i3 = e3[n3], o3 = (_b = (_a = t2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop;
|
|
93
|
-
i3 && i3.indexOf(o3) >= 0 &&
|
|
93
|
+
i3 && i3.indexOf(o3) >= 0 && d.$emit("_refreshSubTable_" + n3, { propName: o3 });
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
return w(e2, n2, t2, i2, true, o2, true);
|
|
@@ -144,21 +144,19 @@ function T(e2, t2, i2) {
|
|
|
144
144
|
const o2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [];
|
|
145
145
|
let r2 = true;
|
|
146
146
|
(i2 == null ? void 0 : i2.skipValidate) && (r2 = false);
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
const e3 =
|
|
150
|
-
|
|
151
|
-
}(c2.isStandard, c2.event);
|
|
152
|
-
e3 && (r2 = false);
|
|
147
|
+
const l2 = H(e2, o2, "click");
|
|
148
|
+
if (l2) {
|
|
149
|
+
const e3 = l2.isStandard, n2 = l2.event;
|
|
150
|
+
u(e3, n2) && (r2 = false);
|
|
153
151
|
}
|
|
154
|
-
|
|
152
|
+
c(e2, t2, l2, r2).then((o3) => {
|
|
155
153
|
if (!o3) return void (e2.canClick = true);
|
|
156
154
|
const r3 = D(e2, t2, i2);
|
|
157
155
|
r3 ? n(r3) ? r3.then((n2) => {
|
|
158
|
-
n2 ? A(e2, t2,
|
|
156
|
+
n2 ? A(e2, t2, l2, i2) : e2.canClick = true;
|
|
159
157
|
}).catch((n2) => {
|
|
160
158
|
e2.canClick = true;
|
|
161
|
-
}) : A(e2, t2,
|
|
159
|
+
}) : A(e2, t2, l2, i2) : e2.canClick = true;
|
|
162
160
|
}).catch((n2) => {
|
|
163
161
|
e2.canClick = true;
|
|
164
162
|
});
|
|
@@ -170,9 +168,9 @@ function F(e2, n2, t2, i2, o2) {
|
|
|
170
168
|
function U(e2, n2, t2, i2) {
|
|
171
169
|
const o2 = n2.code, r2 = n2.version, u2 = P(n2, t2);
|
|
172
170
|
if (u2) {
|
|
173
|
-
const e3 =
|
|
174
|
-
i2 || (i2 = {}), i2.tableUuid = u2, i2.listCode =
|
|
175
|
-
_(n2) && (i2.selections = t3, i2.id =
|
|
171
|
+
const e3 = l(n2, u2), t3 = e3 ? e3.getSelections() : null, c2 = e3 ? e3.getSelectionIds() : null;
|
|
172
|
+
i2 || (i2 = {}), i2.tableUuid = u2, i2.listCode = m(o2, r2, u2);
|
|
173
|
+
_(n2) && (i2.selections = t3, i2.id = c2 && c2.length > 0 ? c2[0] : null, i2.ids = c2);
|
|
176
174
|
const a2 = e3 ? e3.getTableConfigure() : null;
|
|
177
175
|
i2.tableConfigure = a2;
|
|
178
176
|
}
|
|
@@ -185,7 +183,7 @@ function D(e2, n2, t2) {
|
|
|
185
183
|
}
|
|
186
184
|
function L(e2, n2, t2) {
|
|
187
185
|
const i2 = e2.code + "_";
|
|
188
|
-
|
|
186
|
+
d.$emit(i2 + "open-dialog", { pageContext: e2, configureObj: n2, eventParams: t2 });
|
|
189
187
|
}
|
|
190
188
|
function _(e2, n2) {
|
|
191
189
|
return !(!e2.pageType || "list" !== e2.pageType);
|
|
@@ -211,9 +209,9 @@ function A(e2, t2, i2, o2) {
|
|
|
211
209
|
let n3 = e3 ? e3.row : null;
|
|
212
210
|
n3 || (n3 = e3 && e3.selections && e3.selections.length > 0 ? e3.selections[0] : null);
|
|
213
211
|
return n3;
|
|
214
|
-
}(o2), i3 =
|
|
212
|
+
}(o2), i3 = v(e2, t2, u2, n2);
|
|
215
213
|
let c2, l2 = false;
|
|
216
|
-
i3 && (l2 = i3.show, c2 = l2 ? i3.toPage : null), u2 = c2 ? c2.linkPage : null, u2 && (r2 =
|
|
214
|
+
i3 && (l2 = i3.show, c2 = l2 ? i3.toPage : null), u2 = c2 ? c2.linkPage : null, u2 && (r2 = g(t2), r2.props.linkPage = u2);
|
|
217
215
|
}
|
|
218
216
|
u2 && u2.jumpPageUrl ? (e2.canClick = true, L(e2, r2, o2)) : function(e3, t3, i3, o3) {
|
|
219
217
|
const r3 = i3, u3 = _(e3);
|
|
@@ -282,18 +280,18 @@ function Q(e2) {
|
|
|
282
280
|
if (null == u2 || "" === u2 || null == r2 || 0 === r2.length) e3({ canExecute: true });
|
|
283
281
|
else {
|
|
284
282
|
const i4 = n2.entity.context, o3 = t(n2), c2 = true, l2 = n2.tableName;
|
|
285
|
-
let
|
|
283
|
+
let a2, m2, g2 = true;
|
|
286
284
|
for (let e4 = 0; e4 < r2.length; e4++) {
|
|
287
285
|
const t2 = r2[e4];
|
|
288
286
|
for (let e5 = 0; e5 < u2.length; e5++) {
|
|
289
|
-
const r3 = u2[e5],
|
|
290
|
-
if (!
|
|
291
|
-
g2 = false,
|
|
287
|
+
const r3 = u2[e5], s2 = r3.toolTips, d2 = r3.conditionList;
|
|
288
|
+
if (!f(d2, t2, o3, i4, c2, l2, null, n2)) {
|
|
289
|
+
g2 = false, a2 = s2, m2 = t2;
|
|
292
290
|
break;
|
|
293
291
|
}
|
|
294
292
|
}
|
|
295
293
|
}
|
|
296
|
-
g2 ? e3({ canExecute: true }) : (
|
|
294
|
+
g2 ? e3({ canExecute: true }) : (a2 && s({ showClose: true, type: "warning", message: a2 }), e3({ canExecute: false, message: a2, failEntity: m2 }));
|
|
297
295
|
}
|
|
298
296
|
});
|
|
299
297
|
}
|
|
@@ -390,7 +388,7 @@ function le(n2, t2) {
|
|
|
390
388
|
return i2;
|
|
391
389
|
}
|
|
392
390
|
export {
|
|
393
|
-
|
|
391
|
+
k as appendDefaultMethods,
|
|
394
392
|
Q as canExecuteButton,
|
|
395
393
|
X as cellClick,
|
|
396
394
|
Y as cellDblClick,
|
|
@@ -403,7 +401,7 @@ export {
|
|
|
403
401
|
re as fileUploadDeleted,
|
|
404
402
|
ie as fileUploadUploaded,
|
|
405
403
|
H as getClickEventFuncByType,
|
|
406
|
-
|
|
404
|
+
j as getCustomFunc,
|
|
407
405
|
U as getDefaultEventParams,
|
|
408
406
|
$ as getEventFuncByType,
|
|
409
407
|
B as getEventNameByType,
|
|
@@ -2,7 +2,7 @@ import { PageContext } from '../interfaces/page-design-types';
|
|
|
2
2
|
|
|
3
3
|
export declare function setObjectPropRule(prop: any, rules: any, leafRule: any): {};
|
|
4
4
|
export declare function validator(entity: any, rules: any, columns: any, rowIndex: any, isSql: any, pageContext: any): any;
|
|
5
|
-
export declare function validateDataModelFunc(pageContext: any, configureObj: any, isEnableRequired: any): Promise<unknown>;
|
|
5
|
+
export declare function validateDataModelFunc(pageContext: any, configureObj: any, clickEventFunObj: any, isEnableRequired: any): Promise<unknown>;
|
|
6
6
|
/**
|
|
7
7
|
* 封装自定义校验规则
|
|
8
8
|
* @param orgCustomRules 自定义规则
|
|
@@ -22,3 +22,10 @@ export declare function dynamicControlTableEdit(pageContext: PageContext, custom
|
|
|
22
22
|
* @param fieldRule
|
|
23
23
|
*/
|
|
24
24
|
export declare function packageCustomValidator(fieldRule: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* 是否需要必填验证。特殊的标准事件不需要必填验证。
|
|
27
|
+
* @param isStandardEvent
|
|
28
|
+
* @param clickEvent
|
|
29
|
+
* @returns 返回true表示不需要执行必填验证
|
|
30
|
+
*/
|
|
31
|
+
export declare function isNotNeedValidateRequired(isStandardEvent: boolean, clickEvent: any): boolean;
|
|
@@ -7,7 +7,8 @@ import { isPromise as l } from "agilebuilder-ui/src/utils/common-util";
|
|
|
7
7
|
import { parseSubTablePermissionCondition as a } from "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
8
8
|
import { isWorkflowPage as u, getListCode as f } from "../common-util.js";
|
|
9
9
|
import { scrollIntoComponentWithCode as c, scrollIntoComponentWithUuid as d } from "../anchor-util.js";
|
|
10
|
-
|
|
10
|
+
const m = ["downloadTemplate", "back", "exportForm", "exportPDF", "lineEditCreate", "workflowSave"];
|
|
11
|
+
function p(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
11
12
|
if ("function" == typeof structuredClone) try {
|
|
12
13
|
return structuredClone(e2);
|
|
13
14
|
} catch (e3) {
|
|
@@ -18,7 +19,7 @@ function m(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
|
18
19
|
if (Array.isArray(e2)) {
|
|
19
20
|
const n3 = [];
|
|
20
21
|
return t2.set(s2, n3), e2.forEach((e3, s3) => {
|
|
21
|
-
n3[s3] =
|
|
22
|
+
n3[s3] = p(e3, t2);
|
|
22
23
|
}), n3;
|
|
23
24
|
}
|
|
24
25
|
if (e2 instanceof Date) return new Date(e2.getTime());
|
|
@@ -26,21 +27,21 @@ function m(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
|
26
27
|
if (e2 instanceof Map) {
|
|
27
28
|
const n3 = /* @__PURE__ */ new Map();
|
|
28
29
|
return t2.set(s2, n3), e2.forEach((e3, s3) => {
|
|
29
|
-
n3.set(
|
|
30
|
+
n3.set(p(s3, t2), p(e3, t2));
|
|
30
31
|
}), n3;
|
|
31
32
|
}
|
|
32
33
|
if (e2 instanceof Set) {
|
|
33
34
|
const n3 = /* @__PURE__ */ new Set();
|
|
34
35
|
return t2.set(s2, n3), e2.forEach((e3) => {
|
|
35
|
-
n3.add(
|
|
36
|
+
n3.add(p(e3, t2));
|
|
36
37
|
}), n3;
|
|
37
38
|
}
|
|
38
39
|
const n2 = {};
|
|
39
40
|
return t2.set(s2, n2), Object.keys(e2).forEach((s3) => {
|
|
40
|
-
n2[s3] =
|
|
41
|
+
n2[s3] = p(e2[s3], t2);
|
|
41
42
|
}), n2;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function g(e2, t2, s2) {
|
|
44
45
|
const n2 = {};
|
|
45
46
|
t2 || (t2 = {});
|
|
46
47
|
let r2 = 0;
|
|
@@ -68,10 +69,10 @@ function p(e2, t2, s2) {
|
|
|
68
69
|
r2++;
|
|
69
70
|
}), n2;
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
72
|
+
function b(e2, t2, s2, n2, r2, i2) {
|
|
73
|
+
return w(e2, t2, s2, n2, true, r2, i2);
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function h(e2) {
|
|
75
76
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
76
77
|
if (t2.indexOf(".") >= 0) {
|
|
77
78
|
let s2 = [];
|
|
@@ -79,8 +80,8 @@ function b(e2) {
|
|
|
79
80
|
}
|
|
80
81
|
}), e2;
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
let f2, d2 =
|
|
83
|
+
function w(n2, r2, i2, o2, l2, a2, u2) {
|
|
84
|
+
let f2, d2 = h(r2);
|
|
84
85
|
if (r2 && null !== r2 || !i2 || (d2 = {}), !d2 || 0 === Object.keys(d2).length) return n2.validateErrorField = "", true;
|
|
85
86
|
return new e(d2).validate(n2, { first: true }, (e2, d3) => {
|
|
86
87
|
let m2;
|
|
@@ -98,21 +99,26 @@ function h(n2, r2, i2, o2, l2, a2, u2) {
|
|
|
98
99
|
if (m2 && true === l2) {
|
|
99
100
|
if (/[A-Z]+/.test(m2) && void 0 !== n2[m2.toLowerCase()]) {
|
|
100
101
|
const e3 = JSON.parse(JSON.stringify(n2));
|
|
101
|
-
e3[m2.toUpperCase()] = n2[m2.toLowerCase()], delete e3[m2.toLowerCase()], f2 =
|
|
102
|
+
e3[m2.toUpperCase()] = n2[m2.toLowerCase()], delete e3[m2.toLowerCase()], f2 = w(e3, r2, i2, o2, false, a2, u2);
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
}), f2;
|
|
105
106
|
}
|
|
106
|
-
function y(e2, n2, r2) {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
function y(e2, n2, r2, l2) {
|
|
108
|
+
if (r2) {
|
|
109
|
+
if (V(r2.isStandard, r2.event)) return new Promise((e3, t2) => {
|
|
110
|
+
e3(true);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const f2 = e2.entity.data, d2 = { ...e2.entity.page, ...f2 }, m2 = e2.rules, g2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
114
|
+
return null != g2 && (l2 = g2), null == l2 && (l2 = false), function(e3, n3, r3, l3) {
|
|
109
115
|
if (e3) {
|
|
110
116
|
return u(l3) ? function(e4, n4, r4) {
|
|
111
117
|
return new Promise((l4, u2) => {
|
|
112
|
-
const f3 = o(n4), d3 = n4.entity.context,
|
|
113
|
-
|
|
118
|
+
const f3 = o(n4), d3 = n4.entity.context, m3 = n4.entity.task, g3 = true, b2 = n4.subTablePageInfo;
|
|
119
|
+
E(e4, n4, r4).then((r5) => {
|
|
114
120
|
if (r5) {
|
|
115
|
-
let o2, u3, h2,
|
|
121
|
+
let o2, u3, h2, w2, y2 = r5;
|
|
116
122
|
const R2 = n4.workflowRules;
|
|
117
123
|
if (R2) {
|
|
118
124
|
if (!function(e5, n5) {
|
|
@@ -137,20 +143,20 @@ function y(e2, n2, r2) {
|
|
|
137
143
|
}
|
|
138
144
|
return true;
|
|
139
145
|
}(n4, e4)) return void l4(false);
|
|
140
|
-
const r6 = true, c2 =
|
|
146
|
+
const r6 = true, c2 = p(R2), E2 = n4.hiddenNotValidatorCodes;
|
|
141
147
|
E2 && E2.size > 0 && E2.forEach((e5) => {
|
|
142
148
|
c2.subRules && delete c2.subRules[e5], c2.rules && delete c2.rules[e5];
|
|
143
149
|
}), c2.subRules && (Object.keys(c2.subRules).length > 0 ? c2.totalSubRules || (c2.totalSubRules = {}) : delete c2.subRules);
|
|
144
|
-
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4, c2,
|
|
145
|
-
|
|
146
|
-
} else
|
|
147
|
-
if (true !==
|
|
148
|
-
if (t({ showClose: true, message:
|
|
150
|
+
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4, c2, g3, f3, m3, d3, b2, r6);
|
|
151
|
+
y2 = v2.msg, o2 = v2.field, u3 = v2.listCode, h2 = v2.rowIndex, w2 = v2.pageNum;
|
|
152
|
+
} else y2 = true;
|
|
153
|
+
if (true !== y2) {
|
|
154
|
+
if (t({ showClose: true, message: y2 + "", type: "warning" }), u3) {
|
|
149
155
|
const e5 = s(n4, u3);
|
|
150
156
|
if (e5 && e5.addRequiredClass) {
|
|
151
|
-
e5.addRequiredClass(o2, h2,
|
|
157
|
+
e5.addRequiredClass(o2, h2, w2);
|
|
152
158
|
try {
|
|
153
|
-
c(n4, u3), e5.scrollToCell({ fieldName: o2, rowIndex: h2, pageNum:
|
|
159
|
+
c(n4, u3), e5.scrollToCell({ fieldName: o2, rowIndex: h2, pageNum: w2 });
|
|
154
160
|
} catch (e6) {
|
|
155
161
|
}
|
|
156
162
|
}
|
|
@@ -173,7 +179,7 @@ function y(e2, n2, r2) {
|
|
|
173
179
|
});
|
|
174
180
|
}(n3, l3, r3) : function(e4, t2, s2) {
|
|
175
181
|
return new Promise((n4, r4) => {
|
|
176
|
-
|
|
182
|
+
E(e4, t2, s2).then((t3) => {
|
|
177
183
|
if (t3) {
|
|
178
184
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
179
185
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
|
|
@@ -187,9 +193,9 @@ function y(e2, n2, r2) {
|
|
|
187
193
|
return new Promise((e4, t2) => {
|
|
188
194
|
e4(true);
|
|
189
195
|
});
|
|
190
|
-
}(
|
|
196
|
+
}(l2, d2, m2, e2);
|
|
191
197
|
}
|
|
192
|
-
function
|
|
198
|
+
function R(e2) {
|
|
193
199
|
return new Promise((t2, s2) => {
|
|
194
200
|
const r2 = [], i2 = e2.customValidatorUuids;
|
|
195
201
|
i2 && i2.forEach((t3) => {
|
|
@@ -200,39 +206,39 @@ function w(e2) {
|
|
|
200
206
|
}) : t2(true);
|
|
201
207
|
});
|
|
202
208
|
}
|
|
203
|
-
function
|
|
209
|
+
function E(e2, t2, s2) {
|
|
204
210
|
return new Promise((n2, r2) => {
|
|
205
|
-
const o2 = JSON.parse(JSON.stringify(e2)), a2 =
|
|
211
|
+
const o2 = JSON.parse(JSON.stringify(e2)), a2 = p(s2), u2 = t2.hiddenNotValidatorCodes;
|
|
206
212
|
if (a2 && u2 && u2.size > 0 && u2.forEach((e3) => {
|
|
207
213
|
delete a2[e3];
|
|
208
214
|
}), a2 && 0 !== Object.keys(a2).length) {
|
|
209
|
-
if (true ===
|
|
210
|
-
if (true ===
|
|
211
|
-
const e3 =
|
|
215
|
+
if (true === b(o2, a2, null, null, true, t2)) {
|
|
216
|
+
if (true === P(t2)) {
|
|
217
|
+
const e3 = x(t2);
|
|
212
218
|
e3 && l(e3) ? e3.then((e4) => {
|
|
213
|
-
e4 ?
|
|
219
|
+
e4 ? R(t2).then((e5) => {
|
|
214
220
|
n2(e5);
|
|
215
221
|
}) : n2(false);
|
|
216
|
-
}) :
|
|
222
|
+
}) : R(t2).then((e4) => {
|
|
217
223
|
n2(e4);
|
|
218
224
|
});
|
|
219
225
|
} else r2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
220
226
|
} else r2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
221
227
|
} else {
|
|
222
|
-
if (true ===
|
|
223
|
-
const e3 =
|
|
228
|
+
if (true === P(t2)) {
|
|
229
|
+
const e3 = x(t2);
|
|
224
230
|
e3 && l(e3) ? e3.then((e4) => {
|
|
225
|
-
e4 ?
|
|
231
|
+
e4 ? R(t2).then((e5) => {
|
|
226
232
|
n2(e5);
|
|
227
233
|
}) : n2(false);
|
|
228
|
-
}) :
|
|
234
|
+
}) : R(t2).then((e4) => {
|
|
229
235
|
n2(e4);
|
|
230
236
|
});
|
|
231
237
|
} else r2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
232
238
|
}
|
|
233
239
|
});
|
|
234
240
|
}
|
|
235
|
-
function
|
|
241
|
+
function v(e2, t2, s2) {
|
|
236
242
|
if (!t2) return s2;
|
|
237
243
|
s2 || (s2 = {});
|
|
238
244
|
const n2 = u(e2), r2 = Object.keys(t2), i2 = t2;
|
|
@@ -242,10 +248,10 @@ function E(e2, t2, s2) {
|
|
|
242
248
|
Object.keys(e4).forEach((t3) => {
|
|
243
249
|
s2.subRules || (s2.subRules = {}), s2.subRules[t3] ? Object.assign(s2.subRules[t3], e4[t3]) : s2.subRules[t3] = e4[t3];
|
|
244
250
|
});
|
|
245
|
-
} else
|
|
246
|
-
}),
|
|
251
|
+
} else S(i2[e3]), n2 ? (s2.rules[e3] = i2[e3], s2[e3] && (s2[e3] = i2[e3])) : s2[e3] = i2[e3];
|
|
252
|
+
}), h(s2);
|
|
247
253
|
}
|
|
248
|
-
function
|
|
254
|
+
function P(e2) {
|
|
249
255
|
var _a;
|
|
250
256
|
if (!e2) return true;
|
|
251
257
|
if (u(e2)) return true;
|
|
@@ -269,7 +275,7 @@ function v(e2) {
|
|
|
269
275
|
}
|
|
270
276
|
}
|
|
271
277
|
}
|
|
272
|
-
if (
|
|
278
|
+
if (false === a2.validatorSunTableListData()) {
|
|
273
279
|
try {
|
|
274
280
|
d(e2, o2);
|
|
275
281
|
} catch (e3) {
|
|
@@ -280,32 +286,32 @@ function v(e2) {
|
|
|
280
286
|
}
|
|
281
287
|
return true;
|
|
282
288
|
}
|
|
283
|
-
function
|
|
289
|
+
function k(e2) {
|
|
284
290
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
285
291
|
const t2 = {}, s2 = Object.keys(e2);
|
|
286
292
|
for (let n2 = 0; n2 < s2.length; n2++) {
|
|
287
293
|
const r2 = s2[n2], i2 = e2[r2];
|
|
288
|
-
|
|
294
|
+
C(i2), r2.indexOf(".") > 0 ? g(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
289
295
|
}
|
|
290
296
|
return t2;
|
|
291
297
|
}
|
|
292
|
-
function
|
|
298
|
+
function C(e2, t2) {
|
|
293
299
|
e2.forEach((e3) => {
|
|
294
300
|
e3.message;
|
|
295
301
|
const t3 = e3.label, s2 = i().t(t3);
|
|
296
302
|
e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label: s2 })), e3.myType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), e3.patternType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), void 0 !== e3.max && null !== e3.max && (e3.message = i().t("superPageRuntimeMessage.overMaxLength", { label: s2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = i().t("superPageRuntimeMessage.limitMinLength", { label: s2, value: e3.min }));
|
|
297
303
|
});
|
|
298
304
|
}
|
|
299
|
-
function
|
|
305
|
+
function O(e2) {
|
|
300
306
|
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = o(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
301
307
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
302
308
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
303
309
|
});
|
|
304
310
|
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
|
|
305
311
|
const a2 = e2.customRules;
|
|
306
|
-
return l2 =
|
|
312
|
+
return l2 = v(e2, a2, l2), l2 && (l2.rules || (l2.rules = {}), l2.subRules || (l2.subRules = {})), l2;
|
|
307
313
|
}
|
|
308
|
-
function
|
|
314
|
+
function x(e2) {
|
|
309
315
|
const t2 = [];
|
|
310
316
|
return e2.customRuleEvents && e2.customRuleEvents.length > 0 && e2.customRuleEvents.forEach((s2) => {
|
|
311
317
|
s2.events.forEach((n2) => {
|
|
@@ -323,7 +329,7 @@ function O(e2) {
|
|
|
323
329
|
}) : e3(true);
|
|
324
330
|
}) : null;
|
|
325
331
|
}
|
|
326
|
-
function
|
|
332
|
+
function T(e2, t2) {
|
|
327
333
|
if (!t2) return;
|
|
328
334
|
const n2 = {};
|
|
329
335
|
if (t2.forEach((e3) => {
|
|
@@ -331,30 +337,30 @@ function j(e2, t2) {
|
|
|
331
337
|
s2 ? n2[t3] = s2 : false === e3.required && (n2[t3] = []);
|
|
332
338
|
}), u(e2)) {
|
|
333
339
|
let t3 = e2.workflowRules ? e2.workflowRules : { rules: {}, subRules: {} };
|
|
334
|
-
t3 =
|
|
340
|
+
t3 = v(e2, n2, t3), e2.workflowRules = t3;
|
|
335
341
|
} else {
|
|
336
342
|
let t3 = e2.rules ? e2.rules : {};
|
|
337
|
-
t3 =
|
|
343
|
+
t3 = v(e2, n2, t3), e2.rules = t3;
|
|
338
344
|
}
|
|
339
345
|
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
340
346
|
r2 && r2.length > 0 && M(e2, r2[0]), t2.forEach((t3) => {
|
|
341
347
|
if ("_all_fields" !== t3.name) {
|
|
342
348
|
const n3 = s(e2, t3.name);
|
|
343
|
-
|
|
349
|
+
q(e2, n3, t3);
|
|
344
350
|
}
|
|
345
351
|
});
|
|
346
352
|
}
|
|
347
|
-
function
|
|
353
|
+
function j(e2) {
|
|
348
354
|
M(e2, { disabled: true });
|
|
349
355
|
}
|
|
350
356
|
function M(e2, t2) {
|
|
351
357
|
const s2 = r(e2);
|
|
352
358
|
if (s2) for (const n2 in s2) {
|
|
353
359
|
const r2 = s2[n2];
|
|
354
|
-
|
|
360
|
+
q(e2, r2 ? r2.value : r2, t2);
|
|
355
361
|
}
|
|
356
362
|
}
|
|
357
|
-
function
|
|
363
|
+
function N(e2, t2, r2) {
|
|
358
364
|
var _a;
|
|
359
365
|
let i2, o2;
|
|
360
366
|
if (r2 ? (i2 = s(e2, r2), o2 = i2 ? i2.getTableUuid() : null) : (o2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = o2 ? n(e2, o2) : null), !i2) return;
|
|
@@ -367,7 +373,7 @@ function T(e2, t2, r2) {
|
|
|
367
373
|
}
|
|
368
374
|
i2.dynamicControlTableEdit(e2, t2, u2);
|
|
369
375
|
}
|
|
370
|
-
function
|
|
376
|
+
function q(e2, t2, s2) {
|
|
371
377
|
var _a, _b, _c;
|
|
372
378
|
if (t2) {
|
|
373
379
|
const n2 = t2.getConfigure();
|
|
@@ -378,30 +384,34 @@ function N(e2, t2, s2) {
|
|
|
378
384
|
}
|
|
379
385
|
}
|
|
380
386
|
}
|
|
381
|
-
function
|
|
387
|
+
function S(e2) {
|
|
382
388
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
383
|
-
const t2 =
|
|
389
|
+
const t2 = A[e2.type];
|
|
384
390
|
t2 && (e2.validator = t2.validator);
|
|
385
391
|
}
|
|
386
|
-
const
|
|
387
|
-
return true ===
|
|
392
|
+
const A = { boolean: { validator: function(e2, t2, s2) {
|
|
393
|
+
return true === F(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
388
394
|
} }, date: { validator: function(e2, t2, s2) {
|
|
389
|
-
if (true !==
|
|
395
|
+
if (true !== F(e2, t2)) return false;
|
|
390
396
|
const n2 = new Date(t2);
|
|
391
397
|
return !isNaN(n2.getTime());
|
|
392
398
|
} }, number: { validator: function(e2, t2, s2) {
|
|
393
|
-
return true ===
|
|
394
|
-
} } },
|
|
399
|
+
return true === F(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
400
|
+
} } }, F = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
401
|
+
function V(e2, t2) {
|
|
402
|
+
return e2 && m.includes(t2.eventName);
|
|
403
|
+
}
|
|
395
404
|
export {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
+
j as disabledAllFields,
|
|
406
|
+
N as dynamicControlTableEdit,
|
|
407
|
+
O as getWorkflowRules,
|
|
408
|
+
C as i18nValidatePropRulesMessage,
|
|
409
|
+
k as i18nValidateRulesMessage,
|
|
410
|
+
V as isNotNeedValidateRequired,
|
|
411
|
+
v as packageCustomRules,
|
|
412
|
+
S as packageCustomValidator,
|
|
413
|
+
g as setObjectPropRule,
|
|
414
|
+
T as updateFormItemEditState,
|
|
405
415
|
y as validateDataModelFunc,
|
|
406
|
-
|
|
416
|
+
b as validator
|
|
407
417
|
};
|