super-page-runtime 2.3.0-tmp2 → 2.3.2-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 +25 -25
- package/dist/es/components/runtime/utils/events/validator-util.js +94 -87
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +4 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +152 -152
- package/dist/es/components/runtime/utils/page-init-util.js +5 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +81 -29
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +185 -158
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +130 -114
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +31 -10
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +41 -25
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +38 -38
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +21 -21
- package/dist/es/style.css +17 -8
- package/package.json +2 -2
|
@@ -5,21 +5,21 @@ import l from "agilebuilder-ui/src/utils/request";
|
|
|
5
5
|
import { getFormData as c, getAdditionalParamMap as u, refreshPage as f } from "../events/standard-event.js";
|
|
6
6
|
import { dynamicControlTableEdit as m, disabledAllFields as p, updateFormItemEditState as d } from "../events/validator-util.js";
|
|
7
7
|
import { deepCopy as g, getBaseUrl as y } from "../common-util.js";
|
|
8
|
-
import {
|
|
9
|
-
import { getFormModelFields as
|
|
10
|
-
import { getCustomFunc as
|
|
11
|
-
const
|
|
12
|
-
n2 ?
|
|
8
|
+
import { replacePrefix as b, isMobileBrowser as h } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import { getFormModelFields as E, getModelFields as P } from "../page-init-util.js";
|
|
10
|
+
import { getCustomFunc as C } from "../events/event-util.js";
|
|
11
|
+
const k = { showElement: function(e2, t2, n2) {
|
|
12
|
+
n2 ? j(e2, "showElement", t2) : t2.forEach((t3) => {
|
|
13
13
|
const n3 = r(e2, t3);
|
|
14
14
|
n3 && n3.show();
|
|
15
15
|
});
|
|
16
16
|
}, hideElement: function(e2, t2, n2) {
|
|
17
|
-
n2 ?
|
|
17
|
+
n2 ? j(e2, "hideElement", t2) : t2.forEach((t3) => {
|
|
18
18
|
const n3 = r(e2, t3);
|
|
19
19
|
n3 && n3.hide();
|
|
20
20
|
});
|
|
21
21
|
}, enableElement: function(e2, t2, n2) {
|
|
22
|
-
n2 ?
|
|
22
|
+
n2 ? j(e2, "enableElement", t2) : t2.forEach((t3) => {
|
|
23
23
|
const n3 = r(e2, t3);
|
|
24
24
|
if (n3) {
|
|
25
25
|
const e3 = n3.getConfigure();
|
|
@@ -27,7 +27,7 @@ const C = { showElement: function(e2, t2, n2) {
|
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}, disableElement: function(e2, t2, n2) {
|
|
30
|
-
n2 ?
|
|
30
|
+
n2 ? j(e2, "disableElement", t2) : t2.forEach((t3) => {
|
|
31
31
|
const n3 = r(e2, t3);
|
|
32
32
|
if (n3) {
|
|
33
33
|
const e3 = n3.getConfigure();
|
|
@@ -47,7 +47,7 @@ const C = { showElement: function(e2, t2, n2) {
|
|
|
47
47
|
o(e2.entity, i2.startsWith("${") ? i2 : "${" + t2 + "." + i2 + "}", n2[i2]);
|
|
48
48
|
});
|
|
49
49
|
}, dynamicControlFormEdit: function(e2, t2, n2) {
|
|
50
|
-
n2 ?
|
|
50
|
+
n2 ? j(e2, "dynamicControlFormEdit", t2) : d(e2, t2);
|
|
51
51
|
}, disabledAllFields(e2) {
|
|
52
52
|
p(e2);
|
|
53
53
|
}, dynamicControlTableEdit(e2, t2, n2) {
|
|
@@ -80,7 +80,7 @@ const C = { showElement: function(e2, t2, n2) {
|
|
|
80
80
|
}, getServerConfigValue: (e2) => window.$vueApp.config.globalProperties[e2], getBackendUrl: (e2) => y(e2.backendUrl, false), getPlateBackendUrl: () => window.$vueApp.config.globalProperties.baseAPI, getEntity: (e2) => e2.entity.data, getEntityValue: (e2, t2) => e2.entity.data ? e2.entity.data[t2] : null, getPageData: (e2) => e2.entity.page, getPageDataValue: (e2, t2) => e2.entity.page ? e2.entity.page[t2] : null, getAdditionalParams: (e2) => u(e2), getAdditionalParamValue(e2, t2) {
|
|
81
81
|
const n2 = u(e2);
|
|
82
82
|
return n2 ? n2[t2] : null;
|
|
83
|
-
}, isMobile: () =>
|
|
83
|
+
}, isMobile: () => h(), getComponentRefByProp: (e2, t2) => r(e2, t2), getComponentRefByCode: (e2, t2) => a(e2, t2), getFormViewData(o2) {
|
|
84
84
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
85
85
|
const r2 = o2.entity ? o2.entity : {}, s2 = g(r2), l2 = e(o2);
|
|
86
86
|
for (const e2 in l2) {
|
|
@@ -88,13 +88,13 @@ const C = { showElement: function(e2, t2, n2) {
|
|
|
88
88
|
if (l3) {
|
|
89
89
|
const e3 = l3.getConfigure();
|
|
90
90
|
if (e3 && ((_b = (_a = e3.props) == null ? void 0 : _a.dataOrigin) == null ? void 0 : _b.optionValueSetType) && ("static" === ((_d = (_c = e3.props) == null ? void 0 : _c.dataOrigin) == null ? void 0 : _d.optionValueSetType) || "optionGroup" === ((_f = (_e = e3.props) == null ? void 0 : _e.dataOrigin) == null ? void 0 : _f.optionValueSetType))) if (e3.name && ("select" === e3.name && ((_h = (_g = e3.props) == null ? void 0 : _g.base) == null ? void 0 : _h.multiple) || "checkbox" === e3.name)) {
|
|
91
|
-
const t2 =
|
|
91
|
+
const t2 = E(o2, e3), a2 = n(s2, t2);
|
|
92
92
|
if (a2) {
|
|
93
|
-
const e4 =
|
|
93
|
+
const e4 = V(a2.split(","), r3);
|
|
94
94
|
i(s2, t2, e4);
|
|
95
95
|
}
|
|
96
96
|
} else {
|
|
97
|
-
const t2 =
|
|
97
|
+
const t2 = E(o2, e3), a2 = V(n(s2, t2), r3);
|
|
98
98
|
i(s2, t2, a2);
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -105,34 +105,34 @@ const C = { showElement: function(e2, t2, n2) {
|
|
|
105
105
|
if (e2.indexOf("__") > 0 && (t2 = e2.substring(e2.lastIndexOf("__") + 2)), t2) {
|
|
106
106
|
const i2 = a(o2, t2);
|
|
107
107
|
if (i2) {
|
|
108
|
-
const t3 = i2.getConfigure(), o3 = t3.code ? t3.code : e2, a2 =
|
|
109
|
-
|
|
108
|
+
const t3 = i2.getConfigure(), o3 = t3.code ? t3.code : e2, a2 = P(t3, o3), r3 = n(s2, a2);
|
|
109
|
+
v(i2.getTableSelectOptions(e2), r3);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return s2.data;
|
|
114
|
-
}, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) =>
|
|
115
|
-
function
|
|
114
|
+
}, getFormData: (e2, t2) => c(e2, t2), getCustomFunc: (e2, t2) => C(e2, t2), replaceUrlPrefix: (e2) => b(e2) };
|
|
115
|
+
function v(e2, t2) {
|
|
116
116
|
e2 && t2 && t2.forEach((t3) => {
|
|
117
117
|
Object.keys(e2).forEach((n2) => {
|
|
118
118
|
const i2 = t3[n2], o2 = e2[n2], a2 = o2.options, r2 = o2.column;
|
|
119
119
|
let s2;
|
|
120
120
|
if (r2 && r2.componentType && ("multiselect" === r2.componentType || "checkbox" === r2.componentType)) {
|
|
121
121
|
if (i2) {
|
|
122
|
-
s2 =
|
|
122
|
+
s2 = V(i2.split(","), a2);
|
|
123
123
|
}
|
|
124
|
-
} else s2 =
|
|
124
|
+
} else s2 = V(i2, a2);
|
|
125
125
|
t3[n2] = s2;
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function V(e2, t2) {
|
|
130
130
|
let n2;
|
|
131
131
|
return null != e2 && t2 && (Array.isArray(e2) ? (n2 = "", e2.forEach((i2) => {
|
|
132
|
-
n2 = n2 +
|
|
133
|
-
}), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 =
|
|
132
|
+
n2 = n2 + $(e2, t2) + ",";
|
|
133
|
+
}), n2.indexOf(",") > 0 && (n2 = n2.substring(0, n2.lastIndexOf(",")))) : (n2 = e2, n2 = $(e2, t2))), n2;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function $(e2, t2) {
|
|
136
136
|
let n2 = e2;
|
|
137
137
|
if (null != e2 && t2) for (let i2 = 0; i2 < t2.length; i2++) {
|
|
138
138
|
const o2 = t2[i2].value, a2 = t2[i2].label ? t2[i2].label : t2[i2].name;
|
|
@@ -143,9 +143,9 @@ function V(e2, t2) {
|
|
|
143
143
|
}
|
|
144
144
|
return n2;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function j(e2, t2, n2) {
|
|
147
147
|
e2.initInfo || (e2.initInfo = {}), e2.initInfo[t2] = n2;
|
|
148
148
|
}
|
|
149
149
|
export {
|
|
150
|
-
|
|
150
|
+
k as functions
|
|
151
151
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import e from "async-validator";
|
|
2
2
|
import { ElMessage as t } from "element-plus";
|
|
3
|
-
import { getComponentRefByCode as n, getAllComponentRefs as
|
|
3
|
+
import { getComponentRefByCode as n, getAllComponentRefs as s, getComponentRef as r } from "../global-refs.js";
|
|
4
4
|
import { getI18n as i } from "agilebuilder-ui/src/utils/util";
|
|
5
5
|
import { getAdditionalParamMap as l } from "./standard-event.js";
|
|
6
6
|
import { isPromise as o } from "agilebuilder-ui/src/utils/common-util";
|
|
7
7
|
import { getListCode as a, isWorkflowPage as u } from "../common-util.js";
|
|
8
8
|
function f(e2, t2, n2) {
|
|
9
|
-
const
|
|
9
|
+
const s2 = {};
|
|
10
10
|
t2 || (t2 = {});
|
|
11
|
-
let
|
|
11
|
+
let r2 = 0;
|
|
12
12
|
const i2 = e2.split(".");
|
|
13
13
|
return i2.forEach((e3) => {
|
|
14
14
|
let l2;
|
|
15
|
-
if (
|
|
16
|
-
let
|
|
17
|
-
for (let
|
|
18
|
-
if (t3[
|
|
15
|
+
if (r2 === i2.length - 1) l2 = function(e4, t3, n3) {
|
|
16
|
+
let s3;
|
|
17
|
+
for (let r3 = 0; r3 < t3.length; r3++) if (s3 = 0 === r3 ? e4[t3[r3]] : s3.fields[t3[r3]], r3 !== t3.length - 1) {
|
|
18
|
+
if (t3[r3 + 1] === n3) break;
|
|
19
19
|
}
|
|
20
|
-
return
|
|
21
|
-
}(
|
|
20
|
+
return s3;
|
|
21
|
+
}(s2, i2, e3), l2.fields[e3] = n2;
|
|
22
22
|
else {
|
|
23
23
|
let n3;
|
|
24
|
-
0 ===
|
|
25
|
-
let
|
|
26
|
-
for (let
|
|
27
|
-
const i3 = t3[
|
|
28
|
-
if (
|
|
24
|
+
0 === r2 ? l2 = t2 : (n3 = function(e4, t3, n4) {
|
|
25
|
+
let s3;
|
|
26
|
+
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
27
|
+
const i3 = t3[r3];
|
|
28
|
+
if (s3 = 0 === r3 ? e4[i3] : s3.fields[t3[r3]], i3 === n4) break;
|
|
29
29
|
}
|
|
30
|
-
return
|
|
31
|
-
}(
|
|
30
|
+
return s3;
|
|
31
|
+
}(s2, i2, i2[r2 - 1]), l2 = n3.fields), l2[e3] || (l2[e3] = { type: "object", required: true, fields: {} }), 0 === r2 ? s2[e3] = l2[e3] : n3.fields[e3] = l2[e3];
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
}),
|
|
33
|
+
r2++;
|
|
34
|
+
}), s2;
|
|
35
35
|
}
|
|
36
|
-
function c(e2, t2, n2,
|
|
37
|
-
return d(e2, t2, n2,
|
|
36
|
+
function c(e2, t2, n2, s2, r2) {
|
|
37
|
+
return d(e2, t2, n2, s2, true);
|
|
38
38
|
}
|
|
39
39
|
function m(e2) {
|
|
40
40
|
if (e2) return Object.keys(e2).forEach((t2) => {
|
|
@@ -44,67 +44,67 @@ function m(e2) {
|
|
|
44
44
|
}
|
|
45
45
|
}), e2;
|
|
46
46
|
}
|
|
47
|
-
function d(n2,
|
|
48
|
-
let a2, u2 = m(
|
|
49
|
-
if (
|
|
47
|
+
function d(n2, s2, r2, i2, l2, o2) {
|
|
48
|
+
let a2, u2 = m(s2);
|
|
49
|
+
if (s2 && null !== s2 || !r2 || (u2 = {}), !u2 || 0 === Object.keys(u2).length) return n2.validateErrorField = "", true;
|
|
50
50
|
return new e(u2).validate(n2, { first: true }, (e2, o3) => {
|
|
51
51
|
let u3;
|
|
52
52
|
if (e2 ? (a2 = e2[0].message, u3 = e2[0].field, t({ message: a2, showClose: true, type: "warning", duration: 3e3 })) : a2 = true, u3 && true === l2) {
|
|
53
53
|
if (/[A-Z]+/.test(u3) && void 0 !== n2[u3.toLowerCase()]) {
|
|
54
54
|
const e3 = JSON.parse(JSON.stringify(n2));
|
|
55
|
-
e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3,
|
|
55
|
+
e3[u3.toUpperCase()] = n2[u3.toLowerCase()], delete e3[u3.toLowerCase()], a2 = d(e3, s2, r2, i2, false);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}), a2;
|
|
59
59
|
}
|
|
60
|
-
function p(e2, n2,
|
|
61
|
-
const
|
|
62
|
-
return null != f2 && (
|
|
60
|
+
function p(e2, n2, s2) {
|
|
61
|
+
const r2 = e2.entity.data, o2 = { ...e2.entity.page, ...r2 }, a2 = e2.rules, f2 = n2.props.base ? n2.props.base.isEnableRequired : null;
|
|
62
|
+
return null != f2 && (s2 = f2), null == s2 && (s2 = false), function(e3, n3, s3, r3) {
|
|
63
63
|
if (e3) {
|
|
64
|
-
return u(
|
|
65
|
-
return new Promise((
|
|
64
|
+
return u(r3) ? function(e4, n4, s4) {
|
|
65
|
+
return new Promise((r4, o3) => {
|
|
66
66
|
const a3 = l(n4), u2 = n4.entity.context, f3 = n4.entity.task, c2 = true, m2 = n4.subTablePageInfo;
|
|
67
|
-
b(e4, n4,
|
|
68
|
-
if (
|
|
69
|
-
let i2 =
|
|
67
|
+
b(e4, n4, s4).then((s5) => {
|
|
68
|
+
if (s5) {
|
|
69
|
+
let i2 = s5;
|
|
70
70
|
const l2 = n4.workflowRules;
|
|
71
|
-
i2 = !l2 || window.$vueApp.config.globalProperties.$formValidator(e4, l2, c2, a3, f3, u2, m2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }),
|
|
71
|
+
i2 = !l2 || window.$vueApp.config.globalProperties.$formValidator(e4, l2, c2, a3, f3, u2, m2), true !== i2 ? (t({ showClose: true, message: i2 + "", type: "warning" }), r4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, r4(e4));
|
|
72
72
|
} else o3(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
73
73
|
}).catch((e5) => {
|
|
74
74
|
o3(e5);
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
|
-
}(n3,
|
|
78
|
-
return new Promise((
|
|
77
|
+
}(n3, r3, s3) : function(e4, t2, n4) {
|
|
78
|
+
return new Promise((s4, r4) => {
|
|
79
79
|
b(e4, t2, n4).then((t3) => {
|
|
80
80
|
if (t3) {
|
|
81
81
|
const t4 = JSON.parse(JSON.stringify(e4));
|
|
82
|
-
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField,
|
|
83
|
-
} else
|
|
82
|
+
Object.keys(t4).indexOf("validateErrorField") >= 0 && delete t4.validateErrorField, s4(t4);
|
|
83
|
+
} else s4(false);
|
|
84
84
|
}).catch((e5) => {
|
|
85
|
-
|
|
85
|
+
r4(e5);
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
|
-
}(n3,
|
|
88
|
+
}(n3, r3, s3);
|
|
89
89
|
}
|
|
90
90
|
return new Promise((e4, t2) => {
|
|
91
91
|
e4(true);
|
|
92
92
|
});
|
|
93
|
-
}(
|
|
93
|
+
}(s2, o2, a2, e2);
|
|
94
94
|
}
|
|
95
95
|
function g(e2) {
|
|
96
96
|
return new Promise((t2, n2) => {
|
|
97
|
-
const
|
|
97
|
+
const s2 = [], i2 = e2.customValidatorUuids;
|
|
98
98
|
i2 && i2.forEach((t3) => {
|
|
99
|
-
const n3 =
|
|
100
|
-
n3 && n3.validator &&
|
|
101
|
-
}),
|
|
99
|
+
const n3 = r(e2, t3);
|
|
100
|
+
n3 && n3.validator && s2.push(n3.validator());
|
|
101
|
+
}), s2 && s2.length > 0 ? Promise.all(s2).then((e3) => {
|
|
102
102
|
e3.includes(false) ? t2(false) : t2(true);
|
|
103
103
|
}) : t2(true);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
function b(e2, t2, n2) {
|
|
107
|
-
return new Promise((
|
|
107
|
+
return new Promise((s2, l2) => {
|
|
108
108
|
const a2 = JSON.parse(JSON.stringify(e2));
|
|
109
109
|
if (n2 && 0 !== Object.keys(n2).length) {
|
|
110
110
|
if (true === c(a2, n2, null, null)) {
|
|
@@ -113,7 +113,7 @@ function b(e2, t2, n2) {
|
|
|
113
113
|
const t3 = e4.tableUuids;
|
|
114
114
|
if (!t3) return true;
|
|
115
115
|
for (let n3 = 0; n3 < t3.length; n3++) {
|
|
116
|
-
const
|
|
116
|
+
const s3 = t3[n3], i2 = r(e4, s3);
|
|
117
117
|
if (i2) {
|
|
118
118
|
if (!i2.validatorSunTableListData()) return false;
|
|
119
119
|
}
|
|
@@ -124,16 +124,16 @@ function b(e2, t2, n2) {
|
|
|
124
124
|
const e4 = function(e5) {
|
|
125
125
|
const t3 = [];
|
|
126
126
|
e5.customRuleEvents && e5.customRuleEvents.length > 0 && e5.customRuleEvents.forEach((n3) => {
|
|
127
|
-
n3.events.forEach((
|
|
128
|
-
const
|
|
129
|
-
t3.push(
|
|
127
|
+
n3.events.forEach((s3) => {
|
|
128
|
+
const r2 = e5.customEvents[s3];
|
|
129
|
+
t3.push(r2.apply(r2, [{ prop: n3.prop, pageContext: e5 }]));
|
|
130
130
|
});
|
|
131
131
|
});
|
|
132
132
|
if (t3 && t3.length > 0) return new Promise((e6, n3) => {
|
|
133
|
-
const
|
|
133
|
+
const s3 = [], r2 = [];
|
|
134
134
|
t3.forEach((e7) => {
|
|
135
|
-
o(e7) ?
|
|
136
|
-
}),
|
|
135
|
+
o(e7) ? s3.push(e7) : r2.push(e7);
|
|
136
|
+
}), r2.includes(false) && e6(false), s3.length > 0 ? Promise.all(s3).then((t4) => {
|
|
137
137
|
t4.includes(false) ? e6(false) : e6(true);
|
|
138
138
|
}).catch((t4) => {
|
|
139
139
|
e6(false);
|
|
@@ -143,39 +143,39 @@ function b(e2, t2, n2) {
|
|
|
143
143
|
}(t2);
|
|
144
144
|
e4 && o(e4) ? e4.then((e5) => {
|
|
145
145
|
e5 ? g(t2).then((e6) => {
|
|
146
|
-
|
|
147
|
-
}) :
|
|
146
|
+
s2(e6);
|
|
147
|
+
}) : s2(false);
|
|
148
148
|
}) : g(t2).then((e5) => {
|
|
149
|
-
|
|
149
|
+
s2(e5);
|
|
150
150
|
});
|
|
151
151
|
} else l2(new Error(i().t("superPageRuntimeMessage.tableListSubTableDataVerificationFailed")).message);
|
|
152
152
|
} else l2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
|
|
153
|
-
} else
|
|
153
|
+
} else s2(true);
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
function h(e2, t2) {
|
|
157
157
|
if (!e2) return t2;
|
|
158
158
|
t2 || (t2 = {});
|
|
159
|
-
const n2 = Object.keys(e2),
|
|
159
|
+
const n2 = Object.keys(e2), s2 = e2;
|
|
160
160
|
return n2.forEach((e3) => {
|
|
161
161
|
if ("__subRules" === e3) {
|
|
162
|
-
const e4 =
|
|
162
|
+
const e4 = s2.__subRules;
|
|
163
163
|
Object.keys(e4).forEach((n3) => {
|
|
164
164
|
t2.subRules || (t2.subRules = {}), t2.subRules[n3] ? Object.assign(t2.subRules[n3], e4[n3]) : t2.subRules[n3] = e4[n3];
|
|
165
165
|
});
|
|
166
|
-
} else j(
|
|
166
|
+
} else j(s2[e3]), t2[e3] = s2[e3];
|
|
167
167
|
}), m(t2);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function w(e2) {
|
|
170
170
|
if (!e2 || 0 === Object.keys(e2).length) return;
|
|
171
171
|
const t2 = {}, n2 = Object.keys(e2);
|
|
172
|
-
for (let
|
|
173
|
-
const
|
|
174
|
-
|
|
172
|
+
for (let s2 = 0; s2 < n2.length; s2++) {
|
|
173
|
+
const r2 = n2[s2], i2 = e2[r2];
|
|
174
|
+
y(i2), r2.indexOf(".") > 0 ? f(r2, t2, i2) : i2 && i2.length > 0 && (t2[r2] = [...i2]);
|
|
175
175
|
}
|
|
176
176
|
return t2;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function y(e2, t2) {
|
|
179
179
|
e2.forEach((e3) => {
|
|
180
180
|
e3.message;
|
|
181
181
|
const t3 = e3.label, n2 = i().t(t3);
|
|
@@ -183,48 +183,55 @@ function w(e2, t2) {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
function v(e2) {
|
|
186
|
-
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 },
|
|
186
|
+
const t2 = e2.entity.data, n2 = { ...e2.entity.page, ...t2 }, s2 = l(e2), r2 = e2.entity.context, i2 = e2.entity.task;
|
|
187
187
|
e2.formPropTiltleMap && Object.keys(e2.formPropTiltleMap).length > 0 && e2.completeTaskParam.fieldPermissions && e2.completeTaskParam.fieldPermissions.length > 0 && e2.completeTaskParam.fieldPermissions.forEach((t3) => {
|
|
188
188
|
t3.name && e2.formPropTiltleMap[t3.name] && (t3.label = e2.formPropTiltleMap[t3.name]);
|
|
189
189
|
});
|
|
190
|
-
let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true,
|
|
190
|
+
let o2 = window.$vueApp.config.globalProperties.$getValidator(e2.completeTaskParam.fieldPermissions, n2, true, s2, i2, r2);
|
|
191
191
|
return o2 = h(e2.customRules, o2), o2;
|
|
192
192
|
}
|
|
193
193
|
function P(e2, t2) {
|
|
194
194
|
if (!t2) return;
|
|
195
|
-
const
|
|
195
|
+
const s2 = {};
|
|
196
196
|
t2.forEach((e3) => {
|
|
197
197
|
const { name: t3, rules: n2 } = e3;
|
|
198
|
-
n2 && (
|
|
198
|
+
n2 && (s2[t3] = n2);
|
|
199
199
|
});
|
|
200
|
-
let
|
|
201
|
-
|
|
200
|
+
let r2 = e2.rules ? e2.rules : {};
|
|
201
|
+
r2 = h(s2, r2), e2.rules = r2;
|
|
202
202
|
let i2 = e2.workflowRules ? e2.workflowRules : {};
|
|
203
|
-
i2 = h(
|
|
203
|
+
i2 = h(s2, i2), e2.workflowRules = i2;
|
|
204
204
|
const l2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
205
|
-
l2 && l2.length > 0 &&
|
|
205
|
+
l2 && l2.length > 0 && E(e2, l2[0]), t2.forEach((t3) => {
|
|
206
206
|
if ("_all_fields" !== t3.name) {
|
|
207
|
-
|
|
207
|
+
O(n(e2, t3.name), t3);
|
|
208
208
|
}
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
211
|
+
function R(e2) {
|
|
212
|
+
E(e2, { disabled: true });
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
const n2 =
|
|
214
|
+
function E(e2, t2) {
|
|
215
|
+
const n2 = s(e2);
|
|
216
216
|
if (n2) for (const e3 in n2) {
|
|
217
|
-
const
|
|
218
|
-
|
|
217
|
+
const s2 = n2[e3];
|
|
218
|
+
O(s2 ? s2.value : s2, t2);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function k(e2, t2, s2) {
|
|
222
|
+
var _a;
|
|
222
223
|
let i2, l2;
|
|
223
|
-
if (
|
|
224
|
+
if (s2 ? (i2 = n(e2, s2), l2 = i2 ? i2.getTableUuid() : null) : (l2 = e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null, i2 = l2 ? r(e2, l2) : null), !i2) return;
|
|
224
225
|
const o2 = e2.code, u2 = e2.version, f2 = a(o2, u2, l2);
|
|
226
|
+
if (((_a = e2.workflowRules) == null ? void 0 : _a.subRules) && e2.workflowRules.subRules[s2]) {
|
|
227
|
+
const n2 = e2.workflowRules.subRules[s2];
|
|
228
|
+
t2.forEach((e3) => {
|
|
229
|
+
n2[e3.name] = e3;
|
|
230
|
+
});
|
|
231
|
+
}
|
|
225
232
|
i2.dynamicControlTableEdit(e2, t2, f2);
|
|
226
233
|
}
|
|
227
|
-
function
|
|
234
|
+
function O(e2, t2) {
|
|
228
235
|
var _a, _b, _c;
|
|
229
236
|
if (e2) {
|
|
230
237
|
const n2 = e2.getConfigure();
|
|
@@ -243,15 +250,15 @@ function j(e2) {
|
|
|
243
250
|
});
|
|
244
251
|
}
|
|
245
252
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
253
|
+
R as disabledAllFields,
|
|
254
|
+
k as dynamicControlTableEdit,
|
|
248
255
|
v as getWorkflowRules,
|
|
249
|
-
|
|
250
|
-
|
|
256
|
+
y as i18nValidatePropRulesMessage,
|
|
257
|
+
w as i18nValidateRulesMessage,
|
|
251
258
|
h as packageCustomRules,
|
|
252
259
|
j as packageCustomValidator,
|
|
253
260
|
f as setObjectPropRule,
|
|
254
|
-
|
|
261
|
+
O as updateComponentDisplayState,
|
|
255
262
|
P as updateFormItemEditState,
|
|
256
263
|
p as validateDataModelFunc,
|
|
257
264
|
c as validator
|
|
@@ -80,8 +80,11 @@ export declare function queryOptions(component: Component, pageContext: PageCont
|
|
|
80
80
|
* 根据查询条件远程查询
|
|
81
81
|
* @param component
|
|
82
82
|
* @param query 模糊查询内容
|
|
83
|
+
* @param skipProps 自动赋值映射字段跳过字段,因为当前组件set方法内已经被赋值了,
|
|
84
|
+
* 如果是筛选,之前选择的值可能不在筛选后的结果内,这里再给当前组件变量赋值一遍就会导致之前选择的值被覆盖消失
|
|
85
|
+
*
|
|
83
86
|
*/
|
|
84
|
-
export declare function autoSetAfterSelect(component: Component, pageContext: PageContext, autoSets: any[], selItems: any[]): void;
|
|
87
|
+
export declare function autoSetAfterSelect(component: Component, pageContext: PageContext, autoSets: any[], selItems: any[], skipProps?: string[]): void;
|
|
85
88
|
/**
|
|
86
89
|
*
|
|
87
90
|
* @param entity
|