super-page-runtime 2.3.39-sit1 → 2.3.39
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 +131 -131
- package/dist/es/components/runtime/utils/events/event-util.js +140 -142
- package/dist/es/components/runtime/utils/events/print-label.js +34 -33
- package/dist/es/components/runtime/utils/events/standard-event.js +438 -438
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +8 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +141 -128
- package/dist/es/components/runtime/utils/page-init-util.js +28 -26
- 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 +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/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 +100 -95
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
- 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 +11 -9
- 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.vue2.js +3 -3
- 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.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
- 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 +11 -9
- 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/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 +33 -33
- 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 +7 -6
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +6 -5
- 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 +43 -42
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +7 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +6 -4
- 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 +5 -4
- 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 -8
- 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 +1 -0
- package/dist/es/components/runtime/views/super-page.vue2.js +13 -12
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import { PageContext } from '../interfaces/page-design-types';
|
|
|
2
2
|
|
|
3
3
|
export declare function setObjectPropRule(prop: any, rules: any, leafRule: any): {};
|
|
4
4
|
export declare function validator(entity: any, rules: any, columns: any, rowIndex: any, isSql: any, pageContext: any): any;
|
|
5
|
-
export declare function validateDataModelFunc(pageContext: any, configureObj: any, isEnableRequired: any): Promise<unknown>;
|
|
5
|
+
export declare function validateDataModelFunc(pageContext: any, configureObj: any, clickEventFunObj: any, isEnableRequired: any): Promise<unknown>;
|
|
6
6
|
/**
|
|
7
7
|
* 封装自定义校验规则
|
|
8
8
|
* @param orgCustomRules 自定义规则
|
|
@@ -22,3 +22,10 @@ export declare function dynamicControlTableEdit(pageContext: PageContext, custom
|
|
|
22
22
|
* @param fieldRule
|
|
23
23
|
*/
|
|
24
24
|
export declare function packageCustomValidator(fieldRule: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* 是否需要必填验证。特殊的标准事件不需要必填验证。
|
|
27
|
+
* @param isStandardEvent
|
|
28
|
+
* @param clickEvent
|
|
29
|
+
* @returns 返回true表示不需要执行必填验证
|
|
30
|
+
*/
|
|
31
|
+
export declare function isNotNeedValidateRequired(isStandardEvent: boolean, clickEvent: any): boolean;
|
|
@@ -1,13 +1,14 @@
|
|
|
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 o } from "agilebuilder-ui/src/utils/util";
|
|
5
|
+
import { getAdditionalParamMap as i } 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
|
|
10
|
-
|
|
8
|
+
import { isWorkflowPage as u, getListCode as c } from "../common-util.js";
|
|
9
|
+
import { scrollIntoComponentWithCode as f, scrollIntoComponentWithUuid as d } from "../anchor-util.js";
|
|
10
|
+
const m = ["downloadTemplate", "back", "exportForm", "exportPDF", "lineEditCreate", "workflowSave"];
|
|
11
|
+
function p(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
11
12
|
if ("function" == typeof structuredClone) try {
|
|
12
13
|
return structuredClone(e2);
|
|
13
14
|
} catch (e3) {
|
|
@@ -18,7 +19,7 @@ function m(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
|
18
19
|
if (Array.isArray(e2)) {
|
|
19
20
|
const n3 = [];
|
|
20
21
|
return t2.set(s2, n3), e2.forEach((e3, s3) => {
|
|
21
|
-
n3[s3] =
|
|
22
|
+
n3[s3] = p(e3, t2);
|
|
22
23
|
}), n3;
|
|
23
24
|
}
|
|
24
25
|
if (e2 instanceof Date) return new Date(e2.getTime());
|
|
@@ -26,52 +27,52 @@ function m(e2, t2 = /* @__PURE__ */ new WeakMap()) {
|
|
|
26
27
|
if (e2 instanceof Map) {
|
|
27
28
|
const n3 = /* @__PURE__ */ new Map();
|
|
28
29
|
return t2.set(s2, n3), e2.forEach((e3, s3) => {
|
|
29
|
-
n3.set(
|
|
30
|
+
n3.set(p(s3, t2), p(e3, t2));
|
|
30
31
|
}), n3;
|
|
31
32
|
}
|
|
32
33
|
if (e2 instanceof Set) {
|
|
33
34
|
const n3 = /* @__PURE__ */ new Set();
|
|
34
35
|
return t2.set(s2, n3), e2.forEach((e3) => {
|
|
35
|
-
n3.add(
|
|
36
|
+
n3.add(p(e3, t2));
|
|
36
37
|
}), n3;
|
|
37
38
|
}
|
|
38
39
|
const n2 = {};
|
|
39
40
|
return t2.set(s2, n2), Object.keys(e2).forEach((s3) => {
|
|
40
|
-
n2[s3] =
|
|
41
|
+
n2[s3] = p(e2[s3], t2);
|
|
41
42
|
}), n2;
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function g(e2, t2, s2) {
|
|
44
45
|
const n2 = {};
|
|
45
46
|
t2 || (t2 = {});
|
|
46
47
|
let r2 = 0;
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
-
let
|
|
50
|
-
if (r2 ===
|
|
48
|
+
const o2 = e2.split(".");
|
|
49
|
+
return o2.forEach((e3) => {
|
|
50
|
+
let i2;
|
|
51
|
+
if (r2 === o2.length - 1) i2 = function(e4, t3, s3) {
|
|
51
52
|
let n3;
|
|
52
53
|
for (let r3 = 0; r3 < t3.length; r3++) if (n3 = 0 === r3 ? e4[t3[r3]] : n3.fields[t3[r3]], r3 !== t3.length - 1) {
|
|
53
54
|
if (t3[r3 + 1] === s3) break;
|
|
54
55
|
}
|
|
55
56
|
return n3;
|
|
56
|
-
}(n2,
|
|
57
|
+
}(n2, o2, e3), i2.fields[e3] = s2;
|
|
57
58
|
else {
|
|
58
59
|
let s3;
|
|
59
|
-
0 === r2 ?
|
|
60
|
+
0 === r2 ? i2 = t2 : (s3 = function(e4, t3, s4) {
|
|
60
61
|
let n3;
|
|
61
62
|
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
62
|
-
const
|
|
63
|
-
if (n3 = 0 === r3 ? e4[
|
|
63
|
+
const o3 = t3[r3];
|
|
64
|
+
if (n3 = 0 === r3 ? e4[o3] : n3.fields[t3[r3]], o3 === s4) break;
|
|
64
65
|
}
|
|
65
66
|
return n3;
|
|
66
|
-
}(n2,
|
|
67
|
+
}(n2, o2, o2[r2 - 1]), i2 = s3.fields), i2[e3] || (i2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? n2[e3] = i2[e3] : s3.fields[e3] = i2[e3];
|
|
67
68
|
}
|
|
68
69
|
r2++;
|
|
69
70
|
}), n2;
|
|
70
71
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
72
|
+
function b(e2, t2, s2, n2, r2, o2) {
|
|
73
|
+
return w(e2, t2, s2, n2, true, r2, o2);
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function h(e2) {
|
|
75
76
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
76
77
|
if (t2.indexOf(".") >= 0) {
|
|
77
78
|
let s2 = [];
|
|
@@ -79,101 +80,109 @@ function b(e2) {
|
|
|
79
80
|
}
|
|
80
81
|
}), e2;
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
let
|
|
84
|
-
if (r2 && null !== r2 || !
|
|
83
|
+
function w(n2, r2, o2, i2, l2, a2, u2) {
|
|
84
|
+
let c2, d2 = h(r2);
|
|
85
|
+
if (r2 && null !== r2 || !o2 || (d2 = {}), !d2 || 0 === Object.keys(d2).length) return n2.validateErrorField = "", true;
|
|
85
86
|
return new e(d2).validate(n2, { first: true }, (e2, d3) => {
|
|
86
87
|
let m2;
|
|
87
88
|
if (e2) {
|
|
88
|
-
|
|
89
|
+
c2 = e2[0].message, m2 = e2[0].field, t({ message: c2, showClose: true, type: "warning", duration: 3e3 });
|
|
89
90
|
const n3 = s(u2, m2);
|
|
90
91
|
if (n3 && n3.addRequiredClass) {
|
|
91
92
|
n3.addRequiredClass();
|
|
92
93
|
try {
|
|
93
|
-
|
|
94
|
+
f(u2, m2);
|
|
94
95
|
} catch (e3) {
|
|
96
|
+
console.error("滚动失败", e3);
|
|
95
97
|
}
|
|
96
98
|
}
|
|
97
|
-
} else
|
|
99
|
+
} else c2 = true;
|
|
98
100
|
if (m2 && true === l2) {
|
|
99
101
|
if (/[A-Z]+/.test(m2) && void 0 !== n2[m2.toLowerCase()]) {
|
|
100
102
|
const e3 = JSON.parse(JSON.stringify(n2));
|
|
101
|
-
e3[m2.toUpperCase()] = n2[m2.toLowerCase()], delete e3[m2.toLowerCase()],
|
|
103
|
+
e3[m2.toUpperCase()] = n2[m2.toLowerCase()], delete e3[m2.toLowerCase()], c2 = w(e3, r2, o2, i2, false, a2, u2);
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
|
-
}),
|
|
106
|
+
}), c2;
|
|
105
107
|
}
|
|
106
|
-
function y(e2, n2, r2) {
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
function y(e2, n2, r2, l2) {
|
|
109
|
+
if (r2) {
|
|
110
|
+
if (V(r2.isStandard, r2.event)) return new Promise((e3, t2) => {
|
|
111
|
+
e3(true);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
const c2 = e2.entity.data, d2 = { ...e2.entity.page, ...c2 }, m2 = e2.rules, g2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
115
|
+
return null != g2 && (l2 = g2), null == l2 && (l2 = false), function(e3, n3, r3, l3) {
|
|
109
116
|
if (e3) {
|
|
110
117
|
return u(l3) ? function(e4, n4, r4) {
|
|
111
118
|
return new Promise((l4, u2) => {
|
|
112
|
-
const
|
|
113
|
-
|
|
119
|
+
const c3 = i(n4), d3 = n4.entity.context, m3 = n4.entity.task, g3 = true, b2 = n4.subTablePageInfo;
|
|
120
|
+
E(e4, n4, r4).then((r5) => {
|
|
114
121
|
if (r5) {
|
|
115
|
-
let
|
|
122
|
+
let i2, u3, h2, w2, y2 = r5;
|
|
116
123
|
const R2 = n4.workflowRules;
|
|
117
124
|
if (R2) {
|
|
118
125
|
if (!function(e5, n5) {
|
|
119
126
|
var _a, _b, _c, _d;
|
|
120
127
|
if (!e5.actionPermissions) return true;
|
|
121
128
|
const r7 = Object.keys(e5.actionPermissions);
|
|
122
|
-
for (let
|
|
123
|
-
const l5 = r7[
|
|
129
|
+
for (let i3 = 0; i3 < r7.length; i3++) {
|
|
130
|
+
const l5 = r7[i3], u4 = e5.actionPermissions[l5];
|
|
124
131
|
if (u4 && u4.notEmpty) {
|
|
125
132
|
if ((_a = e5.hiddenNotValidatorCodes) == null ? void 0 : _a.has(l5)) continue;
|
|
126
133
|
let r8 = false;
|
|
127
134
|
if (n5[l5] ? Array.isArray(n5[l5]) && 0 === n5[l5].length && (r8 = true) : r8 = true, r8) {
|
|
128
135
|
const r9 = s(e5, l5);
|
|
129
136
|
if (!r9) return true;
|
|
130
|
-
const
|
|
137
|
+
const i4 = r9.getConfigure();
|
|
131
138
|
if ((_b = u4.notEmptyCondition) == null ? void 0 : _b.parentCondition) {
|
|
132
139
|
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;
|
|
133
140
|
}
|
|
134
|
-
return t({ showClose: true, message:
|
|
141
|
+
return t({ showClose: true, message: o().t("superPageRuntimeMessage.xxxNotEmpty", { label: i4.title ? i4.title : l5 }), type: "warning" }), false;
|
|
135
142
|
}
|
|
136
143
|
}
|
|
137
144
|
}
|
|
138
145
|
return true;
|
|
139
146
|
}(n4, e4)) return void l4(false);
|
|
140
|
-
const r6 = true,
|
|
147
|
+
const r6 = true, f2 = p(R2), E2 = n4.hiddenNotValidatorCodes;
|
|
141
148
|
E2 && E2.size > 0 && E2.forEach((e5) => {
|
|
142
|
-
|
|
143
|
-
}),
|
|
144
|
-
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4,
|
|
145
|
-
|
|
146
|
-
} else
|
|
147
|
-
if (true !==
|
|
148
|
-
if (t({ showClose: true, message:
|
|
149
|
+
f2.subRules && delete f2.subRules[e5], f2.rules && delete f2.rules[e5];
|
|
150
|
+
}), f2.subRules && (Object.keys(f2.subRules).length > 0 ? f2.totalSubRules || (f2.totalSubRules = {}) : delete f2.subRules);
|
|
151
|
+
const v2 = window.$vueApp.config.globalProperties.$formValidator(e4, f2, g3, c3, m3, d3, b2, r6);
|
|
152
|
+
y2 = v2.msg, i2 = v2.field, u3 = v2.listCode, h2 = v2.rowIndex, w2 = v2.pageNum;
|
|
153
|
+
} else y2 = true;
|
|
154
|
+
if (true !== y2) {
|
|
155
|
+
if (t({ showClose: true, message: y2 + "", type: "warning" }), u3) {
|
|
149
156
|
const e5 = s(n4, u3);
|
|
150
157
|
if (e5 && e5.addRequiredClass) {
|
|
151
|
-
e5.addRequiredClass(
|
|
158
|
+
e5.addRequiredClass(i2, h2, w2);
|
|
152
159
|
try {
|
|
153
|
-
|
|
160
|
+
f(n4, u3), e5.scrollToCell({ fieldName: i2, rowIndex: h2, pageNum: w2 });
|
|
154
161
|
} catch (e6) {
|
|
162
|
+
console.error("滚动到验证失败的子表字段失败,可能是表格组件版本较低没有scrollToCell方法", e6);
|
|
155
163
|
}
|
|
156
164
|
}
|
|
157
165
|
} else {
|
|
158
|
-
const e5 = s(n4,
|
|
166
|
+
const e5 = s(n4, i2);
|
|
159
167
|
if (e5 && e5.addRequiredClass) {
|
|
160
168
|
e5.addRequiredClass();
|
|
161
169
|
try {
|
|
162
|
-
|
|
170
|
+
f(n4, i2);
|
|
163
171
|
} catch (e6) {
|
|
172
|
+
console.error("滚动失败", e6);
|
|
164
173
|
}
|
|
165
174
|
}
|
|
166
175
|
}
|
|
167
176
|
l4(false);
|
|
168
177
|
} else Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4);
|
|
169
|
-
} else u2(new Error(
|
|
178
|
+
} else u2(new Error(o().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
170
179
|
}).catch((e5) => {
|
|
171
180
|
u2(e5);
|
|
172
181
|
});
|
|
173
182
|
});
|
|
174
183
|
}(n3, l3, r3) : function(e4, t2, s2) {
|
|
175
184
|
return new Promise((n4, r4) => {
|
|
176
|
-
|
|
185
|
+
E(e4, t2, s2).then((t3) => {
|
|
177
186
|
if (t3) {
|
|
178
187
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
179
188
|
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, n4(t4);
|
|
@@ -187,12 +196,12 @@ function y(e2, n2, r2) {
|
|
|
187
196
|
return new Promise((e4, t2) => {
|
|
188
197
|
e4(true);
|
|
189
198
|
});
|
|
190
|
-
}(
|
|
199
|
+
}(l2, d2, m2, e2);
|
|
191
200
|
}
|
|
192
|
-
function
|
|
201
|
+
function R(e2) {
|
|
193
202
|
return new Promise((t2, s2) => {
|
|
194
|
-
const r2 = [],
|
|
195
|
-
|
|
203
|
+
const r2 = [], o2 = e2.customValidatorUuids;
|
|
204
|
+
o2 && o2.forEach((t3) => {
|
|
196
205
|
const s3 = n(e2, t3);
|
|
197
206
|
s3 && s3.validator && r2.push(s3.validator());
|
|
198
207
|
}), r2 && r2.length > 0 ? Promise.all(r2).then((e3) => {
|
|
@@ -200,61 +209,61 @@ function w(e2) {
|
|
|
200
209
|
}) : t2(true);
|
|
201
210
|
});
|
|
202
211
|
}
|
|
203
|
-
function
|
|
212
|
+
function E(e2, t2, s2) {
|
|
204
213
|
return new Promise((n2, r2) => {
|
|
205
|
-
const
|
|
214
|
+
const i2 = JSON.parse(JSON.stringify(e2)), a2 = p(s2), u2 = t2.hiddenNotValidatorCodes;
|
|
206
215
|
if (a2 && u2 && u2.size > 0 && u2.forEach((e3) => {
|
|
207
216
|
delete a2[e3];
|
|
208
217
|
}), a2 && 0 !== Object.keys(a2).length) {
|
|
209
|
-
if (true ===
|
|
210
|
-
if (true ===
|
|
211
|
-
const e3 =
|
|
218
|
+
if (true === b(i2, a2, null, null, true, t2)) {
|
|
219
|
+
if (true === P(t2)) {
|
|
220
|
+
const e3 = x(t2);
|
|
212
221
|
e3 && l(e3) ? e3.then((e4) => {
|
|
213
|
-
e4 ?
|
|
222
|
+
e4 ? R(t2).then((e5) => {
|
|
214
223
|
n2(e5);
|
|
215
224
|
}) : n2(false);
|
|
216
|
-
}) :
|
|
225
|
+
}) : R(t2).then((e4) => {
|
|
217
226
|
n2(e4);
|
|
218
227
|
});
|
|
219
|
-
} else r2(new Error(
|
|
220
|
-
} else r2(new Error(
|
|
228
|
+
} else r2(new Error(o().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
229
|
+
} else r2(new Error(o().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
221
230
|
} else {
|
|
222
|
-
if (true ===
|
|
223
|
-
const e3 =
|
|
231
|
+
if (true === P(t2)) {
|
|
232
|
+
const e3 = x(t2);
|
|
224
233
|
e3 && l(e3) ? e3.then((e4) => {
|
|
225
|
-
e4 ?
|
|
234
|
+
e4 ? R(t2).then((e5) => {
|
|
226
235
|
n2(e5);
|
|
227
236
|
}) : n2(false);
|
|
228
|
-
}) :
|
|
237
|
+
}) : R(t2).then((e4) => {
|
|
229
238
|
n2(e4);
|
|
230
239
|
});
|
|
231
|
-
} else r2(new Error(
|
|
240
|
+
} else r2(new Error(o().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
232
241
|
}
|
|
233
242
|
});
|
|
234
243
|
}
|
|
235
|
-
function
|
|
244
|
+
function v(e2, t2, s2) {
|
|
236
245
|
if (!t2) return s2;
|
|
237
246
|
s2 || (s2 = {});
|
|
238
|
-
const n2 = u(e2), r2 = Object.keys(t2),
|
|
247
|
+
const n2 = u(e2), r2 = Object.keys(t2), o2 = t2;
|
|
239
248
|
return r2.forEach((e3) => {
|
|
240
249
|
if ("__subRules" === e3) {
|
|
241
|
-
const e4 =
|
|
250
|
+
const e4 = o2.__subRules;
|
|
242
251
|
Object.keys(e4).forEach((t3) => {
|
|
243
252
|
s2.subRules || (s2.subRules = {}), s2.subRules[t3] ? Object.assign(s2.subRules[t3], e4[t3]) : s2.subRules[t3] = e4[t3];
|
|
244
253
|
});
|
|
245
|
-
} else
|
|
246
|
-
}),
|
|
254
|
+
} else S(o2[e3]), n2 ? (s2.rules[e3] = o2[e3], s2[e3] && (s2[e3] = o2[e3])) : s2[e3] = o2[e3];
|
|
255
|
+
}), h(s2);
|
|
247
256
|
}
|
|
248
|
-
function
|
|
257
|
+
function P(e2) {
|
|
249
258
|
var _a;
|
|
250
259
|
if (!e2) return true;
|
|
251
260
|
if (u(e2)) return true;
|
|
252
261
|
const s2 = e2.tableUuids;
|
|
253
262
|
if (!s2) return true;
|
|
254
263
|
for (let r2 = 0; r2 < s2.length; r2++) {
|
|
255
|
-
const
|
|
256
|
-
if (l2 && l2.size > 0 && l2.has(
|
|
257
|
-
const a2 = n(e2,
|
|
264
|
+
const i2 = s2[r2], l2 = e2.hiddenNotValidatorCodes;
|
|
265
|
+
if (l2 && l2.size > 0 && l2.has(i2)) continue;
|
|
266
|
+
const a2 = n(e2, i2);
|
|
258
267
|
if (a2) {
|
|
259
268
|
if (a2.getConfigure()) {
|
|
260
269
|
const s3 = a2.getConfigure();
|
|
@@ -262,16 +271,16 @@ function v(e2) {
|
|
|
262
271
|
const n2 = a2.getTableData();
|
|
263
272
|
if (!n2 || !Array.isArray(n2) || 0 === n2.length) {
|
|
264
273
|
try {
|
|
265
|
-
d(e2,
|
|
274
|
+
d(e2, i2);
|
|
266
275
|
} catch (e3) {
|
|
267
276
|
}
|
|
268
|
-
return t({ showClose: true, message:
|
|
277
|
+
return t({ showClose: true, message: o().t("superPageRuntimeMessage.xxxNotEmpty", { label: s3.title ? s3.title : s3.code }), type: "warning" }), false;
|
|
269
278
|
}
|
|
270
279
|
}
|
|
271
280
|
}
|
|
272
|
-
if (
|
|
281
|
+
if (false === a2.validatorSunTableListData()) {
|
|
273
282
|
try {
|
|
274
|
-
d(e2,
|
|
283
|
+
d(e2, i2);
|
|
275
284
|
} catch (e3) {
|
|
276
285
|
}
|
|
277
286
|
return false;
|
|
@@ -280,32 +289,32 @@ function v(e2) {
|
|
|
280
289
|
}
|
|
281
290
|
return true;
|
|
282
291
|
}
|
|
283
|
-
function
|
|
292
|
+
function k(e2) {
|
|
284
293
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
285
294
|
const t2 = {}, s2 = Object.keys(e2);
|
|
286
295
|
for (let n2 = 0; n2 < s2.length; n2++) {
|
|
287
|
-
const r2 = s2[n2],
|
|
288
|
-
|
|
296
|
+
const r2 = s2[n2], o2 = e2[r2];
|
|
297
|
+
C(o2), r2.indexOf(".") > 0 ? g(r2, t2, o2) : o2 && o2.length > 0 && (t2[r2] = [...o2]);
|
|
289
298
|
}
|
|
290
299
|
return t2;
|
|
291
300
|
}
|
|
292
|
-
function
|
|
301
|
+
function C(e2, t2) {
|
|
293
302
|
e2.forEach((e3) => {
|
|
294
303
|
e3.message;
|
|
295
|
-
const t3 = e3.label, s2 =
|
|
296
|
-
e3.required && (e3.message =
|
|
304
|
+
const t3 = e3.label, s2 = o().t(t3);
|
|
305
|
+
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 }));
|
|
297
306
|
});
|
|
298
307
|
}
|
|
299
|
-
function
|
|
300
|
-
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 =
|
|
308
|
+
function O(e2) {
|
|
309
|
+
const t2 = e2.entity.data, s2 = { ...e2.entity.page, ...t2 }, n2 = i(e2), r2 = e2.entity.context, o2 = e2.entity.task;
|
|
301
310
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
302
311
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
303
312
|
});
|
|
304
|
-
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2,
|
|
313
|
+
let l2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, s2, true, n2, o2, r2);
|
|
305
314
|
const a2 = e2.customRules;
|
|
306
|
-
return l2 =
|
|
315
|
+
return l2 = v(e2, a2, l2), l2 && (l2.rules || (l2.rules = {}), l2.subRules || (l2.subRules = {})), l2;
|
|
307
316
|
}
|
|
308
|
-
function
|
|
317
|
+
function x(e2) {
|
|
309
318
|
const t2 = [];
|
|
310
319
|
return e2.customRuleEvents && e2.customRuleEvents.length > 0 && e2.customRuleEvents.forEach((s2) => {
|
|
311
320
|
s2.events.forEach((n2) => {
|
|
@@ -319,11 +328,11 @@ function O(e2) {
|
|
|
319
328
|
}), r2.includes(false) && e3(false), n2.length > 0 ? Promise.all(n2).then((t3) => {
|
|
320
329
|
t3.includes(false) ? e3(false) : e3(true);
|
|
321
330
|
}).catch((t3) => {
|
|
322
|
-
e3(false);
|
|
331
|
+
console.error(t3), e3(false);
|
|
323
332
|
}) : e3(true);
|
|
324
333
|
}) : null;
|
|
325
334
|
}
|
|
326
|
-
function
|
|
335
|
+
function T(e2, t2) {
|
|
327
336
|
if (!t2) return;
|
|
328
337
|
const n2 = {};
|
|
329
338
|
if (t2.forEach((e3) => {
|
|
@@ -331,77 +340,81 @@ function j(e2, t2) {
|
|
|
331
340
|
s2 ? n2[t3] = s2 : false === e3.required && (n2[t3] = []);
|
|
332
341
|
}), u(e2)) {
|
|
333
342
|
let t3 = e2.workflowRules ? e2.workflowRules : { rules: {}, subRules: {} };
|
|
334
|
-
t3 =
|
|
343
|
+
t3 = v(e2, n2, t3), e2.workflowRules = t3;
|
|
335
344
|
} else {
|
|
336
345
|
let t3 = e2.rules ? e2.rules : {};
|
|
337
|
-
t3 =
|
|
346
|
+
t3 = v(e2, n2, t3), e2.rules = t3;
|
|
338
347
|
}
|
|
339
348
|
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
340
349
|
r2 && r2.length > 0 && M(e2, r2[0]), t2.forEach((t3) => {
|
|
341
350
|
if ("_all_fields" !== t3.name) {
|
|
342
351
|
const n3 = s(e2, t3.name);
|
|
343
|
-
|
|
352
|
+
q(e2, n3, t3);
|
|
344
353
|
}
|
|
345
354
|
});
|
|
346
355
|
}
|
|
347
|
-
function
|
|
356
|
+
function j(e2) {
|
|
348
357
|
M(e2, { disabled: true });
|
|
349
358
|
}
|
|
350
359
|
function M(e2, t2) {
|
|
351
360
|
const s2 = r(e2);
|
|
352
361
|
if (s2) for (const n2 in s2) {
|
|
353
362
|
const r2 = s2[n2];
|
|
354
|
-
|
|
363
|
+
q(e2, r2 ? r2.value : r2, t2);
|
|
355
364
|
}
|
|
356
365
|
}
|
|
357
|
-
function
|
|
366
|
+
function N(e2, t2, r2) {
|
|
358
367
|
var _a;
|
|
359
|
-
let
|
|
360
|
-
if (r2 ? (
|
|
361
|
-
const l2 = e2.code, a2 = e2.version, u2 =
|
|
368
|
+
let o2, i2;
|
|
369
|
+
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;
|
|
370
|
+
const l2 = e2.code, a2 = e2.version, u2 = c(l2, a2, i2);
|
|
362
371
|
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]) {
|
|
363
372
|
const s2 = e2.workflowRules.subRules[r2];
|
|
364
373
|
t2.forEach((e3) => {
|
|
365
374
|
s2[e3.name] = e3;
|
|
366
375
|
});
|
|
367
376
|
}
|
|
368
|
-
|
|
377
|
+
o2.dynamicControlTableEdit(e2, t2, u2);
|
|
369
378
|
}
|
|
370
|
-
function
|
|
379
|
+
function q(e2, t2, s2) {
|
|
371
380
|
var _a, _b, _c;
|
|
372
381
|
if (t2) {
|
|
373
382
|
const n2 = t2.getConfigure();
|
|
374
383
|
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)) {
|
|
375
384
|
t2.changeOperationAddState(false);
|
|
376
|
-
const s3 = t2 ? t2.getTableUuid() : null, n3 = e2.code, r2 = e2.version,
|
|
377
|
-
t2.dynamicControlTableEdit(e2,
|
|
385
|
+
const s3 = t2 ? t2.getTableUuid() : null, n3 = e2.code, r2 = e2.version, o2 = c(n3, r2, s3), i2 = [{ name: "_all_fields", disabled: true }];
|
|
386
|
+
t2.dynamicControlTableEdit(e2, i2, o2);
|
|
378
387
|
}
|
|
379
388
|
}
|
|
380
389
|
}
|
|
381
|
-
function
|
|
390
|
+
function S(e2) {
|
|
382
391
|
if (!(e2 == null ? void 0 : e2.type)) return;
|
|
383
|
-
const t2 =
|
|
392
|
+
const t2 = A[e2.type];
|
|
384
393
|
t2 && (e2.validator = t2.validator);
|
|
385
394
|
}
|
|
386
|
-
const
|
|
387
|
-
return true ===
|
|
395
|
+
const A = { boolean: { validator: function(e2, t2, s2) {
|
|
396
|
+
return true === F(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
388
397
|
} }, date: { validator: function(e2, t2, s2) {
|
|
389
|
-
if (true !==
|
|
398
|
+
if (true !== F(e2, t2)) return false;
|
|
390
399
|
const n2 = new Date(t2);
|
|
391
400
|
return !isNaN(n2.getTime());
|
|
392
401
|
} }, number: { validator: function(e2, t2, s2) {
|
|
393
|
-
return true ===
|
|
394
|
-
} } },
|
|
402
|
+
return true === F(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
403
|
+
} } }, F = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
404
|
+
function V(e2, t2) {
|
|
405
|
+
return e2 && m.includes(t2.eventName);
|
|
406
|
+
}
|
|
395
407
|
export {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
408
|
+
j as disabledAllFields,
|
|
409
|
+
N as dynamicControlTableEdit,
|
|
410
|
+
O as getWorkflowRules,
|
|
411
|
+
C as i18nValidatePropRulesMessage,
|
|
412
|
+
k as i18nValidateRulesMessage,
|
|
413
|
+
V as isNotNeedValidateRequired,
|
|
414
|
+
v as packageCustomRules,
|
|
415
|
+
S as packageCustomValidator,
|
|
416
|
+
g as setObjectPropRule,
|
|
417
|
+
T as updateFormItemEditState,
|
|
405
418
|
y as validateDataModelFunc,
|
|
406
|
-
|
|
419
|
+
b as validator
|
|
407
420
|
};
|