super-page-runtime 2.3.9 → 2.3.11

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.
Files changed (20) hide show
  1. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +57 -57
  2. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  3. package/dist/es/components/runtime/utils/common-util.js +4 -0
  4. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  5. package/dist/es/components/runtime/utils/events/validator-util.js +121 -103
  6. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +22 -19
  7. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +34 -31
  8. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  9. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +31 -24
  10. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +50 -47
  11. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  12. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  13. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  14. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +60 -57
  15. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  16. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +56 -53
  17. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +59 -56
  18. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  19. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  20. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { getValueFromSource as e, formatVariableValue as t, setValueForVariableName as i } from "../page-helper-util.js";
1
+ import { getValueFromSource as e, formatVariableValue as i, setValueForVariableName as t } from "../page-helper-util.js";
2
2
  import { deepCopy as s } from "../common-util.js";
3
3
  import { setDefaultGrid as o, CommonName as a, caculateFormulaValue as l, sortDatas as n, limitDatas as r, executeChartFormula as u } from "./chart-util.js";
4
4
  import { handleChartEvent as c } from "../events/event-util.js";
@@ -19,39 +19,39 @@ function d(d2, f, p, m) {
19
19
  for (const e2 of F) S[e2.group] = e2.target, e2.target && !D.includes(e2.target) && (D.push(e2.target), y.includes(e2.group) && x.push(e2.target));
20
20
  let N = f.props ? f.props.mulGroupShow : "";
21
21
  N = "break" == N ? "\r\n" : " ";
22
- for (const t2 of v) {
23
- if (!t2) continue;
24
- const i2 = [];
22
+ for (const i2 of v) {
23
+ if (!i2) continue;
24
+ const t2 = [];
25
25
  for (const s3 of y) {
26
- const o2 = S[s3], a2 = e(t2, o2, void 0);
27
- a2 && i2.push(a2);
26
+ const o2 = S[s3], a2 = e(i2, o2, void 0);
27
+ a2 && t2.push(a2);
28
28
  }
29
- const s2 = i2.join(N);
30
- t2[a.X_FIELD_NAME] = s2;
29
+ const s2 = t2.join(N);
30
+ i2[a.X_FIELD_NAME] = s2;
31
31
  }
32
32
  const E = f.items ? f.items : [], A = [], _ = {}, b = [], w = {}, C = [], I = [], X = /* @__PURE__ */ new Set(), L = l(E, v, X);
33
33
  for (const e2 of X) C.push(e2);
34
34
  for (const e2 of E) {
35
- const t2 = e2.props ? e2.props : {}, i2 = t2.yaxisSource, s2 = t2.yaxisField, o2 = t2.isCumulative;
35
+ const i2 = e2.props ? e2.props : {}, t2 = i2.yaxisSource, s2 = i2.yaxisField, o2 = i2.isCumulative;
36
36
  let a2 = null;
37
- if (!s2 || i2 && "variable" != i2) if ("formula" == i2) {
38
- let i3 = t2.formula ? t2.formula : "";
39
- for (const e3 in L) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), L[e3]);
40
- a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [], dynamicDatas: [] };
41
- } else a2 = { uuid: e2.uuid, type: "fixed", field: t2.yaxisFix, data: [], dynamicDatas: [] };
42
- else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !C.includes(s2) && (C.push(s2), I.push(s2)), o2 && !X.has(s2) && X.add(s2);
43
- null != a2 && (A.push(a2), _[e2.uuid] = a2), t2.dynamicSeriesField && !b.includes(t2.dynamicSeriesField) && a2 && (a2.dynamicField = t2.dynamicSeriesField, a2.dynamicSeriesTitle = t2.dynamicSeriesTitle, a2.dynamicShowStack = t2.dynamicShowStack, b.push(t2.dynamicSeriesField), w[t2.dynamicSeriesField] = s2);
37
+ if (!s2 || t2 && "variable" != t2) if ("formula" == t2) {
38
+ let t3 = i2.formula ? i2.formula : "";
39
+ for (const e3 in L) t3 = t3.replace(new RegExp(e3.replace("$", "\\$"), "g"), L[e3]);
40
+ a2 = { uuid: e2.uuid, type: "formula", formula: t3, data: [], dynamicDatas: [] };
41
+ } else a2 = { uuid: e2.uuid, type: "fixed", field: i2.yaxisFix, data: [], dynamicDatas: [] };
42
+ else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !C.includes(s2) && C.push(s2), s2 && !I.includes(s2) && I.push(s2), o2 && !X.has(s2) && X.add(s2);
43
+ null != a2 && (A.push(a2), _[e2.uuid] = a2), i2.dynamicSeriesField && !b.includes(i2.dynamicSeriesField) && a2 && (a2.dynamicField = i2.dynamicSeriesField, a2.dynamicSeriesTitle = i2.dynamicSeriesTitle, a2.dynamicShowStack = i2.dynamicShowStack, b.push(i2.dynamicSeriesField), w[i2.dynamicSeriesField] = s2);
44
44
  }
