super-page-runtime 2.3.7 → 2.3.9-sit1

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 (57) 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 +102 -102
  3. package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +26 -24
  4. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +59 -58
  5. package/dist/es/components/runtime/utils/charts/chart-radar-util.js +38 -37
  6. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +28 -27
  7. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
  8. package/dist/es/components/runtime/utils/charts/chart-util.js +29 -22
  9. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  10. package/dist/es/components/runtime/utils/common-util.js +4 -0
  11. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  12. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  13. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  14. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  15. package/dist/es/components/runtime/utils/events/validator-util.js +122 -104
  16. package/dist/es/components/runtime/utils/page-init-util.js +24 -25
  17. package/dist/es/components/runtime/utils/page-store.js +10 -10
  18. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +4 -1
  20. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +4 -4
  21. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  23. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +4 -1
  24. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -15
  25. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -1
  26. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +7 -7
  27. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -1
  28. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
  29. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -1
  30. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +7 -7
  31. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +11 -12
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  33. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  34. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  35. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +19 -17
  36. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +26 -20
  37. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +10 -4
  38. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  39. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +32 -25
  40. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +52 -49
  41. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  42. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  43. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  44. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -55
  45. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
  46. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
  47. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  48. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +55 -53
  49. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +63 -61
  50. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  51. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  52. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  53. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  54. package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
  55. package/dist/es/style.css +30 -0
  56. package/package.json +2 -2
  57. package/dist/es.zip +0 -0
@@ -1,87 +1,90 @@
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";
1
+ import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as u, createBlock as r, openBlock as n, normalizeStyle as i, normalizeClass as p, unref as s, withCtx as c, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
2
2
  import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
3
3
  import { getDateShortCuts as y } from "../../../../utils/form/date-shortcuts.js";
4
4
  import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as F, isDateDataType as k } from "../../../../utils/page-helper-util.js";
5
5
  import { handleAfterInitEvent as T, getCustomFunc as V, handleFormEvent as j } from "../../../../utils/events/event-util.js";
6
- import Y from "../common/title-suffix-element.vue.js";
7
- import R from "dayjs";
6
+ import R from "../common/title-suffix-element.vue.js";
7
+ import Y from "dayjs";
8
8
  import { $t as _ } from "../../../../utils/i18n-util.js";
9
- const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
10
- const z2 = e2, P = z2.pageContext.entity ? z2.pageContext.entity : {}, S = z2.configure.runtime ? z2.configure.runtime : {}, w = S.style, A = S.class, D = S.headerStyle, $ = S.titleExceedStyle, q = a(S.props ? S.props : {});
11
- let I = h(z2.pageContext, z2.configure, q.value.prop);
12
- if (z2.pageContext.modelFieldsMap && I && I.length > 0 && "data" === I[0]) {
13
- const e3 = C(I, z2.pageContext);
9
+ import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
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);
14
15
  e3 && function(e4) {
15
16
  const a2 = e4.dataType;
16
- k(a2) && ("year" === q.value.dateType && "YYYY" === q.value.valueFormat || "month" === q.value.dateType && "YYYY-MM" === q.value.valueFormat) && (q.value.valueFormat = "x");
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
18
  }(e3);
18
19
  }
19
- let M = null, B = false;
20
- if (q.value.dateType && q.value.dateType.includes("range")) {
21
- B = true;
22
- let e3 = q.value.prop2;
23
- e3 && e3.startsWith("${") || (e3 = "${page." + z2.configure.uuid + "-2}");
24
- const a2 = x(P, e3, null);
25
- if (e3 = e3.substring(2, e3.length - 1), M = e3.split("."), !(a2 || P.data && (P.data.id || P.data.ID)) && q.value.defaultValue2) {
26
- const e4 = x(P, q.value.defaultValue2);
27
- b(P, M, e4);
20
+ let W = null, $ = false;
21
+ if (N.value.dateType && N.value.dateType.includes("range")) {
22
+ $ = true;
23
+ let e3 = N.value.prop2;
24
+ e3 && e3.startsWith("${") || (e3 = "${page." + S.configure.uuid + "-2}");
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);
28
29
  }
29
30
  }
