super-page-runtime 2.3.33-sit2 → 2.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/api/page-expose-util.js +131 -131
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +47 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +3 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +46 -44
- package/dist/es/components/runtime/utils/events/event-util.js +116 -116
- package/dist/es/components/runtime/utils/events/print-label.js +27 -25
- package/dist/es/components/runtime/utils/events/standard-event.js +738 -726
- package/dist/es/components/runtime/utils/events/validator-util.js +2 -2
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +130 -125
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +14 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +98 -93
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +69 -68
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +27 -23
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +22 -20
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +119 -116
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +46 -45
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +4 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +28 -28
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +35 -35
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +9 -9
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -56
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +12 -11
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +4 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +19 -18
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +18 -16
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -4
- package/dist/es/components/runtime/views/super-page.vue2.js +183 -182
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/package.json +2 -2
package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js
CHANGED
|
@@ -18,9 +18,9 @@ const q = e({ __name: "input-number-runtime", props: { pageContext: {}, configur
|
|
|
18
18
|
});
|
|
19
19
|
}), q2({ addRequiredClass: function() {
|
|
20
20
|
z.value = _();
|
|
21
|
-
} }), (
|
|
22
|
-
const
|
|
23
|
-
return i(), u(
|
|
21
|
+
} }), (t2, l2) => {
|
|
22
|
+
const o2 = n("el-input-number"), a2 = n("el-form-item");
|
|
23
|
+
return i(), u(a2, { ref_key: "formItemRef", ref: W, required: U.value.required, class: s(p(E) + (z.value ? " " + z.value : "")), "label-width": U.value.labelWidth, style: r(p(D)) }, { label: m(() => [U.value.tittleShow ? (i(), c("div", { key: 0, ref_key: "titleRef", ref: G, style: r({ ...p(F), ...p(T) }) }, [U.value.prefixType ? (i(), u(j, { key: 0, pageContext: e2.pageContext, property: U.value }, null, 8, ["pageContext", "property"])) : (i(), c(v, { key: 1 }, [g(y(p(k)(U.value.title)), 1)], 64))], 4)) : d("", true)]), default: m(() => [f(o2, { ref_key: "componentRef", ref: A, disabled: "disabled" === U.value.state, readonly: "readonly" === U.value.state, controls: U.value.showButton, size: U.value.size, placeholder: U.value.placeholder, modelValue: B.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => B.value = e3), precision: U.value.precision, step: U.value.step, min: U.value.min, max: U.value.max, onChange: l2[1] || (l2[1] = (t3) => p(R)(t3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (t3) => p(R)(t3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (t3) => p(R)(t3, e2.pageContext, e2.configure, "focus")) }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
24
24
|
};
|
|
25
25
|
} });
|
|
26
26
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -1,81 +1,82 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
2
|
-
import { SuperIcon as
|
|
3
|
-
import { getFormModelFields as
|
|
4
|
-
import { getModelFieldFromPageContext as
|
|
1
|
+
import { defineComponent as e, ref as n, computed as t, onMounted as o, nextTick as l, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as c, normalizeClass as p, unref as v, withCtx as f, createVNode as g, createCommentVNode as y, createSlots as d, createTextVNode as m, toDisplayString as x, createElementBlock as C, Fragment as w } from "vue";
|
|
2
|
+
import { SuperIcon as k } from "agilebuilder-ui";
|
|
3
|
+
import { getFormModelFields as I } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { getModelFieldFromPageContext as T, 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 D } from "../../../../utils/form/scan-util.js";
|
|
7
|
+
import N from "../common/title-suffix-element.vue.js";
|
|
8
|
+
import { isMobileBrowser as P } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import q from "../../../../utils/eventBus.js";
|
|
10
|
+
import { $t as J } from "../../../../utils/i18n-util.js";
|
|
11
|
+
import { addRequiredClassUtil as M } from "../../../../utils/common-util.js";
|
|
12
|
+
const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
|
|
13
13
|
var _a, _b, _c;
|
|
14
|
-
const L = e2,
|
|
15
|
-
let
|
|
14
|
+
const L = e2, A = L.pageContext.entity ? L.pageContext.entity : {}, B = n("text");
|
|
15
|
+
let F = I(L.pageContext, L.configure);
|
|
16
16
|
if (L.pageContext.modelFieldsMap) {
|
|
17
|
-
const e3 =
|
|
18
|
-
e3 && (
|
|
17
|
+
const e3 = T(F, L.pageContext);
|
|
18
|
+
e3 && (B.value = V(e3.dataType) ? "number" : "text");
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
h(
|
|
22
|
-
} }), H =
|
|
20
|
+
const $ = n(P()), E = L.pageContext.code, U = n(F && F.length > 0 ? E + "__" + F.join("__") : null), W = n(null), G = t({ get: () => b(A, F), set(e3) {
|
|
21
|
+
h(A, F, e3), null != e3 && "" !== e3 && (W.value = "");
|
|
22
|
+
} }), H = n(null), K = n(null), Q = n(null), X = L.configure.runtime ? L.configure.runtime : {}, Y = n(X.props ? X.props : {}), Z = n(!!((_a = Y.value.scan) == null ? void 0 : _a.enable));
|
|
23
23
|
let ee = false;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const ne = window.localStorage.getItem("auth_source");
|
|
25
|
+
ne && "dingtalk" === ne && (ee = true);
|
|
26
|
+
let te = "";
|
|
27
|
+
const oe = navigator.userAgent;
|
|
28
|
+
te = oe.indexOf(" uni-app ") > 0 ? "app" : "browser";
|
|
29
|
+
const le = !(!$.value || !te || "app" !== te), ae = n(!!((le || ee) && Z.value || $.value && Z.value && "https:" === window.location.protocol));
|
|
30
|
+
let ue = {};
|
|
30
31
|
((_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) => {
|
|
31
|
-
|
|
32
|
+
ue = e3;
|
|
32
33
|
}), u(() => G.value, (e3) => {
|
|
33
34
|
e3 = e3.trim();
|
|
34
|
-
const
|
|
35
|
-
|
|
35
|
+
const n2 = O(e3, ue);
|
|
36
|
+
n2 && D(L.pageContext, n2.scanSet, n2.params);
|
|
36
37
|
}));
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
return h(
|
|
38
|
+
const ie = X.style, re = X.class, se = X.headerStyle, ce = X.titleExceedStyle;
|
|
39
|
+
function pe(e3) {
|
|
40
|
+
return h(A, F, e3);
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}),
|
|
42
|
+
o(() => {
|
|
43
|
+
q.$on(U.value + "-scanDone", (e3) => {
|
|
44
|
+
console.log("superPage4444---scanDone--componentId.value=", U.value, "data=", JSON.stringify(e3)), pe(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
|
|
45
|
+
}), l(() => {
|
|
45
46
|
var _a2;
|
|
46
47
|
const e3 = G.value;
|
|
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 }),
|
|
48
|
-
});
|
|
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 }), ae.value && ((_a2 = Y.value.scan) == null ? void 0 : _a2.autoOpen) && fe();
|
|
49
|
+
}), console.log("input-text");
|
|
49
50
|
}), a(() => {
|
|
50
|
-
|
|
51
|
+
q.$off(U.value + "-scanDone");
|
|
51
52
|
});
|
|
52
|
-
const
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
53
|
+
const ve = n(false);
|
|
54
|
+
function fe() {
|
|
55
|
+
if (console.log("scanClick----userAgent=", te), le || ee) {
|
|
55
56
|
const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
|
|
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 (
|
|
57
|
+
ee && (e3.type = "dingTalkScan"), window.parent.parent ? (console.log("scanClick----window.parent.parent", window.parent.parent), window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (console.log("scanClick----window.parent", window.parent), window.parent.postMessage(JSON.stringify(e3), "*"));
|
|
58
|
+
} else if ($.value) if ("https:" === window.location.protocol) ve.value = true;
|
|
58
59
|
else {
|
|
59
60
|
const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
|
|
60
61
|
window.parent.postMessage(JSON.stringify(e3), "*");
|
|
61
62
|
}
|
|
62
|
-
else
|
|
63
|
+
else ve.value = true;
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
65
|
+
function ge(e3) {
|
|
66
|
+
ve.value = false, pe(e3);
|
|
66
67
|
}
|
|
67
|
-
return
|
|
68
|
-
return b(
|
|
69
|
-
}, setValue:
|
|
70
|
-
W.value =
|
|
71
|
-
} }), (
|
|
72
|
-
const
|
|
73
|
-
return
|
|
74
|
-
let
|
|
75
|
-
null !=
|
|
76
|
-
}(
|
|
68
|
+
return z2({ getValue: function() {
|
|
69
|
+
return b(A, F);
|
|
70
|
+
}, setValue: pe, scanClick: fe, addRequiredClass: function() {
|
|
71
|
+
W.value = M();
|
|
72
|
+
} }), (n2, t2) => {
|
|
73
|
+
const o2 = i("el-input"), l2 = i("scan-code-input-browser"), a2 = i("el-form-item");
|
|
74
|
+
return s(), r(a2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: p(v(re) + (W.value ? " " + W.value : "")), "label-width": Y.value.labelWidth, style: c(v(ie)) }, { label: f(() => [Y.value.tittleShow ? (s(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: c({ ...v(se), ...v(ce) }) }, [Y.value.prefixType ? (s(), r(N, { key: 0, pageContext: e2.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (s(), C(w, { key: 1 }, [m(x(v(J)(Y.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(o2, { 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: B.value, modelValue: G.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e3) => G.value = e3), onInput: t2[6] || (t2[6] = (n3) => v(_)(n3, e2.pageContext, e2.configure, "input")), onChange: t2[7] || (t2[7] = (n3) => v(_)(n3, e2.pageContext, e2.configure, "change")), onBlur: t2[8] || (t2[8] = (e3) => function(e4) {
|
|
75
|
+
let n3 = b(A, F);
|
|
76
|
+
null != n3 && (n3 = n3.trim()), h(A, F, n3), _(e4, L.pageContext, L.configure, "blur");
|
|
77
|
+
}(e3)), onFocus: t2[9] || (t2[9] = (n3) => v(_)(n3, e2.pageContext, e2.configure, "focus")), onClick: t2[10] || (t2[10] = (n3) => v(_)(n3, e2.pageContext, e2.configure, "click")), onClear: t2[11] || (t2[11] = (n3) => v(_)(n3, e2.pageContext, e2.configure, "clear")) }, d({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (s(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[0] || (t2[0] = (n3) => v(j)(G.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(J)(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 ? (s(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[1] || (t2[1] = (n3) => v(j)(G.value, e2.pageContext, e2.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(J)(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 ? (s(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[2] || (t2[2] = (n3) => v(j)(G.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(J)(Y.value.sufText)), 1)]), key: "2" } : void 0, ae.value || "outer" == Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "append", fn: f(() => [ae.value ? (s(), r(v(k), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e3) => fe()) })) : y("", true), Y.value.sufIconType && Y.value.sufIconValue ? (s(), r(v(k), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[4] || (t2[4] = (n3) => v(j)(G.value, e2.pageContext, e2.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), m(" " + x(v(J)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ve.value ? (s(), r(l2, { key: 0, onClose: ge })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
77
78
|
};
|
|
78
79
|
} });
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
+
z as default
|
|
81
82
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as u, createElementBlock as
|
|
2
|
-
import { getFormModelFields as
|
|
3
|
-
import { getVariableValue as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as u, createElementBlock as o, createBlock as i, openBlock as s, normalizeStyle as p, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as m } from "vue";
|
|
2
|
+
import { getFormModelFields as d } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { getVariableValue as x, formatValueByType as h } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { SuperIcon as k } from "agilebuilder-ui";
|
|
5
5
|
import { getCustomFunc as w, handleAfterInitEvent as T, handleFormEvent as C } from "../../../../utils/events/event-util.js";
|
|
6
6
|
import { $t as _ } from "../../../../utils/i18n-util.js";
|
|
7
7
|
const I = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px" } }, b = { style: { overflow: "hidden", "white-space": "nowrap" } }, V = ["title"], j = e({ __name: "label-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
|
|
8
|
-
const R = e2,
|
|
9
|
-
let
|
|
8
|
+
const R = e2, P = R.pageContext.entity ? R.pageContext.entity : {};
|
|
9
|
+
let S = d(R.pageContext, R.configure);
|
|
10
10
|
const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, A = q.class, z = q.headerStyle, D = q.appendClass, E = q.appendStyle, F = q.titleExceedStyle, N = t(q.props ? q.props : {});
|
|
11
|
-
const W = t(N.value.options ? N.value.options : []), B = N.value.formatType
|
|
12
|
-
|
|
11
|
+
const W = t(N.value.options ? N.value.options : []), B = N.value.formatType;
|
|
12
|
+
console.log("designProperty.value", N.value);
|
|
13
|
+
const G = l(() => {
|
|
14
|
+
let e3 = x(P, S);
|
|
13
15
|
if (B) if (N.value.hasOptions) {
|
|
14
16
|
let t2 = null;
|
|
15
17
|
W.value && (t2 = W.value.filter((t3) => t3.value == e3)), t2 && t2.length > 0 && (e3 = t2[0].label);
|
|
@@ -26,9 +28,9 @@ const I = { style: { width: "100%", "text-align": "center", "font-weight": "700"
|
|
|
26
28
|
});
|
|
27
29
|
}), j2({ updateOptions: function(e3) {
|
|
28
30
|
W.value = e3 || [];
|
|
29
|
-
} }), (
|
|
30
|
-
const
|
|
31
|
-
return N.value.whetherTittle ? (s(),
|
|
31
|
+
} }), (t2, l2) => {
|
|
32
|
+
const n2 = u("el-form-item");
|
|
33
|
+
return N.value.whetherTittle ? (s(), o("div", { key: 0, ref_key: "titleRef", ref: K, class: r(f(A)), style: p(f(O)) }, [c("div", I, v(N.value.title), 1)], 6)) : N.value.tittleShow ? (s(), i(n2, { key: 1, ref_key: "formItemRef", ref: H, required: !!N.value.required, class: r([f(A), N.value.contentAlign ? "form-item-align-" + N.value.contentAlign : "formNo" === N.value.showType ? "form-item-align-flex-end" : ""]), "label-width": N.value.labelWidth, style: p(f(O)) }, { label: y(() => [N.value.tittleShow ? (s(), o("div", { key: 0, ref_key: "titleRef", ref: K, style: p({ ...f(z), ...f(F) }) }, v(f(_)(N.value.title)), 5)) : g("", true)]), default: y(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: J, onClick: l2[0] || (l2[0] = (t3) => f(C)(t3, e2.pageContext, e2.configure, "click")) }, [c("span", b, [N.value.preIconValue || N.value.preText ? (s(), o("span", { key: 0, class: r({ "el-input__suffix": "outer" != N.value.iconPosition, "el-input-group__append": "outer" == N.value.iconPosition }), style: p(f(E)) }, [N.value.preIconType && N.value.preIconValue ? (s(), i(f(k), { key: 0, iconType: N.value.preIconType, iconValue: N.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + v(f(_)(N.value.preText)), 1)], 6)) : g("", true), m(" " + v(G.value), 1)]), N.value.sufIconValue || N.value.sufText ? (s(), o("span", { key: 0, class: r({ "el-input__suffix": "outer" != N.value.iconPosition, "el-input-group__append": "outer" == N.value.iconPosition }) }, [N.value.sufIconType && N.value.sufIconValue ? (s(), i(f(k), { key: 0, style: {}, iconType: N.value.sufIconType, iconValue: N.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), c("span", null, " " + v(f(_)(N.value.sufText)), 1)], 2)) : g("", true)], 512)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (s(), o("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: l2[1] || (l2[1] = (t3) => f(C)(t3, e2.pageContext, e2.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: G.value }, v(N.value.prefixIcon) + " " + v(G.value), 9, V), N.value.suffixTxt ? (s(), o("span", { key: 0, class: r(f(D)), style: p(f(E)) }, v(N.value.suffixTxt), 7)) : g("", true)]));
|
|
32
34
|
};
|
|
33
35
|
} });
|
|
34
36
|
export {
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as i, createBlock as u, openBlock as o, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as f, createVNode as c, createTextVNode as d, toDisplayString as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as a, resolveComponent as i, createBlock as u, openBlock as o, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as f, createVNode as c, createTextVNode as d, toDisplayString as g, createElementBlock as m, createCommentVNode as v } from "vue";
|
|
2
2
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue as b } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as k, handleEvent as x } from "../../../../utils/events/event-util.js";
|
|
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
|
+
console.log("designProperty", S.value);
|
|
8
9
|
let $ = S.value.formatting;
|
|
9
|
-
const D = _2.pageContext.entity ? _2.pageContext.entity : {},
|
|
10
|
+
const D = _2.pageContext.entity ? _2.pageContext.entity : {}, P = l(() => {
|
|
10
11
|
let e3 = b(D, h);
|
|
11
12
|
return e3 = null == e3 || null == e3 ? "" : e3, $ && (e3 = $.replace(/\${value}/g, e3)), e3;
|
|
12
13
|
});
|
|
13
|
-
let
|
|
14
|
-
|
|
14
|
+
let V = S.value.tooltip, W = null;
|
|
15
|
+
V && (W = l(() => {
|
|
15
16
|
let e3 = b(D, h);
|
|
16
|
-
return e3 = null == e3 || null == e3 ? "" : e3,
|
|
17
|
+
return e3 = null == e3 || null == e3 ? "" : e3, V.replace(/\${value}/g, e3);
|
|
17
18
|
}));
|
|
18
|
-
const
|
|
19
|
+
const q = t(null), z = t(null), A = t(null);
|
|
19
20
|
return n(() => {
|
|
20
21
|
a(() => {
|
|
21
|
-
const e3 =
|
|
22
|
-
k(e3, _2.pageContext, _2.configure, { formItemRef:
|
|
22
|
+
const e3 = P.value;
|
|
23
|
+
k(e3, _2.pageContext, _2.configure, { formItemRef: q.value, componentRef: z.value, titleRef: A.value, value: e3, entity: _2.pageContext.entity.data, pageData: _2.pageContext.entity.page });
|
|
23
24
|
});
|
|
24
|
-
}), (
|
|
25
|
-
const
|
|
26
|
-
return o(), u(
|
|
25
|
+
}), (t2, l2) => {
|
|
26
|
+
const n2 = i("el-link"), a2 = i("el-tooltip"), y2 = i("el-form-item");
|
|
27
|
+
return o(), u(y2, { ref_key: "formItemRef", ref: q, class: s(p(w)), "label-width": S.value.labelWidth, style: r(p(j)) }, { label: f(() => [S.value.tittleShow ? (o(), m("div", { key: 0, ref_key: "titleRef", ref: A, style: r({ ...p(I) }) }, g(p(C)(S.value.title)), 5)) : v("", true)]), default: f(() => [c(a2, { disabled: !p(W), content: p(W) }, { default: f(() => [c(n2, { ref_key: "componentRef", ref: z, disabled: "disabled" === S.value.state, type: S.value.type, underline: S.value.underline, onClick: l2[0] || (l2[0] = (t3) => p(x)(t3, e2.pageContext, e2.configure, "click", { skipValidate: true })) }, { default: f(() => [d(g(P.value), 1)]), _: 1 }, 8, ["disabled", "type", "underline"])]), _: 1 }, 8, ["disabled", "content"])]), _: 1 }, 8, ["class", "label-width", "style"]);
|
|
27
28
|
};
|
|
28
29
|
} });
|
|
29
30
|
export {
|
|
@@ -47,6 +47,7 @@ const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
|
|
|
47
47
|
Y && clearTimeout(Y), Y = setTimeout(function() {
|
|
48
48
|
const e3 = Q();
|
|
49
49
|
e3 != X && (X = e3, R(z.pageContext, Z, void 0).then((e4) => {
|
|
50
|
+
console.log("查询失败!", e4);
|
|
50
51
|
}));
|
|
51
52
|
}, 200);
|
|
52
53
|
}
|
|
@@ -72,9 +73,9 @@ const w = e({ __name: "radio-runtime", props: { pageContext: {}, configure: {} }
|
|
|
72
73
|
l2.value === e3 && (t2 = t2 + l2.label + ",");
|
|
73
74
|
}), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
|
|
74
75
|
}
|
|
75
|
-
} }), (
|
|
76
|
-
const
|
|
77
|
-
return s(), r(
|
|
76
|
+
} }), (t2, l2) => {
|
|
77
|
+
const o2 = i("el-radio"), n2 = i("el-radio-group"), u2 = i("el-form-item");
|
|
78
|
+
return s(), r(u2, { ref_key: "formItemRef", ref: te, required: A.value.required, class: p(c(F) + (O.value ? " " + O.value : "")), "label-width": A.value.labelWidth, style: f(c(W)) }, { label: g(() => [A.value.tittleShow ? (s(), d("div", { key: 0, ref_key: "titleRef", ref: oe, style: f({ ...c(U), ...c($) }) }, b(c(q)(A.value.title)), 5)) : C("", true)]), default: g(() => [v(n2, { ref_key: "componentRef", ref: le, disabled: "disabled" === A.value.state, size: A.value.size, onChange: A.value.changeMethod, modelValue: M.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => M.value = e3) }, { default: g(() => [(s(true), d(m, null, h(B.value, (t3) => (s(), r(o2, { key: t3.value, label: t3.value, onClick: (l3) => c(T)(t3.value, e2.pageContext, e2.configure, "click", { values: M.value }) }, { default: g(() => [y(b(t3.label), 1)]), _: 2 }, 1032, ["label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
78
79
|
};
|
|
79
80
|
} });
|
|
80
81
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, watch as n, onMounted as l, nextTick as o, onBeforeUnmount as i, resolveComponent as a, createElementBlock as r, openBlock as u, Fragment as s, createVNode as c, createBlock as d, createCommentVNode as p, normalizeStyle as f, normalizeClass as m, unref as v, withCtx as g, createElementVNode as h, toDisplayString as b } from "vue";
|
|
2
2
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
|
-
import { getSizeConfig as x, formatVariableValue as
|
|
3
|
+
import { getSizeConfig as x, formatVariableValue as w, getVariableValue as k, setVariableValue as C } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { handleAfterInitEvent as q, handleFormEvent as T } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import S from "agilebuilder-ui/src/utils/request";
|
|
6
6
|
import { $t as E } from "../../../../utils/i18n-util.js";
|
|
@@ -17,7 +17,7 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
17
17
|
let Z = x(W.pageContext, W.configure);
|
|
18
18
|
Z && Z.fixHeight && (O.height || (O.height = Z.fixHeight + "px"));
|
|
19
19
|
let ee = X.value.value;
|
|
20
|
-
const te =
|
|
20
|
+
const te = w(W.pageContext, ee), ne = t(null);
|
|
21
21
|
let le = null;
|
|
22
22
|
const oe = t(false), ie = t(0), ae = t(false), re = t(false), ue = t("");
|
|
23
23
|
let se = null, ce = X.value.state;
|
|
@@ -43,15 +43,15 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
43
43
|
});
|
|
44
44
|
const ve = t([]), ge = t(false), he = t(null), be = t(null), ye = t(null);
|
|
45
45
|
let xe = null;
|
|
46
|
-
function
|
|
46
|
+
function we(e3) {
|
|
47
47
|
const t2 = e3.match(/serverPath=([^&"]+)/);
|
|
48
48
|
return t2 ? t2[1] : "";
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function ke(e3) {
|
|
51
51
|
if (!le) return;
|
|
52
52
|
const t2 = function(e4) {
|
|
53
53
|
let t3 = e4.replace(/<img data-uuid="(.*?)"/g, (e5, t4) => {
|
|
54
|
-
const n3 =
|
|
54
|
+
const n3 = we(t4), l2 = W.pageContext.backendUrl;
|
|
55
55
|
return `<img src="${A(l2, W.pageContext.isTest)}/common/fs-upload/download?serverPath=${n3}&isShowWatermark=false" data-uuid="${n3}"`;
|
|
56
56
|
});
|
|
57
57
|
return t3 = t3.replace(/\t/g, " "), t3 = t3.replace(/ {2}/g, " "), t3;
|
|
@@ -60,7 +60,7 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
60
60
|
if (!le) return;
|
|
61
61
|
le.root.querySelectorAll("img").forEach((e4) => {
|
|
62
62
|
if (!e4.getAttribute("data-uuid")) {
|
|
63
|
-
const t3 =
|
|
63
|
+
const t3 = we(e4.src);
|
|
64
64
|
e4.setAttribute("data-uuid", t3);
|
|
65
65
|
}
|
|
66
66
|
});
|
|
@@ -81,7 +81,7 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
81
81
|
ie.value = e3.length;
|
|
82
82
|
}
|
|
83
83
|
function Ee() {
|
|
84
|
-
M.error({ message: "图片上传失败,请重试", duration: 3e3 });
|
|
84
|
+
console.warn("图片上传失败"), M.error({ message: "图片上传失败,请重试", duration: 3e3 });
|
|
85
85
|
}
|
|
86
86
|
function Ae(e3) {
|
|
87
87
|
"Escape" === e3.key && oe.value && (oe.value = false, o(() => {
|
|
@@ -140,11 +140,11 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
140
140
|
e3 && e3.addEventListener("mousedown", (e4) => {
|
|
141
141
|
e4.preventDefault();
|
|
142
142
|
});
|
|
143
|
-
}(),
|
|
143
|
+
}(), ke(te), (_a = ne.value) == null ? void 0 : _a.addEventListener("focusout", Le), le.on("text-change", async function(e3) {
|
|
144
144
|
if (!le) return;
|
|
145
145
|
const t2 = le.root.getElementsByTagName("img");
|
|
146
146
|
for (const e4 of t2) if (!e4.getAttribute("data-uuid")) {
|
|
147
|
-
const t3 =
|
|
147
|
+
const t3 = we(e4.src);
|
|
148
148
|
e4.setAttribute("data-uuid", t3);
|
|
149
149
|
}
|
|
150
150
|
if (e3.ops && e3.ops.length > 0) for (const t3 of e3.ops) {
|
|
@@ -159,7 +159,7 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
159
159
|
const l2 = le.root.getElementsByTagName("img");
|
|
160
160
|
for (const e6 of l2) e6.src === t4 && (e6.width = 300, e6.src = n2.url, e6.setAttribute("data-uuid", n2.uuid));
|
|
161
161
|
} catch (e5) {
|
|
162
|
-
Ee();
|
|
162
|
+
console.error("上传图片失败", e5), Ee();
|
|
163
163
|
} finally {
|
|
164
164
|
ae.value = false;
|
|
165
165
|
}
|
|
@@ -174,7 +174,7 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
174
174
|
}, 300);
|
|
175
175
|
}(), Se();
|
|
176
176
|
}), Se(), xe = le.container, xe.addEventListener("click", He), me(), o(() => {
|
|
177
|
-
const e3 =
|
|
177
|
+
const e3 = k(G, I);
|
|
178
178
|
q(e3, W.pageContext, W.configure, { formItemRef: he.value, componentRef: be.value, titleRef: ye.value, value: e3, entity: W.pageContext.entity.data, pageData: W.pageContext.entity.page });
|
|
179
179
|
}));
|
|
180
180
|
}), l(() => {
|
|
@@ -184,14 +184,14 @@ const N = { class: "toolbar-right-btns" }, R = ["title"], _ = { class: "richtext
|
|
|
184
184
|
}), z2({ addRequiredClass: function() {
|
|
185
185
|
P.value = L();
|
|
186
186
|
}, setContent: function(e3) {
|
|
187
|
-
|
|
187
|
+
ke(e3), Se();
|
|
188
188
|
}, getContent: function() {
|
|
189
189
|
return le ? le.root.innerHTML : "";
|
|
190
190
|
} }), (e3, t2) => {
|
|
191
|
-
const n2 = a("View"), l2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), y2 = a("el-form-item"), x2 = a("el-image-viewer"),
|
|
192
|
-
return u(), r(s, null, [c(y2, { required: X.value.required, class: m(v(Y) + (P.value ? " " + P.value : "")), "label-width": X.value.labelWidth, style: f(v(O)) }, { label: g(() => [X.value.tittleShow ? (u(), r("div", { key: 0, style: f({ ...v(J), ...v(Q) }) }, b(v(E)(X.value.title)), 5)) : p("", true)]), default: g(() => [h("div", { class: m(["richtext-wrapper", { "is-fullscreen": oe.value }]) }, [h("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), h("div", N, [h("button", { type: "button", class: "toolbar-btn", onClick: Te, title: "预览" }, [c(l2, null, { default: g(() => [c(n2)]), _: 1 })]), h("button", { type: "button", class: "toolbar-btn", onClick: qe, title: oe.value ? "退出全屏" : "全屏编辑" }, [oe.value ? (u(), d(l2, { key: 1 }, { default: g(() => [c(i2)]), _: 1 })) : (u(), d(l2, { key: 0 }, { default: g(() => [c(o2)]), _: 1 }))], 8, R)]), h("div", _, [h("span", j, "字数:" + b(ie.value), 1)]), ae.value ? (u(), r("div", V, t2[2] || (t2[2] = [h("div", { class: "loading-spinner" }, null, -1), h("span", null, "图片上传中...", -1)]))) : p("", true)], 2)]), _: 1 }, 8, ["required", "class", "label-width", "style"]), ge.value ? (u(), d(x2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
|
|
191
|
+
const n2 = a("View"), l2 = a("el-icon"), o2 = a("FullScreen"), i2 = a("Close"), y2 = a("el-form-item"), x2 = a("el-image-viewer"), w2 = a("el-dialog");
|
|
192
|
+
return u(), r(s, null, [c(y2, { required: X.value.required, class: m(v(Y) + (P.value ? " " + P.value : "")), "label-width": X.value.labelWidth, style: f(v(O)) }, { label: g(() => [X.value.tittleShow ? (u(), r("div", { key: 0, style: f({ ...v(J), ...v(Q) }) }, b(v(E)(X.value.title)), 5)) : p("", true)]), default: g(() => [h("div", { class: m(["richtext-wrapper", { "is-fullscreen": oe.value }]) }, [h("div", { ref_key: "quillEditorRef", ref: ne, style: { width: "100%" } }, null, 512), h("div", N, [h("button", { type: "button", class: "toolbar-btn", onClick: Te, title: "预览" }, [c(l2, null, { default: g(() => [c(n2)]), _: 1 })]), h("button", { type: "button", class: "toolbar-btn", onClick: qe, title: oe.value ? "退出全屏" : "全屏编辑" }, [oe.value ? (u(), d(l2, { key: 1 }, { default: g(() => [c(i2)]), _: 1 })) : (u(), d(l2, { key: 0 }, { default: g(() => [c(o2)]), _: 1 }))], 8, R)]), h("div", _, [h("span", j, "字数:" + b(ie.value), 1)]), ae.value ? (u(), r("div", V, [...t2[2] || (t2[2] = [h("div", { class: "loading-spinner" }, null, -1), h("span", null, "图片上传中...", -1)])])) : p("", true)], 2)]), _: 1 }, 8, ["required", "class", "label-width", "style"]), ge.value ? (u(), d(x2, { key: 0, "hide-on-click-modal": "", onClose: t2[0] || (t2[0] = () => {
|
|
193
193
|
ge.value = false;
|
|
194
|
-
}), "url-list": ve.value }, null, 8, ["url-list"])) : p("", true), c(
|
|
194
|
+
}), "url-list": ve.value }, null, 8, ["url-list"])) : p("", true), c(w2, { modelValue: re.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => re.value = e4), title: "内容预览", width: "80%", "close-on-click-modal": true, "append-to-body": true, class: "richtext-preview-dialog" }, { default: g(() => [h("div", { class: "richtext-preview-content ql-editor", innerHTML: ue.value }, null, 8, $)]), _: 1 }, 8, ["modelValue"])], 64);
|
|
195
195
|
};
|
|
196
196
|
} });
|
|
197
197
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, computed as t, watch as o, onUnmounted as a, onMounted as
|
|
1
|
+
import { defineComponent as e, ref as l, computed as t, watch as o, onUnmounted as a, onMounted as n, nextTick as i, resolveComponent as r, createBlock as u, openBlock as s, normalizeStyle as p, normalizeClass as c, unref as f, withCtx as v, createVNode as g, createElementVNode as m, withKeys as d, withModifiers as y, createCommentVNode as h, createElementBlock as b, Fragment as x, renderList as C, toDisplayString as _, createTextVNode as w } from "vue";
|
|
2
2
|
import { setVariableValue as S, getOptionDatasFromPage as k, queryOptionDatasources as A, autoSetAfterSelect as T, getVariableValue as j } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields as R } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleFormEvent as P, handleAfterInitEvent as V } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import M from "../common/title-suffix-element.vue.js";
|
|
6
|
-
import { $t as
|
|
7
|
-
import { addRequiredClassUtil as
|
|
8
|
-
import { CopyDocument as
|
|
6
|
+
import { $t as q } from "../../../../utils/i18n-util.js";
|
|
7
|
+
import { addRequiredClassUtil as D } from "../../../../utils/common-util.js";
|
|
8
|
+
import { CopyDocument as I } from "@element-plus/icons-vue";
|
|
9
9
|
import z from "clipboard";
|
|
10
10
|
import { ElMessage as E } from "element-plus";
|
|
11
11
|
import { useI18n as O } from "vue-i18n";
|
|
@@ -13,7 +13,7 @@ const W = { style: { "padding-left": "5px" } }, B = { style: { width: "100%", di
|
|
|
13
13
|
const { t: H } = O(), J = e2, N = l(null), Q = l(false), X = J.pageContext.entity ? J.pageContext.entity : {};
|
|
14
14
|
let Y = R(J.pageContext, J.configure);
|
|
15
15
|
const Z = J.configure.runtime ? J.configure.runtime : {}, ee = Z.style, le = Z.class, te = Z.headerStyle, oe = Z.titleExceedStyle, ae = l(Z.props ? Z.props : {});
|
|
16
|
-
let
|
|
16
|
+
let ne = l(ae.value.optionDescriptionPosition && "default" !== ae.value.optionDescriptionPosition), ie = [];
|
|
17
17
|
const re = "copyBtn_" + J.configure.uuid + "_" + (/* @__PURE__ */ new Date()).getTime();
|
|
18
18
|
function ue() {
|
|
19
19
|
let e3 = j(X, Y);
|
|
@@ -21,7 +21,7 @@ const W = { style: { "padding-left": "5px" } }, B = { style: { width: "100%", di
|
|
|
21
21
|
}
|
|
22
22
|
const se = t({ get: () => ue(), set(e3) {
|
|
23
23
|
const l2 = ue();
|
|
24
|
-
|
|
24
|
+
ie = Array.isArray(l2) ? [...l2] : l2;
|
|
25
25
|
let t2 = e3;
|
|
26
26
|
if (ae.value.multiple && false !== ae.value.showSelectAll && Array.isArray(e3) && e3.includes(U)) {
|
|
27
27
|
const e4 = (pe.value || []).map((e5) => String(e5.value)), o2 = Array.isArray(l2) ? l2.map((e5) => String(e5)) : [];
|
|
@@ -40,10 +40,10 @@ const W = { style: { "padding-left": "5px" } }, B = { style: { width: "100%", di
|
|
|
40
40
|
if ("remote" == ve.filterType) {
|
|
41
41
|
let e3;
|
|
42
42
|
ae.value.filterable = true, ae.value.remote = true, ae.value.remoteShowSuffix = true, ae.value.remoteMethod = function(l2) {
|
|
43
|
-
e3 !== l2 && (e3 = l2, fe.value = true, A(J.pageContext, de, l2).then((e4) => {
|
|
43
|
+
e3 !== l2 && (e3 = l2, fe.value = true, console.log("query", l2), A(J.pageContext, de, l2).then((e4) => {
|
|
44
44
|
fe.value = false;
|
|
45
45
|
}).then((e4) => {
|
|
46
|
-
fe.value = false;
|
|
46
|
+
console.log("查询失败!", e4), fe.value = false;
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -57,7 +57,7 @@ const W = { style: { "padding-left": "5px" } }, B = { 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 = pe.value, o2.oldValue =
|
|
60
|
+
o2.options = pe.value, o2.oldValue = ie, P(e3, J.pageContext, J.configure, "change", o2);
|
|
61
61
|
};
|
|
62
62
|
const ye = ae.value.monitorFields, he = [];
|
|
63
63
|
if (ye) {
|
|
@@ -80,7 +80,7 @@ const W = { style: { "padding-left": "5px" } }, B = { style: { width: "100%", di
|
|
|
80
80
|
return e4.join(",");
|
|
81
81
|
}();
|
|
82
82
|
e3 != be && (be = e3, de.watchAttrValue = e3, A(J.pageContext, de, void 0).then((e4) => {
|
|
83
|
-
fe.value = false;
|
|
83
|
+
console.log("查询失败!", e4), fe.value = false;
|
|
84
84
|
}));
|
|
85
85
|
}, 200);
|
|
86
86
|
}
|
|
@@ -111,14 +111,15 @@ const W = { style: { "padding-left": "5px" } }, B = { style: { width: "100%", di
|
|
|
111
111
|
E({ showClose: true, type: "success", message: H("superPageRuntimeMessage.copySuccess") });
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
return
|
|
114
|
+
return n(() => {
|
|
115
115
|
const e3 = new z("#" + re, { text: function() {
|
|
116
116
|
return Ae();
|
|
117
117
|
} });
|
|
118
118
|
e3.on("success", () => {
|
|
119
|
-
E({ showClose: true, type: "success", message: H("superPageRuntimeMessage.copySuccess") });
|
|
119
|
+
console.log("复制成功"), E({ showClose: true, type: "success", message: H("superPageRuntimeMessage.copySuccess") });
|
|
120
120
|
}), e3.on("error", (e4) => {
|
|
121
|
-
|
|
121
|
+
console.error("复制失败", e4);
|
|
122
|
+
}), i(() => {
|
|
122
123
|
const e4 = se.value;
|
|
123
124
|
V(e4, J.pageContext, J.configure, { formItemRef: we.value, componentRef: Se.value, titleRef: ke.value, value: e4, entity: J.pageContext.entity.data, pageData: J.pageContext.entity.page });
|
|
124
125
|
});
|
|
@@ -141,13 +142,13 @@ const W = { style: { "padding-left": "5px" } }, B = { style: { width: "100%", di
|
|
|
141
142
|
}
|
|
142
143
|
_e = true;
|
|
143
144
|
}, addRequiredClass: function() {
|
|
144
|
-
N.value =
|
|
145
|
+
N.value = D();
|
|
145
146
|
}, getSelectItemsTitle: Ae, getOptions: function() {
|
|
146
147
|
return pe.value;
|
|
147
|
-
} }), (
|
|
148
|
-
const
|
|
149
|
-
return s(), u(
|
|
150
|
-
}, ["stop"]), ["space"])), onChange: ae.value.changeMethod, onClear: ae.value.changeMethod, onVisibleChange: Te, modelValue: se.value, "onUpdate:modelValue":
|
|
148
|
+
} }), (l2, t2) => {
|
|
149
|
+
const o2 = r("el-icon"), a2 = r("el-option"), n2 = r("el-select"), i2 = r("el-popover"), S2 = r("el-form-item");
|
|
150
|
+
return s(), u(S2, { ref_key: "formItemRef", ref: we, required: !!ae.value.required, class: c(f(le) + (N.value ? " " + N.value : "")), "label-width": ae.value.labelWidth, style: p(f(ee)) }, { label: v(() => [ae.value.tittleShow ? (s(), b("div", { key: 0, ref_key: "titleRef", ref: ke, style: p({ ...f(te), ...f(oe) }) }, [ae.value.prefixType ? (s(), u(M, { key: 0, pageContext: e2.pageContext, property: ae.value }, null, 8, ["pageContext", "property"])) : (s(), b(x, { key: 1 }, [w(_(f(q)(ae.value.title)), 1)], 64))], 4)) : h("", true)]), default: v(() => [g(i2, { placement: "right", trigger: "hover", width: 50, "popper-class": "custom-sel-copy-tooltip", "popper-options": { modifiers: [{ name: "flip", options: { fallbackPlacements: ["left", "top", "bottom"] } }] } }, { reference: v(() => [m("div", B, [g(n2, { ref_key: "componentRef", ref: Se, style: { flex: "1", "min-width": "0" }, disabled: "disabled" === ae.value.state, size: ae.value.size, clearable: ae.value.clearable, multiple: ae.value.multiple, "collapse-tags": ae.value.collapseTags, "collapse-tags-tooltip": ae.value.collapseTagsTooltip, filterable: ae.value.filterable, "allow-create": ae.value.allowCreate, placeholder: ae.value.placeholder, "remote-show-suffix": ae.value.remoteShowSuffix, remote: ae.value.remote, "remote-method": ae.value.remoteMethod, loading: fe.value, onKeydown: t2[0] || (t2[0] = d(y(() => {
|
|
151
|
+
}, ["stop"]), ["space"])), onChange: ae.value.changeMethod, onClear: ae.value.changeMethod, onVisibleChange: Te, modelValue: se.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e3) => se.value = e3) }, { prefix: v(() => [m("span", { class: "mobile-copy-trigger", onClick: y(je, ["stop"]) }, [g(o2, { style: { cursor: "copy" } }, { default: v(() => [g(f(I))]), _: 1 })])]), default: v(() => [ae.value.multiple && false !== ae.value.showSelectAll ? (s(), u(a2, { key: 0, label: f(H)("superGrid.selectAll"), value: U, disabled: !(pe.value && pe.value.length > 0) }, null, 8, ["label", "disabled"])) : h("", true), (s(true), b(x, null, C(pe.value, (l3) => (s(), u(a2, { key: l3.value, label: l3.label, value: l3.value, class: c({ "option-description-newLine": f(ne) }), onClick: (t3) => f(P)(l3.value, e2.pageContext, e2.configure, "click", { values: se.value }) }, { default: v(() => [l3._description_ ? (s(), b(x, { key: 0 }, [f(ne) ? (s(), b("div", F, [m("span", null, _(l3.label), 1), m("span", G, _(l3._description_), 1)])) : (s(), b(x, { key: 1 }, [m("span", K, _(l3.label), 1), m("span", L, _(l3._description_), 1)], 64))], 64)) : h("", 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: v(() => [m("span", W, [g(o2, { id: re, style: { cursor: "copy" } }, { default: v(() => [g(f(I))]), _: 1 })])]), _: 1 })]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
151
152
|
};
|
|
152
153
|
} });
|
|
153
154
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js
CHANGED
|
@@ -9,7 +9,7 @@ const d = e({ __name: "separatelabel-runtime", props: { pageContext: {}, configu
|
|
|
9
9
|
const e3 = y(v.configure.props.base.title);
|
|
10
10
|
b(e3, v.pageContext, v.configure, { componentRef: x.value, value: e3, entity: v.pageContext.entity.data, pageData: v.pageContext.entity.page });
|
|
11
11
|
});
|
|
12
|
-
}), d2({}), (
|
|
12
|
+
}), d2({}), (t2, i2) => (r(), n("div", { style: p(l(T)), class: a([l(V), "amb-widget-separatelabel"]), ref_key: "thisRef", ref: x }, [s("div", { class: "label", style: p(l(h)) }, [e2.configure.props.iconType && e2.configure.props.iconValue ? (r(), u(l(m), { key: 0, iconType: e2.configure.props.iconType, iconValue: e2.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : c("", true), g(" " + f(l(y)(e2.configure.props.base.title)), 1)], 4)], 6));
|
|
13
13
|
} });
|
|
14
14
|
export {
|
|
15
15
|
d as default
|
|
@@ -26,9 +26,9 @@ const w = e({ __name: "switch-runtime", props: { pageContext: {}, configure: {}
|
|
|
26
26
|
});
|
|
27
27
|
}), w2({ addRequiredClass: function() {
|
|
28
28
|
_.value = b();
|
|
29
|
-
} }), (
|
|
30
|
-
const
|
|
31
|
-
return v(), n(
|
|
29
|
+
} }), (t2, l2) => {
|
|
30
|
+
const a2 = i("el-switch"), u2 = i("el-form-item");
|
|
31
|
+
return v(), n(u2, { ref_key: "formItemRef", ref: A, required: W.value.required, class: r(c(z) + (_.value ? " " + _.value : "")), "label-width": W.value.labelWidth, style: o(c(S)) }, { label: s(() => [W.value.tittleShow ? (v(), p("div", { key: 0, ref_key: "titleRef", ref: F, style: o({ ...c(I), ...c(T) }) }, d(c(C)(W.value.title)), 5)) : m("", true)]), default: s(() => [f(a2, { ref_key: "componentRef", ref: B, disabled: "disabled" === W.value.state, "active-value": W.value.activeValue, "active-text": W.value.activeText, "inactive-value": W.value.inactiveValue, "inactive-text": W.value.inactiveText, width: W.value.offOnWidth, size: W.value.size, style: o(c(O)), modelValue: U.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => U.value = e3), onChange: l2[1] || (l2[1] = (t3) => c(h)(t3, e2.pageContext, e2.configure, "change")) }, null, 8, ["disabled", "active-value", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
32
32
|
};
|
|
33
33
|
} });
|
|
34
34
|
export {
|