super-page-runtime 2.3.11 → 2.3.12-sit2
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 +50 -50
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +3 -3
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.js +232 -226
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +13 -10
- package/dist/es/components/runtime/utils/page-init-util.js +24 -25
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +1 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +104 -94
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +144 -144
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +4 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +7 -4
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +4 -4
- 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 +43 -41
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +34 -35
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
- package/dist/es/style.css +5 -5
- package/package.json +2 -2
- package/dist/es.zip +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as f, unref as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as f, unref as m, withCtx as d, resolveDynamicComponent as g, toDisplayString as v } from "vue";
|
|
2
2
|
import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { setVariableValue as x, getVariableValue as y, formatVariableValue as b, getFormPropName as h, setVariableValueWithProp as j } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as R, handleEvent as k } from "../../../../utils/events/event-util.js";
|
|
@@ -24,7 +24,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, st
|
|
|
24
24
|
j(z, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function N(e3) {
|
|
27
|
-
S.isHasFieldAuthPermission(O.configure)
|
|
27
|
+
S.isHasFieldAuthPermission(O.configure) && V(O.pageContext, e3);
|
|
28
28
|
}
|
|
29
29
|
function Q() {
|
|
30
30
|
const e3 = O.pageContext.tableUuids;
|
|
@@ -43,7 +43,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, st
|
|
|
43
43
|
const t2 = e3.result;
|
|
44
44
|
x(z, G, t2);
|
|
45
45
|
}), F.$on(X.value + "-pickFileDone", (e3) => {
|
|
46
|
-
|
|
46
|
+
Y.value.pickFileDone(e3);
|
|
47
47
|
}), a(() => {
|
|
48
48
|
const e3 = H.value;
|
|
49
49
|
R(e3, O.pageContext, O.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
|
|
@@ -61,7 +61,7 @@ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, st
|
|
|
61
61
|
requiredClass.value = addRequiredClassUtil();
|
|
62
62
|
} }), (e3, t2) => {
|
|
63
63
|
const o2 = u("el-form-item");
|
|
64
|
-
return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(
|
|
64
|
+
return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(m(A)), "label-width": W.value.labelWidth, style: c(m(I)) }, { label: d(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...m(B) }) }, v(m(E)(W.value.title)), 5)) : s("", true)]), default: d(() => [L.value ? (p(), r("div", U, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[1] || (t2[1] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : L.value ? (p(), r("div", q, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[3] || (t2[3] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as
|
|
1
|
+
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as u, createBlock as r, openBlock as n, normalizeStyle as i, normalizeClass as p, unref as s, withCtx as c, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
|
|
2
2
|
import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getDateShortCuts as y } from "../../../../utils/form/date-shortcuts.js";
|
|
4
4
|
import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as F, isDateDataType as k } from "../../../../utils/page-helper-util.js";
|
|
@@ -8,24 +8,24 @@ import Y from "dayjs";
|
|
|
8
8
|
import { $t as _ } from "../../../../utils/i18n-util.js";
|
|
9
9
|
import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
|
|
10
10
|
const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: P2 }) {
|
|
11
|
-
const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, D = A.style,
|
|
12
|
-
let
|
|
13
|
-
if (S.pageContext.modelFieldsMap &&
|
|
14
|
-
const e3 = C(
|
|
11
|
+
const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, D = A.style, I = A.class, M = A.headerStyle, B = A.titleExceedStyle, N = a(A.props ? A.props : {});
|
|
12
|
+
let U = h(S.pageContext, S.configure, N.value.prop);
|
|
13
|
+
if (S.pageContext.modelFieldsMap && U && U.length > 0 && "data" === U[0]) {
|
|
14
|
+
const e3 = C(U, S.pageContext);
|
|
15
15
|
e3 && function(e4) {
|
|
16
16
|
const a2 = e4.dataType;
|
|
17
|
-
k(a2) && ("year" ===
|
|
17
|
+
k(a2) && ("year" === N.value.dateType && "YYYY" === N.value.valueFormat || "month" === N.value.dateType && "YYYY-MM" === N.value.valueFormat) && (N.value.valueFormat = "x");
|
|
18
18
|
}(e3);
|
|
19
19
|
}
|
|
20
|
-
let
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
let e3 =
|
|
20
|
+
let W = null, $ = false;
|
|
21
|
+
if (N.value.dateType && N.value.dateType.includes("range")) {
|
|
22
|
+
$ = true;
|
|
23
|
+
let e3 = N.value.prop2;
|
|
24
24
|
e3 && e3.startsWith("${") || (e3 = "${page." + S.configure.uuid + "-2}");
|
|
25
25
|
const a2 = x(q, e3, null);
|
|
26
|
-
if (e3 = e3.substring(2, e3.length - 1),
|
|
27
|
-
const e4 = x(q,
|
|
28
|
-
b(q,
|
|
26
|
+
if (e3 = e3.substring(2, e3.length - 1), W = e3.split("."), !(a2 || q.data && (q.data.id || q.data.ID)) && N.value.defaultValue2) {
|
|
27
|
+
const e4 = x(q, N.value.defaultValue2);
|
|
28
|
+
b(q, W, e4);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
const E = a(null), O = a(null), G = a(null);
|
|
@@ -38,7 +38,7 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
38
38
|
let t2 = null;
|
|
39
39
|
return t2 = "x" === a2 ? l2.toDate().getTime() : Y(e3).format(a2), t2;
|
|
40
40
|
} catch (a3) {
|
|
41
|
-
return
|
|
41
|
+
return e3;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
return e3;
|
|
@@ -48,28 +48,28 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
48
48
|
const e3 = J.value;
|
|
49
49
|
T(e3, S.pageContext, S.configure, { formItemRef: E.value, componentRef: O.value, titleRef: G.value, value: e3, entity: S.pageContext.entity.data, pageData: S.pageContext.entity.page });
|
|
50
50
|
});
|
|
51
|
-
}),
|
|
52
|
-
const e3 = F(q,
|
|
53
|
-
e3 !== a2 && b(q, N, a2);
|
|
54
|
-
}
|
|
55
|
-
if (U) {
|
|
56
|
-
const e3 = F(q, U), a2 = H(e3, B.value.valueFormat);
|
|
51
|
+
}), U) {
|
|
52
|
+
const e3 = F(q, U), a2 = H(e3, N.value.valueFormat);
|
|
57
53
|
e3 !== a2 && b(q, U, a2);
|
|
58
54
|
}
|
|
55
|
+
if (W) {
|
|
56
|
+
const e3 = F(q, W), a2 = H(e3, N.value.valueFormat);
|
|
57
|
+
e3 !== a2 && b(q, W, a2);
|
|
58
|
+
}
|
|
59
59
|
const J = o({ get() {
|
|
60
|
-
if (
|
|
60
|
+
if ($) {
|
|
61
61
|
const e3 = [];
|
|
62
|
-
let a2 = F(q,
|
|
63
|
-
e3.push(H(a2,
|
|
64
|
-
let l2 = F(q,
|
|
65
|
-
return e3.push(H(l2,
|
|
62
|
+
let a2 = F(q, U);
|
|
63
|
+
e3.push(H(a2, N.value.valueFormat));
|
|
64
|
+
let l2 = F(q, W);
|
|
65
|
+
return e3.push(H(l2, N.value.valueFormat)), e3;
|
|
66
66
|
}
|
|
67
|
-
return H(F(q,
|
|
67
|
+
return H(F(q, U), N.value.valueFormat);
|
|
68
68
|
}, set(e3) {
|
|
69
|
-
|
|
70
|
-
} }), K = a(y(
|
|
71
|
-
if (
|
|
72
|
-
const e3 = V(S.pageContext,
|
|
69
|
+
$ ? Array.isArray(e3) ? (b(q, U, e3[0]), b(q, W, e3[1]), w.value = "") : null === e3 && (b(q, U, null), b(q, W, null)) : (b(q, U, e3), null != e3 && (w.value = ""));
|
|
70
|
+
} }), K = a(y(N.value.dateScopeDetails, N.value.sourceType, N.value.dateType));
|
|
71
|
+
if (N.value.shortcutsFunc) {
|
|
72
|
+
const e3 = V(S.pageContext, N.value.shortcutsFunc);
|
|
73
73
|
if (e3) {
|
|
74
74
|
let a2 = e3.apply(e3, [{ pageContext: S.pageContext, configureObj: S.configure }]);
|
|
75
75
|
if (a2) {
|
|
@@ -81,8 +81,8 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
81
81
|
return P2({ addRequiredClass: function() {
|
|
82
82
|
w.value = z();
|
|
83
83
|
} }), (e3, a2) => {
|
|
84
|
-
const l2 =
|
|
85
|
-
return n(),
|
|
84
|
+
const l2 = u("el-time-picker"), t2 = u("el-date-picker"), o2 = u("el-form-item");
|
|
85
|
+
return n(), r(o2, { ref_key: "formItemRef", ref: E, required: N.value.required, class: p(s(I) + (w.value ? " " + w.value : "")), "label-width": N.value.labelWidth, style: i(s(D)) }, { label: c(() => [N.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: G, style: i({ ...s(M), ...s(B) }) }, [N.value.prefixType ? (n(), r(R, { key: 0, pageContext: e3.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(N.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), r(l2, { key: 0, ref_key: "componentRef", ref: O, "is-range": "timerange" == N.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: N.value.clearable, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, "unlink-panels": true, format: N.value.format, "value-format": N.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => J.value = e4), shortcuts: K.value, type: N.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), r(t2, { key: 1, ref_key: "componentRef", ref: O, clearable: N.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, format: N.value.format, "value-format": N.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => J.value = e4), shortcuts: K.value, type: N.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
86
86
|
};
|
|
87
87
|
} });
|
|
88
88
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,70 +1,72 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, watch as t, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as l, watch as t, onMounted as a, nextTick as o, onUnmounted as i, resolveComponent as n, createBlock as s, createCommentVNode as r, openBlock as u, normalizeStyle as p, normalizeClass as d, unref as m, withCtx as v, createElementBlock as f, toDisplayString as c } from "vue";
|
|
2
2
|
import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { handleAfterInitEvent as g, fileUploadBeforeUpload as C } from "../../../../utils/events/event-util.js";
|
|
4
|
-
import
|
|
5
|
-
import { FsUploadNew as
|
|
6
|
-
import
|
|
7
|
-
import { $t as
|
|
4
|
+
import w from "agilebuilder-ui/src/utils/request";
|
|
5
|
+
import { FsUploadNew as b } from "agilebuilder-ui";
|
|
6
|
+
import k from "../../../../utils/eventBus.js";
|
|
7
|
+
import { $t as x } from "../../../../utils/i18n-util.js";
|
|
8
8
|
import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
|
|
9
9
|
const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
11
|
+
const j = e2, N = l(null), S = j.configure.runtime ? j.configure.runtime : {}, R = l(S.props ? S.props : {}), T = S.style, z = S.class, D = S.headerStyle, I = S.titleExceedStyle, O = j.pageContext.entity ? j.pageContext.entity : {}, q = j.configure.props.base ? j.configure.props.base : {}, F = L(q.prop), W = L(q.propName);
|
|
12
|
+
let U = l({});
|
|
13
|
+
U.value.isShowWatermark = void 0 === ((_b = (_a = j.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = j.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", U.value.content = ((_e = (_d = j.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = j.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", F && F.length > 1 && t(() => j.pageContext.entity[F[0]][F[1]], (e3) => {
|
|
14
|
+
K(h(O, F));
|
|
13
15
|
});
|
|
14
|
-
const $ = j.pageContext.code,
|
|
15
|
-
function
|
|
16
|
+
const $ = j.pageContext.code, B = l(F ? $ + "__" + F.join("__") : null), E = h(O, F), A = l(null), G = l(false), H = l([]), J = l({});
|
|
17
|
+
function K(e3) {
|
|
16
18
|
if (e3) {
|
|
17
19
|
const l2 = e3.split(",");
|
|
18
20
|
if (l2.length > 0) {
|
|
19
21
|
const e4 = j.pageContext.backendUrl;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
w.post(e4 + "/common/fs-upload/search-file-names", l2).then((e5) => {
|
|
23
|
+
H.value = [];
|
|
22
24
|
const t2 = [];
|
|
23
|
-
for (let
|
|
24
|
-
const
|
|
25
|
-
t2.push(e5[
|
|
25
|
+
for (let a2 = 0; a2 < l2.length; a2++) {
|
|
26
|
+
const o2 = l2[a2];
|
|
27
|
+
t2.push(e5[o2]), H.value.push({ showName: e5[o2], serverPath: o2 });
|
|
26
28
|
}
|
|
27
|
-
"input" ===
|
|
29
|
+
"input" === R.value.displayType && (J.value.showName = t2.join(","), J.value.serverPath = l2.join(","));
|
|
28
30
|
}).finally(() => {
|
|
29
|
-
|
|
31
|
+
G.value = true;
|
|
30
32
|
});
|
|
31
|
-
} else
|
|
32
|
-
} else
|
|
33
|
+
} else G.value = true;
|
|
34
|
+
} else H.value = [], J.value = {}, G.value = true;
|
|
33
35
|
}
|
|
34
|
-
function
|
|
36
|
+
function L(e3) {
|
|
35
37
|
return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
|
|
36
38
|
}
|
|
37
|
-
function
|
|
39
|
+
function M(e3) {
|
|
38
40
|
return C(e3);
|
|
39
41
|
}
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
},
|
|
42
|
+
K(E);
|
|
43
|
+
const Q = (e3, l2, t2) => {
|
|
44
|
+
X();
|
|
45
|
+
}, V = (e3) => {
|
|
46
|
+
X();
|
|
47
|
+
}, X = () => {
|
|
46
48
|
const e3 = [], l2 = [];
|
|
47
|
-
if (
|
|
48
|
-
const e4 =
|
|
49
|
-
for (let l3 = 0; l3 < e4; l3++)
|
|
49
|
+
if (R.value.limit && H.value.length > R.value.limit) {
|
|
50
|
+
const e4 = H.value.length - R.value.limit;
|
|
51
|
+
for (let l3 = 0; l3 < e4; l3++) H.value.shift();
|
|
50
52
|
}
|
|
51
|
-
for (let t2 = 0; t2 <
|
|
52
|
-
y(j.pageContext.entity, F, l2.join(",")), y(j.pageContext.entity,
|
|
53
|
-
},
|
|
54
|
-
return
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}),
|
|
58
|
-
const e3 = h(
|
|
59
|
-
g(l2, j.pageContext, j.configure, { formItemRef:
|
|
53
|
+
for (let t2 = 0; t2 < H.value.length; t2++) e3.push(H.value[t2].showName), l2.push(H.value[t2].serverPath);
|
|
54
|
+
y(j.pageContext.entity, F, l2.join(",")), y(j.pageContext.entity, W, e3.join(",")), l2.length > 0 && (N.value = "");
|
|
55
|
+
}, Y = l(null), Z = l(null);
|
|
56
|
+
return a(() => {
|
|
57
|
+
k.$on(B.value + "-pickFileDone", (e3) => {
|
|
58
|
+
A.value.pickFileDone(e3);
|
|
59
|
+
}), o(() => {
|
|
60
|
+
const e3 = h(O, F), l2 = { showName: h(O, W), serverPath: e3 };
|
|
61
|
+
g(l2, j.pageContext, j.configure, { formItemRef: Y.value, componentRef: A.value, titleRef: Z.value, value: l2, entity: j.pageContext.entity.data, pageData: j.pageContext.entity.page });
|
|
60
62
|
});
|
|
61
63
|
}), i(() => {
|
|
62
|
-
|
|
64
|
+
k.$off(B.value + "-pickFileDone");
|
|
63
65
|
}), _2({ addRequiredClass: function() {
|
|
64
66
|
N.value = P();
|
|
65
67
|
} }), (e3, l2) => {
|
|
66
68
|
const t2 = n("el-form-item");
|
|
67
|
-
return
|
|
69
|
+
return R.value.tittleShow ? (u(), s(t2, { key: 0, ref_key: "formItemRef", ref: Y, required: R.value.required, class: d(m(z) + (N.value ? " " + N.value : "")), "label-width": R.value.labelWidth, style: p(m(T)) }, { label: v(() => [R.value.tittleShow ? (u(), f("div", { key: 0, ref_key: "titleRef", ref: Z, style: p({ ...m(D), ...m(I) }) }, c(m(x)(R.value.title)), 5)) : r("", true)]), default: v(() => [G.value ? (u(), s(m(b), { key: 0, ref_key: "fileUploadRef", ref: A, style: { width: "100%" }, disabled: "disabled" === R.value.state, displayType: R.value.displayType, accept: R.value.accept, multiple: R.value.multiple, placeholder: R.value.placeholder, limit: R.value.limit, "limit-file-size": R.value.limitFileSize, "disabled-no-preview": R.value.disabledNoPreview, "disabled-no-download": R.value.disabledNoDownload, openCameraOrChoosePhoto: R.value.openCameraOrChoosePhoto, "file-info": J.value, "file-list": H.value, "system-code": e3.pageContext.systemCode, componentId: B.value, watermark: m(U), "on-success": Q, "on-remove": V, "before-upload": M, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext"])) : r("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : G.value ? (u(), s(m(b), { key: 1, ref_key: "fileUploadRef", ref: A, style: { width: "100%" }, disabled: "disabled" === R.value.state, displayType: R.value.displayType, accept: R.value.accept, multiple: R.value.multiple, placeholder: R.value.placeholder, limit: R.value.limit, "limit-file-size": R.value.limitFileSize, "disabled-no-preview": R.value.disabledNoPreview, "disabled-no-download": R.value.disabledNoDownload, openCameraOrChoosePhoto: R.value.openCameraOrChoosePhoto, "file-info": J.value, "file-list": H.value, "system-code": e3.pageContext.systemCode, componentId: B.value, watermark: m(U), "on-success": Q, "on-remove": V, "before-upload": M, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext"])) : r("", true);
|
|
68
70
|
};
|
|
69
71
|
} });
|
|
70
72
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -3,13 +3,13 @@ import { SuperIcon as T } from "agilebuilder-ui";
|
|
|
3
3
|
import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as h, getVariableValue as b } from "../../../../utils/page-helper-util.js";
|
|
5
5
|
import { handleFormEvent as _, handleAfterInitEvent as S, doSuffixOrPrefixClickEvent as j } from "../../../../utils/events/event-util.js";
|
|
6
|
-
import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as
|
|
7
|
-
import
|
|
8
|
-
import { isMobileBrowser as
|
|
9
|
-
import
|
|
10
|
-
import { $t as
|
|
11
|
-
import { addRequiredClassUtil as
|
|
12
|
-
const
|
|
6
|
+
import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as q } from "../../../../utils/form/scan-util.js";
|
|
7
|
+
import D from "../common/title-suffix-element.vue.js";
|
|
8
|
+
import { isMobileBrowser as M } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import N from "../../../../utils/eventBus.js";
|
|
10
|
+
import { $t as P } from "../../../../utils/i18n-util.js";
|
|
11
|
+
import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
|
|
12
|
+
const J = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: J2 }) {
|
|
13
13
|
var _a, _b, _c;
|
|
14
14
|
const L = e2, B = L.pageContext.entity ? L.pageContext.entity : {}, F = t("text");
|
|
15
15
|
let $ = k(L.pageContext, L.configure);
|
|
@@ -17,66 +17,65 @@ const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
|
|
|
17
17
|
const e3 = w($, L.pageContext);
|
|
18
18
|
e3 && (F.value = V(e3.dataType) ? "number" : "text");
|
|
19
19
|
}
|
|
20
|
-
const A = t(
|
|
20
|
+
const A = t(M()), E = L.pageContext.code, U = t($ && $.length > 0 ? E + "__" + $.join("__") : null), W = t(null), G = l({ get: () => b(B, $), set(e3) {
|
|
21
21
|
h(B, $, e3), null != e3 && "" !== e3 && (W.value = "");
|
|
22
22
|
} }), H = t(null), K = t(null), Q = t(null), X = L.configure.runtime ? L.configure.runtime : {}, Y = t(X.props ? X.props : {}), Z = t(!!((_a = Y.value.scan) == null ? void 0 : _a.enable));
|
|
23
23
|
let ee = false;
|
|
24
24
|
const te = window.localStorage.getItem("auth_source");
|
|
25
25
|
te && "dingtalk" === te && (ee = true);
|
|
26
26
|
let le = "";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let ue = {};
|
|
27
|
+
le = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
|
|
28
|
+
const ne = !(!A.value || !le || "app" !== le), oe = t(!!((ne || ee) && Z.value || A.value && Z.value && "https:" === window.location.protocol));
|
|
29
|
+
let ae = {};
|
|
31
30
|
((_b = Y.value.scan) == null ? void 0 : _b.enable) && ((_c = Y.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Y.value.scan.ruleList).then((e3) => {
|
|
32
|
-
|
|
31
|
+
ae = e3;
|
|
33
32
|
}), u(() => G.value, (e3) => {
|
|
34
33
|
e3 = e3.trim();
|
|
35
|
-
const t2 = O(e3,
|
|
36
|
-
t2 &&
|
|
34
|
+
const t2 = O(e3, ae);
|
|
35
|
+
t2 && q(L.pageContext, t2.scanSet, t2.params);
|
|
37
36
|
}));
|
|
38
|
-
const
|
|
39
|
-
function
|
|
37
|
+
const ue = X.style, ie = X.class, re = X.headerStyle, pe = X.titleExceedStyle;
|
|
38
|
+
function se(e3) {
|
|
40
39
|
return h(B, $, e3);
|
|
41
40
|
}
|
|
42
41
|
n(() => {
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
N.$on(U.value + "-scanDone", (e3) => {
|
|
43
|
+
se(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
|
|
45
44
|
}), o(() => {
|
|
46
45
|
var _a2;
|
|
47
46
|
const e3 = G.value;
|
|
48
|
-
S(e3, L.pageContext, L.configure, { formItemRef: H.value, componentRef: K.value, titleRef: Q.value, value: e3, entity: L.pageContext.entity.data, pageData: L.pageContext.entity.page }),
|
|
47
|
+
S(e3, L.pageContext, L.configure, { formItemRef: H.value, componentRef: K.value, titleRef: Q.value, value: e3, entity: L.pageContext.entity.data, pageData: L.pageContext.entity.page }), oe.value && ((_a2 = Y.value.scan) == null ? void 0 : _a2.autoOpen) && ve();
|
|
49
48
|
});
|
|
50
49
|
}), a(() => {
|
|
51
|
-
|
|
50
|
+
N.$off(U.value + "-scanDone");
|
|
52
51
|
});
|
|
53
|
-
const
|
|
54
|
-
function
|
|
55
|
-
if (
|
|
52
|
+
const ce = t(false);
|
|
53
|
+
function ve() {
|
|
54
|
+
if (ne || ee) {
|
|
56
55
|
const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
|
|
57
|
-
ee && (e3.type = "dingTalkScan"), window.parent.parent ?
|
|
58
|
-
} else if (A.value) if ("https:" === window.location.protocol)
|
|
56
|
+
ee && (e3.type = "dingTalkScan"), window.parent.parent ? window.parent.parent.postMessage(JSON.stringify(e3), "*") : window.parent && window.parent.postMessage(JSON.stringify(e3), "*");
|
|
57
|
+
} else if (A.value) if ("https:" === window.location.protocol) ce.value = true;
|
|
59
58
|
else {
|
|
60
59
|
const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
|
|
61
60
|
window.parent.postMessage(JSON.stringify(e3), "*");
|
|
62
61
|
}
|
|
63
|
-
else
|
|
62
|
+
else ce.value = true;
|
|
64
63
|
}
|
|
65
|
-
function
|
|
66
|
-
|
|
64
|
+
function fe(e3) {
|
|
65
|
+
ce.value = false, se(e3);
|
|
67
66
|
}
|
|
68
|
-
return
|
|
67
|
+
return J2({ getValue: function() {
|
|
69
68
|
return b(B, $);
|
|
70
|
-
}, setValue:
|
|
71
|
-
W.value =
|
|
69
|
+
}, setValue: se, scanClick: ve, addRequiredClass: function() {
|
|
70
|
+
W.value = z();
|
|
72
71
|
} }), (e3, t2) => {
|
|
73
72
|
const l2 = i("el-input"), n2 = i("scan-code-input-browser"), o2 = i("el-form-item");
|
|
74
|
-
return p(), r(o2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: c(v(
|
|
73
|
+
return p(), r(o2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: c(v(ie) + (W.value ? " " + W.value : "")), "label-width": Y.value.labelWidth, style: s(v(ue)) }, { label: f(() => [Y.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: s({ ...v(re), ...v(pe) }) }, [Y.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(P)(Y.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(l2, { ref_key: "componentRef", ref: K, disabled: "disabled" === Y.value.state, readonly: "readonly" === Y.value.state, size: Y.value.size, clearable: Y.value.clearable, placeholder: Y.value.placeholder, maxlength: Y.value.maxLength, "show-word-limit": Y.value.showInputNum, type: F.value, modelValue: G.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => G.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
|
|
75
74
|
let t3 = b(B, $);
|
|
76
75
|
null != t3 && (t3 = t3.trim()), h(B, $, t3), _(e5, L.pageContext, L.configure, "blur");
|
|
77
|
-
}(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(
|
|
76
|
+
}(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.preText)), 1)]), key: "0" } : void 0, "outer" == Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prepend", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.preText)), 1)]), key: "1" } : void 0, "outer" != Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "suffix", fn: f(() => [Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ve()) })) : g("", true), Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ce.value ? (p(), r(n2, { key: 0, onClose: fe })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
78
77
|
};
|
|
79
78
|
} });
|
|
80
79
|
export {
|
|
81
|
-
|
|
80
|
+
J as default
|
|
82
81
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as u, nextTick as a, resolveComponent as n, createElementBlock as i, createBlock as o, openBlock as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as u, nextTick as a, resolveComponent as n, createElementBlock as i, createBlock as o, openBlock as p, normalizeStyle as s, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as x } from "vue";
|
|
2
2
|
import { getFormModelFields as d } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue as m, formatValueByType as h } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { SuperIcon as k } from "agilebuilder-ui";
|
|
@@ -7,9 +7,7 @@ import { $t as _ } from "../../../../utils/i18n-util.js";
|
|
|
7
7
|
const I = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px", "margin-bottom": "20px" } }, b = { style: { overflow: "hidden", "white-space": "nowrap" } }, V = ["title"], j = e({ __name: "label-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
|
|
8
8
|
const R = e2, S = R.pageContext.entity ? R.pageContext.entity : {};
|
|
9
9
|
let P = d(R.pageContext, R.configure);
|
|
10
|
-
const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, z = q.class, D = q.headerStyle, E = q.appendClass, F = q.appendStyle, W = q.titleExceedStyle, A = t(q.props ? q.props : {}), B = t(A.value.options ? A.value.options : []), G = A.value.formatType
|
|
11
|
-
A.value;
|
|
12
|
-
const H = l(() => {
|
|
10
|
+
const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, z = q.class, D = q.headerStyle, E = q.appendClass, F = q.appendStyle, W = q.titleExceedStyle, A = t(q.props ? q.props : {}), B = t(A.value.options ? A.value.options : []), G = A.value.formatType, H = l(() => {
|
|
13
11
|
let e3 = m(S, P);
|
|
14
12
|
if (G) if (A.value.hasOptions) {
|
|
15
13
|
let t2 = null;
|
|
@@ -29,7 +27,7 @@ const I = { style: { width: "100%", "text-align": "center", "font-weight": "700"
|
|
|
29
27
|
B.value = e3 || [];
|
|
30
28
|
} }), (e3, t2) => {
|
|
31
29
|
const l2 = n("el-form-item");
|
|
32
|
-
return A.value.whetherTittle ? (
|
|
30
|
+
return A.value.whetherTittle ? (p(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: s(f(O)) }, [c("div", I, v(A.value.title), 1)], 6)) : A.value.tittleShow ? (p(), o(l2, { key: 1, ref_key: "formItemRef", ref: J, required: !!A.value.required, class: r(f(z)), "label-width": A.value.labelWidth, style: s(f(O)) }, { label: y(() => [A.value.tittleShow ? (p(), i("div", { key: 0, ref_key: "titleRef", ref: L, style: s({ ...f(D), ...f(W) }) }, v(f(_)(A.value.title)), 5)) : g("", true)]), default: y(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: t2[0] || (t2[0] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", b, [A.value.preIconValue || A.value.preText ? (p(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }), style: s(f(F)) }, [A.value.preIconType && A.value.preIconValue ? (p(), o(f(k), { key: 0, iconType: A.value.preIconType, iconValue: A.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), x(" " + v(f(_)(A.value.preText)), 1)], 6)) : g("", true), x(" " + v(H.value), 1)]), A.value.sufIconValue || A.value.sufText ? (p(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }) }, [A.value.sufIconType && A.value.sufIconValue ? (p(), o(f(k), { key: 0, style: {}, iconType: A.value.sufIconType, iconValue: A.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), c("span", null, " " + v(f(_)(A.value.sufText)), 1)], 2)) : g("", true)], 512)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (p(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: t2[1] || (t2[1] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(A.value.prefixIcon) + " " + v(H.value), 9, V), A.value.suffixTxt ? (p(), i("span", { key: 0, class: r(f(E)), style: s(f(F)) }, v(A.value.suffixTxt), 7)) : g("", true)]));
|
|
33
31
|
};
|
|
34
32
|
} });
|
|
35
33
|
export {
|
|
@@ -5,7 +5,6 @@ import { handleAfterInitEvent as k, handleEvent as x } from "../../../../utils/e
|
|
|
5
5
|
import { $t as C } from "../../../../utils/i18n-util.js";
|
|
6
6
|
const _ = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
7
7
|
const _2 = e2, h = y(_2.pageContext, _2.configure), R = _2.configure.runtime ? _2.configure.runtime : {}, j = R.style, w = R.class, I = R.headerStyle, S = t(R.props ? R.props : {});
|
|
8
|
-
S.value;
|
|
9
8
|
let $ = S.value.formatting;
|
|
10
9
|
const D = _2.pageContext.entity ? _2.pageContext.entity : {}, V = l(() => {
|
|
11
10
|
let e3 = b(D, h);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as
|
|
1
|
+
import { defineComponent as e, ref as t, watch as l, onMounted as n, nextTick as i, onBeforeUnmount as o, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createBlock as c, createCommentVNode as p, normalizeStyle as d, normalizeClass as g, unref as m, withCtx as f, createElementVNode as v, toDisplayString as h } from "vue";
|
|
2
2
|
import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { formatVariableValue as y, setVariableValue as b, getVariableValue as C } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import w from "quill";
|
|
@@ -40,16 +40,16 @@ const S = { style: { width: "100%", height: "100%" } }, _ = e({ __name: "richtex
|
|
|
40
40
|
X.value.push(t2), Y.value = true;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ie(e3) {
|
|
44
44
|
const t2 = new FormData();
|
|
45
45
|
t2.append("file", e3);
|
|
46
46
|
const l2 = B.pageContext.backendUrl, n2 = R(l2, B.pageContext.isTest);
|
|
47
47
|
return T.post(n2 + "/common/fs-upload/rich-editor-image", t2, { headers: { "Content-Type": "multipart/form-data" } });
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1],
|
|
51
|
-
for (;
|
|
52
|
-
return new File([
|
|
49
|
+
function oe(e3, t2) {
|
|
50
|
+
let l2 = e3.split(","), n2 = l2[0].match(/:(.*?);/)[1], i2 = atob(l2[1]), o2 = i2.length, a2 = new Uint8Array(o2);
|
|
51
|
+
for (; o2--; ) a2[o2] = i2.charCodeAt(o2);
|
|
52
|
+
return new File([a2], t2, { type: n2 });
|
|
53
53
|
}
|
|
54
54
|
return n(() => {
|
|
55
55
|
var _a;
|
|
@@ -61,16 +61,15 @@ const S = { style: { width: "100%", height: "100%" } }, _ = e({ __name: "richtex
|
|
|
61
61
|
if (l3.insert && l3.insert.image) {
|
|
62
62
|
const e5 = l3.insert.image;
|
|
63
63
|
if (!e5.startsWith("data:image")) return;
|
|
64
|
-
const t4 =
|
|
65
|
-
await
|
|
64
|
+
const t4 = oe(e5, "image.png");
|
|
65
|
+
await ie(t4).then((t5) => {
|
|
66
66
|
if (!J) return;
|
|
67
67
|
const l4 = J.root.getElementsByTagName("img");
|
|
68
68
|
if (l4 && l4.length > 0) for (let n3 = 0; n3 < l4.length; n3++) {
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const i2 = l4[n3];
|
|
70
|
+
i2.src === e5 && (i2.src = t5.url + "&jwt=" + L());
|
|
71
71
|
}
|
|
72
72
|
}).catch((e6) => {
|
|
73
|
-
console.error(e6, "上传图片失败");
|
|
74
73
|
});
|
|
75
74
|
}
|
|
76
75
|
}
|
|
@@ -82,17 +81,17 @@ const S = { style: { width: "100%", height: "100%" } }, _ = e({ __name: "richtex
|
|
|
82
81
|
let l2 = e4.height - (t2.top - e4.top);
|
|
83
82
|
l2 < 100 && (l2 = 100), J.container.style.height = l2 + "px";
|
|
84
83
|
}
|
|
85
|
-
}(),
|
|
84
|
+
}(), i(() => {
|
|
86
85
|
const e4 = C(M, N);
|
|
87
86
|
k(e4, B.pageContext, B.configure, { formItemRef: Z.value, componentRef: $.value, titleRef: ee.value, value: e4, entity: B.pageContext.entity.data, pageData: B.pageContext.entity.page });
|
|
88
87
|
});
|
|
89
|
-
}),
|
|
88
|
+
}), o(() => {
|
|
90
89
|
G.value && G.value.removeEventListener("focusout", le), te && te.removeEventListener("click", ne);
|
|
91
90
|
}), _2({ addRequiredClass: function() {
|
|
92
91
|
H.value = j();
|
|
93
92
|
} }), (e3, t2) => {
|
|
94
|
-
const l2 =
|
|
95
|
-
return u(),
|
|
93
|
+
const l2 = a("el-form-item"), n2 = a("el-image-viewer");
|
|
94
|
+
return u(), r(s, null, [z.value.tittleShow ? (u(), c(l2, { key: 0, required: z.value.required, class: g(m(F) + (H.value ? " " + H.value : "")), "label-width": z.value.labelWidth, style: d(m(D)) }, { label: f(() => [z.value.tittleShow ? (u(), r("div", { key: 0, style: d({ ...m(U), ...m(W) }) }, h(m(E)(z.value.title)), 5)) : p("", true)]), default: f(() => [v("div", S, [v("div", { ref_key: "quillEditorRef", ref: G, style: { width: "100%" } }, null, 512)])]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : p("", true), Y.value ? (u(), c(n2, { key: 1, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
|
|
96
95
|
Y.value = false;
|
|
97
96
|
}), "url-list": X.value }, null, 8, ["url-list"])) : p("", true)], 64);
|
|
98
97
|
};
|