super-page-runtime 2.3.2 → 2.3.3-tmp1
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 +53 -53
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +26 -25
- package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
- package/dist/es/components/runtime/utils/events/validator-util.js +95 -88
- package/dist/es/components/runtime/utils/page-init-util.js +2 -1
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- 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 +8 -6
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +12 -7
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +19 -17
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
- 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 +81 -29
- 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 +10 -9
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +1 -1
- 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 +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +47 -46
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
- package/dist/es/components/runtime/views/assemblys/form/link/link-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/home-chart.vue.js +5 -5
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +43 -42
- package/dist/es/style.css +93 -84
- package/package.json +2 -2
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import { getComponentRefByCode as n, getAllComponentRefs as
|
|
3
|
+
import { getComponentRefByCode as n, getAllComponentRefs as s, getComponentRef as r } from "../global-refs.js";
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
5
|
import { getAdditionalParamMap as l } from "./standard-event.js";
|
|
6
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
|
-
const
|
|
9
|
+
const s2 = {};
|
|
10
10
|
t2 || (t2 = {});
|
|
11
|
-
let
|
|
11
|
+
let r2 = 0;
|
|
12
12
|
const i2 = e2.split(".");
|
|
13
13
|
return i2.forEach((e3) => {
|
|
14
14
|
let l2;
|
|
15
|
-
if (
|
|
16
|
-
let
|
|
17
|
-
for (let
|
|
18
|
-
if (t3[
|
|
15
|
+
if (r2 === i2.length - 1) l2 = function(e4, t3, n3) {
|
|
16
|
+
let s3;
|
|
17
|
+
for (let r3 = 0; r3 < t3.length; r3++) if (s3 = 0 === r3 ? e4[t3[r3]] : s3.fields[t3[r3]], r3 !== t3.length - 1) {
|
|
18
|
+
if (t3[r3 + 1] === n3) break;
|
|
19
19
|
}
|
|
20
|
-
return
|
|
21
|
-
}(
|
|
20
|
+
return s3;
|
|
21
|
+
}(s2, i2, e3), l2.fields[e3] = n2;
|
|
22
22
|
else {
|
|
23
23
|
let n3;
|
|
24
|
-
0 ===
|
|
25
|
-
let
|
|
26
|
-
for (let
|
|
27
|
-
const i3 = t3[
|
|
28
|
-
if (
|
|
24
|
+
0 === r2 ? l2 = t2 : (n3 = function(e4, t3, n4) {
|
|
25
|
+
let s3;
|
|
26
|
+
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
27
|
+
const i3 = t3[r3];
|
|
28
|
+
if (s3 = 0 === r3 ? e4[i3] : s3.fields[t3[r3]], i3 === n4) break;
|
|
29
29
|
}
|
|
30
|
-
return
|
|
31
|
-
}(
|
|
30
|
+
return s3;
|
|
31
|
+
}(s2, i2, i2[r2 - 1]), l2 = n3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? s2[e3] = l2[e3] : n3.fields[e3] = l2[e3];
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
}),
|
|
33
|
+
r2++;
|
|
34
|
+
}), s2;
|
|
35
35
|
}
|
|
36
|
-
function c(e2, t2, n2,
|
|
37
|
-
return d(e2, t2, n2,
|
|
36
|
+
function c(e2, t2, n2, s2, r2) {
|
|
37
|
+
return d(e2, t2, n2, s2, true);
|
|
38
38
|
}
|
|
39
39
|
function m(e2) {
|
|
40
40
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
@@ -44,67 +44,67 @@ function m(e2) {
|
|
|
44
44
|
}
|
|
45
45
|
}), e2;
|
|
46
46
|
}
|
|
47
|
-
function d(n2,
|
|
48
|
-
let a2, u2 = m(
|
|
49
|
-
if (
|
|
47
|
+
function d(n2, s2, r2, i2, l2, o2) {
|
|
48
|
+
let a2, u2 = m(s2);
|
|
49
|
+
if (s2 && null !== s2 || !r2 || (u2 = {}), !u2 || 0 === Object.keys(u2).length) return n2.validateErrorField = "", true;
|
|
50
50
|
return new e(u2).validate(n2, { first: true }, (e2, o3) => {
|
|
51
51
|
let u3;
|
|
52
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
|
-
e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3,
|
|
55
|
+
e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3, s2, r2, i2, false);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}), a2;
|
|
59
59
|
}
|
|
60
|
-
function p(e2, n2,
|
|
61
|
-
const
|
|
62
|
-
return null != f2 && (
|
|
60
|
+
function p(e2, n2, s2) {
|
|
61
|
+
const r2 = e2.entity.data, o2 = { ...e2.entity.page, ...r2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
62
|
+
return null != f2 && (s2 = f2), null == s2 && (s2 = false), function(e3, n3, s3, r3) {
|
|
63
63
|
if (e3) {
|
|
64
|
-
return u(
|
|
65
|
-
return new Promise((
|
|
64
|
+
return u(r3) ? function(e4, n4, s4) {
|
|
65
|
+
return new Promise((r4, o3) => {
|
|
66
66
|
const a3 = l(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, m2 = n4.subTablePageInfo;
|
|
67
|
-
b(e4, n4,
|
|
68
|
-
if (
|
|
69
|
-
let i2 =
|
|
67
|
+
b(e4, n4, s4).then((s5) => {
|
|
68
|
+
if (s5) {
|
|
69
|
+
let i2 = s5;
|
|
70
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" }),
|
|
71
|
+
i2 = !l2 || window.$vueApp.config.globalProperties.$formValidator(e4, l2, c2, a3, f3, u2, m2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), r4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, r4(e4));
|
|
72
72
|
} else o3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
73
73
|
}).catch((e5) => {
|
|
74
74
|
o3(e5);
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
-
}(n3,
|
|
78
|
-
return new Promise((
|
|
77
|
+
}(n3, r3, s3) : function(e4, t2, n4) {
|
|
78
|
+
return new Promise((s4, r4) => {
|
|
79
79
|
b(e4, t2, n4).then((t3) => {
|
|
80
80
|
if (t3) {
|
|
81
81
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
82
|
-
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField,
|
|
83
|
-
} else
|
|
82
|
+
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
|
|
83
|
+
} else s4(false);
|
|
84
84
|
}).catch((e5) => {
|
|
85
|
-
|
|
85
|
+
r4(e5);
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
|
-
}(n3,
|
|
88
|
+
}(n3, r3, s3);
|
|
89
89
|
}
|
|
90
90
|
return new Promise((e4, t2) => {
|
|
91
91
|
e4(true);
|
|
92
92
|
});
|
|
93
|
-
}(
|
|
93
|
+
}(s2, o2, a2, e2);
|
|
94
94
|
}
|
|
95
95
|
function g(e2) {
|
|
96
96
|
return new Promise((t2, n2) => {
|
|
97
|
-
const
|
|
97
|
+
const s2 = [], i2 = e2.customValidatorUuids;
|
|
98
98
|
i2 && i2.forEach((t3) => {
|
|
99
|
-
const n3 =
|
|
100
|
-
n3 && n3.validator &&
|
|
101
|
-
}),
|
|
99
|
+
const n3 = r(e2, t3);
|
|
100
|
+
n3 && n3.validator && s2.push(n3.validator());
|
|
101
|
+
}), s2 && s2.length > 0 ? Promise.all(s2).then((e3) => {
|
|
102
102
|
e3.includes(false) ? t2(false) : t2(true);
|
|
103
103
|
}) : t2(true);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
function b(e2, t2, n2) {
|
|
107
|
-
return new Promise((
|
|
107
|
+
return new Promise((s2, 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)) {
|
|
@@ -113,7 +113,7 @@ function b(e2, t2, n2) {
|
|
|
113
113
|
const t3 = e4.tableUuids;
|
|
114
114
|
if (!t3) return true;
|
|
115
115
|
for (let n3 = 0; n3 < t3.length; n3++) {
|
|
116
|
-
const
|
|
116
|
+
const s3 = t3[n3], i2 = r(e4, s3);
|
|
117
117
|
if (i2) {
|
|
118
118
|
if (!i2.validatorSunTableListData()) return false;
|
|
119
119
|
}
|
|
@@ -124,58 +124,58 @@ function b(e2, t2, n2) {
|
|
|
124
124
|
const e4 = function(e5) {
|
|
125
125
|
const t3 = [];
|
|
126
126
|
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
|
|
127
|
-
n3.events.forEach((
|
|
128
|
-
const
|
|
129
|
-
t3.push(
|
|
127
|
+
n3.events.forEach((s3) => {
|
|
128
|
+
const r2 = e5.customEvents[s3];
|
|
129
|
+
t3.push(r2.apply(r2, [{ prop: n3.prop, pageContext: e5 }]));
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
132
|
if (t3 && t3.length > 0) return new Promise((e6, n3) => {
|
|
133
|
-
const
|
|
133
|
+
const s3 = [], r2 = [];
|
|
134
134
|
t3.forEach((e7) => {
|
|
135
|
-
o(e7) ?
|
|
136
|
-
}),
|
|
135
|
+
o(e7) ? s3.push(e7) : r2.push(e7);
|
|
136
|
+
}), r2.includes(false) && e6(false), s3.length > 0 ? Promise.all(s3).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
144
|
e4 && o(e4) ? e4.then((e5) => {
|
|
145
145
|
e5 ? g(t2).then((e6) => {
|
|
146
|
-
|
|
147
|
-
}) :
|
|
146
|
+
s2(e6);
|
|
147
|
+
}) : s2(false);
|
|
148
148
|
}) : g(t2).then((e5) => {
|
|
149
|
-
|
|
149
|
+
s2(e5);
|
|
150
150
|
});
|
|
151
151
|
} else l2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
152
152
|
} else l2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
153
|
-
} else
|
|
153
|
+
} else s2(true);
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
function h(e2, t2) {
|
|
157
157
|
if (!e2) return t2;
|
|
158
158
|
t2 || (t2 = {});
|
|
159
|
-
const n2 = Object.keys(e2),
|
|
159
|
+
const n2 = Object.keys(e2), s2 = e2;
|
|
160
160
|
return n2.forEach((e3) => {
|
|
161
161
|
if ("__subRules" === e3) {
|
|
162
|
-
const e4 =
|
|
162
|
+
const e4 = s2.__subRules;
|
|
163
163
|
Object.keys(e4).forEach((n3) => {
|
|
164
164
|
t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
|
|
165
165
|
});
|
|
166
|
-
} else j(
|
|
166
|
+
} else j(s2[e3]), t2[e3] = s2[e3];
|
|
167
167
|
}), m(t2);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function w(e2) {
|
|
170
170
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
171
171
|
const t2 = {}, n2 = Object.keys(e2);
|
|
172
|
-
for (let
|
|
173
|
-
const
|
|
174
|
-
|
|
172
|
+
for (let s2 = 0; s2 < n2.length; s2++) {
|
|
173
|
+
const r2 = n2[s2], i2 = e2[r2];
|
|
174
|
+
y(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
175
175
|
}
|
|
176
176
|
return t2;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function y(e2, t2) {
|
|
179
179
|
e2.forEach((e3) => {
|
|
180
180
|
e3.message;
|
|
181
181
|
const t3 = e3.label, n2 = i().t(t3);
|
|
@@ -183,48 +183,55 @@ function w(e2, t2) {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
function v(e2) {
|
|
186
|
-
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 },
|
|
186
|
+
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = l(e2), r2 = 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 o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true,
|
|
190
|
+
let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
|
|
191
191
|
return o2 = h(e2.customRules, o2), o2;
|
|
192
192
|
}
|
|
193
193
|
function P(e2, t2) {
|
|
194
194
|
if (!t2) return;
|
|
195
|
-
const
|
|
195
|
+
const s2 = {};
|
|
196
196
|
t2.forEach((e3) => {
|
|
197
197
|
const { name: t3, rules: n2 } = e3;
|
|
198
|
-
n2 && (
|
|
198
|
+
n2 && (s2[t3] = n2);
|
|
199
199
|
});
|
|
200
|
-
let
|
|
201
|
-
|
|
200
|
+
let r2 = e2.rules ? e2.rules : {};
|
|
201
|
+
r2 = h(s2, r2), e2.rules = r2;
|
|
202
202
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
203
|
-
i2 = h(
|
|
203
|
+
i2 = h(s2, i2), e2.workflowRules = i2;
|
|
204
204
|
const l2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
205
|
-
l2 && l2.length > 0 &&
|
|
205
|
+
l2 && l2.length > 0 && E(e2, l2[0]), t2.forEach((t3) => {
|
|
206
206
|
if ("_all_fields" !== t3.name) {
|
|
207
|
-
|
|
207
|
+
O(n(e2, t3.name), t3);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
211
|
+
function R(e2) {
|
|
212
|
+
E(e2, { disabled: true });
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const n2 =
|
|
214
|
+
function E(e2, t2) {
|
|
215
|
+
const n2 = s(e2);
|
|
216
216
|
if (n2) for (const e3 in n2) {
|
|
217
|
-
const
|
|
218
|
-
|
|
217
|
+
const s2 = n2[e3];
|
|
218
|
+
O(s2 ? s2.value : s2, t2);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function k(e2, t2, s2) {
|
|
222
|
+
var _a;
|
|
222
223
|
let i2, l2;
|
|
223
|
-
if (
|
|
224
|
+
if (s2 ? (i2 = n(e2, s2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? r(e2, l2) : null), !i2) return;
|
|
224
225
|
const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
|
|
226
|
+
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[s2]) {
|
|
227
|
+
const n2 = e2.workflowRules.subRules[s2];
|
|
228
|
+
t2.forEach((e3) => {
|
|
229
|
+
n2[e3.name] = e3;
|
|
230
|
+
});
|
|
231
|
+
}
|
|
225
232
|
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
226
233
|
}
|
|
227
|
-
function
|
|
234
|
+
function O(e2, t2) {
|
|
228
235
|
var _a, _b, _c;
|
|
229
236
|
if (e2) {
|
|
230
237
|
const n2 = e2.getConfigure();
|
|
@@ -243,15 +250,15 @@ function j(e2) {
|
|
|
243
250
|
});
|
|
244
251
|
}
|
|
245
252
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
253
|
+
R as disabledAllFields,
|
|
254
|
+
k as dynamicControlTableEdit,
|
|
248
255
|
v as getWorkflowRules,
|
|
249
|
-
|
|
250
|
-
|
|
256
|
+
y as i18nValidatePropRulesMessage,
|
|
257
|
+
w as i18nValidateRulesMessage,
|
|
251
258
|
h as packageCustomRules,
|
|
252
259
|
j as packageCustomValidator,
|
|
253
260
|
f as setObjectPropRule,
|
|
254
|
-
|
|
261
|
+
O as updateComponentDisplayState,
|
|
255
262
|
P as updateFormItemEditState,
|
|
256
263
|
p as validateDataModelFunc,
|
|
257
264
|
c as validator
|
|
@@ -40,6 +40,7 @@ function g(e2) {
|
|
|
40
40
|
e3.duplicateFieldList && e3.duplicateFieldList.length > 0 && (e3.duplicateFieldList = e3.duplicateFieldList.map((e4) => "string" == typeof e4 ? { propDbName: e4 } : e4));
|
|
41
41
|
}), e2.props.judgeHeavyList) : null;
|
|
42
42
|
} catch (e3) {
|
|
43
|
+
console.error("getJudgeHeavyList error:", e3);
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
46
|
function b(e2) {
|
|
@@ -61,7 +62,7 @@ function y(e2, t2) {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
function h(e2, t2) {
|
|
64
|
-
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
65
|
+
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query, e2.query)) {
|
|
65
66
|
Object.assign(t2, e2.query);
|
|
66
67
|
v(e2.query.paramStoreId, t2);
|
|
67
68
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ref as e } from "vue";
|
|
2
|
-
import { defineStore as
|
|
3
|
-
import
|
|
4
|
-
const t =
|
|
5
|
-
const
|
|
6
|
-
return { pageContext:
|
|
7
|
-
|
|
2
|
+
import { defineStore as a } from "pinia";
|
|
3
|
+
import o from "./eventBus.js";
|
|
4
|
+
const t = a("pageContextUtil", () => {
|
|
5
|
+
const a2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), v = e(0);
|
|
6
|
+
return { pageContext: a2, setPageContext: function(e2) {
|
|
7
|
+
a2.value = e2;
|
|
8
8
|
}, countComponentsTotalNmber: function() {
|
|
9
9
|
l.value++, t2.value = false, u.value = false;
|
|
10
10
|
}, countComponentsLoadedNumber: function() {
|
|
11
|
-
|
|
12
|
-
}, componentsTotalNmber: l, componentsLoadedNumber:
|
|
13
|
-
t2.value = e2, t2.value && n.value && (
|
|
11
|
+
v.value++, u.value = false;
|
|
12
|
+
}, componentsTotalNmber: l, componentsLoadedNumber: v, setPageComponentsLoaded: function(e2) {
|
|
13
|
+
t2.value = e2, t2.value && n.value && (o.$emit("pageLoaded"), u.value = true);
|
|
14
14
|
}, setFormPageDataLoadState: function(e2) {
|
|
15
|
-
n.value = e2, t2.value && n.value && (u.value = true);
|
|
15
|
+
n.value = e2, t2.value && n.value && (t2.value, n.value, u.value = true);
|
|
16
16
|
}, formPageDataLoaded: n, pageComponentsLoaded: t2, restorePageLoadState: function() {
|
|
17
17
|
t2.value = false, n.value = false, u.value = false;
|
|
18
18
|
}, pageLoaded: u, getPageLoaded: function() {
|
|
@@ -18,7 +18,7 @@ function r(t2, e2) {
|
|
|
18
18
|
}
|
|
19
19
|
function u(t2, i2, s2, n2) {
|
|
20
20
|
const r2 = !(!i2.props || !i2.props.base) && i2.props.base.showOperation, u2 = i2.btnList;
|
|
21
|
-
r2 && u2 && u2.forEach((i3) => {
|
|
21
|
+
i2.btnList, r2 && u2 && u2.forEach((i3) => {
|
|
22
22
|
const r3 = {}, u3 = Object.assign({}, i3.props.base);
|
|
23
23
|
if ("custom" === i3.name ? u3.customControl = u3.name : u3.elementType = "el-button", void 0 === i3.isPermission || i3.isPermission + "" == "true") {
|
|
24
24
|
const o2 = e(i3, t2);
|
package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { defineComponent as e, watch as l, resolveComponent as o, createBlock as a, createElementBlock as u, openBlock as r, withCtx as
|
|
2
|
-
const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
})
|
|
1
|
+
import { defineComponent as e, watch as l, resolveComponent as o, createBlock as a, createElementBlock as u, openBlock as r, withCtx as n, Fragment as d, renderList as p } from "vue";
|
|
2
|
+
const t = e({ __name: "common-chart-header-group", props: { headerInfo: { type: Object, required: true } }, setup(e2) {
|
|
3
|
+
const t2 = e2;
|
|
4
|
+
return l(t2.headerInfo, () => {
|
|
5
|
+
t2.headerInfo;
|
|
6
|
+
}), (l2, t3) => {
|
|
7
|
+
const h = o("el-checkbox"), f = o("el-checkbox-group"), m = o("el-radio"), V = o("el-radio-button"), b = o("el-radio-group");
|
|
8
|
+
return "checkbox" == e2.headerInfo.groupComponent ? (r(), a(f, { key: 0, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[0] || (t3[0] = (l3) => e2.headerInfo.groupValue = l3) }, { default: n(() => [(r(true), u(d, null, p(e2.headerInfo.options, (e3) => (r(), a(h, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"])) : "radio" == e2.headerInfo.groupComponent ? (r(true), u(d, { key: 1 }, p(e2.headerInfo.options, (l3) => (r(), a(m, { modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[1] || (t3[1] = (l4) => e2.headerInfo.groupValue = l4), value: l3.value, label: l3.label }, null, 8, ["modelValue", "value", "label"]))), 256)) : (r(), a(b, { key: 2, modelValue: e2.headerInfo.groupValue, "onUpdate:modelValue": t3[2] || (t3[2] = (l3) => e2.headerInfo.groupValue = l3) }, { default: n(() => [(r(true), u(d, null, p(e2.headerInfo.options, (e3) => (r(), a(V, { label: e3.label, value: e3.value }, null, 8, ["label", "value"]))), 256))]), _: 1 }, 8, ["modelValue"]));
|
|
9
|
+
};
|
|
10
|
+
} });
|
|
7
11
|
export {
|
|
8
12
|
t as default
|
|
9
13
|
};
|
|
@@ -3,12 +3,13 @@ import { Search as p } from "@element-plus/icons-vue";
|
|
|
3
3
|
import g from "./common-chart-header-group.vue.js";
|
|
4
4
|
import m from "./common-chart-header-breadcrumb.vue.js";
|
|
5
5
|
import b from "./common-homepage-search.vue.js";
|
|
6
|
-
import { setVariableValueWithProp as v, getValueFromSource as y, setValueForVariableName as
|
|
7
|
-
const
|
|
6
|
+
import { setVariableValueWithProp as v, getValueFromSource as y, setValueForVariableName as O } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
const w = { class: "amb-widget-chart-header" }, x = { class: "amb-widget-chart-header-item" }, k = { class: "amb-widget-chart-header-item amb-widget-chart-header-center" }, j = { class: "amb-widget-chart-header-item" }, C = { key: 0, class: "amb-widget-chart-header-item" }, P = e({ __name: "common-chart-header", props: { headerInfo: { type: Object, required: true }, configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["drill-end"], setup(e2, { expose: P2, emit: _ }) {
|
|
8
8
|
const N = e2, D = o(null), A = o(), R = _;
|
|
9
9
|
function S(e3) {
|
|
10
10
|
const o2 = N.headerInfo.drillOptions.length;
|
|
11
|
-
if (
|
|
11
|
+
if (e3 >= o2) N.headerInfo.drillOptions;
|
|
12
|
+
else {
|
|
12
13
|
for (let r2 = o2 - 1; r2 >= e3; r2--) N.headerInfo.drillOptions.splice(r2, 1);
|
|
13
14
|
q(e3);
|
|
14
15
|
}
|
|
@@ -34,7 +35,7 @@ const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-h
|
|
|
34
35
|
for (let e4 of o2.variables) {
|
|
35
36
|
if (!e4.fieldName || !e4.variable) continue;
|
|
36
37
|
const o3 = y(r2, e4.fieldName, void 0);
|
|
37
|
-
|
|
38
|
+
O(N.pageContext.entity, e4.variable, o3);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
41
|
N.headerInfo.drillOptions || (N.headerInfo.drillOptions = []);
|
|
@@ -46,11 +47,12 @@ const x = { class: "amb-widget-chart-header" }, O = { class: "amb-widget-chart-h
|
|
|
46
47
|
if (r2 + 1 >= N.headerInfo.options.length) {
|
|
47
48
|
return F(o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : void 0), void R("drill-end", e3);
|
|
48
49
|
}
|
|
50
|
+
N.headerInfo.options;
|
|
49
51
|
const n2 = N.headerInfo.options[r2], t2 = o2 && e3.dataIndex < o2.length ? o2[e3.dataIndex] : null, a2 = { fieldName: n2.target ? n2.target.replace(".", "_") : "", rawFieldName: n2.target ? n2.target : "", label: e3.name, value: e3.name, data: t2 };
|
|
50
52
|
N.headerInfo.drillOptions.push(a2), q(r2 + 1);
|
|
51
53
|
}, closeDrill: S }), (o2, v2) => {
|
|
52
|
-
const y2 = r("el-icon"),
|
|
53
|
-
return t(), n("div",
|
|
54
|
+
const y2 = r("el-icon"), O2 = r("el-tooltip");
|
|
55
|
+
return t(), n("div", w, [a("div", x, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + " ", 5), [[s, e2.headerInfo.title && (!e2.headerInfo.textAlign || "left" == e2.headerInfo.textAlign)]]), !e2.headerInfo.showDrill || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(m, { key: 0, ref_key: "drillObjRef", ref: D, headerInfo: e2.headerInfo, onCloseDrill: S }, null, 8, ["headerInfo"])), !e2.headerInfo.showGroup || e2.headerInfo.groupPosition && "left" != e2.headerInfo.groupPosition ? l("", true) : (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"]))]), a("div", k, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + " ", 5), [[s, e2.headerInfo.title && "center" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "center" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "center" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), a("div", j, [i(a("label", { style: f(e2.headerInfo.style) }, h(e2.headerInfo.title) + " ", 5), [[s, e2.headerInfo.title && "right" == e2.headerInfo.textAlign]]), e2.headerInfo.showDrill && "right" == e2.headerInfo.groupPosition ? (t(), d(m, { key: 0, headerInfo: e2.headerInfo, onCloseDrill: S, ref_key: "drillObjRef", ref: D }, null, 8, ["headerInfo"])) : l("", true), e2.headerInfo.showGroup && "right" == e2.headerInfo.groupPosition ? (t(), d(g, { key: 1, headerInfo: e2.headerInfo }, null, 8, ["headerInfo"])) : l("", true)]), e2.pageContext.showHomepageSearch ? (t(), n("div", C, [c(O2, { content: "打开查询弹窗", effect: "light" }, { default: I(() => [c(y2, { onClick: G }, { default: I(() => [c(u(p))]), _: 1 })]), _: 1 }), c(b, { ref_key: "commonHomepageSearchRef", ref: A, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["configure", "pageContext"])])) : l("", true)]);
|
|
54
56
|
};
|
|
55
57
|
} });
|
|
56
58
|
export {
|
|
@@ -74,7 +74,7 @@ class ExpressionEvaluator {
|
|
|
74
74
|
try {
|
|
75
75
|
return eval(expression);
|
|
76
76
|
} catch (e) {
|
|
77
|
-
return false;
|
|
77
|
+
return console.error("表达式错误:", expression, e), false;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -115,6 +115,7 @@ function summaryStatistics(e, t, r, o) {
|
|
|
115
115
|
const e2 = n2.apply(n2, [{ data: t, prop: r }]);
|
|
116
116
|
a = e2 ? ` ${e2}` : " N/A";
|
|
117
117
|
} catch (e2) {
|
|
118
|
+
console.error("自定义函数脚本错误:", t, e2);
|
|
118
119
|
}
|
|
119
120
|
else a = " N/A";
|
|
120
121
|
} else switch (n) {
|
|
@@ -147,7 +148,8 @@ function getHeaderCellStyleUtil(e, t, r) {
|
|
|
147
148
|
const a2 = getCustomFunc(r.pageContext, t2.scopeFunc);
|
|
148
149
|
if (a2) try {
|
|
149
150
|
false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(o, t2);
|
|
150
|
-
} catch (
|
|
151
|
+
} catch (r2) {
|
|
152
|
+
console.error("自定义函数脚本错误:", t2, e, r2);
|
|
151
153
|
}
|
|
152
154
|
} else copyStyle(o, t2);
|
|
153
155
|
}));
|
|
@@ -163,7 +165,8 @@ function getRowStyleUtil(e, t, r) {
|
|
|
163
165
|
if (t3) try {
|
|
164
166
|
const r2 = t3.apply(t3, [{ data: e }]);
|
|
165
167
|
null != r2 && false !== r2 && copyStyle(o, a);
|
|
166
|
-
} catch (
|
|
168
|
+
} catch (t4) {
|
|
169
|
+
console.error("自定义函数脚本错误:", e, t4);
|
|
167
170
|
}
|
|
168
171
|
} else if (a.matchingCondition) {
|
|
169
172
|
const t3 = ExpressionEvaluator.evaluate(r.pageContext, a.matchingCondition, e.row);
|
|
@@ -187,7 +190,8 @@ function getCellStyleUtil(e, t, r) {
|
|
|
187
190
|
const t2 = getCustomFunc(r.pageContext, n.scopeFunc);
|
|
188
191
|
if (t2) try {
|
|
189
192
|
false !== t2.apply(t2, [{ data: e }]) && copyStyle(o, n);
|
|
190
|
-
} catch (
|
|
193
|
+
} catch (t3) {
|
|
194
|
+
console.error("自定义函数脚本错误:", e, t3);
|
|
191
195
|
}
|
|
192
196
|
} else if (n.matchingCondition) {
|
|
193
197
|
const t2 = ExpressionEvaluator.evaluate(r.pageContext, n.matchingCondition, e.row);
|
|
@@ -311,7 +315,7 @@ function computeFormula(itemConfs, datas, entity) {
|
|
|
311
315
|
r += Number(e2[t]);
|
|
312
316
|
});
|
|
313
317
|
} catch (e2) {
|
|
314
|
-
r = 0;
|
|
318
|
+
console.error("计算错误:", e2), r = 0;
|
|
315
319
|
}
|
|
316
320
|
totalValueMap[e] = r;
|
|
317
321
|
} else (e.startsWith("${page.") || e.startsWith("${data.") || e.startsWith("${row.") || e.startsWith("${request.") || e.startsWith("${context.") || e.startsWith("${system.") || e.startsWith("${fixed.")) && (totalValueMap[e] = getValueFromVariable(entity, e, data));
|
|
@@ -323,7 +327,7 @@ function computeFormula(itemConfs, datas, entity) {
|
|
|
323
327
|
try {
|
|
324
328
|
data[key] = eval(expr);
|
|
325
329
|
} catch (e) {
|
|
326
|
-
data[key] = 0;
|
|
330
|
+
console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e), data[key] = 0;
|
|
327
331
|
}
|
|
328
332
|
});
|
|
329
333
|
});
|
|
@@ -363,7 +367,8 @@ function formatCustomFunc(e, t, r, o, a) {
|
|
|
363
367
|
if (n) {
|
|
364
368
|
try {
|
|
365
369
|
return n.apply(n, [{ pageContext: o, configureObj: a, row: e, prop: r.props.base.prop }]);
|
|
366
|
-
} catch (
|
|
370
|
+
} catch (t2) {
|
|
371
|
+
console.error("自定义函数脚本错误:", e, t2);
|
|
367
372
|
}
|
|
368
373
|
return "";
|
|
369
374
|
}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as a, resolveComponent as l, createBlock as o, openBlock as
|
|
2
|
-
import { packageTemplateFiles as
|
|
3
|
-
const m = "${",
|
|
4
|
-
const g = e2, f =
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as a, resolveComponent as l, createBlock as o, openBlock as r, withCtx as s, createVNode as u, createTextVNode as p, toDisplayString as n } from "vue";
|
|
2
|
+
import { packageTemplateFiles as i } from "../../../utils/common-util.js";
|
|
3
|
+
const m = "${", c = "}", d = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object } }, emits: ["export", "close"], setup(e2, { emit: d2 }) {
|
|
4
|
+
const g = e2, f = d2, b = t([]), h = t([]), x = g.configure.props.base, v = g.pageContext.entity.data;
|
|
5
5
|
function w(e3) {
|
|
6
6
|
let t2, a2, l2 = e3;
|
|
7
|
-
const o2 = l2.indexOf(m),
|
|
8
|
-
return -1 !== o2 && -1 !==
|
|
7
|
+
const o2 = l2.indexOf(m), r2 = l2.indexOf(c);
|
|
8
|
+
return -1 !== o2 && -1 !== r2 ? (o2 > r2 ? l2 = l2.substring(0, r2) + l2.substring(r2 + 1) : (t2 = l2.substring(o2 + 2, r2), a2 = l2.substring(o2, r2 + 1), h.value.push(t2), h.value, l2 = l2.replace(a2, "")), w(l2)) : h.value;
|
|
9
9
|
}
|
|
10
10
|
function y() {
|
|
11
11
|
f("close");
|
|
12
12
|
}
|
|
13
13
|
return a(() => {
|
|
14
|
-
x.templateFiles && x.templateFiles.length > 0 ? b.value =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
x.templateFiles && x.templateFiles.length > 0 ? b.value = i(x.templateFiles) : x.templateUuid && x.templateName && b.value.push({ templateUuid: x.templateUuid, templateName: x.templateName }), b.value.forEach((e3) => {
|
|
15
|
+
e3 && e3.templateName && (e3.templateName = function(e4) {
|
|
16
|
+
const t2 = w(e4);
|
|
17
|
+
return t2.forEach((t3) => {
|
|
18
|
+
const a2 = m + t3 + c;
|
|
19
|
+
let l2;
|
|
20
|
+
-1 !== e4.indexOf(a2) && v.hasOwnProperty(t3) && (l2 = v[t3] ? v[t3] : "", e4 = e4.replace(a2, l2));
|
|
21
|
+
}), e4;
|
|
22
|
+
}(e3.templateName));
|
|
21
23
|
});
|
|
22
24
|
}), (e3, t2) => {
|
|
23
|
-
const a2 = l("el-table-column"),
|
|
24
|
-
return
|
|
25
|
+
const a2 = l("el-table-column"), i2 = l("el-button"), m2 = l("el-table"), c2 = l("el-dialog");
|
|
26
|
+
return r(), o(c2, { "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), "model-value": "", onClose: y }, { default: s(() => [u(m2, { data: b.value, style: { width: "100%" } }, { default: s(() => [u(a2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: s((e4) => [p(n(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), u(a2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: s((t3) => [u(i2, { type: "text", size: "small", onClick: (e4) => {
|
|
25
27
|
return a3 = t3.row, void f("export", g.configure, a3);
|
|
26
28
|
var a3;
|
|
27
|
-
} }, { default:
|
|
29
|
+
} }, { default: s(() => [p(n(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"]);
|
|
28
30
|
};
|
|
29
31
|
} });
|
|
30
32
|
export {
|
|
31
|
-
|
|
33
|
+
d as default
|
|
32
34
|
};
|
|
@@ -19,6 +19,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
19
19
|
B.value = l2 ?? 0, R(n2 || i2 || false, e3);
|
|
20
20
|
}
|
|
21
21
|
} catch (e3) {
|
|
22
|
+
console.error(e3);
|
|
22
23
|
}
|
|
23
24
|
}, R = (e3, t2) => {
|
|
24
25
|
var _a;
|
|
@@ -55,6 +56,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
55
56
|
})();
|
|
56
57
|
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
|
|
57
58
|
} catch (e3) {
|
|
59
|
+
console.error(e3);
|
|
58
60
|
}
|
|
59
61
|
});
|
|
60
62
|
}, 100);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./tabs-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = e(t, [["__scopeId", "data-v-
|
|
4
|
+
const r = e(t, [["__scopeId", "data-v-50669d0c"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|