super-page-runtime 2.3.12-sit2 → 2.3.13-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/events/event-util.js +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +25 -25
- package/dist/es/components/runtime/utils/events/validator-util.js +168 -145
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +40 -39
- 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-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +3 -3
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +156 -146
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +85 -82
- package/package.json +2 -2
|
@@ -268,7 +268,7 @@ function Q(e2) {
|
|
|
268
268
|
}
|
|
269
269
|
const u2 = i2.props.base.condition;
|
|
270
270
|
return new Promise((e3, i3) => {
|
|
271
|
-
if (
|
|
271
|
+
if (null == u2 || "" === u2 || null == r2 || 0 === r2.length) e3({ canExecute: true });
|
|
272
272
|
else {
|
|
273
273
|
const i4 = n2.entity.context, o3 = t(n2), c2 = true, l2 = n2.tableName;
|
|
274
274
|
let f2, m2, g2 = true;
|
|
@@ -70,7 +70,7 @@ export declare function getTaskInformitions(params: any): any;
|
|
|
70
70
|
export declare function doReturnTaskTo(params: any, selectTaskNode: any): void;
|
|
71
71
|
export declare function getRemoveSigner(params: any): any;
|
|
72
72
|
export declare function doRemoveSigners(params: any, selectRemoveTasks: any): void;
|
|
73
|
-
export declare function isVisibleWorkflowButton(standardEventName: any, buttonInfo: any, completeTaskParam: any): boolean;
|
|
73
|
+
export declare function isVisibleWorkflowButton(standardEventName: any, buttonInfo: any, completeTaskParam: any, btnConfigure: any): boolean;
|
|
74
74
|
/**
|
|
75
75
|
* 刷新页面
|
|
76
76
|
* @param pageContext
|
|
@@ -111,8 +111,7 @@ const j = { save: function(e2) {
|
|
|
111
111
|
u2 || (u2 = n2.code);
|
|
112
112
|
let l2 = false;
|
|
113
113
|
l2 = void 0 !== a2.isAsync && null !== a2.isAsync && a2.isAsync;
|
|
114
|
-
const p2 = void 0 === a2.isPermission || "true" === a2.isPermission || a2.isPermission, d2 = P(o2, n2), m2 = u2;
|
|
115
|
-
let f2 = { backendUrl: n2.backendUrl, pageContext: n2 };
|
|
114
|
+
const p2 = void 0 === a2.isPermission || "true" === a2.isPermission || a2.isPermission, d2 = P(o2, n2), m2 = u2, f2 = { backendUrl: n2.backendUrl, pageContext: n2 };
|
|
116
115
|
f2.isShowWatermark = void 0 === ((_b = (_a = o2.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_d = (_c = o2.props) == null ? void 0 : _c.watermark) == null ? void 0 : _d.isShowWatermark) + "", f2.watermarkContent = ((_f = (_e = o2.props) == null ? void 0 : _e.watermark) == null ? void 0 : _f.content) && ((_h = (_g = o2.props) == null ? void 0 : _g.watermark) == null ? void 0 : _h.content.length) > 0 ? (_j = (_i = o2.props) == null ? void 0 : _i.watermark) == null ? void 0 : _j.content.join("-~") : "", window.$vueApp.config.globalProperties.$exportDataNew(c2, m2, i2, d2, null, f2, l2, n2.code, p2);
|
|
117
116
|
});
|
|
118
117
|
}(e2);
|
|
@@ -260,8 +259,7 @@ const j = { save: function(e2) {
|
|
|
260
259
|
let c2, u2 = t2.label;
|
|
261
260
|
u2 || (u2 = t2.code);
|
|
262
261
|
c2 = u2;
|
|
263
|
-
|
|
264
|
-
const p2 = ae(t2);
|
|
262
|
+
const l2 = { reportDataList: r2, beanName: t2.beanName }, p2 = ae(t2);
|
|
265
263
|
l2.additionalParamMap = p2, l2.isShowWatermark = void 0 === ((_b = (_a = o2.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_d = (_c = o2.props) == null ? void 0 : _c.watermark) == null ? void 0 : _d.isShowWatermark) + "", l2.watermark = ((_f = (_e = o2.props) == null ? void 0 : _e.watermark) == null ? void 0 : _f.content) && ((_h = (_g = o2.props) == null ? void 0 : _g.watermark) == null ? void 0 : _h.content.length) > 0 ? (_j = (_i = o2.props) == null ? void 0 : _i.watermark) == null ? void 0 : _j.content.join("-~") : "";
|
|
266
264
|
const d2 = t2.backendUrl, m2 = n(d2, t2.isTest) + "/dsc/commons/exportChart";
|
|
267
265
|
W();
|
|
@@ -423,7 +421,7 @@ function G(e2, t2, s2) {
|
|
|
423
421
|
const n2 = t2.props.base.successOperation;
|
|
424
422
|
if (!n2 || null === n2) return;
|
|
425
423
|
const o2 = t2.props.base.isNeedValueMapping;
|
|
426
|
-
"noOperation" === n2 ?
|
|
424
|
+
"noOperation" === n2 ? e2.canClick = true : "refresh" === n2 ? s2 && (s2.id || s2.ID) ? fe(e2, s2.ID ? s2.ID : s2.id) : e2.canClick = true : "closeWindow" !== n2 && "closeWindowAndRefresh" !== n2 || (J(e2, t2, s2, o2), e2.canClick = true);
|
|
427
425
|
}
|
|
428
426
|
function J(e2, t2, s2, n2) {
|
|
429
427
|
const o2 = e2.entity && e2.entity.request ? e2.entity.request.jumpMode : null;
|
|
@@ -738,43 +736,45 @@ function de(e2, t2) {
|
|
|
738
736
|
});
|
|
739
737
|
}
|
|
740
738
|
}
|
|
741
|
-
function me(e2, t2, s2) {
|
|
742
|
-
let
|
|
743
|
-
return e2 && t2 && ("workflowSave" === e2 ?
|
|
739
|
+
function me(e2, t2, s2, n2) {
|
|
740
|
+
let o2 = false;
|
|
741
|
+
return e2 && t2 && ("workflowSave" === e2 ? o2 = function(e3) {
|
|
744
742
|
if ((void 0 === e3.processState || null === e3.processState || "UNSUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active) && (void 0 === e3.processState || true === e3.showButtonSave)) return true;
|
|
745
743
|
if (e3.processState && "SUBMIT" === e3.processState && "TYPE_READ" !== e3.processingMode && e3.showButtonSave && ("WAIT_TRANSACT" === e3.active || "WAIT_DESIGNATE_TRANSACTOR" === e3.active || "WAIT_CHOICE_TACHE" === e3.active || "DRAW_WAIT" === e3.active)) return true;
|
|
746
744
|
return false;
|
|
747
|
-
}(t2) : "submitProcess" === e2 ?
|
|
745
|
+
}(t2) : "submitProcess" === e2 ? o2 = function(e3) {
|
|
748
746
|
if ((void 0 === e3.processState || null === e3.processState || "UNSUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active) && (void 0 === e3.processState || true === e3.showButtonSave)) return true;
|
|
749
747
|
return false;
|
|
750
|
-
}(t2) : "submitTask" === e2 ?
|
|
748
|
+
}(t2) : "submitTask" === e2 ? o2 = function(e3) {
|
|
751
749
|
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "EDIT" === e3.processingMode) return true;
|
|
752
750
|
return false;
|
|
753
|
-
}(t2) : "drawTask" === e2 ?
|
|
751
|
+
}(t2) : "drawTask" === e2 ? o2 = function(e3) {
|
|
754
752
|
if (e3.processState && "SUBMIT" === e3.processState && e3.active && ("DRAW_WAIT" === e3.active || "DEPT_DRAW_WAIT" === e3.active) && e3.showButtonDraw) return true;
|
|
755
753
|
return false;
|
|
756
|
-
}(t2) : "abandonReceive" === e2 ?
|
|
754
|
+
}(t2) : "abandonReceive" === e2 ? o2 = function(e3) {
|
|
757
755
|
if (e3.processState && "SUBMIT" === e3.processState && (e3.drawTask && "WAIT_TRANSACT" === e3.active || e3.canAbandonDeptTask && "WAIT_TRANSACT" === e3.active) && e3.showButtonAbandon) return true;
|
|
758
756
|
return false;
|
|
759
|
-
}(t2) : "approve" === e2 || "refuse" === e2 ?
|
|
757
|
+
}(t2) : "approve" === e2 || "refuse" === e2 ? o2 = function(e3) {
|
|
760
758
|
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && ("APPROVE" === e3.processingMode || "COUNTERSIGN" === e3.processingMode)) return true;
|
|
761
759
|
return false;
|
|
762
|
-
}(t2) : "readed" === e2 ?
|
|
760
|
+
}(t2) : "readed" === e2 ? o2 = function(e3) {
|
|
763
761
|
if ("WAIT_TRANSACT" === e3.active && "TYPE_READ" === e3.processingMode) return true;
|
|
764
762
|
return false;
|
|
765
|
-
}(t2) : "assign" === e2 ?
|
|
763
|
+
}(t2) : "assign" === e2 ? o2 = function(e3) {
|
|
766
764
|
if (e3.processState && "SUBMIT" === e3.processState && "TYPE_READ" !== e3.processingMode && ("WAIT_TRANSACT" === e3.active || "DRAW_WAIT" === e3.active)) return true;
|
|
767
765
|
return false;
|
|
768
|
-
}(t2) : "copyTask" === e2 ?
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
766
|
+
}(t2) : "copyTask" === e2 ? o2 = function(e3, t3) {
|
|
767
|
+
let s3 = false;
|
|
768
|
+
e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "TYPE_READ" !== e3.processingMode && e3.showButtonCopy && (s3 = true);
|
|
769
|
+
t3 && (t3.props.base.state = s3 ? "" : "hidden");
|
|
770
|
+
return true;
|
|
771
|
+
}(t2, n2) : "addSigner" === e2 ? o2 = function(e3) {
|
|
772
772
|
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && ("APPROVE" === e3.processingMode || "COUNTERSIGN" === e3.processingMode) && "COUNTERSIGN" === e3.processingMode && e3.showButtonAddCounter) return true;
|
|
773
773
|
return false;
|
|
774
|
-
}(t2) : "removeSigner" === e2 ?
|
|
774
|
+
}(t2) : "removeSigner" === e2 ? o2 = function(e3) {
|
|
775
775
|
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && ("APPROVE" === e3.processingMode || "COUNTERSIGN" === e3.processingMode) && "COUNTERSIGN" === e3.processingMode && e3.showButtonDelCounter) return true;
|
|
776
776
|
return false;
|
|
777
|
-
}(t2) : "retrieveTask" === e2 ?
|
|
777
|
+
}(t2) : "retrieveTask" === e2 ? o2 = function(e3) {
|
|
778
778
|
if (e3.processState && "SUBMIT" === e3.processState && function(e4) {
|
|
779
779
|
if ("COMPLETED" !== e4.active) return false;
|
|
780
780
|
if ("TYPE_READ" === e4.processingMode) return false;
|
|
@@ -782,10 +782,10 @@ function me(e2, t2, s2) {
|
|
|
782
782
|
return true;
|
|
783
783
|
}(e3)) return true;
|
|
784
784
|
return false;
|
|
785
|
-
}(t2) : "agreement" === e2 || "oppose" === e2 ?
|
|
785
|
+
}(t2) : "agreement" === e2 || "oppose" === e2 ? o2 = function(e3) {
|
|
786
786
|
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "VOTE" === e3.processingMode) return true;
|
|
787
787
|
return false;
|
|
788
|
-
}(t2) : "kiken" === e2 ?
|
|
788
|
+
}(t2) : "kiken" === e2 ? o2 = function(e3) {
|
|
789
789
|
if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "VOTE" === e3.processingMode && e3.showButtonKiken) return true;
|
|
790
790
|
return false;
|
|
791
791
|
}(t2) : function(e3, t3) {
|
|
@@ -795,10 +795,10 @@ function me(e2, t2, s2) {
|
|
|
795
795
|
t4 && (s3 = t4.taskComplete);
|
|
796
796
|
return s3;
|
|
797
797
|
}(t3);
|
|
798
|
-
}(t2, s2) && (
|
|
798
|
+
}(t2, s2) && (o2 = "returnToPreviousTask" !== e2 || function(e3) {
|
|
799
799
|
if (e3.rebuttable) return true;
|
|
800
800
|
return false;
|
|
801
|
-
}(t2))),
|
|
801
|
+
}(t2))), o2;
|
|
802
802
|
}
|
|
803
803
|
function fe(e2, t2) {
|
|
804
804
|
e2.entity.page || (e2.entity.page = {}), e2.entity.page._isRefresh = true, ge(e2, t2).then((t3) => {
|
|
@@ -1,109 +1,124 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import { getComponentRefByCode as
|
|
3
|
+
import { getComponentRefByCode as n, getComponentRef as s, getAllComponentRefs as r } from "../global-refs.js";
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
|
-
import { getAdditionalParamMap as
|
|
6
|
-
import { isPromise as
|
|
5
|
+
import { getAdditionalParamMap as o } from "./standard-event.js";
|
|
6
|
+
import { isPromise as l } from "agilebuilder-ui/src/utils/common-util";
|
|
7
7
|
import { getListCode as a, isWorkflowPage as u } from "../common-util.js";
|
|
8
|
-
function f(e2, t2,
|
|
9
|
-
const
|
|
8
|
+
function f(e2, t2, n2) {
|
|
9
|
+
const s2 = {};
|
|
10
10
|
t2 || (t2 = {});
|
|
11
11
|
let r2 = 0;
|
|
12
12
|
const i2 = e2.split(".");
|
|
13
13
|
return i2.forEach((e3) => {
|
|
14
|
-
let
|
|
15
|
-
if (r2 === i2.length - 1)
|
|
16
|
-
let
|
|
17
|
-
for (let r3 = 0; r3 < t3.length; r3++) if (
|
|
18
|
-
if (t3[r3 + 1] ===
|
|
14
|
+
let o2;
|
|
15
|
+
if (r2 === i2.length - 1) o2 = function(e4, t3, n3) {
|
|
16
|
+
let s3;
|
|
17
|
+
for (let r3 = 0; r3 < t3.length; r3++) if (s3 = 0 === r3 ? e4[t3[r3]] : s3.fields[t3[r3]], r3 !== t3.length - 1) {
|
|
18
|
+
if (t3[r3 + 1] === n3) break;
|
|
19
19
|
}
|
|
20
|
-
return
|
|
21
|
-
}(
|
|
20
|
+
return s3;
|
|
21
|
+
}(s2, i2, e3), o2.fields[e3] = n2;
|
|
22
22
|
else {
|
|
23
|
-
let
|
|
24
|
-
0 === r2 ?
|
|
25
|
-
let
|
|
23
|
+
let n3;
|
|
24
|
+
0 === r2 ? o2 = t2 : (n3 = function(e4, t3, n4) {
|
|
25
|
+
let s3;
|
|
26
26
|
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
27
27
|
const i3 = t3[r3];
|
|
28
|
-
if (
|
|
28
|
+
if (s3 = 0 === r3 ? e4[i3] : s3.fields[t3[r3]], i3 === n4) break;
|
|
29
29
|
}
|
|
30
|
-
return
|
|
31
|
-
}(
|
|
30
|
+
return s3;
|
|
31
|
+
}(s2, i2, i2[r2 - 1]), o2 = n3.fields), o2[e3] || (o2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? s2[e3] = o2[e3] : n3.fields[e3] = o2[e3];
|
|
32
32
|
}
|
|
33
33
|
r2++;
|
|
34
|
-
}),
|
|
34
|
+
}), s2;
|
|
35
35
|
}
|
|
36
|
-
function c(e2, t2,
|
|
37
|
-
return m(e2, t2,
|
|
36
|
+
function c(e2, t2, n2, s2, r2, i2) {
|
|
37
|
+
return m(e2, t2, n2, s2, true, r2, i2);
|
|
38
38
|
}
|
|
39
39
|
function d(e2) {
|
|
40
40
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
41
41
|
if (t2.indexOf(".") >= 0) {
|
|
42
|
-
let
|
|
43
|
-
|
|
42
|
+
let n2 = [];
|
|
43
|
+
n2 = t2.split("."), e2[n2[0]] ? e2[n2[0]].fields[n2[1]] = e2[t2][0] : (e2[n2[0]] = new Object(), e2[n2[0]].fields = new Object(), e2[n2[0]].fields[n2[1]] = e2[t2][0], e2[n2[0]].type = "object"), delete e2[t2];
|
|
44
44
|
}
|
|
45
45
|
}), e2;
|
|
46
46
|
}
|
|
47
|
-
function m(
|
|
47
|
+
function m(s2, r2, i2, o2, l2, a2, u2) {
|
|
48
48
|
let f2, c2 = d(r2);
|
|
49
|
-
if (r2 && null !== r2 || !i2 || (c2 = {}), !c2 || 0 === Object.keys(c2).length) return
|
|
50
|
-
return new e(c2).validate(
|
|
49
|
+
if (r2 && null !== r2 || !i2 || (c2 = {}), !c2 || 0 === Object.keys(c2).length) return s2.validateErrorField = "", true;
|
|
50
|
+
return new e(c2).validate(s2, { first: true }, (e2, c3) => {
|
|
51
51
|
let d2;
|
|
52
52
|
if (e2) {
|
|
53
53
|
f2 = e2[0].message, d2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const s3 = n(u2, d2);
|
|
55
|
+
s3 && s3.addRequiredClass && s3.addRequiredClass();
|
|
56
56
|
} else f2 = true;
|
|
57
|
-
if (d2 && true ===
|
|
58
|
-
if (/[A-Z]+/.test(d2) && void 0 !==
|
|
59
|
-
const e3 = JSON.parse(JSON.stringify(
|
|
60
|
-
e3[d2.toUpperCase()] =
|
|
57
|
+
if (d2 && true === l2) {
|
|
58
|
+
if (/[A-Z]+/.test(d2) && void 0 !== s2[d2.toLowerCase()]) {
|
|
59
|
+
const e3 = JSON.parse(JSON.stringify(s2));
|
|
60
|
+
e3[d2.toUpperCase()] = s2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 = m(e3, r2, i2, o2, false, a2, u2);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}), f2;
|
|
64
64
|
}
|
|
65
|
-
function p(e2,
|
|
66
|
-
const
|
|
67
|
-
return null != c2 && (r2 = c2), null == r2 && (r2 = false), function(e3,
|
|
65
|
+
function p(e2, s2, r2) {
|
|
66
|
+
const l2 = e2.entity.data, a2 = { ...e2.entity.page, ...l2 }, f2 = e2.rules, c2 = s2.props.base ? s2.props.base.isEnableRequired : null;
|
|
67
|
+
return null != c2 && (r2 = c2), null == r2 && (r2 = false), function(e3, s3, r3, l3) {
|
|
68
68
|
if (e3) {
|
|
69
|
-
return u(
|
|
70
|
-
return new Promise((
|
|
71
|
-
const u2 =
|
|
72
|
-
b(e4,
|
|
69
|
+
return u(l3) ? function(e4, s4, r4) {
|
|
70
|
+
return new Promise((l4, a3) => {
|
|
71
|
+
const u2 = o(s4), f3 = s4.entity.context, c3 = s4.entity.task, d2 = true, m2 = s4.subTablePageInfo;
|
|
72
|
+
b(e4, s4, r4).then((r5) => {
|
|
73
73
|
if (r5) {
|
|
74
|
-
let
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
let o2, a4, p2, g2, b2 = r5;
|
|
75
|
+
const h2 = s4.workflowRules;
|
|
76
|
+
if (h2) {
|
|
77
|
+
if (!function(e5, s5) {
|
|
78
|
+
if (!e5.actionPermissions) return true;
|
|
79
|
+
const r7 = Object.keys(e5.actionPermissions);
|
|
80
|
+
for (let o3 = 0; o3 < r7.length; o3++) {
|
|
81
|
+
const l5 = r7[o3], a5 = e5.actionPermissions[l5];
|
|
82
|
+
if (a5 && a5.notEmpty) {
|
|
83
|
+
let r8 = false;
|
|
84
|
+
if (s5[l5] ? Array.isArray(s5[l5]) && 0 === s5[l5].length && (r8 = true) : r8 = true, r8) {
|
|
85
|
+
const s6 = n(e5, l5).getConfigure();
|
|
86
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: s6.title ? s6.title : l5 }), type: "warning" }), false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}(s4, e4)) return void l4(false);
|
|
92
|
+
const r6 = true, y2 = window.$vueApp.config.globalProperties.$formValidator(e4, h2, d2, u2, c3, f3, m2, r6);
|
|
93
|
+
b2 = y2.msg, o2 = y2.field, a4 = y2.listCode, p2 = y2.rowIndex, g2 = y2.pageNum;
|
|
94
|
+
} else b2 = true;
|
|
95
|
+
if (true !== b2) {
|
|
96
|
+
if (t({ showClose: true, message: b2 + "", type: "warning" }), a4) {
|
|
97
|
+
const e5 = n(s4, a4);
|
|
98
|
+
e5 && e5.addRequiredClass && e5.addRequiredClass(o2, p2, g2);
|
|
84
99
|
} else {
|
|
85
|
-
const e5 =
|
|
100
|
+
const e5 = n(s4, o2);
|
|
86
101
|
e5 && e5.addRequiredClass && e5.addRequiredClass();
|
|
87
102
|
}
|
|
88
|
-
|
|
89
|
-
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField,
|
|
103
|
+
l4(false);
|
|
104
|
+
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4);
|
|
90
105
|
} else a3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
91
106
|
}).catch((e5) => {
|
|
92
107
|
a3(e5);
|
|
93
108
|
});
|
|
94
109
|
});
|
|
95
|
-
}(
|
|
96
|
-
return new Promise((
|
|
97
|
-
b(e4, t2,
|
|
110
|
+
}(s3, l3, r3) : function(e4, t2, n2) {
|
|
111
|
+
return new Promise((s4, r4) => {
|
|
112
|
+
b(e4, t2, n2).then((t3) => {
|
|
98
113
|
if (t3) {
|
|
99
114
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
100
|
-
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField,
|
|
101
|
-
} else
|
|
115
|
+
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
|
|
116
|
+
} else s4(false);
|
|
102
117
|
}).catch((e5) => {
|
|
103
118
|
r4(e5);
|
|
104
119
|
});
|
|
105
120
|
});
|
|
106
|
-
}(
|
|
121
|
+
}(s3, l3, r3);
|
|
107
122
|
}
|
|
108
123
|
return new Promise((e4, t2) => {
|
|
109
124
|
e4(true);
|
|
@@ -111,118 +126,126 @@ function p(e2, n2, r2) {
|
|
|
111
126
|
}(r2, a2, f2, e2);
|
|
112
127
|
}
|
|
113
128
|
function g(e2) {
|
|
114
|
-
return new Promise((t2,
|
|
129
|
+
return new Promise((t2, n2) => {
|
|
115
130
|
const r2 = [], i2 = e2.customValidatorUuids;
|
|
116
131
|
i2 && i2.forEach((t3) => {
|
|
117
|
-
const
|
|
118
|
-
|
|
132
|
+
const n3 = s(e2, t3);
|
|
133
|
+
n3 && n3.validator && r2.push(n3.validator());
|
|
119
134
|
}), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
|
|
120
135
|
e3.includes(false) ? t2(false) : t2(true);
|
|
121
136
|
}) : t2(true);
|
|
122
137
|
});
|
|
123
138
|
}
|
|
124
|
-
function b(e2,
|
|
125
|
-
return new Promise((
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
if (true === c(
|
|
139
|
+
function b(e2, n2, r2) {
|
|
140
|
+
return new Promise((o2, a2) => {
|
|
141
|
+
const u2 = JSON.parse(JSON.stringify(e2));
|
|
142
|
+
if (r2 && 0 !== Object.keys(r2).length) {
|
|
143
|
+
if (true === c(u2, r2, null, null, true, n2)) {
|
|
129
144
|
const e3 = function(e4) {
|
|
145
|
+
var _a;
|
|
130
146
|
if (!e4) return true;
|
|
131
|
-
const
|
|
132
|
-
if (!
|
|
133
|
-
for (let
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
147
|
+
const n3 = e4.tableUuids;
|
|
148
|
+
if (!n3) return true;
|
|
149
|
+
for (let r3 = 0; r3 < n3.length; r3++) {
|
|
150
|
+
const o3 = n3[r3], l2 = s(e4, o3);
|
|
151
|
+
if (l2) {
|
|
152
|
+
if (l2.getConfigure()) {
|
|
153
|
+
const e5 = l2.getConfigure();
|
|
154
|
+
if ((_a = e5 == null ? void 0 : e5.verification) == null ? void 0 : _a.notEmpty) {
|
|
155
|
+
const n4 = l2.getTableData();
|
|
156
|
+
if (!n4 || !Array.isArray(n4) || 0 === n4.length) return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: e5.title ? e5.title : e5.code }), type: "warning" }), false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (!l2.validatorSunTableListData()) return false;
|
|
137
160
|
}
|
|
138
161
|
}
|
|
139
162
|
return true;
|
|
140
|
-
}(
|
|
163
|
+
}(n2);
|
|
141
164
|
if (true === e3) {
|
|
142
165
|
const e4 = function(e5) {
|
|
143
|
-
const
|
|
144
|
-
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((
|
|
145
|
-
|
|
146
|
-
const r3 = e5.customEvents[
|
|
147
|
-
|
|
166
|
+
const t2 = [];
|
|
167
|
+
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
|
|
168
|
+
n3.events.forEach((s2) => {
|
|
169
|
+
const r3 = e5.customEvents[s2];
|
|
170
|
+
t2.push(r3.apply(r3, [{ prop: n3.prop, pageContext: e5 }]));
|
|
148
171
|
});
|
|
149
172
|
});
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}), r3.includes(false) && e6(false),
|
|
155
|
-
|
|
156
|
-
}).catch((
|
|
173
|
+
if (t2 && t2.length > 0) return new Promise((e6, n3) => {
|
|
174
|
+
const s2 = [], r3 = [];
|
|
175
|
+
t2.forEach((e7) => {
|
|
176
|
+
l(e7) ? s2.push(e7) : r3.push(e7);
|
|
177
|
+
}), r3.includes(false) && e6(false), s2.length > 0 ? Promise.all(s2).then((t3) => {
|
|
178
|
+
t3.includes(false) ? e6(false) : e6(true);
|
|
179
|
+
}).catch((t3) => {
|
|
157
180
|
e6(false);
|
|
158
181
|
}) : e6(true);
|
|
159
182
|
});
|
|
160
183
|
return null;
|
|
161
|
-
}(
|
|
162
|
-
e4 &&
|
|
163
|
-
e5 ? g(
|
|
164
|
-
|
|
165
|
-
}) :
|
|
166
|
-
}) : g(
|
|
167
|
-
|
|
184
|
+
}(n2);
|
|
185
|
+
e4 && l(e4) ? e4.then((e5) => {
|
|
186
|
+
e5 ? g(n2).then((e6) => {
|
|
187
|
+
o2(e6);
|
|
188
|
+
}) : o2(false);
|
|
189
|
+
}) : g(n2).then((e5) => {
|
|
190
|
+
o2(e5);
|
|
168
191
|
});
|
|
169
|
-
} else
|
|
170
|
-
} else
|
|
171
|
-
} else
|
|
192
|
+
} else a2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
193
|
+
} else a2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
194
|
+
} else o2(true);
|
|
172
195
|
});
|
|
173
196
|
}
|
|
174
197
|
function h(e2, t2) {
|
|
175
198
|
if (!e2) return t2;
|
|
176
199
|
t2 || (t2 = {});
|
|
177
|
-
const
|
|
178
|
-
return
|
|
200
|
+
const n2 = Object.keys(e2), s2 = e2;
|
|
201
|
+
return n2.forEach((e3) => {
|
|
179
202
|
if ("__subRules" === e3) {
|
|
180
|
-
const e4 =
|
|
181
|
-
Object.keys(e4).forEach((
|
|
182
|
-
t2.subRules || (t2.subRules = {}), t2.subRules[
|
|
203
|
+
const e4 = s2.__subRules;
|
|
204
|
+
Object.keys(e4).forEach((n3) => {
|
|
205
|
+
t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
|
|
183
206
|
});
|
|
184
|
-
} else
|
|
207
|
+
} else C(s2[e3]), t2[e3] = s2[e3];
|
|
185
208
|
}), d(t2);
|
|
186
209
|
}
|
|
187
|
-
function
|
|
210
|
+
function y(e2) {
|
|
188
211
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
189
|
-
const t2 = {},
|
|
190
|
-
for (let
|
|
191
|
-
const r2 = s2
|
|
192
|
-
|
|
212
|
+
const t2 = {}, n2 = Object.keys(e2);
|
|
213
|
+
for (let s2 = 0; s2 < n2.length; s2++) {
|
|
214
|
+
const r2 = n2[s2], i2 = e2[r2];
|
|
215
|
+
w(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
193
216
|
}
|
|
194
217
|
return t2;
|
|
195
218
|
}
|
|
196
|
-
function
|
|
219
|
+
function w(e2, t2) {
|
|
197
220
|
e2.forEach((e3) => {
|
|
198
221
|
e3.message;
|
|
199
|
-
const t3 = e3.label,
|
|
200
|
-
e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label:
|
|
222
|
+
const t3 = e3.label, n2 = i().t(t3);
|
|
223
|
+
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 }));
|
|
201
224
|
});
|
|
202
225
|
}
|
|
203
226
|
function R(e2) {
|
|
204
|
-
const t2 = e2.entity.data,
|
|
227
|
+
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = o(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
205
228
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
206
229
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
207
230
|
});
|
|
208
|
-
let
|
|
209
|
-
return
|
|
231
|
+
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
|
|
232
|
+
return l2 = h(e2.customRules, l2), l2;
|
|
210
233
|
}
|
|
211
234
|
function v(e2, t2) {
|
|
212
235
|
if (!t2) return;
|
|
213
|
-
const
|
|
236
|
+
const s2 = {};
|
|
214
237
|
t2.forEach((e3) => {
|
|
215
|
-
const { name: t3, rules:
|
|
216
|
-
|
|
238
|
+
const { name: t3, rules: n2 } = e3;
|
|
239
|
+
n2 && (s2[t3] = n2);
|
|
217
240
|
});
|
|
218
241
|
let r2 = e2.rules ? e2.rules : {};
|
|
219
|
-
r2 = h(
|
|
242
|
+
r2 = h(s2, r2), e2.rules = r2;
|
|
220
243
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
221
|
-
i2 = h(
|
|
222
|
-
const
|
|
223
|
-
|
|
244
|
+
i2 = h(s2, i2), e2.workflowRules = i2;
|
|
245
|
+
const o2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
246
|
+
o2 && o2.length > 0 && E(e2, o2[0]), t2.forEach((t3) => {
|
|
224
247
|
if ("_all_fields" !== t3.name) {
|
|
225
|
-
O(
|
|
248
|
+
O(n(e2, t3.name), t3);
|
|
226
249
|
}
|
|
227
250
|
});
|
|
228
251
|
}
|
|
@@ -230,21 +253,21 @@ function P(e2) {
|
|
|
230
253
|
E(e2, { disabled: true });
|
|
231
254
|
}
|
|
232
255
|
function E(e2, t2) {
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
const
|
|
236
|
-
O(
|
|
256
|
+
const n2 = r(e2);
|
|
257
|
+
if (n2) for (const e3 in n2) {
|
|
258
|
+
const s2 = n2[e3];
|
|
259
|
+
O(s2 ? s2.value : s2, t2);
|
|
237
260
|
}
|
|
238
261
|
}
|
|
239
262
|
function k(e2, t2, r2) {
|
|
240
263
|
var _a;
|
|
241
|
-
let i2,
|
|
242
|
-
if (r2 ? (i2 =
|
|
243
|
-
const
|
|
264
|
+
let i2, o2;
|
|
265
|
+
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, u2 = e2.version, f2 = a(l2, u2, o2);
|
|
244
267
|
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
|
|
245
|
-
const
|
|
268
|
+
const n2 = e2.workflowRules.subRules[r2];
|
|
246
269
|
t2.forEach((e3) => {
|
|
247
|
-
|
|
270
|
+
n2[e3.name] = e3;
|
|
248
271
|
});
|
|
249
272
|
}
|
|
250
273
|
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
@@ -252,32 +275,32 @@ function k(e2, t2, r2) {
|
|
|
252
275
|
function O(e2, t2) {
|
|
253
276
|
var _a, _b, _c;
|
|
254
277
|
if (e2) {
|
|
255
|
-
const
|
|
256
|
-
void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a =
|
|
278
|
+
const n2 = e2.getConfigure();
|
|
279
|
+
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));
|
|
257
280
|
}
|
|
258
281
|
}
|
|
259
|
-
function
|
|
282
|
+
function C(e2) {
|
|
260
283
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
261
|
-
const t2 =
|
|
284
|
+
const t2 = j[e2.type];
|
|
262
285
|
t2 && (e2.validator = t2.validator);
|
|
263
286
|
}
|
|
264
|
-
const
|
|
265
|
-
return true ===
|
|
266
|
-
} }, date: { validator: function(e2, t2,
|
|
267
|
-
if (true !==
|
|
268
|
-
const
|
|
269
|
-
return !isNaN(
|
|
270
|
-
} }, number: { validator: function(e2, t2,
|
|
271
|
-
return true ===
|
|
272
|
-
} } },
|
|
287
|
+
const j = { boolean: { validator: function(e2, t2, n2) {
|
|
288
|
+
return true === x(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
289
|
+
} }, date: { validator: function(e2, t2, n2) {
|
|
290
|
+
if (true !== x(e2, t2)) return false;
|
|
291
|
+
const s2 = new Date(t2);
|
|
292
|
+
return !isNaN(s2.getTime());
|
|
293
|
+
} }, number: { validator: function(e2, t2, n2) {
|
|
294
|
+
return true === x(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
295
|
+
} } }, x = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
273
296
|
export {
|
|
274
297
|
P as disabledAllFields,
|
|
275
298
|
k as dynamicControlTableEdit,
|
|
276
299
|
R as getWorkflowRules,
|
|
277
|
-
|
|
278
|
-
|
|
300
|
+
w as i18nValidatePropRulesMessage,
|
|
301
|
+
y as i18nValidateRulesMessage,
|
|
279
302
|
h as packageCustomRules,
|
|
280
|
-
|
|
303
|
+
C as packageCustomValidator,
|
|
281
304
|
f as setObjectPropRule,
|
|
282
305
|
O as updateComponentDisplayState,
|
|
283
306
|
v as updateFormItemEditState,
|