super-page-runtime 2.2.21 → 2.2.23
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 +1 -3
- package/dist/es/components/runtime/utils/common-util.js +22 -22
- package/dist/es/components/runtime/utils/table-utils.js +26 -31
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +33 -30
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -10
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +186 -174
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +22 -21
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +56 -53
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +80 -77
- package/dist/es/components/runtime/views/home-chart.vue.js +23 -21
- package/dist/es/components/runtime/views/super-page.vue.js +42 -41
- package/dist/es/style.css +1 -1
- package/package.json +2 -2
|
@@ -5,9 +5,9 @@ import w from "quill";
|
|
|
5
5
|
import "quill/dist/quill.snow.css";
|
|
6
6
|
import { handleAfterInitEvent as k, handleFormEvent as q } from "../../../../utils/events/event-util.js";
|
|
7
7
|
import T from "agilebuilder-ui/src/utils/request";
|
|
8
|
-
import { $t as
|
|
9
|
-
import { getToken as
|
|
10
|
-
import { getBaseUrl as
|
|
8
|
+
import { $t as E } from "../../../../utils/i18n-util.js";
|
|
9
|
+
import { getToken as L } from "agilebuilder-ui/src/utils/auth";
|
|
10
|
+
import { getBaseUrl as j } from "../../../../utils/common-util.js";
|
|
11
11
|
const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
12
12
|
const S2 = e2, _ = S2.pageContext.entity ? S2.pageContext.entity : {}, B = x(S2.pageContext, S2.configure), H = S2.configure.runtime ? S2.configure.runtime : {}, M = H.style, N = H.class, A = H.headerStyle, D = H.titleExceedStyle, F = t(H.props ? H.props : {});
|
|
13
13
|
let U = F.value.value;
|
|
@@ -28,17 +28,25 @@ const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtex
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
const P = t([]), Q = t(false), V = t(null), X = t(null), Y = t(null);
|
|
31
|
-
|
|
31
|
+
let Z;
|
|
32
|
+
function $(e3) {
|
|
32
33
|
var _a;
|
|
33
34
|
null !== e3.relatedTarget && ((_a = z.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || q(I.root.innerHTML, S2.pageContext, S2.configure, "change", { entity: _ });
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
+
function ee(e3) {
|
|
37
|
+
if ("img" === e3.target.localName) {
|
|
38
|
+
P.value = [];
|
|
39
|
+
let t2 = e3.target.src;
|
|
40
|
+
P.value.push(t2), Q.value = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function te(e3) {
|
|
36
44
|
const t2 = new FormData();
|
|
37
45
|
t2.append("file", e3);
|
|
38
|
-
const l2 = S2.pageContext.backendUrl, n2 =
|
|
46
|
+
const l2 = S2.pageContext.backendUrl, n2 = j(l2, S2.pageContext.isTest);
|
|
39
47
|
return T.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
|
|
40
48
|
}
|
|
41
|
-
function
|
|
49
|
+
function le(e3, t2) {
|
|
42
50
|
let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1], i2 = atob(l2[1]), o2 = i2.length, r2 = new Uint8Array(o2);
|
|
43
51
|
for (; o2--; ) r2[o2] = i2.charCodeAt(o2);
|
|
44
52
|
return new File([r2], t2, { type: n2 });
|
|
@@ -47,33 +55,26 @@ const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtex
|
|
|
47
55
|
var _a;
|
|
48
56
|
I = new w(z.value, K.value);
|
|
49
57
|
const e3 = I.clipboard.convertHTML(W);
|
|
50
|
-
I.setContents(e3.ops), (_a = z.value) == null ? void 0 : _a.addEventListener("focusout",
|
|
58
|
+
I.setContents(e3.ops), (_a = z.value) == null ? void 0 : _a.addEventListener("focusout", $), I.on("text-change", async function(e4, t2, l2) {
|
|
51
59
|
if (e4.ops && e4.ops.length > 0) for (let t3 = 0; t3 < e4.ops.length; t3++) {
|
|
52
60
|
const l3 = e4.ops[t3];
|
|
53
61
|
if (l3.insert && l3.insert.image) {
|
|
54
62
|
const e5 = l3.insert.image;
|
|
55
63
|
if (!e5.startsWith("data:image")) return;
|
|
56
|
-
const t4 =
|
|
57
|
-
await
|
|
64
|
+
const t4 = le(e5, "image.png");
|
|
65
|
+
await te(t4).then((t5) => {
|
|
58
66
|
if (!I) return;
|
|
59
67
|
const l4 = I.root.getElementsByTagName("img");
|
|
60
68
|
if (l4 && l4.length > 0) for (let n2 = 0; n2 < l4.length; n2++) {
|
|
61
69
|
const i2 = l4[n2];
|
|
62
|
-
i2.src === e5 && (i2.src = t5.url + "&jwt=" +
|
|
70
|
+
i2.src === e5 && (i2.src = t5.url + "&jwt=" + L());
|
|
63
71
|
}
|
|
64
72
|
}).catch((e6) => {
|
|
65
73
|
});
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
76
|
b(_, B, I.root.innerHTML);
|
|
69
|
-
})
|
|
70
|
-
I.container.addEventListener("click", function(e4) {
|
|
71
|
-
if ("img" === e4.target.localName) {
|
|
72
|
-
P.value = [];
|
|
73
|
-
let t2 = e4.target.src;
|
|
74
|
-
P.value.push(t2), Q.value = true;
|
|
75
|
-
}
|
|
76
|
-
}), function() {
|
|
77
|
+
}), Z = I.container, Z.addEventListener("click", ee), function() {
|
|
77
78
|
if (I && I.container) {
|
|
78
79
|
const e4 = I.container.parentNode.getBoundingClientRect(), t2 = I.container.getBoundingClientRect();
|
|
79
80
|
let l2 = e4.height - (t2.top - e4.top);
|
|
@@ -84,10 +85,10 @@ const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtex
|
|
|
84
85
|
k(e4, S2.pageContext, S2.configure, { formItemRef: V.value, componentRef: X.value, titleRef: Y.value, value: e4, entity: S2.pageContext.entity.data, pageData: S2.pageContext.entity.page });
|
|
85
86
|
});
|
|
86
87
|
}), o(() => {
|
|
87
|
-
z.value && z.value.removeEventListener("focusout", Z);
|
|
88
|
+
z.value && z.value.removeEventListener("focusout", $), Z && Z.removeEventListener("click", ee);
|
|
88
89
|
}), (e3, t2) => {
|
|
89
90
|
const l2 = r("el-form-item"), n2 = r("el-image-viewer");
|
|
90
|
-
return u(), a(s, null, [F.value.tittleShow ? (u(), c(l2, { key: 0, required: F.value.required, class: g(m(N)), "label-width": F.value.labelWidth, style: d(m(M)) }, { label: f(() => [F.value.tittleShow ? (u(), a("div", { key: 0, style: d({ ...m(A), ...m(D) }) }, h(m(
|
|
91
|
+
return u(), a(s, null, [F.value.tittleShow ? (u(), c(l2, { key: 0, required: F.value.required, class: g(m(N)), "label-width": F.value.labelWidth, style: d(m(M)) }, { label: f(() => [F.value.tittleShow ? (u(), a("div", { key: 0, style: d({ ...m(A), ...m(D) }) }, h(m(E)(F.value.title)), 5)) : p("", true)]), default: f(() => [v("div", R, [v("div", { ref_key: "quillEditorRef", ref: z, style: { width: "100%" } }, null, 512)])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : p("", true), Q.value ? (u(), c(n2, { key: 1, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
|
|
91
92
|
Q.value = false;
|
|
92
93
|
}), "url-list": P.value }, null, 8, ["url-list"])) : p("", true)], 64);
|
|
93
94
|
};
|
|
@@ -1,83 +1,86 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, watch as o,
|
|
2
|
-
import { setVariableValue as
|
|
3
|
-
import { getFormModelFields as
|
|
4
|
-
import { handleFormEvent as
|
|
5
|
-
import
|
|
6
|
-
import { $t as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
let e3 =
|
|
12
|
-
return null != e3 && (e3 += ""),
|
|
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 _, getVariableValue as k, getOptionDatasFromPage as w, queryOptionDatasources as S, autoSetAfterSelect as T } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { getFormModelFields as j } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleFormEvent as R, handleAfterInitEvent as V } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import z from "../common/title-suffix-element.vue.js";
|
|
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" } }, 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
|
+
return null != e3 && (e3 += ""), B.value.multiple && (e3 = e3 ? e3.split(",") : []), e3;
|
|
13
13
|
}, set(e3) {
|
|
14
|
-
|
|
15
|
-
} }),
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
let
|
|
19
|
-
const
|
|
20
|
-
if ("dynamicData" ==
|
|
21
|
-
if ("remote" ==
|
|
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
|
+
J.length > 0 && (H.value = J);
|
|
17
|
+
const K = t(false), L = P.configure.props && P.configure.props.dataOrigin ? P.configure.props.dataOrigin : {}, N = L.optionValueSetType;
|
|
18
|
+
let Q = [];
|
|
19
|
+
const X = B.value.optionconfigInfo ? B.value.optionconfigInfo : {};
|
|
20
|
+
if ("dynamicData" == N || "dataTable" == N || "service" == N) {
|
|
21
|
+
if ("remote" == L.filterType) {
|
|
22
22
|
let e3;
|
|
23
|
-
|
|
24
|
-
e3 !== t2 && (e3 = t2,
|
|
25
|
-
|
|
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(P.pageContext, X, t2).then((e4) => {
|
|
25
|
+
K.value = false;
|
|
26
26
|
}).then((e4) => {
|
|
27
|
-
|
|
27
|
+
K.value = false;
|
|
28
28
|
}));
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
if (
|
|
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
|
-
|
|
36
|
-
|
|
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(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
|
-
|
|
40
|
+
R(e3, P.pageContext, P.configure, "change", o2);
|
|
41
41
|
};
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
42
|
+
const Y = B.value.monitorFields, Z = [];
|
|
43
|
+
if (Y) {
|
|
44
44
|
const e3 = [];
|
|
45
|
-
for (let t2 of
|
|
45
|
+
for (let t2 of Y) if (t2.startsWith("${")) {
|
|
46
46
|
t2 = t2.substring(2, t2.length - 1);
|
|
47
47
|
const l2 = t2.split(".");
|
|
48
|
-
"page" !== l2[0] && "task" !== l2[0] && "data" !== l2[0] || (
|
|
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(
|
|
51
|
-
|
|
50
|
+
for (let t2 of e3) o(A[t2], () => {
|
|
51
|
+
oe();
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ee() {
|
|
55
55
|
let e3 = "";
|
|
56
|
-
for (let t2 of
|
|
56
|
+
for (let t2 of Z) e3 += "_" + k(A, t2);
|
|
57
57
|
return e3;
|
|
58
58
|
}
|
|
59
|
-
let
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
const e3 =
|
|
63
|
-
e3 !=
|
|
64
|
-
|
|
59
|
+
let te = ee(), le = false;
|
|
60
|
+
function oe() {
|
|
61
|
+
le && clearTimeout(le), le = setTimeout(function() {
|
|
62
|
+
const e3 = ee();
|
|
63
|
+
e3 != te && (te = e3, S(P.pageContext, X, void 0).then((e4) => {
|
|
64
|
+
K.value = false;
|
|
65
65
|
}));
|
|
66
66
|
}, 200);
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
a(() => {
|
|
69
|
+
le && clearTimeout(le);
|
|
70
|
+
});
|
|
71
|
+
const ae = t(null), ue = t(null), ne = t(null);
|
|
72
|
+
return u(() => {
|
|
73
|
+
n(() => {
|
|
74
|
+
const e3 = G.value;
|
|
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 });
|
|
73
76
|
});
|
|
74
|
-
}),
|
|
75
|
-
|
|
77
|
+
}), O2({ updateOptions: function(e3) {
|
|
78
|
+
H.value = e3 || [];
|
|
76
79
|
} }), (e3, t2) => {
|
|
77
|
-
const l2 =
|
|
78
|
-
return
|
|
80
|
+
const l2 = i("el-option"), o2 = i("el-select"), a2 = i("el-form-item");
|
|
81
|
+
return s(), r(a2, { ref_key: "formItemRef", ref: ae, required: !!B.value.required, class: f(c(F)), "label-width": B.value.labelWidth, style: p(c(E)) }, { label: v(() => [B.value.tittleShow ? (s(), m("div", { key: 0, ref_key: "titleRef", ref: ne, style: p({ ...c(U), ...c($) }) }, [B.value.prefixType ? (s(), r(z, { key: 0, pageContext: e3.pageContext, property: B.value }, null, 8, ["pageContext", "property"])) : (s(), m(d, { key: 1 }, [C(b(c(I)(B.value.title)), 1)], 64))], 4)) : y("", true)]), default: v(() => [g(o2, { ref_key: "componentRef", ref: ue, style: { width: "100%" }, disabled: "disabled" === B.value.state, size: B.value.size, clearable: B.value.clearable, multiple: B.value.multiple, "collapse-tags": B.value.collapseTags, "collapse-tags-tooltip": B.value.collapseTagsTooltip, filterable: B.value.filterable, "allow-create": B.value.allowCreate, placeholder: B.value.placeholder, "remote-show-suffix": B.value.remoteShowSuffix, remote: B.value.remote, "remote-method": B.value.remoteMethod, loading: K.value, onChange: B.value.changeMethod, modelValue: G.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => G.value = e4) }, { default: v(() => [(s(true), m(d, null, h(H.value, (t3) => (s(), r(l2, { key: t3.value, label: t3.label, value: t3.value, onClick: (l3) => c(R)(t3.value, e3.pageContext, e3.configure, "click", { values: G.value }) }, { default: v(() => [t3._description_ ? (s(), m(d, { key: 0 }, [x("span", M, b(t3.label), 1), x("span", q, b(t3._description_), 1)], 64)) : y("", true)]), _: 2 }, 1032, ["label", "value", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "clearable", "multiple", "collapse-tags", "collapse-tags-tooltip", "filterable", "allow-create", "placeholder", "remote-show-suffix", "remote", "remote-method", "loading", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
79
82
|
};
|
|
80
83
|
} });
|
|
81
84
|
export {
|
|
82
|
-
|
|
85
|
+
O as default
|
|
83
86
|
};
|
|
@@ -1,140 +1,143 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i,
|
|
2
|
-
import
|
|
3
|
-
import { getRuntimeComponentByName as
|
|
4
|
-
import { PageDimensions as
|
|
5
|
-
import { addComponentRef as
|
|
6
|
-
import { getPermissionCodes as
|
|
7
|
-
import { caculateShowCondition as
|
|
8
|
-
import { isWorkflowPage as
|
|
9
|
-
import { isShowComponent as
|
|
10
|
-
import { usePageContextStore as
|
|
11
|
-
const
|
|
1
|
+
import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, onUnmounted as s, resolveDirective as r, withDirectives as u, createCommentVNode as l, unref as p, createBlock as a, openBlock as c, resolveDynamicComponent as g, normalizeClass as f, normalizeStyle as d, vShow as m, nextTick as v } from "vue";
|
|
2
|
+
import C from "./error-render.vue.js";
|
|
3
|
+
import { getRuntimeComponentByName as b } from "../../utils/assemblys-config.js";
|
|
4
|
+
import { PageDimensions as x } from "../../utils/interfaces/page-design-types.js";
|
|
5
|
+
import { addComponentRef as h, addComponentRefByCode as y } from "../../utils/global-refs.js";
|
|
6
|
+
import { getPermissionCodes as w, packageFormRules as j, controlObjectRenderState as _ } from "../../utils/page-init-util.js";
|
|
7
|
+
import { caculateShowCondition as N, getFormPropName as P, getSizeConfig as B } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { isWorkflowPage as L, getPropClassName as O, isNumber as R } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowComponent as S } from "../../utils/events/event-util.js";
|
|
10
|
+
import { usePageContextStore as M } from "../../utils/page-store.js";
|
|
11
|
+
const T = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
const
|
|
14
|
-
null ==
|
|
15
|
-
const $ =
|
|
16
|
-
|
|
17
|
-
let E = o(true), H = o(true),
|
|
18
|
-
if (
|
|
13
|
+
const T2 = e2;
|
|
14
|
+
null == T2.configure.style && (T2.configure.style = {});
|
|
15
|
+
const $ = w(T2.configure, T2.pageContext);
|
|
16
|
+
T2.configure && T2.configure.props && T2.configure.props.base && (T2.configure.props.base.functionCode = $), j(T2.pageContext, T2.configure);
|
|
17
|
+
let E = o(true), H = o(true), k = o("");
|
|
18
|
+
if (T2.configure && T2.configure.props) {
|
|
19
19
|
let e3 = [];
|
|
20
|
-
((_a =
|
|
20
|
+
((_a = T2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof T2.configure.props.base.showConditions ? JSON.parse(T2.configure.props.base.showConditions) : T2.configure.props.base.showConditions), H = t(() => {
|
|
21
21
|
var _a2;
|
|
22
22
|
let o2 = true;
|
|
23
|
-
if (E.value) if (e3 && e3.length > 0) o2 =
|
|
23
|
+
if (E.value) if (e3 && e3.length > 0) o2 = N(T2.pageContext, e3);
|
|
24
24
|
else {
|
|
25
|
-
const e4 = (_a2 =
|
|
25
|
+
const e4 = (_a2 = T2.configure.props.base) == null ? void 0 : _a2.state;
|
|
26
26
|
e4 && "hidden" === e4 && (o2 = false);
|
|
27
27
|
}
|
|
28
28
|
else o2 = false;
|
|
29
29
|
return o2;
|
|
30
30
|
});
|
|
31
|
-
if (
|
|
32
|
-
const e4 =
|
|
31
|
+
if (T2.configure._dynamicShowFlag = H, (_b = T2.configure.props.base) == null ? void 0 : _b.editConditions) {
|
|
32
|
+
const e4 = T2.configure.props.base.editConditions;
|
|
33
33
|
if (e4.length > 0) {
|
|
34
|
-
const o2 =
|
|
35
|
-
if (n2.rawSate = n2.state,
|
|
36
|
-
const e5 =
|
|
37
|
-
if (false === (e5 == null ? void 0 : e5.canEdit))
|
|
34
|
+
const o2 = T2.configure.runtime ? T2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
|
|
35
|
+
if (n2.rawSate = n2.state, L(T2.pageContext) && T2.pageContext.fieldPermissionMap) {
|
|
36
|
+
const e5 = T2.pageContext.fieldPermissionMap.get("all_fields");
|
|
37
|
+
if (false === (e5 == null ? void 0 : e5.canEdit)) k.value = "disabled";
|
|
38
38
|
else {
|
|
39
|
-
const e6 =
|
|
39
|
+
const e6 = T2.configure.props.base;
|
|
40
40
|
if (e6 && e6.prop) {
|
|
41
41
|
let o3 = e6.prop;
|
|
42
|
-
o3 =
|
|
43
|
-
const t2 =
|
|
44
|
-
t2 && false === t2.canEdit && (
|
|
42
|
+
o3 = P(o3);
|
|
43
|
+
const t2 = T2.pageContext.fieldPermissionMap.get(o3);
|
|
44
|
+
t2 && false === t2.canEdit && (k.value = "disabled");
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
n2.state = t({ get() {
|
|
49
|
-
if ("disabled" ===
|
|
50
|
-
return
|
|
49
|
+
if ("disabled" === k.value) return k.value;
|
|
50
|
+
return N(T2.pageContext, e4) ? "" : "disabled";
|
|
51
51
|
}, set() {
|
|
52
52
|
} });
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
null ==
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
if (
|
|
64
|
-
Object.assign(
|
|
65
|
-
const e3 =
|
|
66
|
-
o2 && Object.assign(
|
|
67
|
-
const t2 =
|
|
68
|
-
t2 && (
|
|
56
|
+
const F = o({});
|
|
57
|
+
F.value = n(b(T2.configure.name));
|
|
58
|
+
const J = o(true);
|
|
59
|
+
null == F.value && (F.value = C, J.value = false);
|
|
60
|
+
const W = o(null), q = o({}), z = o(""), A = O(T2.configure);
|
|
61
|
+
A && (z.value = A);
|
|
62
|
+
const D = T2.configure.runtime && T2.configure.runtime.common ? T2.configure.runtime.common : {};
|
|
63
|
+
if (D.class && (z.value += " " + D.class), D.style) {
|
|
64
|
+
Object.assign(q.value, D.style);
|
|
65
|
+
const e3 = T2.pageContext && T2.pageContext.dimensions ? T2.pageContext.dimensions : x.PC, o2 = D.style[e3 + "_style"];
|
|
66
|
+
o2 && Object.assign(q.value, o2);
|
|
67
|
+
const t2 = D.style[e3 + "_class"];
|
|
68
|
+
t2 && (z.value += " " + t2);
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
function
|
|
72
|
-
if (
|
|
70
|
+
const G = M();
|
|
71
|
+
function I(e3) {
|
|
72
|
+
if (W.value = e3, e3 && !e3.show && (e3.show = function() {
|
|
73
73
|
E.value = true;
|
|
74
74
|
}), e3 && !e3.hide && (e3.hide = function() {
|
|
75
75
|
E.value = false;
|
|
76
76
|
}), e3 && !e3.getConfigure && (e3.getConfigure = function() {
|
|
77
|
-
return
|
|
78
|
-
}),
|
|
79
|
-
else if (
|
|
80
|
-
const e4 =
|
|
77
|
+
return T2.configure;
|
|
78
|
+
}), T2.configure.uuid && h(T2.pageContext, T2.configure.uuid, W), T2.configure.code) y(T2.pageContext, T2.configure.code, W);
|
|
79
|
+
else if (T2.configure.props && T2.configure.props.base) {
|
|
80
|
+
const e4 = T2.configure.props.base;
|
|
81
81
|
if (e4.prop) {
|
|
82
82
|
let o3 = e4.prop;
|
|
83
|
-
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)),
|
|
83
|
+
o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y(T2.pageContext, o3, W);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
const o2 =
|
|
86
|
+
const o2 = T2.configure.props ? T2.configure.props.base : null;
|
|
87
87
|
if (o2 && o2.prop) {
|
|
88
88
|
let e4 = o2.prop;
|
|
89
|
-
e4 =
|
|
89
|
+
e4 = P(e4), _(T2.pageContext, e4);
|
|
90
90
|
}
|
|
91
91
|
!function() {
|
|
92
|
-
if (!
|
|
93
|
-
const e4 =
|
|
94
|
-
"table" !==
|
|
95
|
-
let e5 =
|
|
96
|
-
e5 || (e5 =
|
|
92
|
+
if (!W.value) return;
|
|
93
|
+
const e4 = B(T2.pageContext, T2.configure);
|
|
94
|
+
"table" !== T2.configure.name && e4 && e4.isCalcHeight && v(() => {
|
|
95
|
+
let e5 = W.value.$el;
|
|
96
|
+
e5 || (e5 = W.value);
|
|
97
97
|
const o3 = e5.parentNode;
|
|
98
98
|
if (!e5 || !o3) return;
|
|
99
99
|
const t2 = e5.getBoundingClientRect();
|
|
100
100
|
let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
|
|
101
|
-
|
|
101
|
+
R(n2) && (i2 = n2 + "px"), q.value.height = i2, q.value["overflow-y"] = "auto", q.value["overflow-x"] = "hidden", T2.configure.sytle || (T2.configure.sytle = {}), T2.configure.sytle._heightStyle = i2;
|
|
102
102
|
});
|
|
103
103
|
}();
|
|
104
104
|
}
|
|
105
|
+
let K;
|
|
105
106
|
i(() => {
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
Q(), G.countComponentsLoadedNumber(), K = setTimeout(() => {
|
|
108
|
+
G.componentsTotalNmber !== G.componentsLoadedNumber || G.pageComponentsLoaded || G.setPageComponentsLoaded(true);
|
|
108
109
|
}, 100);
|
|
110
|
+
}), s(() => {
|
|
111
|
+
K && clearTimeout(K);
|
|
109
112
|
});
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
112
|
-
let e3 =
|
|
113
|
-
e3 || (e3 =
|
|
113
|
+
const Q = () => {
|
|
114
|
+
if (!W.value) return;
|
|
115
|
+
let e3 = W.value.$el;
|
|
116
|
+
e3 || (e3 = W.value);
|
|
114
117
|
const o2 = e3.parentNode;
|
|
115
118
|
if (!e3 || !o2) return;
|
|
116
|
-
const t2 =
|
|
119
|
+
const t2 = T2.configure.props ? T2.configure.props : {}, n2 = T2.configure.style ? T2.configure.style : {}, i2 = t2.position;
|
|
117
120
|
if ("top" == i2 || "bottom" == i2) {
|
|
118
121
|
const t3 = [o2];
|
|
119
122
|
if (t3 && t3.length > 0) {
|
|
120
123
|
const e4 = t3[0].getBoundingClientRect();
|
|
121
|
-
"top" == i2 && (
|
|
124
|
+
"top" == i2 && (q.value.top = e4.top + "px"), "bottom" == i2 && (q.value.bottom = "10px");
|
|
122
125
|
}
|
|
123
126
|
const n3 = e3.getBoundingClientRect();
|
|
124
|
-
|
|
125
|
-
} else if (n2.position && (
|
|
126
|
-
if (!
|
|
127
|
+
q.value.width = n3.width + "px";
|
|
128
|
+
} else if (n2.position && (q.value.position = n2.position, "relative" != q.value.position)) {
|
|
129
|
+
if (!q.value.width) {
|
|
127
130
|
const o3 = e3.getBoundingClientRect();
|
|
128
|
-
|
|
131
|
+
q.value.width = o3.width + "px";
|
|
129
132
|
}
|
|
130
|
-
n2.left && (
|
|
133
|
+
n2.left && (q.value.left = n2.left + "px"), n2.top && (q.value.top = n2.top + "px");
|
|
131
134
|
}
|
|
132
135
|
};
|
|
133
136
|
return (e3, o2) => {
|
|
134
|
-
const t2 =
|
|
135
|
-
return
|
|
137
|
+
const t2 = r("permission");
|
|
138
|
+
return p(S)(e3.configure) ? u((c(), a(g(F.value), { key: 0, ref: I, style: d(q.value), class: f(z.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, p(H)], [t2, p($) ? p($) : "true"]]) : l("", true);
|
|
136
139
|
};
|
|
137
140
|
} });
|
|
138
141
|
export {
|
|
139
|
-
|
|
142
|
+
T as default
|
|
140
143
|
};
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t,
|
|
2
|
-
import { deepCopy as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { updateOptionDatasources as
|
|
6
|
-
import { initPageEvents as
|
|
7
|
-
import { setHomeChartInitConfigValue as
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
return
|
|
1
|
+
import { defineComponent as e, ref as t, onUnmounted as a, resolveDirective as i, withDirectives as n, createElementBlock as r, openBlock as o, createBlock as s, createCommentVNode as l, unref as m } from "vue";
|
|
2
|
+
import { deepCopy as u } from "../utils/common-util.js";
|
|
3
|
+
import h from "./assemblys/home-chart-render.vue.js";
|
|
4
|
+
import g from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import { updateOptionDatasources as c, updateChartDatasources as d } from "../utils/page-helper-util.js";
|
|
6
|
+
import { initPageEvents as p } from "../utils/events/event-util.js";
|
|
7
|
+
import { setHomeChartInitConfigValue as f } from "../utils/charts/chart-util.js";
|
|
8
|
+
const C = { "element-loading-text": "加载中..." }, v = e({ name: "HomeChart", inheritAttrs: false, __name: "home-chart", props: { chartCode: { type: String, default: "" }, homeChartSettingUserId: { type: Number, default: 0 } }, setup(e2) {
|
|
9
|
+
const v2 = e2, y = t(true), S = t(false), b = t({});
|
|
10
|
+
let I, U = t(null);
|
|
11
|
+
return v2.chartCode && g.get(window.$vueApp.config.globalProperties.baseAPI + "/mms/home-chart-layout/" + v2.chartCode).then((e3) => {
|
|
12
12
|
if (e3 && e3.designJson) {
|
|
13
13
|
const t2 = JSON.parse(e3.designJson);
|
|
14
14
|
let a2 = window.localStorage.getItem("HOME_MY_CHARTS_ALIAS");
|
|
15
15
|
if (a2) {
|
|
16
16
|
const e4 = JSON.parse(a2);
|
|
17
|
-
e4[
|
|
17
|
+
e4[v2.homeChartSettingUserId] && (t2.chartJson.runtime.headerInfo ? t2.chartJson.runtime.headerInfo.title = e4[v2.homeChartSettingUserId] : t2.chartJson.runtime.headerInfo = { textAlign: "center", title: e4[v2.homeChartSettingUserId] });
|
|
18
18
|
}
|
|
19
19
|
const i2 = window.frameElement;
|
|
20
|
-
|
|
20
|
+
b.value = t2.chartJson, b.value.homeChartSettingUserId = v2.homeChartSettingUserId, i2 && (b.value.runtime.common.style.pc_style.height = i2.clientHeight + "px");
|
|
21
21
|
const n2 = { showHomepageSearch: true, name: e3.pageName, code: e3.pageCode, label: "", dimensions: "", version: 1, isWorkflowEntity: false, variables: t2.variables, systemCode: e3.systemCode, uuid: e3.uuid, allChartUuids: [], backendUrl: e3.backendUrl, rules: {}, pageType: "chart", beanName: t2.beanName, initChartServiceConfigs: [t2.initChartServiceConfigs], entity: { data: {}, task: {}, request: {}, page: {}, context: e3.contextParam, system: e3.systemParam } };
|
|
22
22
|
if (t2.variables) {
|
|
23
23
|
const e4 = n2.entity.page;
|
|
24
24
|
for (const a3 of t2.variables) a3.name && (a3.isArrayElement ? e4[a3.name] = [] : a3.defaultValue ? e4[a3.name] = a3.defaultValue : e4[a3.name] = void 0);
|
|
25
25
|
}
|
|
26
|
-
t2.initOptionConfigs && t2.initOptionConfigs.length > 0 &&
|
|
26
|
+
t2.initOptionConfigs && t2.initOptionConfigs.length > 0 && c(n2, t2.initOptionConfigs, void 0), f(b.value.pushHomepage.initConfig, n2, v2.homeChartSettingUserId), p(t2, n2), U.value = n2, I = setTimeout(() => {
|
|
27
27
|
!function(e4, t3) {
|
|
28
28
|
if (!t3 || 0 == t3.length) return;
|
|
29
|
-
e4.initChartData = {}, e4.initChartData.data =
|
|
30
|
-
}(
|
|
29
|
+
e4.initChartData = {}, e4.initChartData.data = u(e4.entity.data), e4.initChartData.page = u(e4.entity.page), t3 && t3.length > 0 && d(e4, t3, null, true);
|
|
30
|
+
}(U.value, [t2.initChartServiceConfigs]);
|
|
31
31
|
}, 200);
|
|
32
|
-
} else
|
|
32
|
+
} else S.value = true;
|
|
33
33
|
}).finally(() => {
|
|
34
|
-
|
|
34
|
+
y.value = false;
|
|
35
|
+
}), a(() => {
|
|
36
|
+
I && clearTimeout(I);
|
|
35
37
|
}), (e3, t2) => {
|
|
36
|
-
const
|
|
37
|
-
return
|
|
38
|
+
const a2 = i("loading");
|
|
39
|
+
return n((o(), r("div", C, [y.value ? l("", true) : (o(), s(h, { key: 0, configure: b.value, pageContext: m(U) }, null, 8, ["configure", "pageContext"]))])), [[a2, y.value]]);
|
|
38
40
|
};
|
|
39
41
|
} });
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
v as default
|
|
42
44
|
};
|