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