super-page-runtime 2.2.86 → 2.2.89
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 +56 -56
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +45 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -16
- package/dist/es/components/runtime/utils/charts/chart-util.js +2 -4
- package/dist/es/components/runtime/utils/events/event-util.js +113 -113
- package/dist/es/components/runtime/utils/events/print-label.js +37 -38
- package/dist/es/components/runtime/utils/events/standard-event.js +444 -457
- package/dist/es/components/runtime/utils/events/validator-util.js +32 -32
- package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +210 -210
- package/dist/es/components/runtime/utils/page-init-util.js +43 -47
- package/dist/es/components/runtime/utils/page-store.js +1 -1
- package/dist/es/components/runtime/utils/table-utils.js +23 -23
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +12 -16
- 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 +13 -14
- 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 +16 -17
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +7 -12
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +17 -18
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +22 -26
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -4
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +11 -8
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +85 -88
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +108 -111
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +57 -58
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +29 -29
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +38 -40
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +41 -42
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -8
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +9 -10
- 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 +0 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -7
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +123 -125
- package/dist/es/style.css +101 -92
- package/package.json +2 -2
|
@@ -2,8 +2,8 @@ import e from "async-validator";
|
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
3
|
import { getComponentRefByCode as n, getAllComponentRefs as r, getComponentRef as s } from "../global-refs.js";
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
|
-
import { getAdditionalParamMap as
|
|
6
|
-
import { isPromise as
|
|
5
|
+
import { getAdditionalParamMap as l } from "./standard-event.js";
|
|
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
8
|
function f(e2, t2, n2) {
|
|
9
9
|
const r2 = {};
|
|
@@ -11,24 +11,24 @@ function f(e2, t2, n2) {
|
|
|
11
11
|
let s2 = 0;
|
|
12
12
|
const i2 = e2.split(".");
|
|
13
13
|
return i2.forEach((e3) => {
|
|
14
|
-
let
|
|
15
|
-
if (s2 === i2.length - 1)
|
|
14
|
+
let l2;
|
|
15
|
+
if (s2 === i2.length - 1) l2 = function(e4, t3, n3) {
|
|
16
16
|
let r3;
|
|
17
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
18
|
if (t3[s3 + 1] === n3) break;
|
|
19
19
|
}
|
|
20
20
|
return r3;
|
|
21
|
-
}(r2, i2, e3),
|
|
21
|
+
}(r2, i2, e3), l2.fields[e3] = n2;
|
|
22
22
|
else {
|
|
23
23
|
let n3;
|
|
24
|
-
0 === s2 ?
|
|
24
|
+
0 === s2 ? l2 = t2 : (n3 = function(e4, t3, n4) {
|
|
25
25
|
let r3;
|
|
26
26
|
for (let s3 = 0; s3 < t3.length; s3++) {
|
|
27
27
|
const i3 = t3[s3];
|
|
28
28
|
if (r3 = 0 === s3 ? e4[i3] : r3.fields[t3[s3]], i3 === n4) break;
|
|
29
29
|
}
|
|
30
30
|
return r3;
|
|
31
|
-
}(r2, i2, i2[s2 - 1]),
|
|
31
|
+
}(r2, i2, i2[s2 - 1]), l2 = n3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === s2 ? r2[e3] = l2[e3] : n3.fields[e3] = l2[e3];
|
|
32
32
|
}
|
|
33
33
|
s2++;
|
|
34
34
|
}), r2;
|
|
@@ -44,12 +44,12 @@ function m(e2) {
|
|
|
44
44
|
}
|
|
45
45
|
}), e2;
|
|
46
46
|
}
|
|
47
|
-
function d(n2, r2, s2, i2,
|
|
47
|
+
function d(n2, r2, s2, i2, l2, o2) {
|
|
48
48
|
let a2, u2 = m(r2);
|
|
49
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,
|
|
50
|
+
return new e(u2).validate(n2, { first: true }, (e2, o3) => {
|
|
51
51
|
let u3;
|
|
52
|
-
if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 })
|
|
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
53
|
if (/[A-Z]+/.test(u3) && void 0 !== n2[u3.toLowerCase()]) {
|
|
54
54
|
const e3 = JSON.parse(JSON.stringify(n2));
|
|
55
55
|
e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3, r2, s2, i2, false);
|
|
@@ -58,20 +58,20 @@ function d(n2, r2, s2, i2, o2, l2) {
|
|
|
58
58
|
}), a2;
|
|
59
59
|
}
|
|
60
60
|
function p(e2, n2, r2) {
|
|
61
|
-
const s2 = e2.entity.data,
|
|
61
|
+
const s2 = e2.entity.data, o2 = { ...e2.entity.page, ...s2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
62
62
|
return null != f2 && (r2 = f2), null == r2 && (r2 = false), function(e3, n3, r3, s3) {
|
|
63
63
|
if (e3) {
|
|
64
64
|
return u(s3) ? function(e4, n4, r4) {
|
|
65
|
-
return new Promise((s4,
|
|
66
|
-
const a3 =
|
|
65
|
+
return new Promise((s4, o3) => {
|
|
66
|
+
const a3 = l(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, m2 = n4.subTablePageInfo;
|
|
67
67
|
b(e4, n4, r4).then((r5) => {
|
|
68
68
|
if (r5) {
|
|
69
69
|
let i2 = r5;
|
|
70
|
-
const
|
|
71
|
-
i2 = !
|
|
72
|
-
} else
|
|
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" }), s4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, s4(e4));
|
|
72
|
+
} else o3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
73
73
|
}).catch((e5) => {
|
|
74
|
-
|
|
74
|
+
o3(e5);
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
}(n3, s3, r3) : function(e4, t2, n4) {
|
|
@@ -90,7 +90,7 @@ function p(e2, n2, r2) {
|
|
|
90
90
|
return new Promise((e4, t2) => {
|
|
91
91
|
e4(true);
|
|
92
92
|
});
|
|
93
|
-
}(r2,
|
|
93
|
+
}(r2, o2, a2, e2);
|
|
94
94
|
}
|
|
95
95
|
function g(e2) {
|
|
96
96
|
return new Promise((t2, n2) => {
|
|
@@ -104,7 +104,7 @@ function g(e2) {
|
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
function b(e2, t2, n2) {
|
|
107
|
-
return new Promise((r2,
|
|
107
|
+
return new Promise((r2, l2) => {
|
|
108
108
|
const a2 = JSON.parse(JSON.stringify(e2));
|
|
109
109
|
if (n2 && 0 !== Object.keys(n2).length) {
|
|
110
110
|
if (true === c(a2, n2, null, null)) {
|
|
@@ -132,24 +132,24 @@ function b(e2, t2, n2) {
|
|
|
132
132
|
if (t3 && t3.length > 0) return new Promise((e6, n3) => {
|
|
133
133
|
const r3 = [], s2 = [];
|
|
134
134
|
t3.forEach((e7) => {
|
|
135
|
-
|
|
135
|
+
o(e7) ? r3.push(e7) : s2.push(e7);
|
|
136
136
|
}), s2.includes(false) && e6(false), r3.length > 0 ? Promise.all(r3).then((t4) => {
|
|
137
137
|
t4.includes(false) ? e6(false) : e6(true);
|
|
138
138
|
}).catch((t4) => {
|
|
139
|
-
|
|
139
|
+
e6(false);
|
|
140
140
|
}) : e6(true);
|
|
141
141
|
});
|
|
142
142
|
return null;
|
|
143
143
|
}(t2);
|
|
144
|
-
e4 &&
|
|
144
|
+
e4 && o(e4) ? e4.then((e5) => {
|
|
145
145
|
e5 ? g(t2).then((e6) => {
|
|
146
146
|
r2(e6);
|
|
147
147
|
}) : r2(false);
|
|
148
148
|
}) : g(t2).then((e5) => {
|
|
149
149
|
r2(e5);
|
|
150
150
|
});
|
|
151
|
-
} else
|
|
152
|
-
} else
|
|
151
|
+
} else l2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
152
|
+
} else l2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
153
153
|
} else r2(true);
|
|
154
154
|
});
|
|
155
155
|
}
|
|
@@ -183,12 +183,12 @@ function w(e2, t2) {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
function v(e2) {
|
|
186
|
-
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, r2 =
|
|
186
|
+
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, r2 = l(e2), s2 = e2.entity.context, i2 = e2.entity.task;
|
|
187
187
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
188
188
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
189
189
|
});
|
|
190
|
-
let
|
|
191
|
-
return
|
|
190
|
+
let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, r2, i2, s2);
|
|
191
|
+
return o2 = h(e2.customRules, o2), o2;
|
|
192
192
|
}
|
|
193
193
|
function P(e2, t2) {
|
|
194
194
|
if (!t2) return;
|
|
@@ -201,8 +201,8 @@ function P(e2, t2) {
|
|
|
201
201
|
s2 = h(r2, s2), e2.rules = s2;
|
|
202
202
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
203
203
|
i2 = h(r2, i2), e2.workflowRules = i2;
|
|
204
|
-
const
|
|
205
|
-
|
|
204
|
+
const l2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
205
|
+
l2 && l2.length > 0 && O(e2, l2[0]), t2.forEach((t3) => {
|
|
206
206
|
if ("_all_fields" !== t3.name) {
|
|
207
207
|
k(n(e2, t3.name), t3);
|
|
208
208
|
}
|
|
@@ -219,9 +219,9 @@ function O(e2, t2) {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
function R(e2, t2, r2) {
|
|
222
|
-
let i2,
|
|
223
|
-
if (r2 ? (i2 = n(e2, r2),
|
|
224
|
-
const
|
|
222
|
+
let i2, l2;
|
|
223
|
+
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;
|
|
224
|
+
const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
|
|
225
225
|
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
226
226
|
}
|
|
227
227
|
function k(e2, t2) {
|
|
@@ -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];
|