super-page-runtime 2.2.3 → 2.2.6
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/_virtual/_plugin-vue_export-helper.js +1 -2
- package/dist/es/components/runtime/index.d.ts +2 -1
- package/dist/es/components/runtime/utils/api/page-expose-util.js +70 -72
- package/dist/es/components/runtime/utils/assemblys-config.js +2 -4
- package/dist/es/components/runtime/utils/barcode-util.js +1 -2
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +59 -81
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +2 -4
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +8 -16
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +10 -18
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +20 -25
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +200 -218
- package/dist/es/components/runtime/utils/common-util.js +7 -14
- package/dist/es/components/runtime/utils/events/event-util.js +97 -115
- package/dist/es/components/runtime/utils/events/print-label.js +20 -21
- package/dist/es/components/runtime/utils/events/standard-event.js +276 -326
- package/dist/es/components/runtime/utils/events/validator-util.js +85 -116
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +1 -2
- package/dist/es/components/runtime/utils/form/scan-util.js +10 -17
- package/dist/es/components/runtime/utils/global-refs.js +7 -14
- package/dist/es/components/runtime/utils/i18n-util.js +1 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +58 -104
- package/dist/es/components/runtime/utils/page-init-util.js +30 -37
- package/dist/es/components/runtime/utils/page-permission-util.js +2 -4
- package/dist/es/components/runtime/utils/page-store.d.ts +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +4 -8
- package/dist/es/components/runtime/utils/tree-utils.js +13 -15
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +24 -28
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +44 -40
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +20 -20
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +33 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +114 -113
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +123 -116
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +46 -57
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +13 -21
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +6 -9
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/error-render.vue.d.ts +4 -4
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +6 -8
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +4 -6
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +7 -9
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +10 -13
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +9 -10
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +9 -11
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +15 -20
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +20 -25
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +15 -20
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +4 -5
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.d.ts +17 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +97 -0
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +33 -43
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/home-chart.vue.d.ts +23 -0
- package/dist/es/components/runtime/views/home-chart.vue.js +36 -0
- package/dist/es/components/runtime/views/home-chart.vue2.js +4 -0
- package/dist/es/components/runtime/views/super-page-dialog.vue.d.ts +3 -3
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.d.ts +6 -6
- package/dist/es/components/runtime/views/super-page.vue.js +25 -38
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +6 -4
- package/package.json +74 -74
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +0 -1
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import {
|
|
3
|
+
import { getComponentRefByCode as n, getComponentRef as r, getAllComponentRefs as s } from "../global-refs.js";
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
5
|
import { getAdditionalParamMap as o } from "./standard-event.js";
|
|
6
6
|
import { isPromise as l } from "agilebuilder-ui/src/utils/common-util";
|
|
7
|
-
import {
|
|
8
|
-
function
|
|
7
|
+
import { getListCode as a, isWorkflowPage as u } from "../common-util.js";
|
|
8
|
+
function f(e2, t2, n2) {
|
|
9
9
|
const r2 = {};
|
|
10
10
|
t2 || (t2 = {});
|
|
11
11
|
let s2 = 0;
|
|
12
12
|
const i2 = e2.split(".");
|
|
13
13
|
return i2.forEach((e3) => {
|
|
14
14
|
let o2;
|
|
15
|
-
if (s2 === i2.length - 1)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
return r3;
|
|
24
|
-
}(r2, i2, e3), o2.fields[e3] = n2;
|
|
15
|
+
if (s2 === i2.length - 1) o2 = function(e4, t3, n3) {
|
|
16
|
+
let r3;
|
|
17
|
+
for (let s3 = 0; s3 < t3.length; s3++) if (r3 = 0 === s3 ? e4[t3[s3]] : r3.fields[t3[s3]], s3 !== t3.length - 1) {
|
|
18
|
+
if (t3[s3 + 1] === n3) break;
|
|
19
|
+
}
|
|
20
|
+
return r3;
|
|
21
|
+
}(r2, i2, e3), o2.fields[e3] = n2;
|
|
25
22
|
else {
|
|
26
23
|
let n3;
|
|
27
24
|
0 === s2 ? o2 = t2 : (n3 = function(e4, t3, n4) {
|
|
28
25
|
let r3;
|
|
29
26
|
for (let s3 = 0; s3 < t3.length; s3++) {
|
|
30
27
|
const i3 = t3[s3];
|
|
31
|
-
if (r3 = 0 === s3 ? e4[i3] : r3.fields[t3[s3]], i3 === n4)
|
|
32
|
-
break;
|
|
28
|
+
if (r3 = 0 === s3 ? e4[i3] : r3.fields[t3[s3]], i3 === n4) break;
|
|
33
29
|
}
|
|
34
30
|
return r3;
|
|
35
31
|
}(r2, i2, i2[s2 - 1]), o2 = n3.fields), o2[e3] || (o2[e3] = { type: "object", required: true, fields: {} }), 0 === s2 ? r2[e3] = o2[e3] : n3.fields[e3] = o2[e3];
|
|
@@ -37,55 +33,43 @@ function c(e2, t2, n2) {
|
|
|
37
33
|
s2++;
|
|
38
34
|
}), r2;
|
|
39
35
|
}
|
|
40
|
-
function
|
|
41
|
-
return m(e2, t2, n2, r2, true
|
|
36
|
+
function c(e2, t2, n2, r2, s2) {
|
|
37
|
+
return m(e2, t2, n2, r2, true);
|
|
42
38
|
}
|
|
43
39
|
function d(e2) {
|
|
44
|
-
if (e2)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (n3 && e3.validations) {
|
|
59
|
-
const r3 = e3.validations;
|
|
60
|
-
n3.indexOf(".") > 0 ? c(e3.prop, t2, r3) : r3 && r3.length > 0 && (t2[n3] = [...r3]);
|
|
61
|
-
}
|
|
62
|
-
}), t2;
|
|
63
|
-
}(s2)), !f2 || 0 === Object.keys(f2).length)
|
|
64
|
-
return n2.validateErrorField = "", true;
|
|
65
|
-
return new e(f2).validate(n2, { first: true }, (e2, c2) => {
|
|
66
|
-
let f3;
|
|
67
|
-
if (e2 ? (u2 = e2[0].message, f3 = e2[0].field, null != o2 && (u2 = i().t("superPageRuntimeMessage.recordLine", { row: o2 + 1 }) + "," + u2), t({ message: u2, showClose: true, type: "warning", duration: 3e3 })) : u2 = true, f3 && true === l2) {
|
|
68
|
-
if (void 0 !== a2 && true === a2 && /[A-Z]+/.test(f3) && void 0 !== n2[f3.toLowerCase()]) {
|
|
40
|
+
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
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];
|
|
44
|
+
}
|
|
45
|
+
}), e2;
|
|
46
|
+
}
|
|
47
|
+
function m(n2, r2, s2, i2, o2, l2) {
|
|
48
|
+
let a2, u2 = d(r2);
|
|
49
|
+
if (r2 && null !== r2 || !s2 || (u2 = {}), !u2 || 0 === Object.keys(u2).length) return n2.validateErrorField = "", true;
|
|
50
|
+
return new e(u2).validate(n2, { first: true }, (e2, l3) => {
|
|
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 === o2) {
|
|
53
|
+
if (/[A-Z]+/.test(u3) && void 0 !== n2[u3.toLowerCase()]) {
|
|
69
54
|
const e3 = JSON.parse(JSON.stringify(n2));
|
|
70
|
-
e3[
|
|
55
|
+
e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = m(e3, r2, s2, i2, false);
|
|
71
56
|
}
|
|
72
57
|
}
|
|
73
|
-
}),
|
|
58
|
+
}), a2;
|
|
74
59
|
}
|
|
75
60
|
function p(e2, n2, r2) {
|
|
76
|
-
const s2 = e2.entity.data, l2 = { ...e2.entity.page, ...s2 },
|
|
77
|
-
return null !=
|
|
61
|
+
const s2 = e2.entity.data, l2 = { ...e2.entity.page, ...s2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
62
|
+
return null != f2 && (r2 = f2), null == r2 && (r2 = false), function(e3, n3, r3, s3) {
|
|
78
63
|
if (e3) {
|
|
79
|
-
return
|
|
64
|
+
return u(s3) ? function(e4, n4, r4) {
|
|
80
65
|
return new Promise((s4, l3) => {
|
|
81
|
-
const
|
|
66
|
+
const a3 = o(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, d2 = n4.subTablePageInfo;
|
|
82
67
|
b(e4, n4, r4).then((r5) => {
|
|
83
68
|
if (r5) {
|
|
84
69
|
let i2 = r5;
|
|
85
70
|
const o2 = n4.workflowRules;
|
|
86
|
-
i2 = !o2 || window.$vueApp.config.globalProperties.$formValidator(e4, o2,
|
|
87
|
-
} else
|
|
88
|
-
l3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
71
|
+
i2 = !o2 || window.$vueApp.config.globalProperties.$formValidator(e4, o2, c2, a3, f3, u2, d2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), s4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, s4(e4));
|
|
72
|
+
} else l3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
89
73
|
}).catch((e5) => {
|
|
90
74
|
l3(e5);
|
|
91
75
|
});
|
|
@@ -96,8 +80,7 @@ function p(e2, n2, r2) {
|
|
|
96
80
|
if (t3) {
|
|
97
81
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
98
82
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, r4(t4);
|
|
99
|
-
} else
|
|
100
|
-
r4(false);
|
|
83
|
+
} else r4(false);
|
|
101
84
|
}).catch((e5) => {
|
|
102
85
|
s4(e5);
|
|
103
86
|
});
|
|
@@ -107,35 +90,32 @@ function p(e2, n2, r2) {
|
|
|
107
90
|
return new Promise((e4, t2) => {
|
|
108
91
|
e4(true);
|
|
109
92
|
});
|
|
110
|
-
}(r2, l2,
|
|
93
|
+
}(r2, l2, a2, e2);
|
|
111
94
|
}
|
|
112
95
|
function g(e2) {
|
|
113
|
-
return new Promise((t2,
|
|
96
|
+
return new Promise((t2, n2) => {
|
|
114
97
|
const s2 = [], i2 = e2.customValidatorUuids;
|
|
115
98
|
i2 && i2.forEach((t3) => {
|
|
116
|
-
const
|
|
117
|
-
|
|
99
|
+
const n3 = r(e2, t3);
|
|
100
|
+
n3 && n3.validator && s2.push(n3.validator());
|
|
118
101
|
}), s2 && s2.length > 0 ? Promise.all(s2).then((e3) => {
|
|
119
102
|
e3.includes(false) ? t2(false) : t2(true);
|
|
120
103
|
}) : t2(true);
|
|
121
104
|
});
|
|
122
105
|
}
|
|
123
|
-
function b(e2, t2,
|
|
106
|
+
function b(e2, t2, n2) {
|
|
124
107
|
return new Promise((s2, o2) => {
|
|
125
108
|
const a2 = JSON.parse(JSON.stringify(e2));
|
|
126
|
-
if (
|
|
127
|
-
if (true ===
|
|
109
|
+
if (n2 && 0 !== Object.keys(n2).length) {
|
|
110
|
+
if (true === c(a2, n2, null, null)) {
|
|
128
111
|
const e3 = function(e4) {
|
|
129
|
-
if (!e4)
|
|
130
|
-
return true;
|
|
112
|
+
if (!e4) return true;
|
|
131
113
|
const t3 = e4.tableUuids;
|
|
132
|
-
if (!t3)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const s3 = t3[r3], i2 = n(e4, s3);
|
|
114
|
+
if (!t3) return true;
|
|
115
|
+
for (let n3 = 0; n3 < t3.length; n3++) {
|
|
116
|
+
const s3 = t3[n3], i2 = r(e4, s3);
|
|
136
117
|
if (i2) {
|
|
137
|
-
if (!i2.validatorSunTableListData())
|
|
138
|
-
return false;
|
|
118
|
+
if (!i2.validatorSunTableListData()) return false;
|
|
139
119
|
}
|
|
140
120
|
}
|
|
141
121
|
return true;
|
|
@@ -143,23 +123,22 @@ function b(e2, t2, r2) {
|
|
|
143
123
|
if (true === e3) {
|
|
144
124
|
const e4 = function(e5) {
|
|
145
125
|
const t3 = [];
|
|
146
|
-
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((
|
|
147
|
-
|
|
148
|
-
const s3 = e5.customEvents[
|
|
149
|
-
t3.push(s3.apply(s3, [{ prop:
|
|
126
|
+
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
|
|
127
|
+
n3.events.forEach((r2) => {
|
|
128
|
+
const s3 = e5.customEvents[r2];
|
|
129
|
+
t3.push(s3.apply(s3, [{ prop: n3.prop, pageContext: e5 }]));
|
|
150
130
|
});
|
|
151
131
|
});
|
|
152
|
-
if (t3 && t3.length > 0)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
132
|
+
if (t3 && t3.length > 0) return new Promise((e6, n3) => {
|
|
133
|
+
const r2 = [], s3 = [];
|
|
134
|
+
t3.forEach((e7) => {
|
|
135
|
+
l(e7) ? r2.push(e7) : s3.push(e7);
|
|
136
|
+
}), s3.includes(false) && e6(false), r2.length > 0 ? Promise.all(r2).then((t4) => {
|
|
137
|
+
t4.includes(false) ? e6(false) : e6(true);
|
|
138
|
+
}).catch((t4) => {
|
|
139
|
+
e6(false);
|
|
140
|
+
}) : e6(true);
|
|
141
|
+
});
|
|
163
142
|
return null;
|
|
164
143
|
}(t2);
|
|
165
144
|
e4 && l(e4) ? e4.then((e5) => {
|
|
@@ -169,17 +148,13 @@ function b(e2, t2, r2) {
|
|
|
169
148
|
}) : g(t2).then((e5) => {
|
|
170
149
|
s2(e5);
|
|
171
150
|
});
|
|
172
|
-
} else
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
o2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
176
|
-
} else
|
|
177
|
-
s2(true);
|
|
151
|
+
} else o2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
152
|
+
} else o2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
153
|
+
} else s2(true);
|
|
178
154
|
});
|
|
179
155
|
}
|
|
180
156
|
function h(e2, t2) {
|
|
181
|
-
if (!e2)
|
|
182
|
-
return t2;
|
|
157
|
+
if (!e2) return t2;
|
|
183
158
|
t2 || (t2 = {});
|
|
184
159
|
const n2 = Object.keys(e2), r2 = e2;
|
|
185
160
|
return n2.forEach((e3) => {
|
|
@@ -188,26 +163,23 @@ function h(e2, t2) {
|
|
|
188
163
|
Object.keys(e4).forEach((n3) => {
|
|
189
164
|
t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
|
|
190
165
|
});
|
|
191
|
-
} else
|
|
192
|
-
k(r2[e3]), t2[e3] = r2[e3];
|
|
166
|
+
} else k(r2[e3]), t2[e3] = r2[e3];
|
|
193
167
|
}), d(t2);
|
|
194
168
|
}
|
|
195
169
|
function y(e2) {
|
|
196
|
-
if (!e2 || 0 === Object.keys(e2).length)
|
|
197
|
-
return;
|
|
170
|
+
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
198
171
|
const t2 = {}, n2 = Object.keys(e2);
|
|
199
172
|
for (let r2 = 0; r2 < n2.length; r2++) {
|
|
200
173
|
const s2 = n2[r2], i2 = e2[s2];
|
|
201
|
-
w(i2
|
|
174
|
+
w(i2), s2.indexOf(".") > 0 ? f(s2, t2, i2) : i2 && i2.length > 0 && (t2[s2] = [...i2]);
|
|
202
175
|
}
|
|
203
176
|
return t2;
|
|
204
177
|
}
|
|
205
178
|
function w(e2, t2) {
|
|
206
179
|
e2.forEach((e3) => {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label: r2 })), e3.myType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: r2 })), e3.patternType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: r2 })), void 0 !== e3.max && null !== e3.max && (e3.message = i().t("superPageRuntimeMessage.overMaxLength", { label: r2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = i().t("superPageRuntimeMessage.limitMinLength", { label: r2, value: e3.min }));
|
|
180
|
+
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 }));
|
|
211
183
|
});
|
|
212
184
|
}
|
|
213
185
|
function v(e2) {
|
|
@@ -216,18 +188,17 @@ function v(e2) {
|
|
|
216
188
|
return l2 = h(e2.customRules, l2), l2;
|
|
217
189
|
}
|
|
218
190
|
function E(e2, t2) {
|
|
219
|
-
if (!t2)
|
|
220
|
-
|
|
221
|
-
const n2 = {};
|
|
191
|
+
if (!t2) return;
|
|
192
|
+
const r2 = {};
|
|
222
193
|
t2.forEach((e3) => {
|
|
223
|
-
const { name: t3, rules:
|
|
224
|
-
n2[t3] =
|
|
194
|
+
const { name: t3, rules: n2 } = e3;
|
|
195
|
+
n2 && (r2[t3] = n2);
|
|
225
196
|
});
|
|
226
197
|
let s2 = e2.rules ? e2.rules : {};
|
|
227
|
-
s2 = h(
|
|
198
|
+
s2 = h(r2, s2), e2.rules = s2;
|
|
228
199
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
229
|
-
i2 = h(
|
|
230
|
-
P(
|
|
200
|
+
i2 = h(r2, i2), e2.workflowRules = i2, t2.forEach((t3) => {
|
|
201
|
+
P(n(e2, t3.name), t3);
|
|
231
202
|
});
|
|
232
203
|
}
|
|
233
204
|
function R(e2) {
|
|
@@ -237,10 +208,9 @@ function R(e2) {
|
|
|
237
208
|
}
|
|
238
209
|
function O(e2, t2, s2) {
|
|
239
210
|
let i2, o2;
|
|
240
|
-
if (s2 ? (i2 =
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
i2.dynamicControlTableEdit(e2, t2, c2);
|
|
211
|
+
if (s2 ? (i2 = n(e2, s2), o2 = i2 ? i2.getTableUuid() : null) : (o2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = o2 ? r(e2, o2) : null), !i2) return;
|
|
212
|
+
const l2 = e2.code, u2 = e2.version, f2 = a(l2, u2, o2);
|
|
213
|
+
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
244
214
|
}
|
|
245
215
|
function P(e2, t2) {
|
|
246
216
|
if (e2) {
|
|
@@ -252,8 +222,7 @@ function k(e2) {
|
|
|
252
222
|
e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, n2) {
|
|
253
223
|
return null == t2 ? !e3.required : "number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2);
|
|
254
224
|
} : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, n2) {
|
|
255
|
-
if (null == t2)
|
|
256
|
-
return !e3.required;
|
|
225
|
+
if (null == t2) return !e3.required;
|
|
257
226
|
{
|
|
258
227
|
const e4 = new Date(t2);
|
|
259
228
|
return !isNaN(e4.getTime());
|
|
@@ -268,9 +237,9 @@ export {
|
|
|
268
237
|
y as i18nValidateRulesMessage,
|
|
269
238
|
h as packageCustomRules,
|
|
270
239
|
k as packageCustomValidator,
|
|
271
|
-
|
|
240
|
+
f as setObjectPropRule,
|
|
272
241
|
P as updateComponentDisplayState,
|
|
273
242
|
E as updateFormItemEditState,
|
|
274
243
|
p as validateDataModelFunc,
|
|
275
|
-
|
|
244
|
+
c as validator
|
|
276
245
|
};
|
|
@@ -25,8 +25,7 @@ function packageScanRuleSets(e) {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
function analysisScanValue(scanValue, scanRuleSets) {
|
|
28
|
-
if (!scanValue)
|
|
29
|
-
return null;
|
|
28
|
+
if (!scanValue) return null;
|
|
30
29
|
const scanSets = Object.values(scanRuleSets);
|
|
31
30
|
for (let i = 0; i < scanSets.length; i++) {
|
|
32
31
|
const scanSet = scanSets[i], adaptations = scanSet.adaptations;
|
|
@@ -44,26 +43,21 @@ function analysisScanValue(scanValue, scanRuleSets) {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
let res = false;
|
|
47
|
-
if (validStr)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
res = true;
|
|
54
|
-
if (res)
|
|
55
|
-
return executeAnalysisForScan(scanValue, scanSet);
|
|
46
|
+
if (validStr) try {
|
|
47
|
+
res = eval("(" + validStr + ")");
|
|
48
|
+
} catch (e) {
|
|
49
|
+
}
|
|
50
|
+
else res = true;
|
|
51
|
+
if (res) return executeAnalysisForScan(scanValue, scanSet);
|
|
56
52
|
}
|
|
57
53
|
return null;
|
|
58
54
|
}
|
|
59
55
|
function executeAnalysisForScan(e, t) {
|
|
60
|
-
if (!t || !e)
|
|
61
|
-
return;
|
|
56
|
+
if (!t || !e) return;
|
|
62
57
|
const a = t.outs, s = {};
|
|
63
58
|
return a.forEach((t2) => {
|
|
64
59
|
const a2 = t2.fieldName;
|
|
65
|
-
if (null != t2.fixedValue)
|
|
66
|
-
s[a2] = t2.fixedValue;
|
|
60
|
+
if (null != t2.fixedValue) s[a2] = t2.fixedValue;
|
|
67
61
|
else {
|
|
68
62
|
let n = e;
|
|
69
63
|
if (t2.splitChar && t2.splitNum) {
|
|
@@ -86,8 +80,7 @@ function _getScanIndexs(e, t, a) {
|
|
|
86
80
|
return t = (t = (t = null == t ? 0 : t - 1) < 0 ? 0 : t) > e.length - 1 ? e.length - 1 : t, (a = (a = (a = null == a ? e.length : a) > e.length ? e.length : a) < 1 ? 1 : a) < t && (a = t), [t, a];
|
|
87
81
|
}
|
|
88
82
|
function setScanAnalysisValue(e, t, a) {
|
|
89
|
-
if (!t)
|
|
90
|
-
return;
|
|
83
|
+
if (!t) return;
|
|
91
84
|
t.outs.forEach((t2) => {
|
|
92
85
|
const s = t2.fieldName, n = a[s];
|
|
93
86
|
setValueForVariableName(e.entity, t2.pageVariable, n);
|
|
@@ -2,42 +2,36 @@ import "vue";
|
|
|
2
2
|
window.globalRefs || (window.globalRefs = {});
|
|
3
3
|
const n = window.globalRefs;
|
|
4
4
|
function o(o2, e2, r2) {
|
|
5
|
-
if (!o2)
|
|
6
|
-
return;
|
|
5
|
+
if (!o2) return;
|
|
7
6
|
const t2 = u(o2.code, o2.version);
|
|
8
7
|
return n[t2] || (n[t2] = {}), n[t2][e2] = r2, n[t2];
|
|
9
8
|
}
|
|
10
9
|
function e(o2, e2, r2) {
|
|
11
|
-
if (!o2)
|
|
12
|
-
return;
|
|
10
|
+
if (!o2) return;
|
|
13
11
|
const t2 = f(o2.code, o2.version);
|
|
14
12
|
return n[t2] || (n[t2] = {}), n[t2][e2] = r2, n[t2];
|
|
15
13
|
}
|
|
16
14
|
function r(o2, e2) {
|
|
17
|
-
if (!o2 || !e2)
|
|
18
|
-
return;
|
|
15
|
+
if (!o2 || !e2) return;
|
|
19
16
|
const r2 = u(o2.code, o2.version);
|
|
20
17
|
n[r2] || (n[r2] = {});
|
|
21
18
|
const t2 = n[r2][e2];
|
|
22
19
|
return t2 ? t2.value : t2;
|
|
23
20
|
}
|
|
24
21
|
function t(o2, e2) {
|
|
25
|
-
if (!o2)
|
|
26
|
-
return;
|
|
22
|
+
if (!o2) return;
|
|
27
23
|
const r2 = f(o2.code, o2.version);
|
|
28
24
|
n[r2] || (n[r2] = {});
|
|
29
25
|
const t2 = n[r2][e2];
|
|
30
26
|
return t2 ? t2.value : t2;
|
|
31
27
|
}
|
|
32
28
|
function i(o2) {
|
|
33
|
-
if (!o2)
|
|
34
|
-
return;
|
|
29
|
+
if (!o2) return;
|
|
35
30
|
const e2 = u(o2.code, o2.version);
|
|
36
31
|
n[e2] = {};
|
|
37
32
|
}
|
|
38
33
|
function c(o2) {
|
|
39
|
-
if (!o2)
|
|
40
|
-
return;
|
|
34
|
+
if (!o2) return;
|
|
41
35
|
const e2 = u(o2.code, o2.version);
|
|
42
36
|
n[e2] = {};
|
|
43
37
|
}
|
|
@@ -48,8 +42,7 @@ function f(n2, o2) {
|
|
|
48
42
|
return u(n2, o2) + "-code";
|
|
49
43
|
}
|
|
50
44
|
function s(o2) {
|
|
51
|
-
if (!o2)
|
|
52
|
-
return;
|
|
45
|
+
if (!o2) return;
|
|
53
46
|
const e2 = f(o2.code, o2.version);
|
|
54
47
|
return n[e2] || (n[e2] = {}), n[e2];
|
|
55
48
|
}
|
|
@@ -5,8 +5,7 @@ let r = null, i = null;
|
|
|
5
5
|
const l = (l2, ...n) => {
|
|
6
6
|
i || (i = o());
|
|
7
7
|
const s = t().pageContext;
|
|
8
|
-
if (null === r && (r = !!e(s.systemCode)), !r)
|
|
9
|
-
return l2;
|
|
8
|
+
if (null === r && (r = !!e(s.systemCode)), !r) return l2;
|
|
10
9
|
const u = `${s.systemCode}.${l2}`, m = i.t(u, n || []);
|
|
11
10
|
return m !== u ? m : l2;
|
|
12
11
|
};
|