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.
@@ -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 (void 0 === u2 || "" === u2 || void 0 === r2 || 0 === r2.length) e3({ canExecute: true });
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
- let l2 = { reportDataList: r2, beanName: t2.beanName };
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 ? (s2 && (e2.entity.data = s2), 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);
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 n2 = false;
743
- return e2 && t2 && ("workflowSave" === e2 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
769
- if (e3.processState && "SUBMIT" === e3.processState && "WAIT_TRANSACT" === e3.active && "TYPE_READ" !== e3.processingMode && e3.showButtonCopy) return true;
770
- return false;
771
- }(t2) : "addSigner" === e2 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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 ? n2 = function(e3) {
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) && (n2 = "returnToPreviousTask" !== e2 || function(e3) {
798
+ }(t2, s2) && (o2 = "returnToPreviousTask" !== e2 || function(e3) {
799
799
  if (e3.rebuttable) return true;
800
800
  return false;
801
- }(t2))), n2;
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 s, getComponentRef as n, getAllComponentRefs as r } from "../global-refs.js";
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 l } from "./standard-event.js";
6
- import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
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, s2) {
9
- const n2 = {};
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 l2;
15
- if (r2 === i2.length - 1) l2 = function(e4, t3, s3) {
16
- let n3;
17
- for (let r3 = 0; r3 < t3.length; r3++) if (n3 = 0 === r3 ? e4[t3[r3]] : n3.fields[t3[r3]], r3 !== t3.length - 1) {
18
- if (t3[r3 + 1] === s3) break;
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 n3;
21
- }(n2, i2, e3), l2.fields[e3] = s2;
20
+ return s3;
21
+ }(s2, i2, e3), o2.fields[e3] = n2;
22
22
  else {
23
- let s3;
24
- 0 === r2 ? l2 = t2 : (s3 = function(e4, t3, s4) {
25
- let n3;
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 (n3 = 0 === r3 ? e4[i3] : n3.fields[t3[r3]], i3 === s4) break;
28
+ if (s3 = 0 === r3 ? e4[i3] : s3.fields[t3[r3]], i3 === n4) break;
29
29
  }
30
- return n3;
31
- }(n2, i2, i2[r2 - 1]), l2 = s3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? n2[e3] = l2[e3] : s3.fields[e3] = l2[e3];
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
- }), n2;
34
+ }), s2;
35
35
  }