45
45
  const M = {};
46
46
  if (b.length > 0) {
47
- const t2 = [], i2 = {};
47
+ const i2 = [], t2 = {};
48
48
  for (const s2 of v) if (s2) for (const o2 of C) {
49
49
  const l2 = s2[a.X_FIELD_NAME];
50
- let n2 = i2[l2];
50
+ let n2 = t2[l2];
51
51
  if (!n2) {
52
52
  n2 = {};
53
53
  for (const e2 of D) n2[e2] = s2[e2];
54
- n2[a.X_FIELD_NAME] = s2[a.X_FIELD_NAME], i2[l2] = n2, t2.push(n2);
54
+ n2[a.X_FIELD_NAME] = s2[a.X_FIELD_NAME], t2[l2] = n2, i2.push(n2);
55
55
  }
56
56
  let r2 = e(s2, o2, void 0);
57
57
  if (!isNaN(r2)) {
@@ -59,72 +59,72 @@ function d(d2, f, p, m) {
59
59
  isNaN || (r2 += e2), n2[o2] = r2;
60
60
  }
61
61
  }
62
- for (const t3 of b) {
62
+ for (const i3 of b) {
63
63
  const s2 = [];
64
64
  for (const o2 of v) {
65
65
  if (!o2) continue;
66
- const l2 = i2[o2[a.X_FIELD_NAME]];
66
+ const l2 = t2[o2[a.X_FIELD_NAME]];
67
67
  if (!l2) continue;
68
- let n2 = e(o2, t3, void 0);
68
+ let n2 = e(o2, i3, void 0);
69
69
  n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2), I.push(n2), X.add(n2));
70
- const r2 = w[t3];
70
+ const r2 = w[i3];
71
71
  if (void 0 !== r2) {
72
- const t4 = e(o2, r2, void 0);
73
- let i3 = l2[n2];
74
- void 0 === i3 ? i3 = t4 : isNaN(t4) || (i3 += t4), l2[n2] = i3;
72
+ const i4 = e(o2, r2, void 0);
73
+ let t3 = l2[n2];
74
+ void 0 === t3 ? t3 = i4 : isNaN(i4) || (t3 += i4), l2[n2] = t3;
75
75
  }
76
76
  }
77
- M[t3] = s2;
77
+ M[i3] = s2;
78
78
  }
79
- v = t2;
79
+ v = i2;
80
80
  }
81
81
  n(d2, f, v), v = r(d2, f, v, D, I);
82
82
  const j = [], k = {};
