super-page-runtime 2.3.4-sit1 → 2.3.5-rc1

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 (43) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +35 -27
  2. package/dist/es/components/runtime/utils/common-util.d.ts +1 -1
  3. package/dist/es/components/runtime/utils/common-util.js +62 -47
  4. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  5. package/dist/es/components/runtime/utils/events/print-label.js +26 -25
  6. package/dist/es/components/runtime/utils/events/standard-event.js +21 -19
  7. package/dist/es/components/runtime/utils/events/validator-util.js +23 -23
  8. package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -1
  9. package/dist/es/components/runtime/utils/page-init-util.js +60 -48
  10. package/dist/es/components/runtime/utils/page-store.js +10 -10
  11. package/dist/es/components/runtime/utils/table-utils.d.ts +14 -0
  12. package/dist/es/components/runtime/utils/table-utils.js +57 -32
  13. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
  14. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
  15. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +20 -20
  16. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +8 -1
  17. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +15 -10
  18. package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +6 -6
  19. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +3 -2
  20. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +8 -4
  21. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -25
  22. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
  23. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
  24. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -9
  25. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +48 -48
  26. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +24 -15
  27. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -1
  28. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +29 -29
  29. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +23 -22
  30. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
  31. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
  32. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +50 -49
  33. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +5 -3
  34. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +1 -0
  35. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +1 -0
  36. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +69 -67
  37. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  38. package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
  39. package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -2
  40. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  41. package/dist/es/components/runtime/views/super-page.vue2.js +12 -11
  42. package/dist/es/style.css +82 -82
  43. package/package.json +2 -2
@@ -7,27 +7,27 @@ import Y from "../common/title-suffix-element.vue.js";
7
7
  import R from "dayjs";
8
8
  import { $t as _ } from "../../../../utils/i18n-util.js";
9
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, q = S.titleExceedStyle, I = a(S.props ? S.props : {});
11
- let M = h(z2.pageContext, z2.configure, I.value.prop);
12
- if (z2.pageContext.modelFieldsMap && M && M.length > 0 && "data" === M[0]) {
13
- const e3 = C(M, z2.pageContext);
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);
14
14
  e3 && function(e4) {
15
15
  const a2 = e4.dataType;
16
- k(a2) && ("year" === I.value.dateType && "YYYY" === I.value.valueFormat || "month" === I.value.dateType && "YYYY-MM" === I.value.valueFormat) && (I.value.valueFormat = "x");
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
17
  }(e3);
18
18
  }
19
- let B = null, N = false;
20
- if (I.value.dateType && I.value.dateType.includes("range")) {
21
- N = true;
22
- let e3 = I.value.prop2;
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
23
  e3 && e3.startsWith("${") || (e3 = "${page." + z2.configure.uuid + "-2}");
24
24
  const a2 = x(P, e3, null);
25
- if (e3 = e3.substring(2, e3.length - 1), B = e3.split("."), !(a2 || P.data && (P.data.id || P.data.ID)) && I.value.defaultValue2) {
26
- const e4 = x(P, I.value.defaultValue2);
27
- b(P, B, e4);
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);
28
28
  }
29
29
  }
