super-page-runtime 2.3.9-sit1 → 2.3.10

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.
Files changed (28) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +50 -50
  2. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +57 -57
  3. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  4. package/dist/es/components/runtime/utils/events/print-label.js +26 -25
  5. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  6. package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
  7. package/dist/es/components/runtime/utils/page-init-util.js +25 -24
  8. package/dist/es/components/runtime/utils/page-store.js +10 -10
  9. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  10. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  11. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
  12. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +94 -89
  13. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
  14. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
  15. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  16. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +2 -1
  17. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +36 -41
  18. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  19. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
  20. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +35 -34
  21. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
  22. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
  23. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +15 -14
  24. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  25. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  26. package/dist/es/components/runtime/views/super-page.vue2.js +12 -11
  27. package/dist/es.zip +0 -0
  28. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, onMounted as l, resolveComponent as a, createBlock as o, openBlock as u, withCtx as p, createVNode as s, createTextVNode as r, toDisplayString as n } from "vue";
1
+ import { defineComponent as e, ref as t, onMounted as l, resolveComponent as a, createBlock as o, openBlock as u, withCtx as p, createVNode as n, createTextVNode as s, toDisplayString as r } from "vue";
2
2
  import { packageTemplateFiles as i } from "../../../utils/common-util.js";
3
3
  import { ElMessage as m } from "element-plus";
