@kengic/vue 0.6.11-beta.1 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  var ve = Object.defineProperty;
2
2
  var be = (e, t, r) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var p = (e, t, r) => (be(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { h, nextTick, createVNode, defineComponent, toRaw, unref, inject, getCurrentInstance, markRaw, ref, watch, reactive, effectScope, isRef, isReactive, toRef, computed, onUnmounted, toRefs, Fragment, isVNode, createTextVNode, provide, onMounted, mergeProps, Teleport, getCurrentScope, onScopeDispose } from "vue";
4
+ import { h, nextTick, createVNode, defineComponent, toRaw, unref, inject, getCurrentInstance, markRaw, ref, watch, reactive, effectScope, isRef, isReactive, toRef, computed, onUnmounted, toRefs, Fragment, isVNode, createTextVNode, provide, onMounted, mergeProps, onActivated, onDeactivated, Teleport, getCurrentScope, onScopeDispose } from "vue";
5
5
  import { Modal, Spin, Tooltip, Select, SelectOption, Button, Progress, Form, Checkbox, Divider, Row, Col, DatePicker, Input, InputNumber, Radio, Switch, Textarea, message, Drawer, Tag, Tabs, Dropdown, Menu, Table, Pagination, TableSummary, Upload, ConfigProvider, Transfer, Card, TabPane } from "ant-design-vue";
6
6
  const index$7 = "";
7
7
  let _httpClient = null;
@@ -10543,29 +10543,29 @@ const getProps$p = () => ({
10543
10543
  const n = useKg(), o = useKgVar(), i = useKgButton(), s = useKgTable(), l = useKgSubmit(), c = useKgSearch();
10544
10544
  i.onSubmitSave(async () => (await ue(), !1)), i.onSubmitCancel(async () => (await oe(), !1)), _useFormModel$1();
10545
10545
  const u = computed(() => o.isDeleting.value && T.value.length === 0 && M.value.length === 0), d = computed(() => l.store.isLoading(o.formID)), m = computed(() => o.store.getVarSubmitConfig(o.formID)), v = computed(() => o.store.getVarSubmitFieldsForCreateKey(o.formID)), C = computed(() => o.store.getVarSubmitFieldsForCreateNotKey(o.formID)), g = computed(() => o.store.getVarSubmitFieldsForUpdateKey(o.formID)), _ = computed(() => o.store.getVarSubmitFieldsForUpdateNotKey(o.formID)), b = computed(() => o.store.getVarSubmitFieldsForCopyKey(o.formID)), y = computed(() => o.store.getVarSubmitFieldsForCopyNotKey(o.formID)), k = computed(() => o.store.getVarSubmitFieldsForDelete(o.formID)), T = computed(() => {
10546
- var L, B, q;
10546
+ var L, B, z;
10547
10547
  switch (!0) {
10548
10548
  case o.isCreating.value:
10549
10549
  return (L = v.value) != null ? L : [];
10550
10550
  case o.isUpdating.value:
10551
10551
  return (B = g.value) != null ? B : [];
10552
10552
  case o.isCopying.value:
10553
- return (q = b.value) != null ? q : [];
10553
+ return (z = b.value) != null ? z : [];
10554
10554
  case o.isDeleting.value:
10555
10555
  return [];
10556
10556
  }
10557
10557
  return [];
10558
10558
  }), M = computed(() => {
10559
- var L, B, q, ee;
10559
+ var L, B, z, Z;
10560
10560
  switch (!0) {
10561
10561
  case o.isCreating.value:
10562
10562
  return (L = C.value) != null ? L : [];
10563
10563
  case o.isUpdating.value:
10564
10564
  return (B = _.value) != null ? B : [];
10565
10565
  case o.isCopying.value:
10566
- return (q = y.value) != null ? q : [];
10566
+ return (z = y.value) != null ? z : [];
10567
10567
  case o.isDeleting.value:
10568
- return (ee = k.value) != null ? ee : [];
10568
+ return (Z = k.value) != null ? Z : [];
10569
10569
  }
10570
10570
  return [];
10571
10571
  }), E = computed(() => !!o.store.isCreatingRequesting(o.formID) || !!o.store.isUpdatingRequesting(o.formID) || !!o.store.isCopyingRequesting(o.formID) || !!o.store.isDeletingRequesting(o.formID)), N = computed(() => E.value || d.value), I = computed(() => d.value), A = ref({
@@ -10590,7 +10590,7 @@ const getProps$p = () => ({
10590
10590
  } = _useLayout(), {
10591
10591
  getDefaultWidth: Q
10592
10592
  } = _useDefaultWidth(), X = computed(() => {
10593
- var L, B, q;
10593
+ var L, B, z;
10594
10594
  switch (H.value) {
10595
10595
  case "horizontal":
10596
10596
  switch ((L = m.value) == null ? void 0 : L.label_col_unit) {
@@ -10601,7 +10601,7 @@ const getProps$p = () => ({
10601
10601
  default:
10602
10602
  return {
10603
10603
  style: {
10604
- width: `${(q = m.value) == null ? void 0 : q.label_col}px`
10604
+ width: `${(z = m.value) == null ? void 0 : z.label_col}px`
10605
10605
  }
10606
10606
  };
10607
10607
  }
@@ -10635,8 +10635,8 @@ const getProps$p = () => ({
10635
10635
  });
10636
10636
  function te() {
10637
10637
  var B;
10638
- const L = watch(l.model, (q) => {
10639
- q && Object.keys(q).length > 0 && (setTimeout(() => L()), l.store.emit(o.formID, "open", {
10638
+ const L = watch(l.model, (z) => {
10639
+ z && Object.keys(z).length > 0 && (setTimeout(() => L()), l.store.emit(o.formID, "open", {
10640
10640
  isCreating: o.isCreating.value,
10641
10641
  isUpdating: o.isUpdating.value,
10642
10642
  isCopying: o.isCopying.value,
@@ -10710,12 +10710,12 @@ const getProps$p = () => ({
10710
10710
  await fe();
10711
10711
  break;
10712
10712
  }
10713
- } catch (q) {
10714
- KgUtil.throwIfNotFormError(q);
10713
+ } catch (z) {
10714
+ KgUtil.throwIfNotFormError(z);
10715
10715
  }
10716
10716
  }
10717
10717
  async function de() {
10718
- var B, q, ee, ne, se, ie;
10718
+ var B, z, Z, ne, se, ie;
10719
10719
  const L = (B = o.varButtonCreate.value) == null ? void 0 : B.cmd;
10720
10720
  if (!L) {
10721
10721
  KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10725,7 +10725,7 @@ const getProps$p = () => ({
10725
10725
  }
10726
10726
  o.store.setIsCreatingRequesting(o.formID, !0);
10727
10727
  try {
10728
- let Z = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((ee = (q = o.varButtonCreate.value) == null ? void 0 : q.cmd_prm) != null ? ee : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10728
+ let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (z = o.varButtonCreate.value) == null ? void 0 : z.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10729
10729
  if (await l.store.emit(o.formID, "beforeRequest", {
10730
10730
  isCreating: o.isCreating.value,
10731
10731
  isUpdating: o.isUpdating.value,
@@ -10734,14 +10734,14 @@ const getProps$p = () => ({
10734
10734
  row: s.selectedFirstRow.value,
10735
10735
  rows: s.selectedRows.value,
10736
10736
  model: l.model,
10737
- params: Z,
10737
+ params: ee,
10738
10738
  data: le
10739
10739
  }))
10740
10740
  return;
10741
10741
  await httpClient().request({
10742
10742
  method: (se = (ne = o.varButtonCreate.value) == null ? void 0 : ne.cmd_method) != null ? se : "POST",
10743
10743
  url: L,
10744
- params: Z.value,
10744
+ params: ee.value,
10745
10745
  data: le.value
10746
10746
  }), ((ie = o.varButtonCreate.value) == null ? void 0 : ie.show_success_message_flg) !== 0 && message.success(D.title.value + n.t("kg.succeed")), await l.store.emit(o.formID, "ok", {
10747
10747
  isCreating: o.isCreating.value,
@@ -10751,14 +10751,14 @@ const getProps$p = () => ({
10751
10751
  row: s.selectedFirstRow.value,
10752
10752
  model: l.model
10753
10753
  }), o.store.setIsCreating(o.formID, !1), c.search(!0);
10754
- } catch (Z) {
10755
- console.error(Z), l.store.emit(o.formID, "error", Z);
10754
+ } catch (ee) {
10755
+ console.error(ee), l.store.emit(o.formID, "error", ee);
10756
10756
  } finally {
10757
10757
  o.store.setIsCreatingRequesting(o.formID, !1);
10758
10758
  }
10759
10759
  }
10760
10760
  async function re() {
10761
- var B, q, ee, ne, se, ie;
10761
+ var B, z, Z, ne, se, ie;
10762
10762
  const L = (B = o.varButtonUpdate.value) == null ? void 0 : B.cmd;
10763
10763
  if (!L) {
10764
10764
  KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10768,7 +10768,7 @@ const getProps$p = () => ({
10768
10768
  }
10769
10769
  try {
10770
10770
  o.store.setIsUpdatingRequesting(o.formID, !0);
10771
- let Z = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((ee = (q = o.varButtonUpdate.value) == null ? void 0 : q.cmd_prm) != null ? ee : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10771
+ let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (z = o.varButtonUpdate.value) == null ? void 0 : z.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10772
10772
  if (await l.store.emit(o.formID, "beforeRequest", {
10773
10773
  isCreating: o.isCreating.value,
10774
10774
  isUpdating: o.isUpdating.value,
@@ -10777,14 +10777,14 @@ const getProps$p = () => ({
10777
10777
  row: s.selectedRow.value,
10778
10778
  rows: s.selectedRows.value,
10779
10779
  model: l.model,
10780
- params: Z,
10780
+ params: ee,
10781
10781
  data: le
10782
10782
  }))
10783
10783
  return;
10784
10784
  await httpClient().request({
10785
10785
  method: (se = (ne = o.varButtonUpdate.value) == null ? void 0 : ne.cmd_method) != null ? se : "POST",
10786
10786
  url: L,
10787
- params: Z.value,
10787
+ params: ee.value,
10788
10788
  data: le.value
10789
10789
  }), ((ie = o.varButtonUpdate.value) == null ? void 0 : ie.show_success_message_flg) !== 0 && message.success(n.t("kg.updateSuccess")), await l.store.emit(o.formID, "ok", {
10790
10790
  isCreating: o.isCreating.value,
@@ -10794,14 +10794,14 @@ const getProps$p = () => ({
10794
10794
  row: s.selectedFirstRow.value,
10795
10795
  model: l.model
10796
10796
  }), o.store.setIsUpdating(o.formID, !1), c.search();
10797
- } catch (Z) {
10798
- console.error(Z), l.store.emit(o.formID, "error", Z);
10797
+ } catch (ee) {
10798
+ console.error(ee), l.store.emit(o.formID, "error", ee);
10799
10799
  } finally {
10800
10800
  o.store.setIsUpdatingRequesting(o.formID, !1);
10801
10801
  }
10802
10802
  }
10803
10803
  async function ce() {
10804
- var B, q, ee, ne, se, ie, Z, le;
10804
+ var B, z, Z, ne, se, ie, ee, le;
10805
10805
  const L = (B = o.varButtonCopy.value) == null ? void 0 : B.cmd;
10806
10806
  if (!L) {
10807
10807
  KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10811,7 +10811,7 @@ const getProps$p = () => ({
10811
10811
  }
10812
10812
  try {
10813
10813
  o.store.setIsCopyingRequesting(o.formID, !0);
10814
- let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((ee = (q = o.varButtonCopy.value) == null ? void 0 : q.cmd_prm) != null ? ee : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
10814
+ let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (z = o.varButtonCopy.value) == null ? void 0 : z.cmd_prm) != null ? Z : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
10815
10815
  ...(ne = s.selectedFirstRow.value) != null ? ne : {},
10816
10816
  ...toRaw(l.model.value)
10817
10817
  }, o.formID, r));
@@ -10828,7 +10828,7 @@ const getProps$p = () => ({
10828
10828
  }))
10829
10829
  return;
10830
10830
  await httpClient().request({
10831
- method: (Z = (ie = o.varButtonCopy.value) == null ? void 0 : ie.cmd_method) != null ? Z : "POST",
10831
+ method: (ee = (ie = o.varButtonCopy.value) == null ? void 0 : ie.cmd_method) != null ? ee : "POST",
10832
10832
  url: L,
10833
10833
  params: ge.value,
10834
10834
  data: pe.value
@@ -10847,7 +10847,7 @@ const getProps$p = () => ({
10847
10847
  }
10848
10848
  }
10849
10849
  async function fe() {
10850
- var B, q, ee, ne, se, ie;
10850
+ var B, z, Z, ne, se, ie;
10851
10851
  const L = (B = o.varButtonDelete.value) == null ? void 0 : B.cmd;
10852
10852
  if (!L) {
10853
10853
  KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10857,11 +10857,11 @@ const getProps$p = () => ({
10857
10857
  }
10858
10858
  try {
10859
10859
  o.store.setIsDeletingRequesting(o.formID, !0);
10860
- let Z = ref({
10861
- ids: (ee = (q = s.selectedRows.value) == null ? void 0 : q.map((pe) => {
10860
+ let ee = ref({
10861
+ ids: (Z = (z = s.selectedRows.value) == null ? void 0 : z.map((pe) => {
10862
10862
  var me, _e, he;
10863
10863
  return (he = pe[(_e = (me = o.varButtonDelete.value) == null ? void 0 : me.del_param_clm) != null ? _e : "id"]) != null ? he : "";
10864
- })) != null ? ee : []
10864
+ })) != null ? Z : []
10865
10865
  }), le = ref({});
10866
10866
  if (await l.store.emit(o.formID, "beforeRequest", {
10867
10867
  isCreating: o.isCreating.value,
@@ -10871,14 +10871,14 @@ const getProps$p = () => ({
10871
10871
  row: s.selectedFirstRow.value,
10872
10872
  rows: s.selectedRows.value,
10873
10873
  model: l.model,
10874
- params: Z,
10874
+ params: ee,
10875
10875
  data: le
10876
10876
  }))
10877
10877
  return;
10878
10878
  await httpClient().request({
10879
10879
  method: (se = (ne = o.varButtonDelete.value) == null ? void 0 : ne.cmd_method) != null ? se : "DELETE",
10880
10880
  url: L,
10881
- params: Z.value,
10881
+ params: ee.value,
10882
10882
  data: le.value
10883
10883
  }, {
10884
10884
  joinParamsToUrl: !0
@@ -10890,15 +10890,15 @@ const getProps$p = () => ({
10890
10890
  row: s.selectedFirstRow.value,
10891
10891
  model: l.model
10892
10892
  }), o.store.setIsDeleting(o.formID, !1), c.search(!0);
10893
- } catch (Z) {
10894
- console.error(Z), l.store.emit(o.formID, "error", Z);
10893
+ } catch (ee) {
10894
+ console.error(ee), l.store.emit(o.formID, "error", ee);
10895
10895
  } finally {
10896
10896
  o.store.setIsDeletingRequesting(o.formID, !1);
10897
10897
  }
10898
10898
  }
10899
10899
  function K(L) {
10900
- var q, ee;
10901
- const B = (ee = (q = a == null ? void 0 : a.KgSubmit) == null ? void 0 : q["KgForm.Item"]) == null ? void 0 : ee[L.var_nam];
10900
+ var z, Z;
10901
+ const B = (Z = (z = a == null ? void 0 : a.KgSubmit) == null ? void 0 : z["KgForm.Item"]) == null ? void 0 : Z[L.var_nam];
10902
10902
  return isFunction$2(B) ? createVNode(KgForm.Item, {
10903
10903
  kgVarName: L.var_nam,
10904
10904
  kgContext: KG_FORM_CONTEXT.SUBMIT,
@@ -10909,14 +10909,14 @@ const getProps$p = () => ({
10909
10909
  varName: ne,
10910
10910
  props: se,
10911
10911
  model: ie,
10912
- varVariableConfig: Z,
10912
+ varVariableConfig: ee,
10913
10913
  varProfileDetail: le,
10914
10914
  varSubmitField: ge
10915
10915
  }) => B({
10916
10916
  varName: ne,
10917
10917
  props: se,
10918
10918
  model: ie,
10919
- varVariableConfig: Z,
10919
+ varVariableConfig: ee,
10920
10920
  varProfileDetail: le,
10921
10921
  varSubmitField: ge
10922
10922
  })
@@ -10935,7 +10935,7 @@ const getProps$p = () => ({
10935
10935
  kgMaxWidth: $.value,
10936
10936
  kgWidth: P.value,
10937
10937
  kgDisabled: w.value,
10938
- "onUpdate:kgWidth": (q) => A.value.kgWidth = q
10938
+ "onUpdate:kgWidth": (z) => A.value.kgWidth = z
10939
10939
  }, {
10940
10940
  default: () => [createVNode(Spin, {
10941
10941
  spinning: d.value
@@ -10964,7 +10964,7 @@ const getProps$p = () => ({
10964
10964
  })]
10965
10965
  });
10966
10966
  }
10967
- function z() {
10967
+ function W() {
10968
10968
  let L, B;
10969
10969
  return createVNode("div", null, [createVNode(Button, {
10970
10970
  type: "primary",
@@ -10983,7 +10983,7 @@ const getProps$p = () => ({
10983
10983
  default: () => [B]
10984
10984
  })]);
10985
10985
  }
10986
- function W() {
10986
+ function q() {
10987
10987
  return createVNode("div", {
10988
10988
  title: D.title.value
10989
10989
  }, [D.title.value]);
@@ -11010,10 +11010,10 @@ const getProps$p = () => ({
11010
11010
  class: G.value,
11011
11011
  "kg-frm_id": o.formID
11012
11012
  }, {
11013
- title: W,
11013
+ title: q,
11014
11014
  extra: J,
11015
11015
  default: U,
11016
- footer: z
11016
+ footer: W
11017
11017
  });
11018
11018
  }
11019
11019
  }), KgYesOrNo$1 = "", getProps$o = () => ({
@@ -11048,6 +11048,7 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11048
11048
  tableWidthMap: /* @__PURE__ */ new Map(),
11049
11049
  rowDoubleClickListenersMap: /* @__PURE__ */ new Map(),
11050
11050
  beforeRetrieveListenersMap: /* @__PURE__ */ new Map(),
11051
+ beforeSetDatasListenersMap: /* @__PURE__ */ new Map(),
11051
11052
  retrieveListenersMap: /* @__PURE__ */ new Map()
11052
11053
  }),
11053
11054
  getters: {
@@ -11119,6 +11120,12 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11119
11120
  this.beforeRetrieveListenersMap.set(e, [...a != null ? a : [], r]);
11120
11121
  }
11121
11122
  break;
11123
+ case "beforeSetDatas":
11124
+ {
11125
+ const a = this.beforeSetDatasListenersMap.get(e);
11126
+ this.beforeSetDatasListenersMap.set(e, [...a != null ? a : [], r]);
11127
+ }
11128
+ break;
11122
11129
  case "retrieve":
11123
11130
  {
11124
11131
  const a = this.retrieveListenersMap.get(e);
@@ -11143,6 +11150,13 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11143
11150
  } else
11144
11151
  this.beforeRetrieveListenersMap.set(e, []);
11145
11152
  break;
11153
+ case "beforeSetDatas":
11154
+ if (r) {
11155
+ const a = this.beforeSetDatasListenersMap.get(e);
11156
+ this.beforeSetDatasListenersMap.set(e, without$1(a, r));
11157
+ } else
11158
+ this.beforeSetDatasListenersMap.set(e, []);
11159
+ break;
11146
11160
  case "retrieve":
11147
11161
  if (r) {
11148
11162
  const a = this.retrieveListenersMap.get(e);
@@ -11161,6 +11175,9 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11161
11175
  case "beforeRetrieve":
11162
11176
  a = this.beforeRetrieveListenersMap.get(e);
11163
11177
  break;
11178
+ case "beforeSetDatas":
11179
+ a = this.beforeSetDatasListenersMap.get(e);
11180
+ break;
11164
11181
  case "retrieve":
11165
11182
  a = this.retrieveListenersMap.get(e);
11166
11183
  break;
@@ -11238,6 +11255,7 @@ function useKgTable(e) {
11238
11255
  profileFormID: C,
11239
11256
  onRowDoubleClick: onEventFactory(t.formID, r, "rowDoubleClick"),
11240
11257
  onBeforeRetrieve: onEventFactory(t.formID, r, "beforeRetrieve"),
11258
+ onBeforeSetDatas: onEventFactory(t.formID, r, "beforeSetDatas"),
11241
11259
  onRetrieve: onEventFactory(t.formID, r, "retrieve")
11242
11260
  };
11243
11261
  }
@@ -11970,12 +11988,12 @@ const KgTable$1 = "", getProps$g = () => ({
11970
11988
  switch (K) {
11971
11989
  case "setRowSelect":
11972
11990
  if (U[0] === s.formID) {
11973
- const z = U[1], W = U[2], J = z[u.id.value];
11991
+ const W = U[1], q = U[2], J = W[u.id.value];
11974
11992
  switch (!0) {
11975
- case (W && !$.value.includes(J)):
11993
+ case (q && !$.value.includes(J)):
11976
11994
  H([...$.value, J]);
11977
11995
  break;
11978
- case (!W && $.value.includes(J)):
11996
+ case (!q && $.value.includes(J)):
11979
11997
  H(without$1($.value, J));
11980
11998
  break;
11981
11999
  }
@@ -11994,20 +12012,20 @@ const KgTable$1 = "", getProps$g = () => ({
11994
12012
  var K, U;
11995
12013
  return (U = (K = s.varButtonSearch.value) == null ? void 0 : K.cmd) != null ? U : null;
11996
12014
  }), k = computed(() => {
11997
- var U, z, W, J, L, B, q;
12015
+ var U, W, q, J, L, B, z;
11998
12016
  let K = {
11999
12017
  pageNo: P.pageIndex,
12000
12018
  pageSize: P.pageSize,
12001
12019
  ...V,
12002
- ...(z = (U = l.model) == null ? void 0 : U.value) != null ? z : {}
12020
+ ...(W = (U = l.model) == null ? void 0 : U.value) != null ? W : {}
12003
12021
  };
12004
12022
  return s.varButtonSearch.value && (K = {
12005
12023
  ...K,
12006
- ...KgVarUtil.parseCommandParameter((J = (W = s.varButtonSearch.value) == null ? void 0 : W.cmd_prm) != null ? J : "")
12024
+ ...KgVarUtil.parseCommandParameter((J = (q = s.varButtonSearch.value) == null ? void 0 : q.cmd_prm) != null ? J : "")
12007
12025
  }), (L = s.varGridConfig.value) != null && L.cmd_prm && (K = {
12008
12026
  ...K,
12009
12027
  ...KgVarUtil.parseCommandParameter((B = s.varGridConfig.value.cmd_prm) != null ? B : "")
12010
- }), ((q = s.varGridConfig.value) == null ? void 0 : q.convert_sort_field_to_under_score_flg) === 1 && K.column && (K.column = snakeCase$1(K.column)), K;
12028
+ }), ((z = s.varGridConfig.value) == null ? void 0 : z.convert_sort_field_to_under_score_flg) === 1 && K.column && (K.column = snakeCase$1(K.column)), K;
12011
12029
  }), T = computed(() => _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value || P.total === 0), M = computed(() => _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value), E = computed(() => {
12012
12030
  var K;
12013
12031
  return !!((K = n == null ? void 0 : n.KgTable) != null && K.expandedRowRender);
@@ -12050,8 +12068,8 @@ const KgTable$1 = "", getProps$g = () => ({
12050
12068
  });
12051
12069
  watch(u.pageSizeOptions, (K) => {
12052
12070
  K.length > 0 && !K.includes(P.pageSize) && (P.pageSize = u.pageSizeOption.value);
12053
- }), watch([y, u.isReadAutomatically, l.isReady], ([K, U, z]) => {
12054
- K && U && z && !u.store.getIsRetrieved(s.formID) && G(!0);
12071
+ }), watch([y, u.isReadAutomatically, l.isReady], ([K, U, W]) => {
12072
+ K && U && W && !u.store.getIsRetrieved(s.formID) && G(!0);
12055
12073
  }, {
12056
12074
  immediate: !0
12057
12075
  }), watch(s.isCreating, (K, U) => {
@@ -12091,13 +12109,13 @@ const KgTable$1 = "", getProps$g = () => ({
12091
12109
  }
12092
12110
  function G(K = !1) {
12093
12111
  KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u8FDB\u5165\u65B9\u6CD5.`);
12094
- const U = watch(m, (W) => {
12095
- W && (setTimeout(() => U()), z());
12112
+ const U = watch(m, (q) => {
12113
+ q && (setTimeout(() => U()), W());
12096
12114
  }, {
12097
12115
  immediate: !0
12098
12116
  });
12099
- async function z() {
12100
- var W, J;
12117
+ async function W() {
12118
+ var q, J;
12101
12119
  if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u8FDB\u5165\u65B9\u6CD5.`), !y.value) {
12102
12120
  KgLogger.error("[KgTable] '\u67E5\u8BE2\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
12103
12121
  VarButton: s.varButtonSearch.value
@@ -12107,7 +12125,7 @@ const KgTable$1 = "", getProps$g = () => ({
12107
12125
  K && (P.pageIndex = 1), u.store.setIsRetrieving(s.formID, !0);
12108
12126
  try {
12109
12127
  const L = KgUtil.parseParams(k.value, u.profileFormID.value, a), B = ref({});
12110
- switch (await u.store.emit(s.formID, "beforeRetrieve", {
12128
+ await u.store.emit(s.formID, "beforeRetrieve", {
12111
12129
  params: L,
12112
12130
  response: B
12113
12131
  }) ? KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u89E6\u53D1 beforeRetrieve \u4E8B\u4EF6.`) : B.value = await httpClient().request({
@@ -12116,18 +12134,23 @@ const KgTable$1 = "", getProps$g = () => ({
12116
12134
  params: L
12117
12135
  }, {
12118
12136
  successMessageMode: "none"
12119
- }), !0) {
12137
+ });
12138
+ let z = ref([]), Z = ref(0);
12139
+ switch (!0) {
12120
12140
  case !B.value:
12121
- F.value = [], P.total = 0;
12141
+ z.value = [], Z.value = 0;
12122
12142
  break;
12123
12143
  case isArrayLike(B.value):
12124
- F.value = B.value, P.total = B.value.length;
12144
+ z.value = B.value, Z.value = B.value.length;
12125
12145
  break;
12126
12146
  case ("total" in B.value && "records" in B.value):
12127
- F.value = (W = B.value.records) != null ? W : [], P.total = (J = B.value.total) != null ? J : 0;
12147
+ z.value = (q = B.value.records) != null ? q : [], Z.value = (J = B.value.total) != null ? J : 0;
12128
12148
  break;
12129
12149
  }
12130
- x(), v.value = [], await nextTick(), await u.store.emit(s.formID, "retrieve", {
12150
+ await u.store.emit(s.formID, "beforeSetDatas", {
12151
+ datas: z,
12152
+ total: Z
12153
+ }), F.value = z.value, P.total = Z.value, x(), v.value = [], await nextTick(), await u.store.emit(s.formID, "retrieve", {
12131
12154
  page: B.value,
12132
12155
  datas: F
12133
12156
  }), u.store.setIsRetrieved(s.formID, !0);
@@ -12140,55 +12163,55 @@ const KgTable$1 = "", getProps$g = () => ({
12140
12163
  }
12141
12164
  function H(K) {
12142
12165
  u.store.setSelectedRows(s.formID, K.map((U) => {
12143
- var z;
12144
- return (z = F.value) == null ? void 0 : z.find((W) => W[u.id.value] === U);
12166
+ var W;
12167
+ return (W = F.value) == null ? void 0 : W.find((q) => q[u.id.value] === U);
12145
12168
  }).filter((U) => !!U));
12146
12169
  }
12147
12170
  function Q(K) {
12148
- var U, z;
12171
+ var U, W;
12149
12172
  switch (u.isMultiSelect.value) {
12150
12173
  case !0:
12151
12174
  {
12152
- const W = K[u.id.value];
12153
- $.value.includes(W) ? $.value = without$1($.value, W) : $.value = [...(U = $.value) != null ? U : [], W];
12175
+ const q = K[u.id.value];
12176
+ $.value.includes(q) ? $.value = without$1($.value, q) : $.value = [...(U = $.value) != null ? U : [], q];
12154
12177
  }
12155
12178
  break;
12156
12179
  case !1:
12157
12180
  {
12158
- const W = K[u.id.value];
12159
- (z = $.value) != null && z.includes(W) ? $.value = [] : $.value = [W];
12181
+ const q = K[u.id.value];
12182
+ (W = $.value) != null && W.includes(q) ? $.value = [] : $.value = [q];
12160
12183
  }
12161
12184
  break;
12162
12185
  }
12163
- u.store.setSelectedRows(s.formID, $.value.map((W) => {
12186
+ u.store.setSelectedRows(s.formID, $.value.map((q) => {
12164
12187
  var J;
12165
- return (J = F.value) == null ? void 0 : J.find((L) => L[u.id.value] === W);
12166
- }).filter((W) => !!W));
12188
+ return (J = F.value) == null ? void 0 : J.find((L) => L[u.id.value] === q);
12189
+ }).filter((q) => !!q));
12167
12190
  }
12168
12191
  function X(K, U) {
12169
12192
  U.width = K, s.store.setVarGridDetailWidth(s.formID, U.dataIndex, K);
12170
12193
  }
12171
- async function Y(K, U, z, W) {
12194
+ async function Y(K, U, W, q) {
12172
12195
  var J;
12173
- switch (W.action) {
12196
+ switch (q.action) {
12174
12197
  case "sort":
12175
12198
  {
12176
12199
  await nextTick();
12177
- let L = z;
12200
+ let L = W;
12178
12201
  L.order ? (V.column = (J = L.field) != null ? J : void 0, V.order = L.order === "ascend" ? "asc" : L.order === "descend" ? "desc" : void 0) : (V.column = void 0, V.order = void 0), G(!0);
12179
12202
  }
12180
12203
  break;
12181
12204
  }
12182
12205
  }
12183
12206
  function te(K, U) {
12184
- var W;
12185
- const z = U[u.id.value];
12186
- switch ((W = s.varGridConfig.value) == null ? void 0 : W.expand_accordion_flg) {
12207
+ var q;
12208
+ const W = U[u.id.value];
12209
+ switch ((q = s.varGridConfig.value) == null ? void 0 : q.expand_accordion_flg) {
12187
12210
  case 0:
12188
- K ? v.value = uniq([...v.value, z]) : v.value = without$1(v.value, z);
12211
+ K ? v.value = uniq([...v.value, W]) : v.value = without$1(v.value, W);
12189
12212
  break;
12190
12213
  default:
12191
- K ? v.value = [z] : v.value = [];
12214
+ K ? v.value = [W] : v.value = [];
12192
12215
  break;
12193
12216
  }
12194
12217
  }
@@ -12197,8 +12220,8 @@ const KgTable$1 = "", getProps$g = () => ({
12197
12220
  }
12198
12221
  function oe(K) {
12199
12222
  u.store.setSelectedRows(s.formID, [K].map((U) => {
12200
- var z;
12201
- return (z = F.value) == null ? void 0 : z.find((W) => W[u.id.value] === U[u.id.value]);
12223
+ var W;
12224
+ return (W = F.value) == null ? void 0 : W.find((q) => q[u.id.value] === U[u.id.value]);
12202
12225
  }).filter((U) => !!U)), c.click(s.formID, KG_BUTTON_TYPE.UPDATE);
12203
12226
  }
12204
12227
  function ue({
@@ -12207,15 +12230,15 @@ const KgTable$1 = "", getProps$g = () => ({
12207
12230
  }) {
12208
12231
  switch (U.dataIndex) {
12209
12232
  case "index": {
12210
- const z = (() => {
12211
- var W, J, L, B;
12212
- if (!isNil((J = (W = o == null ? void 0 : o.value) == null ? void 0 : W.KgTable) == null ? void 0 : J.kgDisabled))
12233
+ const W = (() => {
12234
+ var q, J, L, B;
12235
+ if (!isNil((J = (q = o == null ? void 0 : o.value) == null ? void 0 : q.KgTable) == null ? void 0 : J.kgDisabled))
12213
12236
  return (B = (L = o == null ? void 0 : o.value) == null ? void 0 : L.KgTable) == null ? void 0 : B.kgDisabled;
12214
12237
  if (!isNil(e.kgDisabled))
12215
12238
  return e.kgDisabled;
12216
12239
  })();
12217
12240
  return createVNode(KgTableSetting, {
12218
- kgDisabled: z
12241
+ kgDisabled: W
12219
12242
  }, null);
12220
12243
  }
12221
12244
  default:
@@ -12232,9 +12255,9 @@ const KgTable$1 = "", getProps$g = () => ({
12232
12255
  index: 0
12233
12256
  }, null), N.value && createVNode(TableSummary.Cell, {
12234
12257
  index: E.value ? 1 : 0
12235
- }, null), C.value.map((U, z) => {
12236
- const W = s.store.getVarGridDetail(s.formID, U.dataIndex);
12237
- let J = z;
12258
+ }, null), C.value.map((U, W) => {
12259
+ const q = s.store.getVarGridDetail(s.formID, U.dataIndex);
12260
+ let J = W;
12238
12261
  return E.value && N.value ? J += 2 : (E.value || N.value) && (J += 1), createVNode(TableSummary.Cell, {
12239
12262
  index: J
12240
12263
  }, {
@@ -12243,7 +12266,7 @@ const KgTable$1 = "", getProps$g = () => ({
12243
12266
  return [(B = (L = n == null ? void 0 : n.KgTable) == null ? void 0 : L["summary.bodyCell"]) == null ? void 0 : B.call(L, {
12244
12267
  column: U,
12245
12268
  index: J,
12246
- varGridDetail: W
12269
+ varGridDetail: q
12247
12270
  })];
12248
12271
  }
12249
12272
  });
@@ -12254,36 +12277,36 @@ const KgTable$1 = "", getProps$g = () => ({
12254
12277
  function re({
12255
12278
  column: K,
12256
12279
  index: U,
12257
- record: z,
12258
- text: W,
12280
+ record: W,
12281
+ text: q,
12259
12282
  value: J
12260
12283
  }) {
12261
- var q;
12284
+ var z;
12262
12285
  let L = "";
12263
12286
  K.customRender ? L = K.customRender({
12264
12287
  index: U,
12265
- record: z,
12288
+ record: W,
12266
12289
  column: K,
12267
- text: W,
12290
+ text: q,
12268
12291
  value: J,
12269
12292
  renderIndex: U
12270
12293
  }) : L = J;
12271
12294
  const B = createVNode(KgTableCell, {
12272
- kgRow: z,
12295
+ kgRow: W,
12273
12296
  kgValue: L,
12274
12297
  kgVarName: K.dataIndex,
12275
- onKgUpdateLinkClick: () => oe(z)
12298
+ onKgUpdateLinkClick: () => oe(W)
12276
12299
  }, null);
12277
- if ((q = n == null ? void 0 : n.KgTable) != null && q.bodyCell) {
12278
- const ee = K.dataIndex ? s.store.getVarGridDetail(s.formID, K.dataIndex) : null;
12300
+ if ((z = n == null ? void 0 : n.KgTable) != null && z.bodyCell) {
12301
+ const Z = K.dataIndex ? s.store.getVarGridDetail(s.formID, K.dataIndex) : null;
12279
12302
  return n.KgTable.bodyCell({
12280
12303
  column: K,
12281
12304
  index: U,
12282
- record: z,
12283
- text: W,
12305
+ record: W,
12306
+ text: q,
12284
12307
  value: J,
12285
- row: z,
12286
- varGridDetail: ee,
12308
+ row: W,
12309
+ varGridDetail: Z,
12287
12310
  defaultRender: B
12288
12311
  });
12289
12312
  } else
@@ -12315,7 +12338,7 @@ const KgTable$1 = "", getProps$g = () => ({
12315
12338
  expandColumnWidth: 28,
12316
12339
  expandedRowKeys: v.value,
12317
12340
  customRow: (U) => ({
12318
- onClick: (z) => x(z, U)
12341
+ onClick: (W) => x(W, U)
12319
12342
  }),
12320
12343
  onResizeColumn: X,
12321
12344
  onChange: Y,
@@ -12351,12 +12374,12 @@ const KgTable$1 = "", getProps$g = () => ({
12351
12374
  locale: {
12352
12375
  page: ""
12353
12376
  },
12354
- showTotal: (U, z) => i.t("kg.KgTable.totalText", {
12355
- from: z[0],
12356
- to: z[1],
12377
+ showTotal: (U, W) => i.t("kg.KgTable.totalText", {
12378
+ from: W[0],
12379
+ to: W[1],
12357
12380
  total: U
12358
12381
  }),
12359
- onChange: (U, z) => ae(U, z)
12382
+ onChange: (U, W) => ae(U, W)
12360
12383
  }, null)])])]);
12361
12384
  };
12362
12385
  }
@@ -12834,10 +12857,8 @@ const KgButtonCreate = defineComponent({
12834
12857
  var C, g;
12835
12858
  return (g = (C = o.value) == null ? void 0 : C.cmd_method) != null ? g : "GET";
12836
12859
  }), l = computed(() => {
12837
- var g, _, b, y, k, T;
12860
+ var g, _, b, y, k;
12838
12861
  let C = {
12839
- pageNo: 1,
12840
- pageSize: 0,
12841
12862
  ...(g = a.model.value) != null ? g : {}
12842
12863
  };
12843
12864
  return o.value && (C = {
@@ -12846,7 +12867,7 @@ const KgButtonCreate = defineComponent({
12846
12867
  }), (y = r.varGridConfig.value) != null && y.cmd_prm && (C = {
12847
12868
  ...C,
12848
12869
  ...KgVarUtil.parseCommandParameter((k = r.varGridConfig.value.cmd_prm) != null ? k : "")
12849
- }), ((T = r.varGridConfig.value) == null ? void 0 : T.convert_sort_field_to_under_score_flg) === 1 && C.column && (C.column = snakeCase$1(C.column)), C;
12870
+ }), C;
12850
12871
  }), c = computed(() => {
12851
12872
  var C, g, _, b, y, k, T, M;
12852
12873
  return r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value || n.isRetrieving.value || ((C = o.value) == null ? void 0 : C.dis_no_select_flg) === 1 && ((_ = (g = n.selectedRows.value) == null ? void 0 : g.length) != null ? _ : 0) === 0 || ((b = o.value) == null ? void 0 : b.dis_mult_select_flg) === 1 && ((k = (y = n.selectedRows.value) == null ? void 0 : y.length) != null ? k : 0) > 1 || ((T = o.value) == null ? void 0 : T.permission_type) === 2 && !t.p((M = o.value) == null ? void 0 : M.permission_code) ? !0 : isNil(e.kgDisabled) ? !1 : e.kgDisabled;
@@ -13932,27 +13953,31 @@ function _useLayoutHeaderResizeObserver() {
13932
13953
  }), {};
13933
13954
  }
13934
13955
  function _useCommon() {
13935
- const e = inject(DI_KG_VAR__KG_PROPS, null), t = useKgVar(), r = computed(() => t.store.getVarProfileConfig(t.formID)), a = computed(() => t.store.getFormLevel(t.formID)), n = computed(() => {
13936
- var d, m, v;
13937
- if (a.value > 0)
13956
+ const e = inject(DI_KG_VAR__KG_PROPS, null), t = useKgVar(), r = computed(() => t.store.getVarProfileConfig(t.formID)), a = computed(() => t.store.getFormLevel(t.formID)), n = ref(!0), o = computed(() => {
13957
+ var m, v, C;
13958
+ if (!n.value || a.value > 0)
13938
13959
  return !1;
13939
- const u = (m = (d = e == null ? void 0 : e.value) == null ? void 0 : d.KgSearch) == null ? void 0 : m.kgHeaderTeleport;
13940
- return u !== void 0 ? u : ((v = r.value) == null ? void 0 : v.header_teleport_flg) !== 0;
13941
- }), o = computed(() => {
13942
- var u;
13943
- return ((u = r.value) == null ? void 0 : u.vis_flg) === 1;
13960
+ const d = (v = (m = e == null ? void 0 : e.value) == null ? void 0 : m.KgSearch) == null ? void 0 : v.kgHeaderTeleport;
13961
+ return d !== void 0 ? d : ((C = r.value) == null ? void 0 : C.header_teleport_flg) !== 0;
13944
13962
  }), i = computed(() => {
13945
- var u;
13946
- return ((u = r.value) == null ? void 0 : u.resizable_flg) !== 0;
13947
- }), s = computed(() => getDefaultHeight(t.currentVarProfileDetails.value, n.value)), l = computed(() => getMaxHeight(t.currentVarProfileDetails.value, n.value)), c = computed(() => n.value ? 1 : HEADER_HEIGHT);
13948
- return {
13949
- isVisible: o,
13950
- isResizable: i,
13951
- isHeaderTeleport: n,
13963
+ var d;
13964
+ return ((d = r.value) == null ? void 0 : d.vis_flg) === 1;
13965
+ }), s = computed(() => {
13966
+ var d;
13967
+ return ((d = r.value) == null ? void 0 : d.resizable_flg) !== 0;
13968
+ }), l = computed(() => getDefaultHeight(t.currentVarProfileDetails.value, o.value)), c = computed(() => getMaxHeight(t.currentVarProfileDetails.value, o.value)), u = computed(() => o.value ? 1 : HEADER_HEIGHT);
13969
+ return onActivated(() => {
13970
+ n.value = !0;
13971
+ }), onDeactivated(() => {
13972
+ n.value = !1;
13973
+ }), {
13974
+ isVisible: i,
13975
+ isResizable: s,
13976
+ isHeaderTeleport: o,
13952
13977
  formLevel: a,
13953
- defaultHeight: s,
13954
- maxHeight: l,
13955
- minHeight: c
13978
+ defaultHeight: l,
13979
+ maxHeight: c,
13980
+ minHeight: u
13956
13981
  };
13957
13982
  }
13958
13983
  function _useFormModel(e, t) {