super-page-runtime 2.3.42 → 2.3.43-cdn1
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/events/validator-util.js +164 -121
- package/dist/es/components/runtime/utils/page-init-util.js +35 -36
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +23 -24
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +20 -11
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +52 -52
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -72
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +1 -2
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +88 -69
- package/package.json +2 -2
|
@@ -69,10 +69,10 @@ function g(e2, t2, s2) {
|
|
|
69
69
|
r2++;
|
|
70
70
|
}), n2;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function h(e2, t2, s2, n2, r2, o2) {
|
|
73
|
+
return y(e2, t2, s2, n2, true, r2, o2);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function b(e2) {
|
|
76
76
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
77
77
|
if (t2.indexOf(".") >= 0) {
|
|
78
78
|
let s2 = [];
|
|
@@ -80,56 +80,74 @@ function h(e2) {
|
|
|
80
80
|
}
|
|
81
81
|
}), e2;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
function y(n2, r2, i2, l2, a2, u2, c2) {
|
|
84
|
+
var _a;
|
|
85
|
+
let d2 = b(r2);
|
|
86
|
+
if (r2 && null !== r2 || !i2 || (d2 = {}), !d2 || 0 === Object.keys(d2).length) return n2.validateErrorField = "", true;
|
|
87
|
+
const m2 = ((_a = c2.props) == null ? void 0 : _a.highlightAllRequiredField) || false;
|
|
88
|
+
let p2;
|
|
89
|
+
return new e(d2).validate(n2, { first: !m2 }, (e2, g2) => {
|
|
90
|
+
if (m2) {
|
|
91
|
+
if (p2 = e2 || true, true === p2 && true === a2 && d2) {
|
|
92
|
+
const e3 = /[A-Z]+/, t2 = Object.keys(d2);
|
|
93
|
+
if (t2.some((t3) => e3.test(t3) && void 0 !== n2[t3.toLowerCase()])) {
|
|
94
|
+
const s2 = JSON.parse(JSON.stringify(n2));
|
|
95
|
+
t2.forEach((t3) => {
|
|
96
|
+
e3.test(t3) && void 0 !== n2[t3.toLowerCase()] && (s2[t3.toUpperCase()] = n2[t3.toLowerCase()], delete s2[t3.toLowerCase()]);
|
|
97
|
+
}), p2 = y(s2, r2, i2, l2, false, u2, c2);
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
true !== p2 && t({ showClose: true, message: o().t("superPageRuntimeMessage.pleaseInputRequiredInfo"), type: "warning" });
|
|
101
|
+
} else {
|
|
102
|
+
let o2;
|
|
103
|
+
if (e2) {
|
|
104
|
+
p2 = e2[0].message, o2 = e2[0].field, t({ message: p2, showClose: true, type: "warning", duration: 3e3 });
|
|
105
|
+
const n3 = s(c2, o2);
|
|
106
|
+
if (n3 && n3.addRequiredClass) {
|
|
107
|
+
n3.addRequiredClass();
|
|
108
|
+
try {
|
|
109
|
+
f(c2, o2);
|
|
110
|
+
} catch (e3) {
|
|
111
|
+
console.error("滚动失败", e3);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} else p2 = true;
|
|
115
|
+
if (o2 && true === a2) {
|
|
116
|
+
if (/[A-Z]+/.test(o2) && void 0 !== n2[o2.toLowerCase()]) {
|
|
117
|
+
const e3 = JSON.parse(JSON.stringify(n2));
|
|
118
|
+
e3[o2.toUpperCase()] = n2[o2.toLowerCase()], delete e3[o2.toLowerCase()], p2 = y(e3, r2, i2, l2, false, u2, c2);
|
|
119
|
+
}
|
|
104
120
|
}
|
|
105
121
|
}
|
|
106
|
-
}),
|
|
122
|
+
}), p2;
|
|
107
123
|
}
|
|
108
|
-
function
|
|
124
|
+
function w(e2, n2, r2, l2) {
|
|
109
125
|
if (r2) {
|
|
110
|
-
if (
|
|
126
|
+
if (J(r2.isStandard, r2.event)) return new Promise((e3, t2) => {
|
|
111
127
|
e3(true);
|
|
112
128
|
});
|
|
113
129
|
}
|
|
114
|
-
const c2 = e2.entity.data,
|
|
115
|
-
return null !=
|
|
130
|
+
const c2 = e2.entity.data, f2 = { ...e2.entity.page, ...c2 }, d2 = e2.rules, m2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
131
|
+
return null != m2 && (l2 = m2), null == l2 && (l2 = false), function(e3, n3, r3, l3) {
|
|
116
132
|
if (e3) {
|
|
117
133
|
return u(l3) ? function(e4, n4, r4) {
|
|
118
134
|
return new Promise((l4, u2) => {
|
|
119
|
-
|
|
120
|
-
|
|
135
|
+
var _a;
|
|
136
|
+
const c3 = i(n4), f3 = n4.entity.context, d3 = n4.entity.task, m3 = true, g2 = n4.subTablePageInfo, h2 = ((_a = n4.props) == null ? void 0 : _a.highlightAllRequiredField) || false;
|
|
137
|
+
x(e4, n4, r4).then((r5) => {
|
|
121
138
|
if (r5) {
|
|
122
|
-
let i2
|
|
123
|
-
const
|
|
124
|
-
|
|
139
|
+
let i2 = r5;
|
|
140
|
+
const u3 = n4.workflowRules;
|
|
141
|
+
let b2 = null, y2 = null;
|
|
142
|
+
if (u3) {
|
|
125
143
|
if (!function(e5, n5) {
|
|
126
|
-
var
|
|
144
|
+
var _a2, _b, _c, _d;
|
|
127
145
|
if (!e5.actionPermissions) return true;
|
|
128
146
|
const r7 = Object.keys(e5.actionPermissions);
|
|
129
147
|
for (let i3 = 0; i3 < r7.length; i3++) {
|
|
130
148
|
const l5 = r7[i3], u4 = e5.actionPermissions[l5];
|
|
131
149
|
if (u4 && u4.notEmpty) {
|
|
132
|
-
if ((
|
|
150
|
+
if ((_a2 = e5.hiddenNotValidatorCodes) == null ? void 0 : _a2.has(l5)) continue;
|
|
133
151
|
let r8 = false;
|
|
134
152
|
if (n5[l5] ? Array.isArray(n5[l5]) && 0 === n5[l5].length && (r8 = true) : r8 = true, r8) {
|
|
135
153
|
const r9 = s(e5, l5);
|
|
@@ -144,37 +162,17 @@ function y(e2, n2, r2, l2) {
|
|
|
144
162
|
}
|
|
145
163
|
return true;
|
|
146
164
|
}(n4, e4)) return void l4(false);
|
|
147
|
-
const r6 = true
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
e5.addRequiredClass(i2, h2, w2);
|
|
159
|
-
try {
|
|
160
|
-
f(n4, u3), e5.scrollToCell({ fieldName: i2, rowIndex: h2, pageNum: w2 });
|
|
161
|
-
} catch (e6) {
|
|
162
|
-
console.error("滚动到验证失败的子表字段失败,可能是表格组件版本较低没有scrollToCell方法", e6);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
} else {
|
|
166
|
-
const e5 = s(n4, i2);
|
|
167
|
-
if (e5 && e5.addRequiredClass) {
|
|
168
|
-
e5.addRequiredClass();
|
|
169
|
-
try {
|
|
170
|
-
f(n4, i2);
|
|
171
|
-
} catch (e6) {
|
|
172
|
-
console.error("滚动失败", e6);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
l4(false);
|
|
177
|
-
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4);
|
|
165
|
+
const r6 = true;
|
|
166
|
+
b2 = function(e5, t2) {
|
|
167
|
+
const s2 = p(e5);
|
|
168
|
+
t2 && t2.size > 0 && t2.forEach((e6) => {
|
|
169
|
+
delete s2[e6], s2.subRules && delete s2.subRules[e6], s2.rules && delete s2.rules[e6];
|
|
170
|
+
});
|
|
171
|
+
s2.subRules && (Object.keys(s2.subRules).length > 0 ? s2.totalSubRules || (s2.totalSubRules = {}) : delete s2.subRules);
|
|
172
|
+
return s2;
|
|
173
|
+
}(u3, n4.hiddenNotValidatorCodes), y2 = window.$vueApp.config.globalProperties.$formValidator(e4, b2, m3, c3, d3, f3, g2, r6, { returnAllErrors: h2 }), i2 = y2 && Array.isArray(y2) ? 0 === y2.length || o().t("superPageRuntimeMessage.pleaseInputRequiredInfo") : !y2 || y2.msg;
|
|
174
|
+
} else i2 = true;
|
|
175
|
+
true !== i2 ? (console.error("流程表单验证失败", b2, e4), t({ showClose: true, message: i2 + "", type: "warning" }), y2 && Array.isArray(y2) && y2.length > 0 ? (C(n4, y2), k(n4, P(n4, y2))) : y2.listCode ? (R(n4, y2), E(n4, y2)) : (R(n4, y2), v(n4, y2.field)), l4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4));
|
|
178
176
|
} else u2(new Error(o().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
179
177
|
}).catch((e5) => {
|
|
180
178
|
u2(e5);
|
|
@@ -182,7 +180,7 @@ function y(e2, n2, r2, l2) {
|
|
|
182
180
|
});
|
|
183
181
|
}(n3, l3, r3) : function(e4, t2, s2) {
|
|
184
182
|
return new Promise((n4, r4) => {
|
|
185
|
-
|
|
183
|
+
x(e4, t2, s2).then((t3) => {
|
|
186
184
|
if (t3) {
|
|
187
185
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
188
186
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
|
|
@@ -196,9 +194,52 @@ function y(e2, n2, r2, l2) {
|
|
|
196
194
|
return new Promise((e4, t2) => {
|
|
197
195
|
e4(true);
|
|
198
196
|
});
|
|
199
|
-
}(l2,
|
|
197
|
+
}(l2, f2, d2, e2);
|
|
198
|
+
}
|
|
199
|
+
function R(e2, t2) {
|
|
200
|
+
if (t2.listCode) {
|
|
201
|
+
const n2 = s(e2, t2.listCode);
|
|
202
|
+
(n2 == null ? void 0 : n2.addRequiredClass) && n2.addRequiredClass(t2.field, t2.rowIndex, t2.pageNum);
|
|
203
|
+
} else if (t2.field) {
|
|
204
|
+
const n2 = s(e2, t2.field);
|
|
205
|
+
(n2 == null ? void 0 : n2.addRequiredClass) && n2.addRequiredClass();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function C(e2, t2) {
|
|
209
|
+
t2.forEach((t3) => R(e2, t3));
|
|
200
210
|
}
|
|
201
|
-
function
|
|
211
|
+
function E(e2, t2) {
|
|
212
|
+
try {
|
|
213
|
+
f(e2, t2.listCode);
|
|
214
|
+
const n2 = s(e2, t2.listCode);
|
|
215
|
+
(n2 == null ? void 0 : n2.scrollToCell) && n2.scrollToCell({ fieldName: t2.field, rowIndex: t2.rowIndex, pageNum: t2.pageNum });
|
|
216
|
+
} catch (e3) {
|
|
217
|
+
console.error("滚动到验证失败的子表字段失败,可能是表格组件版本较低没有scrollToCell方法", e3);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function v(e2, t2) {
|
|
221
|
+
try {
|
|
222
|
+
f(e2, t2);
|
|
223
|
+
} catch (e3) {
|
|
224
|
+
console.error("滚动失败", e3);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
function P(e2, t2) {
|
|
228
|
+
let n2 = null, r2 = 1 / 0;
|
|
229
|
+
return t2.forEach((t3) => {
|
|
230
|
+
const o2 = t3.listCode || t3.field;
|
|
231
|
+
if (!o2) return;
|
|
232
|
+
const i2 = s(e2, o2), l2 = (i2 == null ? void 0 : i2.$el) || i2;
|
|
233
|
+
if (l2 == null ? void 0 : l2.getBoundingClientRect) {
|
|
234
|
+
const e3 = l2.getBoundingClientRect();
|
|
235
|
+
e3.top < r2 && (r2 = e3.top, n2 = t3);
|
|
236
|
+
}
|
|
237
|
+
}), n2;
|
|
238
|
+
}
|
|
239
|
+
function k(e2, t2) {
|
|
240
|
+
t2 && (t2.listCode ? E(e2, t2) : t2.field && v(e2, t2.field));
|
|
241
|
+
}
|
|
242
|
+
function O(e2) {
|
|
202
243
|
return new Promise((t2, s2) => {
|
|
203
244
|
const r2 = [], o2 = e2.customValidatorUuids;
|
|
204
245
|
o2 && o2.forEach((t3) => {
|
|
@@ -209,39 +250,41 @@ function R(e2) {
|
|
|
209
250
|
}) : t2(true);
|
|
210
251
|
});
|
|
211
252
|
}
|
|
212
|
-
function
|
|
253
|
+
function x(e2, t2, s2) {
|
|
213
254
|
return new Promise((n2, r2) => {
|
|
255
|
+
var _a;
|
|
214
256
|
const i2 = JSON.parse(JSON.stringify(e2)), a2 = p(s2), u2 = t2.hiddenNotValidatorCodes;
|
|
215
257
|
if (a2 && u2 && u2.size > 0 && u2.forEach((e3) => {
|
|
216
258
|
delete a2[e3];
|
|
217
259
|
}), a2 && 0 !== Object.keys(a2).length) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
260
|
+
const e3 = h(i2, a2, null, null, true, t2);
|
|
261
|
+
if (((_a = t2.props) == null ? void 0 : _a.highlightAllRequiredField) && e3 && Array.isArray(e3) && e3.length > 0 && (C(t2, e3), k(t2, P(t2, e3)), n2(false)), true === e3) {
|
|
262
|
+
if (true === M(t2)) {
|
|
263
|
+
const e4 = q(t2);
|
|
264
|
+
e4 && l(e4) ? e4.then((e5) => {
|
|
265
|
+
e5 ? O(t2).then((e6) => {
|
|
266
|
+
n2(e6);
|
|
224
267
|
}) : n2(false);
|
|
225
|
-
}) :
|
|
226
|
-
n2(
|
|
268
|
+
}) : O(t2).then((e5) => {
|
|
269
|
+
n2(e5);
|
|
227
270
|
});
|
|
228
271
|
} else r2(new Error(o().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
229
272
|
} else r2(new Error(o().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
230
273
|
} else {
|
|
231
|
-
if (true ===
|
|
232
|
-
const e3 =
|
|
274
|
+
if (true === M(t2)) {
|
|
275
|
+
const e3 = q(t2);
|
|
233
276
|
e3 && l(e3) ? e3.then((e4) => {
|
|
234
|
-
e4 ?
|
|
277
|
+
e4 ? O(t2).then((e5) => {
|
|
235
278
|
n2(e5);
|
|
236
279
|
}) : n2(false);
|
|
237
|
-
}) :
|
|
280
|
+
}) : O(t2).then((e4) => {
|
|
238
281
|
n2(e4);
|
|
239
282
|
});
|
|
240
283
|
} else r2(new Error(o().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
241
284
|
}
|
|
242
285
|
});
|
|
243
286
|
}
|
|
244
|
-
function
|
|
287
|
+
function T(e2, t2, s2) {
|
|
245
288
|
if (!t2) return s2;
|
|
246
289
|
s2 || (s2 = {});
|
|
247
290
|
const n2 = u(e2), r2 = Object.keys(t2), o2 = t2;
|
|
@@ -251,10 +294,10 @@ function v(e2, t2, s2) {
|
|
|
251
294
|
Object.keys(e4).forEach((t3) => {
|
|
252
295
|
s2.subRules || (s2.subRules = {}), s2.subRules[t3] ? Object.assign(s2.subRules[t3], e4[t3]) : s2.subRules[t3] = e4[t3];
|
|
253
296
|
});
|
|
254
|
-
} else
|
|
255
|
-
}),
|
|
297
|
+
} else _(o2[e3]), n2 ? (s2.rules[e3] = o2[e3], s2[e3] && (s2[e3] = o2[e3])) : s2[e3] = o2[e3];
|
|
298
|
+
}), b(s2);
|
|
256
299
|
}
|
|
257
|
-
function
|
|
300
|
+
function M(e2) {
|
|
258
301
|
var _a;
|
|
259
302
|
if (!e2) return true;
|
|
260
303
|
if (u(e2)) return true;
|
|
@@ -289,32 +332,32 @@ function P(e2) {
|
|
|
289
332
|
}
|
|
290
333
|
return true;
|
|
291
334
|
}
|
|
292
|
-
function
|
|
335
|
+
function j(e2) {
|
|
293
336
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
294
337
|
const t2 = {}, s2 = Object.keys(e2);
|
|
295
338
|
for (let n2 = 0; n2 < s2.length; n2++) {
|
|
296
339
|
const r2 = s2[n2], o2 = e2[r2];
|
|
297
|
-
|
|
340
|
+
N(o2), r2.indexOf(".") > 0 ? g(r2, t2, o2) : o2 && o2.length > 0 && (t2[r2] = [...o2]);
|
|
298
341
|
}
|
|
299
342
|
return t2;
|
|
300
343
|
}
|
|
301
|
-
function
|
|
344
|
+
function N(e2, t2) {
|
|
302
345
|
e2.forEach((e3) => {
|
|
303
346
|
e3.message;
|
|
304
347
|
const t3 = e3.label, s2 = o().t(t3);
|
|
305
348
|
e3.required && (e3.message = o().t("superPageRuntimeMessage.required", { label: s2 })), e3.myType && (e3.message = o().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), e3.patternType && (e3.message = o().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), void 0 !== e3.max && null !== e3.max && (e3.message = o().t("superPageRuntimeMessage.overMaxLength", { label: s2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = o().t("superPageRuntimeMessage.limitMinLength", { label: s2, value: e3.min }));
|
|
306
349
|
});
|
|
307
350
|
}
|
|
308
|
-
function
|
|
351
|
+
function A(e2) {
|
|
309
352
|
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = i(e2), r2 = e2.entity.context, o2 = e2.entity.task;
|
|
310
353
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
311
354
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
312
355
|
});
|
|
313
356
|
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, o2, r2);
|
|
314
357
|
const a2 = e2.customRules;
|
|
315
|
-
return l2 =
|
|
358
|
+
return l2 = T(e2, a2, l2), l2 && (l2.rules || (l2.rules = {}), l2.subRules || (l2.subRules = {})), l2;
|
|
316
359
|
}
|
|
317
|
-
function
|
|
360
|
+
function q(e2) {
|
|
318
361
|
const t2 = [];
|
|
319
362
|
return e2.customRuleEvents && e2.customRuleEvents.length > 0 && e2.customRuleEvents.forEach((s2) => {
|
|
320
363
|
s2.events.forEach((n2) => {
|
|
@@ -332,7 +375,7 @@ function x(e2) {
|
|
|
332
375
|
}) : e3(true);
|
|
333
376
|
}) : null;
|
|
334
377
|
}
|
|
335
|
-
function
|
|
378
|
+
function S(e2, t2) {
|
|
336
379
|
if (!t2) return;
|
|
337
380
|
const n2 = {};
|
|
338
381
|
if (t2.forEach((e3) => {
|
|
@@ -340,30 +383,30 @@ function T(e2, t2) {
|
|
|
340
383
|
s2 ? n2[t3] = s2 : false === e3.required && (n2[t3] = []);
|
|
341
384
|
}), u(e2)) {
|
|
342
385
|
let t3 = e2.workflowRules ? e2.workflowRules : { rules: {}, subRules: {} };
|
|
343
|
-
t3 =
|
|
386
|
+
t3 = T(e2, n2, t3), e2.workflowRules = t3;
|
|
344
387
|
} else {
|
|
345
388
|
let t3 = e2.rules ? e2.rules : {};
|
|
346
|
-
t3 =
|
|
389
|
+
t3 = T(e2, n2, t3), e2.rules = t3;
|
|
347
390
|
}
|
|
348
391
|
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
349
|
-
r2 && r2.length > 0 &&
|
|
392
|
+
r2 && r2.length > 0 && L(e2, r2[0]), t2.forEach((t3) => {
|
|
350
393
|
if ("_all_fields" !== t3.name) {
|
|
351
394
|
const n3 = s(e2, t3.name);
|
|
352
|
-
|
|
395
|
+
D(e2, n3, t3);
|
|
353
396
|
}
|
|
354
397
|
});
|
|
355
398
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
399
|
+
function F(e2) {
|
|
400
|
+
L(e2, { disabled: true });
|
|
358
401
|
}
|
|
359
|
-
function
|
|
402
|
+
function L(e2, t2) {
|
|
360
403
|
const s2 = r(e2);
|
|
361
404
|
if (s2) for (const n2 in s2) {
|
|
362
405
|
const r2 = s2[n2];
|
|
363
|
-
|
|
406
|
+
D(e2, r2 ? r2.value : r2, t2);
|
|
364
407
|
}
|
|
365
408
|
}
|
|
366
|
-
function
|
|
409
|
+
function V(e2, t2, r2) {
|
|
367
410
|
var _a;
|
|
368
411
|
let o2, i2;
|
|
369
412
|
if (r2 ? (o2 = s(e2, r2), i2 = o2 ? o2.getTableUuid() : null) : (i2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, o2 = i2 ? n(e2, i2) : null), !o2) return;
|
|
@@ -376,7 +419,7 @@ function N(e2, t2, r2) {
|
|
|
376
419
|
}
|
|
377
420
|
o2.dynamicControlTableEdit(e2, t2, u2);
|
|
378
421
|
}
|
|
379
|
-
function
|
|
422
|
+
function D(e2, t2, s2) {
|
|
380
423
|
var _a, _b, _c;
|
|
381
424
|
if (t2) {
|
|
382
425
|
const n2 = t2.getConfigure();
|
|
@@ -387,34 +430,34 @@ function q(e2, t2, s2) {
|
|
|
387
430
|
}
|
|
388
431
|
}
|
|
389
432
|
}
|
|
390
|
-
function
|
|
433
|
+
function _(e2) {
|
|
391
434
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
392
|
-
const t2 =
|
|
435
|
+
const t2 = U[e2.type];
|
|
393
436
|
t2 && (e2.validator = t2.validator);
|
|
394
437
|
}
|
|
395
|
-
const
|
|
396
|
-
return true ===
|
|
438
|
+
const U = { boolean: { validator: function(e2, t2, s2) {
|
|
439
|
+
return true === I(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
397
440
|
} }, date: { validator: function(e2, t2, s2) {
|
|
398
|
-
if (true !==
|
|
441
|
+
if (true !== I(e2, t2)) return false;
|
|
399
442
|
const n2 = new Date(t2);
|
|
400
443
|
return !isNaN(n2.getTime());
|
|
401
444
|
} }, number: { validator: function(e2, t2, s2) {
|
|
402
|
-
return true ===
|
|
403
|
-
} } },
|
|
404
|
-
function
|
|
445
|
+
return true === I(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
446
|
+
} } }, I = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
447
|
+
function J(e2, t2) {
|
|
405
448
|
return e2 && m.includes(t2.eventName);
|
|
406
449
|
}
|
|
407
450
|
export {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
451
|
+
F as disabledAllFields,
|
|
452
|
+
V as dynamicControlTableEdit,
|
|
453
|
+
A as getWorkflowRules,
|
|
454
|
+
N as i18nValidatePropRulesMessage,
|
|
455
|
+
j as i18nValidateRulesMessage,
|
|
456
|
+
J as isNotNeedValidateRequired,
|
|
457
|
+
T as packageCustomRules,
|
|
458
|
+
_ as packageCustomValidator,
|
|
416
459
|
g as setObjectPropRule,
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
460
|
+
S as updateFormItemEditState,
|
|
461
|
+
w as validateDataModelFunc,
|
|
462
|
+
h as validator
|
|
420
463
|
};
|
|
@@ -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 n } from "./interfaces/page-design-types.js";
|
|
4
|
-
import { getFormPropName as i, getVariableValue as
|
|
4
|
+
import { getFormPropName as i, getVariableValue as o, formatVariableValue as r, setVariableValue as s } from "./page-helper-util.js";
|
|
5
5
|
import { getSessionCache as a } from "agilebuilder-ui/src/utils/auth";
|
|
6
6
|
import { functions as l } from "./api/page-expose-util.js";
|
|
7
7
|
import { isWorkflowPage as u, deepCopy as p } from "./common-util.js";
|
|
@@ -24,8 +24,8 @@ function m(t2) {
|
|
|
24
24
|
}
|
|
25
25
|
function f(e2, t2) {
|
|
26
26
|
return new Promise((n2, i2) => {
|
|
27
|
-
e2 ? b().then((
|
|
28
|
-
|
|
27
|
+
e2 ? b().then((o2) => {
|
|
28
|
+
o2 && (e2.systemParam = h(o2)), e2.tableRuntimes && Object.keys(e2.tableRuntimes).length > 0 ? x(e2, t2, e2.systemVersion).then((t3) => {
|
|
29
29
|
e2.contextParam = h(t3.contextParam), e2.branchFieldAuth = t3.branchFieldAuth, e2.isWorkflowEntity = t3.isWorkflowEntity, e2.dataTypeMaps = t3.dataTypeMaps, e2.superGridItems = t3.superGrids, n2(e2);
|
|
30
30
|
}).catch((e3) => {
|
|
31
31
|
i2(e3);
|
|
@@ -138,27 +138,27 @@ function C(e2, t2) {
|
|
|
138
138
|
function k(e2, t2) {
|
|
139
139
|
let n2, i2 = t2;
|
|
140
140
|
t2 || (n2 = e2.props.base ? e2.props.base : {}, i2 = n2.prop);
|
|
141
|
-
let
|
|
142
|
-
return t2 && !t2.startsWith("${") ?
|
|
141
|
+
let o2 = null;
|
|
142
|
+
return t2 && !t2.startsWith("${") ? o2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), o2 = i2.split("."), e2 && o2.length < 2 && (o2 = [e2.uuid])) : e2 && (o2 = ["page", e2.uuid]) : o2 = ["page", e2.uuid], o2 || e2 ? o2 : ["temp"];
|
|
143
143
|
}
|
|
144
144
|
function A(e2, t2, n2) {
|
|
145
145
|
var _a, _b;
|
|
146
|
-
const i2 = k(t2, n2),
|
|
147
|
-
if (null ==
|
|
146
|
+
const i2 = k(t2, n2), r2 = e2.entity;
|
|
147
|
+
if (null == r2.data.ID && null == r2.data.id) {
|
|
148
148
|
let n3, s2, a2 = false;
|
|
149
149
|
t2 && (n3 = t2.props.base ? t2.props.base : {}, s2 = t2.name, a2 = n3.multiple);
|
|
150
|
-
const l2 =
|
|
150
|
+
const l2 = o(r2, i2);
|
|
151
151
|
if (null == l2) {
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
const t3 = I(e2,
|
|
155
|
-
if (M(t3)) j(
|
|
152
|
+
const o2 = n3 ? n3.defaultValue : null, l3 = Boolean((_a = t2 == null ? void 0 : t2.runtime) == null ? void 0 : _a.arrayValue);
|
|
153
|
+
if (o2) try {
|
|
154
|
+
const t3 = I(e2, o2, s2, a2);
|
|
155
|
+
if (M(t3)) j(r2, i2, t3, l3);
|
|
156
156
|
else if (((_b = n3.moreDefaultValue) == null ? void 0 : _b.length) > 0) {
|
|
157
157
|
const t4 = n3.moreDefaultValue;
|
|
158
158
|
for (let n4 = 0; n4 < t4.length; n4++) {
|
|
159
|
-
const
|
|
160
|
-
if (M(
|
|
161
|
-
j(
|
|
159
|
+
const o3 = I(e2, t4[n4], s2, a2);
|
|
160
|
+
if (M(o3)) {
|
|
161
|
+
j(r2, i2, o3, l3);
|
|
162
162
|
break;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -177,31 +177,30 @@ function j(e2, t2, n2, i2) {
|
|
|
177
177
|
!Array.isArray(n2) || i2 ? s(e2, t2, n2) : s(e2, t2, n2.join(","));
|
|
178
178
|
}
|
|
179
179
|
function I(e2, t2, n2, i2) {
|
|
180
|
-
let
|
|
181
|
-
if (t2 && (
|
|
180
|
+
let o2;
|
|
181
|
+
if (t2 && (o2 = r(e2, t2), null != o2 && null != o2 && n2)) {
|
|
182
182
|
let e3 = false;
|
|
183
|
-
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (
|
|
183
|
+
"checkbox" == n2 ? e3 = true : "select" == n2 && (e3 = i2), e3 && (o2 = (o2 + "").split(","));
|
|
184
184
|
}
|
|
185
|
-
return
|
|
185
|
+
return o2;
|
|
186
186
|
}
|
|
187
187
|
function T(e2, t2) {
|
|
188
188
|
var _a, _b;
|
|
189
189
|
if (false === ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.isPermission)) return "true";
|
|
190
190
|
const n2 = [];
|
|
191
|
-
if (e2.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
const o2 = r2[e3], s2 = e3 < i2.length ? i2[e3] : "";
|
|
191
|
+
if (e2.functionCodes && e2.functionCodes.length > 0) {
|
|
192
|
+
const i2 = e2.sourceTypes ? e2.sourceTypes : [], o2 = e2.functionCodes;
|
|
193
|
+
for (let e3 = 0; e3 < o2.length; e3++) {
|
|
194
|
+
const r2 = o2[e3], s2 = e3 < i2.length ? i2[e3] : "";
|
|
196
195
|
let a2 = "";
|
|
197
|
-
if ("service" == s2) a2 =
|
|
198
|
-
else if ("standard" === s2) a2 = t2.code + "." +
|
|
196
|
+
if ("service" == s2) a2 = r2;
|
|
197
|
+
else if ("standard" === s2) a2 = t2.code + "." + r2;
|
|
199
198
|
else {
|
|
200
|
-
a2 = "custom" === O(
|
|
199
|
+
a2 = "custom" === O(r2, t2).type ? r2 : t2.code + "." + r2;
|
|
201
200
|
}
|
|
202
201
|
n2.includes(a2) || n2.push(a2);
|
|
203
202
|
}
|
|
204
|
-
}
|
|
203
|
+
} else if (e2.autoPermissions) for (const i2 of e2.autoPermissions) n2.push(t2.code + "." + i2.simpleCode);
|
|
205
204
|
return n2.join(",");
|
|
206
205
|
}
|
|
207
206
|
function O(e2, t2) {
|
|
@@ -211,26 +210,26 @@ function O(e2, t2) {
|
|
|
211
210
|
}
|
|
212
211
|
return null;
|
|
213
212
|
}
|
|
214
|
-
function x(n2, i2,
|
|
215
|
-
const
|
|
213
|
+
function x(n2, i2, o2) {
|
|
214
|
+
const r2 = n2.tableRuntimes, s2 = t(i2);
|
|
216
215
|
let a2;
|
|
217
216
|
const l2 = n2.code;
|
|
218
|
-
return s2 && Object.keys(s2) > 0 && (a2 = JSON.stringify(s2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes:
|
|
217
|
+
return s2 && Object.keys(s2) > 0 && (a2 = JSON.stringify(s2)), e.post(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/super-grids", { tableRuntimes: r2, additionalParamMapJson: a2, pageCode: l2, publishVersion: o2, pageType: n2.pageType });
|
|
219
218
|
}
|
|
220
219
|
const F = ["button-detail", "print-label"];
|
|
221
220
|
function R(e2, t2, n2) {
|
|
222
221
|
var _a, _b;
|
|
223
|
-
const
|
|
222
|
+
const o2 = t2.props && t2.props.base ? t2.props.base.prop : null, r2 = u(e2);
|
|
224
223
|
let s2 = false;
|
|
225
|
-
if (
|
|
224
|
+
if (r2 && F.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
226
225
|
const n3 = e2.fieldPermissionMap.get("all_fields");
|
|
227
226
|
false === (n3 == null ? void 0 : n3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", s2 = true);
|
|
228
227
|
}
|
|
229
|
-
if (
|
|
230
|
-
const a2 = i(
|
|
228
|
+
if (o2) {
|
|
229
|
+
const a2 = i(o2);
|
|
231
230
|
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[a2] || (e2.rules[a2] = []), t2.props.rules.forEach((e3) => {
|
|
232
231
|
d(e3), !n2 && e3 && e3.required && (e3.required = false);
|
|
233
|
-
}), e2.rules[a2] = t2.props.rules),
|
|
232
|
+
}), e2.rules[a2] = t2.props.rules), r2 && !s2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
234
233
|
const i2 = e2.fieldPermissionMap.get(a2);
|
|
235
234
|
if (!n2 && e2.workflowRules && (e2.workflowRules[a2] || e2.workflowRules.rules && e2.workflowRules.rules[a2])) {
|
|
236
235
|
let t3 = e2.workflowRules[a2];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./card-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const t = e(r, [["__scopeId", "data-v-
|
|
4
|
+
const t = e(r, [["__scopeId", "data-v-36882ef7"]]);
|
|
5
5
|
export {
|
|
6
6
|
t as default
|
|
7
7
|
};
|