super-page-runtime 2.3.42 → 2.3.43-sit2
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 +136 -136
- package/dist/es/components/runtime/utils/events/event-util.js +122 -122
- package/dist/es/components/runtime/utils/events/print-label.js +33 -34
- package/dist/es/components/runtime/utils/events/standard-event.js +22 -22
- package/dist/es/components/runtime/utils/events/validator-util.js +204 -164
- package/dist/es/components/runtime/utils/page-init-util.js +38 -41
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.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/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +95 -100
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +2 -3
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- 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 +24 -25
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- 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/container/fixed/YxAffix.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +9 -11
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +52 -52
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +6 -7
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +5 -6
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +47 -48
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +4 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +7 -9
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -9
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +10 -13
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.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.vue2.js +3 -4
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +34 -15
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
3
|
import { getComponentRefByCode as s, getComponentRef as n, getAllComponentRefs as r } from "../global-refs.js";
|
|
4
|
-
import { getI18n as
|
|
5
|
-
import { getAdditionalParamMap as
|
|
4
|
+
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
|
+
import { getAdditionalParamMap as o } from "./standard-event.js";
|
|
6
6
|
import { isPromise as l } from "agilebuilder-ui/src/utils/common-util";
|
|
7
7
|
import { parseSubTablePermissionCondition as a } from "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
8
|
-
import { isWorkflowPage as u, getListCode as
|
|
9
|
-
import { scrollIntoComponentWithCode as
|
|
8
|
+
import { isWorkflowPage as u, getListCode as f } from "../common-util.js";
|
|
9
|
+
import { scrollIntoComponentWithCode as c, scrollIntoComponentWithUuid as d } from "../anchor-util.js";
|
|
10
10
|
const m = ["downloadTemplate", "back", "exportForm", "exportPDF", "lineEditCreate", "workflowSave"];
|
|
11
11
|
function p(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
12
12
|
if ("function" == typeof structuredClone) try {
|
|
@@ -45,34 +45,34 @@ function g(e2, t2, s2) {
|
|
|
45
45
|
const n2 = {};
|
|
46
46
|
t2 || (t2 = {});
|
|
47
47
|
let r2 = 0;
|
|
48
|
-
const
|
|
49
|
-
return
|
|
50
|
-
let
|
|
51
|
-
if (r2 ===
|
|
48
|
+
const i2 = e2.split(".");
|
|
49
|
+
return i2.forEach((e3) => {
|
|
50
|
+
let o2;
|
|
51
|
+
if (r2 === i2.length - 1) o2 = function(e4, t3, s3) {
|
|
52
52
|
let n3;
|
|
53
53
|
for (let r3 = 0; r3 < t3.length; r3++) if (n3 = 0 === r3 ? e4[t3[r3]] : n3.fields[t3[r3]], r3 !== t3.length - 1) {
|
|
54
54
|
if (t3[r3 + 1] === s3) break;
|
|
55
55
|
}
|
|
56
56
|
return n3;
|
|
57
|
-
}(n2,
|
|
57
|
+
}(n2, i2, e3), o2.fields[e3] = s2;
|
|
58
58
|
else {
|
|
59
59
|
let s3;
|
|
60
|
-
0 === r2 ?
|
|
60
|
+
0 === r2 ? o2 = t2 : (s3 = function(e4, t3, s4) {
|
|
61
61
|
let n3;
|
|
62
62
|
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
63
|
-
const
|
|
64
|
-
if (n3 = 0 === r3 ? e4[
|
|
63
|
+
const i3 = t3[r3];
|
|
64
|
+
if (n3 = 0 === r3 ? e4[i3] : n3.fields[t3[r3]], i3 === s4) break;
|
|
65
65
|
}
|
|
66
66
|
return n3;
|
|
67
|
-
}(n2,
|
|
67
|
+
}(n2, i2, i2[r2 - 1]), o2 = s3.fields), o2[e3] || (o2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? n2[e3] = o2[e3] : s3.fields[e3] = o2[e3];
|
|
68
68
|
}
|
|
69
69
|
r2++;
|
|
70
70
|
}), n2;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
72
|
+
function h(e2, t2, s2, n2, r2, i2) {
|
|
73
|
+
return y(e2, t2, s2, n2, true, r2, i2);
|
|
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,109 +80,106 @@ function h(e2) {
|
|
|
80
80
|
}
|
|
81
81
|
}), e2;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
83
|
+
function y(n2, r2, o2, l2, a2, u2, f2) {
|
|
84
|
+
var _a;
|
|
85
|
+
let d2 = b(r2);
|
|
85
86
|
if (r2 && null !== r2 || !o2 || (d2 = {}), !d2 || 0 === Object.keys(d2).length) return n2.validateErrorField = "", true;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
87
|
+
const m2 = ((_a = f2.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, o2, l2, false, u2, f2);
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
true !== p2 && t({ showClose: true, message: i().t("superPageRuntimeMessage.pleaseInputRequiredInfo"), type: "warning" });
|
|
101
|
+
} else {
|
|
102
|
+
let i2;
|
|
103
|
+
if (e2) {
|
|
104
|
+
p2 = e2[0].message, i2 = e2[0].field, t({ message: p2, showClose: true, type: "warning", duration: 3e3 });
|
|
105
|
+
const n3 = s(f2, i2);
|
|
106
|
+
if (n3 && n3.addRequiredClass) {
|
|
107
|
+
n3.addRequiredClass();
|
|
108
|
+
try {
|
|
109
|
+
c(f2, i2);
|
|
110
|
+
} catch (e3) {
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
} else p2 = true;
|
|
114
|
+
if (i2 && true === a2) {
|
|
115
|
+
if (/[A-Z]+/.test(i2) && void 0 !== n2[i2.toLowerCase()]) {
|
|
116
|
+
const e3 = JSON.parse(JSON.stringify(n2));
|
|
117
|
+
e3[i2.toUpperCase()] = n2[i2.toLowerCase()], delete e3[i2.toLowerCase()], p2 = y(e3, r2, o2, l2, false, u2, f2);
|
|
118
|
+
}
|
|
104
119
|
}
|
|
105
120
|
}
|
|
106
|
-
}),
|
|
121
|
+
}), p2;
|
|
107
122
|
}
|
|
108
|
-
function
|
|
123
|
+
function w(e2, n2, r2, l2) {
|
|
109
124
|
if (r2) {
|
|
110
|
-
if (
|
|
125
|
+
if (J(r2.isStandard, r2.event)) return new Promise((e3, t2) => {
|
|
111
126
|
e3(true);
|
|
112
127
|
});
|
|
113
128
|
}
|
|
114
|
-
const
|
|
115
|
-
return null !=
|
|
129
|
+
const f2 = e2.entity.data, c2 = { ...e2.entity.page, ...f2 }, d2 = e2.rules, m2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
130
|
+
return null != m2 && (l2 = m2), null == l2 && (l2 = false), function(e3, n3, r3, l3) {
|
|
116
131
|
if (e3) {
|
|
117
132
|
return u(l3) ? function(e4, n4, r4) {
|
|
118
133
|
return new Promise((l4, u2) => {
|
|
119
|
-
|
|
120
|
-
|
|
134
|
+
var _a;
|
|
135
|
+
const f3 = o(n4), c3 = n4.entity.context, d3 = n4.entity.task, m3 = true, g2 = n4.subTablePageInfo, h2 = ((_a = n4.props) == null ? void 0 : _a.highlightAllRequiredField) || false;
|
|
136
|
+
x(e4, n4, r4).then((r5) => {
|
|
121
137
|
if (r5) {
|
|
122
|
-
let
|
|
123
|
-
const
|
|
124
|
-
|
|
138
|
+
let o2 = r5;
|
|
139
|
+
const u3 = n4.workflowRules;
|
|
140
|
+
let b2 = null, y2 = null;
|
|
141
|
+
if (u3) {
|
|
125
142
|
if (!function(e5, n5) {
|
|
126
|
-
var
|
|
143
|
+
var _a2, _b, _c, _d;
|
|
127
144
|
if (!e5.actionPermissions) return true;
|
|
128
145
|
const r7 = Object.keys(e5.actionPermissions);
|
|
129
|
-
for (let
|
|
130
|
-
const l5 = r7[
|
|
146
|
+
for (let o3 = 0; o3 < r7.length; o3++) {
|
|
147
|
+
const l5 = r7[o3], u4 = e5.actionPermissions[l5];
|
|
131
148
|
if (u4 && u4.notEmpty) {
|
|
132
|
-
if ((
|
|
149
|
+
if ((_a2 = e5.hiddenNotValidatorCodes) == null ? void 0 : _a2.has(l5)) continue;
|
|
133
150
|
let r8 = false;
|
|
134
151
|
if (n5[l5] ? Array.isArray(n5[l5]) && 0 === n5[l5].length && (r8 = true) : r8 = true, r8) {
|
|
135
152
|
const r9 = s(e5, l5);
|
|
136
153
|
if (!r9) return true;
|
|
137
|
-
const
|
|
154
|
+
const o4 = r9.getConfigure();
|
|
138
155
|
if ((_b = u4.notEmptyCondition) == null ? void 0 : _b.parentCondition) {
|
|
139
156
|
if (false === a(u4.notEmptyCondition.parentCondition.replaceAll("${field[", "${parent["), e5.dataTypeMaps, n5, {}, (_c = e5.entity) == null ? void 0 : _c.request, (_d = e5.entity) == null ? void 0 : _d.task, e5.contextParam)) return true;
|
|
140
157
|
}
|
|
141
|
-
return t({ showClose: true, message:
|
|
158
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: o4.title ? o4.title : l5 }), type: "warning" }), false;
|
|
142
159
|
}
|
|
143
160
|
}
|
|
144
161
|
}
|
|
145
162
|
return true;
|
|
146
163
|
}(n4, e4)) return void l4(false);
|
|
147
|
-
const r6 = true
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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);
|
|
178
|
-
} else u2(new Error(o().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
164
|
+
const r6 = true;
|
|
165
|
+
b2 = function(e5, t2) {
|
|
166
|
+
const s2 = p(e5);
|
|
167
|
+
t2 && t2.size > 0 && t2.forEach((e6) => {
|
|
168
|
+
delete s2[e6], s2.subRules && delete s2.subRules[e6], s2.rules && delete s2.rules[e6];
|
|
169
|
+
});
|
|
170
|
+
s2.subRules && (Object.keys(s2.subRules).length > 0 ? s2.totalSubRules || (s2.totalSubRules = {}) : delete s2.subRules);
|
|
171
|
+
return s2;
|
|
172
|
+
}(u3, n4.hiddenNotValidatorCodes), y2 = window.$vueApp.config.globalProperties.$formValidator(e4, b2, m3, f3, d3, c3, g2, r6, { returnAllErrors: h2 }), o2 = y2 && Array.isArray(y2) ? 0 === y2.length || i().t("superPageRuntimeMessage.pleaseInputRequiredInfo") : !y2 || y2.msg;
|
|
173
|
+
} else o2 = true;
|
|
174
|
+
true !== o2 ? (t({ showClose: true, message: o2 + "", 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));
|
|
175
|
+
} else u2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
179
176
|
}).catch((e5) => {
|
|
180
177
|
u2(e5);
|
|
181
178
|
});
|
|
182
179
|
});
|
|
183
180
|
}(n3, l3, r3) : function(e4, t2, s2) {
|
|
184
181
|
return new Promise((n4, r4) => {
|
|
185
|
-
|
|
182
|
+
x(e4, t2, s2).then((t3) => {
|
|
186
183
|
if (t3) {
|
|
187
184
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
188
185
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
|
|
@@ -196,12 +193,53 @@ function y(e2, n2, r2, l2) {
|
|
|
196
193
|
return new Promise((e4, t2) => {
|
|
197
194
|
e4(true);
|
|
198
195
|
});
|
|
199
|
-
}(l2,
|
|
196
|
+
}(l2, c2, d2, e2);
|
|
197
|
+
}
|
|
198
|
+
function R(e2, t2) {
|
|
199
|
+
if (t2.listCode) {
|
|
200
|
+
const n2 = s(e2, t2.listCode);
|
|
201
|
+
(n2 == null ? void 0 : n2.addRequiredClass) && n2.addRequiredClass(t2.field, t2.rowIndex, t2.pageNum);
|
|
202
|
+
} else if (t2.field) {
|
|
203
|
+
const n2 = s(e2, t2.field);
|
|
204
|
+
(n2 == null ? void 0 : n2.addRequiredClass) && n2.addRequiredClass();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function C(e2, t2) {
|
|
208
|
+
t2.forEach((t3) => R(e2, t3));
|
|
200
209
|
}
|
|
201
|
-
function
|
|
210
|
+
function E(e2, t2) {
|
|
211
|
+
try {
|
|
212
|
+
c(e2, t2.listCode);
|
|
213
|
+
const n2 = s(e2, t2.listCode);
|
|
214
|
+
(n2 == null ? void 0 : n2.scrollToCell) && n2.scrollToCell({ fieldName: t2.field, rowIndex: t2.rowIndex, pageNum: t2.pageNum });
|
|
215
|
+
} catch (e3) {
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function v(e2, t2) {
|
|
219
|
+
try {
|
|
220
|
+
c(e2, t2);
|
|
221
|
+
} catch (e3) {
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function P(e2, t2) {
|
|
225
|
+
let n2 = null, r2 = 1 / 0;
|
|
226
|
+
return t2.forEach((t3) => {
|
|
227
|
+
const i2 = t3.listCode || t3.field;
|
|
228
|
+
if (!i2) return;
|
|
229
|
+
const o2 = s(e2, i2), l2 = (o2 == null ? void 0 : o2.$el) || o2;
|
|
230
|
+
if (l2 == null ? void 0 : l2.getBoundingClientRect) {
|
|
231
|
+
const e3 = l2.getBoundingClientRect();
|
|
232
|
+
e3.top < r2 && (r2 = e3.top, n2 = t3);
|
|
233
|
+
}
|
|
234
|
+
}), n2;
|
|
235
|
+
}
|
|
236
|
+
function k(e2, t2) {
|
|
237
|
+
t2 && (t2.listCode ? E(e2, t2) : t2.field && v(e2, t2.field));
|
|
238
|
+
}
|
|
239
|
+
function O(e2) {
|
|
202
240
|
return new Promise((t2, s2) => {
|
|
203
|
-
const r2 = [],
|
|
204
|
-
|
|
241
|
+
const r2 = [], i2 = e2.customValidatorUuids;
|
|
242
|
+
i2 && i2.forEach((t3) => {
|
|
205
243
|
const s3 = n(e2, t3);
|
|
206
244
|
s3 && s3.validator && r2.push(s3.validator());
|
|
207
245
|
}), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
|
|
@@ -209,61 +247,63 @@ function R(e2) {
|
|
|
209
247
|
}) : t2(true);
|
|
210
248
|
});
|
|
211
249
|
}
|
|
212
|
-
function
|
|
250
|
+
function x(e2, t2, s2) {
|
|
213
251
|
return new Promise((n2, r2) => {
|
|
214
|
-
|
|
252
|
+
var _a;
|
|
253
|
+
const o2 = JSON.parse(JSON.stringify(e2)), a2 = p(s2), u2 = t2.hiddenNotValidatorCodes;
|
|
215
254
|
if (a2 && u2 && u2.size > 0 && u2.forEach((e3) => {
|
|
216
255
|
delete a2[e3];
|
|
217
256
|
}), a2 && 0 !== Object.keys(a2).length) {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
257
|
+
const e3 = h(o2, a2, null, null, true, t2);
|
|
258
|
+
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) {
|
|
259
|
+
if (true === T(t2)) {
|
|
260
|
+
const e4 = q(t2);
|
|
261
|
+
e4 && l(e4) ? e4.then((e5) => {
|
|
262
|
+
e5 ? O(t2).then((e6) => {
|
|
263
|
+
n2(e6);
|
|
224
264
|
}) : n2(false);
|
|
225
|
-
}) :
|
|
226
|
-
n2(
|
|
265
|
+
}) : O(t2).then((e5) => {
|
|
266
|
+
n2(e5);
|
|
227
267
|
});
|
|
228
|
-
} else r2(new Error(
|
|
229
|
-
} else r2(new Error(
|
|
268
|
+
} else r2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
269
|
+
} else r2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
230
270
|
} else {
|
|
231
|
-
if (true ===
|
|
232
|
-
const e3 =
|
|
271
|
+
if (true === T(t2)) {
|
|
272
|
+
const e3 = q(t2);
|
|
233
273
|
e3 && l(e3) ? e3.then((e4) => {
|
|
234
|
-
e4 ?
|
|
274
|
+
e4 ? O(t2).then((e5) => {
|
|
235
275
|
n2(e5);
|
|
236
276
|
}) : n2(false);
|
|
237
|
-
}) :
|
|
277
|
+
}) : O(t2).then((e4) => {
|
|
238
278
|
n2(e4);
|
|
239
279
|
});
|
|
240
|
-
} else r2(new Error(
|
|
280
|
+
} else r2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
241
281
|
}
|
|
242
282
|
});
|
|
243
283
|
}
|
|
244
|
-
function
|
|
284
|
+
function M(e2, t2, s2) {
|
|
245
285
|
if (!t2) return s2;
|
|
246
286
|
s2 || (s2 = {});
|
|
247
|
-
const n2 = u(e2), r2 = Object.keys(t2),
|
|
287
|
+
const n2 = u(e2), r2 = Object.keys(t2), i2 = t2;
|
|
248
288
|
return r2.forEach((e3) => {
|
|
249
289
|
if ("__subRules" === e3) {
|
|
250
|
-
const e4 =
|
|
290
|
+
const e4 = i2.__subRules;
|
|
251
291
|
Object.keys(e4).forEach((t3) => {
|
|
252
292
|
s2.subRules || (s2.subRules = {}), s2.subRules[t3] ? Object.assign(s2.subRules[t3], e4[t3]) : s2.subRules[t3] = e4[t3];
|
|
253
293
|
});
|
|
254
|
-
} else
|
|
255
|
-
}),
|
|
294
|
+
} else _(i2[e3]), n2 ? (s2.rules[e3] = i2[e3], s2[e3] && (s2[e3] = i2[e3])) : s2[e3] = i2[e3];
|
|
295
|
+
}), b(s2);
|
|
256
296
|
}
|
|
257
|
-
function
|
|
297
|
+
function T(e2) {
|
|
258
298
|
var _a;
|
|
259
299
|
if (!e2) return true;
|
|
260
300
|
if (u(e2)) return true;
|
|
261
301
|
const s2 = e2.tableUuids;
|
|
262
302
|
if (!s2) return true;
|
|
263
303
|
for (let r2 = 0; r2 < s2.length; r2++) {
|
|
264
|
-
const
|
|
265
|
-
if (l2 && l2.size > 0 && l2.has(
|
|
266
|
-
const a2 = n(e2,
|
|
304
|
+
const o2 = s2[r2], l2 = e2.hiddenNotValidatorCodes;
|
|
305
|
+
if (l2 && l2.size > 0 && l2.has(o2)) continue;
|
|
306
|
+
const a2 = n(e2, o2);
|
|
267
307
|
if (a2) {
|
|
268
308
|
if (a2.getConfigure()) {
|
|
269
309
|
const s3 = a2.getConfigure();
|
|
@@ -271,16 +311,16 @@ function P(e2) {
|
|
|
271
311
|
const n2 = a2.getTableData();
|
|
272
312
|
if (!n2 || !Array.isArray(n2) || 0 === n2.length) {
|
|
273
313
|
try {
|
|
274
|
-
d(e2,
|
|
314
|
+
d(e2, o2);
|
|
275
315
|
} catch (e3) {
|
|
276
316
|
}
|
|
277
|
-
return t({ showClose: true, message:
|
|
317
|
+
return t({ showClose: true, message: i().t("superPageRuntimeMessage.xxxNotEmpty", { label: s3.title ? s3.title : s3.code }), type: "warning" }), false;
|
|
278
318
|
}
|
|
279
319
|
}
|
|
280
320
|
}
|
|
281
321
|
if (false === a2.validatorSunTableListData()) {
|
|
282
322
|
try {
|
|
283
|
-
d(e2,
|
|
323
|
+
d(e2, o2);
|
|
284
324
|
} catch (e3) {
|
|
285
325
|
}
|
|
286
326
|
return false;
|
|
@@ -289,32 +329,32 @@ function P(e2) {
|
|
|
289
329
|
}
|
|
290
330
|
return true;
|
|
291
331
|
}
|
|
292
|
-
function
|
|
332
|
+
function j(e2) {
|
|
293
333
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
294
334
|
const t2 = {}, s2 = Object.keys(e2);
|
|
295
335
|
for (let n2 = 0; n2 < s2.length; n2++) {
|
|
296
|
-
const r2 = s2[n2],
|
|
297
|
-
|
|
336
|
+
const r2 = s2[n2], i2 = e2[r2];
|
|
337
|
+
N(i2), r2.indexOf(".") > 0 ? g(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
298
338
|
}
|
|
299
339
|
return t2;
|
|
300
340
|
}
|
|
301
|
-
function
|
|
341
|
+
function N(e2, t2) {
|
|
302
342
|
e2.forEach((e3) => {
|
|
303
343
|
e3.message;
|
|
304
|
-
const t3 = e3.label, s2 =
|
|
305
|
-
e3.required && (e3.message =
|
|
344
|
+
const t3 = e3.label, s2 = i().t(t3);
|
|
345
|
+
e3.required && (e3.message = i().t("superPageRuntimeMessage.required", { label: s2 })), e3.myType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), e3.patternType && (e3.message = i().t("superPageRuntimeMessage.formatMismatch", { label: s2 })), void 0 !== e3.max && null !== e3.max && (e3.message = i().t("superPageRuntimeMessage.overMaxLength", { label: s2, value: e3.max })), void 0 !== e3.min && null !== e3.min && (e3.message = i().t("superPageRuntimeMessage.limitMinLength", { label: s2, value: e3.min }));
|
|
306
346
|
});
|
|
307
347
|
}
|
|
308
|
-
function
|
|
309
|
-
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 =
|
|
348
|
+
function A(e2) {
|
|
349
|
+
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = o(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
310
350
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
311
351
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
312
352
|
});
|
|
313
|
-
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2,
|
|
353
|
+
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, i2, r2);
|
|
314
354
|
const a2 = e2.customRules;
|
|
315
|
-
return l2 =
|
|
355
|
+
return l2 = M(e2, a2, l2), l2 && (l2.rules || (l2.rules = {}), l2.subRules || (l2.subRules = {})), l2;
|
|
316
356
|
}
|
|
317
|
-
function
|
|
357
|
+
function q(e2) {
|
|
318
358
|
const t2 = [];
|
|
319
359
|
return e2.customRuleEvents && e2.customRuleEvents.length > 0 && e2.customRuleEvents.forEach((s2) => {
|
|
320
360
|
s2.events.forEach((n2) => {
|
|
@@ -328,11 +368,11 @@ function x(e2) {
|
|
|
328
368
|
}), r2.includes(false) && e3(false), n2.length > 0 ? Promise.all(n2).then((t3) => {
|
|
329
369
|
t3.includes(false) ? e3(false) : e3(true);
|
|
330
370
|
}).catch((t3) => {
|
|
331
|
-
|
|
371
|
+
e3(false);
|
|
332
372
|
}) : e3(true);
|
|
333
373
|
}) : null;
|
|
334
374
|
}
|
|
335
|
-
function
|
|
375
|
+
function S(e2, t2) {
|
|
336
376
|
if (!t2) return;
|
|
337
377
|
const n2 = {};
|
|
338
378
|
if (t2.forEach((e3) => {
|
|
@@ -340,81 +380,81 @@ function T(e2, t2) {
|
|
|
340
380
|
s2 ? n2[t3] = s2 : false === e3.required && (n2[t3] = []);
|
|
341
381
|
}), u(e2)) {
|
|
342
382
|
let t3 = e2.workflowRules ? e2.workflowRules : { rules: {}, subRules: {} };
|
|
343
|
-
t3 =
|
|
383
|
+
t3 = M(e2, n2, t3), e2.workflowRules = t3;
|
|
344
384
|
} else {
|
|
345
385
|
let t3 = e2.rules ? e2.rules : {};
|
|
346
|
-
t3 =
|
|
386
|
+
t3 = M(e2, n2, t3), e2.rules = t3;
|
|
347
387
|
}
|
|
348
388
|
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
349
|
-
r2 && r2.length > 0 &&
|
|
389
|
+
r2 && r2.length > 0 && L(e2, r2[0]), t2.forEach((t3) => {
|
|
350
390
|
if ("_all_fields" !== t3.name) {
|
|
351
391
|
const n3 = s(e2, t3.name);
|
|
352
|
-
|
|
392
|
+
D(e2, n3, t3);
|
|
353
393
|
}
|
|
354
394
|
});
|
|
355
395
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
396
|
+
function F(e2) {
|
|
397
|
+
L(e2, { disabled: true });
|
|
358
398
|
}
|
|
359
|
-
function
|
|
399
|
+
function L(e2, t2) {
|
|
360
400
|
const s2 = r(e2);
|
|
361
401
|
if (s2) for (const n2 in s2) {
|
|
362
402
|
const r2 = s2[n2];
|
|
363
|
-
|
|
403
|
+
D(e2, r2 ? r2.value : r2, t2);
|
|
364
404
|
}
|
|
365
405
|
}
|
|
366
|
-
function
|
|
406
|
+
function V(e2, t2, r2) {
|
|
367
407
|
var _a;
|
|
368
|
-
let
|
|
369
|
-
if (r2 ? (
|
|
370
|
-
const l2 = e2.code, a2 = e2.version, u2 =
|
|
408
|
+
let i2, o2;
|
|
409
|
+
if (r2 ? (i2 = s(e2, r2), o2 = i2 ? i2.getTableUuid() : null) : (o2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = o2 ? n(e2, o2) : null), !i2) return;
|
|
410
|
+
const l2 = e2.code, a2 = e2.version, u2 = f(l2, a2, o2);
|
|
371
411
|
if (e2.workflowRules || (e2.workflowRules = { rules: {}, subRules: {} }), e2.workflowRules.subRules || (e2.workflowRules.subRules = {}), e2.workflowRules.subRules[r2] || (e2.workflowRules.subRules[r2] = {}), ((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[r2]) {
|
|
372
412
|
const s2 = e2.workflowRules.subRules[r2];
|
|
373
413
|
t2.forEach((e3) => {
|
|
374
414
|
s2[e3.name] = e3;
|
|
375
415
|
});
|
|
376
416
|
}
|
|
377
|
-
|
|
417
|
+
i2.dynamicControlTableEdit(e2, t2, u2);
|
|
378
418
|
}
|
|
379
|
-
function
|
|
419
|
+
function D(e2, t2, s2) {
|
|
380
420
|
var _a, _b, _c;
|
|
381
421
|
if (t2) {
|
|
382
422
|
const n2 = t2.getConfigure();
|
|
383
423
|
if (void 0 !== s2.show && (s2.show ? t2.show() : t2.hide()), void 0 !== s2.required && ((_a = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _a.props) && (n2.runtime.props.required = s2.required), void 0 !== s2.readonly && ((_b = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _b.props) && (s2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== s2.disabled && n2 && (((_c = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _c.props) && (s2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled"), "table" === n2.name)) {
|
|
384
424
|
t2.changeOperationAddState(false);
|
|
385
|
-
const s3 = t2 ? t2.getTableUuid() : null, n3 = e2.code, r2 = e2.version,
|
|
386
|
-
t2.dynamicControlTableEdit(e2,
|
|
425
|
+
const s3 = t2 ? t2.getTableUuid() : null, n3 = e2.code, r2 = e2.version, i2 = f(n3, r2, s3), o2 = [{ name: "_all_fields", disabled: true }];
|
|
426
|
+
t2.dynamicControlTableEdit(e2, o2, i2);
|
|
387
427
|
}
|
|
388
428
|
}
|
|
389
429
|
}
|
|
390
|
-
function
|
|
430
|
+
function _(e2) {
|
|
391
431
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
392
|
-
const t2 =
|
|
432
|
+
const t2 = U[e2.type];
|
|
393
433
|
t2 && (e2.validator = t2.validator);
|
|
394
434
|
}
|
|
395
|
-
const
|
|
396
|
-
return true ===
|
|
435
|
+
const U = { boolean: { validator: function(e2, t2, s2) {
|
|
436
|
+
return true === I(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
397
437
|
} }, date: { validator: function(e2, t2, s2) {
|
|
398
|
-
if (true !==
|
|
438
|
+
if (true !== I(e2, t2)) return false;
|
|
399
439
|
const n2 = new Date(t2);
|
|
400
440
|
return !isNaN(n2.getTime());
|
|
401
441
|
} }, number: { validator: function(e2, t2, s2) {
|
|
402
|
-
return true ===
|
|
403
|
-
} } },
|
|
404
|
-
function
|
|
442
|
+
return true === I(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
443
|
+
} } }, I = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
444
|
+
function J(e2, t2) {
|
|
405
445
|
return e2 && m.includes(t2.eventName);
|
|
406
446
|
}
|
|
407
447
|
export {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
448
|
+
F as disabledAllFields,
|
|
449
|
+
V as dynamicControlTableEdit,
|
|
450
|
+
A as getWorkflowRules,
|
|
451
|
+
N as i18nValidatePropRulesMessage,
|
|
452
|
+
j as i18nValidateRulesMessage,
|
|
453
|
+
J as isNotNeedValidateRequired,
|
|
454
|
+
M as packageCustomRules,
|
|
455
|
+
_ as packageCustomValidator,
|
|
416
456
|
g as setObjectPropRule,
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
457
|
+
S as updateFormItemEditState,
|
|
458
|
+
w as validateDataModelFunc,
|
|
459
|
+
h as validator
|
|
420
460
|
};
|