super-page-runtime 2.3.12 → 2.3.13-sit1
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 +50 -50
- package/dist/es/components/runtime/utils/events/event-util.js +4 -4
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +35 -35
- package/dist/es/components/runtime/utils/events/validator-util.js +169 -146
- package/dist/es/components/runtime/utils/page-init-util.js +24 -25
- 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 +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +93 -98
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- 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 +8 -9
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +4 -4
- 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 +33 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +40 -39
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +34 -35
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +38 -36
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +79 -79
- package/package.json +2 -2
|
@@ -1,109 +1,124 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import { getComponentRefByCode as
|
|
3
|
+
import { getComponentRefByCode as n, getComponentRef as s, getAllComponentRefs as r } 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
|
-
function f(e2, t2,
|
|
9
|
-
const
|
|
8
|
+
function f(e2, t2, n2) {
|
|
9
|
+
const s2 = {};
|
|
10
10
|
t2 || (t2 = {});
|
|
11
11
|
let r2 = 0;
|
|
12
12
|
const i2 = e2.split(".");
|
|
13
13
|
return i2.forEach((e3) => {
|
|
14
|
-
let
|
|
15
|
-
if (r2 === i2.length - 1)
|
|
16
|
-
let
|
|
17
|
-
for (let r3 = 0; r3 < t3.length; r3++) if (
|
|
18
|
-
if (t3[r3 + 1] ===
|
|
14
|
+
let o2;
|
|
15
|
+
if (r2 === i2.length - 1) o2 = 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), o2.fields[e3] = n2;
|
|
22
22
|
else {
|
|
23
|
-
let
|
|
24
|
-
0 === r2 ?
|
|
25
|
-
let
|
|
23
|
+
let n3;
|
|
24
|
+
0 === r2 ? o2 = t2 : (n3 = function(e4, t3, n4) {
|
|
25
|
+
let s3;
|
|
26
26
|
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
27
27
|
const i3 = t3[r3];
|
|
28
|
-
if (
|
|
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]), o2 = n3.fields), o2[e3] || (o2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? s2[e3] = o2[e3] : n3.fields[e3] = o2[e3];
|
|
32
32
|
}
|
|
33
33
|
r2++;
|
|
34
|
-
}),
|
|
34
|
+
}), s2;
|
|
35
35
|
}
|
|
36
|
-
function c(e2, t2,
|
|
37
|
-
return m(e2, t2,
|
|
36
|
+
function c(e2, t2, n2, s2, r2, i2) {
|
|
37
|
+
return m(e2, t2, n2, s2, true, r2, i2);
|
|
38
38
|
}
|
|
39
39
|
function d(e2) {
|
|
40
40
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
41
41
|
if (t2.indexOf(".") >= 0) {
|
|
42
|
-
let
|
|
43
|
-
|
|
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
44
|
}
|
|
45
45
|
}), e2;
|
|
46
46
|
}
|
|
47
|
-
function m(
|
|
47
|
+
function m(s2, r2, i2, o2, l2, a2, u2) {
|
|
48
48
|
let f2, c2 = d(r2);
|
|
49
|
-
if (r2 && null !== r2 || !i2 || (c2 = {}), !c2 || 0 === Object.keys(c2).length) return
|
|
50
|
-
return new e(c2).validate(
|
|
49
|
+
if (r2 && null !== r2 || !i2 || (c2 = {}), !c2 || 0 === Object.keys(c2).length) return s2.validateErrorField = "", true;
|
|
50
|
+
return new e(c2).validate(s2, { first: true }, (e2, c3) => {
|
|
51
51
|
let d2;
|
|
52
52
|
if (e2) {
|
|
53
53
|
f2 = e2[0].message, d2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const s3 = n(u2, d2);
|
|
55
|
+
s3 && s3.addRequiredClass && s3.addRequiredClass();
|
|
56
56
|
} else f2 = true;
|
|
57
|
-
if (d2 && true ===
|
|
58
|
-
if (/[A-Z]+/.test(d2) && void 0 !==
|
|
59
|
-
const e3 = JSON.parse(JSON.stringify(
|
|
60
|
-
e3[d2.toUpperCase()] =
|
|
57
|
+
if (d2 && true === l2) {
|
|
58
|
+
if (/[A-Z]+/.test(d2) && void 0 !== s2[d2.toLowerCase()]) {
|
|
59
|
+
const e3 = JSON.parse(JSON.stringify(s2));
|
|
60
|
+
e3[d2.toUpperCase()] = s2[d2.toLowerCase()], delete e3[d2.toLowerCase()], f2 = m(e3, r2, i2, o2, false, a2, u2);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
}), f2;
|
|
64
64
|
}
|
|
65
|
-
function p(e2,
|
|
66
|
-
const
|
|
67
|
-
return null != c2 && (r2 = c2), null == r2 && (r2 = false), function(e3,
|
|
65
|
+
function p(e2, s2, r2) {
|
|
66
|
+
const l2 = e2.entity.data, a2 = { ...e2.entity.page, ...l2 }, f2 = e2.rules, c2 = s2.props.base ? s2.props.base.isEnableRequired : null;
|
|
67
|
+
return null != c2 && (r2 = c2), null == r2 && (r2 = false), function(e3, s3, r3, l3) {
|
|
68
68
|
if (e3) {
|
|
69
|
-
return u(
|
|
70
|
-
return new Promise((
|
|
71
|
-
const u2 =
|
|
72
|
-
b(e4,
|
|
69
|
+
return u(l3) ? function(e4, s4, r4) {
|
|
70
|
+
return new Promise((l4, a3) => {
|
|
71
|
+
const u2 = o(s4), f3 = s4.entity.context, c3 = s4.entity.task, d2 = true, m2 = s4.subTablePageInfo;
|
|
72
|
+
b(e4, s4, r4).then((r5) => {
|
|
73
73
|
if (r5) {
|
|
74
|
-
let
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
74
|
+
let o2, a4, p2, g2, b2 = r5;
|
|
75
|
+
const h2 = s4.workflowRules;
|
|
76
|
+
if (h2) {
|
|
77
|
+
if (!function(e5, s5) {
|
|
78
|
+
if (!e5.actionPermissions) return true;
|
|
79
|
+
const r7 = Object.keys(e5.actionPermissions);
|
|
80
|
+
for (let o3 = 0; o3 < r7.length; o3++) {
|
|
81
|
+
const l5 = r7[o3], a5 = e5.actionPermissions[l5];
|
|
82
|
+
if (a5 && a5.notEmpty) {
|
|
83
|
+
let r8 = false;
|
|
84
|
+
if (s5[l5] ? Array.isArray(s5[l5]) && 0 === s5[l5].length && (r8 = true) : r8 = true, r8) {
|
|
85
|
+
const s6 = n(e5, l5).getConfigure();
|
|
86
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: s6.title ? s6.title : l5 }), type: "warning" }), false;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return true;
|
|
91
|
+
}(s4, e4)) return void l4(false);
|
|
92
|
+
const r6 = true, y2 = window.$vueApp.config.globalProperties.$formValidator(e4, h2, d2, u2, c3, f3, m2, r6);
|
|
93
|
+
b2 = y2.msg, o2 = y2.field, a4 = y2.listCode, p2 = y2.rowIndex, g2 = y2.pageNum;
|
|
94
|
+
} else b2 = true;
|
|
95
|
+
if (true !== b2) {
|
|
96
|
+
if (t({ showClose: true, message: b2 + "", type: "warning" }), a4) {
|
|
97
|
+
const e5 = n(s4, a4);
|
|
98
|
+
e5 && e5.addRequiredClass && e5.addRequiredClass(o2, p2, g2);
|
|
84
99
|
} else {
|
|
85
|
-
const e5 =
|
|
100
|
+
const e5 = n(s4, o2);
|
|
86
101
|
e5 && e5.addRequiredClass && e5.addRequiredClass();
|
|
87
102
|
}
|
|
88
|
-
|
|
89
|
-
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField,
|
|
103
|
+
l4(false);
|
|
104
|
+
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4);
|
|
90
105
|
} else a3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
91
106
|
}).catch((e5) => {
|
|
92
107
|
a3(e5);
|
|
93
108
|
});
|
|
94
109
|
});
|
|
95
|
-
}(
|
|
96
|
-
return new Promise((
|
|
97
|
-
b(e4, t2,
|
|
110
|
+
}(s3, l3, r3) : function(e4, t2, n2) {
|
|
111
|
+
return new Promise((s4, r4) => {
|
|
112
|
+
b(e4, t2, n2).then((t3) => {
|
|
98
113
|
if (t3) {
|
|
99
114
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
100
|
-
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField,
|
|
101
|
-
} else
|
|
115
|
+
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
|
|
116
|
+
} else s4(false);
|
|
102
117
|
}).catch((e5) => {
|
|
103
118
|
r4(e5);
|
|
104
119
|
});
|
|
105
120
|
});
|
|
106
|
-
}(
|
|
121
|
+
}(s3, l3, r3);
|
|
107
122
|
}
|
|
108
123
|
return new Promise((e4, t2) => {
|
|
109
124
|
e4(true);
|
|
@@ -111,118 +126,126 @@ function p(e2, n2, r2) {
|
|
|
111
126
|
}(r2, a2, f2, e2);
|
|
112
127
|
}
|
|
113
128
|
function g(e2) {
|
|
114
|
-
return new Promise((t2,
|
|
129
|
+
return new Promise((t2, n2) => {
|
|
115
130
|
const r2 = [], i2 = e2.customValidatorUuids;
|
|
116
131
|
i2 && i2.forEach((t3) => {
|
|
117
|
-
const
|
|
118
|
-
|
|
132
|
+
const n3 = s(e2, t3);
|
|
133
|
+
n3 && n3.validator && r2.push(n3.validator());
|
|
119
134
|
}), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
|
|
120
135
|
e3.includes(false) ? t2(false) : t2(true);
|
|
121
136
|
}) : t2(true);
|
|
122
137
|
});
|
|
123
138
|
}
|
|
124
|
-
function b(e2,
|
|
125
|
-
return new Promise((
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
if (true === c(
|
|
139
|
+
function b(e2, n2, r2) {
|
|
140
|
+
return new Promise((o2, a2) => {
|
|
141
|
+
const u2 = JSON.parse(JSON.stringify(e2));
|
|
142
|
+
if (r2 && 0 !== Object.keys(r2).length) {
|
|
143
|
+
if (true === c(u2, r2, null, null, true, n2)) {
|
|
129
144
|
const e3 = function(e4) {
|
|
145
|
+
var _a;
|
|
130
146
|
if (!e4) return true;
|
|
131
|
-
const
|
|
132
|
-
if (!
|
|
133
|
-
for (let
|
|
134
|
-
const
|
|
135
|
-
if (
|
|
136
|
-
if (
|
|
147
|
+
const n3 = e4.tableUuids;
|
|
148
|
+
if (!n3) return true;
|
|
149
|
+
for (let r3 = 0; r3 < n3.length; r3++) {
|
|
150
|
+
const o3 = n3[r3], l2 = s(e4, o3);
|
|
151
|
+
if (l2) {
|
|
152
|
+
if (l2.getConfigure()) {
|
|
153
|
+
const e5 = l2.getConfigure();
|
|
154
|
+
if ((_a = e5 == null ? void 0 : e5.verification) == null ? void 0 : _a.notEmpty) {
|
|
155
|
+
const n4 = l2.getTableData();
|
|
156
|
+
if (!n4 || !Array.isArray(n4) || 0 === n4.length) return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: e5.title ? e5.title : e5.code }), type: "warning" }), false;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
if (!l2.validatorSunTableListData()) return false;
|
|
137
160
|
}
|
|
138
161
|
}
|
|
139
162
|
return true;
|
|
140
|
-
}(
|
|
163
|
+
}(n2);
|
|
141
164
|
if (true === e3) {
|
|
142
165
|
const e4 = function(e5) {
|
|
143
|
-
const
|
|
144
|
-
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((
|
|
145
|
-
|
|
146
|
-
const r3 = e5.customEvents[
|
|
147
|
-
|
|
166
|
+
const t2 = [];
|
|
167
|
+
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
|
|
168
|
+
n3.events.forEach((s2) => {
|
|
169
|
+
const r3 = e5.customEvents[s2];
|
|
170
|
+
t2.push(r3.apply(r3, [{ prop: n3.prop, pageContext: e5 }]));
|
|
148
171
|
});
|
|
149
172
|
});
|
|
150
|
-
if (
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}), r3.includes(false) && e6(false),
|
|
155
|
-
|
|
156
|
-
}).catch((
|
|
157
|
-
|
|
173
|
+
if (t2 && t2.length > 0) return new Promise((e6, n3) => {
|
|
174
|
+
const s2 = [], r3 = [];
|
|
175
|
+
t2.forEach((e7) => {
|
|
176
|
+
l(e7) ? s2.push(e7) : r3.push(e7);
|
|
177
|
+
}), r3.includes(false) && e6(false), s2.length > 0 ? Promise.all(s2).then((t3) => {
|
|
178
|
+
t3.includes(false) ? e6(false) : e6(true);
|
|
179
|
+
}).catch((t3) => {
|
|
180
|
+
e6(false);
|
|
158
181
|
}) : e6(true);
|
|
159
182
|
});
|
|
160
183
|
return null;
|
|
161
|
-
}(
|
|
162
|
-
e4 &&
|
|
163
|
-
e5 ? g(
|
|
164
|
-
|
|
165
|
-
}) :
|
|
166
|
-
}) : g(
|
|
167
|
-
|
|
184
|
+
}(n2);
|
|
185
|
+
e4 && l(e4) ? e4.then((e5) => {
|
|
186
|
+
e5 ? g(n2).then((e6) => {
|
|
187
|
+
o2(e6);
|
|
188
|
+
}) : o2(false);
|
|
189
|
+
}) : g(n2).then((e5) => {
|
|
190
|
+
o2(e5);
|
|
168
191
|
});
|
|
169
|
-
} else
|
|
170
|
-
} else
|
|
171
|
-
} else
|
|
192
|
+
} else a2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
193
|
+
} else a2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
194
|
+
} else o2(true);
|
|
172
195
|
});
|
|
173
196
|
}
|
|
174
197
|
function h(e2, t2) {
|
|
175
198
|
if (!e2) return t2;
|
|
176
199
|
t2 || (t2 = {});
|
|
177
|
-
const
|
|
178
|
-
return
|
|
200
|
+
const n2 = Object.keys(e2), s2 = e2;
|
|
201
|
+
return n2.forEach((e3) => {
|
|
179
202
|
if ("__subRules" === e3) {
|
|
180
|
-
const e4 =
|
|
181
|
-
Object.keys(e4).forEach((
|
|
182
|
-
t2.subRules || (t2.subRules = {}), t2.subRules[
|
|
203
|
+
const e4 = s2.__subRules;
|
|
204
|
+
Object.keys(e4).forEach((n3) => {
|
|
205
|
+
t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
|
|
183
206
|
});
|
|
184
|
-
} else
|
|
207
|
+
} else C(s2[e3]), t2[e3] = s2[e3];
|
|
185
208
|
}), d(t2);
|
|
186
209
|
}
|
|
187
|
-
function
|
|
210
|
+
function y(e2) {
|
|
188
211
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
189
|
-
const t2 = {},
|
|
190
|
-
for (let
|
|
191
|
-
const r2 = s2
|
|
192
|
-
|
|
212
|
+
const t2 = {}, n2 = Object.keys(e2);
|
|
213
|
+
for (let s2 = 0; s2 < n2.length; s2++) {
|
|
214
|
+
const r2 = n2[s2], i2 = e2[r2];
|
|
215
|
+
w(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
193
216
|
}
|
|
194
217
|
return t2;
|
|
195
218
|
}
|
|
196
|
-
function
|
|
219
|
+
function w(e2, t2) {
|
|
197
220
|
e2.forEach((e3) => {
|
|
198
221
|
e3.message;
|
|
199
|
-
const t3 = e3.label,
|
|
200
|
-
e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label:
|
|
222
|
+
const t3 = e3.label, n2 = i().t(t3);
|
|
223
|
+
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 }));
|
|
201
224
|
});
|
|
202
225
|
}
|
|
203
226
|
function R(e2) {
|
|
204
|
-
const t2 = e2.entity.data,
|
|
227
|
+
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = o(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
205
228
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
206
229
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
207
230
|
});
|
|
208
|
-
let
|
|
209
|
-
return
|
|
231
|
+
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
|
|
232
|
+
return l2 = h(e2.customRules, l2), l2;
|
|
210
233
|
}
|
|
211
234
|
function v(e2, t2) {
|
|
212
235
|
if (!t2) return;
|
|
213
|
-
const
|
|
236
|
+
const s2 = {};
|
|
214
237
|
t2.forEach((e3) => {
|
|
215
|
-
const { name: t3, rules:
|
|
216
|
-
|
|
238
|
+
const { name: t3, rules: n2 } = e3;
|
|
239
|
+
n2 && (s2[t3] = n2);
|
|
217
240
|
});
|
|
218
241
|
let r2 = e2.rules ? e2.rules : {};
|
|
219
|
-
r2 = h(
|
|
242
|
+
r2 = h(s2, r2), e2.rules = r2;
|
|
220
243
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
221
|
-
i2 = h(
|
|
222
|
-
const
|
|
223
|
-
|
|
244
|
+
i2 = h(s2, i2), e2.workflowRules = i2;
|
|
245
|
+
const o2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
246
|
+
o2 && o2.length > 0 && E(e2, o2[0]), t2.forEach((t3) => {
|
|
224
247
|
if ("_all_fields" !== t3.name) {
|
|
225
|
-
O(
|
|
248
|
+
O(n(e2, t3.name), t3);
|
|
226
249
|
}
|
|
227
250
|
});
|
|
228
251
|
}
|
|
@@ -230,21 +253,21 @@ function P(e2) {
|
|
|
230
253
|
E(e2, { disabled: true });
|
|
231
254
|
}
|
|
232
255
|
function E(e2, t2) {
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
const
|
|
236
|
-
O(
|
|
256
|
+
const n2 = r(e2);
|
|
257
|
+
if (n2) for (const e3 in n2) {
|
|
258
|
+
const s2 = n2[e3];
|
|
259
|
+
O(s2 ? s2.value : s2, t2);
|
|
237
260
|
}
|
|
238
261
|
}
|
|
239
262
|
function k(e2, t2, r2) {
|
|
240
263
|
var _a;
|
|
241
|
-
let i2,
|
|
242
|
-
if (r2 ? (i2 =
|
|
243
|
-
const
|
|
264
|
+
let i2, o2;
|
|
265
|
+
if (r2 ? (i2 = n(e2, r2), o2 = i2 ? i2.getTableUuid() : null) : (o2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = o2 ? s(e2, o2) : null), !i2) return;
|
|
266
|
+
const l2 = e2.code, u2 = e2.version, f2 = a(l2, u2, o2);
|
|
244
267
|
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
|
|
245
|
-
const
|
|
268
|
+
const n2 = e2.workflowRules.subRules[r2];
|
|
246
269
|
t2.forEach((e3) => {
|
|
247
|
-
|
|
270
|
+
n2[e3.name] = e3;
|
|
248
271
|
});
|
|
249
272
|
}
|
|
250
273
|
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
@@ -252,32 +275,32 @@ function k(e2, t2, r2) {
|
|
|
252
275
|
function O(e2, t2) {
|
|
253
276
|
var _a, _b, _c;
|
|
254
277
|
if (e2) {
|
|
255
|
-
const
|
|
256
|
-
void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a =
|
|
278
|
+
const n2 = e2.getConfigure();
|
|
279
|
+
void 0 !== t2.show && (t2.show ? e2.show() : e2.hide()), void 0 !== t2.required && ((_a = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _a.props) && (n2.runtime.props.required = t2.required), void 0 !== t2.readonly && ((_b = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _b.props) && (t2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== t2.disabled && n2 && (((_c = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _c.props) && (t2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled"), "table" === n2.name && e2.changeOperationAddState(false));
|
|
257
280
|
}
|
|
258
281
|
}
|
|
259
|
-
function
|
|
282
|
+
function C(e2) {
|
|
260
283
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
261
|
-
const t2 =
|
|
284
|
+
const t2 = j[e2.type];
|
|
262
285
|
t2 && (e2.validator = t2.validator);
|
|
263
286
|
}
|
|
264
|
-
const
|
|
265
|
-
return true ===
|
|
266
|
-
} }, date: { validator: function(e2, t2,
|
|
267
|
-
if (true !==
|
|
268
|
-
const
|
|
269
|
-
return !isNaN(
|
|
270
|
-
} }, number: { validator: function(e2, t2,
|
|
271
|
-
return true ===
|
|
272
|
-
} } },
|
|
287
|
+
const j = { boolean: { validator: function(e2, t2, n2) {
|
|
288
|
+
return true === x(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
289
|
+
} }, date: { validator: function(e2, t2, n2) {
|
|
290
|
+
if (true !== x(e2, t2)) return false;
|
|
291
|
+
const s2 = new Date(t2);
|
|
292
|
+
return !isNaN(s2.getTime());
|
|
293
|
+
} }, number: { validator: function(e2, t2, n2) {
|
|
294
|
+
return true === x(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
295
|
+
} } }, x = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
273
296
|
export {
|
|
274
297
|
P as disabledAllFields,
|
|
275
298
|
k as dynamicControlTableEdit,
|
|
276
299
|
R as getWorkflowRules,
|
|
277
|
-
|
|
278
|
-
|
|
300
|
+
w as i18nValidatePropRulesMessage,
|
|
301
|
+
y as i18nValidateRulesMessage,
|
|
279
302
|
h as packageCustomRules,
|
|
280
|
-
|
|
303
|
+
C as packageCustomValidator,
|
|
281
304
|
f as setObjectPropRule,
|
|
282
305
|
O as updateComponentDisplayState,
|
|
283
306
|
v as updateFormItemEditState,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { getAdditionalParamMap as t } from "./events/standard-event.js";
|
|
3
3
|
import { PageDimensions as s } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as i, getVariableValue as
|
|
4
|
+
import { getFormPropName as i, getVariableValue as n, setVariableValue as o, formatVariableValue as r } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as l } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as a } from "./api/page-expose-util.js";
|
|
7
7
|
import { isWorkflowPage as p, deepCopy as u } from "./common-util.js";
|
|
@@ -40,7 +40,6 @@ 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);
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
function b(e2) {
|
|
@@ -62,7 +61,7 @@ function y(e2, t2) {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
function h(e2, t2) {
|
|
65
|
-
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query
|
|
64
|
+
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
66
65
|
Object.assign(t2, e2.query);
|
|
67
66
|
w(e2.query.paramStoreId, t2);
|
|
68
67
|
}
|
|
@@ -79,32 +78,32 @@ function w(e2, t2) {
|
|
|
79
78
|
function E(e2, t2) {
|
|
80
79
|
let s2, i2 = t2;
|
|
81
80
|
t2 || (s2 = e2.props.base ? e2.props.base : {}, i2 = s2.prop);
|
|
82
|
-
let
|
|
83
|
-
return t2 && !t2.startsWith("${") ?
|
|
81
|
+
let n2 = null;
|
|
82
|
+
return t2 && !t2.startsWith("${") ? n2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), n2 = i2.split("."), e2 && n2.length < 2 && (n2 = [e2.uuid])) : e2 && (n2 = ["page", e2.uuid]) : n2 = ["page", e2.uuid], n2 || e2 ? n2 : ["temp"];
|
|
84
83
|
}
|
|
85
84
|
function v(e2, t2, s2) {
|
|
86
85
|
const i2 = E(t2, s2), r2 = e2.entity;
|
|
87
86
|
if (null == r2.data.ID && null == r2.data.id) {
|
|
88
87
|
let s3, l2, a2 = false;
|
|
89
88
|
t2 && (s3 = t2.props.base ? t2.props.base : {}, l2 = t2.name, a2 = s3.multiple);
|
|
90
|
-
const p2 =
|
|
89
|
+
const p2 = n(r2, i2);
|
|
91
90
|
if (null == p2) {
|
|
92
91
|
const t3 = s3 ? s3.defaultValue : null;
|
|
93
92
|
if (t3) {
|
|
94
93
|
const s4 = P(e2, t3, l2, a2);
|
|
95
|
-
null != s4 &&
|
|
94
|
+
null != s4 && o(r2, i2, s4);
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
return i2;
|
|
100
99
|
}
|
|
101
100
|
function P(e2, t2, s2, i2) {
|
|
102
|
-
let
|
|
103
|
-
if (t2 && (
|
|
101
|
+
let n2;
|
|
102
|
+
if (t2 && (n2 = r(e2, t2), null != n2 && null != n2 && s2)) {
|
|
104
103
|
let e3 = false;
|
|
105
|
-
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (
|
|
104
|
+
"checkbox" == s2 ? e3 = true : "select" == s2 && (e3 = i2), e3 && (n2 = (n2 + "").split(","));
|
|
106
105
|
}
|
|
107
|
-
return
|
|
106
|
+
return n2;
|
|
108
107
|
}
|
|
109
108
|
function M(e2, t2) {
|
|
110
109
|
var _a, _b;
|
|
@@ -112,14 +111,14 @@ function M(e2, t2) {
|
|
|
112
111
|
const s2 = [];
|
|
113
112
|
if (e2.autoPermissions) for (const i2 of e2.autoPermissions) s2.push(t2.code + "." + i2.simpleCode);
|
|
114
113
|
if (e2.functionCodes) {
|
|
115
|
-
const i2 = e2.sourceTypes ? e2.sourceTypes : [],
|
|
116
|
-
for (let e3 = 0; e3 <
|
|
117
|
-
const
|
|
114
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], n2 = e2.functionCodes;
|
|
115
|
+
for (let e3 = 0; e3 < n2.length; e3++) {
|
|
116
|
+
const o2 = n2[e3], r2 = e3 < i2.length ? i2[e3] : "";
|
|
118
117
|
let l2 = "";
|
|
119
|
-
if ("service" == r2) l2 =
|
|
120
|
-
else if ("standard" === r2) l2 = t2.code + "." +
|
|
118
|
+
if ("service" == r2) l2 = o2;
|
|
119
|
+
else if ("standard" === r2) l2 = t2.code + "." + o2;
|
|
121
120
|
else {
|
|
122
|
-
l2 = "custom" === k(
|
|
121
|
+
l2 = "custom" === k(o2, t2).type ? o2 : t2.code + "." + o2;
|
|
123
122
|
}
|
|
124
123
|
s2.includes(l2) || s2.push(l2);
|
|
125
124
|
}
|
|
@@ -133,26 +132,26 @@ function k(e2, t2) {
|
|
|
133
132
|
}
|
|
134
133
|
return null;
|
|
135
134
|
}
|
|
136
|
-
function j(s2, i2,
|
|
137
|
-
const
|
|
135
|
+
function j(s2, i2, n2) {
|
|
136
|
+
const o2 = s2.tableRuntimes, r2 = t(i2);
|
|
138
137
|
let l2;
|
|
139
138
|
const a2 = i2.code;
|
|
140
|
-
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes:
|
|
139
|
+
return r2 && Object.keys(r2) > 0 && (l2 = JSON.stringify(r2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: o2, additionalParamMapJson: l2, pageCode: a2, publishVersion: n2, pageType: s2.pageType });
|
|
141
140
|
}
|
|
142
141
|
const C = ["button-detail", "print-label"];
|
|
143
142
|
function I(e2, t2, s2) {
|
|
144
143
|
var _a, _b;
|
|
145
|
-
const
|
|
144
|
+
const n2 = t2.props && t2.props.base ? t2.props.base.prop : null, o2 = p(e2);
|
|
146
145
|
let r2 = false;
|
|
147
|
-
if (
|
|
146
|
+
if (o2 && C.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
148
147
|
const s3 = e2.fieldPermissionMap.get("all_fields");
|
|
149
148
|
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", r2 = true);
|
|
150
149
|
}
|
|
151
|
-
if (
|
|
152
|
-
const l2 = i(
|
|
150
|
+
if (n2) {
|
|
151
|
+
const l2 = i(n2);
|
|
153
152
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[l2] || (e2.rules[l2] = []), t2.props.rules.forEach((e3) => {
|
|
154
153
|
d(e3), !s2 && e3 && e3.required && (e3.required = false);
|
|
155
|
-
}), e2.rules[l2] = t2.props.rules),
|
|
154
|
+
}), e2.rules[l2] = t2.props.rules), o2 && !r2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
156
155
|
const i2 = e2.fieldPermissionMap.get(l2);
|
|
157
156
|
if (!s2 && e2.workflowRules && (e2.workflowRules[l2] || e2.workflowRules.rules && e2.workflowRules.rules[l2])) {
|
|
158
157
|
let t3 = e2.workflowRules[l2];
|
|
@@ -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 o } from "pinia";
|
|
3
|
+
import a from "./eventBus.js";
|
|
4
|
+
const t = o("pageContextUtil", () => {
|
|
5
|
+
const o2 = e({ systemCode: "", systemVersion: -1 }), t2 = e(false), n = e(false), u = e(false), l = e(0), d = e(0);
|
|
6
|
+
return { pageContext: o2, setPageContext: function(e2) {
|
|
7
|
+
o2.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
|
+
d.value++, u.value = false;
|
|
12
|
+
}, componentsTotalNmber: l, componentsLoadedNumber: d, setPageComponentsLoaded: function(e2) {
|
|
13
|
+
t2.value = e2, t2.value && n.value && (a.$emit("pageLoaded"), u.value = true);
|
|
14
14
|
}, setFormPageDataLoadState: function(e2) {
|
|
15
|
-
n.value = e2, t2.value && n.value && (
|
|
15
|
+
n.value = e2, 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() {
|
|
@@ -19,7 +19,7 @@ function u(t2, e2) {
|
|
|
19
19
|
}
|
|
20
20
|
function l(t2, e2, i2, s2) {
|
|
21
21
|
const r2 = !(!e2.props || !e2.props.base) && e2.props.base.showOperation, u2 = e2.btnList;
|
|
22
|
-
|
|
22
|
+
r2 && u2 && u2.forEach((e3) => {
|
|
23
23
|
const r3 = {}, u3 = Object.assign({}, e3.props.base);
|
|
24
24
|
if ("custom" === e3.name ? u3.customControl = u3.name : u3.elementType = "el-button", void 0 === e3.isPermission || e3.isPermission + "" == "true") {
|
|
25
25
|
const i3 = o(e3, t2);
|