83
- for (const t2 of v) if (t2) {
84
- for (const i2 of X) {
85
- const s2 = e(t2, i2, void 0);
86
- let o2 = k[i2];
87
- void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), k[i2] = o2;
83
+ for (const i2 of v) if (i2) {
84
+ for (const t2 of X) {
85
+ const s2 = e(i2, t2, void 0);
86
+ let o2 = k[t2];
87
+ void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), k[t2] = o2;
88
88
  }
89
- j.push(t2[a.X_FIELD_NAME]);
90
- for (const i2 of A) {
91
- let s2 = i2.data;
92
- const o2 = i2.dynamicDatas;
93
- if (i2.dynamicField) {
94
- let a2 = M[i2.dynamicField];
89
+ j.push(i2[a.X_FIELD_NAME]);
90
+ for (const t2 of A) {
91
+ let s2 = t2.data;
92
+ const o2 = t2.dynamicDatas;
93
+ if (t2.dynamicField) {
94
+ let a2 = M[t2.dynamicField];
95
95
  a2 = a2 || [];
96
96
  for (let l2 = 0; l2 < a2.length; l2++) {
97
97
  l2 >= o2.length && o2.push([]), s2 = o2[l2];
98
98
  const n2 = a2[l2];
99
- let r2 = e(t2, n2, void 0);
100
- i2.isCumulative && (r2 = k[n2]), s2.push(r2);
99
+ let r2 = e(i2, n2, void 0);
100
+ t2.isCumulative && (r2 = k[n2]), s2.push(r2);
101
101
  }
102
- } else if ("fixed" === i2.type) s2.push(i2.field);
103
- else if ("variable" === i2.type) {
104
- let o3 = e(t2, i2.field, void 0);
105
- i2.isCumulative && (o3 = k[i2.field]), s2.push(o3);
106
- } else if ("formula" === i2.type) {
107
- const e2 = u(i2.formula, k, t2, d2);
102
+ } else if ("fixed" === t2.type) s2.push(t2.field);
103
+ else if ("variable" === t2.type) {
104
+ let o3 = e(i2, t2.field, void 0);
105
+ t2.isCumulative && (o3 = k[t2.field]), s2.push(o3);
106
+ } else if ("formula" === t2.type) {
107
+ const e2 = u(t2.formula, k, i2, d2);
108
108
  s2.push(e2);
109
109
  } else s2.push(void 0);
110
110
  }
111
111
  }
112
112
  const T = f.defaultSeries, V = s(null == T ? [] : T), $ = [];
113
113
  for (const e2 of V) {
114
- const i2 = _[e2.uuid];
115
- if (i2.dynamicField) {
116
- let o2 = M[i2.dynamicField];
114
+ const t2 = _[e2.uuid];
115
+ if (t2.dynamicField) {
116
+ let o2 = M[t2.dynamicField];
117
117
  o2 = o2 || [];
118
- const a2 = i2.dynamicDatas ? i2.dynamicDatas : [];
118
+ const a2 = t2.dynamicDatas ? t2.dynamicDatas : [];
119
119
  for (let l2 = 0; l2 < o2.length; l2++) {
120
120
  const n2 = o2[l2], r2 = s(e2);
121
- if (i2.dynamicSeriesTitle) {
122
- const e3 = i2.dynamicSeriesTitle.replace("${name}", n2);
123
- r2.name = t(d2, e3);
121
+ if (t2.dynamicSeriesTitle) {
122
+ const e3 = t2.dynamicSeriesTitle.replace("${name}", n2);
123
+ r2.name = i(d2, e3);
124
124
  } else r2.name = n2;
125
- r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && i2.dynamicShowStack && (r2.stack = e2.uuid), $.push(r2);
125
+ r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && t2.dynamicShowStack && (r2.stack = e2.uuid), $.push(r2);
126
126
  }
127
- } else e2.data = i2 ? i2.data : [], $.push(e2);
127
+ } else e2.data = t2 ? t2.data : [], $.push(e2);
128
128
  }
129
129
  p.series = $;
130
130
  const G = f.defaultXaxis, R = f.defaultYaxis;
@@ -133,7 +133,7 @@ function d(d2, f, p, m) {
133
133
  p.xAxis = G, p.yAxis = R;
134
134
  } else G && G.length > 0 && (G[0].data = j), p.xAxis = G, p.yAxis = R;
135
135
  const U = f.props ? f.props.selGroupVariable : null;
136
- !(f.props ? f.props.enableDrill : null) && U && (f.highlightInfos = [], i(d2.entity, U, null)), c(d2, f, "afterUpdateChart", p, { resultData: m }), f.groupFields = x, f.cacheDatas = v, f.rawResult = m;
136
+ !(f.props ? f.props.enableDrill : null) && U && (f.highlightInfos = [], t(d2.entity, U, null)), c(d2, f, "afterUpdateChart", p, { resultData: m }), f.groupFields = x, f.cacheDatas = v, f.rawResult = m;
137
137
  }
138
138
  export {
139
139
  d as updateChartOption
@@ -27,3 +27,7 @@ export declare function isNumber(numStr: any): boolean;
27
27
  export declare function isWorkflowPage(pageContext: PageContext): boolean;
28
28
  export declare function refreshMobileDialogType(jumpPageSetting: any, isMobile: boolean): void;
29
29
  export declare function isVariableInvalidValue(values: any, variable: string): boolean;
30
+ /**
31
+ * 给主表字段添加必填高亮样式
32
+ */
33
+ export declare function addRequiredClassUtil(): string;
@@ -99,7 +99,11 @@ function g(e2, t2) {
99
99
  function h(e2, t2) {
100
100
  return null === e2[t2] || void 0 === e2[t2] || "" === e2[t2];
101
101
  }
102
+ function y() {
103
+ return "required_bg";
104
+ }
102
105
  export {
106
+ y as addRequiredClassUtil,
103
107
  p as deepCopy,
104
108
  i as getBaseUrl,
105
109
  s as getListCode,
@@ -1,7 +1,7 @@
1
1
  import { PageContext } from '../interfaces/page-design-types';
2
2
 
3
3
  export declare function setObjectPropRule(prop: any, rules: any, leafRule: any): {};
4
- export declare function validator(entity: any, rules: any, columns: any, rowIndex: any, isSql: any): any;
4
+ export declare function validator(entity: any, rules: any, columns: any, rowIndex: any, isSql: any, pageContext: any): any;
5
5
  export declare function validateDataModelFunc(pageContext: any, configureObj: any, isEnableRequired: any): Promise<unknown>;
6
6
  /**
7
7
  * 封装自定义校验规则
@@ -1,119 +1,137 @@
1
1
  import e from "async-validator";
2
2
  import { ElMessage as t } from "element-plus";
3
- import { getComponentRefByCode as n, getComponentRef as s, getAllComponentRefs as r } from "../global-refs.js";
3
+ import { getComponentRefByCode as s, getComponentRef as n, getAllComponentRefs as r } from "../global-refs.js";
4
4
  import { getI18n as i } from "agilebuilder-ui/src/utils/util";
5
5
  import { getAdditionalParamMap as l } from "./standard-event.js";
6
6
  import { isPromise as o } 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, n2) {
9
- const s2 = {};
8
+ function f(e2, t2, s2) {
9
+ const n2 = {};
10
10
  t2 || (t2 = {});
11
11
  let r2 = 0;
12
12
  const i2 = e2.split(".");
13
13
  return i2.forEach((e3) => {
14
14
  let l2;
15
- if (r2 === i2.length - 1) l2 = 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;
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;
19
19
  }
20
- return s3;
21
- }(s2, i2, e3), l2.fields[e3] = n2;
20
+ return n3;
21
+ }(n2, i2, e3), l2.fields[e3] = s2;
22
22
  else {
23
- let n3;
24
- 0 === r2 ? l2 = t2 : (n3 = function(e4, t3, n4) {
25
- let s3;
23
+ let s3;
24
+ 0 === r2 ? l2 = t2 : (s3 = function(e4, t3, s4) {
25
+ let n3;
26
26
  for (let r3 = 0; r3 < t3.length; r3++) {
27
27
  const i3 = t3[r3];
28
- if (s3 = 0 === r3 ? e4[i3] : s3.fields[t3[r3]], i3 === n4) break;
28
+ if (n3 = 0 === r3 ? e4[i3] : n3.fields[t3[r3]], i3 === s4) break;
29
29
  }
30
- return s3;
31
- }(s2, i2, i2[r2 - 1]), l2 = n3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? s2[e3] = l2[e3] : n3.fields[e3] = l2[e3];
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];
32
32
  }
33
33
  r2++;
34
- }), s2;
34
+ }), n2;
35
35
  }
36
- function c(e2, t2, n2, s2, r2) {
37
- return d(e2, t2, n2, s2, true);
36
+ function c(e2, t2, s2, n2, r2, i2) {
37
+ return m(e2, t2, s2, n2, true, r2, i2);
38
38
  }
39
- function m(e2) {
39
+ function d(e2) {
40
40
  if (e2) return Object.keys(e2).forEach((t2) => {
41
41
  if (t2.indexOf(".") >= 0) {
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];
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];
44
44
  }
45
45
  }), e2;
46
46
  }
47
- function d(n2, s2, r2, i2, l2, o2) {
48
- let a2, u2 = m(s2);
49
- if (s2 && null !== s2 || !r2 || (u2 = {}), !u2 || 0 === Object.keys(u2).length) return n2.validateErrorField = "", true;
50
- return new e(u2).validate(n2, { first: true }, (e2, o3) => {
51
- let u3;
52
- if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 })) : a2 = true, u3 && true === l2) {
53
- if (/[A-Z]+/.test(u3) && void 0 !== n2[u3.toLowerCase()]) {
47
+ function m(n2, r2, i2, l2, o2, a2, u2) {
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) => {
51
+ let d2;
52
+ if (e2) {
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();
56
+ } else f2 = true;
57
+ if (d2 && true === o2) {
58
+ if (/[A-Z]+/.test(d2) && void 0 !== n2[d2.toLowerCase()]) {
54
59
  const e3 = JSON.parse(JSON.stringify(n2));
55
- e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3, s2, r2, i2, false);
60
+ e3[d2.toUpperCase()] = n2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 = m(e3, r2, i2, l2, false, a2, u2);
56
61
  }
57
62
  }
58
- }), a2;
63
+ }), f2;
59
64
  }
60
- function p(e2, n2, s2) {
61
- const r2 = e2.entity.data, o2 = { ...e2.entity.page, ...r2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
62
- return null != f2 && (s2 = f2), null == s2 && (s2 = false), function(e3, n3, s3, r3) {
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) {
63
68
  if (e3) {
64
- return u(r3) ? function(e4, n4, s4) {
65
- return new Promise((r4, o3) => {
66
- const a3 = l(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, m2 = n4.subTablePageInfo;
67
- b(e4, n4, s4).then((s5) => {
68
- if (s5) {
69
- let i2 = s5;
70
- const l2 = n4.workflowRules;
71
- i2 = !l2 || window.$vueApp.config.globalProperties.$formValidator(e4, l2, c2, a3, f3, u2, m2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), r4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, r4(e4));
72
- } else o3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
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) => {
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);
84
+ } else {
85
+ const e5 = s(n4, i2);
86
+ e5 && e5.addRequiredClass && e5.addRequiredClass();
87
+ }
88
+ o4(false);
89
+ } else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, o4(e4);
90
+ } else a3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
73
91
  }).catch((e5) => {
74
- o3(e5);
92
+ a3(e5);
75
93
  });
76
94
  });
77
- }(n3, r3, s3) : function(e4, t2, n4) {
78
- return new Promise((s4, r4) => {
79
- b(e4, t2, n4).then((t3) => {
95
+ }(n3, o3, r3) : function(e4, t2, s2) {
96
+ return new Promise((n4, r4) => {
97
+ b(e4, t2, s2).then((t3) => {
80
98
  if (t3) {
81
99
  const t4 = JSON.parse(JSON.stringify(e4));
82
- Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
83
- } else s4(false);
100
+ Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
101
+ } else n4(false);
84
102
  }).catch((e5) => {
85
103
  r4(e5);
86
104
  });
87
105
  });
88
- }(n3, r3, s3);
106
+ }(n3, o3, r3);
89
107
  }
90
108
  return new Promise((e4, t2) => {
91
109
  e4(true);
92
110
  });
93
- }(s2, o2, a2, e2);
111
+ }(r2, a2, f2, e2);
94
112
  }
95
113
  function g(e2) {
96
- return new Promise((t2, n2) => {
114
+ return new Promise((t2, s2) => {
97
115
  const r2 = [], i2 = e2.customValidatorUuids;
98
116
  i2 && i2.forEach((t3) => {
99
- const n3 = s(e2, t3);
100
- n3 && n3.validator && r2.push(n3.validator());
117
+ const s3 = n(e2, t3);
118
+ s3 && s3.validator && r2.push(s3.validator());
101
119
  }), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
102
120
  e3.includes(false) ? t2(false) : t2(true);
103
121
  }) : t2(true);
104
122
  });
105
123
  }
106
- function b(e2, t2, n2) {
124
+ function b(e2, t2, s2) {
107
125
  return new Promise((r2, l2) => {
108
126
  const a2 = JSON.parse(JSON.stringify(e2));
109
- if (n2 && 0 !== Object.keys(n2).length) {
110
- if (true === c(a2, n2, null, null)) {
127
+ if (s2 && 0 !== Object.keys(s2).length) {
128
+ if (true === c(a2, s2, null, null, true, t2)) {
111
129
  const e3 = function(e4) {
112
130
  if (!e4) return true;
113
131
  const t3 = e4.tableUuids;
114
132
  if (!t3) return true;
115
- for (let n3 = 0; n3 < t3.length; n3++) {
116
- const r3 = t3[n3], i2 = s(e4, r3);
133
+ for (let s3 = 0; s3 < t3.length; s3++) {
134
+ const r3 = t3[s3], i2 = n(e4, r3);
117
135
  if (i2) {
118
136
  if (!i2.validatorSunTableListData()) return false;
119
137
  }
@@ -123,17 +141,17 @@ function b(e2, t2, n2) {
123
141
  if (true === e3) {
124
142
  const e4 = function(e5) {
125
143
  const t3 = [];
126
- e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
127
- n3.events.forEach((s2) => {
128
- const r3 = e5.customEvents[s2];
129
- t3.push(r3.apply(r3, [{ prop: n3.prop, pageContext: e5 }]));
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 }]));
130
148
  });
131
149
  });
132
- if (t3 && t3.length > 0) return new Promise((e6, n3) => {
133
- const s2 = [], r3 = [];
150
+ if (t3 && t3.length > 0) return new Promise((e6, s3) => {
151
+ const n2 = [], r3 = [];
134
152
  t3.forEach((e7) => {
135
- o(e7) ? s2.push(e7) : r3.push(e7);
136
- }), r3.includes(false) && e6(false), s2.length > 0 ? Promise.all(s2).then((t4) => {
153
+ o(e7) ? n2.push(e7) : r3.push(e7);
154
+ }), r3.includes(false) && e6(false), n2.length > 0 ? Promise.all(n2).then((t4) => {
137
155
  t4.includes(false) ? e6(false) : e6(true);
138
156
  }).catch((t4) => {
139
157
  console.error(t4), e6(false);
@@ -156,21 +174,21 @@ function b(e2, t2, n2) {
156
174
  function h(e2, t2) {
157
175
  if (!e2) return t2;
158
176
  t2 || (t2 = {});
159
- const n2 = Object.keys(e2), s2 = e2;
160
- return n2.forEach((e3) => {
177
+ const s2 = Object.keys(e2), n2 = e2;
178
+ return s2.forEach((e3) => {
161
179
  if ("__subRules" === e3) {
162
- const e4 = s2.__subRules;
163
- Object.keys(e4).forEach((n3) => {
164
- t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
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];
165
183
  });
166
- } else j(s2[e3]), t2[e3] = s2[e3];
167
- }), m(t2);
184
+ } else j(n2[e3]), t2[e3] = n2[e3];
185
+ }), d(t2);
168
186
  }
169
187
  function w(e2) {
170
188
  if (!e2 || 0 === Object.keys(e2).length) return;
171
- const t2 = {}, n2 = Object.keys(e2);
172
- for (let s2 = 0; s2 < n2.length; s2++) {
173
- const r2 = n2[s2], i2 = e2[r2];
189
+ const t2 = {}, s2 = Object.keys(e2);
190
+ for (let n2 = 0; n2 < s2.length; n2++) {
191
+ const r2 = s2[n2], i2 = e2[r2];
174
192
  y(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
175
193
  }
176
194
  return t2;
@@ -178,55 +196,55 @@ function w(e2) {
178
196
  function y(e2, t2) {
179
197
  e2.forEach((e3) => {
180
198
  e3.message;
181
- const t3 = e3.label, n2 = i().t(t3);
182
- 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 }));
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 }));
183
201
  });
184
202
  }
185
- function v(e2) {
186
- const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
203
+ 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;
187
205
  e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
188
206
  t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
189
207
  });
190
- let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
208
+ let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
191
209
  return o2 = h(e2.customRules, o2), o2;
192
210
  }
193
- function P(e2, t2) {
211
+ function v(e2, t2) {
194
212
  if (!t2) return;
195
- const s2 = {};
213
+ const n2 = {};
196
214
  t2.forEach((e3) => {
197
- const { name: t3, rules: n2 } = e3;
198
- n2 && (s2[t3] = n2);
215
+ const { name: t3, rules: s2 } = e3;
216
+ s2 && (n2[t3] = s2);
199
217
  });
200
218
  let r2 = e2.rules ? e2.rules : {};
201
- r2 = h(s2, r2), e2.rules = r2;
219
+ r2 = h(n2, r2), e2.rules = r2;
202
220
  let i2 = e2.workflowRules ? e2.workflowRules : {};
203
- i2 = h(s2, i2), e2.workflowRules = i2;
221
+ i2 = h(n2, i2), e2.workflowRules = i2;
204
222
  const l2 = t2.filter((e3) => "_all_fields" === e3.name);
205
223
  l2 && l2.length > 0 && E(e2, l2[0]), t2.forEach((t3) => {
206
224
  if ("_all_fields" !== t3.name) {
207
- O(n(e2, t3.name), t3);
225
+ O(s(e2, t3.name), t3);
208
226
  }
209
227
  });
210
228
  }
211
- function R(e2) {
229
+ function P(e2) {
212
230
  E(e2, { disabled: true });
213
231
  }
214
232
  function E(e2, t2) {
215
- const n2 = r(e2);
216
- if (n2) for (const e3 in n2) {
217
- const s2 = n2[e3];
218
- O(s2 ? s2.value : s2, 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);
219
237
  }
220
238
  }
221
239
  function k(e2, t2, r2) {
222
240
  var _a;
223
241
  let i2, l2;
224
- if (r2 ? (i2 = n(e2, r2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? s(e2, l2) : null), !i2) return;
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;
225
243
  const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
226
244
  if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
227
- const n2 = e2.workflowRules.subRules[r2];
245
+ const s2 = e2.workflowRules.subRules[r2];
228
246
  t2.forEach((e3) => {
229
- n2[e3.name] = e3;
247
+ s2[e3.name] = e3;
230
248
  });
231
249
  }
232
250
  i2.dynamicControlTableEdit(e2, t2, f2);
@@ -234,14 +252,14 @@ function k(e2, t2, r2) {
234
252
  function O(e2, t2) {
235
253
  var _a, _b, _c;
236
254
  if (e2) {
237
- const n2 = e2.getConfigure();
238
- 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));
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));
239
257
  }
240
258
  }
241
259
  function j(e2) {
242
- e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, n2) {
260
+ e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, s2) {
243
261
  return null == t2 ? !e3.required : "number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2);
244
- } : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, n2) {
262
+ } : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, s2) {
245
263
  if (null == t2) return !e3.required;
246
264
  {
247
265
  const e4 = new Date(t2);
@@ -250,16 +268,16 @@ function j(e2) {
250
268
  });
251
269
  }
252
270
  export {
253
- R as disabledAllFields,
271
+ P as disabledAllFields,
254
272
  k as dynamicControlTableEdit,
255
- v as getWorkflowRules,
273
+ R as getWorkflowRules,
256
274
  y as i18nValidatePropRulesMessage,
257
275
  w as i18nValidateRulesMessage,
258
276
  h as packageCustomRules,
259
277
  j as packageCustomValidator,
260
278
  f as setObjectPropRule,
261
279
  O as updateComponentDisplayState,
262
- P as updateFormItemEditState,
280
+ v as updateFormItemEditState,
263
281
  p as validateDataModelFunc,
264
282
  c as validator
265
283
  };