super-page-runtime 2.2.77 → 2.2.80
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 +46 -45
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +16 -14
- package/dist/es/components/runtime/utils/charts/chart-util.js +4 -2
- package/dist/es/components/runtime/utils/events/event-util.js +113 -113
- package/dist/es/components/runtime/utils/events/print-label.js +38 -37
- package/dist/es/components/runtime/utils/events/standard-event.js +473 -461
- package/dist/es/components/runtime/utils/events/validator-util.js +30 -30
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +210 -210
- package/dist/es/components/runtime/utils/page-init-util.js +45 -41
- 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 +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.vue2.js +14 -13
- 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 +17 -16
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +12 -7
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +26 -22
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +94 -91
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +139 -136
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +34 -33
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +1 -0
- 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 +40 -38
- 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 +44 -43
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +8 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -9
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
- 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 +13 -12
- package/dist/es/components/runtime/views/super-page.vue2.js +125 -123
- 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, getComponentRef as r, getAllComponentRefs 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 o } from "./standard-event.js";
|
|
6
|
+
import { isPromise as l } 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 o2;
|
|
15
|
+
if (s2 === i2.length - 1) o2 = 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), o2.fields[e3] = n2;
|
|
22
22
|
else {
|
|
23
23
|
let n3;
|
|
24
|
-
0 === s2 ?
|
|
24
|
+
0 === s2 ? o2 = 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]), o2 = n3.fields), o2[e3] || (o2[e3] = { type: "object", required: true, fields: {} }), 0 === s2 ? r2[e3] = o2[e3] : n3.fields[e3] = o2[e3];
|
|
32
32
|
}
|
|
33
33
|
s2++;
|
|
34
34
|
}), r2;
|
|
@@ -44,12 +44,12 @@ function d(e2) {
|
|
|
44
44
|
}
|
|
45
45
|
}), e2;
|
|
46
46
|
}
|
|
47
|
-
function m(n2, r2, s2, i2,
|
|
47
|
+
function m(n2, r2, s2, i2, o2, l2) {
|
|
48
48
|
let a2, u2 = d(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, l3) => {
|
|
51
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 ===
|
|
52
|
+
if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 }), console.log("errors", e2, "fields", l3)) : a2 = true, u3 && true === o2) {
|
|
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 = m(e3, r2, s2, i2, false);
|
|
@@ -58,20 +58,20 @@ function m(n2, r2, s2, i2, l2, o2) {
|
|
|
58
58
|
}), a2;
|
|
59
59
|
}
|
|
60
60
|
function p(e2, n2, r2) {
|
|
61
|
-
const s2 = e2.entity.data,
|
|
61
|
+
const s2 = e2.entity.data, l2 = { ...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, l3) => {
|
|
66
|
+
const a3 = o(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, d2 = 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 o2 = n4.workflowRules;
|
|
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);
|
|
73
73
|
}).catch((e5) => {
|
|
74
|
-
|
|
74
|
+
l3(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, l2, 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((s2,
|
|
107
|
+
return new Promise((s2, o2) => {
|
|
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 r2 = [], s3 = [];
|
|
134
134
|
t3.forEach((e7) => {
|
|
135
|
-
|
|
135
|
+
l(e7) ? r2.push(e7) : s3.push(e7);
|
|
136
136
|
}), s3.includes(false) && e6(false), r2.length > 0 ? Promise.all(r2).then((t4) => {
|
|
137
137
|
t4.includes(false) ? e6(false) : e6(true);
|
|
138
138
|
}).catch((t4) => {
|
|
139
|
-
e6(false);
|
|
139
|
+
console.error(t4), e6(false);
|
|
140
140
|
}) : e6(true);
|
|
141
141
|
});
|
|
142
142
|
return null;
|
|
143
143
|
}(t2);
|
|
144
|
-
e4 &&
|
|
144
|
+
e4 && l(e4) ? e4.then((e5) => {
|
|
145
145
|
e5 ? g(t2).then((e6) => {
|
|
146
146
|
s2(e6);
|
|
147
147
|
}) : s2(false);
|
|
148
148
|
}) : g(t2).then((e5) => {
|
|
149
149
|
s2(e5);
|
|
150
150
|
});
|
|
151
|
-
} else
|
|
152
|
-
} else
|
|
151
|
+
} else o2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
152
|
+
} else o2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
153
153
|
} else s2(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 = o(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 l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, r2, i2, s2);
|
|
191
|
+
return l2 = h(e2.customRules, l2), l2;
|
|
192
192
|
}
|
|
193
193
|
function P(e2, t2) {
|
|
194
194
|
if (!t2) return;
|
|
@@ -210,9 +210,9 @@ function E(e2) {
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
function R(e2, t2, s2) {
|
|
213
|
-
let i2,
|
|
214
|
-
if (s2 ? (i2 = n(e2, s2),
|
|
215
|
-
const
|
|
213
|
+
let i2, o2;
|
|
214
|
+
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;
|
|
215
|
+
const l2 = e2.code, u2 = e2.version, f2 = a(l2, u2, o2);
|
|
216
216
|
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
217
217
|
}
|
|
218
218
|
function O(e2, t2) {
|
|
@@ -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];
|