36
- function c(e2, t2, s2, n2, r2, i2) {
37
- return m(e2, t2, s2, n2, true, r2, i2);
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 s2 = [];
43
- s2 = t2.split("."), e2[s2[0]] ? e2[s2[0]].fields[s2[1]] = e2[t2][0] : (e2[s2[0]] = new Object(), e2[s2[0]].fields = new Object(), e2[s2[0]].fields[s2[1]] = e2[t2][0], e2[s2[0]].type = "object"), delete e2[t2];
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(n2, r2, i2, l2, o2, a2, u2) {
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 n2.validateErrorField = "", true;
50
- return new e(c2).validate(n2, { first: true }, (e2, c3) => {
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 n3 = s(u2, d2);
55
- n3 && n3.addRequiredClass && n3.addRequiredClass();
54
+ const s3 = n(u2, d2);
55
+ s3 && s3.addRequiredClass && s3.addRequiredClass();
56
56
  } else f2 = true;
57
- if (d2 && true === o2) {
58
- if (/[A-Z]+/.test(d2) && void 0 !== n2[d2.toLowerCase()]) {
59
- const e3 = JSON.parse(JSON.stringify(n2));
60
- e3[d2.toUpperCase()] = n2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 = m(e3, r2, i2, l2, false, a2, u2);
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, n2, r2) {
66
- const o2 = e2.entity.data, a2 = { ...e2.entity.page, ...o2 }, f2 = e2.rules, c2 = n2.props.base ? n2.props.base.isEnableRequired : null;
67
- return null != c2 && (r2 = c2), null == r2 && (r2 = false), function(e3, n3, r3, o3) {
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(o3) ? function(e4, n4, r4) {
70
- return new Promise((o4, a3) => {
71
- const u2 = l(n4), f3 = n4.entity.context, c3 = n4.entity.task, d2 = true, m2 = n4.subTablePageInfo;
72
- b(e4, n4, r4).then((r5) => {
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 i2, l2, a4, p2, g2 = r5;
75
- const b2 = n4.workflowRules;
76
- if (b2) {
77
- const t2 = true, s2 = window.$vueApp.config.globalProperties.$formValidator(e4, b2, d2, u2, c3, f3, m2, t2);
78
- g2 = s2.msg, i2 = s2.field, l2 = s2.listCode, a4 = s2.rowIndex, p2 = s2.pageNum;
79
- } else g2 = true;
80
- if (true !== g2) {
81
- if (t({ showClose: true, message: g2 + "", type: "warning" }), l2) {
82
- const e5 = s(n4, l2);
83
- e5 && e5.addRequiredClass && e5.addRequiredClass(i2, a4, p2);
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 = s(n4, i2);
100
+ const e5 = n(s4, o2);
86
101
  e5 && e5.addRequiredClass && e5.addRequiredClass();
87
102
  }
88
- o4(false);
89
- } else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, o4(e4);
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
- }(n3, o3, r3) : function(e4, t2, s2) {
96
- return new Promise((n4, r4) => {
97
- b(e4, t2, s2).then((t3) => {
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, n4(t4);
101
- } else n4(false);
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
- }(n3, o3, r3);
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, s2) => {
129
+ return new Promise((t2, n2) => {
115
130
  const r2 = [], i2 = e2.customValidatorUuids;
116
131
  i2 && i2.forEach((t3) => {
117
- const s3 = n(e2, t3);
118
- s3 && s3.validator && r2.push(s3.validator());
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, t2, s2) {
125
- return new Promise((r2, l2) => {
126
- const a2 = JSON.parse(JSON.stringify(e2));
127
- if (s2 && 0 !== Object.keys(s2).length) {
128
- if (true === c(a2, s2, null, null, true, t2)) {
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 t3 = e4.tableUuids;
132
- if (!t3) return true;
133
- for (let s3 = 0; s3 < t3.length; s3++) {
134
- const r3 = t3[s3], i2 = n(e4, r3);
135
- if (i2) {
136
- if (!i2.validatorSunTableListData()) return false;
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
- }(t2);
163
+ }(n2);
141
164
  if (true === e3) {
142
165
  const e4 = function(e5) {
143
- const t3 = [];
144
- e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((s3) => {
145
- s3.events.forEach((n2) => {
146
- const r3 = e5.customEvents[n2];
147
- t3.push(r3.apply(r3, [{ prop: s3.prop, pageContext: e5 }]));
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 (t3 && t3.length > 0) return new Promise((e6, s3) => {
151
- const n2 = [], r3 = [];
152
- t3.forEach((e7) => {
153
- o(e7) ? n2.push(e7) : r3.push(e7);
154
- }), r3.includes(false) && e6(false), n2.length > 0 ? Promise.all(n2).then((t4) => {
155
- t4.includes(false) ? e6(false) : e6(true);
156
- }).catch((t4) => {
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
- }(t2);
162
- e4 && o(e4) ? e4.then((e5) => {
163
- e5 ? g(t2).then((e6) => {
164
- r2(e6);
165
- }) : r2(false);
166
- }) : g(t2).then((e5) => {
167
- r2(e5);
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 l2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
170
- } else l2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
171
- } else r2(true);
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 s2 = Object.keys(e2), n2 = e2;
178
- return s2.forEach((e3) => {
200
+ const n2 = Object.keys(e2), s2 = e2;
201
+ return n2.forEach((e3) => {
179
202
  if ("__subRules" === e3) {
180
- const e4 = n2.__subRules;
181
- Object.keys(e4).forEach((s3) => {
182
- t2.subRules || (t2.subRules = {}), t2.subRules[s3] ? Object.assign(t2.subRules[s3], e4[s3]) : t2.subRules[s3] = e4[s3];
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 j(n2[e3]), t2[e3] = n2[e3];
207
+ } else C(s2[e3]), t2[e3] = s2[e3];
185
208
  }), d(t2);
186
209
  }
187
- function w(e2) {
210
+ function y(e2) {
188
211
  if (!e2 || 0 === Object.keys(e2).length) return;
189
- const t2 = {}, s2 = Object.keys(e2);
190
- for (let n2 = 0; n2 < s2.length; n2++) {
191
- const r2 = s2[n2], i2 = e2[r2];
192
- y(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
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 y(e2, t2) {
219
+ function w(e2, t2) {
197
220
  e2.forEach((e3) => {
198
221
  e3.message;
199
- const t3 = e3.label, s2 = i().t(t3);
200
- 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 }));
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, s2 = { ...e2.entity.page, ...t2 }, n2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
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 o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
209
- return o2 = h(e2.customRules, o2), o2;
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 n2 = {};
236
+ const s2 = {};
214
237
  t2.forEach((e3) => {
215
- const { name: t3, rules: s2 } = e3;
216
- s2 && (n2[t3] = s2);
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(n2, r2), e2.rules = r2;
242
+ r2 = h(s2, r2), e2.rules = r2;
220
243
  let i2 = e2.workflowRules ? e2.workflowRules : {};
221
- i2 = h(n2, i2), e2.workflowRules = i2;
222
- const l2 = t2.filter((e3) => "_all_fields" === e3.name);
223
- l2 && l2.length > 0 && E(e2, l2[0]), t2.forEach((t3) => {
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(s(e2, t3.name), t3);
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 s2 = r(e2);
234
- if (s2) for (const e3 in s2) {
235
- const n2 = s2[e3];
236
- O(n2 ? n2.value : n2, t2);
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, l2;
242
- if (r2 ? (i2 = s(e2, r2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? n(e2, l2) : null), !i2) return;
243
- const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
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 s2 = e2.workflowRules.subRules[r2];
268
+ const n2 = e2.workflowRules.subRules[r2];
246
269
  t2.forEach((e3) => {
247
- s2[e3.name] = e3;
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 s2 = e2.getConfigure();
256
- void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a = s2 == null ? void 0 : s2.runtime) == null ? void 0 : _a.props) && (s2.runtime.props.required = t2.required), void 0 !== t2.readonly && ((_b = s2 == null ? void 0 : s2.runtime) == null ? void 0 : _b.props) && (t2.readonly ? s2.runtime.props.state = "readonly" : s2.runtime.props.state = "enabled"), void 0 !== t2.disabled && s2 && (((_c = s2 == null ? void 0 : s2.runtime) == null ? void 0 : _c.props) && (t2.disabled ? s2.runtime.props.state = "disabled" : s2.runtime.props.state = "enabled"), "table" === s2.name && e2.changeOperationAddState(false));
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 j(e2) {
282
+ function C(e2) {
260
283
  if (!(e2 == null ? void 0 : e2.type)) return;
261
- const t2 = C[e2.type];
284
+ const t2 = j[e2.type];
262
285
  t2 && (e2.validator = t2.validator);
263
286
  }
264
- const C = { boolean: { validator: function(e2, t2, s2) {
265
- return true === M(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
266
- } }, date: { validator: function(e2, t2, s2) {
267
- if (true !== M(e2, t2)) return false;
268
- const n2 = new Date(t2);
269
- return !isNaN(n2.getTime());
270
- } }, number: { validator: function(e2, t2, s2) {
271
- return true === M(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
272
- } } }, M = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
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
- y as i18nValidatePropRulesMessage,
278
- w as i18nValidateRulesMessage,
300
+ w as i18nValidatePropRulesMessage,
301
+ y as i18nValidateRulesMessage,
279
302
  h as packageCustomRules,
280
- j as packageCustomValidator,
303
+ C as packageCustomValidator,
281
304
  f as setObjectPropRule,
282
305
  O as updateComponentDisplayState,
283
306
  v as updateFormItemEditState,