super-page-runtime 2.3.8 → 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 (40) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +50 -50
  2. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +57 -57
  3. package/dist/es/components/runtime/utils/common-util.d.ts +4 -0
  4. package/dist/es/components/runtime/utils/common-util.js +4 -0
  5. package/dist/es/components/runtime/utils/events/event-util.js +3 -3
  6. package/dist/es/components/runtime/utils/events/print-label.js +25 -26
  7. package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
  8. package/dist/es/components/runtime/utils/events/validator-util.d.ts +1 -1
  9. package/dist/es/components/runtime/utils/events/validator-util.js +122 -104
  10. package/dist/es/components/runtime/utils/page-init-util.js +24 -25
  11. package/dist/es/components/runtime/utils/page-store.js +10 -10
  12. package/dist/es/components/runtime/utils/table-utils.js +1 -1
  13. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  14. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
  15. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +89 -94
  16. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
  17. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
  18. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  19. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -2
  20. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +22 -19
  21. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +34 -31
  22. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +31 -28
  23. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +32 -25
  24. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +52 -49
  25. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +33 -30
  26. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +38 -35
  27. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +18 -15
  28. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -55
  29. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
  30. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
  31. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +46 -43
  32. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +55 -53
  33. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +63 -61
  34. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +25 -22
  35. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +16 -13
  36. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  37. package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
  38. package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
  39. package/package.json +2 -2
  40. package/dist/es.zip +0 -0
@@ -1,75 +1,78 @@
1
- import { defineComponent as e, ref as t, onUnmounted as n, createElementBlock as u, openBlock as o, createBlock as l, createCommentVNode as a, unref as r } from "vue";
1
+ import { defineComponent as e, ref as t, onUnmounted as n, createElementBlock as u, openBlock as o, createBlock as a, createCommentVNode as l, unref as r } from "vue";
2
2
  import i from "./sub-table-runtime.vue.js";
3
3
  import c from "./main-table-runtime.vue.js";