4
4
  const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["export", "close"], setup(e2, { emit: g2 }) {
@@ -7,7 +7,7 @@ const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { c
7
7
  function N(e3) {
8
8
  let t2, l2, a2 = e3;
9
9
  const o2 = a2.indexOf(c), u2 = a2.indexOf(d);
10
- return -1 !== o2 && -1 !== u2 ? (o2 > u2 ? a2 = a2.substring(0, u2) + a2.substring(u2 + 1) : (t2 = a2.substring(o2 + 2, u2), l2 = a2.substring(o2, u2 + 1), x.value.push(t2), a2 = a2.replace(l2, "")), N(a2)) : x.value;
10
+ return -1 !== o2 && -1 !== u2 ? (o2 > u2 ? a2 = a2.substring(0, u2) + a2.substring(u2 + 1) : (t2 = a2.substring(o2 + 2, u2), l2 = a2.substring(o2, u2 + 1), x.value.push(t2), x.value, a2 = a2.replace(l2, "")), N(a2)) : x.value;
11
11
  }
12
12
  function O(e3) {
13
13
  v("export", f.configure, e3);
@@ -17,16 +17,18 @@ const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { c
17
17
  }
18
18
  return l(() => {
19
19
  y.templateFiles && y.templateFiles.length > 0 ? h.value = i(y.templateFiles, f.pageContext, f.configure) : y.templateUuid && y.templateName && h.value.push({ templateUuid: y.templateUuid, templateName: y.templateName }), h.value.forEach((e3) => {
20
- var t2;
21
- e3 && e3.templateName && (e3.templateName = (N(t2 = e3.templateName).forEach((e4) => {
22
- const l2 = c + e4 + d;
23
- let a2;
24
- -1 !== t2.indexOf(l2) && Object.prototype.hasOwnProperty.call(w, e4) && (a2 = w[e4] ? w[e4] : "", t2 = t2.replace(l2, a2));
25
- }), t2));
20
+ e3 && e3.templateName && (e3.templateName = function(e4) {
21
+ const t2 = N(e4);
22
+ return t2.forEach((t3) => {
23
+ const l2 = c + t3 + d;
24
+ let a2;
25
+ -1 !== e4.indexOf(l2) && Object.prototype.hasOwnProperty.call(w, t3) && (a2 = w[t3] ? w[t3] : "", e4 = e4.replace(l2, a2));
26
+ }), e4;
27
+ }(e3.templateName));
26
28
  }), h.value && 0 !== h.value.length || (m({ message: "无符合条件可导出的模板!", type: "warning" }), v("close")), 1 === (h == null ? void 0 : h.value.length) ? (O(h.value[0]), v("close")) : b.value = true;
27
29
  }), (e3, t2) => {
28
30
  const l2 = a("el-table-column"), i2 = a("el-button"), m2 = a("el-table"), c2 = a("el-dialog");
29
- return u(), o(c2, { modelValue: b.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => b.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: _ }, { default: p(() => [s(m2, { data: h.value, style: { width: "100%" } }, { default: p(() => [s(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: p((e4) => [r(n(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), s(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: p((t3) => [s(i2, { type: "text", size: "small", onClick: (e4) => O(t3.row) }, { default: p(() => [r(n(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"]);
31
+ return u(), o(c2, { modelValue: b.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => b.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: _ }, { default: p(() => [n(m2, { data: h.value, style: { width: "100%" } }, { default: p(() => [n(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: p((e4) => [s(r(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), n(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: p((t3) => [n(i2, { type: "text", size: "small", onClick: (e4) => O(t3.row) }, { default: p(() => [s(r(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"]);
30
32
  };
31
33
  } });
32
34
  export {
@@ -19,6 +19,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
19
19
  B.value = l2 ?? 0, R(n2 || i2 || false, e3);
20
20
  }
21
21
  } catch (e3) {
22
+ console.error(e3);
22
23
  }
23
24
  }, R = (e3, t2) => {
24
25
  var _a;
@@ -55,6 +56,7 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
55
56
  })();
56
57
  b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
57
58
  } catch (e3) {
59
+ console.error(e3);
58
60
  }
59
61
  });
60
62
  }, 100);
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, computed as t, ref as a, onMounted as r, watch as l, resolveComponent as o, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as s, unref as p, withCtx as c, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
1
+ import { defineComponent as e, computed as t, ref as r, onMounted as a, watch as o, resolveComponent as l, createBlock as n, openBlock as u, normalizeStyle as i, normalizeClass as s, unref as c, withCtx as p, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
2
2
  import d from "qrcode";
3
3
  import v from "jsbarcode";
4
4
  import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
@@ -12,7 +12,7 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
12
12
  let k = y(q.pageContext, q.configure);
13
13
  const A = t({ get: () => x(N, k), set(e3) {
14
14
  h(N, k, e3);
15
- } }), E = q.configure.runtime ? q.configure.runtime : {}, _ = a(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = a(""), I = a(null), Q = a(_.value.brCodeFormat ?? "CODE128"), V = a([]);
15
+ } }), E = q.configure.runtime ? q.configure.runtime : {}, _ = r(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = r(""), I = r(null), Q = r(_.value.brCodeFormat ?? "CODE128"), V = r([]);
16
16
  function F(e3) {
17
17
  return h(N, k, e3);
18
18
  }
@@ -22,31 +22,32 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
22
22
  function L(e3) {
23
23
  var t2;
24
24
  "QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
25
- e4 || ($.value = t3);
25
+ e4 ? console.error(e4) : $.value = t3;
26
26
  })) : function(e4) {
27
27
  try {
28
28
  v(I.value, e4, { format: Q.value });
29
29
  } catch (e5) {
30
+ console.error("生成条形码时发生错误:", e5);
30
31
  }
31
32
  }(e3);
32
33
  }
33
- return r(() => {
34
+ return a(() => {
34
35
  _.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
35
- l(() => q.pageContext.entity.data[e3], (e4, t2) => {
36
+ o(() => q.pageContext.entity.data[e3], (e4, t2) => {
36
37
  null != e4 && function() {
37
38
  let e5 = true;
38
39
  V.value.forEach((t3) => {
39
40
  q.pageContext.entity.data[t3] || (e5 = false);
40
41
  }), e5 && J(function(e6, t3) {
41
- const a2 = /\$\{(\w+)\}/g;
42
- return e6.replace(a2, (e7, a3) => t3.hasOwnProperty(a3) ? t3[a3] : e7);
42
+ const r2 = /\$\{(\w+)\}/g;
43
+ return e6.replace(r2, (e7, r3) => t3.hasOwnProperty(r3) ? t3[r3] : e7);
43
44
  }(_.value.generateRule, q.pageContext.entity.data));
44
45
  }();
45
46
  });
46
47
  })) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
47
48
  const t2 = JSON.parse(e3.barcodeModelItems);
48
49
  t2.forEach((e4) => {
49
- "-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), l(() => q.pageContext.entity.data[e4.propDbName], (e5, a2) => {
50
+ "-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), o(() => q.pageContext.entity.data[e4.propDbName], (e5, r2) => {
50
51
  if (null != e5) {
51
52
  const e6 = b(t2, q.pageContext.entity.data);
52
53
  e6 && J(e6);
@@ -54,12 +55,13 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
54
55
  }));
55
56
  });
56
57
  }).catch((e3) => {
58
+ console.error("获取条码规则失败:", e3);
57
59
  })), A.value && L(A.value);
58
60
  }), D2({ getValue: function() {
59
61
  return x(N, k);
60
62
  }, setValue: F }), (e3, t2) => {
61
- const a2 = o("el-form-item");
62
- return n(), u(a2, { required: !!_.value.required, class: s(p(P)), "label-width": _.value.labelWidth, style: i(p(O)) }, { label: c(() => [_.value.tittleShow ? (n(), m("div", { key: 0, style: i({ ...p(S) }) }, g(p(R)(_.value.title)), 5)) : f("", true)]), default: c(() => ["QR-code" === _.value.type ? (n(), m("img", { key: 0, src: $.value }, null, 8, j)) : (n(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
63
+ const r2 = l("el-form-item");
64
+ return u(), n(r2, { required: !!_.value.required, class: s(c(P)), "label-width": _.value.labelWidth, style: i(c(O)) }, { label: p(() => [_.value.tittleShow ? (u(), m("div", { key: 0, style: i({ ...c(S) }) }, g(c(R)(_.value.title)), 5)) : f("", true)]), default: p(() => ["QR-code" === _.value.type ? (u(), m("img", { key: 0, src: $.value }, null, 8, j)) : (u(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
63
65
  };
64
66
  } });
65
67
  export {
@@ -207,6 +207,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
207
207
  }
208
208
  function Ne() {
209
209
  if (!ue.value) return;
210
+ Q.configure.name, Q.configure;
210
211
  const e3 = U(Q.pageContext, Q.configure);
211
212
  if (e3) {
212
213
  if (e3.isCalcHeight) {
@@ -282,7 +283,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
282
283
  }
283
284
  n(() => {
284
285
  const e3 = Ke();
285
- ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle, window.addEventListener("message", Pe), F.$on(pe + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
286
+ ue.value && e3 && e3.distanceToBottom && (ue.value.tableHeight = e3.distanceToBottom - 110), Q.pageContext.pageRuntimeStyle && Q.pageContext.pageRuntimeStyle.height, window.addEventListener("message", Pe), F.$on(pe + "-close-component-page-dialog", function({ jumpInfo: e4, popEntity: t2, popPageCode: n2 }) {
286
287
  ue.value.closePageDialog({ entity: t2, pageCode: n2, jumpInfo: e4 });
287
288
  }), F.$on(pe + "_close-dialog-get-entity", () => {
288
289
  F.$emit(pe + "_close-super-dialog");
@@ -1,67 +1,62 @@
1
- import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as f, unref as m, withCtx as d, resolveDynamicComponent as g, toDisplayString as v } from "vue";
1
+ import { defineComponent as e, ref as t, computed as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as g, unref as m, withCtx as d, resolveDynamicComponent as f, toDisplayString as v } from "vue";
2
2
  import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
3
3
  import { setVariableValue as x, getVariableValue as y, formatVariableValue as b, getFormPropName as h, setVariableValueWithProp as j } from "../../../../utils/page-helper-util.js";
4
4
  import { handleAfterInitEvent as R, handleEvent as k } from "../../../../utils/events/event-util.js";
5
5
  import { updateFormItemEditState as V } from "../../../../utils/events/validator-util.js";
6
- import { getListCode as _ } from "../../../../utils/common-util.js";
7
- import { getComponentRef as D } from "../../../../utils/global-refs.js";
6
+ import { getListCode as _, addRequiredClassUtil as D } from "../../../../utils/common-util.js";
7
+ import { getComponentRef as E } from "../../../../utils/global-refs.js";
8
8
  import { getAdditionalParamMap as w } from "../../../../utils/events/standard-event.js";
9
- import { $t as E } from "../../../../utils/i18n-util.js";
10
- import F from "../../../../utils/eventBus.js";
11
- import { functions as S } from "../../../../utils/api/page-expose-util.js";
12
- const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
13
- const O = e2, z = O.pageContext.entity ? O.pageContext.entity : {}, G = C(O.pageContext, O.configure), H = t({ get: () => y(z, G), set(e3) {
14
- x(z, G, e3);
15
- } }), P = O.configure.runtime ? O.configure.runtime : {}, I = P.style, A = P.class, B = P.headerStyle, W = o(P.props ? P.props : {}), J = function(e3) {
9
+ import { $t as S } from "../../../../utils/i18n-util.js";
10
+ import U from "../../../../utils/eventBus.js";
11
+ import { functions as F } from "../../../../utils/api/page-expose-util.js";
12
+ const q = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
13
+ const z = e2, G = t(null), H = z.pageContext.entity ? z.pageContext.entity : {}, P = C(z.pageContext, z.configure), I = o({ get: () => y(H, P), set(e3) {
14
+ x(H, P, e3), null != e3 && (G.value = "");
15
+ } }), A = z.configure.runtime ? z.configure.runtime : {}, B = A.style, W = A.class, J = A.headerStyle, K = t(A.props ? A.props : {}), L = function(e3) {
16
16
  let t2 = {};
17
17
  if (e3) for (let o2 in e3) {
18
- const n2 = e3[o2];
19
- t2[o2] = b(O.pageContext, n2);
18
+ const a2 = e3[o2];
19
+ t2[o2] = b(z.pageContext, a2);
20
20
  }
21
21
  return t2;
22
- }(P.customParams ? P.customParams : {}), K = w(O.pageContext), L = o(O.configure.props && O.configure.props.base ? O.configure.props.base.name : null);
23
- function M(e3, t2) {
24
- j(z, e3, t2);
22
+ }(A.customParams ? A.customParams : {}), M = w(z.pageContext), N = t(z.configure.props && z.configure.props.base ? z.configure.props.base.name : null);
23
+ function Q(e3, t2) {
24
+ j(H, e3, t2);
25
25
  }
26
- function N(e3) {
27
- S.isHasFieldAuthPermission(O.configure) && V(O.pageContext, e3);
26
+ function T(e3) {
27
+ F.isHasFieldAuthPermission(z.configure) ? V(z.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", P ? P.join(".") : "");
28
28
  }
29
- function Q() {
30
- const e3 = O.pageContext.tableUuids;
29
+ function X() {
30
+ const e3 = z.pageContext.tableUuids;
31
31
  e3 && e3.forEach((e4) => {
32
- const t2 = _(O.pageContext.code, O.pageContext.version, O.configure.uuid), o2 = D(O.pageContext, e4);
32
+ const t2 = _(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
- O.configure.props.verification.custom && O.configure.props.verification.custom.enabled && (O.pageContext.customValidatorUuids || (O.pageContext.customValidatorUuids = []), O.pageContext.customValidatorUuids.push(O.configure.uuid));
37
- const T = O.pageContext.code, X = o(G && G.length > 0 ? T + "__" + G.join("__") : null), Y = o(null), Z = o(null), ee = o(null);
38
- function te(e3) {
39
- k(H.value, O.pageContext, O.configure, e3);
36
+ 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 = t(P && P.length > 0 ? Y + "__" + P.join("__") : null), ee = t(null), te = t(null), oe = t(null);
38
+ function ae(e3) {
39
+ k(I.value, z.pageContext, z.configure, e3);
40
40
  }
41
- return n(() => {
42
- F.$on(X.value + "-scanDone", (e3) => {
41
+ return a(() => {
42
+ U.$on(Z.value + "-scanDone", (e3) => {
43
43
  const t2 = e3.result;
44
- x(z, G, t2);
45
- }), F.$on(X.value + "-pickFileDone", (e3) => {
46
- Y.value.pickFileDone(e3);
47
- }), a(() => {
48
- const e3 = H.value;
49
- R(e3, O.pageContext, O.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
44
+ x(H, P, t2);
45
+ }), U.$on(Z.value + "-pickFileDone", (e3) => {
46
+ Z.value, ee.value.pickFileDone(e3);
47
+ }), n(() => {
48
+ const e3 = I.value;
49
+ R(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
- F.$off(X.value + "-scanDone"), F.$off(X.value + "-pickFileDone");
52
+ U.$off(Z.value + "-scanDone"), U.$off(Z.value + "-pickFileDone");
53
53
  }), $2({ getCustomRef: function() {
54
- return Y.value;
55
- }, invokeCustomFunction: function(e3, ...t2) {
56
- if (Y.value && "function" == typeof Y.value[e3]) return Y.value[e3](...t2);
57
- throw new Error(`执行失败:Function '${e3}' not found in custom component`);
58
- }, hasCustomFunction: function(e3) {
59
- return Y.value && "function" == typeof Y.value[e3];
54
+ return ee.value;
60
55
  }, addRequiredClass: function() {
61
- requiredClass.value = addRequiredClassUtil();
56
+ G.value = D();
62
57
  } }), (e3, t2) => {
63
58
  const o2 = u("el-form-item");
64
- return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(m(A)), "label-width": W.value.labelWidth, style: c(m(I)) }, { label: d(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...m(B) }) }, v(m(E)(W.value.title)), 5)) : s("", true)]), default: d(() => [L.value ? (p(), r("div", U, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[1] || (t2[1] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : L.value ? (p(), r("div", q, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[3] || (t2[3] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
59
+ return K.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: g(m(W) + (G.value ? " " + G.value : "")), "label-width": K.value.labelWidth, style: c(m(B)) }, { label: d(() => [K.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: oe, style: c({ ...m(J) }) }, v(m(S)(K.value.title)), 5)) : s("", true)]), default: d(() => [N.value ? (p(), r("div", q, [(p(), l(f(N.value), { ref_key: "customRef", ref: ee, size: K.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(L), modelValue: I.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => I.value = e4), disabled: "disabled" === K.value.state, "additional-param-map": m(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: t2[1] || (t2[1] = (t3) => m(k)(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)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : N.value ? (p(), r("div", O, [(p(), l(f(N.value), { ref_key: "customRef", ref: ee, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(L), modelValue: I.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => I.value = e4), disabled: "disabled" === K.value.state, "additional-param-map": m(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: t2[3] || (t2[3] = (t3) => m(k)(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
60
  };
66
61
  } });
67
62
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as u, createBlock as r, openBlock as n, normalizeStyle as i, normalizeClass as p, unref as s, withCtx as c, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
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 p, unref as s, withCtx as c, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
2
2
  import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
3
3
  import { getDateShortCuts as y } from "../../../../utils/form/date-shortcuts.js";
4
4
  import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as F, isDateDataType as k } from "../../../../utils/page-helper-util.js";
@@ -8,24 +8,24 @@ import Y from "dayjs";
8
8
  import { $t as _ } from "../../../../utils/i18n-util.js";
9
9
  import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
10
10
  const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: P2 }) {
11
- const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, D = A.style, I = A.class, M = A.headerStyle, B = A.titleExceedStyle, N = a(A.props ? A.props : {});
12
- let U = h(S.pageContext, S.configure, N.value.prop);
13
- if (S.pageContext.modelFieldsMap && U && U.length > 0 && "data" === U[0]) {
14
- const e3 = C(U, S.pageContext);
11
+ const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, D = A.style, $ = A.class, I = A.headerStyle, M = A.titleExceedStyle, B = a(A.props ? A.props : {});
12
+ let N = h(S.pageContext, S.configure, B.value.prop);
13
+ if (S.pageContext.modelFieldsMap && N && N.length > 0 && "data" === N[0]) {
14
+ const e3 = C(N, S.pageContext);
15
15
  e3 && function(e4) {
16
16
  const a2 = e4.dataType;
17
- k(a2) && ("year" === N.value.dateType && "YYYY" === N.value.valueFormat || "month" === N.value.dateType && "YYYY-MM" === N.value.valueFormat) && (N.value.valueFormat = "x");
17
+ k(a2) && ("year" === B.value.dateType && "YYYY" === B.value.valueFormat || "month" === B.value.dateType && "YYYY-MM" === B.value.valueFormat) && (B.value.valueFormat = "x");
18
18
  }(e3);
19
19
  }
20
- let W = null, $ = false;
21
- if (N.value.dateType && N.value.dateType.includes("range")) {
22
- $ = true;
23
- let e3 = N.value.prop2;
20
+ let U = null, W = false;
21
+ if (B.value.dateType && B.value.dateType.includes("range")) {
22
+ W = true;
23
+ let e3 = B.value.prop2;
24
24
  e3 && e3.startsWith("${") || (e3 = "${page." + S.configure.uuid + "-2}");
25
25
  const a2 = x(q, e3, null);
26
- if (e3 = e3.substring(2, e3.length - 1), W = e3.split("."), !(a2 || q.data && (q.data.id || q.data.ID)) && N.value.defaultValue2) {
27
- const e4 = x(q, N.value.defaultValue2);
28
- b(q, W, e4);
26
+ if (e3 = e3.substring(2, e3.length - 1), U = e3.split("."), !(a2 || q.data && (q.data.id || q.data.ID)) && B.value.defaultValue2) {
27
+ const e4 = x(q, B.value.defaultValue2);
28
+ b(q, U, e4);
29
29
  }
30
30
  }
31
31
  const E = a(null), O = a(null), G = a(null);
@@ -38,7 +38,7 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
38
38
  let t2 = null;
39
39
  return t2 = "x" === a2 ? l2.toDate().getTime() : Y(e3).format(a2), t2;
40
40
  } catch (a3) {
41
- return e3;
41
+ return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${B.value.valueFormat}`), e3;
42
42
  }
43
43
  }
44
44
  return e3;
@@ -48,28 +48,28 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
48
48
  const e3 = J.value;
49
49
  T(e3, S.pageContext, S.configure, { formItemRef: E.value, componentRef: O.value, titleRef: G.value, value: e3, entity: S.pageContext.entity.data, pageData: S.pageContext.entity.page });
50
50
  });
51
- }), U) {
52
- const e3 = F(q, U), a2 = H(e3, N.value.valueFormat);
53
- e3 !== a2 && b(q, U, a2);
51
+ }), N) {
52
+ const e3 = F(q, N), a2 = H(e3, B.value.valueFormat);
53
+ e3 !== a2 && b(q, N, a2);
54
54
  }
55
- if (W) {
56
- const e3 = F(q, W), a2 = H(e3, N.value.valueFormat);
57
- e3 !== a2 && b(q, W, a2);
55
+ if (U) {
56
+ const e3 = F(q, U), a2 = H(e3, B.value.valueFormat);
57
+ e3 !== a2 && b(q, U, a2);
58
58
  }
59
59
  const J = o({ get() {
60
- if ($) {
60
+ if (W) {
61
61
  const e3 = [];
62
- let a2 = F(q, U);
63
- e3.push(H(a2, N.value.valueFormat));
64
- let l2 = F(q, W);
65
- return e3.push(H(l2, N.value.valueFormat)), e3;
62
+ let a2 = F(q, N);
63
+ e3.push(H(a2, B.value.valueFormat));
64
+ let l2 = F(q, U);
65
+ return e3.push(H(l2, B.value.valueFormat)), e3;
66
66
  }
67
- return H(F(q, U), N.value.valueFormat);
67
+ return H(F(q, N), B.value.valueFormat);
68
68
  }, set(e3) {
69
- $ ? Array.isArray(e3) ? (b(q, U, e3[0]), b(q, W, e3[1]), w.value = "") : null === e3 && (b(q, U, null), b(q, W, null)) : (b(q, U, e3), null != e3 && (w.value = ""));
70
- } }), K = a(y(N.value.dateScopeDetails, N.value.sourceType, N.value.dateType));
71
- if (N.value.shortcutsFunc) {
72
- const e3 = V(S.pageContext, N.value.shortcutsFunc);
69
+ W ? Array.isArray(e3) ? (b(q, N, e3[0]), b(q, U, e3[1]), w.value = "") : null === e3 && (b(q, N, null), b(q, U, null)) : (b(q, N, e3), null != e3 && (w.value = ""));
70
+ } }), K = a(y(B.value.dateScopeDetails, B.value.sourceType, B.value.dateType));
71
+ if (B.value.shortcutsFunc) {
72
+ const e3 = V(S.pageContext, B.value.shortcutsFunc);
73
73
  if (e3) {
74
74
  let a2 = e3.apply(e3, [{ pageContext: S.pageContext, configureObj: S.configure }]);
75
75
  if (a2) {
@@ -81,8 +81,8 @@ const P = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
81
81
  return P2({ addRequiredClass: function() {
82
82
  w.value = z();
83
83
  } }), (e3, a2) => {
84
- const l2 = u("el-time-picker"), t2 = u("el-date-picker"), o2 = u("el-form-item");
85
- return n(), r(o2, { ref_key: "formItemRef", ref: E, required: N.value.required, class: p(s(I) + (w.value ? " " + w.value : "")), "label-width": N.value.labelWidth, style: i(s(D)) }, { label: c(() => [N.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: G, style: i({ ...s(M), ...s(B) }) }, [N.value.prefixType ? (n(), r(R, { key: 0, pageContext: e3.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(N.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), r(l2, { key: 0, ref_key: "componentRef", ref: O, "is-range": "timerange" == N.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: N.value.clearable, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, "unlink-panels": true, format: N.value.format, "value-format": N.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => J.value = e4), shortcuts: K.value, type: N.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), r(t2, { key: 1, ref_key: "componentRef", ref: O, clearable: N.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, format: N.value.format, "value-format": N.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => J.value = e4), shortcuts: K.value, type: N.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
84
+ const l2 = r("el-time-picker"), t2 = r("el-date-picker"), o2 = r("el-form-item");
85
+ return n(), u(o2, { ref_key: "formItemRef", ref: E, required: B.value.required, class: p(s($) + (w.value ? " " + w.value : "")), "label-width": B.value.labelWidth, style: i(s(D)) }, { label: c(() => [B.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: G, style: i({ ...s(I), ...s(M) }) }, [B.value.prefixType ? (n(), u(R, { key: 0, pageContext: e3.pageContext, property: B.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(B.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == B.value.dateType || "timerange" == B.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: O, "is-range": "timerange" == B.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: B.value.clearable, disabled: "disabled" === B.value.state, readonly: "readonly" === B.value.state, size: B.value.size, placeholder: B.value.placeholder, "start-placeholder": B.value.placeholder, "end-placeholder": B.value.endPlaceholder ? B.value.endPlaceholder : B.value.placeholder, "unlink-panels": true, format: B.value.format, "value-format": B.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => J.value = e4), shortcuts: K.value, type: B.value.dateType, onChange: a2[1] || (a2[1] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : (n(), u(t2, { key: 1, ref_key: "componentRef", ref: O, clearable: B.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === B.value.state, readonly: "readonly" === B.value.state, size: B.value.size, placeholder: B.value.placeholder, "start-placeholder": B.value.placeholder, "end-placeholder": B.value.endPlaceholder ? B.value.endPlaceholder : B.value.placeholder, format: B.value.format, "value-format": B.value.valueFormat, modelValue: J.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => J.value = e4), shortcuts: K.value, type: B.value.dateType, onChange: a2[8] || (a2[8] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => s(j)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
86
86
  };
87
87
  } });
88
88
  export {
@@ -53,7 +53,7 @@ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
53
53
  }, X = l(null), Y = l(null);
54
54
  return o(() => {
55
55
  x.$on(W.value + "-pickFileDone", (e3) => {
56
- E.value.pickFileDone(e3);
56
+ W.value, E.value.pickFileDone(e3);
57
57
  }), a(() => {
58
58
  const e3 = h(S, F), l2 = { showName: h(S, U), serverPath: e3 };
59
59
  g(l2, j.pageContext, j.configure, { formItemRef: X.value, componentRef: E.value, titleRef: Y.value, value: l2, entity: j.pageContext.entity.data, pageData: j.pageContext.entity.page });
@@ -3,13 +3,13 @@ import { SuperIcon as T } from "agilebuilder-ui";
3
3
  import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
4
4
  import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as h, getVariableValue as b } from "../../../../utils/page-helper-util.js";
5
5
  import { handleFormEvent as _, handleAfterInitEvent as S, doSuffixOrPrefixClickEvent as j } from "../../../../utils/events/event-util.js";
6
- import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as q } from "../../../../utils/form/scan-util.js";
7
- import D from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as M } from "agilebuilder-ui/src/utils/common-util";
9
- import N from "../../../../utils/eventBus.js";
10
- import { $t as P } from "../../../../utils/i18n-util.js";
11
- import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
12
- const J = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: J2 }) {
6
+ import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
7
+ import q from "../common/title-suffix-element.vue.js";
8
+ import { isMobileBrowser as D } 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 P } 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
14
  const L = e2, B = L.pageContext.entity ? L.pageContext.entity : {}, F = t("text");
15
15
  let $ = k(L.pageContext, L.configure);
@@ -17,65 +17,66 @@ const J = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure:
17
17
  const e3 = w($, L.pageContext);
18
18
  e3 && (F.value = V(e3.dataType) ? "number" : "text");
19
19
  }
20
- const A = t(M()), E = L.pageContext.code, U = t($ && $.length > 0 ? E + "__" + $.join("__") : null), W = t(null), G = l({ get: () => b(B, $), set(e3) {
20
+ const A = t(D()), E = L.pageContext.code, U = t($ && $.length > 0 ? E + "__" + $.join("__") : null), W = t(null), G = l({ get: () => b(B, $), set(e3) {
21
21
  h(B, $, e3), null != e3 && "" !== e3 && (W.value = "");
22
22
  } }), H = t(null), K = t(null), Q = t(null), X = L.configure.runtime ? L.configure.runtime : {}, Y = t(X.props ? X.props : {}), Z = t(!!((_a = Y.value.scan) == null ? void 0 : _a.enable));
23
23
  let ee = false;
24
24
  const te = window.localStorage.getItem("auth_source");
25
25
  te && "dingtalk" === te && (ee = true);
26
26
  let le = "";
27
- le = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
- const ne = !(!A.value || !le || "app" !== le), oe = t(!!((ne || ee) && Z.value || A.value && Z.value && "https:" === window.location.protocol));
29
- let ae = {};
27
+ const ne = navigator.userAgent;
28
+ le = ne.indexOf(" uni-app ") > 0 ? "app" : "browser";
29
+ const oe = !(!A.value || !le || "app" !== le), ae = t(!!((oe || ee) && Z.value || A.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
- ae = e3;
32
+ ue = e3;
32
33
  }), u(() => G.value, (e3) => {
33
34
  e3 = e3.trim();
34
- const t2 = O(e3, ae);
35
- t2 && q(L.pageContext, t2.scanSet, t2.params);
35
+ const t2 = O(e3, ue);
36
+ t2 && N(L.pageContext, t2.scanSet, t2.params);
36
37
  }));
37
- const ue = X.style, ie = X.class, re = X.headerStyle, pe = X.titleExceedStyle;
38
- function se(e3) {
38
+ const ie = X.style, re = X.class, pe = X.headerStyle, se = X.titleExceedStyle;
39
+ function ce(e3) {
39
40
  return h(B, $, e3);
40
41
  }
41
42
  n(() => {
42
- N.$on(U.value + "-scanDone", (e3) => {
43
- se(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
43
+ J.$on(U.value + "-scanDone", (e3) => {
44
+ U.value, JSON.stringify(e3), ce(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
44
45
  }), o(() => {
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 }), oe.value && ((_a2 = Y.value.scan) == null ? void 0 : _a2.autoOpen) && ve();
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();
48
49
  });
49
50
  }), a(() => {
50
- N.$off(U.value + "-scanDone");
51
+ J.$off(U.value + "-scanDone");
51
52
  });
52
- const ce = t(false);
53
- function ve() {
54
- if (ne || ee) {
53
+ const ve = t(false);
54
+ function fe() {
55
+ if (oe || 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 (A.value) if ("https:" === window.location.protocol) ce.value = true;
57
+ ee && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
58
+ } else if (A.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 ce.value = true;
63
+ else ve.value = true;
63
64
  }
64
- function fe(e3) {
65
- ce.value = false, se(e3);
65
+ function ye(e3) {
66
+ ve.value = false, ce(e3);
66
67
  }
67
- return J2({ getValue: function() {
68
+ return z2({ getValue: function() {
68
69
  return b(B, $);
69
- }, setValue: se, scanClick: ve, addRequiredClass: function() {
70
- W.value = z();
70
+ }, setValue: ce, scanClick: fe, addRequiredClass: function() {
71
+ W.value = P();
71
72
  } }), (e3, t2) => {
72
73
  const l2 = i("el-input"), n2 = i("scan-code-input-browser"), o2 = i("el-form-item");
73
- return p(), r(o2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: c(v(ie) + (W.value ? " " + W.value : "")), "label-width": Y.value.labelWidth, style: s(v(ue)) }, { label: f(() => [Y.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: s({ ...v(re), ...v(pe) }) }, [Y.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(P)(Y.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(l2, { ref_key: "componentRef", ref: K, disabled: "disabled" === Y.value.state, readonly: "readonly" === Y.value.state, size: Y.value.size, clearable: Y.value.clearable, placeholder: Y.value.placeholder, maxlength: Y.value.maxLength, "show-word-limit": Y.value.showInputNum, type: F.value, modelValue: G.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => G.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
74
+ return p(), r(o2, { ref_key: "formItemRef", ref: H, required: !!Y.value.required, class: c(v(re) + (W.value ? " " + W.value : "")), "label-width": Y.value.labelWidth, style: s(v(ie)) }, { label: f(() => [Y.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: Q, style: s({ ...v(pe), ...v(se) }) }, [Y.value.prefixType ? (p(), r(q, { key: 0, pageContext: e3.pageContext, property: Y.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(M)(Y.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(l2, { ref_key: "componentRef", ref: K, disabled: "disabled" === Y.value.state, readonly: "readonly" === Y.value.state, size: Y.value.size, clearable: Y.value.clearable, placeholder: Y.value.placeholder, maxlength: Y.value.maxLength, "show-word-limit": Y.value.showInputNum, type: F.value, modelValue: G.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => G.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
74
75
  let t3 = b(B, $);
75
76
  null != t3 && (t3 = t3.trim()), h(B, $, t3), _(e5, L.pageContext, L.configure, "blur");
76
- }(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.preText)), 1)]), key: "0" } : void 0, "outer" == Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prepend", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.preText)), 1)]), key: "1" } : void 0, "outer" != Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "suffix", fn: f(() => [Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "append", fn: f(() => [oe.value ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ve()) })) : g("", true), Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(P)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ce.value ? (p(), r(n2, { key: 0, onClose: fe })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
77
+ }(e4)), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prefix", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.preText)), 1)]), key: "0" } : void 0, "outer" == Y.value.iconPosition && (Y.value.preIconType && Y.value.preIconValue || Y.value.preText) ? { name: "prepend", fn: f(() => [Y.value.preIconType && Y.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.preIconType, iconValue: Y.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.preText)), 1)]), key: "1" } : void 0, "outer" != Y.value.iconPosition && (Y.value.sufIconType && Y.value.sufIconValue || Y.value.sufText) ? { name: "suffix", fn: f(() => [Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(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 ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => fe()) })) : g("", true), Y.value.sufIconType && Y.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Y.value.sufIconType, iconValue: Y.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(G.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), d(" " + x(v(M)(Y.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), ve.value ? (p(), r(n2, { key: 0, onClose: ye })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
77
78
  };
78
79
  } });
79
80
  export {
80
- J as default
81
+ z as default
81
82
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as e, ref as t, computed as l, onMounted as u, nextTick as a, resolveComponent as n, createElementBlock as i, createBlock as o, openBlock as p, normalizeStyle as s, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as x } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as u, nextTick as a, resolveComponent as n, createElementBlock as i, createBlock as o, openBlock as s, normalizeStyle as p, normalizeClass as r, unref as f, createElementVNode as c, toDisplayString as v, withCtx as y, createCommentVNode as g, createTextVNode as x } from "vue";
2
2
  import { getFormModelFields as d } from "../../../../utils/page-init-util.js";
3
3
  import { getVariableValue as m, formatValueByType as h } from "../../../../utils/page-helper-util.js";
4
4
  import { SuperIcon as k } from "agilebuilder-ui";
@@ -7,7 +7,9 @@ import { $t as _ } from "../../../../utils/i18n-util.js";
7
7
  const I = { style: { width: "100%", "text-align": "center", "font-weight": "700", "font-size": "24px", "margin-bottom": "20px" } }, b = { style: { overflow: "hidden", "white-space": "nowrap" } }, V = ["title"], j = e({ __name: "label-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
8
8
  const R = e2, S = R.pageContext.entity ? R.pageContext.entity : {};
9
9
  let P = d(R.pageContext, R.configure);
10
- const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, z = q.class, D = q.headerStyle, E = q.appendClass, F = q.appendStyle, W = q.titleExceedStyle, A = t(q.props ? q.props : {}), B = t(A.value.options ? A.value.options : []), G = A.value.formatType, H = l(() => {
10
+ const q = R.configure.runtime ? R.configure.runtime : {}, O = q.style, z = q.class, D = q.headerStyle, E = q.appendClass, F = q.appendStyle, W = q.titleExceedStyle, A = t(q.props ? q.props : {}), B = t(A.value.options ? A.value.options : []), G = A.value.formatType;
11
+ A.value;
12
+ const H = l(() => {
11
13
  let e3 = m(S, P);
12
14
  if (G) if (A.value.hasOptions) {
13
15
  let t2 = null;
@@ -27,7 +29,7 @@ const I = { style: { width: "100%", "text-align": "center", "font-weight": "700"
27
29
  B.value = e3 || [];
28
30
  } }), (e3, t2) => {
29
31
  const l2 = n("el-form-item");
30
- return A.value.whetherTittle ? (p(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: s(f(O)) }, [c("div", I, v(A.value.title), 1)], 6)) : A.value.tittleShow ? (p(), o(l2, { key: 1, ref_key: "formItemRef", ref: J, required: !!A.value.required, class: r(f(z)), "label-width": A.value.labelWidth, style: s(f(O)) }, { label: y(() => [A.value.tittleShow ? (p(), i("div", { key: 0, ref_key: "titleRef", ref: L, style: s({ ...f(D), ...f(W) }) }, v(f(_)(A.value.title)), 5)) : g("", true)]), default: y(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: t2[0] || (t2[0] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", b, [A.value.preIconValue || A.value.preText ? (p(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }), style: s(f(F)) }, [A.value.preIconType && A.value.preIconValue ? (p(), o(f(k), { key: 0, iconType: A.value.preIconType, iconValue: A.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), x(" " + v(f(_)(A.value.preText)), 1)], 6)) : g("", true), x("  " + v(H.value), 1)]), A.value.sufIconValue || A.value.sufText ? (p(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }) }, [A.value.sufIconType && A.value.sufIconValue ? (p(), o(f(k), { key: 0, style: {}, iconType: A.value.sufIconType, iconValue: A.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), c("span", null, " " + v(f(_)(A.value.sufText)), 1)], 2)) : g("", true)], 512)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (p(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: t2[1] || (t2[1] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(A.value.prefixIcon) + " " + v(H.value), 9, V), A.value.suffixTxt ? (p(), i("span", { key: 0, class: r(f(E)), style: s(f(F)) }, v(A.value.suffixTxt), 7)) : g("", true)]));
32
+ return A.value.whetherTittle ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: L, class: r(f(z)), style: p(f(O)) }, [c("div", I, v(A.value.title), 1)], 6)) : A.value.tittleShow ? (s(), o(l2, { key: 1, ref_key: "formItemRef", ref: J, required: !!A.value.required, class: r(f(z)), "label-width": A.value.labelWidth, style: p(f(O)) }, { label: y(() => [A.value.tittleShow ? (s(), i("div", { key: 0, ref_key: "titleRef", ref: L, style: p({ ...f(D), ...f(W) }) }, v(f(_)(A.value.title)), 5)) : g("", true)]), default: y(() => [c("div", { style: { display: "flex", width: "100%", "justify-content": "space-between" }, ref_key: "componentRef", ref: K, onClick: t2[0] || (t2[0] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", b, [A.value.preIconValue || A.value.preText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }), style: p(f(F)) }, [A.value.preIconType && A.value.preIconValue ? (s(), o(f(k), { key: 0, iconType: A.value.preIconType, iconValue: A.value.preIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), x(" " + v(f(_)(A.value.preText)), 1)], 6)) : g("", true), x("  " + v(H.value), 1)]), A.value.sufIconValue || A.value.sufText ? (s(), i("span", { key: 0, class: r({ "el-input__suffix": "outer" != A.value.iconPosition, "el-input-group__append": "outer" == A.value.iconPosition }) }, [A.value.sufIconType && A.value.sufIconValue ? (s(), o(f(k), { key: 0, style: {}, iconType: A.value.sufIconType, iconValue: A.value.sufIconValue }, null, 8, ["iconType", "iconValue"])) : g("", true), c("span", null, " " + v(f(_)(A.value.sufText)), 1)], 2)) : g("", true)], 512)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : (s(), i("span", { key: 2, style: { display: "flex", "justify-content": "space-between" }, onClick: t2[1] || (t2[1] = (t3) => f(C)(t3, e3.pageContext, e3.configure, "click")) }, [c("span", { style: { overflow: "hidden", "white-space": "nowrap" }, title: H.value }, v(A.value.prefixIcon) + " " + v(H.value), 9, V), A.value.suffixTxt ? (s(), i("span", { key: 0, class: r(f(E)), style: p(f(F)) }, v(A.value.suffixTxt), 7)) : g("", true)]));
31
33
  };
32
34
  } });
33
35
  export {
@@ -5,6 +5,7 @@ import { handleAfterInitEvent as k, handleEvent as x } from "../../../../utils/e
5
5
  import { $t as C } from "../../../../utils/i18n-util.js";
6
6
  const _ = e({ __name: "link-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
7
7
  const _2 = e2, h = y(_2.pageContext, _2.configure), R = _2.configure.runtime ? _2.configure.runtime : {}, j = R.style, w = R.class, I = R.headerStyle, S = t(R.props ? R.props : {});
8
+ S.value;
8
9
  let $ = S.value.formatting;
9
10
  const D = _2.pageContext.entity ? _2.pageContext.entity : {}, V = l(() => {
10
11
  let e3 = b(D, h);