super-page-runtime 2.3.37-sit3 → 2.3.37-sit4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/api/page-expose-util.js +131 -131
- package/dist/es/components/runtime/utils/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +47 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +3 -1
- package/dist/es/components/runtime/utils/charts/chart-util.js +46 -44
- package/dist/es/components/runtime/utils/events/event-util.js +121 -121
- package/dist/es/components/runtime/utils/events/print-label.js +35 -33
- package/dist/es/components/runtime/utils/events/standard-event.js +600 -588
- package/dist/es/components/runtime/utils/events/validator-util.js +154 -150
- package/dist/es/components/runtime/utils/form/scan-util.js +4 -3
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +125 -120
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +14 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +13 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +15 -14
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -15
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +100 -95
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +67 -67
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +27 -23
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +11 -9
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +22 -20
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +123 -120
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +39 -38
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +26 -26
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +36 -35
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +55 -54
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +8 -6
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +1 -0
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +41 -41
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +28 -27
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +25 -23
- package/dist/es/components/runtime/views/home-chart.vue.js +9 -9
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +5 -4
- package/dist/es/components/runtime/views/super-page.vue2.js +191 -190
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as c, createSlots as p, withCtx as f, createVNode as g, createElementBlock as v, Fragment as d, renderList as m, createElementVNode as h, toDisplayString as y } from "vue";
|
|
2
2
|
import { setVariableValue as b, getVariableValue as x, getOptionDatasFromPage as C, monitorFieldChange as k, autoSetAfterSelect as S, queryOptionDatasources 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 _, handleAfterInitEvent as I } from "../../../../utils/events/event-util.js";
|
|
@@ -28,6 +28,7 @@ const w = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {
|
|
|
28
28
|
const N = W.value.monitorFields;
|
|
29
29
|
k(z.pageContext, N, function() {
|
|
30
30
|
j(z.pageContext, L, void 0).then((e3) => {
|
|
31
|
+
console.log("动态查询结果", e3);
|
|
31
32
|
});
|
|
32
33
|
});
|
|
33
34
|
const Q = t(null), X = t(null), Y = t(null);
|
|
@@ -56,7 +57,7 @@ const w = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {
|
|
|
56
57
|
}
|
|
57
58
|
} }), (e3, t2) => {
|
|
58
59
|
const l2 = a("el-checkbox"), o2 = a("el-checkbox-group"), n2 = a("el-form-item");
|
|
59
|
-
return i(), u(n2, { ref_key: "formItemRef", ref: Q, class: s(
|
|
60
|
+
return i(), u(n2, { ref_key: "formItemRef", ref: Q, class: s(c(T) + (D.value ? " " + D.value : "")), required: !!W.value.required, "label-width": W.value.labelWidth, style: r(c(P)) }, p({ default: f(() => [g(o2, { ref_key: "componentRef", ref: X, disabled: "disabled" === W.value.state, size: W.value.size, onChange: W.value.changeMethod, modelValue: A.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => A.value = e4) }, { default: f(() => [(i(true), v(d, null, m(B.value, (t3) => (i(), u(l2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => c(_)(t3.value, e3.pageContext, e3.configure, "click", { values: A.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: f(() => [h("div", { ref_key: "titleRef", ref: Y, style: r({ ...c(F), ...c(U) }), class: "amb-form-item-label" }, y(c(q)(W.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "required", "label-width", "style"]);
|
|
60
61
|
};
|
|
61
62
|
} });
|
|
62
63
|
export {
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as m, unref as d, createSlots as f, withCtx as g, resolveDynamicComponent 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
|
-
import { handleAfterInitEvent as
|
|
5
|
-
import { updateFormItemEditState as
|
|
4
|
+
import { handleAfterInitEvent as D, handleEvent as V } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { updateFormItemEditState as _ } from "../../../../utils/events/validator-util.js";
|
|
6
6
|
import { getListCode as w } from "../../../../utils/common-util.js";
|
|
7
7
|
import { getComponentRef as E } from "../../../../utils/global-refs.js";
|
|
8
8
|
import { getAdditionalParamMap as F } from "../../../../utils/events/standard-event.js";
|
|
9
9
|
import { $t as S } from "../../../../utils/i18n-util.js";
|
|
10
10
|
import U from "../../../../utils/eventBus.js";
|
|
11
11
|
import { functions as q } from "../../../../utils/api/page-expose-util.js";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
b(
|
|
15
|
-
} }), A =
|
|
12
|
+
const P = { key: 0, style: { width: "100%", height: "100%" } }, $ = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, O = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: O2 }) {
|
|
13
|
+
const z = e2, G = z.pageContext.entity ? z.pageContext.entity : {}, H = y(z.pageContext, z.configure), I = t({ get: () => h(G, H), set(e3) {
|
|
14
|
+
b(G, H, e3);
|
|
15
|
+
} }), A = z.configure.runtime ? z.configure.runtime : {}, B = A.style, N = A.class, W = A.headerStyle, J = o(A.props ? A.props : {}), K = function(e3) {
|
|
16
16
|
let t2 = {};
|
|
17
17
|
if (e3) for (let o2 in e3) {
|
|
18
|
-
const
|
|
19
|
-
t2[o2] = j(
|
|
18
|
+
const n2 = e3[o2];
|
|
19
|
+
t2[o2] = j(z.pageContext, n2);
|
|
20
20
|
}
|
|
21
21
|
return t2;
|
|
22
|
-
}(A.customParams ? A.customParams : {}),
|
|
22
|
+
}(A.customParams ? A.customParams : {}), L = F(z.pageContext), M = o(z.configure.props && z.configure.props.base ? z.configure.props.base.name : null);
|
|
23
23
|
function Q(e3, t2) {
|
|
24
|
-
k(
|
|
24
|
+
k(G, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function T(e3) {
|
|
27
|
-
q.isHasFieldAuthPermission(
|
|
27
|
+
q.isHasFieldAuthPermission(z.configure) ? _(z.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", H ? H.join(".") : "");
|
|
28
28
|
}
|
|
29
29
|
function X() {
|
|
30
|
-
const e3 =
|
|
30
|
+
const e3 = z.pageContext.tableUuids;
|
|
31
31
|
e3 && e3.forEach((e4) => {
|
|
32
|
-
const t2 = w(
|
|
32
|
+
const t2 = w(z.pageContext.code, z.pageContext.version, z.configure.uuid), o2 = E(z.pageContext, e4);
|
|
33
33
|
o2 && o2.restoreGridEdit(t2);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
const Y =
|
|
38
|
-
function
|
|
39
|
-
|
|
36
|
+
console.log("自定义控件----componentName=", M, "designProperty=", J), z.configure.props.verification.custom && z.configure.props.verification.custom.enabled && (z.pageContext.customValidatorUuids || (z.pageContext.customValidatorUuids = []), z.pageContext.customValidatorUuids.push(z.configure.uuid));
|
|
37
|
+
const Y = z.pageContext.code, Z = o(H && H.length > 0 ? Y + "__" + H.join("__") : null), ee = o(null), te = o(null), oe = o(null);
|
|
38
|
+
function ne(e3) {
|
|
39
|
+
V(I.value, z.pageContext, z.configure, e3);
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return n(() => {
|
|
42
42
|
U.$on(Z.value + "-scanDone", (e3) => {
|
|
43
43
|
const t2 = e3.result;
|
|
44
|
-
b(
|
|
44
|
+
b(G, H, t2);
|
|
45
45
|
}), U.$on(Z.value + "-pickFileDone", (e3) => {
|
|
46
|
-
ee.value.pickFileDone(e3);
|
|
47
|
-
}),
|
|
46
|
+
console.log("superPage4444---pickFileDone--componentId.value=", Z.value, "data=", e3), ee.value.pickFileDone(e3);
|
|
47
|
+
}), a(() => {
|
|
48
48
|
const e3 = I.value;
|
|
49
|
-
|
|
49
|
+
D(e3, z.pageContext, z.configure, { formItemRef: te.value, componentRef: ee.value, titleRef: oe.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
|
|
50
50
|
});
|
|
51
51
|
}), i(() => {
|
|
52
52
|
U.$off(Z.value + "-scanDone"), U.$off(Z.value + "-pickFileDone");
|
|
53
|
-
}),
|
|
53
|
+
}), O2({ getCustomRef: function() {
|
|
54
54
|
return ee.value;
|
|
55
55
|
}, invokeCustomFunction: function(e3, ...t2) {
|
|
56
56
|
if (ee.value && "function" == typeof ee.value[e3]) return ee.value[e3](...t2);
|
|
@@ -61,9 +61,9 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
|
|
|
61
61
|
requiredClass.value = addRequiredClassUtil();
|
|
62
62
|
} }), (e3, t2) => {
|
|
63
63
|
const o2 = u("el-form-item");
|
|
64
|
-
return
|
|
64
|
+
return J.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: te, required: J.value.required, class: m(d(N)), "label-width": J.value.labelWidth, style: c(d(B)) }, f({ default: g(() => [M.value ? (p(), r("div", P, [(p(), l(v(M.value), { ref_key: "customRef", ref: ee, size: J.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: d(R)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": d(K), modelValue: I.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => I.value = e4), disabled: "disabled" === J.value.state, "additional-param-map": d(L), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ne, onChange: t2[1] || (t2[1] = (t3) => d(V)(I.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 2 }, [J.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: oe, style: c({ ...d(W) }), class: "amb-form-item-label" }, x(d(S)(J.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : M.value ? (p(), r("div", $, [(p(), l(v(M.value), { ref_key: "customRef", ref: ee, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: d(R)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": d(K), modelValue: I.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => I.value = e4), disabled: "disabled" === J.value.state, "additional-param-map": d(L), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ne, onChange: t2[3] || (t2[3] = (t3) => d(V)(I.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
O as default
|
|
69
69
|
};
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as c, unref as p, createSlots as d, 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
|
-
import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as
|
|
4
|
+
import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as F, getVariableValue as k, isDateDataType as T } from "../../../../utils/page-helper-util.js";
|
|
5
5
|
import { handleAfterInitEvent as V, getCustomFunc as P, handleFormEvent as j } from "../../../../utils/events/event-util.js";
|
|
6
6
|
import z from "../common/title-suffix-element.vue.js";
|
|
7
7
|
import R from "dayjs";
|
|
@@ -10,30 +10,30 @@ import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
|
|
|
10
10
|
import { DatePickerRange as D } from "agilebuilder-ui";
|
|
11
11
|
const S = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: S2 }) {
|
|
12
12
|
var _a;
|
|
13
|
-
const w = e2, q = a(null), A = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {},
|
|
14
|
-
let
|
|
15
|
-
if (w.pageContext.modelFieldsMap &&
|
|
16
|
-
const e3 = x(
|
|
13
|
+
const w = e2, q = a(null), A = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {}, $ = M.style, B = M.class, I = M.headerStyle, U = M.titleExceedStyle, N = a(M.props ? M.props : {});
|
|
14
|
+
let W = y(w.pageContext, w.configure, N.value.prop);
|
|
15
|
+
if (w.pageContext.modelFieldsMap && W && W.length > 0 && "data" === W[0]) {
|
|
16
|
+
const e3 = x(W, w.pageContext);
|
|
17
17
|
e3 && function(e4) {
|
|
18
18
|
const a2 = e4.dataType;
|
|
19
|
-
T(a2) && ("year" ===
|
|
19
|
+
T(a2) && ("year" === N.value.dateType && "YYYY" === N.value.valueFormat || "month" === N.value.dateType && "YYYY-MM" === N.value.valueFormat) && (N.value.valueFormat = "x");
|
|
20
20
|
}(e3);
|
|
21
21
|
}
|
|
22
22
|
let E = null, O = false;
|
|
23
|
-
if (
|
|
23
|
+
if (N.value.dateType && N.value.dateType.includes("range")) {
|
|
24
24
|
O = true;
|
|
25
|
-
let e3 =
|
|
25
|
+
let e3 = N.value.prop2;
|
|
26
26
|
e3 && e3.startsWith("${") || (e3 = "${page." + w.configure.uuid + "-2}");
|
|
27
27
|
const a2 = b(A, e3, null);
|
|
28
|
-
if (e3 = e3.substring(2, e3.length - 1), E = e3.split("."), !(a2 || A.data && (A.data.id || A.data.ID)) &&
|
|
29
|
-
const e4 = b(A,
|
|
30
|
-
if (null != e4 && "" !== e4)
|
|
31
|
-
else if (((_a =
|
|
32
|
-
const e5 =
|
|
28
|
+
if (e3 = e3.substring(2, e3.length - 1), E = e3.split("."), !(a2 || A.data && (A.data.id || A.data.ID)) && N.value.defaultValue2) {
|
|
29
|
+
const e4 = b(A, N.value.defaultValue2);
|
|
30
|
+
if (null != e4 && "" !== e4) F(A, E, e4);
|
|
31
|
+
else if (((_a = N.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
|
|
32
|
+
const e5 = N.value.moreDefaultValue2;
|
|
33
33
|
for (let a3 = 0; a3 < e5.length; a3++) {
|
|
34
34
|
const l2 = b(A, e5[a3]);
|
|
35
35
|
if (null != l2 && "" !== l2) {
|
|
36
|
-
|
|
36
|
+
F(A, E, l2);
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -50,7 +50,7 @@ const S = 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), t2;
|
|
52
52
|
} catch (a3) {
|
|
53
|
-
return e3;
|
|
53
|
+
return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${N.value.valueFormat}`), e3;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return e3;
|
|
@@ -60,28 +60,28 @@ const S = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
60
60
|
const e3 = L.value;
|
|
61
61
|
V(e3, w.pageContext, w.configure, { formItemRef: G.value, componentRef: H.value, titleRef: J.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
|
|
62
62
|
});
|
|
63
|
-
}),
|
|
64
|
-
const e3 =
|
|
65
|
-
e3 !== a2 &&
|
|
63
|
+
}), W) {
|
|
64
|
+
const e3 = k(A, W), a2 = K(e3, N.value.valueFormat);
|
|
65
|
+
e3 !== a2 && F(A, W, a2);
|
|
66
66
|
}
|
|
67
67
|
if (E) {
|
|
68
|
-
const e3 =
|
|
69
|
-
e3 !== a2 &&
|
|
68
|
+
const e3 = k(A, E), a2 = K(e3, N.value.valueFormat);
|
|
69
|
+
e3 !== a2 && F(A, E, a2);
|
|
70
70
|
}
|
|
71
71
|
const L = o({ get() {
|
|
72
72
|
if (O) {
|
|
73
73
|
const e3 = [];
|
|
74
|
-
let a2 =
|
|
75
|
-
e3.push(K(a2,
|
|
76
|
-
let l2 =
|
|
77
|
-
return e3.push(K(l2,
|
|
74
|
+
let a2 = k(A, W);
|
|
75
|
+
e3.push(K(a2, N.value.valueFormat));
|
|
76
|
+
let l2 = k(A, E);
|
|
77
|
+
return e3.push(K(l2, N.value.valueFormat)), e3;
|
|
78
78
|
}
|
|
79
|
-
return K(
|
|
79
|
+
return K(k(A, W), N.value.valueFormat);
|
|
80
80
|
}, set(e3) {
|
|
81
|
-
O ? Array.isArray(e3) ? (
|
|
82
|
-
} }), Q = a(C(
|
|
83
|
-
if (
|
|
84
|
-
const e3 = P(w.pageContext,
|
|
81
|
+
O ? Array.isArray(e3) ? (F(A, W, e3[0]), F(A, E, e3[1]), q.value = "") : null === e3 && (F(A, W, null), F(A, E, null)) : (F(A, W, e3), null != e3 && (q.value = ""));
|
|
82
|
+
} }), Q = a(C(N.value.dateScopeDetails, N.value.sourceType, N.value.dateType));
|
|
83
|
+
if (N.value.shortcutsFunc) {
|
|
84
|
+
const e3 = P(w.pageContext, N.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 S = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
93
93
|
return S2({ addRequiredClass: function() {
|
|
94
94
|
q.value = _();
|
|
95
95
|
} }), (e3, a2) => {
|
|
96
|
-
const l2 =
|
|
97
|
-
return n(),
|
|
96
|
+
const l2 = r("el-time-picker"), t2 = r("el-date-picker"), o2 = r("el-form-item");
|
|
97
|
+
return n(), u(o2, { ref_key: "formItemRef", ref: G, required: N.value.required, class: c(p(B) + (q.value ? " " + q.value : "")), "label-width": N.value.labelWidth, style: i(p($)) }, d({ default: s(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: H, "is-range": "timerange" == N.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: N.value.clearable, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, "unlink-panels": true, format: N.value.format, "value-format": N.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => L.value = e4), shortcuts: Q.value, type: N.value.dateType, onChange: a2[1] || (a2[1] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== N.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(N.value.dateType) ? (n(), u(p(D), { key: 1, modelValue: L.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => L.value = e4), type: N.value.dateType, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, clearable: N.value.clearable, format: N.value.format, "value-format": N.value.valueFormat, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, size: N.value.size, shortcuts: Q.value, onChange: a2[8] || (a2[8] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : (n(), u(t2, { key: 2, ref_key: "componentRef", ref: H, clearable: N.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, format: N.value.format, "value-format": N.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": a2[14] || (a2[14] = (e4) => L.value = e4), shortcuts: Q.value, type: N.value.dateType, onChange: a2[15] || (a2[15] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[16] || (a2[16] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[17] || (a2[17] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[18] || (a2[18] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[19] || (a2[19] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[20] || (a2[20] = (a3) => p(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [N.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: J, style: i({ ...p(I), ...p(U) }) }, [N.value.prefixType ? (n(), u(z, { key: 0, pageContext: e3.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), f(g, { key: 1 }, [m(h(p(Y)(N.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-runtime.vue2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, watch as
|
|
1
|
+
import { defineComponent as e, ref as l, watch as o, onMounted as t, nextTick as a, onUnmounted as i, resolveComponent as n, createBlock as u, createCommentVNode as p, openBlock as r, normalizeStyle as s, normalizeClass as f, unref as d, createSlots as m, withCtx as c, createElementVNode as v, toDisplayString as g } from "vue";
|
|
2
2
|
import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
|
-
import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadUploaded as
|
|
4
|
-
import
|
|
3
|
+
import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadUploaded as x, fileUploadBeforeDelete as b, fileUploadDeleted as I } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import k from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
import { FsUploadNew as P } from "agilebuilder-ui";
|
|
6
6
|
import S from "../../../../utils/eventBus.js";
|
|
7
7
|
import { $t as N } from "../../../../utils/i18n-util.js";
|
|
@@ -9,28 +9,28 @@ import { addRequiredClassUtil as T } from "../../../../utils/common-util.js";
|
|
|
9
9
|
import { getRelativeBaseUrl as _ } from "agilebuilder-ui/src/utils/common-util";
|
|
10
10
|
const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12
|
-
const z = e2,
|
|
12
|
+
const z = e2, F = l(null), R = z.configure.runtime ? z.configure.runtime : {}, D = l(R.props ? R.props : {}), O = R.style, q = R.class, U = R.headerStyle, W = R.titleExceedStyle, $ = z.pageContext.entity ? z.pageContext.entity : {}, A = z.configure.props.base ? z.configure.props.base : {}, E = Y(A.prop), B = Y(A.propName);
|
|
13
13
|
let G = l({});
|
|
14
|
-
G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "",
|
|
15
|
-
X(h(
|
|
14
|
+
G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", E && E.length > 1 && o(() => z.pageContext.entity[E[0]][E[1]], (e3) => {
|
|
15
|
+
X(h($, E));
|
|
16
16
|
});
|
|
17
|
-
const H = z.pageContext.code, J = l(
|
|
17
|
+
const H = z.pageContext.code, J = l(E ? H + "__" + E.join("__") : null), K = h($, E), L = l(null), M = l(false), Q = l([]), V = l({});
|
|
18
18
|
function X(e3) {
|
|
19
19
|
if (e3) {
|
|
20
20
|
const l2 = e3.split(",");
|
|
21
21
|
if (l2.length > 0) {
|
|
22
22
|
const e4 = _(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
|
|
23
|
-
|
|
23
|
+
k.post(e4, l2).then((e5) => {
|
|
24
24
|
Q.value = [];
|
|
25
|
-
const
|
|
25
|
+
const o2 = [], t2 = {};
|
|
26
26
|
e5.forEach((e6) => {
|
|
27
|
-
|
|
27
|
+
t2[e6.uuid] = e6;
|
|
28
28
|
});
|
|
29
29
|
for (let e6 = 0; e6 < l2.length; e6++) {
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const a2 = l2[e6];
|
|
31
|
+
o2.push(t2[a2].fileName), Q.value.push({ showName: t2[a2].fileName, serverPath: a2, fileSize: t2[a2].fileSize });
|
|
32
32
|
}
|
|
33
|
-
"input" === D.value.displayType && (V.value.showName =
|
|
33
|
+
"input" === D.value.displayType && (V.value.showName = o2.join(","), V.value.serverPath = l2.join(","));
|
|
34
34
|
}).finally(() => {
|
|
35
35
|
M.value = true;
|
|
36
36
|
});
|
|
@@ -42,50 +42,51 @@ const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
42
42
|
}
|
|
43
43
|
function Z(e3) {
|
|
44
44
|
z.pageContext.fileuploadInfo || (z.pageContext.fileuploadInfo = []);
|
|
45
|
-
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: N(D.value.title) }), w(e3);
|
|
45
|
+
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: N(D.value.title) }), console.log("附件上传--beforeUpload----props.pageContext.fileuploadInfo", z.pageContext.fileuploadInfo), w(e3);
|
|
46
46
|
}
|
|
47
47
|
function ee() {
|
|
48
|
-
if (z.pageContext.fileuploadInfo && z.configure.uuid) {
|
|
48
|
+
if (console.log("附件上传--removeUplodInfo----props.pageContext.fileuploadInfo111=", z.pageContext.fileuploadInfo, z.configure.uuid), z.pageContext.fileuploadInfo && z.configure.uuid) {
|
|
49
49
|
const e3 = z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid);
|
|
50
50
|
-1 !== e3 && z.pageContext.fileuploadInfo.splice(e3, 1);
|
|
51
51
|
}
|
|
52
|
+
console.log("附件上传--removeUplodInfo----props.pageContext.fileuploadInfo222=", z.pageContext.fileuploadInfo);
|
|
52
53
|
}
|
|
53
54
|
function le(e3) {
|
|
54
55
|
ee();
|
|
55
56
|
}
|
|
56
57
|
X(K);
|
|
57
|
-
const
|
|
58
|
-
var o2;
|
|
59
|
-
ee(), ie(), o2 = { response: e3, uploadFile: l2, uploadFiles: t2 }, b(z.pageContext, z.configure, o2);
|
|
60
|
-
}, oe = (e3) => {
|
|
61
|
-
const l2 = (t2 = { file: e3 }, x(z.pageContext, z.configure, t2));
|
|
58
|
+
const oe = (e3, l2, o2) => {
|
|
62
59
|
var t2;
|
|
63
|
-
(
|
|
64
|
-
|
|
60
|
+
ee(), ae(), t2 = { response: e3, uploadFile: l2, uploadFiles: o2 }, x(z.pageContext, z.configure, t2);
|
|
61
|
+
}, te = (e3) => {
|
|
62
|
+
const l2 = (o2 = { file: e3 }, b(z.pageContext, z.configure, o2));
|
|
63
|
+
var o2;
|
|
64
|
+
(l2 || void 0 === l2) && (ae(), function(e4) {
|
|
65
|
+
I(z.pageContext, z.configure, e4);
|
|
65
66
|
}({ file: e3 }));
|
|
66
|
-
},
|
|
67
|
+
}, ae = () => {
|
|
67
68
|
const e3 = [], l2 = [];
|
|
68
69
|
if (D.value.limit && Q.value.length > D.value.limit) {
|
|
69
70
|
const e4 = Q.value.length - D.value.limit;
|
|
70
71
|
for (let l3 = 0; l3 < e4; l3++) Q.value.shift();
|
|
71
72
|
}
|
|
72
|
-
for (let
|
|
73
|
-
y(z.pageContext.entity,
|
|
74
|
-
},
|
|
75
|
-
return
|
|
73
|
+
for (let o2 = 0; o2 < Q.value.length; o2++) e3.push(Q.value[o2].showName), l2.push(Q.value[o2].serverPath);
|
|
74
|
+
y(z.pageContext.entity, E, l2.join(",")), y(z.pageContext.entity, B, e3.join(",")), l2.length > 0 && (F.value = "");
|
|
75
|
+
}, ie = l(null), ne = l(null);
|
|
76
|
+
return t(() => {
|
|
76
77
|
S.$on(J.value + "-pickFileDone", (e3) => {
|
|
77
|
-
L.value.pickFileDone(e3);
|
|
78
|
-
}),
|
|
79
|
-
const e3 = h(
|
|
80
|
-
C(l2, z.pageContext, z.configure, { formItemRef:
|
|
78
|
+
console.log("superPage4444---pickFileDone--componentId.value=", J.value, "data=", e3), L.value.pickFileDone(e3);
|
|
79
|
+
}), a(() => {
|
|
80
|
+
const e3 = h($, E), l2 = { showName: h($, B), serverPath: e3 };
|
|
81
|
+
C(l2, z.pageContext, z.configure, { formItemRef: ie.value, componentRef: L.value, titleRef: ne.value, value: l2, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
|
|
81
82
|
});
|
|
82
|
-
}),
|
|
83
|
+
}), i(() => {
|
|
83
84
|
S.$off(J.value + "-pickFileDone");
|
|
84
85
|
}), j2({ addRequiredClass: function() {
|
|
85
|
-
|
|
86
|
+
F.value = T();
|
|
86
87
|
} }), (e3, l2) => {
|
|
87
|
-
const
|
|
88
|
-
return D.value.tittleShow ? (
|
|
88
|
+
const o2 = n("el-form-item");
|
|
89
|
+
return D.value.tittleShow ? (r(), u(o2, { key: 0, ref_key: "formItemRef", ref: ie, required: D.value.required, class: f(d(q) + (F.value ? " " + F.value : "")), "label-width": D.value.labelWidth, style: s(d(O)) }, m({ default: c(() => [M.value ? (r(), u(d(P), { key: 0, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === D.value.state, displayType: D.value.displayType, accept: D.value.accept, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "disabled-no-preview": D.value.disabledNoPreview, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": V.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": oe, "on-remove": te, "before-upload": Z, "on-error": le, pageContext: e3.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : p("", true)]), _: 2 }, [D.value.tittleShow ? { name: "label", fn: c(() => [v("div", { ref_key: "titleRef", ref: ne, style: s({ ...d(U), ...d(W) }), class: "amb-form-item-label" }, g(d(N)(D.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : M.value ? (r(), u(d(P), { key: 1, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === D.value.state, displayType: D.value.displayType, accept: D.value.accept, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "disabled-no-preview": D.value.disabledNoPreview, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": V.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": oe, "on-remove": te, "before-upload": Z, "on-error": le, pageContext: e3.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : p("", true);
|
|
89
90
|
};
|
|
90
91
|
} });
|
|
91
92
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
2
|
-
import { SuperIcon as
|
|
3
|
-
import { getFormModelFields as
|
|
1
|
+
import { defineComponent as e, ref as n, computed as t, onMounted as l, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as s, normalizeStyle as c, normalizeClass as p, unref as v, createSlots as f, withCtx as g, createVNode as m, createCommentVNode as y, createTextVNode as d, toDisplayString as x, createElementVNode as C, createElementBlock as w, Fragment as k } from "vue";
|
|
2
|
+
import { SuperIcon as I } from "agilebuilder-ui";
|
|
3
|
+
import { getFormModelFields as T } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { getModelFieldFromPageContext as V, isNumberDataType as h, setVariableValue as b, getVariableValue as _ } from "../../../../utils/page-helper-util.js";
|
|
5
5
|
import { handleFormEvent as S, handleAfterInitEvent as j, doSuffixOrPrefixClickEvent as R } from "../../../../utils/events/event-util.js";
|
|
6
|
-
import { formatScanRuleSets as O, analysisScanValue as P, setScanAnalysisValue as
|
|
7
|
-
import
|
|
8
|
-
import { isMobileBrowser as
|
|
9
|
-
import
|
|
10
|
-
import { $t as
|
|
11
|
-
import { addRequiredClassUtil as
|
|
6
|
+
import { formatScanRuleSets as O, analysisScanValue as P, setScanAnalysisValue as D } from "../../../../utils/form/scan-util.js";
|
|
7
|
+
import N from "../common/title-suffix-element.vue.js";
|
|
8
|
+
import { isMobileBrowser as q } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import J from "../../../../utils/eventBus.js";
|
|
10
|
+
import { $t as M } from "../../../../utils/i18n-util.js";
|
|
11
|
+
import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
|
|
12
12
|
const L = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: L2 }) {
|
|
13
13
|
var _a, _b, _c;
|
|
14
|
-
const
|
|
15
|
-
let
|
|
16
|
-
if (
|
|
17
|
-
const e3 = V(A
|
|
18
|
-
e3 && (
|
|
14
|
+
const A = e2, B = A.pageContext.entity ? A.pageContext.entity : {}, F = n("text");
|
|
15
|
+
let $ = T(A.pageContext, A.configure);
|
|
16
|
+
if (A.pageContext.modelFieldsMap) {
|
|
17
|
+
const e3 = V($, A.pageContext);
|
|
18
|
+
e3 && (F.value = h(e3.dataType) ? "number" : "text");
|
|
19
19
|
}
|
|
20
|
-
const E =
|
|
21
|
-
b(
|
|
22
|
-
} }), K =
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
const E = n(q()), H = A.pageContext.code, U = n($ && $.length > 0 ? H + "__" + $.join("__") : null), W = n(null), G = t({ get: () => _(B, $), set(e3) {
|
|
21
|
+
b(B, $, e3), null != e3 && "" !== e3 && (W.value = "");
|
|
22
|
+
} }), K = n(null), Q = n(null), X = n(null), Y = A.configure.runtime ? A.configure.runtime : {}, Z = n(Y.props ? Y.props : {}), ee = n(!!((_a = Z.value.scan) == null ? void 0 : _a.enable));
|
|
23
|
+
let ne = false;
|
|
24
|
+
const te = window.localStorage.getItem("auth_source");
|
|
25
|
+
te && "dingtalk" === te && (ne = true);
|
|
26
|
+
let le = "";
|
|
27
|
+
const oe = navigator.userAgent;
|
|
28
|
+
le = oe.indexOf("Html5Plus") > 0 ? "app" : "browser";
|
|
29
|
+
const ae = !(!E.value || !le || "app" !== le), ue = n(!!((ae || ne) && ee.value || E.value && ee.value && "https:" === window.location.protocol));
|
|
30
|
+
let ie = {};
|
|
30
31
|
((_b = Z.value.scan) == null ? void 0 : _b.enable) && ((_c = Z.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (O(Z.value.scan.ruleList).then((e3) => {
|
|
31
|
-
|
|
32
|
+
ie = e3;
|
|
32
33
|
}), u(() => G.value, (e3) => {
|
|
33
34
|
e3 = e3.trim();
|
|
34
|
-
const
|
|
35
|
-
|
|
35
|
+
const n2 = P(e3, ie);
|
|
36
|
+
n2 && D(A.pageContext, n2.scanSet, n2.params);
|
|
36
37
|
}));
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
return b(
|
|
38
|
+
const re = Y.style, se = Y.class, ce = Y.headerStyle, pe = Y.titleExceedStyle;
|
|
39
|
+
function ve(e3) {
|
|
40
|
+
return b(B, $, e3);
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
l(() => {
|
|
43
|
+
J.$on(U.value + "-scanDone", (e3) => {
|
|
44
|
+
console.log("superPage4444---scanDone--componentId.value=", U.value, "data=", JSON.stringify(e3)), ve(e3.result), S(e3.result, A.pageContext, A.configure, "afterScanDone");
|
|
44
45
|
}), o(() => {
|
|
45
46
|
var _a2;
|
|
46
47
|
const e3 = G.value;
|
|
47
|
-
j(e3,
|
|
48
|
-
});
|
|
48
|
+
j(e3, A.pageContext, A.configure, { formItemRef: K.value, componentRef: Q.value, titleRef: X.value, value: e3, entity: A.pageContext.entity.data, pageData: A.pageContext.entity.page }), ue.value && ((_a2 = Z.value.scan) == null ? void 0 : _a2.autoOpen) && ge();
|
|
49
|
+
}), console.log("input-text");
|
|
49
50
|
}), a(() => {
|
|
50
|
-
|
|
51
|
+
J.$off(U.value + "-scanDone");
|
|
51
52
|
});
|
|
52
|
-
const
|
|
53
|
-
function
|
|
54
|
-
if (
|
|
55
|
-
const e3 = { type: "scan", componentId: U.value, systemCode:
|
|
56
|
-
|
|
57
|
-
} else if (E.value) if ("https:" === window.location.protocol)
|
|
53
|
+
const fe = n(false);
|
|
54
|
+
function ge() {
|
|
55
|
+
if (console.log("scanClick----userAgent=", le), ae || ne) {
|
|
56
|
+
const e3 = { type: "scan", componentId: U.value, systemCode: A.pageContext.systemCode };
|
|
57
|
+
ne && (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 (E.value) if ("https:" === window.location.protocol) fe.value = true;
|
|
58
59
|
else {
|
|
59
|
-
const e3 = { type: "scan", componentId: U.value, systemCode:
|
|
60
|
+
const e3 = { type: "scan", componentId: U.value, systemCode: A.pageContext.systemCode };
|
|
60
61
|
window.parent.postMessage(JSON.stringify(e3), "*");
|
|
61
62
|
}
|
|
62
|
-
else
|
|
63
|
+
else fe.value = true;
|
|
63
64
|
}
|
|
64
65
|
function me(e3) {
|
|
65
|
-
|
|
66
|
+
fe.value = false, ve(e3);
|
|
66
67
|
}
|
|
67
68
|
return L2({ getValue: function() {
|
|
68
|
-
return _(
|
|
69
|
-
}, setValue:
|
|
70
|
-
W.value =
|
|
71
|
-
} }), (e3,
|
|
72
|
-
const
|
|
73
|
-
return s(), r(o2, { ref_key: "formItemRef", ref: K, required: !!Z.value.required, class:
|
|
74
|
-
let
|
|
75
|
-
null !=
|
|
76
|
-
}(e4)), onFocus:
|
|
69
|
+
return _(B, $);
|
|
70
|
+
}, setValue: ve, scanClick: ge, addRequiredClass: function() {
|
|
71
|
+
W.value = z();
|
|
72
|
+
} }), (e3, n2) => {
|
|
73
|
+
const t2 = i("el-input"), l2 = i("scan-code-input-browser"), o2 = i("el-form-item");
|
|
74
|
+
return s(), r(o2, { ref_key: "formItemRef", ref: K, required: !!Z.value.required, class: p(v(se) + (W.value ? " " + W.value : "")), "label-width": Z.value.labelWidth, style: c(v(re)) }, f({ default: g(() => [m(t2, { ref_key: "componentRef", ref: Q, disabled: "disabled" === Z.value.state, readonly: "readonly" === Z.value.state, size: Z.value.size, clearable: Z.value.clearable, placeholder: Z.value.placeholder, maxlength: Z.value.maxLength, "show-word-limit": Z.value.showInputNum, type: F.value, modelValue: G.value, "onUpdate:modelValue": n2[5] || (n2[5] = (e4) => G.value = e4), onInput: n2[6] || (n2[6] = (n3) => v(S)(n3, e3.pageContext, e3.configure, "input")), onChange: n2[7] || (n2[7] = (n3) => v(S)(n3, e3.pageContext, e3.configure, "change")), onBlur: n2[8] || (n2[8] = (e4) => function(e5) {
|
|
75
|
+
let n3 = _(B, $);
|
|
76
|
+
null != n3 && (n3 = n3.trim()), b(B, $, n3), S(e5, A.pageContext, A.configure, "blur");
|
|
77
|
+
}(e4)), onFocus: n2[9] || (n2[9] = (n3) => v(S)(n3, e3.pageContext, e3.configure, "focus")), onClick: n2[10] || (n2[10] = (n3) => v(S)(n3, e3.pageContext, e3.configure, "click")), onClear: n2[11] || (n2[11] = (n3) => v(S)(n3, e3.pageContext, e3.configure, "clear")) }, f({ _: 2 }, ["outer" != Z.value.iconPosition && (Z.value.preIconType && Z.value.preIconValue || Z.value.preText) ? { name: "prefix", fn: g(() => [Z.value.preIconType && Z.value.preIconValue ? (s(), r(v(I), { key: 0, style: { cursor: "pointer" }, iconType: Z.value.preIconType, iconValue: Z.value.preIconValue, onClick: n2[0] || (n2[0] = (n3) => v(R)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Z.value.preText)), 1)]), key: "0" } : void 0, "outer" == Z.value.iconPosition && (Z.value.preIconType && Z.value.preIconValue || Z.value.preText) ? { name: "prepend", fn: g(() => [Z.value.preIconType && Z.value.preIconValue ? (s(), r(v(I), { key: 0, style: { cursor: "pointer" }, iconType: Z.value.preIconType, iconValue: Z.value.preIconValue, onClick: n2[1] || (n2[1] = (n3) => v(R)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Z.value.preText)), 1)]), key: "1" } : void 0, "outer" != Z.value.iconPosition && (Z.value.sufIconType && Z.value.sufIconValue || Z.value.sufText) ? { name: "suffix", fn: g(() => [Z.value.sufIconType && Z.value.sufIconValue ? (s(), r(v(I), { key: 0, style: { cursor: "pointer" }, iconType: Z.value.sufIconType, iconValue: Z.value.sufIconValue, onClick: n2[2] || (n2[2] = (n3) => v(R)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Z.value.sufText)), 1)]), key: "2" } : void 0, ue.value || "outer" == Z.value.iconPosition && (Z.value.sufIconType && Z.value.sufIconValue || Z.value.sufText) ? { name: "append", fn: g(() => [ue.value ? (s(), r(v(I), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: n2[3] || (n2[3] = (e4) => ge()) })) : y("", true), Z.value.sufIconType && Z.value.sufIconValue ? (s(), r(v(I), { key: 1, style: { cursor: "pointer" }, iconType: Z.value.sufIconType, iconValue: Z.value.sufIconValue, onClick: n2[4] || (n2[4] = (n3) => v(R)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Z.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), fe.value ? (s(), r(l2, { key: 0, onClose: me })) : y("", true)]), _: 2 }, [Z.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: X, class: "amb-form-item-label", style: c({ ...v(ce), ...v(pe) }) }, [Z.value.prefixType ? (s(), r(N, { key: 0, pageContext: e3.pageContext, property: Z.value }, null, 8, ["pageContext", "property"])) : (s(), w(k, { key: 1 }, [d(x(v(M)(Z.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
77
78
|
};
|
|
78
79
|
} });
|
|
79
80
|
export {
|