super-page-runtime 2.3.36 → 2.3.37-cdn1

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 (38) hide show
  1. package/dist/es/components/runtime/utils/events/standard-event.js +1 -1
  2. package/dist/es/components/runtime/utils/events/validator-util.js +230 -189
  3. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +1 -1
  4. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +2 -2
  5. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
  6. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +26 -26
  7. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +3 -1
  8. package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +17 -12
  9. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +69 -66
  10. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +36 -33
  11. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +36 -36
  12. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +45 -45
  13. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +61 -61
  14. package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +35 -35
  15. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +58 -58
  16. package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +19 -19
  17. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +59 -59
  18. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
  19. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +26 -26
  20. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +27 -27
  21. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +49 -49
  22. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +1 -1
  23. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +111 -111
  24. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +88 -88
  26. package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +5 -5
  27. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +1 -1
  28. package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +19 -19
  29. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +102 -90
  30. package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +6 -3
  31. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +1 -1
  32. package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +41 -20
  33. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
  34. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +26 -18
  35. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  36. package/dist/es/components/runtime/views/super-page.vue2.js +9 -3
  37. package/dist/es/style.css +168 -160
  38. package/package.json +2 -2
@@ -1,64 +1,64 @@
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 b, monitorFieldChange as C, autoSetAfterSelect as k, queryOptionDatasources as S } from "../../../../utils/page-helper-util.js";
3
- import { getFormModelFields as j } from "../../../../utils/page-init-util.js";
4
- import { handleFormEvent as R, handleAfterInitEvent as _ } from "../../../../utils/events/event-util.js";
5
- import { $t as I } from "../../../../utils/i18n-util.js";
6
- import { addRequiredClassUtil as q } from "../../../../utils/common-util.js";
7
- const V = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: V2 }) {
8
- const w = e2, z = t(null), D = w.pageContext.entity ? w.pageContext.entity : {};
9
- let E = j(w.pageContext, w.configure);
10
- const O = l({ get() {
11
- let e3 = x(D, E);
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, createSlots as c, withCtx as f, createVNode as g, createElementBlock as v, Fragment as d, renderList as m, createElementVNode as h, toDisplayString as y } from "vue";
2
+ import { setVariableValue as b, getVariableValue as x, getOptionDatasFromPage as C, monitorFieldChange as k, autoSetAfterSelect as S, queryOptionDatasources as j } from "../../../../utils/page-helper-util.js";
3
+ import { getFormModelFields as R } from "../../../../utils/page-init-util.js";
4
+ import { handleFormEvent as _, handleAfterInitEvent as I } from "../../../../utils/events/event-util.js";
5
+ import { $t as q } from "../../../../utils/i18n-util.js";
6
+ import { addRequiredClassUtil as V } from "../../../../utils/common-util.js";
7
+ const w = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: w2 }) {
8
+ const z = e2, D = t(null), E = z.pageContext.entity ? z.pageContext.entity : {};
9
+ let O = R(z.pageContext, z.configure);
10
+ const A = l({ get() {
11
+ let e3 = x(E, O);
12
12
  return e3 && "string" == typeof e3 && (e3 = e3.split(",")), e3;
13
13
  }, set(e3) {
14
- e3 && e3.length > 0 && (e3 = e3.join(",")), y(D, E, e3), null != e3 && (z.value = "");
15
- } }), A = w.configure.runtime ? w.configure.runtime : {}, M = A.style, P = A.class, T = A.headerStyle, F = A.titleExceedStyle, U = t(A.props ? A.props : {}), W = t(U.value.options ? U.value.options : []), B = b(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) {
14
+ e3 && e3.length > 0 && (e3 = e3.join(",")), b(E, O, e3), null != e3 && (D.value = "");
15
+ } }), M = z.configure.runtime ? z.configure.runtime : {}, P = M.style, T = M.class, F = M.headerStyle, U = M.titleExceedStyle, W = t(M.props ? M.props : {}), B = t(W.value.options ? W.value.options : []), G = C(z.pageContext, z.configure);
16
+ G.length > 0 && (B.value = G);
17
+ const H = z.configure.props && z.configure.props.dataOrigin ? z.configure.props.dataOrigin : {}, J = H.optionValueSetType;
18
+ let K = [];
19
+ if (("dynamicData" == J || "dynamicData" == J || "service" == J) && H.autoSets) for (let e3 of H.autoSets) e3.source && K.push(e3);
20
+ z.configure && z.configure.props && z.configure.props.base && z.configure.props.base.optionProp && K.push({ source: "label", target: z.configure.props.base.optionProp }), W.value.changeMethod = function(e3) {
21
+ if (K.length > -1) {
22
22
  let t2 = null;
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
+ B.value && null != e3 && null != e3 && (t2 = B.value.filter((t3) => Array.isArray(e3) ? e3.includes(t3.value) : e3 === t3.value)), S(z.configure, z.pageContext, K, t2);
24
24
  }
25
- R(e3, w.pageContext, w.configure, "change");
25
+ _(e3, z.pageContext, z.configure, "change");
26
26
  };
