super-page-runtime 2.3.37-sit5 → 2.3.38-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/api/page-expose-util.js +131 -131
- package/dist/es/components/runtime/utils/assemblys-config.js +1 -1
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +46 -47
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +1 -3
- package/dist/es/components/runtime/utils/charts/chart-util.js +44 -46
- package/dist/es/components/runtime/utils/events/event-util.js +121 -121
- package/dist/es/components/runtime/utils/events/print-label.js +33 -35
- package/dist/es/components/runtime/utils/events/standard-event.js +588 -600
- package/dist/es/components/runtime/utils/events/validator-util.js +150 -154
- package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +120 -125
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +10 -14
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +12 -13
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +15 -16
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +15 -16
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +95 -100
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +67 -67
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +23 -27
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +43 -43
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +9 -11
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +20 -22
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +120 -123
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +38 -39
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +2 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +26 -26
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +35 -36
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +90 -0
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +61 -63
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +10 -12
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +6 -8
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +41 -41
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +27 -28
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +23 -25
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.d.ts +6 -1
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +37 -29
- package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +4 -5
- package/dist/es/components/runtime/views/super-page.vue2.js +190 -191
- package/dist/es/style.css +18 -18
- package/package.json +2 -2
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import { getComponentRefByCode as s, getComponentRef as
|
|
4
|
-
import { getI18n as
|
|
3
|
+
import { getComponentRefByCode as s, getComponentRef as n, getAllComponentRefs as r } from "../global-refs.js";
|
|
4
|
+
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
5
|
import { getAdditionalParamMap as l } from "./standard-event.js";
|
|
6
|
-
import { isPromise as
|
|
6
|
+
import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
|
|
7
7
|
import { parseSubTablePermissionCondition as a } from "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
8
|
-
import { isWorkflowPage as u, getListCode as
|
|
9
|
-
import { scrollIntoComponentWithCode as
|
|
8
|
+
import { isWorkflowPage as u, getListCode as f } from "../common-util.js";
|
|
9
|
+
import { scrollIntoComponentWithCode as c, scrollIntoComponentWithUuid as d } from "../anchor-util.js";
|
|
10
10
|
function m(e2, t2, s2) {
|
|
11
|
-
const
|
|
11
|
+
const n2 = {};
|
|
12
12
|
t2 || (t2 = {});
|
|
13
|
-
let
|
|
14
|
-
const
|
|
15
|
-
return
|
|
13
|
+
let r2 = 0;
|
|
14
|
+
const i2 = e2.split(".");
|
|
15
|
+
return i2.forEach((e3) => {
|
|
16
16
|
let l2;
|
|
17
|
-
if (
|
|
18
|
-
let
|
|
19
|
-
for (let
|
|
20
|
-
if (t3[
|
|
17
|
+
if (r2 === i2.length - 1) l2 = function(e4, t3, s3) {
|
|
18
|
+
let n3;
|
|
19
|
+
for (let r3 = 0; r3 < t3.length; r3++) if (n3 = 0 === r3 ? e4[t3[r3]] : n3.fields[t3[r3]], r3 !== t3.length - 1) {
|
|
20
|
+
if (t3[r3 + 1] === s3) break;
|
|
21
21
|
}
|
|
22
|
-
return
|
|
23
|
-
}(
|
|
22
|
+
return n3;
|
|
23
|
+
}(n2, i2, e3), l2.fields[e3] = s2;
|
|
24
24
|
else {
|
|
25
25
|
let s3;
|
|
26
|
-
0 ===
|
|
27
|
-
let
|
|
28
|
-
for (let
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
26
|
+
0 === r2 ? l2 = t2 : (s3 = function(e4, t3, s4) {
|
|
27
|
+
let n3;
|
|
28
|
+
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
29
|
+
const i3 = t3[r3];
|
|
30
|
+
if (n3 = 0 === r3 ? e4[i3] : n3.fields[t3[r3]], i3 === s4) break;
|
|
31
31
|
}
|
|
32
|
-
return
|
|
33
|
-
}(
|
|
32
|
+
return n3;
|
|
33
|
+
}(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];
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
}),
|
|
35
|
+
r2++;
|
|
36
|
+
}), n2;
|
|
37
37
|
}
|
|
38
|
-
function p(e2, t2, s2,
|
|
39
|
-
return b(e2, t2, s2,
|
|
38
|
+
function p(e2, t2, s2, n2, r2, i2) {
|
|
39
|
+
return b(e2, t2, s2, n2, true, r2, i2);
|
|
40
40
|
}
|
|
41
41
|
function g(e2) {
|
|
42
42
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
@@ -46,159 +46,155 @@ function g(e2) {
|
|
|
46
46
|
}
|
|
47
47
|
}), e2;
|
|
48
48
|
}
|
|
49
|
-
function b(
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
52
|
-
return new e(d2).validate(
|
|
49
|
+
function b(n2, r2, i2, l2, o2, a2, u2) {
|
|
50
|
+
let f2, d2 = g(r2);
|
|
51
|
+
if (r2 && null !== r2 || !i2 || (d2 = {}), !d2 || 0 === Object.keys(d2).length) return n2.validateErrorField = "", true;
|
|
52
|
+
return new e(d2).validate(n2, { first: true }, (e2, d3) => {
|
|
53
53
|
let m2;
|
|
54
54
|
if (e2) {
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
|
|
55
|
+
f2 = e2[0].message, m2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
|
|
56
|
+
const n3 = s(u2, m2);
|
|
57
|
+
if (n3 && n3.addRequiredClass) {
|
|
58
|
+
n3.addRequiredClass();
|
|
59
59
|
try {
|
|
60
|
-
|
|
60
|
+
c(u2, m2);
|
|
61
61
|
} catch (e3) {
|
|
62
|
-
console.error("滚动失败", e3);
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
e3[m2.toUpperCase()] = r2[m2.toLowerCase()], delete e3[m2.toLowerCase()], c2 = b(e3, n2, o2, l2, false, a2, u2);
|
|
64
|
+
} else f2 = true;
|
|
65
|
+
if (m2 && true === o2) {
|
|
66
|
+
if (/[A-Z]+/.test(m2) && void 0 !== n2[m2.toLowerCase()]) {
|
|
67
|
+
const e3 = JSON.parse(JSON.stringify(n2));
|
|
68
|
+
e3[m2.toUpperCase()] = n2[m2.toLowerCase()], delete e3[m2.toLowerCase()], f2 = b(e3, r2, i2, l2, false, a2, u2);
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
}),
|
|
71
|
+
}), f2;
|
|
74
72
|
}
|
|
75
|
-
function h(e2,
|
|
76
|
-
const
|
|
77
|
-
return null != m2 && (
|
|
73
|
+
function h(e2, n2, r2) {
|
|
74
|
+
const o2 = e2.entity.data, f2 = { ...e2.entity.page, ...o2 }, d2 = e2.rules, m2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
75
|
+
return null != m2 && (r2 = m2), null == r2 && (r2 = false), function(e3, n3, r3, o3) {
|
|
78
76
|
if (e3) {
|
|
79
|
-
return u(
|
|
80
|
-
return new Promise((
|
|
81
|
-
const
|
|
82
|
-
w(e4,
|
|
83
|
-
if (
|
|
84
|
-
let l2, u3, b2, h2, y2 =
|
|
85
|
-
const w2 =
|
|
77
|
+
return u(o3) ? function(e4, n4, r4) {
|
|
78
|
+
return new Promise((o4, u2) => {
|
|
79
|
+
const f3 = l(n4), d3 = n4.entity.context, m3 = n4.entity.task, p2 = true, g2 = n4.subTablePageInfo;
|
|
80
|
+
w(e4, n4, r4).then((r5) => {
|
|
81
|
+
if (r5) {
|
|
82
|
+
let l2, u3, b2, h2, y2 = r5;
|
|
83
|
+
const w2 = n4.workflowRules;
|
|
86
84
|
if (w2) {
|
|
87
|
-
if (!function(e5,
|
|
85
|
+
if (!function(e5, n5) {
|
|
88
86
|
var _a, _b, _c, _d;
|
|
89
87
|
if (!e5.actionPermissions) return true;
|
|
90
|
-
const
|
|
91
|
-
for (let l3 = 0; l3 <
|
|
92
|
-
const
|
|
88
|
+
const r7 = Object.keys(e5.actionPermissions);
|
|
89
|
+
for (let l3 = 0; l3 < r7.length; l3++) {
|
|
90
|
+
const o5 = r7[l3], u4 = e5.actionPermissions[o5];
|
|
93
91
|
if (u4 && u4.notEmpty) {
|
|
94
|
-
if ((_a = e5.hiddenNotValidatorCodes) == null ? void 0 : _a.has(
|
|
95
|
-
let
|
|
96
|
-
if (
|
|
97
|
-
const
|
|
98
|
-
if (!
|
|
99
|
-
const l4 =
|
|
92
|
+
if ((_a = e5.hiddenNotValidatorCodes) == null ? void 0 : _a.has(o5)) continue;
|
|
93
|
+
let r8 = false;
|
|
94
|
+
if (n5[o5] ? Array.isArray(n5[o5]) && 0 === n5[o5].length && (r8 = true) : r8 = true, r8) {
|
|
95
|
+
const r9 = s(e5, o5);
|
|
96
|
+
if (!r9) return true;
|
|
97
|
+
const l4 = r9.getConfigure();
|
|
100
98
|
if ((_b = u4.notEmptyCondition) == null ? void 0 : _b.parentCondition) {
|
|
101
|
-
if (false === a(u4.notEmptyCondition.parentCondition.replaceAll("${field[", "${parent["), e5.dataTypeMaps,
|
|
99
|
+
if (false === a(u4.notEmptyCondition.parentCondition.replaceAll("${field[", "${parent["), e5.dataTypeMaps, n5, {}, (_c = e5.entity) == null ? void 0 : _c.request, (_d = e5.entity) == null ? void 0 : _d.task, e5.contextParam)) return true;
|
|
102
100
|
}
|
|
103
|
-
return t({ showClose: true, message:
|
|
101
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: l4.title ? l4.title : o5 }), type: "warning" }), false;
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
}
|
|
107
105
|
return true;
|
|
108
|
-
}(
|
|
109
|
-
const
|
|
106
|
+
}(n4, e4)) return void o4(false);
|
|
107
|
+
const r6 = true, c2 = Object.assign({}, w2), R2 = n4.hiddenNotValidatorCodes;
|
|
110
108
|
R2 && R2.size > 0 && R2.forEach((e5) => {
|
|
111
|
-
|
|
112
|
-
}),
|
|
113
|
-
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4,
|
|
109
|
+
c2.subRules && delete c2.subRules[e5], c2.rules && delete c2.rules[e5];
|
|
110
|
+
}), c2.subRules && (Object.keys(c2.subRules).length > 0 ? c2.totalSubRules || (c2.totalSubRules = {}) : delete c2.subRules);
|
|
111
|
+
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4, c2, p2, f3, m3, d3, g2, r6);
|
|
114
112
|
y2 = v2.msg, l2 = v2.field, u3 = v2.listCode, b2 = v2.rowIndex, h2 = v2.pageNum;
|
|
115
113
|
} else y2 = true;
|
|
116
114
|
if (true !== y2) {
|
|
117
115
|
if (t({ showClose: true, message: y2 + "", type: "warning" }), u3) {
|
|
118
|
-
const e5 = s(
|
|
116
|
+
const e5 = s(n4, u3);
|
|
119
117
|
if (e5 && e5.addRequiredClass) {
|
|
120
118
|
e5.addRequiredClass(l2, b2, h2);
|
|
121
119
|
try {
|
|
122
|
-
|
|
120
|
+
c(n4, u3), e5.scrollToCell({ fieldName: l2, rowIndex: b2, pageNum: h2 });
|
|
123
121
|
} catch (e6) {
|
|
124
|
-
console.error("滚动到验证失败的子表字段失败,可能是表格组件版本较低没有scrollToCell方法", e6);
|
|
125
122
|
}
|
|
126
123
|
}
|
|
127
124
|
} else {
|
|
128
|
-
const e5 = s(
|
|
125
|
+
const e5 = s(n4, l2);
|
|
129
126
|
if (e5 && e5.addRequiredClass) {
|
|
130
127
|
e5.addRequiredClass();
|
|
131
128
|
try {
|
|
132
|
-
|
|
129
|
+
c(n4, l2);
|
|
133
130
|
} catch (e6) {
|
|
134
|
-
console.error("滚动失败", e6);
|
|
135
131
|
}
|
|
136
132
|
}
|
|
137
133
|
}
|
|
138
|
-
|
|
139
|
-
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField,
|
|
140
|
-
} else u2(new Error(
|
|
134
|
+
o4(false);
|
|
135
|
+
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, o4(e4);
|
|
136
|
+
} else u2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
141
137
|
}).catch((e5) => {
|
|
142
138
|
u2(e5);
|
|
143
139
|
});
|
|
144
140
|
});
|
|
145
|
-
}(
|
|
146
|
-
return new Promise((
|
|
141
|
+
}(n3, o3, r3) : function(e4, t2, s2) {
|
|
142
|
+
return new Promise((n4, r4) => {
|
|
147
143
|
w(e4, t2, s2).then((t3) => {
|
|
148
144
|
if (t3) {
|
|
149
145
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
150
|
-
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField,
|
|
151
|
-
} else
|
|
146
|
+
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
|
|
147
|
+
} else n4(false);
|
|
152
148
|
}).catch((e5) => {
|
|
153
|
-
|
|
149
|
+
r4(e5);
|
|
154
150
|
});
|
|
155
151
|
});
|
|
156
|
-
}(
|
|
152
|
+
}(n3, o3, r3);
|
|
157
153
|
}
|
|
158
154
|
return new Promise((e4, t2) => {
|
|
159
155
|
e4(true);
|
|
160
156
|
});
|
|
161
|
-
}(
|
|
157
|
+
}(r2, f2, d2, e2);
|
|
162
158
|
}
|
|
163
159
|
function y(e2) {
|
|
164
160
|
return new Promise((t2, s2) => {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
const s3 =
|
|
168
|
-
s3 && s3.validator &&
|
|
169
|
-
}),
|
|
161
|
+
const r2 = [], i2 = e2.customValidatorUuids;
|
|
162
|
+
i2 && i2.forEach((t3) => {
|
|
163
|
+
const s3 = n(e2, t3);
|
|
164
|
+
s3 && s3.validator && r2.push(s3.validator());
|
|
165
|
+
}), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
|
|
170
166
|
e3.includes(false) ? t2(false) : t2(true);
|
|
171
167
|
}) : t2(true);
|
|
172
168
|
});
|
|
173
169
|
}
|
|
174
|
-
function w(e2, s2,
|
|
170
|
+
function w(e2, s2, r2) {
|
|
175
171
|
return new Promise((l2, a2) => {
|
|
176
|
-
const
|
|
177
|
-
if (
|
|
178
|
-
delete
|
|
179
|
-
}),
|
|
180
|
-
if (true === p(
|
|
172
|
+
const f2 = JSON.parse(JSON.stringify(e2)), c2 = { ...r2 }, m2 = s2.hiddenNotValidatorCodes;
|
|
173
|
+
if (c2 && m2 && m2.size > 0 && m2.forEach((e3) => {
|
|
174
|
+
delete c2[e3];
|
|
175
|
+
}), c2 && 0 !== Object.keys(c2).length) {
|
|
176
|
+
if (true === p(f2, c2, null, null, true, s2)) {
|
|
181
177
|
const e3 = function(e4) {
|
|
182
178
|
var _a;
|
|
183
179
|
if (!e4) return true;
|
|
184
180
|
if (u(e4)) return true;
|
|
185
181
|
const s3 = e4.tableUuids;
|
|
186
182
|
if (!s3) return true;
|
|
187
|
-
for (let
|
|
188
|
-
const l3 = s3[
|
|
189
|
-
if (
|
|
190
|
-
const a3 =
|
|
183
|
+
for (let r3 = 0; r3 < s3.length; r3++) {
|
|
184
|
+
const l3 = s3[r3], o2 = e4.hiddenNotValidatorCodes;
|
|
185
|
+
if (o2 && o2.size > 0 && o2.has(l3)) continue;
|
|
186
|
+
const a3 = n(e4, l3);
|
|
191
187
|
if (a3) {
|
|
192
188
|
if (a3.getConfigure()) {
|
|
193
189
|
const s4 = a3.getConfigure();
|
|
194
190
|
if ((_a = s4 == null ? void 0 : s4.verification) == null ? void 0 : _a.notEmpty) {
|
|
195
|
-
const
|
|
196
|
-
if (!
|
|
191
|
+
const n2 = a3.getTableData();
|
|
192
|
+
if (!n2 || !Array.isArray(n2) || 0 === n2.length) {
|
|
197
193
|
try {
|
|
198
194
|
d(e4, l3);
|
|
199
195
|
} catch (e5) {
|
|
200
196
|
}
|
|
201
|
-
return t({ showClose: true, message:
|
|
197
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: s4.title ? s4.title : s4.code }), type: "warning" }), false;
|
|
202
198
|
}
|
|
203
199
|
}
|
|
204
200
|
}
|
|
@@ -217,91 +213,91 @@ function w(e2, s2, n2) {
|
|
|
217
213
|
const e4 = function(e5) {
|
|
218
214
|
const t2 = [];
|
|
219
215
|
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((s3) => {
|
|
220
|
-
s3.events.forEach((
|
|
221
|
-
const
|
|
222
|
-
t2.push(
|
|
216
|
+
s3.events.forEach((n2) => {
|
|
217
|
+
const r3 = e5.customEvents[n2];
|
|
218
|
+
t2.push(r3.apply(r3, [{ prop: s3.prop, pageContext: e5 }]));
|
|
223
219
|
});
|
|
224
220
|
});
|
|
225
221
|
if (t2 && t2.length > 0) return new Promise((e6, s3) => {
|
|
226
|
-
const
|
|
222
|
+
const n2 = [], r3 = [];
|
|
227
223
|
t2.forEach((e7) => {
|
|
228
|
-
|
|
229
|
-
}),
|
|
224
|
+
o(e7) ? n2.push(e7) : r3.push(e7);
|
|
225
|
+
}), r3.includes(false) && e6(false), n2.length > 0 ? Promise.all(n2).then((t3) => {
|
|
230
226
|
t3.includes(false) ? e6(false) : e6(true);
|
|
231
227
|
}).catch((t3) => {
|
|
232
|
-
|
|
228
|
+
e6(false);
|
|
233
229
|
}) : e6(true);
|
|
234
230
|
});
|
|
235
231
|
return null;
|
|
236
232
|
}(s2);
|
|
237
|
-
e4 &&
|
|
233
|
+
e4 && o(e4) ? e4.then((e5) => {
|
|
238
234
|
e5 ? y(s2).then((e6) => {
|
|
239
235
|
l2(e6);
|
|
240
236
|
}) : l2(false);
|
|
241
237
|
}) : y(s2).then((e5) => {
|
|
242
238
|
l2(e5);
|
|
243
239
|
});
|
|
244
|
-
} else a2(new Error(
|
|
245
|
-
} else a2(new Error(
|
|
240
|
+
} else a2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
241
|
+
} else a2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
246
242
|
} else l2(true);
|
|
247
243
|
});
|
|
248
244
|
}
|
|
249
245
|
function R(e2, t2, s2) {
|
|
250
246
|
if (!t2) return s2;
|
|
251
247
|
s2 || (s2 = {});
|
|
252
|
-
const
|
|
253
|
-
return
|
|
248
|
+
const n2 = u(e2), r2 = Object.keys(t2), i2 = t2;
|
|
249
|
+
return r2.forEach((e3) => {
|
|
254
250
|
if ("__subRules" === e3) {
|
|
255
|
-
const e4 =
|
|
251
|
+
const e4 = i2.__subRules;
|
|
256
252
|
Object.keys(e4).forEach((t3) => {
|
|
257
253
|
s2.subRules || (s2.subRules = {}), s2.subRules[t3] ? Object.assign(s2.subRules[t3], e4[t3]) : s2.subRules[t3] = e4[t3];
|
|
258
254
|
});
|
|
259
|
-
} else
|
|
255
|
+
} else T(i2[e3]), n2 ? (s2.rules[e3] = i2[e3], s2[e3] && (s2[e3] = i2[e3])) : s2[e3] = i2[e3];
|
|
260
256
|
}), g(s2);
|
|
261
257
|
}
|
|
262
258
|
function v(e2) {
|
|
263
259
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
264
260
|
const t2 = {}, s2 = Object.keys(e2);
|
|
265
|
-
for (let
|
|
266
|
-
const
|
|
267
|
-
P(
|
|
261
|
+
for (let n2 = 0; n2 < s2.length; n2++) {
|
|
262
|
+
const r2 = s2[n2], i2 = e2[r2];
|
|
263
|
+
P(i2), r2.indexOf(".") > 0 ? m(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
268
264
|
}
|
|
269
265
|
return t2;
|
|
270
266
|
}
|
|
271
267
|
function P(e2, t2) {
|
|
272
268
|
e2.forEach((e3) => {
|
|
273
269
|
e3.message;
|
|
274
|
-
const t3 = e3.label, s2 =
|
|
275
|
-
e3.required && (e3.message =
|
|
270
|
+
const t3 = e3.label, s2 = i().t(t3);
|
|
271
|
+
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 }));
|
|
276
272
|
});
|
|
277
273
|
}
|
|
278
274
|
function E(e2) {
|
|
279
|
-
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 },
|
|
275
|
+
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
280
276
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
281
277
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
282
278
|
});
|
|
283
|
-
let
|
|
279
|
+
let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
|
|
284
280
|
const a2 = e2.customRules;
|
|
285
|
-
return
|
|
281
|
+
return o2 = R(e2, a2, o2), o2 && (o2.rules || (o2.rules = {}), o2.subRules || (o2.subRules = {})), o2;
|
|
286
282
|
}
|
|
287
283
|
function k(e2, t2) {
|
|
288
284
|
if (!t2) return;
|
|
289
|
-
const
|
|
285
|
+
const n2 = {};
|
|
290
286
|
if (t2.forEach((e3) => {
|
|
291
287
|
const { name: t3, rules: s2 } = e3;
|
|
292
|
-
s2 ?
|
|
288
|
+
s2 ? n2[t3] = s2 : false === e3.required && (n2[t3] = []);
|
|
293
289
|
}), u(e2)) {
|
|
294
290
|
let t3 = e2.workflowRules ? e2.workflowRules : { rules: {}, subRules: {} };
|
|
295
|
-
t3 = R(e2,
|
|
291
|
+
t3 = R(e2, n2, t3), e2.workflowRules = t3;
|
|
296
292
|
} else {
|
|
297
293
|
let t3 = e2.rules ? e2.rules : {};
|
|
298
|
-
t3 = R(e2,
|
|
294
|
+
t3 = R(e2, n2, t3), e2.rules = t3;
|
|
299
295
|
}
|
|
300
|
-
const
|
|
301
|
-
|
|
296
|
+
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
297
|
+
r2 && r2.length > 0 && O(e2, r2[0]), t2.forEach((t3) => {
|
|
302
298
|
if ("_all_fields" !== t3.name) {
|
|
303
|
-
const
|
|
304
|
-
|
|
299
|
+
const n3 = s(e2, t3.name);
|
|
300
|
+
x(e2, n3, t3);
|
|
305
301
|
}
|
|
306
302
|
});
|
|
307
303
|
}
|
|
@@ -309,37 +305,37 @@ function C(e2) {
|
|
|
309
305
|
O(e2, { disabled: true });
|
|
310
306
|
}
|
|
311
307
|
function O(e2, t2) {
|
|
312
|
-
const s2 =
|
|
313
|
-
if (s2) for (const
|
|
314
|
-
const
|
|
315
|
-
|
|
308
|
+
const s2 = r(e2);
|
|
309
|
+
if (s2) for (const n2 in s2) {
|
|
310
|
+
const r2 = s2[n2];
|
|
311
|
+
x(e2, r2 ? r2.value : r2, t2);
|
|
316
312
|
}
|
|
317
313
|
}
|
|
318
|
-
function j(e2, t2,
|
|
314
|
+
function j(e2, t2, r2) {
|
|
319
315
|
var _a;
|
|
320
|
-
let
|
|
321
|
-
if (
|
|
322
|
-
const
|
|
323
|
-
if (e2.workflowRules || (e2.workflowRules = { rules: {}, subRules: {} }), e2.workflowRules.subRules || (e2.workflowRules.subRules = {}), e2.workflowRules.subRules[
|
|
324
|
-
const s2 = e2.workflowRules.subRules[
|
|
316
|
+
let i2, l2;
|
|
317
|
+
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;
|
|
318
|
+
const o2 = e2.code, a2 = e2.version, u2 = f(o2, a2, l2);
|
|
319
|
+
if (e2.workflowRules || (e2.workflowRules = { rules: {}, subRules: {} }), e2.workflowRules.subRules || (e2.workflowRules.subRules = {}), e2.workflowRules.subRules[r2] || (e2.workflowRules.subRules[r2] = {}), ((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
|
|
320
|
+
const s2 = e2.workflowRules.subRules[r2];
|
|
325
321
|
t2.forEach((e3) => {
|
|
326
322
|
s2[e3.name] = e3;
|
|
327
323
|
});
|
|
328
324
|
}
|
|
329
|
-
|
|
325
|
+
i2.dynamicControlTableEdit(e2, t2, u2);
|
|
330
326
|
}
|
|
331
|
-
function
|
|
327
|
+
function x(e2, t2, s2) {
|
|
332
328
|
var _a, _b, _c;
|
|
333
329
|
if (t2) {
|
|
334
|
-
const
|
|
335
|
-
if (void 0 !== s2.show && (s2.show ? t2.show() : t2.hide()), void 0 !== s2.required && ((_a =
|
|
330
|
+
const n2 = t2.getConfigure();
|
|
331
|
+
if (void 0 !== s2.show && (s2.show ? t2.show() : t2.hide()), void 0 !== s2.required && ((_a = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _a.props) && (n2.runtime.props.required = s2.required), void 0 !== s2.readonly && ((_b = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _b.props) && (s2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== s2.disabled && n2 && (((_c = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _c.props) && (s2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled"), "table" === n2.name)) {
|
|
336
332
|
t2.changeOperationAddState(false);
|
|
337
|
-
const s3 = t2 ? t2.getTableUuid() : null,
|
|
338
|
-
t2.dynamicControlTableEdit(e2, l2,
|
|
333
|
+
const s3 = t2 ? t2.getTableUuid() : null, n3 = e2.code, r2 = e2.version, i2 = f(n3, r2, s3), l2 = [{ name: "_all_fields", disabled: true }];
|
|
334
|
+
t2.dynamicControlTableEdit(e2, l2, i2);
|
|
339
335
|
}
|
|
340
336
|
}
|
|
341
337
|
}
|
|
342
|
-
function
|
|
338
|
+
function T(e2) {
|
|
343
339
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
344
340
|
const t2 = N[e2.type];
|
|
345
341
|
t2 && (e2.validator = t2.validator);
|
|
@@ -348,8 +344,8 @@ const N = { boolean: { validator: function(e2, t2, s2) {
|
|
|
348
344
|
return true === M(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
349
345
|
} }, date: { validator: function(e2, t2, s2) {
|
|
350
346
|
if (true !== M(e2, t2)) return false;
|
|
351
|
-
const
|
|
352
|
-
return !isNaN(
|
|
347
|
+
const n2 = new Date(t2);
|
|
348
|
+
return !isNaN(n2.getTime());
|
|
353
349
|
} }, number: { validator: function(e2, t2, s2) {
|
|
354
350
|
return true === M(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
355
351
|
} } }, M = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
@@ -360,7 +356,7 @@ export {
|
|
|
360
356
|
P as i18nValidatePropRulesMessage,
|
|
361
357
|
v as i18nValidateRulesMessage,
|
|
362
358
|
R as packageCustomRules,
|
|
363
|
-
|
|
359
|
+
T as packageCustomValidator,
|
|
364
360
|
m as setObjectPropRule,
|
|
365
361
|
k as updateFormItemEditState,
|
|
366
362
|
h as validateDataModelFunc,
|
|
@@ -44,9 +44,8 @@ function analysisScanValue(scanValue, scanRuleSets) {
|
|
|
44
44
|
}
|
|
45
45
|
let res = false;
|
|
46
46
|
if (validStr) try {
|
|
47
|
-
|
|
47
|
+
res = eval("(" + validStr + ")");
|
|
48
48
|
} catch (e) {
|
|
49
|
-
console.log(e);
|
|
50
49
|
}
|
|
51
50
|
else res = true;
|
|
52
51
|
if (res) return executeAnalysisForScan(scanValue, scanSet);
|
|
@@ -63,11 +62,11 @@ function executeAnalysisForScan(e, t) {
|
|
|
63
62
|
let n = e;
|
|
64
63
|
if (t2.splitChar && t2.splitNum) {
|
|
65
64
|
const a3 = (t2.splitChar, t2.splitChar), s2 = e.split(a3), l = t2.splitNum < 1 ? 1 : t2.splitNum;
|
|
66
|
-
|
|
65
|
+
n = l <= s2.length ? s2[l - 1] : "";
|
|
67
66
|
}
|
|
68
67
|
if (t2.splitChar2 && t2.splitNum2) {
|
|
69
68
|
const e2 = (t2.splitChar2, t2.splitChar2), a3 = n.split(e2), s2 = t2.splitNum2 < 1 ? 1 : t2.splitNum2;
|
|
70
|
-
|
|
69
|
+
n = s2 <= a3.length ? a3[s2 - 1] : "";
|
|
71
70
|
}
|
|
72
71
|
if (n.length > 0) {
|
|
73
72
|
const e2 = _getScanIndexs(n, t2.startIndex, t2.endIndex), a3 = e2[0], s2 = e2[1];
|