super-page-runtime 2.3.37-sit3 → 2.3.37-sit4
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/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +47 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +3 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +46 -44
- package/dist/es/components/runtime/utils/events/event-util.js +121 -121
- package/dist/es/components/runtime/utils/events/print-label.js +35 -33
- package/dist/es/components/runtime/utils/events/standard-event.js +600 -588
- package/dist/es/components/runtime/utils/events/validator-util.js +154 -150
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +125 -120
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +14 -10
- 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 +11 -9
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -15
- 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 +67 -67
- 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 +27 -23
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +3 -1
- 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 +63 -63
- 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 +22 -20
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +123 -120
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +39 -38
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +26 -26
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +36 -35
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +55 -54
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +8 -6
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +41 -41
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +28 -27
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +25 -23
- package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -4
- package/dist/es/components/runtime/views/super-page.vue2.js +191 -190
- package/package.json +1 -1
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as u, createElementBlock as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as u, createElementBlock as o, createBlock as i, openBlock as s, normalizeStyle as p, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, createSlots as y, withCtx as g, createCommentVNode as m, createTextVNode as d } from "vue";
|
|
2
2
|
import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue as h, formatValueByType as k } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { SuperIcon as w } from "agilebuilder-ui";
|
|
5
5
|
import { getCustomFunc as T, handleAfterInitEvent as C, handleFormEvent as _ } from "../../../../utils/events/event-util.js";
|
|
6
6
|
import { $t as I } from "../../../../utils/i18n-util.js";
|
|
7
7
|
const b = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px" } }, V = { style: { overflow: "hidden", "white-space": "nowrap" } }, j = ["title"], R = e({ __name: "label-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: R2 }) {
|
|
8
|
-
const
|
|
9
|
-
let q = x(
|
|
10
|
-
const O =
|
|
11
|
-
const B = t(W.value.options ? W.value.options : []), G = W.value.formatType
|
|
12
|
-
|
|
8
|
+
const P = e2, S = P.pageContext.entity ? P.pageContext.entity : {};
|
|
9
|
+
let q = x(P.pageContext, P.configure);
|
|
10
|
+
const O = P.configure.runtime ? P.configure.runtime : {}, A = O.style, z = O.class, D = O.headerStyle, E = O.appendClass, F = O.appendStyle, N = O.titleExceedStyle, W = t(O.props ? O.props : {});
|
|
11
|
+
const B = t(W.value.options ? W.value.options : []), G = W.value.formatType;
|
|
12
|
+
console.log("designProperty.value", W.value);
|
|
13
|
+
const H = l(() => {
|
|
14
|
+
let e3 = h(S, q);
|
|
13
15
|
if (G) if (W.value.hasOptions) {
|
|
14
16
|
let t2 = null;
|
|
15
17
|
B.value && (t2 = B.value.filter((t3) => t3.value == e3)), t2 && t2.length > 0 && (e3 = t2[0].label);
|
|
16
18
|
} else if ("custom" === G) {
|
|
17
|
-
const t2 = T(
|
|
18
|
-
t2 && (e3 = t2.apply(t2, [{ pageContext:
|
|
19
|
+
const t2 = T(P.pageContext, W.value.formatFunc);
|
|
20
|
+
t2 && (e3 = t2.apply(t2, [{ pageContext: P.pageContext, configureObj: P.configure, value: e3 }]));
|
|
19
21
|
} else e3 = k(e3, G, W.value);
|
|
20
22
|
return e3 = null == e3 ? "" : e3, e3;
|
|
21
23
|
}), J = t(null), K = t(null), L = t(null);
|
|
22
24
|
return n(() => {
|
|
23
25
|
a(() => {
|
|
24
26
|
const e3 = H.value;
|
|
25
|
-
C(e3,
|
|
27
|
+
C(e3, P.pageContext, P.configure, { formItemRef: J.value, componentRef: K.value, titleRef: L.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
|
|
26
28
|
});
|
|
27
29
|
}), R2({ updateOptions: function(e3) {
|
|
28
30
|
B.value = e3 || [];
|
|
29
31
|
} }), (e3, t2) => {
|
|
30
32
|
const l2 = u("el-form-item");
|
|
31
|
-
return W.value.whetherTittle ? (s(),
|
|
33
|
+
return W.value.whetherTittle ? (s(), o("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: p(f(A)) }, [c("div", b, v(W.value.title), 1)], 6)) : W.value.tittleShow ? (s(), i(l2, { key: 1, ref_key: "formItemRef", ref: J, required: !!W.value.required, class: r([f(z), W.value.contentAlign ? "form-item-align-" + W.value.contentAlign : "formNo" === W.value.showType ? "form-item-align-flex-end" : ""]), "label-width": W.value.labelWidth, style: p(f(A)) }, y({ default: g(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: t2[0] || (t2[0] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", V, [W.value.preIconValue || W.value.preText ? (s(), o("span", { key: 0, class: r({ "el-input__suffix": "outer" != W.value.iconPosition, "el-input-group__append": "outer" == W.value.iconPosition }), style: p(f(F)) }, [W.value.preIconType && W.value.preIconValue ? (s(), i(f(w), { key: 0, iconType: W.value.preIconType, iconValue: W.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : m("", true), d(" " + v(f(I)(W.value.preText)), 1)], 6)) : m("", true), d(" " + v(H.value), 1)]), W.value.sufIconValue || W.value.sufText ? (s(), o("span", { key: 0, class: r({ "el-input__suffix": "outer" != W.value.iconPosition, "el-input-group__append": "outer" == W.value.iconPosition }) }, [W.value.sufIconType && W.value.sufIconValue ? (s(), i(f(w), { key: 0, style: {}, iconType: W.value.sufIconType, iconValue: W.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : m("", true), c("span", null, " " + v(f(I)(W.value.sufText)), 1)], 2)) : m("", true)], 512)]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: g(() => [c("div", { ref_key: "titleRef", ref: L, style: p({ ...f(D), ...f(N) }) }, v(f(I)(W.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : (s(), o("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: t2[1] || (t2[1] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(W.value.prefixIcon) + " " + v(H.value), 9, j), W.value.suffixTxt ? (s(), o("span", { key: 0, class: r(f(E)), style: p(f(F)) }, v(W.value.suffixTxt), 7)) : m("", true)]));
|
|
32
34
|
};
|
|
33
35
|
} });
|
|
34
36
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as i, resolveComponent as a, createBlock as u, openBlock as o, normalizeStyle as r, normalizeClass as s, unref as p, createSlots as c, withCtx as f, createVNode as g, createCommentVNode as d, createTextVNode as m, toDisplayString as v, createElementVNode as y } from "vue";
|
|
2
2
|
import { getFormModelFields as b } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue as k } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as x, handleEvent as C } from "../../../../utils/events/event-util.js";
|
|
@@ -7,7 +7,9 @@ import { SuperIcon as h } from "agilebuilder-ui";
|
|
|
7
7
|
import { analysisValue as R } from "agilebuilder-ui/src/utils/util";
|
|
8
8
|
const T = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
9
9
|
var _a;
|
|
10
|
-
const T2 = e2, j = b(T2.pageContext, T2.configure), w = T2.configure.runtime ? T2.configure.runtime : {},
|
|
10
|
+
const T2 = e2, j = b(T2.pageContext, T2.configure), w = T2.configure.runtime ? T2.configure.runtime : {}, P = w.style, V = w.class, I = w.headerStyle, S = t(w.props ? w.props : {});
|
|
11
|
+
console.log("designProperty", S.value);
|
|
12
|
+
const $ = t();
|
|
11
13
|
((_a = T2.configure.props) == null ? void 0 : _a.linkPage) && ($.value = T2.configure.props.linkPage);
|
|
12
14
|
let q = S.value.formatting;
|
|
13
15
|
const D = T2.pageContext.entity ? T2.pageContext.entity : {}, J = l(() => {
|
|
@@ -26,14 +28,14 @@ const T = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} },
|
|
|
26
28
|
return e3 = null == e3 || null == e3 ? "" : e3, W.replace(/\${value}/g, e3);
|
|
27
29
|
}));
|
|
28
30
|
const A = t(null), B = t(null), E = t(null);
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
+
return n(() => {
|
|
32
|
+
i(() => {
|
|
31
33
|
const e3 = J.value;
|
|
32
34
|
x(e3, T2.pageContext, T2.configure, { formItemRef: A.value, componentRef: B.value, titleRef: E.value, value: e3, entity: T2.pageContext.entity.data, pageData: T2.pageContext.entity.page });
|
|
33
35
|
});
|
|
34
36
|
}), (e3, t2) => {
|
|
35
|
-
const l2 = a("el-link"),
|
|
36
|
-
return o(), u(
|
|
37
|
+
const l2 = a("el-link"), n2 = a("el-tooltip"), i2 = a("el-form-item");
|
|
38
|
+
return o(), u(i2, { ref_key: "formItemRef", ref: A, class: s(p(V)), "label-width": S.value.labelWidth, style: r(p(P)) }, c({ default: f(() => [g(n2, { disabled: !p(z), content: p(z) }, { default: f(() => [g(l2, { ref_key: "componentRef", ref: B, disabled: "disabled" === S.value.state, type: S.value.type, underline: S.value.underline, onClick: t2[0] || (t2[0] = (t3) => p(C)(t3, e3.pageContext, e3.configure, "click", { skipValidate: true })) }, { default: f(() => [$.value ? (o(), u(p(h), { key: 0, iconType: $.value.iconType, iconValue: $.value.icon }, null, 8, ["iconType", "iconValue"])) : d("", true), m(" " + v(J.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 2 }, [S.value.tittleShow ? { name: "label", fn: f(() => [y("div", { ref_key: "titleRef", ref: E, style: r({ ...p(I) }), class: "amb-form-item-label" }, v(p(_)(S.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "label-width", "style"]);
|
|
37
39
|
};
|
|
38
40
|
} });
|
|
39
41
|
export {
|
|
@@ -47,6 +47,7 @@ const z = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
|
|
|
47
47
|
Z && clearTimeout(Z), Z = setTimeout(function() {
|
|
48
48
|
const e3 = X();
|
|
49
49
|
e3 != Y && (Y = e3, j(O.pageContext, ee, void 0).then((e4) => {
|
|
50
|
+
console.log("查询失败!", e4);
|
|
50
51
|
}));
|
|
51
52
|
}, 200);
|
|
52
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, watch as
|
|
1
|
+
import { defineComponent as e, ref as t, watch as n, onMounted as l, nextTick as o, onBeforeUnmount as i, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as p, normalizeStyle as f, normalizeClass as m, unref as v, createSlots as g, withCtx as h, createElementVNode as b, toDisplayString as y } from "vue";
|
|
2
2
|
import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import { getSizeConfig as
|
|
3
|
+
import { getSizeConfig as w, formatVariableValue as k, getVariableValue as C, setVariableValue as q } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as T, handleFormEvent as S } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import E from "agilebuilder-ui/src/utils/request";
|
|
6
6
|
import { $t as A } from "../../../../utils/i18n-util.js";
|
|
@@ -14,10 +14,10 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
14
14
|
const D = [false, "Source Han Sans CN", "SimSun", "SimHei", "Microsoft YaHei", "KaiTi", "FangSong", "Arial", "Times New Roman", "Verdana", "Georgia", "Courier New"], W = M.import("attributors/style/font");
|
|
15
15
|
W.whitelist = D, M.register(W, true);
|
|
16
16
|
const P = e2, G = t(""), I = P.pageContext.entity ? P.pageContext.entity : {}, K = x(P.pageContext, P.configure), O = P.configure.runtime ? P.configure.runtime : {}, Y = O.style, J = O.class, Q = O.headerStyle, X = O.titleExceedStyle, Z = t(O.props ? O.props : {});
|
|
17
|
-
let ee =
|
|
17
|
+
let ee = w(P.pageContext, P.configure);
|
|
18
18
|
ee && ee.fixHeight && (Y.height || (Y.height = ee.fixHeight + "px"));
|
|
19
19
|
let te = Z.value.value;
|
|
20
|
-
const
|
|
20
|
+
const ne = k(P.pageContext, te), le = t(null);
|
|
21
21
|
let oe = null;
|
|
22
22
|
const ie = t(false), ae = t(0), re = t(false), ue = t(false), se = t("");
|
|
23
23
|
let ce = null, de = Z.value.state;
|
|
@@ -29,11 +29,11 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
29
29
|
if (!(oe == null ? void 0 : oe.container)) return;
|
|
30
30
|
const e3 = oe.container.parentNode;
|
|
31
31
|
if (!e3) return;
|
|
32
|
-
const t2 = e3.getBoundingClientRect(),
|
|
33
|
-
let
|
|
34
|
-
|
|
32
|
+
const t2 = e3.getBoundingClientRect(), n2 = oe.container.getBoundingClientRect();
|
|
33
|
+
let l2 = t2.height - (n2.top - t2.top);
|
|
34
|
+
l2 -= 24, oe.container.style.height = Math.max(l2, 100) + "px";
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
n(Z.value, () => {
|
|
37
37
|
const e3 = Z.value.state;
|
|
38
38
|
if (null != e3 && e3 !== de) {
|
|
39
39
|
de = e3;
|
|
@@ -42,8 +42,8 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
const ge = t([]), he = t(false), be = t(null), ye = t(null), xe = t(null);
|
|
45
|
-
let
|
|
46
|
-
function
|
|
45
|
+
let we = null;
|
|
46
|
+
function ke(e3) {
|
|
47
47
|
const t2 = e3.match(/serverPath=([^&"]+)/);
|
|
48
48
|
return t2 ? t2[1] : "";
|
|
49
49
|
}
|
|
@@ -51,16 +51,16 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
51
51
|
if (!oe) return;
|
|
52
52
|
const t2 = function(e4) {
|
|
53
53
|
let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
|
|
54
|
-
const
|
|
55
|
-
return `<img src="${L(
|
|
54
|
+
const n3 = ke(t4), l2 = P.pageContext.backendUrl;
|
|
55
|
+
return `<img src="${L(l2, P.pageContext.isTest)}/common/fs-upload/download?serverPath=${n3}&isShowWatermark=false" data-uuid="${n3}"`;
|
|
56
56
|
});
|
|
57
57
|
return t3 = t3.replace(/\t/g, " "), t3 = t3.replace(/ {2}/g, " "), t3;
|
|
58
|
-
}(e3),
|
|
59
|
-
oe.setContents(
|
|
58
|
+
}(e3), n2 = oe.clipboard.convertHTML(t2);
|
|
59
|
+
oe.setContents(n2.ops), o(() => {
|
|
60
60
|
if (!oe) return;
|
|
61
61
|
oe.root.querySelectorAll("img").forEach((e4) => {
|
|
62
62
|
if (!e4.getAttribute("data-uuid")) {
|
|
63
|
-
const t3 =
|
|
63
|
+
const t3 = ke(e4.src);
|
|
64
64
|
e4.setAttribute("data-uuid", t3);
|
|
65
65
|
}
|
|
66
66
|
});
|
|
@@ -81,7 +81,7 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
81
81
|
ae.value = e3.length;
|
|
82
82
|
}
|
|
83
83
|
function Ae() {
|
|
84
|
-
N.error({ message: "图片上传失败,请重试", duration: 3e3 });
|
|
84
|
+
console.warn("图片上传失败"), N.error({ message: "图片上传失败,请重试", duration: 3e3 });
|
|
85
85
|
}
|
|
86
86
|
function Le(e3) {
|
|
87
87
|
"Escape" === e3.key && ie.value && (ie.value = false, o(() => {
|
|
@@ -90,7 +90,7 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
90
90
|
}
|
|
91
91
|
function He(e3) {
|
|
92
92
|
var _a;
|
|
93
|
-
oe && (null !== e3.relatedTarget && ((_a =
|
|
93
|
+
oe && (null !== e3.relatedTarget && ((_a = le.value) == null ? void 0 : _a.contains(e3.relatedTarget)) || S(oe.root.innerHTML, P.pageContext, P.configure, "change", { entity: I }));
|
|
94
94
|
}
|
|
95
95
|
function Me(e3) {
|
|
96
96
|
if ("img" === e3.target.localName) {
|
|
@@ -102,49 +102,49 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
102
102
|
function Ne(e3) {
|
|
103
103
|
const t2 = new FormData();
|
|
104
104
|
t2.append("file", e3);
|
|
105
|
-
const
|
|
106
|
-
return E.post(
|
|
105
|
+
const n2 = P.pageContext.backendUrl, l2 = L(n2, P.pageContext.isTest);
|
|
106
|
+
return E.post(l2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
|
|
107
107
|
}
|
|
108
108
|
function Re(e3, t2) {
|
|
109
|
-
const
|
|
109
|
+
const n2 = e3.split(","), l2 = n2[0].match(/:(.*?);/), o2 = l2 ? l2[1] : "image/png", i2 = atob(n2[1]);
|
|
110
110
|
let a2 = i2.length;
|
|
111
111
|
const r2 = new Uint8Array(a2);
|
|
112
112
|
for (; a2--; ) r2[a2] = i2.charCodeAt(a2);
|
|
113
113
|
return new File([r2], t2, { type: o2 });
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return l(() => {
|
|
116
116
|
var _a;
|
|
117
|
-
|
|
117
|
+
le.value && (oe = new M(le.value, me.value), oe.root.style.fontSize = "16px", function() {
|
|
118
118
|
var _a2, _b;
|
|
119
|
-
const e3 = (_b = (_a2 =
|
|
119
|
+
const e3 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
|
|
120
120
|
if (!e3) return;
|
|
121
121
|
e3.querySelectorAll("button").forEach((e4) => {
|
|
122
122
|
const t2 = e4.className.match(/ql-([\w-]+)/);
|
|
123
123
|
if (t2) {
|
|
124
|
-
const
|
|
125
|
-
qe[
|
|
124
|
+
const n2 = t2[1], l2 = `${n2}[value="${e4.value}"]`;
|
|
125
|
+
qe[l2] ? e4.setAttribute("data-tooltip", qe[l2]) : qe[n2] && e4.setAttribute("data-tooltip", qe[n2]);
|
|
126
126
|
}
|
|
127
127
|
}), e3.querySelectorAll(".ql-picker").forEach((e4) => {
|
|
128
128
|
const t2 = e4.className.match(/ql-(\w+)/);
|
|
129
129
|
if (t2) {
|
|
130
|
-
const
|
|
131
|
-
if (qe[
|
|
130
|
+
const n2 = t2[1];
|
|
131
|
+
if (qe[n2]) {
|
|
132
132
|
const t3 = e4.querySelector(".ql-picker-label");
|
|
133
|
-
t3 && t3.setAttribute("data-tooltip", qe[
|
|
133
|
+
t3 && t3.setAttribute("data-tooltip", qe[n2]);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
}(), function() {
|
|
138
138
|
var _a2, _b;
|
|
139
|
-
const e3 = (_b = (_a2 =
|
|
139
|
+
const e3 = (_b = (_a2 = le.value) == null ? void 0 : _a2.parentElement) == null ? void 0 : _b.querySelector(".ql-toolbar");
|
|
140
140
|
e3 && e3.addEventListener("mousedown", (e4) => {
|
|
141
141
|
e4.preventDefault();
|
|
142
142
|
});
|
|
143
|
-
}(), Ce(
|
|
143
|
+
}(), Ce(ne), (_a = le.value) == null ? void 0 : _a.addEventListener("focusout", He), oe.on("text-change", async function(e3) {
|
|
144
144
|
if (!oe) return;
|
|
145
145
|
const t2 = oe.root.getElementsByTagName("img");
|
|
146
146
|
for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
|
|
147
|
-
const t3 =
|
|
147
|
+
const t3 = ke(e4.src);
|
|
148
148
|
e4.setAttribute("data-uuid", t3);
|
|
149
149
|
}
|
|
150
150
|
if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
|
|
@@ -154,12 +154,12 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
154
154
|
if (!t4.startsWith("data:image")) continue;
|
|
155
155
|
try {
|
|
156
156
|
re.value = true;
|
|
157
|
-
const e5 = Re(t4, "image.png"),
|
|
157
|
+
const e5 = Re(t4, "image.png"), n2 = await Ne(e5);
|
|
158
158
|
if (!oe) return;
|
|
159
|
-
const
|
|
160
|
-
for (const e6 of
|
|
159
|
+
const l2 = oe.root.getElementsByTagName("img");
|
|
160
|
+
for (const e6 of l2) e6.src === t4 && (e6.width = 300, e6.src = n2.url, e6.setAttribute("data-uuid", n2.uuid));
|
|
161
161
|
} catch (e5) {
|
|
162
|
-
Ae();
|
|
162
|
+
console.error("上传图片失败", e5), Ae();
|
|
163
163
|
} finally {
|
|
164
164
|
re.value = false;
|
|
165
165
|
}
|
|
@@ -173,14 +173,14 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
173
173
|
q(I, K, e4), e4 && (G.value = "");
|
|
174
174
|
}, 300);
|
|
175
175
|
}(), Ee();
|
|
176
|
-
}), Ee(),
|
|
176
|
+
}), Ee(), we = oe.container, we.addEventListener("click", Me), ve(), o(() => {
|
|
177
177
|
const e3 = C(I, K);
|
|
178
178
|
T(e3, P.pageContext, P.configure, { formItemRef: be.value, componentRef: ye.value, titleRef: xe.value, value: e3, entity: P.pageContext.entity.data, pageData: P.pageContext.entity.page });
|
|
179
179
|
}));
|
|
180
|
-
}),
|
|
180
|
+
}), l(() => {
|
|
181
181
|
document.addEventListener("keydown", Le);
|
|
182
182
|
}), i(() => {
|
|
183
|
-
document.removeEventListener("keydown", Le), ce && clearTimeout(ce),
|
|
183
|
+
document.removeEventListener("keydown", Le), ce && clearTimeout(ce), le.value && le.value.removeEventListener("focusout", He), we && we.removeEventListener("click", Me);
|
|
184
184
|
}), B2({ addRequiredClass: function() {
|
|
185
185
|
G.value = H();
|
|
186
186
|
}, setContent: function(e3) {
|
|
@@ -188,10 +188,10 @@ const R = { class: "toolbar-right-btns" }, _ = ["title"], j = { class: "richtext
|
|
|
188
188
|
}, getContent: function() {
|
|
189
189
|
return oe ? oe.root.innerHTML : "";
|
|
190
190
|
} }), (e3, t2) => {
|
|
191
|
-
const
|
|
192
|
-
return u(), r(s, null, [c(x2, { required: Z.value.required, class: m(v(J) + (G.value ? " " + G.value : "")), "label-width": Z.value.labelWidth, style: f(v(Y)) }, g({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": ie.value }]) }, [b("div", { ref_key: "quillEditorRef", ref:
|
|
191
|
+
const n2 = a("View"), l2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), x2 = a("el-form-item"), w2 = a("el-image-viewer"), k2 = a("el-dialog");
|
|
192
|
+
return u(), r(s, null, [c(x2, { required: Z.value.required, class: m(v(J) + (G.value ? " " + G.value : "")), "label-width": Z.value.labelWidth, style: f(v(Y)) }, g({ default: h(() => [b("div", { class: m(["richtext-wrapper", { "is-fullscreen": ie.value }]) }, [b("div", { ref_key: "quillEditorRef", ref: le, style: { width: "100%" } }, null, 512), b("div", R, [b("button", { type: "button", class: "toolbar-btn", onClick: Se, title: "预览" }, [c(l2, null, { default: h(() => [c(n2)]), _: 1 })]), b("button", { type: "button", class: "toolbar-btn", onClick: Te, title: ie.value ? "退出全屏" : "全屏编辑" }, [ie.value ? (u(), d(l2, { key: 1 }, { default: h(() => [c(i2)]), _: 1 })) : (u(), d(l2, { key: 0 }, { default: h(() => [c(o2)]), _: 1 }))], 8, _)]), b("div", j, [b("span", V, "字数:" + y(ae.value), 1)]), re.value ? (u(), r("div", $, t2[2] || (t2[2] = [b("div", { class: "loading-spinner" }, null, -1), b("span", null, "图片上传中...", -1)]))) : p("", true)], 2)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: h(() => [b("div", { style: f({ ...v(Q), ...v(X) }), class: "amb-form-item-label" }, y(v(A)(Z.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]), he.value ? (u(), d(w2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
|
|
193
193
|
he.value = false;
|
|
194
|
-
}), "url-list": ge.value }, null, 8, ["url-list"])) : p("", true), c(
|
|
194
|
+
}), "url-list": ge.value }, null, 8, ["url-list"])) : p("", true), c(k2, { modelValue: ue.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ue.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: h(() => [b("div", { class: "richtext-preview-content ql-editor", innerHTML: se.value }, null, 8, z)]), _: 1 }, 8, ["modelValue"])], 64);
|
|
195
195
|
};
|
|
196
196
|
} });
|
|
197
197
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, computed as t, watch as o, onUnmounted as a, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as l, computed as t, watch as o, onUnmounted as a, onMounted as n, nextTick as i, resolveComponent as r, createBlock as u, openBlock as s, normalizeStyle as p, normalizeClass as c, unref as f, createSlots as v, withCtx as g, createVNode as m, createElementVNode as d, withKeys as y, withModifiers as h, createCommentVNode as b, createElementBlock as x, Fragment as C, renderList as _, toDisplayString as w, createTextVNode as S } from "vue";
|
|
2
2
|
import { setVariableValue as k, getOptionDatasFromPage as A, queryOptionDatasources as T, autoSetAfterSelect as j, getVariableValue as R } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields as P } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleFormEvent as V, handleAfterInitEvent as M } from "../../../../utils/events/event-util.js";
|
|
5
|
-
import
|
|
6
|
-
import { $t as
|
|
7
|
-
import { addRequiredClassUtil as
|
|
5
|
+
import q from "../common/title-suffix-element.vue.js";
|
|
6
|
+
import { $t as D } from "../../../../utils/i18n-util.js";
|
|
7
|
+
import { addRequiredClassUtil as I } from "../../../../utils/common-util.js";
|
|
8
8
|
import { CopyDocument as z } from "@element-plus/icons-vue";
|
|
9
9
|
import E from "clipboard";
|
|
10
10
|
import { ElMessage as O } from "element-plus";
|
|
@@ -12,54 +12,54 @@ import { useI18n as W } from "vue-i18n";
|
|
|
12
12
|
const B = { style: { "padding-left": "5px" } }, F = { style: { width: "100%", display: "flex", "align-items": "center" } }, G = { key: 0, style: { display: "flex", "flex-direction": "column" } }, K = { style: { color: "var(--el-text-color-secondary)", "font-size": "13px" } }, L = { style: { float: "left" } }, U = { style: { float: "right", color: "var(--el-text-color-secondary)" } }, $ = "__amb_select_all__", H = e({ __name: "select-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: H2 }) {
|
|
13
13
|
const { t: J } = W(), N = e2, Q = l(null), X = l(false), Y = N.pageContext.entity ? N.pageContext.entity : {};
|
|
14
14
|
let Z = P(N.pageContext, N.configure);
|
|
15
|
-
const ee = N.configure.runtime ? N.configure.runtime : {}, le = ee.style, te = ee.class, oe = ee.headerStyle, ae = ee.titleExceedStyle,
|
|
16
|
-
let
|
|
15
|
+
const ee = N.configure.runtime ? N.configure.runtime : {}, le = ee.style, te = ee.class, oe = ee.headerStyle, ae = ee.titleExceedStyle, ne = l(ee.props ? ee.props : {});
|
|
16
|
+
let ie = l(ne.value.optionDescriptionPosition && "default" !== ne.value.optionDescriptionPosition), re = [];
|
|
17
17
|
const ue = "copyBtn_" + N.configure.uuid + "_" + (/* @__PURE__ */ new Date()).getTime();
|
|
18
18
|
function se() {
|
|
19
19
|
let e3 = R(Y, Z);
|
|
20
|
-
return null != e3 && (e3 = String(e3)),
|
|
20
|
+
return null != e3 && (e3 = String(e3)), ne.value.multiple && (e3 = e3 ? String(e3).split(",") : []), e3;
|
|
21
21
|
}
|
|
22
22
|
const pe = t({ get: () => se(), set(e3) {
|
|
23
23
|
const l2 = se();
|
|
24
24
|
re = Array.isArray(l2) ? [...l2] : l2;
|
|
25
25
|
let t2 = e3;
|
|
26
|
-
if (
|
|
26
|
+
if (ne.value.multiple && false !== ne.value.showSelectAll && Array.isArray(e3) && e3.includes($)) {
|
|
27
27
|
const e4 = (ce.value || []).map((e5) => String(e5.value)), o2 = Array.isArray(l2) ? l2.map((e5) => String(e5)) : [];
|
|
28
28
|
t2 = e4.length > 0 && e4.every((e5) => o2.includes(e5)) ? [] : e4;
|
|
29
29
|
}
|
|
30
|
-
if (
|
|
31
|
-
t2 = !!
|
|
30
|
+
if (ne.value.multiple) {
|
|
31
|
+
t2 = !!ne.value.arrayValue ? Array.isArray(t2) ? t2 : t2 ? String(t2).split(",") : [] : Array.isArray(t2) ? t2.length > 0 ? t2.join(",") : "" : t2 ?? "";
|
|
32
32
|
}
|
|
33
33
|
void 0 === t2 && (t2 = null), k(Y, Z, t2), null != t2 && (Q.value = "");
|
|
34
|
-
} }), ce = l(
|
|
34
|
+
} }), ce = l(ne.value.options ? ne.value.options : []), fe = A(N.pageContext, N.configure);
|
|
35
35
|
fe.length > 0 && (ce.value = fe);
|
|
36
36
|
const ve = l(false), ge = N.configure.props && N.configure.props.dataOrigin ? N.configure.props.dataOrigin : {}, me = ge.optionValueSetType;
|
|
37
37
|
let de = [];
|
|
38
|
-
const ye =
|
|
38
|
+
const ye = ne.value.optionconfigInfo ? ne.value.optionconfigInfo : {};
|
|
39
39
|
if ("dynamicData" == me || "dataTable" == me || "service" == me) {
|
|
40
40
|
if ("remote" == ge.filterType) {
|
|
41
41
|
let e3;
|
|
42
|
-
|
|
43
|
-
e3 !== l2 && (e3 = l2, ve.value = true, T(N.pageContext, ye, l2).then((e4) => {
|
|
42
|
+
ne.value.filterable = true, ne.value.remote = true, ne.value.remoteShowSuffix = true, ne.value.remoteMethod = function(l2) {
|
|
43
|
+
e3 !== l2 && (e3 = l2, ve.value = true, console.log("query", l2), T(N.pageContext, ye, l2).then((e4) => {
|
|
44
44
|
ve.value = false;
|
|
45
45
|
}).then((e4) => {
|
|
46
|
-
ve.value = false;
|
|
46
|
+
console.log("查询失败!", e4), ve.value = false;
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
if (ge.autoSets) for (let e3 of ge.autoSets) e3.source && de.push(e3);
|
|
51
51
|
}
|
|
52
|
-
N.configure && N.configure.props && N.configure.props.base && N.configure.props.base.optionProp && de.push({ source: "label", target: N.configure.props.base.optionProp }),
|
|
52
|
+
N.configure && N.configure.props && N.configure.props.base && N.configure.props.base.optionProp && de.push({ source: "label", target: N.configure.props.base.optionProp }), ne.value.changeMethod = function(e3) {
|
|
53
53
|
var _a;
|
|
54
54
|
let l2, t2 = null;
|
|
55
|
-
ce.value && null != e3 && null != e3 && (((_a =
|
|
56
|
-
de.length > 0 && j(N.configure, N.pageContext, de, t2, [
|
|
55
|
+
ce.value && null != e3 && null != e3 && (((_a = ne.value) == null ? void 0 : _a.multiple) && false !== ne.value.showSelectAll && Array.isArray(e3) && e3.includes($) && (e3 = e3.filter((e4) => e4 !== $)), t2 = ce.value.filter((l3) => Array.isArray(e3) ? e3.includes(l3.value) : e3 === l3.value));
|
|
56
|
+
de.length > 0 && j(N.configure, N.pageContext, de, t2, [ne.value.prop]);
|
|
57
57
|
t2 && t2.length > 0 && (l2 = t2[0]);
|
|
58
58
|
let o2 = {};
|
|
59
59
|
l2 && (o2.extendParams = l2);
|
|
60
60
|
o2.options = ce.value, o2.oldValue = re, V(e3, N.pageContext, N.configure, "change", o2);
|
|
61
61
|
};
|
|
62
|
-
const he =
|
|
62
|
+
const he = ne.value.monitorFields, be = [];
|
|
63
63
|
if (he) {
|
|
64
64
|
const e3 = [];
|
|
65
65
|
for (let l2 of he) if (l2.startsWith("${")) {
|
|
@@ -80,7 +80,7 @@ const B = { style: { "padding-left": "5px" } }, F = { style: { width: "100%", di
|
|
|
80
80
|
return e4.join(",");
|
|
81
81
|
}();
|
|
82
82
|
e3 != xe && (xe = e3, ye.watchAttrValue = e3, T(N.pageContext, ye, void 0).then((e4) => {
|
|
83
|
-
ve.value = false;
|
|
83
|
+
console.log("查询失败!", e4), ve.value = false;
|
|
84
84
|
}));
|
|
85
85
|
}, 200);
|
|
86
86
|
}
|
|
@@ -111,14 +111,15 @@ const B = { style: { "padding-left": "5px" } }, F = { style: { width: "100%", di
|
|
|
111
111
|
O({ showClose: true, type: "success", message: J("superPageRuntimeMessage.copySuccess") });
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
return
|
|
114
|
+
return n(() => {
|
|
115
115
|
const e3 = new E("#" + ue, { text: function() {
|
|
116
116
|
return Te();
|
|
117
117
|
} });
|
|
118
118
|
e3.on("success", () => {
|
|
119
|
-
O({ showClose: true, type: "success", message: J("superPageRuntimeMessage.copySuccess") });
|
|
119
|
+
console.log("复制成功"), O({ showClose: true, type: "success", message: J("superPageRuntimeMessage.copySuccess") });
|
|
120
120
|
}), e3.on("error", (e4) => {
|
|
121
|
-
|
|
121
|
+
console.error("复制失败", e4);
|
|
122
|
+
}), i(() => {
|
|
122
123
|
const e4 = pe.value;
|
|
123
124
|
M(e4, N.pageContext, N.configure, { formItemRef: Se.value, componentRef: ke.value, titleRef: Ae.value, value: e4, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
|
|
124
125
|
});
|
|
@@ -141,13 +142,13 @@ const B = { style: { "padding-left": "5px" } }, F = { style: { width: "100%", di
|
|
|
141
142
|
}
|
|
142
143
|
we = true;
|
|
143
144
|
}, addRequiredClass: function() {
|
|
144
|
-
Q.value =
|
|
145
|
+
Q.value = I();
|
|
145
146
|
}, getSelectItemsTitle: Te, getOptions: function() {
|
|
146
147
|
return ce.value;
|
|
147
148
|
} }), (e3, l2) => {
|
|
148
|
-
const t2 = r("el-icon"), o2 = r("el-option"), a2 = r("el-select"),
|
|
149
|
-
return s(), u(
|
|
150
|
-
}, ["stop"]), ["space"])), onChange:
|
|
149
|
+
const t2 = r("el-icon"), o2 = r("el-option"), a2 = r("el-select"), n2 = r("el-popover"), i2 = r("el-form-item");
|
|
150
|
+
return s(), u(i2, { ref_key: "formItemRef", ref: Se, required: !!ne.value.required, class: c(f(te) + (Q.value ? " " + Q.value : "")), "label-width": ne.value.labelWidth, style: p(f(le)) }, v({ default: g(() => [m(n2, { placement: "right", trigger: "hover", width: 50, "popper-class": "custom-sel-copy-tooltip", "popper-options": { modifiers: [{ name: "flip", options: { fallbackPlacements: ["left", "top", "bottom"] } }] } }, { reference: g(() => [d("div", F, [m(a2, { ref_key: "componentRef", ref: ke, style: { flex: "1", "min-width": "0" }, disabled: "disabled" === ne.value.state, size: ne.value.size, clearable: ne.value.clearable, multiple: ne.value.multiple, "collapse-tags": ne.value.collapseTags, "collapse-tags-tooltip": ne.value.collapseTagsTooltip, filterable: ne.value.filterable, "allow-create": ne.value.allowCreate, placeholder: ne.value.placeholder, "remote-show-suffix": ne.value.remoteShowSuffix, remote: ne.value.remote, "remote-method": ne.value.remoteMethod, loading: ve.value, onKeydown: l2[0] || (l2[0] = y(h(() => {
|
|
151
|
+
}, ["stop"]), ["space"])), onChange: ne.value.changeMethod, onClear: ne.value.changeMethod, onVisibleChange: je, modelValue: pe.value, "onUpdate:modelValue": l2[1] || (l2[1] = (e4) => pe.value = e4) }, { prefix: g(() => [d("span", { class: "mobile-copy-trigger", onClick: h(Re, ["stop"]) }, [m(t2, { style: { cursor: "copy" } }, { default: g(() => [m(f(z))]), _: 1 })])]), default: g(() => [ne.value.multiple && false !== ne.value.showSelectAll ? (s(), u(o2, { key: 0, label: f(J)("superGrid.selectAll"), value: $, disabled: !(ce.value && ce.value.length > 0) }, null, 8, ["label", "disabled"])) : b("", true), (s(true), x(C, null, _(ce.value, (l3) => (s(), u(o2, { key: l3.value, label: l3.label, value: l3.value, class: c({ "option-description-newLine": f(ie) }), onClick: (t3) => f(V)(l3.value, e3.pageContext, e3.configure, "click", { values: pe.value }) }, { default: g(() => [l3._description_ ? (s(), x(C, { key: 0 }, [f(ie) ? (s(), x("div", G, [d("span", null, w(l3.label), 1), d("span", K, w(l3._description_), 1)])) : (s(), x(C, { key: 1 }, [d("span", L, w(l3.label), 1), d("span", U, w(l3._description_), 1)], 64))], 64)) : b("", true)]), _: 2 }, 1032, ["label", "value", "class", "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", "onClear", "modelValue"])])]), default: g(() => [d("span", B, [m(t2, { id: ue, style: { cursor: "copy" } }, { default: g(() => [m(f(z))]), _: 1 })])]), _: 1 })]), _: 2 }, [ne.value.tittleShow ? { name: "label", fn: g(() => [d("div", { ref_key: "titleRef", ref: Ae, style: p({ ...f(oe), ...f(ae) }), class: "amb-form-item-label" }, [ne.value.prefixType ? (s(), u(q, { key: 0, pageContext: e3.pageContext, property: ne.value }, null, 8, ["pageContext", "property"])) : (s(), x(C, { key: 1 }, [S(w(f(D)(ne.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
151
152
|
};
|
|
152
153
|
} });
|
|
153
154
|
export {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponent as e, ref as o, computed as t, watch as n, markRaw as i, onMounted as r, onUnmounted as s, withDirectives as u, createCommentVNode as l, unref as a, createBlock as p, openBlock as g, resolveDynamicComponent as c, normalizeClass as f, normalizeStyle as d, vShow as m, nextTick as C } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import { getRuntimeComponentByName as
|
|
2
|
+
import h from "./error-render.vue.js";
|
|
3
|
+
import { getRuntimeComponentByName as v } from "../../utils/assemblys-config.js";
|
|
4
4
|
import { PageDimensions as b } from "../../utils/interfaces/page-design-types.js";
|
|
5
5
|
import { addComponentRef as x, addComponentRefByCode as y } from "../../utils/global-refs.js";
|
|
6
|
-
import { getPermissionCodes as w, packageFormRules as j, getModelFields as N, controlObjectRenderState as
|
|
7
|
-
import { caculateShowCondition as
|
|
8
|
-
import { isWorkflowPage as
|
|
9
|
-
import { isShowMobileEvent as
|
|
10
|
-
import { usePageContextStore as
|
|
11
|
-
import { isHasFieldAuth as
|
|
6
|
+
import { getPermissionCodes as w, packageFormRules as j, getModelFields as N, controlObjectRenderState as _ } from "../../utils/page-init-util.js";
|
|
7
|
+
import { caculateShowCondition as H, getFormPropName as M, getSizeConfig as V } from "../../utils/page-helper-util.js";
|
|
8
|
+
import { isWorkflowPage as A, getPropClassName as S, isNumber as T } from "../../utils/common-util.js";
|
|
9
|
+
import { isShowMobileEvent as $, isShowComponent as O } from "../../utils/events/event-util.js";
|
|
10
|
+
import { usePageContextStore as P } from "../../utils/page-store.js";
|
|
11
|
+
import { isHasFieldAuth as B } from "../../utils/table-utils.js";
|
|
12
12
|
import { checkPermission as R } from "agilebuilder-ui/src/utils/permission.js";
|
|
13
13
|
import { isMobileBrowser as F } from "agilebuilder-ui/src/utils/common-util";
|
|
14
14
|
const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
@@ -18,7 +18,7 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
18
18
|
let D = null;
|
|
19
19
|
const E = w(k2.configure, k2.pageContext);
|
|
20
20
|
k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.functionCode = E);
|
|
21
|
-
const J = R(E || "true", k2.pageContext.systemCode), L =
|
|
21
|
+
const J = R(E || "true", k2.pageContext.systemCode), L = B(k2.pageContext, k2.configure), W = J && L;
|
|
22
22
|
k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.isHasFieldAuthPermission = W), j(k2.pageContext, k2.configure, W);
|
|
23
23
|
let q = o(null), z = o(true), G = o("");
|
|
24
24
|
if (k2.configure && k2.configure.props) {
|
|
@@ -27,7 +27,7 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
27
27
|
var _a2;
|
|
28
28
|
let o2 = true;
|
|
29
29
|
if (W) if (q.value && null !== q.value) o2 = "show" === q.value;
|
|
30
|
-
else if (
|
|
30
|
+
else if ($(k2.pageContext, k2.configure)) if (e3 && e3.length > 0) o2 = H(k2.pageContext, e3);
|
|
31
31
|
else {
|
|
32
32
|
const e4 = (_a2 = k2.configure.props.base) == null ? void 0 : _a2.state;
|
|
33
33
|
e4 && "hidden" === e4 && (o2 = false);
|
|
@@ -42,7 +42,7 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
42
42
|
let e4 = N(k2.configure);
|
|
43
43
|
D = e4 && e4.length > 0 ? e4[1] : null;
|
|
44
44
|
}
|
|
45
|
-
n(z, (e4) => {
|
|
45
|
+
console.log("object-render---_selfHiddenCode=", D), n(z, (e4) => {
|
|
46
46
|
e4 ? k2.pageContext.hiddenNotValidatorCodes.delete(D) : k2.pageContext.hiddenNotValidatorCodes.add(D);
|
|
47
47
|
}, { immediate: true });
|
|
48
48
|
}
|
|
@@ -50,28 +50,28 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
50
50
|
const e4 = k2.configure.props.base.editConditions;
|
|
51
51
|
if (e4.length > 0) {
|
|
52
52
|
const o2 = k2.configure.runtime ? k2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
|
|
53
|
-
if (n2.rawSate = n2.state,
|
|
53
|
+
if (n2.rawSate = n2.state, A(k2.pageContext) && k2.pageContext.fieldPermissionMap) {
|
|
54
54
|
const e5 = k2.configure.props.base;
|
|
55
55
|
if (e5 && e5.prop) {
|
|
56
56
|
let o3 = e5.prop;
|
|
57
|
-
o3 =
|
|
57
|
+
o3 = M(o3);
|
|
58
58
|
const t2 = k2.pageContext.fieldPermissionMap.get(o3);
|
|
59
59
|
t2 && false === t2.canEdit && (G.value = "disabled");
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
n2.state = t({ get() {
|
|
63
63
|
if ("disabled" === G.value) return G.value;
|
|
64
|
-
return
|
|
64
|
+
return H(k2.pageContext, e4) ? "" : "disabled";
|
|
65
65
|
}, set() {
|
|
66
66
|
} });
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
const I = o({});
|
|
71
|
-
I.value = i(
|
|
71
|
+
I.value = i(v(k2.configure.name));
|
|
72
72
|
const K = o(true);
|
|
73
|
-
null == I.value && (I.value =
|
|
74
|
-
const Q = o(null), U = o({}), X = o(""), Y =
|
|
73
|
+
null == I.value && (I.value = h, K.value = false);
|
|
74
|
+
const Q = o(null), U = o({}), X = o(""), Y = S(k2.configure);
|
|
75
75
|
Y && (X.value = Y);
|
|
76
76
|
const Z = k2.configure.runtime && k2.configure.runtime.common ? k2.configure.runtime.common : {};
|
|
77
77
|
if (Z.class && (X.value += " " + Z.class), Z.style) {
|
|
@@ -81,7 +81,7 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
81
81
|
const t2 = Z.style[e3 + "_class"];
|
|
82
82
|
t2 && (X.value += " " + t2);
|
|
83
83
|
}
|
|
84
|
-
const ee =
|
|
84
|
+
const ee = P();
|
|
85
85
|
function oe(e3) {
|
|
86
86
|
if (Q.value = e3, e3 && !e3.show && (e3.show = function() {
|
|
87
87
|
q.value = "show";
|
|
@@ -101,11 +101,11 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
101
101
|
const o2 = k2.configure.props ? k2.configure.props.base : null;
|
|
102
102
|
if (o2 && o2.prop) {
|
|
103
103
|
let e4 = o2.prop;
|
|
104
|
-
e4 =
|
|
104
|
+
e4 = M(e4), _(k2.pageContext, e4), k2.pageContext.propTitleMap = k2.pageContext.propTitleMap || {}, k2.pageContext.propTitleMap[e4] = o2.title ? o2.title : e4;
|
|
105
105
|
}
|
|
106
106
|
!function() {
|
|
107
107
|
if (!Q.value) return;
|
|
108
|
-
const e4 =
|
|
108
|
+
const e4 = V(k2.pageContext, k2.configure);
|
|
109
109
|
"table" !== k2.configure.name && e4 && e4.isCalcHeight && C(() => {
|
|
110
110
|
var _a2;
|
|
111
111
|
if (!(((_a2 = Q.value) == null ? void 0 : _a2.$el) || Q.value)) return;
|
|
@@ -129,14 +129,16 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
129
129
|
const o2 = e3.parentNode;
|
|
130
130
|
if (!e3 || !o2) return;
|
|
131
131
|
const t2 = e3.getBoundingClientRect();
|
|
132
|
-
let n2 = window.innerHeight - t2.y - 30
|
|
132
|
+
let n2 = window.innerHeight - t2.y - 30;
|
|
133
|
+
console.log("contentHeight=", window.innerHeight, t2.y);
|
|
134
|
+
let i2 = n2 + "";
|
|
133
135
|
if ("tabs" === k2.configure.name && k2.pageContext.isDialog && !F()) {
|
|
134
136
|
const o3 = e3.closest(".runtime-page-container");
|
|
135
137
|
if (o3) {
|
|
136
138
|
const e4 = o3.getBoundingClientRect(), r2 = t2.y - e4.y;
|
|
137
139
|
n2 = e4.height - r2 - 30, i2 = n2 + "px";
|
|
138
140
|
}
|
|
139
|
-
} else
|
|
141
|
+
} else T(n2) && (i2 = n2 + "px");
|
|
140
142
|
U.value.height = i2, U.value["overflow-y"] = "auto", U.value["overflow-x"] = "hidden", k2.configure.sytle || (k2.configure.sytle = {}), k2.configure.sytle._heightStyle = i2;
|
|
141
143
|
}
|
|
142
144
|
r(() => {
|
|
@@ -156,7 +158,7 @@ const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
156
158
|
const t2 = k2.configure.props ? k2.configure.props : {}, n2 = k2.configure.style ? k2.configure.style : {}, i2 = t2.position;
|
|
157
159
|
"top" == i2 || "bottom" == i2 || n2.position;
|
|
158
160
|
};
|
|
159
|
-
return (e3, o2) => a(W) && a(
|
|
161
|
+
return (e3, o2) => a(W) && a(O)(e3.configure) ? u((g(), p(c(I.value), { key: 0, ref: oe, style: d(U.value), class: f(X.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, a(z)]]) : l("", true);
|
|
160
162
|
} });
|
|
161
163
|
export {
|
|
162
164
|
k as default
|