30
- const N = a(null), U = a(null), W = a(null);
31
- function E(e3, a2) {
31
+ const E = a(null), O = a(null), G = a(null);
32
+ function H(e3, a2) {
32
33
  if (!e3) return e3;
33
34
  if (a2) {
34
35
  "number" != typeof e3 || isNaN(e3) || 4 !== e3.toString().length || (e3 = e3.toString());
35
36
  try {
36
- const l2 = R(e3);
37
+ const l2 = Y(e3);
37
38
  let t2 = null;
38
- return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
39
+ return t2 = "x" === a2 ? l2.toDate().getTime() : Y(e3).format(a2), t2;
39
40
  } catch (a3) {
40
- return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${q.value.valueFormat}`), e3;
41
+ return e3;
41
42
  }
42
43
  }
43
44
  return e3;
44
45
  }
45
46
  if (l(() => {
46
47
  t(() => {
47
- const e3 = O.value;
48
- T(e3, z2.pageContext, z2.configure, { formItemRef: N.value, componentRef: U.value, titleRef: W.value, value: e3, entity: z2.pageContext.entity.data, pageData: z2.pageContext.entity.page });
48
+ const e3 = J.value;
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 });
49
50
  });
50
- }), I) {
51
- const e3 = F(P, I), a2 = E(e3, q.value.valueFormat);
52
- e3 !== a2 && b(P, I, a2);
51
+ }), U) {
52
+ const e3 = F(q, U), a2 = H(e3, N.value.valueFormat);
53
+ e3 !== a2 && b(q, U, a2);
53
54
  }
54
- if (M) {
55
- const e3 = F(P, M), a2 = E(e3, q.value.valueFormat);
56
- e3 !== a2 && b(P, M, a2);
55
+ if (W) {
56
+ const e3 = F(q, W), a2 = H(e3, N.value.valueFormat);
57
+ e3 !== a2 && b(q, W, a2);
57
58
  }
58
- const O = o({ get() {
59
- if (B) {
59
+ const J = o({ get() {
60
+ if ($) {
60
61
  const e3 = [];
61
- let a2 = F(P, I);
62
- e3.push(E(a2, q.value.valueFormat));
63
- let l2 = F(P, M);
64
- return e3.push(E(l2, q.value.valueFormat)), 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;
65
66
  }
66
- return E(F(P, I), q.value.valueFormat);
67
+ return H(F(q, U), N.value.valueFormat);
67
68
  }, set(e3) {
68
- B ? Array.isArray(e3) ? (b(P, I, e3[0]), b(P, M, e3[1])) : null === e3 && (b(P, I, null), b(P, M, null)) : b(P, I, e3);
69
- } }), G = a(y(q.value.dateScopeDetails, q.value.sourceType, q.value.dateType));
70
- if (q.value.shortcutsFunc) {
71
- const e3 = V(z2.pageContext, q.value.shortcutsFunc);
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);
72
73
  if (e3) {
73
- let a2 = e3.apply(e3, [{ pageContext: z2.pageContext, configureObj: z2.configure }]);
74
+ let a2 = e3.apply(e3, [{ pageContext: S.pageContext, configureObj: S.configure }]);
74
75
  if (a2) {
75
- Array.isArray(a2) || (a2 = [a2]), G.value || (G.value = []);
76
- for (let e4 of a2) e4.text && e4.value && G.value.push(e4);
76
+ Array.isArray(a2) || (a2 = [a2]), K.value || (K.value = []);
77
+ for (let e4 of a2) e4.text && e4.value && K.value.push(e4);
77
78
  }
78
79
  }
79
80
  }
80
- return (e3, a2) => {
81
- const l2 = r("el-time-picker"), t2 = r("el-date-picker"), o2 = r("el-form-item");
82
- return n(), u(o2, { ref_key: "formItemRef", ref: N, required: q.value.required, class: p(s(A)), "label-width": q.value.labelWidth, style: i(s(w)) }, { label: c(() => [q.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: W, style: i({ ...s(D), ...s($) }) }, [q.value.prefixType ? (n(), u(Y, { key: 0, pageContext: e3.pageContext, property: q.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(q.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == q.value.dateType || "timerange" == q.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: U, "is-range": "timerange" == q.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: q.value.clearable, disabled: "disabled" === q.value.state, readonly: "readonly" === q.value.state, size: q.value.size, placeholder: q.value.placeholder, "start-placeholder": q.value.placeholder, "end-placeholder": q.value.endPlaceholder ? q.value.endPlaceholder : q.value.placeholder, "unlink-panels": true, format: q.value.format, "value-format": q.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => O.value = e4), shortcuts: G.value, type: q.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: U, clearable: q.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === q.value.state, readonly: "readonly" === q.value.state, size: q.value.size, placeholder: q.value.placeholder, "start-placeholder": q.value.placeholder, "end-placeholder": q.value.endPlaceholder ? q.value.endPlaceholder : q.value.placeholder, format: q.value.format, "value-format": q.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => O.value = e4), shortcuts: G.value, type: q.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"]);
81
+ return P2({ addRequiredClass: function() {
82
+ w.value = z();
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"]);
83
86
  };
84
87
  } });
85
88
  export {
86
- z as default
89
+ P as default
87
90
  };
@@ -1,51 +1,54 @@
1
- import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as p, watch as i, resolveComponent as n, createBlock as a, openBlock as r, normalizeStyle as u, normalizeClass as s, unref as d, withCtx as f, createVNode as c, createElementBlock as m, createCommentVNode as g, Fragment as v, createTextVNode as y, toDisplayString as x } from "vue";
1
+ import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as i, watch as n, resolveComponent as p, createBlock as a, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d, withCtx as f, createVNode as c, createElementBlock as m, createCommentVNode as g, Fragment as v, createTextVNode as y, toDisplayString as x } from "vue";
2
2
  import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
3
3
  import { handleAfterInitEvent as S, handleFormEvent as h } from "../../../../utils/events/event-util.js";
4
4
  import F from "../common/title-suffix-element.vue.js";
5
5
  import { $t as b } from "../../../../utils/i18n-util.js";
6
- import { setVariableValue as k, getVariableValue as R, getValueFromVariable as _ } from "../../../../utils/page-helper-util.js";
7
- const j = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
- const j2 = e2, I = t([]), T = j2.pageContext.entity ? j2.pageContext.entity : {};
9
- T.data || (T.data = {});
10
- const w = T.data, z = T.page;
11
- let q = C(j2.pageContext, j2.configure);
12
- const M = q.length > 0 ? q[q.length - 1] : j2.configure.uuid, O = j2.configure.runtime ? j2.configure.runtime : {}, $ = t(O.props ? O.props : {}), D = O.style, E = O.class, V = O.headerStyle, W = O.titleExceedStyle;
13
- O.props.deptScope && ("field" == O.props.deptScope && O.props.deptScopeField ? (N(), function(e3, t2) {
6
+ import { setVariableValue as k, getVariableValue as R, getValueFromVariable as j } from "../../../../utils/page-helper-util.js";
7
+ import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
8
+ const I = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: I2 }) {
9
+ const T = e2, q = t(null), w = t([]), z = T.pageContext.entity ? T.pageContext.entity : {};
10
+ z.data || (z.data = {});
11
+ const M = z.data, O = z.page;
12
+ let $ = C(T.pageContext, T.configure);
13
+ const D = $.length > 0 ? $[$.length - 1] : T.configure.uuid, E = T.configure.runtime ? T.configure.runtime : {}, V = t(E.props ? E.props : {}), W = E.style, A = E.class, B = E.headerStyle, G = E.titleExceedStyle;
14
+ E.props.deptScope && ("field" == E.props.deptScope && E.props.deptScopeField ? (U(), function(e3, t2) {
14
15
  if (0 === e3.indexOf("${fixed.")) return;
15
16
  const l2 = e3.match(/\${(.*?)}/);
16
17
  if (!l2) return;
17
18
  const o2 = l2 ? l2[1].split(".") : [];
18
- o2 && o2.length > 0 && i(() => o2.reduce((e4, t3) => e4[t3], j2.pageContext.entity), (e4, l3) => {
19
+ o2 && o2.length > 0 && n(() => o2.reduce((e4, t3) => e4[t3], T.pageContext.entity), (e4, l3) => {
19
20
  t2(e4, l3);
20
21
  });
21
- }(O.props.deptScopeField, (e3, t2) => {
22
- N();
23
- })) : "depts" == O.props.deptScope && O.props.deptScopeCodes && (I.value = O.props.deptScopeCodes.split(",")));
24
- const A = t(null), B = t(null), G = t(null);
22
+ }(E.props.deptScopeField, (e3, t2) => {
23
+ U();
24
+ })) : "depts" == E.props.deptScope && E.props.deptScopeCodes && (w.value = E.props.deptScopeCodes.split(",")));
25
+ const H = t(null), J = t(null), K = t(null);
25
26
  l(() => {
26
27
  o(() => {
27
- const e3 = w ? w[M] : null;
28
- S(e3, j2.pageContext, j2.configure, { formItemRef: A.value, componentRef: B.value, titleRef: G.value, value: e3, entity: j2.pageContext.entity.data, pageData: j2.pageContext.entity.page });
28
+ const e3 = M ? M[D] : null;
29
+ S(e3, T.pageContext, T.configure, { formItemRef: H.value, componentRef: J.value, titleRef: K.value, value: e3, entity: T.pageContext.entity.data, pageData: T.pageContext.entity.page });
29
30
  });
30
31
  });
31
- const H = p({ get: () => R(T, q), set(e3) {
32
- k(T, q, e3);
33
- } }), J = $.value.autoSetFields ? $.value.autoSetFields : [];
34
- function K(e3, t2) {
35
- e3 === M && h(t2, j2.pageContext, j2.configure, "change");
32
+ const L = i({ get: () => R(z, $), set(e3) {
33
+ k(z, $, e3), null != e3 && (q.value = "");
34
+ } }), N = V.value.autoSetFields ? V.value.autoSetFields : [];
35
+ function P(e3, t2) {
36
+ e3 === D && h(t2, T.pageContext, T.configure, "change");
36
37
  }
37
- function L() {
38
- h(null, j2.pageContext, j2.configure, "click");
38
+ function Q() {
39
+ h(null, T.pageContext, T.configure, "click");
39
40
  }
40
- function N() {
41
- const e3 = _(j2.pageContext.entity, O.props.deptScopeField);
42
- I.value = e3 ? e3.split(",") : [];
41
+ function U() {
42
+ const e3 = j(T.pageContext.entity, E.props.deptScopeField);
43
+ w.value = e3 ? e3.split(",") : [];
43
44
  }
44
- return (e3, t2) => {
45
- const l2 = n("OrganizationInput"), o2 = n("el-form-item");
46
- return r(), a(o2, { ref_key: "formItemRef", ref: A, required: $.value.required, class: s(d(E)), "label-width": $.value.labelWidth, style: u(d(D)) }, { label: f(() => [$.value.tittleShow ? (r(), m("div", { key: 0, ref_key: "titleRef", ref: G, style: u({ ...d(V), ...d(W) }) }, [$.value.prefixType ? (r(), a(F, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (r(), m(v, { key: 1 }, [y(x(d(b)($.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [c(l2, { ref_key: "componentRef", ref: B, disabled: "disabled" == $.value.state, multiple: $.value.multiple, treeType: $.value.treeType, value: H.value, models: d(w), departmentInfo: I.value, limitFilterColumn: $.value.limitFilterColumn, pageModels: d(z), fields: d(J), size: $.value.size, separator: $.value.separator, onSetValue: K, onShowTree: L }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
45
+ return I2({ addRequiredClass: function() {
46
+ q.value = _();
47
+ } }), (e3, t2) => {
48
+ const l2 = p("OrganizationInput"), o2 = p("el-form-item");
49
+ return u(), a(o2, { ref_key: "formItemRef", ref: H, required: V.value.required, class: s(d(A) + (q.value ? " " + q.value : "")), "label-width": V.value.labelWidth, style: r(d(W)) }, { label: f(() => [V.value.tittleShow ? (u(), m("div", { key: 0, ref_key: "titleRef", ref: K, style: r({ ...d(B), ...d(G) }) }, [V.value.prefixType ? (u(), a(F, { key: 0, pageContext: e3.pageContext, property: V.value }, null, 8, ["pageContext", "property"])) : (u(), m(v, { key: 1 }, [y(x(d(b)(V.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [c(l2, { ref_key: "componentRef", ref: J, disabled: "disabled" == V.value.state, multiple: V.value.multiple, treeType: V.value.treeType, value: L.value, models: d(M), departmentInfo: w.value, limitFilterColumn: V.value.limitFilterColumn, pageModels: d(O), fields: d(N), size: V.value.size, separator: V.value.separator, onSetValue: P, onShowTree: Q }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "size", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
47
50
  };
48
51
  } });
49
52
  export {
50
- j as default
53
+ I as default
51
54
  };
@@ -5,65 +5,68 @@ import b from "agilebuilder-ui/src/utils/request";
5
5
  import { FsUploadNew as w } from "agilebuilder-ui";
6
6
  import x from "../../../../utils/eventBus.js";
7
7
  import { $t as k } from "../../../../utils/i18n-util.js";
8
- const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
9
- const P2 = e2, _ = P2.configure.runtime ? P2.configure.runtime : {}, j = l(_.props ? _.props : {}), N = _.style, R = _.class, T = _.headerStyle, z = _.titleExceedStyle, D = P2.pageContext.entity ? P2.pageContext.entity : {}, I = P2.configure.props.base ? P2.configure.props.base : {}, O = G(I.prop), S = G(I.propName);
10
- O && O.length > 1 && t(() => P2.pageContext.entity[O[0]][O[1]], (e3) => {
11
- A(h(D, O));
8
+ import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
9
+ const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
10
+ const j = e2, N = l(null), R = j.configure.runtime ? j.configure.runtime : {}, T = l(R.props ? R.props : {}), z = R.style, D = R.class, I = R.headerStyle, O = R.titleExceedStyle, S = j.pageContext.entity ? j.pageContext.entity : {}, q = j.configure.props.base ? j.configure.props.base : {}, F = K(q.prop), U = K(q.propName);
11
+ F && F.length > 1 && t(() => j.pageContext.entity[F[0]][F[1]], (e3) => {
12
+ J(h(S, F));
12
13
  });
13
- const F = P2.pageContext.code, q = l(O ? F + "__" + O.join("__") : null), U = h(D, O), $ = l(null), W = l(false), B = l([]), E = l({});
14
- function A(e3) {
14
+ const $ = j.pageContext.code, W = l(F ? $ + "__" + F.join("__") : null), B = h(S, F), E = l(null), A = l(false), G = l([]), H = l({});
15
+ function J(e3) {
15
16
  if (e3) {
16
17
  const l2 = e3.split(",");
17
18
  if (l2.length > 0) {
18
- const e4 = P2.pageContext.backendUrl;
19
+ const e4 = j.pageContext.backendUrl;
19
20
  b.post(e4 + "/common/fs-upload/search-file-names", l2).then((e5) => {
20
- B.value = [];
21
+ G.value = [];
21
22
  const t2 = [];
22
23
  for (let o2 = 0; o2 < l2.length; o2++) {
23
24
  const a2 = l2[o2];
24
- t2.push(e5[a2]), B.value.push({ showName: e5[a2], serverPath: a2 });
25
+ t2.push(e5[a2]), G.value.push({ showName: e5[a2], serverPath: a2 });
25
26
  }
26
- "input" === j.value.displayType && (E.value.showName = t2.join(","), E.value.serverPath = l2.join(","));
27
+ "input" === T.value.displayType && (H.value.showName = t2.join(","), H.value.serverPath = l2.join(","));
27
28
  }).finally(() => {
28
- W.value = true;
29
+ A.value = true;
29
30
  });
30
- } else W.value = true;
31
- } else B.value = [], E.value = {}, W.value = true;
31
+ } else A.value = true;
32
+ } else G.value = [], H.value = {}, A.value = true;
32
33
  }
33
- function G(e3) {
34
+ function K(e3) {
34
35
  return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
35
36
  }
36
- function H(e3) {
37
+ function L(e3) {
37
38
  return C(e3);
38
39
  }
39
- A(U);
40
- const J = (e3, l2, t2) => {
41
- L();
42
- }, K = (e3) => {
43
- L();
44
- }, L = () => {
40
+ J(B);
41
+ const M = (e3, l2, t2) => {
42
+ V();
43
+ }, Q = (e3) => {
44
+ V();
45
+ }, V = () => {
45
46
  const e3 = [], l2 = [];
46
- if (j.value.limit && B.value.length > j.value.limit) {
47
- const e4 = B.value.length - j.value.limit;
48
- for (let l3 = 0; l3 < e4; l3++) B.value.shift();
47
+ if (T.value.limit && G.value.length > T.value.limit) {
48
+ const e4 = G.value.length - T.value.limit;
49
+ for (let l3 = 0; l3 < e4; l3++) G.value.shift();
49
50
  }
50
- for (let t2 = 0; t2 < B.value.length; t2++) e3.push(B.value[t2].showName), l2.push(B.value[t2].serverPath);
51
- y(P2.pageContext.entity, O, l2.join(",")), y(P2.pageContext.entity, S, e3.join(","));
52
- }, M = l(null), Q = l(null);
51
+ for (let t2 = 0; t2 < G.value.length; t2++) e3.push(G.value[t2].showName), l2.push(G.value[t2].serverPath);
52
+ y(j.pageContext.entity, F, l2.join(",")), y(j.pageContext.entity, U, e3.join(",")), l2.length > 0 && (N.value = "");
53
+ }, X = l(null), Y = l(null);
53
54
  return o(() => {
54
- x.$on(q.value + "-pickFileDone", (e3) => {
55
- q.value, $.value.pickFileDone(e3);
55
+ x.$on(W.value + "-pickFileDone", (e3) => {
56
+ E.value.pickFileDone(e3);
56
57
  }), a(() => {
57
- const e3 = h(D, O), l2 = { showName: h(D, S), serverPath: e3 };
58
- g(l2, P2.pageContext, P2.configure, { formItemRef: M.value, componentRef: $.value, titleRef: Q.value, value: l2, entity: P2.pageContext.entity.data, pageData: P2.pageContext.entity.page });
58
+ const e3 = h(S, F), l2 = { showName: h(S, U), serverPath: e3 };
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 });
59
60
  });
60
61
  }), i(() => {
61
- x.$off(q.value + "-pickFileDone");
62
- }), (e3, l2) => {
62
+ x.$off(W.value + "-pickFileDone");
63
+ }), _2({ addRequiredClass: function() {
64
+ N.value = P();
65
+ } }), (e3, l2) => {
63
66
  const t2 = n("el-form-item");
64
- return j.value.tittleShow ? (p(), s(t2, { key: 0, ref_key: "formItemRef", ref: M, required: j.value.required, class: d(v(R)), "label-width": j.value.labelWidth, style: r(v(N)) }, { label: m(() => [j.value.tittleShow ? (p(), f("div", { key: 0, ref_key: "titleRef", ref: Q, style: r({ ...v(T), ...v(z) }) }, c(v(k)(j.value.title)), 5)) : u("", true)]), default: m(() => [W.value ? (p(), s(v(w), { key: 0, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, "disabled-no-preview": j.value.disabledNoPreview, "disabled-no-download": j.value.disabledNoDownload, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : W.value ? (p(), s(v(w), { key: 1, ref_key: "fileUploadRef", ref: $, style: { width: "100%" }, disabled: "disabled" === j.value.state, displayType: j.value.displayType, accept: j.value.accept, multiple: j.value.multiple, placeholder: j.value.placeholder, limit: j.value.limit, "limit-file-size": j.value.limitFileSize, "disabled-no-preview": j.value.disabledNoPreview, "disabled-no-download": j.value.disabledNoDownload, openCameraOrChoosePhoto: j.value.openCameraOrChoosePhoto, "file-info": E.value, "file-list": B.value, "system-code": e3.pageContext.systemCode, componentId: q.value, "on-success": J, "on-remove": K, "before-upload": H, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
67
+ return T.value.tittleShow ? (p(), s(t2, { key: 0, ref_key: "formItemRef", ref: X, required: T.value.required, class: d(v(D) + (N.value ? " " + N.value : "")), "label-width": T.value.labelWidth, style: r(v(z)) }, { label: m(() => [T.value.tittleShow ? (p(), f("div", { key: 0, ref_key: "titleRef", ref: Y, style: r({ ...v(I), ...v(O) }) }, c(v(k)(T.value.title)), 5)) : u("", true)]), default: m(() => [A.value ? (p(), s(v(w), { key: 0, ref_key: "fileUploadRef", ref: E, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": H.value, "file-list": G.value, "system-code": e3.pageContext.systemCode, componentId: W.value, "on-success": M, "on-remove": Q, "before-upload": L, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : A.value ? (p(), s(v(w), { key: 1, ref_key: "fileUploadRef", ref: E, style: { width: "100%" }, disabled: "disabled" === T.value.state, displayType: T.value.displayType, accept: T.value.accept, multiple: T.value.multiple, placeholder: T.value.placeholder, limit: T.value.limit, "limit-file-size": T.value.limitFileSize, "disabled-no-preview": T.value.disabledNoPreview, "disabled-no-download": T.value.disabledNoDownload, openCameraOrChoosePhoto: T.value.openCameraOrChoosePhoto, "file-info": H.value, "file-list": G.value, "system-code": e3.pageContext.systemCode, componentId: W.value, "on-success": M, "on-remove": Q, "before-upload": L, pageContext: e3.pageContext }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "file-info", "file-list", "system-code", "componentId", "pageContext"])) : u("", true);
65
68
  };
66
69
  } });
67
70
  export {
68
- P as default
71
+ _ as default
69
72
  };
@@ -1,25 +1,28 @@
1
- import { defineComponent as e, computed as t, ref as l, onMounted as o, nextTick as a, resolveComponent as n, createBlock as u, openBlock as r, normalizeStyle as i, normalizeClass as p, unref as s, withCtx as m, createVNode as f, createElementBlock as c, createCommentVNode as d, Fragment as g, createTextVNode as v, toDisplayString as y } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as a, resolveComponent as n, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as m, createVNode as f, createElementBlock as c, createCommentVNode as d, Fragment as v, createTextVNode as g, toDisplayString as y } from "vue";
2
2
  import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
3
3
  import { setVariableValue as C, getVariableValue as h } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as b, handleFormEvent as k } from "../../../../utils/events/event-util.js";
5
- import R from "../common/title-suffix-element.vue.js";
6
- import { $t as _ } from "../../../../utils/i18n-util.js";
7
- const j = e({ __name: "input-number-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
8
- const j2 = e2, w = j2.pageContext.entity ? j2.pageContext.entity : {};
9
- let q = x(j2.pageContext, j2.configure);
10
- const z = t({ get: () => h(w, q), set(e3) {
11
- C(w, q, e3);
12
- } }), S = j2.configure.runtime ? j2.configure.runtime : {}, V = S.style, B = S.class, I = S.headerStyle, D = S.titleExceedStyle, E = l(S.props ? S.props : {}), F = l(null), T = l(null), U = l(null);
4
+ import { handleAfterInitEvent as b, handleFormEvent as R } from "../../../../utils/events/event-util.js";
5
+ import j from "../common/title-suffix-element.vue.js";
6
+ import { $t as k } from "../../../../utils/i18n-util.js";
7
+ import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
8
+ const q = e({ __name: "input-number-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
9
+ const w = e2, z = t(null), S = w.pageContext.entity ? w.pageContext.entity : {};
10
+ let V = x(w.pageContext, w.configure);
11
+ const B = l({ get: () => h(S, V), set(e3) {
12
+ C(S, V, e3), null != e3 && (z.value = "");
13
+ } }), I = w.configure.runtime ? w.configure.runtime : {}, D = I.style, E = I.class, F = I.headerStyle, T = I.titleExceedStyle, U = t(I.props ? I.props : {}), W = t(null), A = t(null), G = t(null);
13
14
  return o(() => {
14
15
  a(() => {
15
- const e3 = z.value;
16
- b(e3, j2.pageContext, j2.configure, { formItemRef: F.value, componentRef: T.value, titleRef: U.value, value: e3, entity: j2.pageContext.entity.data, pageData: j2.pageContext.entity.page });
16
+ const e3 = B.value;
17
+ b(e3, w.pageContext, w.configure, { formItemRef: W.value, componentRef: A.value, titleRef: G.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
17
18
  });
18
- }), (e3, t2) => {
19
+ }), q2({ addRequiredClass: function() {
20
+ z.value = _();
21
+ } }), (e3, t2) => {
19
22
  const l2 = n("el-input-number"), o2 = n("el-form-item");
20
- return r(), u(o2, { ref_key: "formItemRef", ref: F, required: E.value.required, class: p(s(B)), "label-width": E.value.labelWidth, style: i(s(V)) }, { label: m(() => [E.value.tittleShow ? (r(), c("div", { key: 0, ref_key: "titleRef", ref: U, style: i({ ...s(I), ...s(D) }) }, [E.value.prefixType ? (r(), u(R, { key: 0, pageContext: e3.pageContext, property: E.value }, null, 8, ["pageContext", "property"])) : (r(), c(g, { key: 1 }, [v(y(s(_)(E.value.title)), 1)], 64))], 4)) : d("", true)]), default: m(() => [f(l2, { ref_key: "componentRef", ref: T, disabled: "disabled" === E.value.state, readonly: "readonly" === E.value.state, controls: E.value.showButton, size: E.value.size, placeholder: E.value.placeholder, modelValue: z.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => z.value = e4), precision: E.value.precision, step: E.value.step, min: E.value.min, max: E.value.max, onChange: t2[1] || (t2[1] = (t3) => s(k)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[2] || (t2[2] = (t3) => s(k)(t3, e3.pageContext, e3.configure, "blur")), onFocus: t2[3] || (t2[3] = (t3) => s(k)(t3, e3.pageContext, e3.configure, "focus")) }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
23
+ return i(), u(o2, { ref_key: "formItemRef", ref: W, required: U.value.required, class: s(p(E) + (z.value ? " " + z.value : "")), "label-width": U.value.labelWidth, style: r(p(D)) }, { label: m(() => [U.value.tittleShow ? (i(), c("div", { key: 0, ref_key: "titleRef", ref: G, style: r({ ...p(F), ...p(T) }) }, [U.value.prefixType ? (i(), u(j, { key: 0, pageContext: e3.pageContext, property: U.value }, null, 8, ["pageContext", "property"])) : (i(), c(v, { key: 1 }, [g(y(p(k)(U.value.title)), 1)], 64))], 4)) : d("", true)]), default: m(() => [f(l2, { ref_key: "componentRef", ref: A, disabled: "disabled" === U.value.state, readonly: "readonly" === U.value.state, controls: U.value.showButton, size: U.value.size, placeholder: U.value.placeholder, modelValue: B.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => B.value = e4), precision: U.value.precision, step: U.value.step, min: U.value.min, max: U.value.max, onChange: t2[1] || (t2[1] = (t3) => p(R)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[2] || (t2[2] = (t3) => p(R)(t3, e3.pageContext, e3.configure, "blur")), onFocus: t2[3] || (t2[3] = (t3) => p(R)(t3, e3.pageContext, e3.configure, "focus")) }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
21
24
  };
22
25
  } });
23
26
  export {
24
- j as default
27
+ q as default
25
28
  };
@@ -1,79 +1,81 @@
1
- import { defineComponent as e, ref as t, computed as n, onMounted as o, nextTick as l, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as d, createTextVNode as m, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as n, nextTick as o, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as s, normalizeClass as c, unref as v, withCtx as f, createVNode as y, createCommentVNode as g, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
2
2
  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 O, analysisScanValue as R, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
6
+ import { formatScanRuleSets as R, analysisScanValue as O, setScanAnalysisValue as q } from "../../../../utils/form/scan-util.js";
7
7
  import D from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as J } from "agilebuilder-ui/src/utils/common-util";
9
- import M from "../../../../utils/eventBus.js";
8
+ import { isMobileBrowser as M } from "agilebuilder-ui/src/utils/common-util";
9
+ import N from "../../../../utils/eventBus.js";
10
10
  import { $t as P } from "../../../../utils/i18n-util.js";
11
- const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
11
+ import { addRequiredClassUtil as z } from "../../../../utils/common-util.js";
12
+ const J = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: J2 }) {
12
13
  var _a, _b, _c;
13
- const z = e2, L = z.pageContext.entity ? z.pageContext.entity : {}, B = t("text");
14
- let F = k(z.pageContext, z.configure);
15
- if (z.pageContext.modelFieldsMap) {
16
- const e3 = w(F, z.pageContext);
17
- e3 && (B.value = V(e3.dataType) ? "number" : "text");
14
+ const L = e2, B = L.pageContext.entity ? L.pageContext.entity : {}, F = t("text");
15
+ let $ = k(L.pageContext, L.configure);
16
+ if (L.pageContext.modelFieldsMap) {
17
+ const e3 = w($, L.pageContext);
18
+ e3 && (F.value = V(e3.dataType) ? "number" : "text");
18
19
  }
19
- const $ = t(J()), A = z.pageContext.code, E = t(F && F.length > 0 ? A + "__" + F.join("__") : null), U = n({ get: () => b(L, F), set(e3) {
20
- h(L, F, e3);
21
- } }), W = t(null), G = t(null), H = t(null), K = z.configure.runtime ? z.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
22
- let Y = false;
23
- const Z = window.localStorage.getItem("auth_source");
24
- Z && "dingtalk" === Z && (Y = true);
25
- let ee = "";
26
- const te = navigator.userAgent;
27
- ee = te.indexOf(" uni-app ") > 0 ? "app" : "browser";
28
- const ne = !(!$.value || !ee || "app" !== ee), oe = t(!!((ne || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
29
- let le = {};
30
- ((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (O(Q.value.scan.ruleList).then((e3) => {
31
- le = e3;
32
- }), u(() => U.value, (e3) => {
20
+ const A = t(M()), E = L.pageContext.code, U = t($ && $.length > 0 ? E + "__" + $.join("__") : null), W = t(null), G = l({ get: () => b(B, $), set(e3) {
21
+ h(B, $, e3), null != e3 && "" !== e3 && (W.value = "");
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
+ let ee = false;
24
+ const te = window.localStorage.getItem("auth_source");
25
+ te && "dingtalk" === te && (ee = true);
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 = {};
30
+ ((_b = Y.value.scan) == null ? void 0 : _b.enable) && ((_c = Y.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Y.value.scan.ruleList).then((e3) => {
31
+ ae = e3;
32
+ }), u(() => G.value, (e3) => {
33
33
  e3 = e3.trim();
34
- const t2 = R(e3, le);
35
- t2 && N(z.pageContext, t2.scanSet, t2.params);
34
+ const t2 = O(e3, ae);
35
+ t2 && q(L.pageContext, t2.scanSet, t2.params);
36
36
  }));
37
- const ae = K.style, ue = K.class, ie = K.headerStyle, re = K.titleExceedStyle;
38
- function pe(e3) {
39
- return h(L, F, e3);
37
+ const ue = X.style, ie = X.class, re = X.headerStyle, pe = X.titleExceedStyle;
38
+ function se(e3) {
39
+ return h(B, $, e3);
40
40
  }
41
- o(() => {
42
- M.$on(E.value + "-scanDone", (e3) => {
43
- E.value, JSON.stringify(e3), pe(e3.result), _(e3.result, z.pageContext, z.configure, "afterScanDone");
44
- }), l(() => {
41
+ n(() => {
42
+ N.$on(U.value + "-scanDone", (e3) => {
43
+ se(e3.result), _(e3.result, L.pageContext, L.configure, "afterScanDone");
44
+ }), o(() => {
45
45
  var _a2;
46
- const e3 = U.value;
47
- S(e3, z.pageContext, z.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page }), oe.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && ce();
46
+ 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
48
  });
49
49
  }), a(() => {
50
- M.$off(E.value + "-scanDone");
50
+ N.$off(U.value + "-scanDone");
51
51
  });
52
- const se = t(false);
53
- function ce() {
54
- if (ne || Y) {
55
- const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
56
- Y && (e3.type = "dingTalkScan"), window.parent.parent ? (window.parent.parent, window.parent.parent.postMessage(JSON.stringify(e3), "*")) : window.parent && (window.parent, window.parent.postMessage(JSON.stringify(e3), "*"));
57
- } else if ($.value) if ("https:" === window.location.protocol) se.value = true;
52
+ const ce = t(false);
53
+ function ve() {
54
+ if (ne || ee) {
55
+ 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;
58
58
  else {
59
- const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
59
+ const e3 = { type: "scan", componentId: U.value, systemCode: L.pageContext.systemCode };
60
60
  window.parent.postMessage(JSON.stringify(e3), "*");
61
61
  }
62
- else se.value = true;
62
+ else ce.value = true;
63
63
  }
64
- function ve(e3) {
65
- se.value = false, pe(e3);
64
+ function fe(e3) {
65
+ ce.value = false, se(e3);
66
66
  }
67
- return q2({ getValue: function() {
68
- return b(L, F);
69
- }, setValue: pe, scanClick: ce }), (e3, t2) => {
70
- const n2 = i("el-input"), o2 = i("scan-code-input-browser"), l2 = i("el-form-item");
71
- return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(v(ue)), "label-width": Q.value.labelWidth, style: s(v(ae)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...v(ie), ...v(re) }) }, [Q.value.prefixType ? (p(), r(D, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [m(x(v(P)(Q.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [y(n2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: B.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.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) {
72
- let t3 = b(L, F);
73
- null != t3 && (t3 = t3.trim()), h(L, F, t3), _(e5, z.pageContext, z.configure, "blur");
74
- }(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")) }, d({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: f(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "2" } : void 0, oe.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.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) => ce()) })) : g("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : g("", true), m(" " + x(v(P)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), se.value ? (p(), r(o2, { key: 0, onClose: ve })) : g("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
67
+ return J2({ getValue: function() {
68
+ return b(B, $);
69
+ }, setValue: se, scanClick: ve, addRequiredClass: function() {
70
+ W.value = z();
71
+ } }), (e3, t2) => {
72
+ 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
+ let t3 = b(B, $);
75
+ 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"]);
75
77
  };
76
78
  } });
77
79
  export {
78
- q as default
80
+ J as default
79
81
  };