super-page-runtime 2.3.47-sit2 → 2.3.48
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 +136 -136
- package/dist/es/components/runtime/utils/events/event-util.js +121 -121
- package/dist/es/components/runtime/utils/events/print-label.js +34 -33
- package/dist/es/components/runtime/utils/events/standard-event.js +22 -22
- package/dist/es/components/runtime/utils/events/validator-util.js +209 -206
- package/dist/es/components/runtime/utils/i18n-util.js +12 -9
- package/dist/es/components/runtime/utils/page-init-util.js +47 -45
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- 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 +8 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +104 -99
- 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 +11 -9
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix2.vue.js +2 -0
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime2.vue.js +5 -5
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime2.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime2.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime2.vue.js +21 -21
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime2.vue.js +5 -3
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime2.vue.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime2.vue.js +42 -41
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime2.vue.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime2.vue.js +8 -6
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime2.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime2.vue.js +8 -7
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +11 -9
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +7 -6
- package/dist/es/components/runtime/views/super-page2.vue.js +99 -98
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as u, openBlock as l, createBlock as r, normalizeStyle as s, unref as p, normalizeClass as c, createSlots as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as u, openBlock as l, createBlock as r, normalizeStyle as s, unref as p, normalizeClass as c, createSlots as m, withCtx as f, createElementBlock as d, resolveDynamicComponent as g, createCommentVNode as v, createElementVNode as C, toDisplayString as x } from "vue";
|
|
2
2
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { setVariableValue as b, getVariableValue as h, formatVariableValue as j, getFormPropName as R, setVariableValueWithProp as k } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as V, handleEvent as _ } from "../../../../utils/events/event-util.js";
|
|
@@ -24,7 +24,7 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
|
|
|
24
24
|
k(H, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function T(e3) {
|
|
27
|
-
q.isHasFieldAuthPermission(G.configure)
|
|
27
|
+
q.isHasFieldAuthPermission(G.configure) ? D(G.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", P ? P.join(".") : "");
|
|
28
28
|
}
|
|
29
29
|
function X() {
|
|
30
30
|
const e3 = G.pageContext.tableUuids;
|
|
@@ -43,7 +43,7 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
|
|
|
43
43
|
const t2 = e3.result;
|
|
44
44
|
b(H, P, t2);
|
|
45
45
|
}), U.$on(Z.value + "-pickFileDone", (e3) => {
|
|
46
|
-
ee.value.pickFileDone(e3);
|
|
46
|
+
Z.value, ee.value.pickFileDone(e3);
|
|
47
47
|
}), n(() => {
|
|
48
48
|
const e3 = I.value;
|
|
49
49
|
V(e3, G.pageContext, G.configure, { formItemRef: te.value, componentRef: ee.value, titleRef: oe.value, value: e3, entity: G.pageContext.entity.data, pageData: G.pageContext.entity.page });
|
|
@@ -61,7 +61,7 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
|
|
|
61
61
|
requiredClass.value = addRequiredClassUtil();
|
|
62
62
|
} }), (t2, o2) => {
|
|
63
63
|
const a2 = u("el-form-item");
|
|
64
|
-
return K.value.tittleShow ? (l(), r(a2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: c(p(W)), "label-width": K.value.labelWidth, style: s(p(B)) },
|
|
64
|
+
return K.value.tittleShow ? (l(), r(a2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: c(p(W)), "label-width": K.value.labelWidth, style: s(p(B)) }, m({ default: f(() => [N.value ? (l(), d("div", $, [(l(), r(g(N.value), { ref_key: "customRef", ref: ee, size: K.value.size, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: p(R)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": p(L), modelValue: I.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => I.value = e3), disabled: "disabled" === K.value.state, "additional-param-map": p(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: o2[1] || (o2[1] = (t3) => p(_)(I.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : v("", true)]), _: 2 }, [K.value.tittleShow ? { name: "label", fn: f(() => [C("div", { ref_key: "titleRef", ref: oe, style: s({ ...p(J) }), class: "amb-form-item-label" }, x(p(S)(K.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : N.value ? (l(), d("div", O, [(l(), r(g(N.value), { ref_key: "customRef", ref: ee, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: p(R)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": p(L), modelValue: I.value, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => I.value = e3), disabled: "disabled" === K.value.state, "additional-param-map": p(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: o2[3] || (o2[3] = (t3) => p(_)(I.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : v("", true);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime2.vue.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 r, openBlock as u, createBlock as n, normalizeStyle as i, unref as d, normalizeClass as c, createSlots as p, withCtx as s, createElementVNode as v, createElementBlock as f, Fragment as g, createTextVNode as m, toDisplayString as h } from "vue";
|
|
2
2
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getDateShortCuts as C } from "../../../../utils/form/date-shortcuts.js";
|
|
4
4
|
import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as F, getVariableValue as V, isDateDataType as k } from "../../../../utils/page-helper-util.js";
|
|
@@ -10,26 +10,26 @@ import { addRequiredClassUtil as D } from "../../../../utils/common-util.js";
|
|
|
10
10
|
import { DatePickerRange as _, DateQuarterPicker as S } from "agilebuilder-ui";
|
|
11
11
|
const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
|
|
12
12
|
var _a;
|
|
13
|
-
const w = e2, A = a(null), B = w.pageContext.entity ? w.pageContext.entity : {}, I = w.configure.runtime ? w.configure.runtime : {}, M = I.style, U = I.class,
|
|
14
|
-
let E = y(w.pageContext, w.configure,
|
|
13
|
+
const w = e2, A = a(null), B = w.pageContext.entity ? w.pageContext.entity : {}, I = w.configure.runtime ? w.configure.runtime : {}, M = I.style, U = I.class, $ = I.headerStyle, N = I.titleExceedStyle, W = a(I.props ? I.props : {});
|
|
14
|
+
let E = y(w.pageContext, w.configure, W.value.prop);
|
|
15
15
|
if (w.pageContext.modelFieldsMap && E && E.length > 0 && "data" === E[0]) {
|
|
16
16
|
const e3 = x(E, w.pageContext);
|
|
17
17
|
e3 && function(e4) {
|
|
18
18
|
const a2 = e4.dataType;
|
|
19
|
-
k(a2) && ("year" ===
|
|
19
|
+
k(a2) && ("year" === W.value.dateType && "YYYY" === W.value.valueFormat || "month" === W.value.dateType && "YYYY-MM" === W.value.valueFormat) && (W.value.valueFormat = "x");
|
|
20
20
|
}(e3);
|
|
21
21
|
}
|
|
22
22
|
let O = null, G = false;
|
|
23
|
-
if (
|
|
23
|
+
if (W.value.dateType && W.value.dateType.includes("range")) {
|
|
24
24
|
G = true;
|
|
25
|
-
let e3 =
|
|
25
|
+
let e3 = W.value.prop2;
|
|
26
26
|
e3 && e3.startsWith("${") || (e3 = "${page." + w.configure.uuid + "-2}");
|
|
27
27
|
const a2 = b(B, e3, null);
|
|
28
|
-
if (e3 = e3.substring(2, e3.length - 1), O = e3.split("."), !(a2 || B.data && (B.data.id || B.data.ID)) &&
|
|
29
|
-
const e4 = b(B,
|
|
28
|
+
if (e3 = e3.substring(2, e3.length - 1), O = e3.split("."), !(a2 || B.data && (B.data.id || B.data.ID)) && W.value.defaultValue2) {
|
|
29
|
+
const e4 = b(B, W.value.defaultValue2);
|
|
30
30
|
if (null != e4 && "" !== e4) F(B, O, e4);
|
|
31
|
-
else if (((_a =
|
|
32
|
-
const e5 =
|
|
31
|
+
else if (((_a = W.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
|
|
32
|
+
const e5 = W.value.moreDefaultValue2;
|
|
33
33
|
for (let a3 = 0; a3 < e5.length; a3++) {
|
|
34
34
|
const l2 = b(B, e5[a3]);
|
|
35
35
|
if (null != l2 && "" !== l2) {
|
|
@@ -50,7 +50,7 @@ const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
50
50
|
let t2 = null;
|
|
51
51
|
return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), "Invalid Date" === t2 ? e3 : t2;
|
|
52
52
|
} catch (a3) {
|
|
53
|
-
return e3;
|
|
53
|
+
return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${W.value.valueFormat}`), e3;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return e3;
|
|
@@ -61,27 +61,27 @@ const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
61
61
|
T(e3, w.pageContext, w.configure, { formItemRef: H.value, componentRef: J.value, titleRef: K.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
|
|
62
62
|
});
|
|
63
63
|
}), E) {
|
|
64
|
-
const e3 = V(B, E), a2 = L(e3,
|
|
64
|
+
const e3 = V(B, E), a2 = L(e3, W.value.valueFormat);
|
|
65
65
|
e3 !== a2 && F(B, E, a2);
|
|
66
66
|
}
|
|
67
67
|
if (O) {
|
|
68
|
-
const e3 = V(B, O), a2 = L(e3,
|
|
68
|
+
const e3 = V(B, O), a2 = L(e3, W.value.valueFormat);
|
|
69
69
|
e3 !== a2 && F(B, O, a2);
|
|
70
70
|
}
|
|
71
71
|
const Q = o({ get() {
|
|
72
72
|
if (G) {
|
|
73
73
|
const e3 = [];
|
|
74
74
|
let a2 = V(B, E);
|
|
75
|
-
e3.push(L(a2,
|
|
75
|
+
e3.push(L(a2, W.value.valueFormat));
|
|
76
76
|
let l2 = V(B, O);
|
|
77
|
-
return e3.push(L(l2,
|
|
77
|
+
return e3.push(L(l2, W.value.valueFormat)), e3;
|
|
78
78
|
}
|
|
79
|
-
return L(V(B, E),
|
|
79
|
+
return L(V(B, E), W.value.valueFormat);
|
|
80
80
|
}, set(e3) {
|
|
81
81
|
G ? Array.isArray(e3) ? (F(B, E, e3[0]), F(B, O, e3[1]), A.value = "") : null === e3 && (F(B, E, null), F(B, O, null)) : (F(B, E, e3), null != e3 && (A.value = ""));
|
|
82
|
-
} }), X = a(C(
|
|
83
|
-
if (
|
|
84
|
-
const e3 = z(w.pageContext,
|
|
82
|
+
} }), X = a(C(W.value.dateScopeDetails, W.value.sourceType, W.value.dateType));
|
|
83
|
+
if (W.value.shortcutsFunc) {
|
|
84
|
+
const e3 = z(w.pageContext, W.value.shortcutsFunc);
|
|
85
85
|
if (e3) {
|
|
86
86
|
let a2 = e3.apply(e3, [{ pageContext: w.pageContext, configureObj: w.configure }]);
|
|
87
87
|
if (a2) {
|
|
@@ -93,8 +93,8 @@ const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
93
93
|
return q2({ addRequiredClass: function() {
|
|
94
94
|
A.value = D();
|
|
95
95
|
} }), (a2, l2) => {
|
|
96
|
-
const t2 =
|
|
97
|
-
return
|
|
96
|
+
const t2 = r("el-time-picker"), o2 = r("el-date-picker"), y2 = r("el-form-item");
|
|
97
|
+
return u(), n(y2, { ref_key: "formItemRef", ref: H, required: W.value.required, class: c(d(U) + (A.value ? " " + A.value : "")), "label-width": W.value.labelWidth, style: i(d(M)) }, p({ default: s(() => ["time" == W.value.dateType || "timerange" == W.value.dateType ? (u(), n(t2, { key: 0, ref_key: "componentRef", ref: J, "is-range": "timerange" == W.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: W.value.clearable, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, size: W.value.size, placeholder: d(Y)(W.value.placeholder), "start-placeholder": d(Y)(W.value.placeholder), "end-placeholder": d(Y)(W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder), "unlink-panels": true, format: W.value.format, "value-format": W.value.valueFormat, modelValue: Q.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => Q.value = e3), shortcuts: X.value, type: W.value.dateType, onChange: l2[1] || (l2[1] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[4] || (l2[4] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[5] || (l2[5] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[6] || (l2[6] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== W.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(W.value.dateType) ? (u(), n(d(_), { key: 1, modelValue: Q.value, "onUpdate:modelValue": l2[7] || (l2[7] = (e3) => Q.value = e3), type: W.value.dateType, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, clearable: W.value.clearable, format: W.value.format, "value-format": W.value.valueFormat, placeholder: d(Y)(W.value.placeholder), "start-placeholder": d(Y)(W.value.placeholder), "end-placeholder": d(Y)(W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder), size: W.value.size, shortcuts: X.value, onChange: l2[8] || (l2[8] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[9] || (l2[9] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[10] || (l2[10] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[11] || (l2[11] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[12] || (l2[12] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[13] || (l2[13] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : "quarter" === W.value.dateType ? (u(), n(d(S), { key: 2, modelValue: Q.value, "onUpdate:modelValue": l2[14] || (l2[14] = (e3) => Q.value = e3), type: W.value.dateType, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, clearable: W.value.clearable, format: W.value.format, "value-format": W.value.valueFormat, placeholder: d(Y)(W.value.placeholder), size: W.value.size, onChange: l2[15] || (l2[15] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[16] || (l2[16] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[17] || (l2[17] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "focus")), onClear: l2[18] || (l2[18] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "size"])) : (u(), n(o2, { key: 3, ref_key: "componentRef", ref: J, clearable: W.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, size: W.value.size, placeholder: d(Y)(W.value.placeholder), "start-placeholder": d(Y)(W.value.placeholder), "end-placeholder": d(Y)(W.value.endPlaceholder ? W.value.endPlaceholder : W.value.placeholder), format: W.value.format, "value-format": W.value.valueFormat, modelValue: Q.value, "onUpdate:modelValue": l2[19] || (l2[19] = (e3) => Q.value = e3), shortcuts: X.value, type: W.value.dateType, onChange: l2[20] || (l2[20] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[21] || (l2[21] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[22] || (l2[22] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[23] || (l2[23] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[24] || (l2[24] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[25] || (l2[25] = (a3) => d(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: K, style: i({ ...d($), ...d(N) }) }, [W.value.prefixType ? (u(), n(j, { key: 0, pageContext: e2.pageContext, property: W.value }, null, 8, ["pageContext", "property"])) : (u(), f(g, { key: 1 }, [m(h(d(Y)(W.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
98
98
|
};
|
|
99
99
|
} });
|
|
100
100
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime2.vue.js
CHANGED
|
@@ -49,10 +49,11 @@ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
49
49
|
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: S(O.value.title) }), e3.pageContext || (e3.pageContext = z.pageContext), e3.configure || (e3.configureObj = z.configure), w(e3);
|
|
50
50
|
}
|
|
51
51
|
function le() {
|
|
52
|
-
if (z.pageContext.fileuploadInfo && z.configure.uuid) {
|
|
52
|
+
if (z.pageContext.fileuploadInfo, z.configure.uuid, z.pageContext.fileuploadInfo && z.configure.uuid) {
|
|
53
53
|
const e3 = z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid);
|
|
54
54
|
-1 !== e3 && z.pageContext.fileuploadInfo.splice(e3, 1);
|
|
55
55
|
}
|
|
56
|
+
z.pageContext.fileuploadInfo;
|
|
56
57
|
}
|
|
57
58
|
function oe(e3) {
|
|
58
59
|
le();
|
|
@@ -80,7 +81,7 @@ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
80
81
|
}, re = t(null), pe = t(null);
|
|
81
82
|
return o(() => {
|
|
82
83
|
N.$on(K.value + "-pickFileDone", (e3) => {
|
|
83
|
-
M.value.pickFileDone(e3);
|
|
84
|
+
K.value, M.value.pickFileDone(e3);
|
|
84
85
|
}), a(() => {
|
|
85
86
|
const e3 = (e4, t3, l3) => {
|
|
86
87
|
if (!t3) return;
|
|
@@ -91,7 +92,8 @@ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
91
92
|
y(z.pageContext.entity, e4, l4);
|
|
92
93
|
break;
|
|
93
94
|
}
|
|
94
|
-
} catch (
|
|
95
|
+
} catch (t5) {
|
|
96
|
+
console.error("设置默认值出错:", e4, t5);
|
|
95
97
|
break;
|
|
96
98
|
}
|
|
97
99
|
};
|
package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime2.vue.js
CHANGED
|
@@ -21,10 +21,11 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
|
|
|
21
21
|
return -1 === N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid) && N.pageContext.fileuploadInfo.push({ uuid: N.configure.uuid, label: S(D.value.title) }), e3.pageContext || (e3.pageContext = N.pageContext), e3.configure || (e3.configureObj = N.configure), C(e3);
|
|
22
22
|
}
|
|
23
23
|
function Y() {
|
|
24
|
-
if (N.pageContext.fileuploadInfo && N.configure.uuid) {
|
|
24
|
+
if (N.pageContext.fileuploadInfo, N.configure.uuid, N.pageContext.fileuploadInfo && N.configure.uuid) {
|
|
25
25
|
const e3 = N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid);
|
|
26
26
|
-1 !== e3 && N.pageContext.fileuploadInfo.splice(e3, 1);
|
|
27
27
|
}
|
|
28
|
+
N.pageContext.fileuploadInfo;
|
|
28
29
|
}
|
|
29
30
|
function Z(e3) {
|
|
30
31
|
Y();
|
|
@@ -71,7 +72,7 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
|
|
|
71
72
|
}, ae = t(null), ie = t(null);
|
|
72
73
|
return l(() => {
|
|
73
74
|
j.$on(H.value + "-pickFileDone", (e3) => {
|
|
74
|
-
K.value.pickFileDone(e3);
|
|
75
|
+
H.value, K.value.pickFileDone(e3);
|
|
75
76
|
}), o(() => {
|
|
76
77
|
const e3 = g($, E), t2 = { showName: g($, U), serverPath: e3 };
|
|
77
78
|
h(t2, N.pageContext, N.configure, { formItemRef: ae.value, componentRef: K.value, titleRef: ie.value, value: t2, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime2.vue.js
CHANGED
|
@@ -1,78 +1,79 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, openBlock as r, createBlock as s, normalizeStyle as p, unref as c, normalizeClass as v, createSlots as f, withCtx as y, createVNode as m, createCommentVNode as g, createTextVNode as d, toDisplayString as x, createElementVNode as C, createElementBlock as T, Fragment as I } from "vue";
|
|
2
2
|
import { SuperIcon as k } from "agilebuilder-ui";
|
|
3
|
-
import { getFormModelFields as
|
|
4
|
-
import { getModelFieldFromPageContext as
|
|
5
|
-
import { handleFormEvent as
|
|
6
|
-
import { formatScanRuleSets as O, analysisScanValue as
|
|
7
|
-
import
|
|
8
|
-
import { isMobileBrowser as
|
|
9
|
-
import
|
|
10
|
-
import { $t as
|
|
3
|
+
import { getFormModelFields as w } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { getModelFieldFromPageContext as V, isNumberDataType as h, setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
|
|
5
|
+
import { handleFormEvent as S, handleAfterInitEvent as j, doSuffixOrPrefixClickEvent as R } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { formatScanRuleSets as O, analysisScanValue as N, setScanAnalysisValue as P } from "../../../../utils/form/scan-util.js";
|
|
7
|
+
import q from "../common/title-suffix-element.vue.js";
|
|
8
|
+
import { isMobileBrowser as D, isDingTalkEnv as J } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import M from "../../../../utils/eventBus.js";
|
|
10
|
+
import { $t as z } from "../../../../utils/i18n-util.js";
|
|
11
11
|
import { addRequiredClassUtil as L } from "../../../../utils/common-util.js";
|
|
12
12
|
const B = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: B2 }) {
|
|
13
13
|
var _a, _b, _c;
|
|
14
|
-
const F = e2, $ = F.pageContext.entity ? F.pageContext.entity : {}, A =
|
|
15
|
-
let E =
|
|
14
|
+
const F = e2, $ = F.pageContext.entity ? F.pageContext.entity : {}, A = t("text");
|
|
15
|
+
let E = w(F.pageContext, F.configure);
|
|
16
16
|
if (F.pageContext.modelFieldsMap) {
|
|
17
|
-
const e3 =
|
|
17
|
+
const e3 = V(E, F.pageContext);
|
|
18
18
|
e3 && (A.value = h(e3.dataType) ? "number" : "text");
|
|
19
19
|
}
|
|
20
|
-
const H =
|
|
20
|
+
const H = t(D()), U = F.pageContext.code, W = t(E && E.length > 0 ? U + "__" + E.join("__") : null), G = t(null), K = l({ get: () => _($, E), set(e3) {
|
|
21
21
|
b($, E, e3), null != e3 && "" !== e3 && (G.value = "");
|
|
22
|
-
} }), Q =
|
|
23
|
-
let
|
|
24
|
-
|
|
22
|
+
} }), Q = t(null), X = t(null), Y = t(null), Z = F.configure.runtime ? F.configure.runtime : {}, ee = t(Z.props ? Z.props : {}), te = t(!!((_a = ee.value.scan) == null ? void 0 : _a.enable));
|
|
23
|
+
let le = false;
|
|
24
|
+
J() && (le = true);
|
|
25
25
|
let ne = "";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
const oe = navigator.userAgent;
|
|
27
|
+
ne = oe.indexOf("Html5Plus") > 0 ? "app" : "browser";
|
|
28
|
+
const ae = !(!H.value || !ne || "app" !== ne), ue = t(!!((ae || le) && te.value || H.value && te.value && "https:" === window.location.protocol));
|
|
29
|
+
let ie = {};
|
|
29
30
|
((_b = ee.value.scan) == null ? void 0 : _b.enable) && ((_c = ee.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (O(ee.value.scan.ruleList).then((e3) => {
|
|
30
|
-
|
|
31
|
+
ie = e3;
|
|
31
32
|
}), u(() => K.value, (e3) => {
|
|
32
33
|
e3 = e3.trim();
|
|
33
|
-
const
|
|
34
|
-
|
|
34
|
+
const t2 = N(e3, ie);
|
|
35
|
+
t2 && P(F.pageContext, t2.scanSet, t2.params);
|
|
35
36
|
}));
|
|
36
|
-
const
|
|
37
|
-
function
|
|
37
|
+
const re = Z.style, se = Z.class, pe = Z.headerStyle, ce = Z.titleExceedStyle;
|
|
38
|
+
function ve(e3) {
|
|
38
39
|
return b($, E, e3);
|
|
39
40
|
}
|
|
40
41
|
n(() => {
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
M.$on(W.value + "-scanDone", (e3) => {
|
|
43
|
+
W.value, JSON.stringify(e3), ve(e3.result), S(e3.result, F.pageContext, F.configure, "afterScanDone");
|
|
43
44
|
}), o(() => {
|
|
44
45
|
var _a2;
|
|
45
46
|
const e3 = K.value;
|
|
46
|
-
|
|
47
|
+
j(e3, F.pageContext, F.configure, { formItemRef: Q.value, componentRef: X.value, titleRef: Y.value, value: e3, entity: F.pageContext.entity.data, pageData: F.pageContext.entity.page }), ue.value && ((_a2 = ee.value.scan) == null ? void 0 : _a2.autoOpen) && ye();
|
|
47
48
|
});
|
|
48
49
|
}), a(() => {
|
|
49
|
-
|
|
50
|
+
M.$off(W.value + "-scanDone");
|
|
50
51
|
});
|
|
51
|
-
const
|
|
52
|
-
function
|
|
53
|
-
if (
|
|
52
|
+
const fe = t(false);
|
|
53
|
+
function ye() {
|
|
54
|
+
if (ae || le) {
|
|
54
55
|
const e3 = { type: "scan", componentId: W.value, systemCode: F.pageContext.systemCode };
|
|
55
|
-
|
|
56
|
-
} else if (H.value) if ("https:" === window.location.protocol)
|
|
56
|
+
le && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
|
|
57
|
+
} else if (H.value) if ("https:" === window.location.protocol) fe.value = true;
|
|
57
58
|
else {
|
|
58
59
|
const e3 = { type: "scan", componentId: W.value, systemCode: F.pageContext.systemCode };
|
|
59
60
|
window.parent.postMessage(JSON.stringify(e3), "*");
|
|
60
61
|
}
|
|
61
|
-
else
|
|
62
|
+
else fe.value = true;
|
|
62
63
|
}
|
|
63
64
|
function me(e3) {
|
|
64
|
-
|
|
65
|
+
fe.value = false, ve(e3);
|
|
65
66
|
}
|
|
66
67
|
return B2({ getValue: function() {
|
|
67
68
|
return _($, E);
|
|
68
|
-
}, setValue:
|
|
69
|
+
}, setValue: ve, scanClick: ye, addRequiredClass: function() {
|
|
69
70
|
G.value = L();
|
|
70
|
-
} }), (
|
|
71
|
+
} }), (t2, l2) => {
|
|
71
72
|
const n2 = i("el-input"), o2 = i("scan-code-input-browser"), a2 = i("el-form-item");
|
|
72
|
-
return r(), s(a2, { ref_key: "formItemRef", ref: Q, required: !!ee.value.required, class: v(c(
|
|
73
|
-
let
|
|
74
|
-
null !=
|
|
75
|
-
}(e3)), onFocus:
|
|
73
|
+
return r(), s(a2, { ref_key: "formItemRef", ref: Q, required: !!ee.value.required, class: v(c(se) + (G.value ? " " + G.value : "")), "label-width": ee.value.labelWidth, style: p(c(re)) }, f({ default: y(() => [m(n2, { ref_key: "componentRef", ref: X, disabled: "disabled" === ee.value.state, readonly: "readonly" === ee.value.state, size: ee.value.size, clearable: ee.value.clearable, placeholder: c(z)(ee.value.placeholder), maxlength: ee.value.maxLength, "show-word-limit": ee.value.showInputNum, type: A.value, modelValue: K.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e3) => K.value = e3), onInput: l2[6] || (l2[6] = (t3) => c(S)(t3, e2.pageContext, e2.configure, "input")), onChange: l2[7] || (l2[7] = (t3) => c(S)(t3, e2.pageContext, e2.configure, "change")), onBlur: l2[8] || (l2[8] = (e3) => function(e4) {
|
|
74
|
+
let t3 = _($, E);
|
|
75
|
+
null != t3 && (t3 = t3.trim()), b($, E, t3), S(e4, F.pageContext, F.configure, "blur");
|
|
76
|
+
}(e3)), onFocus: l2[9] || (l2[9] = (t3) => c(S)(t3, e2.pageContext, e2.configure, "focus")), onClick: l2[10] || (l2[10] = (t3) => c(S)(t3, e2.pageContext, e2.configure, "click")), onClear: l2[11] || (l2[11] = (t3) => c(S)(t3, e2.pageContext, e2.configure, "clear")) }, f({ _: 2 }, ["outer" != ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prefix", fn: y(() => [ee.value.preIconType && ee.value.preIconValue ? (r(), s(c(k), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: l2[0] || (l2[0] = (t3) => c(R)(K.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(c(z)(ee.value.preText)), 1)]), key: "0" } : void 0, "outer" == ee.value.iconPosition && (ee.value.preIconType && ee.value.preIconValue || ee.value.preText) ? { name: "prepend", fn: y(() => [ee.value.preIconType && ee.value.preIconValue ? (r(), s(c(k), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.preIconType, iconValue: ee.value.preIconValue, onClick: l2[1] || (l2[1] = (t3) => c(R)(K.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(c(z)(ee.value.preText)), 1)]), key: "1" } : void 0, "outer" != ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "suffix", fn: y(() => [ee.value.sufIconType && ee.value.sufIconValue ? (r(), s(c(k), { key: 0, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: l2[2] || (l2[2] = (t3) => c(R)(K.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(c(z)(ee.value.sufText)), 1)]), key: "2" } : void 0, ue.value || "outer" == ee.value.iconPosition && (ee.value.sufIconType && ee.value.sufIconValue || ee.value.sufText) ? { name: "append", fn: y(() => [ue.value ? (r(), s(c(k), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e3) => ye()) })) : g("", true), ee.value.sufIconType && ee.value.sufIconValue ? (r(), s(c(k), { key: 1, style: { cursor: "pointer" }, iconType: ee.value.sufIconType, iconValue: ee.value.sufIconValue, onClick: l2[4] || (l2[4] = (t3) => c(R)(K.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(c(z)(ee.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), fe.value ? (r(), s(o2, { key: 0, onClose: me, onCancel: l2[12] || (l2[12] = (e3) => fe.value = false) })) : g("", true)]), _: 2 }, [ee.value.tittleShow ? { name: "label", fn: y(() => [C("div", { ref_key: "titleRef", ref: Y, class: "amb-form-item-label", style: p({ ...c(pe), ...c(ce) }) }, [ee.value.prefixType ? (r(), s(q, { key: 0, pageContext: e2.pageContext, property: ee.value }, null, 8, ["pageContext", "property"])) : (r(), T(I, { key: 1 }, [d(x(c(z)(ee.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
76
77
|
};
|
|
77
78
|
} });
|
|
78
79
|
export {
|
|
@@ -8,7 +8,9 @@ const b = { style: { width: "100%", "text-align": "center", "font-weight": "700"
|
|
|
8
8
|
const S = e2, P = S.pageContext.entity ? S.pageContext.entity : {};
|
|
9
9
|
let q = x(S.pageContext, S.configure);
|
|
10
10
|
const O = S.configure.runtime ? S.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
|
|
11
|
+
const B = t(W.value.options ? W.value.options : []), G = W.value.formatType;
|
|
12
|
+
W.value;
|
|
13
|
+
const H = l(() => {
|
|
12
14
|
let e3 = h(P, q);
|
|
13
15
|
if (G) if (W.value.hasOptions) {
|
|
14
16
|
let t2 = null;
|
|
@@ -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 a, nextTick as i, resolveComponent as n, openBlock as u, createBlock as o, normalizeStyle as r, unref as s, normalizeClass as p, createSlots as f, withCtx as c, createVNode as m, createCommentVNode as d, createTextVNode as g, 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 : {}, V = w.style, I = w.class, P = w.headerStyle, S = t(w.props ? w.props : {})
|
|
10
|
+
const T2 = e2, j = b(T2.pageContext, T2.configure), w = T2.configure.runtime ? T2.configure.runtime : {}, V = w.style, I = w.class, P = w.headerStyle, S = t(w.props ? w.props : {});
|
|
11
|
+
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 a(() => {
|
|
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
|
}), (t2, l2) => {
|
|
35
|
-
const
|
|
36
|
-
return u(), o(b2, { ref_key: "formItemRef", ref: A, class: s(
|
|
37
|
+
const a2 = n("el-link"), i2 = n("el-tooltip"), b2 = n("el-form-item");
|
|
38
|
+
return u(), o(b2, { ref_key: "formItemRef", ref: A, class: p(s(I)), "label-width": S.value.labelWidth, style: r(s(V)) }, f({ default: c(() => [m(i2, { disabled: !s(z), content: s(z) }, { default: c(() => [m(a2, { ref_key: "componentRef", ref: B, disabled: "disabled" === S.value.state, type: S.value.type ? S.value.type : "primary", underline: S.value.underline, onClick: l2[0] || (l2[0] = (t3) => s(C)(t3, e2.pageContext, e2.configure, "click", { skipValidate: true })) }, { default: c(() => [$.value ? (u(), o(s(h), { key: 0, iconType: $.value.iconType, iconValue: $.value.icon }, null, 8, ["iconType", "iconValue"])) : d("", true), g(" " + v(J.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 2 }, [S.value.tittleShow ? { name: "label", fn: c(() => [y("div", { ref_key: "titleRef", ref: E, style: r({ ...s(P) }), class: "amb-form-item-label" }, v(s(_)(S.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "label-width", "style"]);
|
|
37
39
|
};
|
|
38
40
|
} });
|
|
39
41
|
export {
|
|
@@ -178,7 +178,7 @@ const H = { class: "toolbar-right-btns" }, F = ["title"], N = ["title"], B = { c
|
|
|
178
178
|
const n2 = ae.root.getElementsByTagName("img");
|
|
179
179
|
for (const e6 of n2) e6.src === t4 && (e6.width = 300, e6.src = r2.url, e6.setAttribute("data-uuid", r2.uuid));
|
|
180
180
|
} catch (e5) {
|
|
181
|
-
Ae();
|
|
181
|
+
console.error("上传图片失败", e5), Ae();
|
|
182
182
|
} finally {
|
|
183
183
|
ue.value = false;
|
|
184
184
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, computed as t, watch as o, onUnmounted as a, onMounted as i, nextTick as n, resolveComponent as
|
|
1
|
+
import { defineComponent as e, ref as l, computed as t, watch as o, onUnmounted as a, onMounted as i, nextTick as n, resolveComponent as r, openBlock as u, createBlock as s, normalizeStyle as p, unref as c, normalizeClass 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, putToOptionSourceMap as j, autoSetAfterSelect as R, getVariableValue as P } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleFormEvent as M, handleAfterInitEvent as D } from "../../../../utils/events/event-util.js";
|
|
@@ -13,7 +13,7 @@ const F = { style: { "padding-left": "5px" } }, G = { style: { width: "100%", di
|
|
|
13
13
|
const { t: N } = B(), Q = e2, X = l(null), Y = l(false), Z = Q.pageContext.entity ? Q.pageContext.entity : {};
|
|
14
14
|
let ee = V(Q.pageContext, Q.configure);
|
|
15
15
|
const le = Q.configure.runtime ? Q.configure.runtime : {}, te = le.style, oe = le.class, ae = le.headerStyle, ie = le.titleExceedStyle, ne = l(le.props ? le.props : {});
|
|
16
|
-
let
|
|
16
|
+
let re = l(ne.value.optionDescriptionPosition && "default" !== ne.value.optionDescriptionPosition), ue = [];
|
|
17
17
|
const se = "copyBtn_" + Q.configure.uuid + "_" + (/* @__PURE__ */ new Date()).getTime();
|
|
18
18
|
function pe() {
|
|
19
19
|
let e3 = P(Z, ee);
|
|
@@ -21,7 +21,7 @@ const F = { style: { "padding-left": "5px" } }, G = { style: { width: "100%", di
|
|
|
21
21
|
}
|
|
22
22
|
const ce = t({ get: () => pe(), set(e3) {
|
|
23
23
|
const l2 = pe();
|
|
24
|
-
|
|
24
|
+
ue = Array.isArray(l2) ? [...l2] : l2;
|
|
25
25
|
let t2 = e3;
|
|
26
26
|
if (ne.value.multiple && false !== ne.value.showSelectAll && Array.isArray(e3) && e3.includes(H)) {
|
|
27
27
|
const e4 = (fe.value || []).map((e5) => String(e5.value)), o2 = Array.isArray(l2) ? l2.map((e5) => String(e5)) : [];
|
|
@@ -57,7 +57,7 @@ const F = { style: { "padding-left": "5px" } }, G = { style: { width: "100%", di
|
|
|
57
57
|
t2 && t2.length > 0 && (l2 = t2[0]);
|
|
58
58
|
let o2 = {};
|
|
59
59
|
l2 && (o2.extendParams = l2);
|
|
60
|
-
o2.options = fe.value, o2.oldValue =
|
|
60
|
+
o2.options = fe.value, o2.oldValue = ue, M(e3, Q.pageContext, Q.configure, "change", o2);
|
|
61
61
|
};
|
|
62
62
|
const be = ne.value.monitorFields, xe = [];
|
|
63
63
|
if (be) {
|
|
@@ -118,6 +118,7 @@ const F = { style: { "padding-left": "5px" } }, G = { style: { width: "100%", di
|
|
|
118
118
|
e3.on("success", () => {
|
|
119
119
|
W({ showClose: true, type: "success", message: N("superPageRuntimeMessage.copySuccess") });
|
|
120
120
|
}), e3.on("error", (e4) => {
|
|
121
|
+
console.error("复制失败", e4);
|
|
121
122
|
}), n(() => {
|
|
122
123
|
const e4 = ce.value;
|
|
123
124
|
D(e4, Q.pageContext, Q.configure, { formItemRef: ke.value, componentRef: Ae.value, titleRef: Te.value, value: e4, entity: Q.pageContext.entity.data, pageData: Q.pageContext.entity.page });
|
|
@@ -145,9 +146,9 @@ const F = { style: { "padding-left": "5px" } }, G = { style: { width: "100%", di
|
|
|
145
146
|
}, getSelectItemsTitle: je, getOptions: function() {
|
|
146
147
|
return fe.value;
|
|
147
148
|
} }), (l2, t2) => {
|
|
148
|
-
const o2 =
|
|
149
|
-
return
|
|
150
|
-
}, ["stop"]), ["space"])), onChange: ne.value.changeMethod, onClear: ne.value.changeMethod, onVisibleChange: Re, modelValue: ce.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e3) => ce.value = e3) }, { prefix: g(() => [d("span", { class: "mobile-copy-trigger", onClick: h(Pe, ["stop"]) }, [m(o2, { style: { cursor: "copy" } }, { default: g(() => [m(c(E))]), _: 1 })])]), default: g(() => [ne.value.multiple && false !== ne.value.showSelectAll ? (
|
|
149
|
+
const o2 = r("el-icon"), a2 = r("el-option"), i2 = r("el-select"), n2 = r("el-popover"), k2 = r("el-form-item");
|
|
150
|
+
return u(), s(k2, { ref_key: "formItemRef", ref: ke, required: !!ne.value.required, class: f(c(oe) + (X.value ? " " + X.value : "")), "label-width": ne.value.labelWidth, style: p(c(te)) }, 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", G, [m(i2, { ref_key: "componentRef", ref: Ae, 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: c(q)(ne.value.placeholder), "remote-show-suffix": ne.value.remoteShowSuffix, remote: ne.value.remote, "remote-method": ne.value.remoteMethod, loading: ge.value, onKeydown: t2[0] || (t2[0] = y(h(() => {
|
|
151
|
+
}, ["stop"]), ["space"])), onChange: ne.value.changeMethod, onClear: ne.value.changeMethod, onVisibleChange: Re, modelValue: ce.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e3) => ce.value = e3) }, { prefix: g(() => [d("span", { class: "mobile-copy-trigger", onClick: h(Pe, ["stop"]) }, [m(o2, { style: { cursor: "copy" } }, { default: g(() => [m(c(E))]), _: 1 })])]), default: g(() => [ne.value.multiple && false !== ne.value.showSelectAll ? (u(), s(a2, { key: 0, label: c(N)("superGrid.selectAll"), value: H, disabled: !(fe.value && fe.value.length > 0) }, null, 8, ["label", "disabled"])) : b("", true), (u(true), x(C, null, _(fe.value, (l3) => (u(), s(a2, { key: l3.value, label: l3.label, value: l3.value, class: f({ "option-description-newLine": c(re) }), onClick: (t3) => c(M)(l3.value, e2.pageContext, e2.configure, "click", { values: ce.value }) }, { default: g(() => [l3._description_ ? (u(), x(C, { key: 0 }, [c(re) ? (u(), x("div", K, [d("span", null, w(l3.label), 1), d("span", L, w(l3._description_), 1)])) : (u(), x(C, { key: 1 }, [d("span", U, w(l3.label), 1), d("span", $, 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", F, [m(o2, { id: se, style: { cursor: "copy" } }, { default: g(() => [m(c(E))]), _: 1 })])]), _: 1 })]), _: 2 }, [ne.value.tittleShow ? { name: "label", fn: g(() => [d("div", { ref_key: "titleRef", ref: Te, style: p({ ...c(ae), ...c(ie) }), class: "amb-form-item-label" }, [ne.value.prefixType ? (u(), s(I, { key: 0, pageContext: e2.pageContext, property: ne.value }, null, 8, ["pageContext", "property"])) : (u(), x(C, { key: 1 }, [S(w(c(q)(ne.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
151
152
|
};
|
|
152
153
|
} });
|
|
153
154
|
export {
|
|
@@ -6,9 +6,9 @@ import { addComponentRef as x, addComponentRefByCode as y } from "../../utils/gl
|
|
|
6
6
|
import { getPermissionCodes as w, packageFormRules as j, getModelFields as N, controlObjectRenderState as M } from "../../utils/page-init-util.js";
|
|
7
7
|
import { caculateShowCondition as V, getFormPropName as _, getSizeConfig as A } from "../../utils/page-helper-util.js";
|
|
8
8
|
import { isWorkflowPage as S, getPropClassName as T, isNumber as $ } from "../../utils/common-util.js";
|
|
9
|
-
import { isShowMobileEvent as
|
|
10
|
-
import { usePageContextStore as
|
|
11
|
-
import { isHasFieldAuth as
|
|
9
|
+
import { isShowMobileEvent as H, 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 L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
@@ -17,7 +17,7 @@ const L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
17
17
|
null == L2.configure.style && (L2.configure.style = {});
|
|
18
18
|
let k = null, D = w(L2.configure, L2.pageContext);
|
|
19
19
|
L2.configure && L2.configure.props && L2.configure.props.base && (L2.configure.props.base.functionCode = D);
|
|
20
|
-
const E = R(D || "true", L2.pageContext.systemCode), J =
|
|
20
|
+
const E = R(D || "true", L2.pageContext.systemCode), J = B(L2.pageContext, L2.configure), W = E && J;
|
|
21
21
|
L2.configure && L2.configure.props && L2.configure.props.base && (L2.configure.props.base.isHasFieldAuthPermission = W), j(L2.pageContext, L2.configure, W);
|
|
22
22
|
let q = o(null), z = o(true), G = o("");
|
|
23
23
|
if (L2.configure && L2.configure.props) {
|
|
@@ -26,7 +26,7 @@ const L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
26
26
|
var _a2;
|
|
27
27
|
let o2 = true;
|
|
28
28
|
if (W) if (q.value && null !== q.value) o2 = "show" === q.value;
|
|
29
|
-
else if (
|
|
29
|
+
else if (H(L2.pageContext, L2.configure)) if (e3 && e3.length > 0) o2 = V(L2.pageContext, e3);
|
|
30
30
|
else {
|
|
31
31
|
const e4 = (_a2 = L2.configure.props.base) == null ? void 0 : _a2.state;
|
|
32
32
|
e4 && "hidden" === e4 && (o2 = false);
|
|
@@ -80,7 +80,7 @@ const L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
80
80
|
const t2 = Z.style[e3 + "_class"];
|
|
81
81
|
t2 && (X.value += " " + t2);
|
|
82
82
|
}
|
|
83
|
-
const ee =
|
|
83
|
+
const ee = P();
|
|
84
84
|
let oe = false;
|
|
85
85
|
function te(e3) {
|
|
86
86
|
var _a2, _b2, _c2;
|
|
@@ -131,7 +131,9 @@ const L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
131
131
|
const o2 = e3.parentNode;
|
|
132
132
|
if (!e3 || !o2) return;
|
|
133
133
|
const t2 = e3.getBoundingClientRect();
|
|
134
|
-
let n2 = window.innerHeight - t2.y - 30
|
|
134
|
+
let n2 = window.innerHeight - t2.y - 30;
|
|
135
|
+
window.innerHeight, t2.y;
|
|
136
|
+
let i2 = n2 + "";
|
|
135
137
|
if ("tabs" === L2.configure.name && L2.pageContext.isDialog && !F()) {
|
|
136
138
|
const o3 = e3.closest(".runtime-page-container");
|
|
137
139
|
if (o3) {
|
|
@@ -142,7 +144,7 @@ const L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
142
144
|
U.value.height = i2, U.value["overflow-y"] = "auto", U.value["overflow-x"] = "hidden", L2.configure.sytle || (L2.configure.sytle = {}), L2.configure.sytle._heightStyle = i2;
|
|
143
145
|
}
|
|
144
146
|
r(() => {
|
|
145
|
-
W &&
|
|
147
|
+
W && O(L2.configure) || ee.countComponentsLoadedNumber();
|
|
146
148
|
}), s(() => {
|
|
147
149
|
var _a2;
|
|
148
150
|
re && clearTimeout(re), k && ((_a2 = L2.pageContext.hiddenNotValidatorCodes) == null ? void 0 : _a2.delete(k));
|
|
@@ -157,7 +159,7 @@ const L = e({ __name: "object-render", props: { pageContext: {}, configure: {} }
|
|
|
157
159
|
const t2 = L2.configure.props ? L2.configure.props : {}, n2 = L2.configure.style ? L2.configure.style : {}, i2 = t2.position;
|
|
158
160
|
"top" == i2 || "bottom" == i2 || n2.position;
|
|
159
161
|
};
|
|
160
|
-
return (o2, t2) => u(W) && u(
|
|
162
|
+
return (o2, t2) => u(W) && u(O)(e2.configure) ? l((a(), p(g(I.value), { key: 0, ref: te, style: f(U.value), class: c(X.value), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[d, u(z)]]) : m("", true);
|
|
161
163
|
} });
|
|
162
164
|
export {
|
|
163
165
|
L as default
|