30
- const U = a(null), W = a(null), $ = a(null);
30
+ const N = a(null), U = a(null), W = a(null);
31
31
  function E(e3, a2) {
32
32
  if (!e3) return e3;
33
33
  if (a2) {
@@ -37,7 +37,7 @@ const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
37
37
  let t2 = null;
38
38
  return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
39
39
  } catch (a3) {
40
- return e3;
40
+ return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${q.value.valueFormat}`), e3;
41
41
  }
42
42
  }
43
43
  return e3;
@@ -45,30 +45,30 @@ const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
45
45
  if (l(() => {
46
46
  t(() => {
47
47
  const e3 = O.value;
48
- T(e3, z2.pageContext, z2.configure, { formItemRef: U.value, componentRef: W.value, titleRef: $.value, value: e3, entity: z2.pageContext.entity.data, pageData: z2.pageContext.entity.page });
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 });
49
49
  });
50
- }), M) {
51
- const e3 = F(P, M), a2 = E(e3, I.value.valueFormat);
52
- e3 !== a2 && b(P, M, a2);
50
+ }), I) {
51
+ const e3 = F(P, I), a2 = E(e3, q.value.valueFormat);
52
+ e3 !== a2 && b(P, I, a2);
53
53
  }
54
- if (B) {
55
- const e3 = F(P, B), a2 = E(e3, I.value.valueFormat);
56
- e3 !== a2 && b(P, B, a2);
54
+ if (M) {
55
+ const e3 = F(P, M), a2 = E(e3, q.value.valueFormat);
56
+ e3 !== a2 && b(P, M, a2);
57
57
  }
58
58
  const O = o({ get() {
59
- if (N) {
59
+ if (B) {
60
60
  const e3 = [];
61
- let a2 = F(P, M);
62
- e3.push(E(a2, I.value.valueFormat));
63
- let l2 = F(P, B);
64
- return e3.push(E(l2, I.value.valueFormat)), 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;
65
65
  }
66
- return E(F(P, M), I.value.valueFormat);
66
+ return E(F(P, I), q.value.valueFormat);
67
67
  }, set(e3) {
68
- N ? Array.isArray(e3) ? (b(P, M, e3[0]), b(P, B, e3[1])) : null === e3 && (b(P, M, null), b(P, B, null)) : b(P, M, e3);
69
- } }), G = a(y(I.value.dateScopeDetails, I.value.sourceType, I.value.dateType));
70
- if (I.value.shortcutsFunc) {
71
- const e3 = V(z2.pageContext, I.value.shortcutsFunc);
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);
72
72
  if (e3) {
73
73
  let a2 = e3.apply(e3, [{ pageContext: z2.pageContext, configureObj: z2.configure }]);
74
74
  if (a2) {
@@ -79,7 +79,7 @@ const z = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
79
79
  }
80
80
  return (e3, a2) => {
81
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: U, required: I.value.required, class: p(s(A)), "label-width": I.value.labelWidth, style: i(s(w)) }, { label: c(() => [I.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: $, style: i({ ...s(D), ...s(q) }) }, [I.value.prefixType ? (n(), u(Y, { key: 0, pageContext: e3.pageContext, property: I.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(s(_)(I.value.title)), 1)], 64))], 4)) : v("", true)]), default: c(() => ["time" == I.value.dateType || "timerange" == I.value.dateType ? (n(), u(l2, { key: 0, ref_key: "componentRef", ref: W, "is-range": "timerange" == I.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: I.value.clearable, disabled: "disabled" === I.value.state, readonly: "readonly" === I.value.state, size: I.value.size, placeholder: I.value.placeholder, "start-placeholder": I.value.placeholder, "end-placeholder": I.value.endPlaceholder ? I.value.endPlaceholder : I.value.placeholder, "unlink-panels": true, format: I.value.format, "value-format": I.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => O.value = e4), shortcuts: G.value, type: I.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: W, clearable: I.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === I.value.state, readonly: "readonly" === I.value.state, size: I.value.size, placeholder: I.value.placeholder, "start-placeholder": I.value.placeholder, "end-placeholder": I.value.endPlaceholder ? I.value.endPlaceholder : I.value.placeholder, format: I.value.format, "value-format": I.value.valueFormat, modelValue: O.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => O.value = e4), shortcuts: G.value, type: I.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"]);
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"]);
83
83
  };
84
84
  } });
85
85
  export {
@@ -52,7 +52,7 @@ const P = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
52
52
  }, M = l(null), Q = l(null);
53
53
  return o(() => {
54
54
  x.$on(q.value + "-pickFileDone", (e3) => {
55
- $.value.pickFileDone(e3);
55
+ q.value, $.value.pickFileDone(e3);
56
56
  }), a(() => {
57
57
  const e3 = h(D, O), l2 = { showName: h(D, S), serverPath: e3 };
58
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 });
@@ -1,78 +1,79 @@
1
- import { defineComponent as e, ref as t, computed as o, onMounted as n, 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 f, withCtx as v, createVNode as g, createCommentVNode as y, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
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";
2
2
  import { SuperIcon as T } from "agilebuilder-ui";
3
3
  import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
4
- import { getModelFieldFromPageContext as w, isNumberDataType as V, setVariableValue as b, getVariableValue as h } from "../../../../utils/page-helper-util.js";
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 D } from "../../../../utils/form/scan-util.js";
7
- import M from "../common/title-suffix-element.vue.js";
8
- import { isMobileBrowser as N } from "agilebuilder-ui/src/utils/common-util";
9
- import P from "../../../../utils/eventBus.js";
10
- import { $t as q } from "../../../../utils/i18n-util.js";
11
- const z = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
6
+ import { formatScanRuleSets as O, analysisScanValue as R, setScanAnalysisValue as N } from "../../../../utils/form/scan-util.js";
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";
10
+ import { $t as P } from "../../../../utils/i18n-util.js";
11
+ const q = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
12
12
  var _a, _b, _c;
13
- const J = e2, L = J.pageContext.entity ? J.pageContext.entity : {}, B = t("text");
14
- let F = k(J.pageContext, J.configure);
15
- if (J.pageContext.modelFieldsMap) {
16
- const e3 = w(F, J.pageContext);
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
17
  e3 && (B.value = V(e3.dataType) ? "number" : "text");
18
18
  }
19
- const $ = t(N()), A = J.pageContext.code, E = t(F && F.length > 0 ? A + "__" + F.join("__") : null), U = o({ get: () => h(L, F), set(e3) {
20
- b(L, F, e3);
21
- } }), W = t(null), G = t(null), H = t(null), K = J.configure.runtime ? J.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
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
22
  let Y = false;
23
23
  const Z = window.localStorage.getItem("auth_source");
24
24
  Z && "dingtalk" === Z && (Y = true);
25
25
  let ee = "";
26
- ee = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
27
- const te = !(!$.value || !ee || "app" !== ee), oe = t(!!((te || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
28
- let ne = {};
29
- ((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Q.value.scan.ruleList).then((e3) => {
30
- ne = e3;
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;
31
32
  }), u(() => U.value, (e3) => {
32
33
  e3 = e3.trim();
33
- const t2 = O(e3, ne);
34
- t2 && D(J.pageContext, t2.scanSet, t2.params);
34
+ const t2 = R(e3, le);
35
+ t2 && N(z.pageContext, t2.scanSet, t2.params);
35
36
  }));
36
- const le = K.style, ae = K.class, ue = K.headerStyle, ie = K.titleExceedStyle;
37
- function re(e3) {
38
- return b(L, F, e3);
37
+ const ae = K.style, ue = K.class, ie = K.headerStyle, re = K.titleExceedStyle;
38
+ function pe(e3) {
39
+ return h(L, F, e3);
39
40
  }
40
- n(() => {
41
- P.$on(E.value + "-scanDone", (e3) => {
42
- re(e3.result), _(e3.result, J.pageContext, J.configure, "afterScanDone");
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");
43
44
  }), l(() => {
44
45
  var _a2;
45
46
  const e3 = U.value;
46
- S(e3, J.pageContext, J.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: J.pageContext.entity.data, pageData: J.pageContext.entity.page }), oe.value && ((_a2 = Q.value.scan) == null ? void 0 : _a2.autoOpen) && se();
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();
47
48
  });
48
49
  }), a(() => {
49
- P.$off(E.value + "-scanDone");
50
+ M.$off(E.value + "-scanDone");
50
51
  });
51
- const pe = t(false);
52
- function se() {
53
- if (te || Y) {
54
- const e3 = { type: "scan", componentId: E.value, systemCode: J.pageContext.systemCode };
55
- Y && (e3.type = "dingTalkScan"), window.parent.parent ? window.parent.parent.postMessage(JSON.stringify(e3), "*") : window.parent && window.parent.postMessage(JSON.stringify(e3), "*");
56
- } else if ($.value) if ("https:" === window.location.protocol) pe.value = true;
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;
57
58
  else {
58
- const e3 = { type: "scan", componentId: E.value, systemCode: J.pageContext.systemCode };
59
+ const e3 = { type: "scan", componentId: E.value, systemCode: z.pageContext.systemCode };
59
60
  window.parent.postMessage(JSON.stringify(e3), "*");
60
61
  }
61
- else pe.value = true;
62
+ else se.value = true;
62
63
  }
63
- function ce(e3) {
64
- pe.value = false, re(e3);
64
+ function ve(e3) {
65
+ se.value = false, pe(e3);
65
66
  }
66
- return z2({ getValue: function() {
67
- return h(L, F);
68
- }, setValue: re, scanClick: se }), (e3, t2) => {
69
- const o2 = i("el-input"), n2 = i("scan-code-input-browser"), l2 = i("el-form-item");
70
- return p(), r(l2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: c(f(ae)), "label-width": Q.value.labelWidth, style: s(f(le)) }, { label: v(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: s({ ...f(ue), ...f(ie) }) }, [Q.value.prefixType ? (p(), r(M, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(f(q)(Q.value.title)), 1)], 64))], 4)) : y("", true)]), default: v(() => [g(o2, { 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) => f(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (e4) => function(e5) {
71
- let t3 = h(L, F);
72
- (void 0 === J.configure.props.base.trimable || J.configure.props.base.trimable) && (t3 = t3.trim()), b(L, F, t3), _(e5, J.pageContext, J.configure, "blur");
73
- }(e4)), onFocus: t2[9] || (t2[9] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "click")), onClear: t2[11] || (t2[11] = (t3) => f(_)(t3, e3.pageContext, e3.configure, "clear")) }, m({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: v(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: v(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: v(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(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: v(() => [oe.value ? (p(), r(f(T), { key: 0, style: { cursor: "pointer" }, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => se()) })) : y("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(f(T), { key: 1, style: { cursor: "pointer" }, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => f(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(f(q)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), pe.value ? (p(), r(n2, { key: 0, onClose: ce })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
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
+ 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"]);
74
75
  };
75
76
  } });
76
77
  export {
77
- z as default
78
+ q as default
78
79
  };
@@ -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);
@@ -70,6 +70,7 @@ const R = { style: { width: "100%", height: "100%" } }, S = e({ __name: "richtex
70
70
  i2.src === e5 && (i2.src = t5.url + "&jwt=" + L());
71
71
  }
72
72
  }).catch((e6) => {
73
+ console.error(e6, "上传图片失败");
73
74
  });
74
75
  }
75
76
  }
@@ -1,126 +1,128 @@
1
- import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as s, onUnmounted as i, resolveDirective as r, withDirectives as u, createCommentVNode as l, unref as a, createBlock as p, openBlock as c, resolveDynamicComponent as g, normalizeClass as f, normalizeStyle as m, vShow as d, nextTick as C } from "vue";
2
- import v from "./error-render.vue.js";
3
- import { getRuntimeComponentByName as b } from "../../utils/assemblys-config.js";
4
- import { PageDimensions as x } from "../../utils/interfaces/page-design-types.js";
5
- import { addComponentRef as h, addComponentRefByCode as y } from "../../utils/global-refs.js";
6
- import { getPermissionCodes as w, packageFormRules as j, controlObjectRenderState as N } from "../../utils/page-init-util.js";
7
- import { caculateShowCondition as _, getFormPropName as L, getSizeConfig as O } from "../../utils/page-helper-util.js";
8
- import { isWorkflowPage as P, getPropClassName as S, isNumber as T } from "../../utils/common-util.js";
9
- import { isShowMobileEvent as $, isShowComponent as H } from "../../utils/events/event-util.js";
10
- import { usePageContextStore as M } from "../../utils/page-store.js";
1
+ import { defineComponent as e, ref as o, computed as t, markRaw as n, onMounted as i, onUnmounted as s, withDirectives as r, createCommentVNode as u, unref as l, createBlock as p, openBlock as a, resolveDynamicComponent as c, normalizeClass as g, normalizeStyle as f, vShow as m, nextTick as d } from "vue";
2
+ import C from "./error-render.vue.js";
3
+ import { getRuntimeComponentByName as v } from "../../utils/assemblys-config.js";
4
+ import { PageDimensions as b } from "../../utils/interfaces/page-design-types.js";
5
+ import { addComponentRef as x, addComponentRefByCode as h } from "../../utils/global-refs.js";
6
+ import { getPermissionCodes as y, packageFormRules as j, controlObjectRenderState as w } from "../../utils/page-init-util.js";
7
+ import { caculateShowCondition as N, getFormPropName as _, getSizeConfig as P } from "../../utils/page-helper-util.js";
8
+ import { isWorkflowPage as L, getPropClassName as O, isNumber as S } from "../../utils/common-util.js";
9
+ import { isShowMobileEvent as H, isShowComponent as T } from "../../utils/events/event-util.js";
10
+ import { usePageContextStore as $ } from "../../utils/page-store.js";
11
+ import { isHasFieldAuth as F } from "../../utils/table-utils.js";
12
+ import { checkPermission as M } from "agilebuilder-ui/src/utils/permission.js";
11
13
  const k = e({ __name: "object-render", props: { pageContext: {}, configure: {} }, setup(e2) {
12
14
  var _a, _b;
13
15
  const k2 = e2;
14
16
  null == k2.configure.style && (k2.configure.style = {});
15
- const B = w(k2.configure, k2.pageContext);
16
- k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.functionCode = B), j(k2.pageContext, k2.configure);
17
- let E = o(null), F = o(true), J = o("");
17
+ const A = y(k2.configure, k2.pageContext);
18
+ k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.functionCode = A);
19
+ const B = M(A || "true", k2.pageContext.systemCode), E = F(k2.pageContext, k2.configure), J = B && E;
20
+ k2.configure && k2.configure.props && k2.configure.props.base && (k2.configure.props.base.isHasFieldAuthPermission = J), j(k2.pageContext, k2.configure, J);
21
+ let R = o(null), W = o(true), q = o("");
18
22
  if (k2.configure && k2.configure.props) {
19
23
  let e3 = [];
20
- ((_a = k2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof k2.configure.props.base.showConditions ? JSON.parse(k2.configure.props.base.showConditions) : k2.configure.props.base.showConditions), F = t(() => {
24
+ ((_a = k2.configure.props.base) == null ? void 0 : _a.showConditions) && (e3 = "string" == typeof k2.configure.props.base.showConditions ? JSON.parse(k2.configure.props.base.showConditions) : k2.configure.props.base.showConditions), W = t(() => {
21
25
  var _a2;
22
26
  let o2 = true;
23
- if (E.value && null !== E.value) o2 = "show" === E.value;
24
- else if ($(k2.pageContext, k2.configure)) if (e3 && e3.length > 0) o2 = _(k2.pageContext, e3);
27
+ if (J) if (R.value && null !== R.value) o2 = "show" === R.value;
28
+ else if (H(k2.pageContext, k2.configure)) if (e3 && e3.length > 0) o2 = N(k2.pageContext, e3);
25
29
  else {
26
30
  const e4 = (_a2 = k2.configure.props.base) == null ? void 0 : _a2.state;
27
31
  e4 && "hidden" === e4 && (o2 = false);
28
32
  }
29
33
  else o2 = false;
34
+ else o2 = false;
30
35
  return o2;
31
36
  });
32
- if (k2.configure._dynamicShowFlag = F, (_b = k2.configure.props.base) == null ? void 0 : _b.editConditions) {
37
+ if (k2.configure._dynamicShowFlag = W, (_b = k2.configure.props.base) == null ? void 0 : _b.editConditions) {
33
38
  const e4 = k2.configure.props.base.editConditions;
34
39
  if (e4.length > 0) {
35
40
  const o2 = k2.configure.runtime ? k2.configure.runtime : {}, n2 = o2.props ? o2.props : {};
36
- if (n2.rawSate = n2.state, P(k2.pageContext) && k2.pageContext.fieldPermissionMap) {
41
+ if (n2.rawSate = n2.state, L(k2.pageContext) && k2.pageContext.fieldPermissionMap) {
37
42
  const e5 = k2.configure.props.base;
38
43
  if (e5 && e5.prop) {
39
44
  let o3 = e5.prop;
40
- o3 = L(o3);
45
+ o3 = _(o3);
41
46
  const t2 = k2.pageContext.fieldPermissionMap.get(o3);
42
- t2 && false === t2.canEdit && (J.value = "disabled");
47
+ t2 && false === t2.canEdit && (q.value = "disabled");
43
48
  }
44
49
  }
45
50
  n2.state = t({ get() {
46
- if ("disabled" === J.value) return J.value;
47
- return _(k2.pageContext, e4) ? "" : "disabled";
51
+ if ("disabled" === q.value) return q.value;
52
+ return N(k2.pageContext, e4) ? "" : "disabled";
48
53
  }, set() {
49
54
  } });
50
55
  }
51
56
  }
52
57
  }
53
- const R = o({});
54
- R.value = n(b(k2.configure.name));
55
- const W = o(true);
56
- null == R.value && (R.value = v, W.value = false);
57
- const q = o(null), z = o({}), A = o(""), D = S(k2.configure);
58
- D && (A.value = D);
59
- const G = k2.configure.runtime && k2.configure.runtime.common ? k2.configure.runtime.common : {};
60
- if (G.class && (A.value += " " + G.class), G.style) {
61
- Object.assign(z.value, G.style);
62
- const e3 = k2.pageContext && k2.pageContext.dimensions ? k2.pageContext.dimensions : x.PC, o2 = G.style[e3 + "_style"];
63
- o2 && Object.assign(z.value, o2);
64
- const t2 = G.style[e3 + "_class"];
65
- t2 && (A.value += " " + t2);
58
+ const z = o({});
59
+ z.value = n(v(k2.configure.name));
60
+ const D = o(true);
61
+ null == z.value && (z.value = C, D.value = false);
62
+ const G = o(null), I = o({}), K = o(""), Q = O(k2.configure);
63
+ Q && (K.value = Q);
64
+ const U = k2.configure.runtime && k2.configure.runtime.common ? k2.configure.runtime.common : {};
65
+ if (U.class && (K.value += " " + U.class), U.style) {
66
+ Object.assign(I.value, U.style);
67
+ const e3 = k2.pageContext && k2.pageContext.dimensions ? k2.pageContext.dimensions : b.PC, o2 = U.style[e3 + "_style"];
68
+ o2 && Object.assign(I.value, o2);
69
+ const t2 = U.style[e3 + "_class"];
70
+ t2 && (K.value += " " + t2);
66
71
  }
67
- const I = M();
68
- function K(e3) {
69
- if (q.value = e3, e3 && !e3.show && (e3.show = function() {
70
- E.value = "show";
72
+ const V = $();
73
+ function X(e3) {
74
+ if (G.value = e3, e3 && !e3.show && (e3.show = function() {
75
+ R.value = "show";
71
76
  }), e3 && !e3.hide && (e3.hide = function() {
72
- E.value = "hide";
77
+ R.value = "hide";
73
78
  }), e3 && !e3.getConfigure && (e3.getConfigure = function() {
74
79
  return k2.configure;
75
- }), k2.configure.uuid && h(k2.pageContext, k2.configure.uuid, q), k2.configure.code) y(k2.pageContext, k2.configure.code, q);
76
- else if ("table" === k2.configure.name) y(k2.pageContext, k2.configure.uuid, q);
80
+ }), k2.configure.uuid && x(k2.pageContext, k2.configure.uuid, G), k2.configure.code) h(k2.pageContext, k2.configure.code, G);
81
+ else if ("table" === k2.configure.name) h(k2.pageContext, k2.configure.uuid, G);
77
82
  else if (k2.configure.props && k2.configure.props.base) {
78
83
  const e4 = k2.configure.props.base;
79
84
  if (e4.prop) {
80
85
  let o3 = e4.prop;
81
- o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), y(k2.pageContext, o3, q);
86
+ o3.startsWith("${") && (o3 = o3.substring(2, o3.length - 1)), o3.includes(".") && (o3 = o3.substring(o3.indexOf(".") + 1)), h(k2.pageContext, o3, G);
82
87
  }
83
88
  }
84
89
  const o2 = k2.configure.props ? k2.configure.props.base : null;
85
90
  if (o2 && o2.prop) {
86
91
  let e4 = o2.prop;
87
- e4 = L(e4), N(k2.pageContext, e4);
92
+ e4 = _(e4), w(k2.pageContext, e4);
88
93
  }
89
94
  !function() {
90
- if (!q.value) return;
91
- const e4 = O(k2.pageContext, k2.configure);
92
- "table" !== k2.configure.name && e4 && e4.isCalcHeight && C(() => {
93
- let e5 = q.value.$el;
94
- e5 || (e5 = q.value);
95
+ if (!G.value) return;
96
+ const e4 = P(k2.pageContext, k2.configure);
97
+ "table" !== k2.configure.name && e4 && e4.isCalcHeight && d(() => {
98
+ let e5 = G.value.$el;
99
+ e5 || (e5 = G.value);
95
100
  const o3 = e5.parentNode;
96
101
  if (!e5 || !o3) return;
97
102
  const t2 = e5.getBoundingClientRect();
98
- let n2 = window.innerHeight - t2.y - 80, s2 = n2 + "";
99
- T(n2) && (s2 = n2 + "px"), z.value.height = s2, z.value["overflow-y"] = "auto", z.value["overflow-x"] = "hidden", k2.configure.sytle || (k2.configure.sytle = {}), k2.configure.sytle._heightStyle = s2;
103
+ let n2 = window.innerHeight - t2.y - 80, i2 = n2 + "";
104
+ S(n2) && (i2 = n2 + "px"), I.value.height = i2, I.value["overflow-y"] = "auto", I.value["overflow-x"] = "hidden", k2.configure.sytle || (k2.configure.sytle = {}), k2.configure.sytle._heightStyle = i2;
100
105
  });
101
106
  }();
102
107
  }
103
- let Q;
104
- s(() => {
105
- U(), I.countComponentsLoadedNumber(), Q = setTimeout(() => {
106
- I.componentsTotalNmber !== I.componentsLoadedNumber || I.pageComponentsLoaded || I.setPageComponentsLoaded(true);
108
+ let Y;
109
+ i(() => {
110
+ Z(), V.countComponentsLoadedNumber(), Y = setTimeout(() => {
111
+ V.componentsTotalNmber !== V.componentsLoadedNumber || V.pageComponentsLoaded || V.setPageComponentsLoaded(true);
107
112
  }, 30);
108
- }), i(() => {
109
- Q && clearTimeout(Q);
113
+ }), s(() => {
114
+ Y && clearTimeout(Y);
110
115
  });
111
- const U = () => {
112
- if (!q.value) return;
113
- let e3 = q.value.$el;
114
- e3 || (e3 = q.value);
116
+ const Z = () => {
117
+ if (!G.value) return;
118
+ let e3 = G.value.$el;
119
+ e3 || (e3 = G.value);
115
120
  const o2 = e3.parentNode;
116
121
  if (!e3 || !o2) return;
117
- const t2 = k2.configure.props ? k2.configure.props : {}, n2 = k2.configure.style ? k2.configure.style : {}, s2 = t2.position;
118
- "top" == s2 || "bottom" == s2 || n2.position;
119
- };
120
- return (e3, o2) => {
121
- const t2 = r("permission");
122
- return a(H)(e3.configure) ? u((c(), p(g(R.value), { key: 0, ref: K, style: m(z.value), class: f(A.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[d, a(F)], [t2, { codes: a(B) ? a(B) : "true", systemCode: e3.pageContext.systemCode }]]) : l("", true);
122
+ const t2 = k2.configure.props ? k2.configure.props : {}, n2 = k2.configure.style ? k2.configure.style : {}, i2 = t2.position;
123
+ "top" == i2 || "bottom" == i2 || n2.position;
123
124
  };
125
+ return (e3, o2) => l(J) && l(T)(e3.configure) ? r((a(), p(c(z.value), { key: 0, ref: X, style: f(I.value), class: g(K.value), configure: e3.configure, pageContext: e3.pageContext }, null, 8, ["style", "class", "configure", "pageContext"])), [[m, l(W)]]) : u("", true);
124
126
  } });
125
127
  export {
126
128
  k as default
@@ -7,12 +7,12 @@ import { initPageEvents as f } from "../utils/events/event-util.js";
7
7
  import { setHomeChartInitConfigValue as v } from "../utils/charts/chart-util.js";
8
8
  import { useI18n as C } from "vue-i18n";
9
9
  const y = { "element-loading-text": "加载中..." }, S = { key: 1 }, b = e({ name: "HomeChart", inheritAttrs: false, __name: "home-chart", props: { chartUuid: { type: String, default: "" }, homeChartSettingUserId: { type: Number, default: 0 } }, setup(e2) {
10
- const { t: b2 } = C(), I = e2, U = t(true), w = t(false), H = t(null);
10
+ const { t: b2 } = C(), I = e2, U = t(true), H = t(false), w = t(null);
11
11
  let x, A = t(null);
12
12
  return I.chartUuid && c.get(window.$vueApp.config.globalProperties.baseAPI + "/component/home-chart-layout/" + I.chartUuid).then((e3) => {
13
13
  var _a, _b;
14
14
  if (e3 && e3.designJson) {
15
- H.value = {};
15
+ w.value = {};
16
16
  const t2 = JSON.parse(e3.designJson);
17
17
  let a2 = window.localStorage.getItem("HOME_MY_CHARTS_ALIAS");
18
18
  if (a2) {
@@ -20,26 +20,26 @@ const y = { "element-loading-text": "加载中..." }, S = { key: 1 }, b = e({ na
20
20
  e4[I.homeChartSettingUserId] && (t2.chartJson.runtime.headerInfo ? t2.chartJson.runtime.headerInfo.title = e4[I.homeChartSettingUserId] : t2.chartJson.runtime.headerInfo = { textAlign: "center", title: e4[I.homeChartSettingUserId] });
21
21
  }
22
22
  const i2 = window.frameElement;
23
- H.value = t2.chartJson, H.value.homeChartSettingUserId = I.homeChartSettingUserId, i2 && (H.value.runtime.common.style.pc_style.height = i2.clientHeight + "px");
23
+ w.value = t2.chartJson, w.value.homeChartSettingUserId = I.homeChartSettingUserId, i2 && (i2.clientHeight, w.value.runtime.common.style.pc_style.height = i2.clientHeight + "px");
24
24
  const n2 = { showHomepageSearch: false, name: e3.pageName, code: e3.pageCode, label: "", dimensions: "", version: 1, isWorkflowEntity: false, variables: t2.variables, systemCode: e3.systemCode, uuid: e3.uuid, allChartUuids: [], backendUrl: e3.backendUrl, rules: {}, pageType: "chart", beanName: t2.beanName, initChartServiceConfigs: [t2.initChartServiceConfigs], entity: { data: {}, task: {}, request: {}, page: {}, context: e3.contextParam, system: e3.systemParam } };
25
- if (((_a = H.value.pushHomepage) == null ? void 0 : _a.searchConditions) && ((_b = H.value.pushHomepage) == null ? void 0 : _b.searchConditions.length) > 0 && (n2.showHomepageSearch = true), t2.variables) {
25
+ if (((_a = w.value.pushHomepage) == null ? void 0 : _a.searchConditions) && ((_b = w.value.pushHomepage) == null ? void 0 : _b.searchConditions.length) > 0 && (n2.showHomepageSearch = true), t2.variables) {
26
26
  const e4 = n2.entity.page;
27
27
  for (const a3 of t2.variables) a3.name && (a3.isArrayElement ? e4[a3.name] = [] : a3.defaultValue ? e4[a3.name] = a3.defaultValue : e4[a3.name] = void 0);
28
28
  }
29
- t2.initOptionConfigs && t2.initOptionConfigs.length > 0 && d(n2, t2.initOptionConfigs, void 0), v(H.value.pushHomepage.initConfig, n2, I.homeChartSettingUserId), f(t2, n2), A.value = n2, x = setTimeout(() => {
29
+ t2.initOptionConfigs && t2.initOptionConfigs.length > 0 && d(n2, t2.initOptionConfigs, void 0), v(w.value.pushHomepage.initConfig, n2, I.homeChartSettingUserId), f(t2, n2), A.value = n2, x = setTimeout(() => {
30
30
  !function(e4, t3) {
31
31
  if (!t3 || 0 == t3.length) return;
32
32
  e4.initChartData = {}, e4.initChartData.data = h(e4.entity.data), e4.initChartData.page = h(e4.entity.page), t3 && t3.length > 0 && p(e4, t3, null, true);
33
33
  }(A.value, [t2.initChartServiceConfigs]);
34
34
  }, 200);
35
- } else w.value = true, U.value = false;
35
+ } else H.value = true, U.value = false;
36
36
  }).finally(() => {
37
37
  U.value = false;
38
38
  }), a(() => {
39
39
  x && clearTimeout(x);
40
40
  }), (e3, t2) => {
41
41
  const a2 = i("loading");
42
- return n((o(), r("div", y, [!U.value && H.value ? (o(), s(g, { key: 0, configure: H.value, pageContext: u(A) }, null, 8, ["configure", "pageContext"])) : U.value || H.value ? l("", true) : (o(), r("div", S, m(u(b2)("superPageRuntimeMessage.noChartSetting")), 1))])), [[a2, U.value]]);
42
+ return n((o(), r("div", y, [!U.value && w.value ? (o(), s(g, { key: 0, configure: w.value, pageContext: u(A) }, null, 8, ["configure", "pageContext"])) : U.value || w.value ? l("", true) : (o(), r("div", S, m(u(b2)("superPageRuntimeMessage.noChartSetting")), 1))])), [[a2, U.value]]);
43
43
  };
44
44
  } });
45
45
  export {
@@ -10,6 +10,7 @@ const s = ["src"], d = { key: 1, class: "amb-super-page-runtime-dialog-iframe",
10
10
  const e4 = JSON.parse(JSON.stringify(p.parentPageEventParams));
11
11
  e4.pageContext && delete e4.pageContext, e4.configureObj && delete e4.configureObj, Object.assign(b.value, e4);
12
12
  } catch (e4) {
13
+ console.error(e4);
13
14
  }
14
15
  null !== w.value && void 0 !== w.value || (w.value = p.parentPageEventParams.id);
15
16
  }