4
4
  const f = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: f2 }) {
5
- const g = e2, s = g.pageContext.pageType, p = t(null), v = g.configure.uuid, d = g.pageContext.superGridItems, S = d ? d[v] : null;
6
- p.value = S ? S.configure ? JSON.parse(S.configure) : null : g.configure;
7
- const T = g.configure.runtime ? g.configure.runtime : {};
5
+ const s = e2, g = s.pageContext.pageType, d = t(null), v = s.configure.uuid, p = s.pageContext.superGridItems, S = p ? p[v] : null;
6
+ d.value = S ? S.configure ? JSON.parse(S.configure) : null : s.configure;
7
+ const T = s.configure.runtime ? s.configure.runtime : {};
8
8
  T.style, T.class;
9
- const b = t(true), C = t(null);
9
+ const C = t(true), b = t(null);
10
10
  let m = null;
11
11
  function E(e3) {
12
- g.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES ? g.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(e3) : g.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [e3];
12
+ s.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES ? s.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(e3) : s.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [e3];
13
13
  }
14
14
  return n(() => {
15
15
  m && clearTimeout(m);
16
16
  }), f2({ refresh: function(e3, t2, n2, u2) {
17
- if (s && "list" === s) return C.value.refresh(e3, t2, n2, u2);
17
+ if (g && "list" === g) return b.value.refresh(e3, t2, n2, u2);
18
18
  }, createRow: function() {
19
- return C.value.createRow();
19
+ return b.value.createRow();
20
20
  }, clearSelections: function() {
21
- return C.value.clearSelections();
21
+ return b.value.clearSelections();
22
22
  }, getSelections: function() {
23
- return C.value.getSelections();
23
+ return b.value.getSelections();
24
24
  }, getSelectionIds: function() {
25
- return C.value.getSelectionIds();
25
+ return b.value.getSelectionIds();
26
26
  }, getTableConfigure: function() {
27
- return C.value.getTableConfigure();
27
+ return b.value.getTableConfigure();
28
28
  }, isDeleteChange: function(e3) {
29
- s && "list" === s && C.value.isDeleteChange(e3);
29
+ g && "list" === g && b.value.isDeleteChange(e3);
30
30
  }, validatorSunTableListData: function() {
31
- if (s && "form" === s) return C.value.validatorSunTableListData();
31
+ if (g && "form" === g) return b.value.validatorSunTableListData();
32
32
  }, showMobileSearch: function() {
33
- C.value.showMobileSearch();
33
+ b.value.showMobileSearch();
34
34
  }, getTableSelectOptions: function() {
35
- if (C.value) return C.value.getTableSelectOptions();
35
+ if (b.value) return b.value.getTableSelectOptions();
36
36
  }, dynamicControlTableEdit: function(e3, t2, n2) {
37
- C.value && C.value.dynamicControlTableEdit(e3, t2, n2);
37
+ b.value && b.value.dynamicControlTableEdit(e3, t2, n2);
38
38
  }, getTableUuid: function() {
39
- return g.configure.uuid;
39
+ return s.configure.uuid;
40
40
  }, doLayout: function(e3) {
41
- C.value && C.value.doLayout(e3);
41
+ b.value && b.value.doLayout(e3);
42
42
  }, changeOperationAddState: function(e3) {
43
- C.value && C.value.changeOperationAddState(e3);
43
+ b.value && b.value.changeOperationAddState(e3);
44
44
  }, scrollTo: function(e3, t2) {
45
45
  var _a;
46
- (_a = C.value) == null ? void 0 : _a.scrollTo(e3, t2);
46
+ (_a = b.value) == null ? void 0 : _a.scrollTo(e3, t2);
47
47
  }, setScrollTop: function(e3) {
48
48
  var _a;
49
- (_a = C.value) == null ? void 0 : _a.setScrollTop(e3);
49
+ (_a = b.value) == null ? void 0 : _a.setScrollTop(e3);
50
50
  }, setScrollLeft: function(e3) {
51
51
  var _a;
52
- (_a = C.value) == null ? void 0 : _a.setScrollLeft(e3);
52
+ (_a = b.value) == null ? void 0 : _a.setScrollLeft(e3);
53
53
  }, getSuperGridRef: function() {
54
54
  var _a;
55
- return (_a = C.value) == null ? void 0 : _a.getSuperGridRef();
55
+ return (_a = b.value) == null ? void 0 : _a.getSuperGridRef();
56
56
  }, getSuperGridTableRef: function() {
57
57
  var _a;
58
- return (_a = C.value) == null ? void 0 : _a.getSuperGridTableRef();
58
+ return (_a = b.value) == null ? void 0 : _a.getSuperGridTableRef();
59
59
  }, setCurrentRowIndex: function(e3) {
60
60
  var _a;
61
- (_a = C.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
61
+ (_a = b.value) == null ? void 0 : _a.setCurrentRowIndex(e3);
62
62
  }, setScrollTopByRowIndex: function(e3) {
63
63
  var _a;
64
- (_a = C.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
64
+ (_a = b.value) == null ? void 0 : _a.setScrollTopByRowIndex(e3);
65
65
  }, reloadSubTable: function() {
66
- b.value = false, m = setTimeout(() => {
67
- b.value = true;
66
+ C.value = false, m = setTimeout(() => {
67
+ C.value = true;
68
68
  }, 10);
69
69
  }, getTableData: function() {
70
70
  var _a;
71
- return (_a = C.value) == null ? void 0 : _a.getTableData();
72
- } }), (e3, t2) => (o(), u("div", null, [r(s) && "form" === r(s) && b.value ? (o(), l(i, { key: 0, ref_key: "gridRef", ref: C, pageContext: e3.pageContext, configure: p.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"])) : r(s) && "form" === r(s) ? a("", true) : (o(), l(c, { key: 1, ref_key: "gridRef", ref: C, pageContext: e3.pageContext, configure: p.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"]))]));
71
+ return (_a = b.value) == null ? void 0 : _a.getTableData();
72
+ }, addRequiredClass: function(e3, t2, n2) {
73
+ var _a;
74
+ (_a = b.value) == null ? void 0 : _a.addRequiredClass(e3, t2, n2);
75
+ } }), (e3, t2) => (o(), u("div", null, [r(g) && "form" === r(g) && C.value ? (o(), a(i, { key: 0, ref_key: "gridRef", ref: b, pageContext: e3.pageContext, configure: d.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"])) : r(g) && "form" === r(g) ? l("", true) : (o(), a(c, { key: 1, ref_key: "gridRef", ref: b, pageContext: e3.pageContext, configure: d.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"]))]));
73
76
  } });
