super-page-runtime 2.3.0-sit8 → 2.3.0
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/page-helper-util.d.ts +1 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +152 -152
- package/dist/es/components/runtime/utils/page-init-util.js +2 -5
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +158 -185
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +114 -130
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +10 -31
- 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 +25 -41
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +21 -21
- package/package.json +2 -2
|
@@ -1,51 +1,35 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as l, nextTick as
|
|
2
|
-
import { getFormModelFields as
|
|
3
|
-
import { handleAfterInitEvent as
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
import { setVariableValue as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
O.props.deptScope && ("field" == O.props.deptScope && O.props.deptScopeField ? (N(), function(e3, t2) {
|
|
14
|
-
if (e3.indexOf("${fixed.")) return;
|
|
15
|
-
const l2 = e3.match(/\${(.*?)}/);
|
|
16
|
-
if (!l2) return;
|
|
17
|
-
const o2 = l2 ? l2[1].split(".") : [];
|
|
18
|
-
o2 && o2.length > 0 && i(() => o2.reduce((e4, t3) => e4[t3], j2.pageContext.entity), (e4, l3) => {
|
|
19
|
-
t2(e4, l3);
|
|
20
|
-
});
|
|
21
|
-
}(O.props.deptScopeField, (e3, t2) => {
|
|
22
|
-
N();
|
|
23
|
-
})) : "depts" == O.props.deptScope && O.props.deptScopeCodes && (I.value = O.props.deptScopeCodes.split(",")));
|
|
24
|
-
const A = t(null), B = t(null), G = t(null);
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, nextTick as a, computed as o, resolveComponent as i, createBlock as u, openBlock as n, normalizeStyle as r, normalizeClass as p, unref as s, withCtx as f, createVNode as g, createElementBlock as m, createCommentVNode as d, Fragment as c, createTextVNode as v, toDisplayString as y } from "vue";
|
|
2
|
+
import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { handleAfterInitEvent as C, handleFormEvent as h } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import b from "../common/title-suffix-element.vue.js";
|
|
5
|
+
import { $t as k } from "../../../../utils/i18n-util.js";
|
|
6
|
+
import { setVariableValue as S, getVariableValue as R } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
const _ = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
8
|
+
const _2 = e2, j = _2.pageContext.entity ? _2.pageContext.entity : {};
|
|
9
|
+
j.data || (j.data = {});
|
|
10
|
+
const T = j.data, w = j.page;
|
|
11
|
+
let z = x(_2.pageContext, _2.configure);
|
|
12
|
+
const q = z.length > 0 ? z[z.length - 1] : _2.configure.uuid, I = _2.configure.runtime ? _2.configure.runtime : {}, F = t(I.props ? I.props : {}), M = I.style, D = I.class, E = I.headerStyle, O = I.titleExceedStyle, V = t(null), W = t(null), A = t(null);
|
|
25
13
|
l(() => {
|
|
26
|
-
|
|
27
|
-
const e3 =
|
|
28
|
-
|
|
14
|
+
a(() => {
|
|
15
|
+
const e3 = T ? T[q] : null;
|
|
16
|
+
C(e3, _2.pageContext, _2.configure, { formItemRef: V.value, componentRef: W.value, titleRef: A.value, value: e3, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
|
|
29
17
|
});
|
|
30
18
|
});
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
} }),
|
|
34
|
-
function
|
|
35
|
-
e3 ===
|
|
36
|
-
}
|
|
37
|
-
function L() {
|
|
38
|
-
h(null, j2.pageContext, j2.configure, "click");
|
|
19
|
+
const B = o({ get: () => R(j, z), set(e3) {
|
|
20
|
+
S(j, z, e3);
|
|
21
|
+
} }), G = F.value.autoSetFields ? F.value.autoSetFields : [];
|
|
22
|
+
function H(e3, t2) {
|
|
23
|
+
e3 === q && h(t2, _2.pageContext, _2.configure, "change");
|
|
39
24
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
I.value = e3 ? e3.split(",") : [];
|
|
25
|
+
function J() {
|
|
26
|
+
h(null, _2.pageContext, _2.configure, "click");
|
|
43
27
|
}
|
|
44
28
|
return (e3, t2) => {
|
|
45
|
-
const l2 =
|
|
46
|
-
return
|
|
29
|
+
const l2 = i("OrganizationInput"), a2 = i("el-form-item");
|
|
30
|
+
return n(), u(a2, { ref_key: "formItemRef", ref: V, required: F.value.required, class: p(s(D)), "label-width": F.value.labelWidth, style: r(s(M)) }, { label: f(() => [F.value.tittleShow ? (n(), m("div", { key: 0, ref_key: "titleRef", ref: A, style: r({ ...s(E), ...s(O) }) }, [F.value.prefixType ? (n(), u(b, { key: 0, pageContext: e3.pageContext, property: F.value }, null, 8, ["pageContext", "property"])) : (n(), m(c, { key: 1 }, [v(y(s(k)(F.value.title)), 1)], 64))], 4)) : d("", true)]), default: f(() => [g(l2, { ref_key: "componentRef", ref: W, disabled: "disabled" == F.value.state, multiple: F.value.multiple, treeType: F.value.treeType, value: B.value, models: s(T), pageModels: s(w), fields: s(G), size: F.value.size, separator: F.value.separator, onSetValue: H, onShowTree: J }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
47
31
|
};
|
|
48
32
|
} });
|
|
49
33
|
export {
|
|
50
|
-
|
|
34
|
+
_ as default
|
|
51
35
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, computed as l, watch as o, onUnmounted as a, onMounted as u, nextTick as n, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as p, normalizeClass as f, unref as c, withCtx as v, createVNode as g, createElementBlock as m, Fragment as d, renderList as h, createCommentVNode as y, createElementVNode as x, toDisplayString as b, createTextVNode as C } from "vue";
|
|
2
|
-
import { setVariableValue as
|
|
2
|
+
import { setVariableValue as _, getVariableValue as k, getOptionDatasFromPage as w, queryOptionDatasources as S, autoSetAfterSelect as T } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields as j } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleFormEvent as R, handleAfterInitEvent as V } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import z from "../common/title-suffix-element.vue.js";
|
|
6
6
|
import { $t as I } from "../../../../utils/i18n-util.js";
|
|
7
|
-
const M = { style: { float: "left" } }, q = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } },
|
|
8
|
-
const
|
|
9
|
-
let D = j(
|
|
10
|
-
const W =
|
|
11
|
-
let e3 =
|
|
7
|
+
const M = { style: { float: "left" } }, q = { style: { float: "right", color: "var(--el-text-color-secondary)", "font-size": "13px" } }, O = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: O2 }) {
|
|
8
|
+
const P = e2, A = P.pageContext.entity ? P.pageContext.entity : {};
|
|
9
|
+
let D = j(P.pageContext, P.configure);
|
|
10
|
+
const W = P.configure.runtime ? P.configure.runtime : {}, E = W.style, F = W.class, U = W.headerStyle, $ = W.titleExceedStyle, B = t(W.props ? W.props : {}), G = l({ get() {
|
|
11
|
+
let e3 = k(A, D);
|
|
12
12
|
return null != e3 && (e3 += ""), B.value.multiple && (e3 = e3 ? e3.split(",") : []), e3;
|
|
13
13
|
}, set(e3) {
|
|
14
|
-
B.value.multiple && e3 && e3.length > 0 && !B.value.arrayValue && (e3 = e3.join(",")),
|
|
15
|
-
} }), H = t(B.value.options ? B.value.options : []), J =
|
|
14
|
+
B.value.multiple && e3 && e3.length > 0 && !B.value.arrayValue && (e3 = e3.join(",")), _(A, D, e3);
|
|
15
|
+
} }), H = t(B.value.options ? B.value.options : []), J = w(P.pageContext, P.configure);
|
|
16
16
|
J.length > 0 && (H.value = J);
|
|
17
|
-
const K = t(false), L =
|
|
17
|
+
const K = t(false), L = P.configure.props && P.configure.props.dataOrigin ? P.configure.props.dataOrigin : {}, N = L.optionValueSetType;
|
|
18
18
|
let Q = [];
|
|
19
19
|
const X = B.value.optionconfigInfo ? B.value.optionconfigInfo : {};
|
|
20
20
|
if ("dynamicData" == N || "dataTable" == N || "service" == N) {
|
|
21
21
|
if ("remote" == L.filterType) {
|
|
22
22
|
let e3;
|
|
23
23
|
B.value.filterable = true, B.value.remote = true, B.value.remoteShowSuffix = true, B.value.remoteMethod = function(t2) {
|
|
24
|
-
e3 !== t2 && (e3 = t2, K.value = true, S(
|
|
24
|
+
e3 !== t2 && (e3 = t2, K.value = true, S(P.pageContext, X, t2).then((e4) => {
|
|
25
25
|
K.value = false;
|
|
26
26
|
}).then((e4) => {
|
|
27
27
|
K.value = false;
|
|
@@ -30,14 +30,14 @@ const M = { style: { float: "left" } }, q = { style: { float: "right", color: "v
|
|
|
30
30
|
}
|
|
31
31
|
if (L.autoSets) for (let e3 of L.autoSets) e3.source && Q.push(e3);
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
P.configure && P.configure.props && P.configure.props.base && P.configure.props.base.optionProp && Q.push({ source: "label", target: P.configure.props.base.optionProp }), B.value.changeMethod = function(e3) {
|
|
34
34
|
let t2, l2 = null;
|
|
35
35
|
H.value && null != e3 && null != e3 && (l2 = H.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value));
|
|
36
|
-
Q.length > 0 && T(
|
|
36
|
+
Q.length > 0 && T(P.configure, P.pageContext, Q, l2);
|
|
37
37
|
l2 && l2.length > 0 && (t2 = l2[0]);
|
|
38
38
|
let o2 = {};
|
|
39
39
|
t2 && (o2 = { extendParams: t2 });
|
|
40
|
-
R(e3,
|
|
40
|
+
R(e3, P.pageContext, P.configure, "change", o2);
|
|
41
41
|
};
|
|
42
42
|
const Y = B.value.monitorFields, Z = [];
|
|
43
43
|
if (Y) {
|
|
@@ -47,20 +47,20 @@ const M = { style: { float: "left" } }, q = { style: { float: "right", color: "v
|
|
|
47
47
|
const l2 = t2.split(".");
|
|
48
48
|
"page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (Z.push(l2), e3.includes(l2[0]) || e3.push(l2[0]));
|
|
49
49
|
}
|
|
50
|
-
for (let t2 of e3) o(
|
|
50
|
+
for (let t2 of e3) o(A[t2], () => {
|
|
51
51
|
oe();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
function ee() {
|
|
55
|
-
let e3 =
|
|
56
|
-
for (let t2 of Z) e3
|
|
57
|
-
return e3
|
|
55
|
+
let e3 = "";
|
|
56
|
+
for (let t2 of Z) e3 += "_" + k(A, t2);
|
|
57
|
+
return e3;
|
|
58
58
|
}
|
|
59
59
|
let te = ee(), le = false;
|
|
60
60
|
function oe() {
|
|
61
61
|
le && clearTimeout(le), le = setTimeout(function() {
|
|
62
62
|
const e3 = ee();
|
|
63
|
-
e3 != te && (te = e3,
|
|
63
|
+
e3 != te && (te = e3, S(P.pageContext, X, void 0).then((e4) => {
|
|
64
64
|
K.value = false;
|
|
65
65
|
}));
|
|
66
66
|
}, 200);
|
|
@@ -72,9 +72,9 @@ const M = { style: { float: "left" } }, q = { style: { float: "right", color: "v
|
|
|
72
72
|
return u(() => {
|
|
73
73
|
n(() => {
|
|
74
74
|
const e3 = G.value;
|
|
75
|
-
V(e3,
|
|
75
|
+
V(e3, P.pageContext, P.configure, { formItemRef: ae.value, componentRef: ue.value, titleRef: ne.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
|
|
76
76
|
});
|
|
77
|
-
}),
|
|
77
|
+
}), O2({ updateOptions: function(e3) {
|
|
78
78
|
H.value = e3 || [];
|
|
79
79
|
} }), (e3, t2) => {
|
|
80
80
|
const l2 = i("el-option"), o2 = i("el-select"), a2 = i("el-form-item");
|
|
@@ -82,5 +82,5 @@ const M = { style: { float: "left" } }, q = { style: { float: "right", color: "v
|
|
|
82
82
|
};
|
|
83
83
|
} });
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
O as default
|
|
86
86
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.3.0
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
49
49
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
50
50
|
"@vue/test-utils": "^2.4.4",
|
|
51
|
-
"agilebuilder-ui": "1.1.36
|
|
51
|
+
"agilebuilder-ui": "1.1.36",
|
|
52
52
|
"axios": "^1.6.8",
|
|
53
53
|
"cypress": "^13.6.6",
|
|
54
54
|
"element-plus": "^2.6.1",
|