27
- const K = U.value.optionconfigInfo ? U.value.optionconfigInfo : {};
28
- const L = U.value.monitorFields;
29
- C(w.pageContext, L, function() {
30
- S(w.pageContext, K, void 0).then((e3) => {
27
+ const L = W.value.optionconfigInfo ? W.value.optionconfigInfo : {};
28
+ const N = W.value.monitorFields;
29
+ k(z.pageContext, N, function() {
30
+ j(z.pageContext, L, void 0).then((e3) => {
31
31
  });
32
32
  });
33
- const N = t(null), Q = t(null), X = t(null);
33
+ const Q = t(null), X = t(null), Y = t(null);
34
34
  return o(() => {
35
35
  n(() => {
36
- const e3 = O.value;
37
- _(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 });
36
+ const e3 = A.value;
37
+ I(e3, z.pageContext, z.configure, { formItemRef: Q.value, componentRef: X.value, titleRef: Y.value, value: e3, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
38
38
  });
39
- }), V2({ updateOptions: function(e3) {
40
- W.value = e3 || [];
39
+ }), w2({ updateOptions: function(e3) {
40
+ B.value = e3 || [];
41
41
  }, addRequiredClass: function() {
42
- z.value = q();
42
+ D.value = V();
43
43
  }, getSelectItemsTitle: function() {
44
44
  const e3 = function() {
45
- let e4 = x(D, E);
45
+ let e4 = x(E, O);
46
46
  return null != e4 && (e4 = String(e4)), e4;
47
47
  }();
48
48
  if (null != e3 && "" !== e3 && e3.length > 0) {
49
49
  let t2 = "";
50
50
  const l2 = e3.split(",");
51
- return W.value.length > 0 ? (W.value.forEach((e4) => {
51
+ return B.value.length > 0 ? (B.value.forEach((e4) => {
52
52
  l2.forEach((l3) => {
53
53
  e4.value === l3 && (t2 = t2 + e4.label + ",");
54
54
  });
55
55
  }), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
56
56
  }
57
57
  } }), (t2, l2) => {
58
- const o2 = a("el-checkbox"), n2 = a("el-checkbox-group"), y2 = a("el-form-item");
59
- return i(), u(y2, { ref_key: "formItemRef", ref: N, class: s(p(P) + (z.value ? " " + z.value : "")), required: !!U.value.required, "label-width": U.value.labelWidth, style: r(p(M)) }, { label: c(() => [U.value.tittleShow ? (i(), g("div", { key: 0, ref_key: "titleRef", ref: X, style: r({ ...p(T), ...p(F) }) }, h(p(I)(U.value.title)), 5)) : m("", true)]), default: c(() => [f(n2, { ref_key: "componentRef", ref: Q, disabled: "disabled" === U.value.state, size: U.value.size, onChange: U.value.changeMethod, modelValue: O.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => O.value = e3) }, { default: c(() => [(i(true), g(v, null, d(W.value, (t3) => (i(), u(o2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => p(R)(t3.value, e2.pageContext, e2.configure, "click", { values: O.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 1 }, 8, ["class", "required", "label-width", "style"]);
58
+ const o2 = a("el-checkbox"), n2 = a("el-checkbox-group"), b2 = a("el-form-item");
59
+ return i(), u(b2, { ref_key: "formItemRef", ref: Q, class: s(p(T) + (D.value ? " " + D.value : "")), required: !!W.value.required, "label-width": W.value.labelWidth, style: r(p(P)) }, c({ default: f(() => [g(n2, { ref_key: "componentRef", ref: X, disabled: "disabled" === W.value.state, size: W.value.size, onChange: W.value.changeMethod, modelValue: A.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => A.value = e3) }, { default: f(() => [(i(true), v(d, null, m(B.value, (t3) => (i(), u(o2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => p(_)(t3.value, e2.pageContext, e2.configure, "click", { values: A.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: f(() => [h("div", { ref_key: "titleRef", ref: Y, style: r({ ...p(F), ...p(U) }), class: "amb-form-item-label" }, y(p(q)(W.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "required", "label-width", "style"]);
60
60
  };
61
61
  } });
62
62
  export {
63
- V as default
63
+ w as default
64
64
  };
@@ -1,69 +1,69 @@
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 d, withCtx as m, resolveDynamicComponent as g, toDisplayString as v } from "vue";
2
- import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
3
- import { setVariableValue as x, getVariableValue as y, formatVariableValue as b, getFormPropName as h, setVariableValueWithProp as j } from "../../../../utils/page-helper-util.js";
4
- import { handleAfterInitEvent as R, handleEvent as k } from "../../../../utils/events/event-util.js";
5
- import { updateFormItemEditState as V } from "../../../../utils/events/validator-util.js";
6
- import { getListCode as _ } from "../../../../utils/common-util.js";
7
- import { getComponentRef as D } from "../../../../utils/global-refs.js";
8
- import { getAdditionalParamMap as w } from "../../../../utils/events/standard-event.js";
9
- import { $t as E } from "../../../../utils/i18n-util.js";
10
- import F from "../../../../utils/eventBus.js";
11
- import { functions as S } from "../../../../utils/api/page-expose-util.js";
12
- const U = { key: 0, style: { width: "100%", height: "100%" } }, q = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, $ = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: $2 }) {
13
- const O = e2, z = O.pageContext.entity ? O.pageContext.entity : {}, G = C(O.pageContext, O.configure), H = t({ get: () => y(z, G), set(e3) {
14
- x(z, G, e3);
15
- } }), P = O.configure.runtime ? O.configure.runtime : {}, I = P.style, A = P.class, B = P.headerStyle, W = o(P.props ? P.props : {}), J = function(e3) {
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 m, unref as f, createSlots as d, withCtx as g, resolveDynamicComponent as v, createElementVNode as C, toDisplayString as x } from "vue";
2
+ import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
3
+ import { setVariableValue as b, getVariableValue as h, formatVariableValue as j, getFormPropName as R, setVariableValueWithProp as k } from "../../../../utils/page-helper-util.js";
4
+ import { handleAfterInitEvent as V, handleEvent as _ } from "../../../../utils/events/event-util.js";
5
+ import { updateFormItemEditState as D } from "../../../../utils/events/validator-util.js";
6
+ import { getListCode as w } from "../../../../utils/common-util.js";
7
+ import { getComponentRef as E } from "../../../../utils/global-refs.js";
8
+ import { getAdditionalParamMap as F } from "../../../../utils/events/standard-event.js";
9
+ import { $t as S } from "../../../../utils/i18n-util.js";
10
+ import U from "../../../../utils/eventBus.js";
11
+ import { functions as q } from "../../../../utils/api/page-expose-util.js";
12
+ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, z = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
13
+ const G = e2, H = G.pageContext.entity ? G.pageContext.entity : {}, P = y(G.pageContext, G.configure), I = t({ get: () => h(H, P), set(e3) {
14
+ b(H, P, e3);
15
+ } }), A = G.configure.runtime ? G.configure.runtime : {}, B = A.style, W = A.class, J = A.headerStyle, K = o(A.props ? A.props : {}), L = function(e3) {
16
16
  let t2 = {};
17
17
  if (e3) for (let o2 in e3) {
18
- const n2 = e3[o2];
19
- t2[o2] = b(O.pageContext, n2);
18
+ const a2 = e3[o2];
19
+ t2[o2] = j(G.pageContext, a2);
20
20
  }
21
21
  return t2;
22
- }(P.customParams ? P.customParams : {}), K = w(O.pageContext), L = o(O.configure.props && O.configure.props.base ? O.configure.props.base.name : null);
23
- function M(e3, t2) {
24
- j(z, e3, t2);
22
+ }(A.customParams ? A.customParams : {}), M = F(G.pageContext), N = o(G.configure.props && G.configure.props.base ? G.configure.props.base.name : null);
23
+ function Q(e3, t2) {
24
+ k(H, e3, t2);
25
25
  }
26
- function N(e3) {
27
- S.isHasFieldAuthPermission(O.configure) ? V(O.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", G ? G.join(".") : "");
26
+ function T(e3) {
27
+ q.isHasFieldAuthPermission(G.configure) ? D(G.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", P ? P.join(".") : "");
28
28
  }
29
- function Q() {
30
- const e3 = O.pageContext.tableUuids;
29
+ function X() {
30
+ const e3 = G.pageContext.tableUuids;
31
31
  e3 && e3.forEach((e4) => {
32
- const t2 = _(O.pageContext.code, O.pageContext.version, O.configure.uuid), o2 = D(O.pageContext, e4);
32
+ const t2 = w(G.pageContext.code, G.pageContext.version, G.configure.uuid), o2 = E(G.pageContext, e4);
33
33
  o2 && o2.restoreGridEdit(t2);
34
34
  });
35
35
  }
36
- O.configure.props.verification.custom && O.configure.props.verification.custom.enabled && (O.pageContext.customValidatorUuids || (O.pageContext.customValidatorUuids = []), O.pageContext.customValidatorUuids.push(O.configure.uuid));
37
- const T = O.pageContext.code, X = o(G && G.length > 0 ? T + "__" + G.join("__") : null), Y = o(null), Z = o(null), ee = o(null);
38
- function te(e3) {
39
- k(H.value, O.pageContext, O.configure, e3);
36
+ G.configure.props.verification.custom && G.configure.props.verification.custom.enabled && (G.pageContext.customValidatorUuids || (G.pageContext.customValidatorUuids = []), G.pageContext.customValidatorUuids.push(G.configure.uuid));
37
+ const Y = G.pageContext.code, Z = o(P && P.length > 0 ? Y + "__" + P.join("__") : null), ee = o(null), te = o(null), oe = o(null);
38
+ function ae(e3) {
39
+ _(I.value, G.pageContext, G.configure, e3);
40
40
  }
41
- return n(() => {
42
- F.$on(X.value + "-scanDone", (e3) => {
41
+ return a(() => {
42
+ U.$on(Z.value + "-scanDone", (e3) => {
43
43
  const t2 = e3.result;
44
- x(z, G, t2);
45
- }), F.$on(X.value + "-pickFileDone", (e3) => {
46
- X.value, Y.value.pickFileDone(e3);
47
- }), a(() => {
48
- const e3 = H.value;
49
- R(e3, O.pageContext, O.configure, { formItemRef: Z.value, componentRef: Y.value, titleRef: ee.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
44
+ b(H, P, t2);
45
+ }), U.$on(Z.value + "-pickFileDone", (e3) => {
46
+ Z.value, ee.value.pickFileDone(e3);
47
+ }), n(() => {
48
+ const e3 = I.value;
49
+ V(e3, G.pageContext, G.configure, { formItemRef: te.value, componentRef: ee.value, titleRef: oe.value, value: e3, entity: G.pageContext.entity.data, pageData: G.pageContext.entity.page });
50
50
  });
51
51
  }), i(() => {
52
- F.$off(X.value + "-scanDone"), F.$off(X.value + "-pickFileDone");
53
- }), $2({ getCustomRef: function() {
54
- return Y.value;
52
+ U.$off(Z.value + "-scanDone"), U.$off(Z.value + "-pickFileDone");
53
+ }), z2({ getCustomRef: function() {
54
+ return ee.value;
55
55
  }, invokeCustomFunction: function(e3, ...t2) {
56
- if (Y.value && "function" == typeof Y.value[e3]) return Y.value[e3](...t2);
56
+ if (ee.value && "function" == typeof ee.value[e3]) return ee.value[e3](...t2);
57
57
  throw new Error(`执行失败:Function '${e3}' not found in custom component`);
58
58
  }, hasCustomFunction: function(e3) {
59
- return Y.value && "function" == typeof Y.value[e3];
59
+ return ee.value && "function" == typeof ee.value[e3];
60
60
  }, addRequiredClass: function() {
61
61
  requiredClass.value = addRequiredClassUtil();
62
62
  } }), (t2, o2) => {
63
- const n2 = u("el-form-item");
64
- return W.value.tittleShow ? (p(), l(n2, { key: 0, ref_key: "formItemRef", ref: Z, required: W.value.required, class: f(d(A)), "label-width": W.value.labelWidth, style: c(d(I)) }, { label: m(() => [W.value.tittleShow ? (p(), r("div", { key: 0, ref_key: "titleRef", ref: ee, style: c({ ...d(B) }) }, v(d(E)(W.value.title)), 5)) : s("", true)]), default: m(() => [L.value ? (p(), r("div", U, [(p(), l(g(L.value), { ref_key: "customRef", ref: Y, size: W.value.size, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: d(h)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": d(J), modelValue: H.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => H.value = e3), disabled: "disabled" === W.value.state, "additional-param-map": d(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: o2[1] || (o2[1] = (t3) => d(k)(H.value, e2.pageContext, e2.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: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: d(h)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": d(J), modelValue: H.value, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => H.value = e3), disabled: "disabled" === W.value.state, "additional-param-map": d(K), "component-id": X.value, onSetEntityValue: M, onSetCustomRules: N, onRestoreGridEdit: Q, onHandleEvent: te, onChange: o2[3] || (o2[3] = (t3) => d(k)(H.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
63
+ const a2 = u("el-form-item");
64
+ return K.value.tittleShow ? (p(), l(a2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: m(f(W)), "label-width": K.value.labelWidth, style: c(f(B)) }, d({ default: g(() => [N.value ? (p(), r("div", $, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, size: K.value.size, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: f(R)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": f(L), modelValue: I.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => I.value = e3), disabled: "disabled" === K.value.state, "additional-param-map": f(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: o2[1] || (o2[1] = (t3) => f(_)(I.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 2 }, [K.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: oe, style: c({ ...f(J) }), class: "amb-form-item-label" }, x(f(S)(K.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : N.value ? (p(), r("div", O, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: f(R)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": f(L), modelValue: I.value, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => I.value = e3), disabled: "disabled" === K.value.state, "additional-param-map": f(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: o2[3] || (o2[3] = (t3) => f(_)(I.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
65
65
  };
66
66
  } });
67
67
  export {
68
- $ as default
68
+ z as default
69
69
  };
@@ -1,102 +1,102 @@
1
- import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as r, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as c, unref as p, withCtx as s, createElementBlock as d, createCommentVNode as v, Fragment as f, createTextVNode as g, toDisplayString as m } from "vue";
2
- import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
3
- import { getDateShortCuts as y } from "../../../../utils/form/date-shortcuts.js";
4
- import { getModelFieldFromPageContext as C, getValueFromVariable as x, setVariableValue as b, getVariableValue as F, isDateDataType as k } from "../../../../utils/page-helper-util.js";
5
- import { handleAfterInitEvent as T, getCustomFunc as V, handleFormEvent as P } from "../../../../utils/events/event-util.js";
6
- import j from "../common/title-suffix-element.vue.js";
7
- import z from "dayjs";
8
- import { $t as R } from "../../../../utils/i18n-util.js";
9
- import { addRequiredClassUtil as Y } from "../../../../utils/common-util.js";
10
- import { DatePickerRange as _ } from "agilebuilder-ui";
11
- const D = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: D2 }) {
1
+ import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as r, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as c, unref as p, createSlots as d, withCtx as s, createElementVNode as v, createElementBlock as f, Fragment as g, createTextVNode as m, toDisplayString as h } from "vue";
2
+ import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
3
+ import { getDateShortCuts as C } from "../../../../utils/form/date-shortcuts.js";
4
+ import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as F, getVariableValue as k, isDateDataType as T } from "../../../../utils/page-helper-util.js";
5
+ import { handleAfterInitEvent as V, getCustomFunc as P, handleFormEvent as j } from "../../../../utils/events/event-util.js";
6
+ import z from "../common/title-suffix-element.vue.js";
7
+ import R from "dayjs";
8
+ import { $t as Y } from "../../../../utils/i18n-util.js";
9
+ import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
10
+ import { DatePickerRange as D } from "agilebuilder-ui";
11
+ const S = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: S2 }) {
12
12
  var _a;
13
- const S = e2, w = a(null), q = S.pageContext.entity ? S.pageContext.entity : {}, A = S.configure.runtime ? S.configure.runtime : {}, M = A.style, $ = A.class, B = A.headerStyle, I = A.titleExceedStyle, U = a(A.props ? A.props : {});
14
- let N = h(S.pageContext, S.configure, U.value.prop);
15
- if (S.pageContext.modelFieldsMap && N && N.length > 0 && "data" === N[0]) {
16
- const e3 = C(N, S.pageContext);
13
+ const w = e2, q = a(null), A = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {}, $ = M.style, B = M.class, I = M.headerStyle, U = M.titleExceedStyle, N = a(M.props ? M.props : {});
14
+ let W = y(w.pageContext, w.configure, N.value.prop);
15
+ if (w.pageContext.modelFieldsMap && W && W.length > 0 && "data" === W[0]) {
16
+ const e3 = x(W, w.pageContext);
17
17
  e3 && function(e4) {
18
18
  const a2 = e4.dataType;
19
- k(a2) && ("year" === U.value.dateType && "YYYY" === U.value.valueFormat || "month" === U.value.dateType && "YYYY-MM" === U.value.valueFormat) && (U.value.valueFormat = "x");
19
+ T(a2) && ("year" === N.value.dateType && "YYYY" === N.value.valueFormat || "month" === N.value.dateType && "YYYY-MM" === N.value.valueFormat) && (N.value.valueFormat = "x");
20
20
  }(e3);
21
21
  }
22
- let W = null, E = false;
23
- if (U.value.dateType && U.value.dateType.includes("range")) {
24
- E = true;
25
- let e3 = U.value.prop2;
26
- e3 && e3.startsWith("${") || (e3 = "${page." + S.configure.uuid + "-2}");
27
- const a2 = x(q, e3, null);
28
- if (e3 = e3.substring(2, e3.length - 1), W = e3.split("."), !(a2 || q.data && (q.data.id || q.data.ID)) && U.value.defaultValue2) {
29
- const e4 = x(q, U.value.defaultValue2);
30
- if (null != e4 && "" !== e4) b(q, W, e4);
31
- else if (((_a = U.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
32
- const e5 = U.value.moreDefaultValue2;
22
+ let E = null, O = false;
23
+ if (N.value.dateType && N.value.dateType.includes("range")) {
24
+ O = true;
25
+ let e3 = N.value.prop2;
26
+ e3 && e3.startsWith("${") || (e3 = "${page." + w.configure.uuid + "-2}");
27
+ const a2 = b(A, e3, null);
28
+ if (e3 = e3.substring(2, e3.length - 1), E = e3.split("."), !(a2 || A.data && (A.data.id || A.data.ID)) && N.value.defaultValue2) {
29
+ const e4 = b(A, N.value.defaultValue2);
30
+ if (null != e4 && "" !== e4) F(A, E, e4);
31
+ else if (((_a = N.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
32
+ const e5 = N.value.moreDefaultValue2;
33
33
  for (let a3 = 0; a3 < e5.length; a3++) {
34
- const l2 = x(q, e5[a3]);
34
+ const l2 = b(A, e5[a3]);
35
35
  if (null != l2 && "" !== l2) {
36
- b(q, W, l2);
36
+ F(A, E, l2);
37
37
  break;
38
38
  }
39
39
  }
40
40
  }
41
41
  }
42
42
  }
43
- const O = a(null), G = a(null), H = a(null);
44
- function J(e3, a2) {
43
+ const G = a(null), H = a(null), J = a(null);
44
+ function K(e3, a2) {
45
45
  if (!e3) return e3;
46
46
  if (a2) {
47
47
  "number" != typeof e3 || isNaN(e3) || 4 !== e3.toString().length || (e3 = e3.toString());
48
48
  try {
49
- const l2 = z(e3);
49
+ const l2 = R(e3);
50
50
  let t2 = null;
51
- return t2 = "x" === a2 ? l2.toDate().getTime() : z(e3).format(a2), t2;
51
+ return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
52
52
  } catch (a3) {
53
- return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${U.value.valueFormat}`), e3;
53
+ return console.error("日期值格式化错误", a3), console.error(`value: ${e3} ,valueFormat: ${N.value.valueFormat}`), e3;
54
54
  }
55
55
  }
56
56
  return e3;
57
57
  }
58
58
  if (l(() => {
59
59
  t(() => {
60
- const e3 = K.value;
61
- T(e3, S.pageContext, S.configure, { formItemRef: O.value, componentRef: G.value, titleRef: H.value, value: e3, entity: S.pageContext.entity.data, pageData: S.pageContext.entity.page });
60
+ const e3 = L.value;
61
+ V(e3, w.pageContext, w.configure, { formItemRef: G.value, componentRef: H.value, titleRef: J.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
62
62
  });
63
- }), N) {
64
- const e3 = F(q, N), a2 = J(e3, U.value.valueFormat);
65
- e3 !== a2 && b(q, N, a2);
63
+ }), W) {
64
+ const e3 = k(A, W), a2 = K(e3, N.value.valueFormat);
65
+ e3 !== a2 && F(A, W, a2);
66
66
  }
67
- if (W) {
68
- const e3 = F(q, W), a2 = J(e3, U.value.valueFormat);
69
- e3 !== a2 && b(q, W, a2);
67
+ if (E) {
68
+ const e3 = k(A, E), a2 = K(e3, N.value.valueFormat);
69
+ e3 !== a2 && F(A, E, a2);
70
70
  }
71
- const K = o({ get() {
72
- if (E) {
71
+ const L = o({ get() {
72
+ if (O) {
73
73
  const e3 = [];
74
- let a2 = F(q, N);
75
- e3.push(J(a2, U.value.valueFormat));
76
- let l2 = F(q, W);
77
- return e3.push(J(l2, U.value.valueFormat)), e3;
74
+ let a2 = k(A, W);
75
+ e3.push(K(a2, N.value.valueFormat));
76
+ let l2 = k(A, E);
77
+ return e3.push(K(l2, N.value.valueFormat)), e3;
78
78
  }
79
- return J(F(q, N), U.value.valueFormat);
79
+ return K(k(A, W), N.value.valueFormat);
80
80
  }, set(e3) {
81
- E ? Array.isArray(e3) ? (b(q, N, e3[0]), b(q, W, e3[1]), w.value = "") : null === e3 && (b(q, N, null), b(q, W, null)) : (b(q, N, e3), null != e3 && (w.value = ""));
82
- } }), L = a(y(U.value.dateScopeDetails, U.value.sourceType, U.value.dateType));
83
- if (U.value.shortcutsFunc) {
84
- const e3 = V(S.pageContext, U.value.shortcutsFunc);
81
+ O ? Array.isArray(e3) ? (F(A, W, e3[0]), F(A, E, e3[1]), q.value = "") : null === e3 && (F(A, W, null), F(A, E, null)) : (F(A, W, e3), null != e3 && (q.value = ""));
82
+ } }), Q = a(C(N.value.dateScopeDetails, N.value.sourceType, N.value.dateType));
83
+ if (N.value.shortcutsFunc) {
84
+ const e3 = P(w.pageContext, N.value.shortcutsFunc);
85
85
  if (e3) {
86
- let a2 = e3.apply(e3, [{ pageContext: S.pageContext, configureObj: S.configure }]);
86
+ let a2 = e3.apply(e3, [{ pageContext: w.pageContext, configureObj: w.configure }]);
87
87
  if (a2) {
88
- Array.isArray(a2) || (a2 = [a2]), L.value || (L.value = []);
89
- for (let e4 of a2) e4.text && e4.value && L.value.push(e4);
88
+ Array.isArray(a2) || (a2 = [a2]), Q.value || (Q.value = []);
89
+ for (let e4 of a2) e4.text && e4.value && Q.value.push(e4);
90
90
  }
91
91
  }
92
92
  }
93
- return D2({ addRequiredClass: function() {
94
- w.value = Y();
93
+ return S2({ addRequiredClass: function() {
94
+ q.value = _();
95
95
  } }), (a2, l2) => {
96
- const t2 = r("el-time-picker"), o2 = r("el-date-picker"), h2 = r("el-form-item");
97
- return n(), u(h2, { ref_key: "formItemRef", ref: O, required: U.value.required, class: c(p($) + (w.value ? " " + w.value : "")), "label-width": U.value.labelWidth, style: i(p(M)) }, { label: s(() => [U.value.tittleShow ? (n(), d("div", { key: 0, ref_key: "titleRef", ref: H, style: i({ ...p(B), ...p(I) }) }, [U.value.prefixType ? (n(), u(j, { key: 0, pageContext: e2.pageContext, property: U.value }, null, 8, ["pageContext", "property"])) : (n(), d(f, { key: 1 }, [g(m(p(R)(U.value.title)), 1)], 64))], 4)) : v("", true)]), default: s(() => ["time" == U.value.dateType || "timerange" == U.value.dateType ? (n(), u(t2, { key: 0, ref_key: "componentRef", ref: G, "is-range": "timerange" == U.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: U.value.clearable, disabled: "disabled" === U.value.state, readonly: "readonly" === U.value.state, size: U.value.size, placeholder: U.value.placeholder, "start-placeholder": U.value.placeholder, "end-placeholder": U.value.endPlaceholder ? U.value.endPlaceholder : U.value.placeholder, "unlink-panels": true, format: U.value.format, "value-format": U.value.valueFormat, modelValue: K.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => K.value = e3), shortcuts: L.value, type: U.value.dateType, onChange: l2[1] || (l2[1] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[4] || (l2[4] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[5] || (l2[5] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[6] || (l2[6] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== U.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(U.value.dateType) ? (n(), u(p(_), { key: 1, modelValue: K.value, "onUpdate:modelValue": l2[7] || (l2[7] = (e3) => K.value = e3), type: U.value.dateType, disabled: "disabled" === U.value.state, readonly: "readonly" === U.value.state, clearable: U.value.clearable, format: U.value.format, "value-format": U.value.valueFormat, placeholder: U.value.placeholder, "start-placeholder": U.value.placeholder, "end-placeholder": U.value.endPlaceholder ? U.value.endPlaceholder : U.value.placeholder, size: U.value.size, shortcuts: L.value, onChange: l2[8] || (l2[8] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[9] || (l2[9] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[10] || (l2[10] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[11] || (l2[11] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[12] || (l2[12] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[13] || (l2[13] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : (n(), u(o2, { key: 2, ref_key: "componentRef", ref: G, clearable: U.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === U.value.state, readonly: "readonly" === U.value.state, size: U.value.size, placeholder: U.value.placeholder, "start-placeholder": U.value.placeholder, "end-placeholder": U.value.endPlaceholder ? U.value.endPlaceholder : U.value.placeholder, format: U.value.format, "value-format": U.value.valueFormat, modelValue: K.value, "onUpdate:modelValue": l2[14] || (l2[14] = (e3) => K.value = e3), shortcuts: L.value, type: U.value.dateType, onChange: l2[15] || (l2[15] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[16] || (l2[16] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[17] || (l2[17] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[18] || (l2[18] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[19] || (l2[19] = (a3) => p(P)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[20] || (l2[20] = (a3) => p(P)(a3, e2.pageContext, e2.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"]);
96
+ const t2 = r("el-time-picker"), o2 = r("el-date-picker"), y2 = r("el-form-item");
97
+ return n(), u(y2, { ref_key: "formItemRef", ref: G, required: N.value.required, class: c(p(B) + (q.value ? " " + q.value : "")), "label-width": N.value.labelWidth, style: i(p($)) }, d({ default: s(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), u(t2, { key: 0, ref_key: "componentRef", ref: H, "is-range": "timerange" == N.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: N.value.clearable, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, "unlink-panels": true, format: N.value.format, "value-format": N.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => L.value = e3), shortcuts: Q.value, type: N.value.dateType, onChange: l2[1] || (l2[1] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[4] || (l2[4] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[5] || (l2[5] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[6] || (l2[6] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== N.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(N.value.dateType) ? (n(), u(p(D), { key: 1, modelValue: L.value, "onUpdate:modelValue": l2[7] || (l2[7] = (e3) => L.value = e3), type: N.value.dateType, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, clearable: N.value.clearable, format: N.value.format, "value-format": N.value.valueFormat, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, size: N.value.size, shortcuts: Q.value, onChange: l2[8] || (l2[8] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[9] || (l2[9] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[10] || (l2[10] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[11] || (l2[11] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[12] || (l2[12] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[13] || (l2[13] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : (n(), u(o2, { key: 2, ref_key: "componentRef", ref: H, clearable: N.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, format: N.value.format, "value-format": N.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": l2[14] || (l2[14] = (e3) => L.value = e3), shortcuts: Q.value, type: N.value.dateType, onChange: l2[15] || (l2[15] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[16] || (l2[16] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[17] || (l2[17] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[18] || (l2[18] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[19] || (l2[19] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[20] || (l2[20] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [N.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: J, style: i({ ...p(I), ...p(U) }) }, [N.value.prefixType ? (n(), u(z, { key: 0, pageContext: e2.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), f(g, { key: 1 }, [m(h(p(Y)(N.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
98
98
  };
99
99
  } });
100
100
  export {
101
- D as default
101
+ S as default
102
102
  };
@@ -1,55 +1,55 @@
1
- import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as n, watch as a, resolveComponent as i, createBlock as p, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d, withCtx as f, createVNode as m, createElementBlock as c, createCommentVNode as g, Fragment as v, createTextVNode as y, toDisplayString as x } from "vue";
2
- import { getFormModelFields as h } from "../../../../utils/page-init-util.js";
3
- import { handleAfterInitEvent as C, handleFormEvent as S } from "../../../../utils/events/event-util.js";
1
+ import { defineComponent as e, ref as t, onMounted as l, nextTick as o, computed as a, watch as n, resolveComponent as i, createBlock as p, openBlock as u, normalizeStyle as r, normalizeClass as s, unref as d, createSlots as m, withCtx as f, createVNode as c, createElementVNode as g, createElementBlock as v, Fragment as y, createTextVNode as x, toDisplayString as h } from "vue";
2
+ import { getFormModelFields as C } from "../../../../utils/page-init-util.js";
3
+ import { handleAfterInitEvent as S, handleFormEvent as b } from "../../../../utils/events/event-util.js";
4
4
  import F from "../common/title-suffix-element.vue.js";
5
5
  import { $t as I } from "../../../../utils/i18n-util.js";
6
- import { setVariableValue as b, getVariableValue as k, getFormPropName as w, getValueFromVariable as z } from "../../../../utils/page-helper-util.js";
7
- import { addRequiredClassUtil as R } from "../../../../utils/common-util.js";
8
- const j = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
9
- const _ = e2, T = t(null), q = t([]), W = _.pageContext.entity ? _.pageContext.entity : {};
10
- W.data || (W.data = {});
11
- const M = W.data, O = W.page;
12
- let $ = h(_.pageContext, _.configure);
13
- const D = $.length > 0 ? $[$.length - 1] : _.configure.uuid, E = _.configure.runtime ? _.configure.runtime : {}, V = t(E.props ? E.props : {}), A = E.style, B = E.class, G = E.headerStyle, H = E.titleExceedStyle;
14
- E.props.deptScope && ("field" == E.props.deptScope && E.props.deptScopeField ? (Y(), function(e3, t2) {
6
+ import { setVariableValue as k, getVariableValue as w, getFormPropName as z, getValueFromVariable as R } from "../../../../utils/page-helper-util.js";
7
+ import { addRequiredClassUtil as j } from "../../../../utils/common-util.js";
8
+ const _ = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
9
+ const T = e2, q = t(null), W = t([]), M = T.pageContext.entity ? T.pageContext.entity : {};
10
+ M.data || (M.data = {});
11
+ const O = M.data, $ = M.page;
12
+ let D = C(T.pageContext, T.configure);
13
+ const E = D.length > 0 ? D[D.length - 1] : T.configure.uuid, V = T.configure.runtime ? T.configure.runtime : {}, A = t(V.props ? V.props : {}), B = V.style, G = V.class, H = V.headerStyle, J = V.titleExceedStyle;
14
+ V.props.deptScope && ("field" == V.props.deptScope && V.props.deptScopeField ? (Z(), function(e3, t2) {
15
15
  if (0 === e3.indexOf("${fixed.")) return;
16
16
  const l2 = e3.match(/\${(.*?)}/);
17
17
  if (!l2) return;
18
18
  const o2 = l2 ? l2[1].split(".") : [];
19
- o2 && o2.length > 0 && a(() => o2.reduce((e4, t3) => e4[t3], _.pageContext.entity), (e4, l3) => {
19
+ o2 && o2.length > 0 && n(() => o2.reduce((e4, t3) => e4[t3], T.pageContext.entity), (e4, l3) => {
20
20
  t2(e4, l3);
21
21
  });
22
- }(E.props.deptScopeField, (e3, t2) => {
23
- Y();
24
- })) : "depts" == E.props.deptScope && E.props.deptScopeCodes && (q.value = E.props.deptScopeCodes.split(",")));
25
- const J = t(null), K = t(null), L = t(null);
22
+ }(V.props.deptScopeField, (e3, t2) => {
23
+ Z();
24
+ })) : "depts" == V.props.deptScope && V.props.deptScopeCodes && (W.value = V.props.deptScopeCodes.split(",")));
25
+ const K = t(null), L = t(null), N = t(null);
26
26
  l(() => {
27
27
  o(() => {
28
- const e3 = M ? M[D] : null;
29
- C(e3, _.pageContext, _.configure, { formItemRef: J.value, componentRef: K.value, titleRef: L.value, value: e3, entity: _.pageContext.entity.data, pageData: _.pageContext.entity.page });
28
+ const e3 = O ? O[E] : null;
29
+ S(e3, T.pageContext, T.configure, { formItemRef: K.value, componentRef: L.value, titleRef: N.value, value: e3, entity: T.pageContext.entity.data, pageData: T.pageContext.entity.page });
30
30
  });
31
31
  });
32
- const N = n({ get: () => k(W, $), set(e3) {
33
- b(W, $, e3), null != e3 && (T.value = "");
34
- } }), P = V.value.autoSetFields ? V.value.autoSetFields : [];
35
- let Q = null;
36
- function U(e3, t2) {
37
- Q ? Q === e3 && ($.length > 0 ? S(k(W, $), _.pageContext, _.configure, "change") : S(t2, _.pageContext, _.configure, "change")) : e3 === D && S(t2, _.pageContext, _.configure, "change");
38
- }
39
- function X() {
40
- S(null, _.pageContext, _.configure, "click");
32
+ const P = a({ get: () => w(M, D), set(e3) {
33
+ k(M, D, e3), null != e3 && (q.value = "");
34
+ } }), Q = A.value.autoSetFields ? A.value.autoSetFields : [];
35
+ let U = null;
36
+ function X(e3, t2) {
37
+ U ? U === e3 && (D.length > 0 ? b(w(M, D), T.pageContext, T.configure, "change") : b(t2, T.pageContext, T.configure, "change")) : e3 === E && b(t2, T.pageContext, T.configure, "change");
41
38
  }
42
39
  function Y() {
43
- const e3 = z(_.pageContext.entity, E.props.deptScopeField);
44
- q.value = e3 ? e3.split(",") : [];
40
+ b(null, T.pageContext, T.configure, "click");
41
+ }
42
+ function Z() {
43
+ const e3 = R(T.pageContext.entity, V.props.deptScopeField);
44
+ W.value = e3 ? e3.split(",") : [];
45
45
  }
46
- return P.length - 1 > 0 && P[P.length - 1] && P[P.length - 1].model && (Q = w(P[P.length - 1].model)), j2({ addRequiredClass: function() {
47
- T.value = R();
46
+ return Q.length - 1 > 0 && Q[Q.length - 1] && Q[Q.length - 1].model && (U = z(Q[Q.length - 1].model)), _2({ addRequiredClass: function() {
47
+ q.value = j();
48
48
  } }), (t2, l2) => {
49
- const o2 = i("OrganizationInput"), n2 = i("el-form-item");
50
- return u(), p(n2, { ref_key: "formItemRef", ref: J, required: V.value.required, class: s(d(B) + (T.value ? " " + T.value : "")), "label-width": V.value.labelWidth, style: r(d(A)) }, { label: f(() => [V.value.tittleShow ? (u(), c("div", { key: 0, ref_key: "titleRef", ref: L, style: r({ ...d(G), ...d(H) }) }, [V.value.prefixType ? (u(), p(F, { key: 0, pageContext: e2.pageContext, property: V.value }, null, 8, ["pageContext", "property"])) : (u(), c(v, { key: 1 }, [y(x(d(I)(V.value.title)), 1)], 64))], 4)) : g("", true)]), default: f(() => [m(o2, { ref_key: "componentRef", ref: K, disabled: "disabled" == V.value.state, multiple: V.value.multiple, treeType: V.value.treeType, value: N.value, models: d(M), departmentInfo: q.value, limitFilterColumn: V.value.limitFilterColumn, pageModels: d(O), fields: d(P), inputShowWay: V.value.inputShowWay, autosize: V.value.autosize, size: V.value.size, displayItem: V.value.displayItem, separator: V.value.separator, onSetValue: U, onShowTree: X }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "inputShowWay", "autosize", "size", "displayItem", "separator"])]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
49
+ const o2 = i("OrganizationInput"), a2 = i("el-form-item");
50
+ return u(), p(a2, { ref_key: "formItemRef", ref: K, required: A.value.required, class: s(d(G) + (q.value ? " " + q.value : "")), "label-width": A.value.labelWidth, style: r(d(B)) }, m({ default: f(() => [c(o2, { ref_key: "componentRef", ref: L, disabled: "disabled" == A.value.state, multiple: A.value.multiple, treeType: A.value.treeType, value: P.value, models: d(O), departmentInfo: W.value, limitFilterColumn: A.value.limitFilterColumn, pageModels: d($), fields: d(Q), inputShowWay: A.value.inputShowWay, autosize: A.value.autosize, size: A.value.size, displayItem: A.value.displayItem, separator: A.value.separator, onSetValue: X, onShowTree: Y }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "inputShowWay", "autosize", "size", "displayItem", "separator"])]), _: 2 }, [A.value.tittleShow ? { name: "label", fn: f(() => [g("div", { ref_key: "titleRef", ref: N, style: r({ ...d(H), ...d(J) }), class: "amb-form-item-label" }, [A.value.prefixType ? (u(), p(F, { key: 0, pageContext: e2.pageContext, property: A.value }, null, 8, ["pageContext", "property"])) : (u(), v(y, { key: 1 }, [x(h(d(I)(A.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
51
51
  };
52
52
  } });
53
53
  export {
54
- j as default
54
+ _ as default
55
55
  };