74
77
  export {
75
78
  f as default
@@ -1,45 +1,48 @@
1
- import { defineComponent as e, computed as t, ref as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as c, createVNode as f, createElementBlock as g, Fragment as v, renderList as d, createCommentVNode as m, toDisplayString as h } from "vue";
2
- import { setVariableValue as y, getVariableValue as x, getOptionDatasFromPage as b, monitorFieldChange as C, autoSetAfterSelect as k, queryOptionDatasources as _ } from "../../../../utils/page-helper-util.js";
3
- import { getFormModelFields as R } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as S, handleAfterInitEvent as j } from "../../../../utils/events/event-util.js";
5
- import { $t as I } from "../../../../utils/i18n-util.js";
1
+ import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as p, withCtx as c, createVNode as f, createElementBlock as g, Fragment as v, renderList as d, createCommentVNode as m, toDisplayString as h } from "vue";
2
+ import { setVariableValue as y, getVariableValue as x, getOptionDatasFromPage as C, monitorFieldChange as b, autoSetAfterSelect as k, queryOptionDatasources as R } from "../../../../utils/page-helper-util.js";
3
+ import { getFormModelFields as _ } from "../../../../utils/page-init-util.js";
4
+ import { handleFormEvent as j, handleAfterInitEvent as S } from "../../../../utils/events/event-util.js";
5
+ import { $t as q } from "../../../../utils/i18n-util.js";
6
+ import { addRequiredClassUtil as I } from "../../../../utils/common-util.js";
6
7
  const V = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: V2 }) {
7
- const q = e2, w = q.pageContext.entity ? q.pageContext.entity : {};
8
- let z = R(q.pageContext, q.configure);
9
- const D = t({ get() {
10
- let e3 = x(w, z);
8
+ const w = e2, z = t(null), D = w.pageContext.entity ? w.pageContext.entity : {};
9
+ let O = _(w.pageContext, w.configure);
10
+ const A = l({ get() {
11
+ let e3 = x(D, O);
11
12
  return e3 && "string" == typeof e3 && (e3 = e3.split(",")), e3;
12
13
  }, set(e3) {
13
- e3 && e3.length > 0 && (e3 = e3.join(",")), y(w, z, e3);
14
- } }), O = q.configure.runtime ? q.configure.runtime : {}, A = O.style, M = O.class, P = O.headerStyle, E = O.titleExceedStyle, F = l(O.props ? O.props : {}), T = l(F.value.options ? F.value.options : []), U = b(q.pageContext, q.configure);
15
- U.length > 0 && (T.value = U);
16
- const W = q.configure.props && q.configure.props.dataOrigin ? q.configure.props.dataOrigin : {}, B = W.optionValueSetType;
17
- let G = [];
18
- if (("dynamicData" == B || "dynamicData" == B || "service" == B) && W.autoSets) for (let e3 of W.autoSets) e3.source && G.push(e3);
19
- q.configure && q.configure.props && q.configure.props.base && q.configure.props.base.optionProp && G.push({ source: "label", target: q.configure.props.base.optionProp }), F.value.changeMethod = function(e3) {
20
- if (G.length > -1) {
14
+ e3 && e3.length > 0 && (e3 = e3.join(",")), y(D, O, e3), null != e3 && (z.value = "");
15
+ } }), M = w.configure.runtime ? w.configure.runtime : {}, P = M.style, E = M.class, F = M.headerStyle, T = M.titleExceedStyle, U = t(M.props ? M.props : {}), W = t(U.value.options ? U.value.options : []), B = C(w.pageContext, w.configure);
16
+ B.length > 0 && (W.value = B);
17
+ const G = w.configure.props && w.configure.props.dataOrigin ? w.configure.props.dataOrigin : {}, H = G.optionValueSetType;
18
+ let J = [];
19
+ if (("dynamicData" == H || "dynamicData" == H || "service" == H) && G.autoSets) for (let e3 of G.autoSets) e3.source && J.push(e3);
20
+ w.configure && w.configure.props && w.configure.props.base && w.configure.props.base.optionProp && J.push({ source: "label", target: w.configure.props.base.optionProp }), U.value.changeMethod = function(e3) {
21
+ if (J.length > -1) {
21
22
  let t2 = null;
22
- T.value && null != e3 && null != e3 && (t2 = T.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value)), k(q.configure, q.pageContext, G, t2);
23
+ W.value && null != e3 && null != e3 && (t2 = W.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value)), k(w.configure, w.pageContext, J, t2);
23
24
  }
24
- S(e3, q.pageContext, q.configure, "change");
25
+ j(e3, w.pageContext, w.configure, "change");
25
26
  };
26
- const H = F.value.optionconfigInfo ? F.value.optionconfigInfo : {};
27
- const J = F.value.monitorFields;
28
- C(q.pageContext, J, function() {
29
- _(q.pageContext, H, void 0).then((e3) => {
27
+ const K = U.value.optionconfigInfo ? U.value.optionconfigInfo : {};
28
+ const L = U.value.monitorFields;
29
+ b(w.pageContext, L, function() {
30
+ R(w.pageContext, K, void 0).then((e3) => {
30
31
  });
31
32
  });
32
- const K = l(null), L = l(null), N = l(null);
33
+ const N = t(null), Q = t(null), X = t(null);
33
34
  return o(() => {
34
35
  n(() => {
35
- const e3 = D.value;
36
- j(e3, q.pageContext, q.configure, { formItemRef: K.value, componentRef: L.value, titleRef: N.value, value: e3, entity: q.pageContext.entity.data, pageData: q.pageContext.entity.page });
36
+ const e3 = A.value;
37
+ S(e3, w.pageContext, w.configure, { formItemRef: N.value, componentRef: Q.value, titleRef: X.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
37
38
  });
38
39
  }), V2({ updateOptions: function(e3) {
39
- T.value = e3 || [];
40
+ W.value = e3 || [];
41
+ }, addRequiredClass: function() {
42
+ z.value = I();
40
43
  } }), (e3, t2) => {
41
44
  const l2 = a("el-checkbox"), o2 = a("el-checkbox-group"), n2 = a("el-form-item");
42
- return i(), u(n2, { ref_key: "formItemRef", ref: K, class: s(p(M)), required: !!F.value.required, "label-width": F.value.labelWidth, style: r(p(A)) }, { label: c(() => [F.value.tittleShow ? (i(), g("div", { key: 0, ref_key: "titleRef", ref: N, style: r({ ...p(P), ...p(E) }) }, h(p(I)(F.value.title)), 5)) : m("", true)]), default: c(() => [f(o2, { ref_key: "componentRef", ref: L, disabled: "disabled" === F.value.state, size: F.value.size, onChange: F.value.changeMethod, modelValue: D.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => D.value = e4) }, { default: c(() => [(i(true), g(v, null, d(T.value, (t3) => (i(), u(l2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => p(S)(t3.value, e3.pageContext, e3.configure, "click", { values: D.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["class", "required", "label-width", "style"]);
45
+ return i(), u(n2, { ref_key: "formItemRef", ref: N, class: s(p(E) + (z.value ? " " + z.value : "")), required: !!U.value.required, "label-width": U.value.labelWidth, style: r(p(P)) }, { label: c(() => [U.value.tittleShow ? (i(), g("div", { key: 0, ref_key: "titleRef", ref: X, style: r({ ...p(F), ...p(T) }) }, h(p(q)(U.value.title)), 5)) : m("", true)]), default: c(() => [f(o2, { ref_key: "componentRef", ref: Q, disabled: "disabled" === U.value.state, size: U.value.size, onChange: U.value.changeMethod, modelValue: A.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => A.value = e4) }, { default: c(() => [(i(true), g(v, null, d(W.value, (t3) => (i(), u(l2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => p(j)(t3.value, e3.pageContext, e3.configure, "click", { values: A.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["class", "required", "label-width", "style"]);
43
46
  };
44
47
  } });
45
48
  export {
@@ -1,60 +1,67 @@
1
- import { defineComponent as e, computed as t, ref as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as g, unref as m, withCtx as d, resolveDynamicComponent as f, toDisplayString as v } from "vue";
1
+ import { defineComponent as e, computed as t, ref as o, onMounted as n, nextTick as a, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as f, unref as m, withCtx as d, resolveDynamicComponent as g, toDisplayString as v } from "vue";
2
2
  import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
3
3
  import { setVariableValue as x, getVariableValue as y, formatVariableValue as b, getFormPropName as h, setVariableValueWithProp as j } from "../../../../utils/page-helper-util.js";
4
4
  import { handleAfterInitEvent as R, handleEvent as k } from "../../../../utils/events/event-util.js";
5
5
  import { updateFormItemEditState as V } from "../../../../utils/events/validator-util.js";
6
6
  import { getListCode as _ } from "../../../../utils/common-util.js";
7
7
  import { getComponentRef as D } from "../../../../utils/global-refs.js";
8
- import { getAdditionalParamMap as E } from "../../../../utils/events/standard-event.js";
9
- import { $t as w } from "../../../../utils/i18n-util.js";
10
- import S from "../../../../utils/eventBus.js";
11
- import { functions as U } from "../../../../utils/api/page-expose-util.js";
12
- const F = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
13
- const q = e2, z = q.pageContext.entity ? q.pageContext.entity : {}, G = C(q.pageContext, q.configure), H = t({ get: () => y(z, G), set(e3) {
8
+ import { getAdditionalParamMap as w } from "../../../../utils/events/standard-event.js";
9
+ import { $t as E } from "../../../../utils/i18n-util.js";
10
+ import F from "../../../../utils/eventBus.js";
11
+ import { functions as S } from "../../../../utils/api/page-expose-util.js";
12
+ const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
13
+ const O = e2, z = O.pageContext.entity ? O.pageContext.entity : {}, G = C(O.pageContext, O.configure), H = t({ get: () => y(z, G), set(e3) {
14
14
  x(z, G, e3);
15
- } }), P = q.configure.runtime ? q.configure.runtime : {}, I = P.style, A = P.class, B = P.headerStyle, W = o(P.props ? P.props : {}), J = function(e3) {
15
+ } }), P = O.configure.runtime ? O.configure.runtime : {}, I = P.style, A = P.class, B = P.headerStyle, W = o(P.props ? P.props : {}), J = function(e3) {
16
16
  let t2 = {};
17
17
  if (e3) for (let o2 in e3) {
18
- const a2 = e3[o2];
19
- t2[o2] = b(q.pageContext, a2);
18
+ const n2 = e3[o2];
19
+ t2[o2] = b(O.pageContext, n2);
20
20
  }
21
21
  return t2;
22
- }(P.customParams ? P.customParams : {}), K = E(q.pageContext), L = o(q.configure.props && q.configure.props.base ? q.configure.props.base.name : null);
22
+ }(P.customParams ? P.customParams : {}), K = w(O.pageContext), L = o(O.configure.props && O.configure.props.base ? O.configure.props.base.name : null);
23
23
  function M(e3, t2) {
24
24
  j(z, e3, t2);
25
25
  }
26
26
  function N(e3) {
27
- U.isHasFieldAuthPermission(q.configure) ? V(q.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", G ? G.join(".") : "");
27
+ S.isHasFieldAuthPermission(O.configure) && V(O.pageContext, e3);
28
28
  }
29
29
  function Q() {
30
- const e3 = q.pageContext.tableUuids;
30
+ const e3 = O.pageContext.tableUuids;
31
31
  e3 && e3.forEach((e4) => {
32
- const t2 = _(q.pageContext.code, q.pageContext.version, q.configure.uuid), o2 = D(q.pageContext, e4);
32
+ const t2 = _(O.pageContext.code, O.pageContext.version, O.configure.uuid), o2 = D(O.pageContext, e4);
33
33
  o2 && o2.restoreGridEdit(t2);
34
34
  });
35
35
  }
36
- q.configure.props.verification.custom && q.configure.props.verification.custom.enabled && (q.pageContext.customValidatorUuids || (q.pageContext.customValidatorUuids = []), q.pageContext.customValidatorUuids.push(q.configure.uuid));
37
- const T = q.pageContext.code, X = o(G && G.length > 0 ? T + "__" + G.join("__") : null), Y = o(null), Z = o(null), ee = o(null);
36
+ O.configure.props.verification.custom && O.configure.props.verification.custom.enabled && (O.pageContext.customValidatorUuids || (O.pageContext.customValidatorUuids = []), O.pageContext.customValidatorUuids.push(O.configure.uuid));
37
+ const T = O.pageContext.code, X = o(G && G.length > 0 ? T + "__" + G.join("__") : null), Y = o(null), Z = o(null), ee = o(null);
38
38
  function te(e3) {
39
- k(H.value, q.pageContext, q.configure, e3);
39
+ k(H.value, O.pageContext, O.configure, e3);
40
40
  }
41
- return a(() => {
42
- S.$on(X.value + "-scanDone", (e3) => {
41
+ return n(() => {
42
+ F.$on(X.value + "-scanDone", (e3) => {
43
43
  const t2 = e3.result;
44
44
  x(z, G, t2);
45
- }), S.$on(X.value + "-pickFileDone", (e3) => {
46
- X.value, Y.value.pickFileDone(e3);
47
- }), n(() => {
45
+ }), F.$on(X.value + "-pickFileDone", (e3) => {
46
+ Y.value.pickFileDone(e3);
47
+ }), a(() => {
48
48
  const e3 = H.value;
49
- R(e3, q.pageContext, q.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: q.pageContext.entity.data, pageData: q.pageContext.entity.page });
49
+ R(e3, O.pageContext, O.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
50
50
  });
51
51
  }), i(() => {
52
- S.$off(X.value + "-scanDone"), S.$off(X.value + "-pickFileDone");
52
+ F.$off(X.value + "-scanDone"), F.$off(X.value + "-pickFileDone");
53
53
  }), $2({ getCustomRef: function() {
54
54
  return Y.value;
55
+ }, invokeCustomFunction: function(e3, ...t2) {
56
+ if (Y.value && "function" == typeof Y.value[e3]) return Y.value[e3](...t2);
57
+ throw new Error(`执行失败:Function '${e3}' not found in custom component`);
58
+ }, hasCustomFunction: function(e3) {
59
+ return Y.value && "function" == typeof Y.value[e3];
60
+ }, addRequiredClass: function() {
61
+ requiredClass.value = addRequiredClassUtil();
55
62
  } }), (e3, t2) => {
56
63
  const o2 = u("el-form-item");
57
- return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: g(m(A)), "label-width": W.value.labelWidth, style: c(m(I)) }, { label: d(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...m(B) }) }, v(m(w)(W.value.title)), 5)) : s("", true)]), default: d(() => [L.value ? (p(), r("div", F, [(p(), l(f(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[1] || (t2[1] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : L.value ? (p(), r("div", O, [(p(), l(f(L.value), { ref_key: "customRef", ref: Y, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[3] || (t2[3] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
64
+ return W.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(m(A)), "label-width": W.value.labelWidth, style: c(m(I)) }, { label: d(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...m(B) }) }, v(m(E)(W.value.title)), 5)) : s("", true)]), default: d(() => [L.value ? (p(), r("div", U, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[1] || (t2[1] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"])) : L.value ? (p(), r("div", q, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(h)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(J), modelValue: H.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => H.value = e4), disabled: "disabled" === W.value.state, "additional-param-map": m(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: t2[3] || (t2[3] = (t3) => m(k)(H.value, e3.pageContext, e3.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
58
65
  };
59
66
  } });
60
67
  export {
@@ -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
  };