@kengic/vue 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
- var ve = Object.defineProperty;
2
- var be = (e, t, r) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var m = (e, t, r) => (be(e, typeof t != "symbol" ? t + "" : t, r), r);
1
+ var Se = Object.defineProperty;
2
+ var Ce = (e, t, r) => t in e ? Se(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var m = (e, t, r) => (Ce(e, typeof t != "symbol" ? t + "" : t, r), r);
4
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, onBeforeUnmount, 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 = "";
@@ -4026,12 +4026,12 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4026
4026
  }, O.valueOf = function() {
4027
4027
  return this.$d.getTime();
4028
4028
  }, O.startOf = function(D, U) {
4029
- var F = this, K = !!N.u(U) || U, B = N.p(D), W = function(ue, ne) {
4030
- var le = N.w(F.$u ? Date.UTC(F.$y, ne, ue) : new Date(F.$y, ne, ue), F);
4029
+ var F = this, K = !!N.u(U) || U, B = N.p(D), W = function(ce, ne) {
4030
+ var le = N.w(F.$u ? Date.UTC(F.$y, ne, ce) : new Date(F.$y, ne, ce), F);
4031
4031
  return K ? le : le.endOf(c);
4032
- }, X = function(ue, ne) {
4033
- return N.w(F.toDate()[ue].apply(F.toDate("s"), (K ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), F);
4034
- }, q = this.$W, Z = this.$M, te = this.$D, se = "set" + (this.$u ? "UTC" : "");
4032
+ }, X = function(ce, ne) {
4033
+ return N.w(F.toDate()[ce].apply(F.toDate("s"), (K ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), F);
4034
+ }, q = this.$W, Z = this.$M, ee = this.$D, se = "set" + (this.$u ? "UTC" : "");
4035
4035
  switch (B) {
4036
4036
  case v:
4037
4037
  return K ? W(1, 0) : W(31, 11);
@@ -4039,7 +4039,7 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4039
4039
  return K ? W(1, Z) : W(0, Z + 1);
4040
4040
  case u:
4041
4041
  var oe = this.$locale().weekStart || 0, ge = (q < oe ? q + 7 : q) - oe;
4042
- return W(K ? te - ge : te + (6 - ge), Z);
4042
+ return W(K ? ee - ge : ee + (6 - ge), Z);
4043
4043
  case c:
4044
4044
  case y:
4045
4045
  return X(se + "Hours", 0);
@@ -4070,8 +4070,8 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4070
4070
  var F, K = this;
4071
4071
  D = Number(D);
4072
4072
  var B = N.p(U), W = function(Z) {
4073
- var te = M(K);
4074
- return N.w(te.date(te.date() + Math.round(Z * D)), K);
4073
+ var ee = M(K);
4074
+ return N.w(ee.date(ee.date() + Math.round(Z * D)), K);
4075
4075
  };
4076
4076
  if (B === d)
4077
4077
  return this.set(d, this.$M + D);
@@ -4089,17 +4089,17 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4089
4089
  var U = this, F = this.$locale();
4090
4090
  if (!this.isValid())
4091
4091
  return F.invalidDate || p;
4092
- var K = D || "YYYY-MM-DDTHH:mm:ssZ", B = N.z(this), W = this.$H, X = this.$m, q = this.$M, Z = F.weekdays, te = F.months, se = F.meridiem, oe = function(ne, le, ce, fe) {
4093
- return ne && (ne[le] || ne(U, K)) || ce[le].slice(0, fe);
4092
+ var K = D || "YYYY-MM-DDTHH:mm:ssZ", B = N.z(this), W = this.$H, X = this.$m, q = this.$M, Z = F.weekdays, ee = F.months, se = F.meridiem, oe = function(ne, le, de, fe) {
4093
+ return ne && (ne[le] || ne(U, K)) || de[le].slice(0, fe);
4094
4094
  }, ge = function(ne) {
4095
4095
  return N.s(W % 12 || 12, ne, "0");
4096
- }, ue = se || function(ne, le, ce) {
4096
+ }, ce = se || function(ne, le, de) {
4097
4097
  var fe = ne < 12 ? "AM" : "PM";
4098
- return ce ? fe.toLowerCase() : fe;
4098
+ return de ? fe.toLowerCase() : fe;
4099
4099
  };
4100
4100
  return K.replace(b, function(ne, le) {
4101
- return le || function(ce) {
4102
- switch (ce) {
4101
+ return le || function(de) {
4102
+ switch (de) {
4103
4103
  case "YY":
4104
4104
  return String(U.$y).slice(-2);
4105
4105
  case "YYYY":
@@ -4109,9 +4109,9 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4109
4109
  case "MM":
4110
4110
  return N.s(q + 1, 2, "0");
4111
4111
  case "MMM":
4112
- return oe(F.monthsShort, q, te, 3);
4112
+ return oe(F.monthsShort, q, ee, 3);
4113
4113
  case "MMMM":
4114
- return oe(te, q);
4114
+ return oe(ee, q);
4115
4115
  case "D":
4116
4116
  return U.$D;
4117
4117
  case "DD":
@@ -4133,9 +4133,9 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4133
4133
  case "hh":
4134
4134
  return ge(2);
4135
4135
  case "a":
4136
- return ue(W, X, !0);
4136
+ return ce(W, X, !0);
4137
4137
  case "A":
4138
- return ue(W, X, !1);
4138
+ return ce(W, X, !1);
4139
4139
  case "m":
4140
4140
  return String(X);
4141
4141
  case "mm":
@@ -4155,18 +4155,18 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4155
4155
  }, O.utcOffset = function() {
4156
4156
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4157
4157
  }, O.diff = function(D, U, F) {
4158
- var K, B = this, W = N.p(U), X = M(D), q = (X.utcOffset() - this.utcOffset()) * a, Z = this - X, te = function() {
4158
+ var K, B = this, W = N.p(U), X = M(D), q = (X.utcOffset() - this.utcOffset()) * a, Z = this - X, ee = function() {
4159
4159
  return N.m(B, X);
4160
4160
  };
4161
4161
  switch (W) {
4162
4162
  case v:
4163
- K = te() / 12;
4163
+ K = ee() / 12;
4164
4164
  break;
4165
4165
  case d:
4166
- K = te();
4166
+ K = ee();
4167
4167
  break;
4168
4168
  case g:
4169
- K = te() / 3;
4169
+ K = ee() / 3;
4170
4170
  break;
4171
4171
  case u:
4172
4172
  K = (Z - q) / 6048e5;
@@ -8992,8 +8992,8 @@ function useKgVar(e, t, r = 0) {
8992
8992
  u.leave(c);
8993
8993
  }));
8994
8994
  const d = (q) => computed(() => {
8995
- var Z, te, se;
8996
- return (se = (te = (Z = u.getVarCatalog(c, q)) == null ? void 0 : Z.var_text) != null ? te : q) != null ? se : "";
8995
+ var Z, ee, se;
8996
+ return (se = (ee = (Z = u.getVarCatalog(c, q)) == null ? void 0 : Z.var_text) != null ? ee : q) != null ? se : "";
8997
8997
  }), g = computed(() => u.isRetrieving(c)), v = computed(() => u.isRetrievingVarProfileMaster(c)), y = computed(() => u.isRetrievingVarGridMaster(c)), p = computed(() => u.isCreating(c)), _ = computed(() => u.isCreatingRequesting(c)), b = computed(() => u.isUpdating(c)), C = computed(() => u.isUpdatingRequesting(c)), E = computed(() => u.isCopying(c)), k = computed(() => u.isCopyingRequesting(c)), A = computed(() => u.isDeleting(c)), T = computed(() => u.isDeletingRequesting(c)), $ = computed(() => u.isOtherRequesting(c)), I = computed(() => u.getVarButtons(c)), w = computed(() => u.getVarButtonSearch(c)), M = computed(() => u.getVarButtonCreate(c)), N = computed(() => u.getVarButtonUpdate(c)), P = computed(() => u.getVarButtonCopy(c)), H = computed(() => u.getVarButtonDelete(c)), V = computed(() => u.getVarProfileMasters(c)), O = computed(() => u.getCurrentVarProfileMaster(c)), D = computed(() => u.getCurrentVarProfileMasterID(c)), U = computed(() => {
8998
8998
  var q, Z;
8999
8999
  return (Z = (q = O.value) == null ? void 0 : q.varProfileDetails) != null ? Z : null;
@@ -10849,7 +10849,7 @@ const getProps$p = () => ({
10849
10849
  }
10850
10850
  });
10851
10851
  watch(U, (R, x) => {
10852
- R === !0 && Z(), x === !0 && R === !1 && te();
10852
+ R === !0 && Z(), x === !0 && R === !1 && ee();
10853
10853
  }, {
10854
10854
  immediate: !0
10855
10855
  }), watch(W, (R) => {
@@ -10873,7 +10873,7 @@ const getProps$p = () => ({
10873
10873
  });
10874
10874
  ((x = g.value) == null ? void 0 : x.dft_fullscreen_flg) === 1 && !u.value && (F.isFullscreen = !0);
10875
10875
  }
10876
- async function te() {
10876
+ async function ee() {
10877
10877
  w.value.kgWidth = W.value, F.isFullscreen = !1, await l.store.emit(s.formID, "close", null);
10878
10878
  }
10879
10879
  function se() {
@@ -10925,7 +10925,7 @@ const getProps$p = () => ({
10925
10925
  await ge();
10926
10926
  break;
10927
10927
  case s.isUpdating.value:
10928
- await ue();
10928
+ await ce();
10929
10929
  break;
10930
10930
  case s.isCopying.value:
10931
10931
  await ne();
@@ -10939,7 +10939,7 @@ const getProps$p = () => ({
10939
10939
  }
10940
10940
  }
10941
10941
  async function ge() {
10942
- var x, z, J, Q, re, ae;
10942
+ var x, z, J, Q, te, ae;
10943
10943
  const R = (x = s.varButtonCreate.value) == null ? void 0 : x.cmd;
10944
10944
  if (!R) {
10945
10945
  KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10949,7 +10949,7 @@ const getProps$p = () => ({
10949
10949
  }
10950
10950
  s.store.setIsCreatingRequesting(s.formID, !0);
10951
10951
  try {
10952
- let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonCreate.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), ie = ref(KgUtil.parseParams(toRaw(l.model.value), s.formID, r));
10952
+ let re = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonCreate.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), ie = ref(KgUtil.parseParams(toRaw(l.model.value), s.formID, r));
10953
10953
  if (await l.store.emit(s.formID, "beforeRequest", {
10954
10954
  isCreating: s.isCreating.value,
10955
10955
  isUpdating: s.isUpdating.value,
@@ -10958,14 +10958,14 @@ const getProps$p = () => ({
10958
10958
  row: o.selectedFirstRow.value,
10959
10959
  rows: o.selectedRows.value,
10960
10960
  model: l.model,
10961
- params: ee,
10961
+ params: re,
10962
10962
  data: ie
10963
10963
  }))
10964
10964
  return;
10965
10965
  await httpClient().request({
10966
- method: (re = (Q = s.varButtonCreate.value) == null ? void 0 : Q.cmd_method) != null ? re : "POST",
10966
+ method: (te = (Q = s.varButtonCreate.value) == null ? void 0 : Q.cmd_method) != null ? te : "POST",
10967
10967
  url: R,
10968
- params: ee.value,
10968
+ params: re.value,
10969
10969
  data: ie.value
10970
10970
  }), ((ae = s.varButtonCreate.value) == null ? void 0 : ae.show_success_message_flg) !== 0 && message.success(O.title.value + n.t("kg.succeed")), await l.store.emit(s.formID, "ok", {
10971
10971
  isCreating: s.isCreating.value,
@@ -10975,14 +10975,14 @@ const getProps$p = () => ({
10975
10975
  row: o.selectedFirstRow.value,
10976
10976
  model: l.model
10977
10977
  }), s.store.setIsCreating(s.formID, !1), c.search(!0);
10978
- } catch (ee) {
10979
- console.error(ee), l.store.emit(s.formID, "error", ee);
10978
+ } catch (re) {
10979
+ console.error(re), l.store.emit(s.formID, "error", re);
10980
10980
  } finally {
10981
10981
  s.store.setIsCreatingRequesting(s.formID, !1);
10982
10982
  }
10983
10983
  }
10984
- async function ue() {
10985
- var x, z, J, Q, re, ae;
10984
+ async function ce() {
10985
+ var x, z, J, Q, te, ae;
10986
10986
  const R = (x = s.varButtonUpdate.value) == null ? void 0 : x.cmd;
10987
10987
  if (!R) {
10988
10988
  KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10992,7 +10992,7 @@ const getProps$p = () => ({
10992
10992
  }
10993
10993
  try {
10994
10994
  s.store.setIsUpdatingRequesting(s.formID, !0);
10995
- let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonUpdate.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), ie = ref(KgUtil.parseParams(toRaw(l.model.value), s.formID, r));
10995
+ let re = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonUpdate.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), ie = ref(KgUtil.parseParams(toRaw(l.model.value), s.formID, r));
10996
10996
  if (await l.store.emit(s.formID, "beforeRequest", {
10997
10997
  isCreating: s.isCreating.value,
10998
10998
  isUpdating: s.isUpdating.value,
@@ -11001,14 +11001,14 @@ const getProps$p = () => ({
11001
11001
  row: o.selectedRow.value,
11002
11002
  rows: o.selectedRows.value,
11003
11003
  model: l.model,
11004
- params: ee,
11004
+ params: re,
11005
11005
  data: ie
11006
11006
  }))
11007
11007
  return;
11008
11008
  await httpClient().request({
11009
- method: (re = (Q = s.varButtonUpdate.value) == null ? void 0 : Q.cmd_method) != null ? re : "POST",
11009
+ method: (te = (Q = s.varButtonUpdate.value) == null ? void 0 : Q.cmd_method) != null ? te : "POST",
11010
11010
  url: R,
11011
- params: ee.value,
11011
+ params: re.value,
11012
11012
  data: ie.value
11013
11013
  }), ((ae = s.varButtonUpdate.value) == null ? void 0 : ae.show_success_message_flg) !== 0 && message.success(n.t("kg.updateSuccess")), await l.store.emit(s.formID, "ok", {
11014
11014
  isCreating: s.isCreating.value,
@@ -11018,14 +11018,14 @@ const getProps$p = () => ({
11018
11018
  row: o.selectedFirstRow.value,
11019
11019
  model: l.model
11020
11020
  }), s.store.setIsUpdating(s.formID, !1), c.search();
11021
- } catch (ee) {
11022
- console.error(ee), l.store.emit(s.formID, "error", ee);
11021
+ } catch (re) {
11022
+ console.error(re), l.store.emit(s.formID, "error", re);
11023
11023
  } finally {
11024
11024
  s.store.setIsUpdatingRequesting(s.formID, !1);
11025
11025
  }
11026
11026
  }
11027
11027
  async function ne() {
11028
- var x, z, J, Q, re, ae, ee, ie;
11028
+ var x, z, J, Q, te, ae, re, ie;
11029
11029
  const R = (x = s.varButtonCopy.value) == null ? void 0 : x.cmd;
11030
11030
  if (!R) {
11031
11031
  KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -11035,11 +11035,11 @@ const getProps$p = () => ({
11035
11035
  }
11036
11036
  try {
11037
11037
  s.store.setIsCopyingRequesting(s.formID, !0);
11038
- let de = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonCopy.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), pe = ref(KgUtil.parseParams({
11038
+ let ue = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonCopy.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), pe = ref(KgUtil.parseParams({
11039
11039
  ...(Q = o.selectedFirstRow.value) != null ? Q : {},
11040
11040
  ...toRaw(l.model.value)
11041
11041
  }, s.formID, r));
11042
- if (((re = g.value) == null ? void 0 : re.cpy_clear_id_flg) !== 0 && delete pe.value.id, await l.store.emit(s.formID, "beforeRequest", {
11042
+ if (((te = g.value) == null ? void 0 : te.cpy_clear_id_flg) !== 0 && delete pe.value.id, await l.store.emit(s.formID, "beforeRequest", {
11043
11043
  isCreating: s.isCreating.value,
11044
11044
  isUpdating: s.isUpdating.value,
11045
11045
  isCopying: s.isCopying.value,
@@ -11047,14 +11047,14 @@ const getProps$p = () => ({
11047
11047
  row: o.selectedRow.value,
11048
11048
  rows: o.selectedRows.value,
11049
11049
  model: l.model,
11050
- params: de,
11050
+ params: ue,
11051
11051
  data: pe
11052
11052
  }))
11053
11053
  return;
11054
11054
  await httpClient().request({
11055
- method: (ee = (ae = s.varButtonCopy.value) == null ? void 0 : ae.cmd_method) != null ? ee : "POST",
11055
+ method: (re = (ae = s.varButtonCopy.value) == null ? void 0 : ae.cmd_method) != null ? re : "POST",
11056
11056
  url: R,
11057
- params: de.value,
11057
+ params: ue.value,
11058
11058
  data: pe.value
11059
11059
  }), ((ie = s.varButtonCopy.value) == null ? void 0 : ie.show_success_message_flg) !== 0 && message.success(n.t("kg.copySuccess")), await l.store.emit(s.formID, "ok", {
11060
11060
  isCreating: s.isCreating.value,
@@ -11064,14 +11064,14 @@ const getProps$p = () => ({
11064
11064
  row: o.selectedFirstRow.value,
11065
11065
  model: l.model
11066
11066
  }), s.store.setIsCopying(s.formID, !1), c.search(!0);
11067
- } catch (de) {
11068
- console.error(de), l.store.emit(s.formID, "error", de);
11067
+ } catch (ue) {
11068
+ console.error(ue), l.store.emit(s.formID, "error", ue);
11069
11069
  } finally {
11070
11070
  s.store.setIsCopyingRequesting(s.formID, !1);
11071
11071
  }
11072
11072
  }
11073
11073
  async function le() {
11074
- var x, z, J, Q, re, ae;
11074
+ var x, z, J, Q, te, ae, re, ie, ue, pe;
11075
11075
  const R = (x = s.varButtonDelete.value) == null ? void 0 : x.cmd;
11076
11076
  if (!R) {
11077
11077
  KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -11081,13 +11081,13 @@ const getProps$p = () => ({
11081
11081
  }
11082
11082
  try {
11083
11083
  s.store.setIsDeletingRequesting(s.formID, !0);
11084
- let ee = ref({
11085
- ids: (J = (z = o.selectedRows.value) == null ? void 0 : z.map((pe) => {
11086
- var me, _e, he;
11087
- return (he = pe[(_e = (me = s.varButtonDelete.value) == null ? void 0 : me.del_param_clm) != null ? _e : "id"]) != null ? he : "";
11088
- })) != null ? J : []
11089
- }), ie = ref({});
11090
- if (await l.store.emit(s.formID, "beforeRequest", {
11084
+ let me = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (z = s.varButtonDelete.value) == null ? void 0 : z.cmd_prm) != null ? J : ""), s.formID, r)), _e = ref((Q = o.selectedRows.value) != null ? Q : []);
11085
+ if (((te = s.varButtonDelete.value) == null ? void 0 : te.del_param_clm) !== "__kg__new_delete_param" && (me = ref({
11086
+ ids: (re = (ae = o.selectedRows.value) == null ? void 0 : ae.map((ye) => {
11087
+ var he, ve, be;
11088
+ return (be = ye[(ve = (he = s.varButtonDelete.value) == null ? void 0 : he.del_param_clm) != null ? ve : "id"]) != null ? be : "";
11089
+ })) != null ? re : []
11090
+ }), _e = ref({})), await l.store.emit(s.formID, "beforeRequest", {
11091
11091
  isCreating: s.isCreating.value,
11092
11092
  isUpdating: s.isUpdating.value,
11093
11093
  isCopying: s.isCopying.value,
@@ -11095,18 +11095,21 @@ const getProps$p = () => ({
11095
11095
  row: o.selectedFirstRow.value,
11096
11096
  rows: o.selectedRows.value,
11097
11097
  model: l.model,
11098
- params: ee,
11099
- data: ie
11098
+ params: me,
11099
+ data: _e
11100
11100
  }))
11101
11101
  return;
11102
11102
  await httpClient().request({
11103
- method: (re = (Q = s.varButtonDelete.value) == null ? void 0 : Q.cmd_method) != null ? re : "DELETE",
11103
+ method: (ue = (ie = s.varButtonDelete.value) == null ? void 0 : ie.cmd_method) != null ? ue : "DELETE",
11104
11104
  url: R,
11105
- params: ee.value,
11106
- data: ie.value
11105
+ params: me.value,
11106
+ data: _e.value
11107
11107
  }, {
11108
11108
  joinParamsToUrl: !0
11109
- }), ((ae = s.varButtonDelete.value) == null ? void 0 : ae.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), await l.store.emit(s.formID, "ok", {
11109
+ }), ((pe = s.varButtonDelete.value) == null ? void 0 : pe.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), await i.store.emit(s.formID, "deleteOk", {
11110
+ button: s.varButtonDelete.value,
11111
+ rows: o.selectedRows.value
11112
+ }), await l.store.emit(s.formID, "ok", {
11110
11113
  isCreating: s.isCreating.value,
11111
11114
  isUpdating: s.isUpdating.value,
11112
11115
  isCopying: s.isCopying.value,
@@ -11114,13 +11117,13 @@ const getProps$p = () => ({
11114
11117
  row: o.selectedFirstRow.value,
11115
11118
  model: l.model
11116
11119
  }), s.store.setIsDeleting(s.formID, !1), c.search(!0);
11117
- } catch (ee) {
11118
- console.error(ee), l.store.emit(s.formID, "error", ee);
11120
+ } catch (me) {
11121
+ console.error(me), l.store.emit(s.formID, "error", me);
11119
11122
  } finally {
11120
11123
  s.store.setIsDeletingRequesting(s.formID, !1);
11121
11124
  }
11122
11125
  }
11123
- function ce(R) {
11126
+ function de(R) {
11124
11127
  var z, J;
11125
11128
  const x = (J = (z = a == null ? void 0 : a.KgSubmit) == null ? void 0 : z["KgForm.Item"]) == null ? void 0 : J[R.var_nam];
11126
11129
  return isFunction$2(x) ? createVNode(KgForm.Item, {
@@ -11131,19 +11134,19 @@ const getProps$p = () => ({
11131
11134
  }, {
11132
11135
  control: ({
11133
11136
  frm_id: Q,
11134
- varName: re,
11137
+ varName: te,
11135
11138
  props: ae,
11136
- model: ee,
11139
+ model: re,
11137
11140
  varVariableConfig: ie,
11138
- varProfileDetail: de,
11141
+ varProfileDetail: ue,
11139
11142
  varSubmitField: pe
11140
11143
  }) => x({
11141
11144
  frm_id: Q,
11142
- varName: re,
11145
+ varName: te,
11143
11146
  props: ae,
11144
- model: ee,
11147
+ model: re,
11145
11148
  varVariableConfig: ie,
11146
- varProfileDetail: de,
11149
+ varProfileDetail: ue,
11147
11150
  varSubmitField: pe
11148
11151
  })
11149
11152
  }) : createVNode(KgForm.Item, {
@@ -11177,11 +11180,11 @@ const getProps$p = () => ({
11177
11180
  ref: V
11178
11181
  }, [k.value.length > 0 && createVNode(Row, {
11179
11182
  gutter: 12
11180
- }, _isSlot$8(R = k.value.map(ce)) ? R : {
11183
+ }, _isSlot$8(R = k.value.map(de)) ? R : {
11181
11184
  default: () => [R]
11182
11185
  }), k.value.length > 0 && A.value.length > 0 && createVNode(Divider, null, null), A.value.length > 0 && createVNode(Row, {
11183
11186
  gutter: 12
11184
- }, _isSlot$8(x = A.value.map(ce)) ? x : {
11187
+ }, _isSlot$8(x = A.value.map(de)) ? x : {
11185
11188
  default: () => [x]
11186
11189
  }), u.value && createVNode("div", {
11187
11190
  style: "text-align: center; padding: 6px 0 12px;"
@@ -11859,10 +11862,7 @@ const getProps$m = () => ({
11859
11862
  }) => !1), i.onOk(async () => (r.store.retrieve(r.formID), !1)), i.onBeforeRequest(async ({
11860
11863
  params: c,
11861
11864
  data: u
11862
- }) => {
11863
- const d = o.selectedRows.value;
11864
- return c.value = {}, u.value = d, !1;
11865
- }), s.onUpdateBeforeClick(async ({
11865
+ }) => !1), s.onUpdateBeforeClick(async ({
11866
11866
  row: c
11867
11867
  }) => !1);
11868
11868
  const l = computed(() => {
@@ -12969,29 +12969,29 @@ const KgTable$1 = "", getProps$g = () => ({
12969
12969
  }, {
12970
12970
  successMessageMode: "none"
12971
12971
  }), KgLogger.debug(`${o.formID} | KgTable | retrieve() | read() | \u67E5\u8BE2\u63A5\u53E3\u8C03\u7528\u6210\u529F.`));
12972
- let re = ref([]), ae = ref(0);
12972
+ let te = ref([]), ae = ref(0);
12973
12973
  switch (!0) {
12974
12974
  case !Q.value:
12975
- re.value = [], ae.value = 0;
12975
+ te.value = [], ae.value = 0;
12976
12976
  break;
12977
12977
  case isArrayLike(Q.value):
12978
- re.value = Q.value, ae.value = Q.value.length;
12978
+ te.value = Q.value, ae.value = Q.value.length;
12979
12979
  break;
12980
12980
  case ("total" in Q.value && "records" in Q.value):
12981
- re.value = (R = Q.value.records) != null ? R : [], ae.value = (x = Q.value.total) != null ? x : 0;
12981
+ te.value = (R = Q.value.records) != null ? R : [], ae.value = (x = Q.value.total) != null ? x : 0;
12982
12982
  break;
12983
12983
  }
12984
12984
  await u.store.emit(o.formID, "beforeSetDatas", {
12985
- datas: re,
12985
+ datas: te,
12986
12986
  total: ae,
12987
- setDatas(ee) {
12988
- u.store.setDatas(o.formID, ee);
12987
+ setDatas(re) {
12988
+ u.store.setDatas(o.formID, re);
12989
12989
  }
12990
- }), u.store.setDatas(o.formID, re.value), O.total = ae.value, B(), v.value = [], await nextTick(), ((z = o.varGridConfig.value) == null ? void 0 : z.check_first_row_after_retrieve) === 1 && re.value.length > 0 && u.store.setSelectedRows(o.formID, [re.value[0]]), await u.store.emit(o.formID, "retrieve", {
12990
+ }), u.store.setDatas(o.formID, te.value), O.total = ae.value, B(), v.value = [], await nextTick(), ((z = o.varGridConfig.value) == null ? void 0 : z.check_first_row_after_retrieve) === 1 && te.value.length > 0 && u.store.setSelectedRows(o.formID, [te.value[0]]), await u.store.emit(o.formID, "retrieve", {
12991
12991
  page: Q.value,
12992
- datas: re,
12993
- setDatas(ee) {
12994
- u.store.setDatas(o.formID, ee);
12992
+ datas: te,
12993
+ setDatas(re) {
12994
+ u.store.setDatas(o.formID, re);
12995
12995
  }
12996
12996
  }), u.store.setIsRetrieved(o.formID, !0);
12997
12997
  } catch (J) {
@@ -13031,7 +13031,7 @@ const KgTable$1 = "", getProps$g = () => ({
13031
13031
  function Z(L, G) {
13032
13032
  G.width = L, o.store.setVarGridDetailWidth(o.formID, G.dataIndex, L);
13033
13033
  }
13034
- async function te(L, G, Y, R) {
13034
+ async function ee(L, G, Y, R) {
13035
13035
  var x;
13036
13036
  switch (R.action) {
13037
13037
  case "sort":
@@ -13064,7 +13064,7 @@ const KgTable$1 = "", getProps$g = () => ({
13064
13064
  return (Y = H.value) == null ? void 0 : Y.find((R) => R[u.id.value] === G[u.id.value]);
13065
13065
  }).filter((G) => !!G)), c.click(o.formID, KG_BUTTON_TYPE.UPDATE);
13066
13066
  }
13067
- function ue({
13067
+ function ce({
13068
13068
  title: L,
13069
13069
  column: G
13070
13070
  }) {
@@ -13132,7 +13132,7 @@ const KgTable$1 = "", getProps$g = () => ({
13132
13132
  onKgUpdateLinkClick: () => ge(Y)
13133
13133
  }, null);
13134
13134
  if ((Q = n == null ? void 0 : n.KgTable) != null && Q.bodyCell) {
13135
- const re = L.dataIndex ? o.store.getVarGridDetail(o.formID, L.dataIndex) : null;
13135
+ const te = L.dataIndex ? o.store.getVarGridDetail(o.formID, L.dataIndex) : null;
13136
13136
  return n.KgTable.bodyCell({
13137
13137
  column: L,
13138
13138
  index: G,
@@ -13140,13 +13140,13 @@ const KgTable$1 = "", getProps$g = () => ({
13140
13140
  text: R,
13141
13141
  value: x,
13142
13142
  row: Y,
13143
- varGridDetail: re,
13143
+ varGridDetail: te,
13144
13144
  defaultRender: J
13145
13145
  });
13146
13146
  } else
13147
13147
  return J;
13148
13148
  }
13149
- function ce() {
13149
+ function de() {
13150
13150
  return !u.isReadAutomatically.value && !u.store.getIsRetrieved(o.formID) ? i.t("kg.KgTable.emptyText") : i.t("kg.emptyText");
13151
13151
  }
13152
13152
  return () => {
@@ -13176,12 +13176,12 @@ const KgTable$1 = "", getProps$g = () => ({
13176
13176
  onClick: (x) => B(x, R)
13177
13177
  }),
13178
13178
  onResizeColumn: Z,
13179
- onChange: te,
13179
+ onChange: ee,
13180
13180
  onExpand: se
13181
13181
  }, {
13182
- headerCell: ue,
13182
+ headerCell: ce,
13183
13183
  bodyCell: le,
13184
- emptyText: ce,
13184
+ emptyText: de,
13185
13185
  expandedRowRender: (Y = n == null ? void 0 : n.KgTable) == null ? void 0 : Y.expandedRowRender,
13186
13186
  summary: ne
13187
13187
  }), (u.isShowBottomLeft.value || u.isShowBottomRight.value) && createVNode("div", {
@@ -14703,7 +14703,7 @@ const KgSearch_ConfigModal_VarProfileMaster = "", getProps$c = () => ({
14703
14703
  _(!0);
14704
14704
  }
14705
14705
  });
14706
- }) : Promise.resolve(!1)), n.onDeleteOk(() => (i.store.retrieve(i.formID), Promise.resolve(!1)));
14706
+ }) : Promise.resolve(!1));
14707
14707
  const o = ref([]), l = ref([]), c = ref([]);
14708
14708
  _useDragRow(e.hostFormID, o, c);
14709
14709
  const u = ref({
@@ -15081,10 +15081,10 @@ const KgSearch$1 = "", getProps$9 = () => ({
15081
15081
  }, {
15082
15082
  default: () => {
15083
15083
  var q, Z;
15084
- return (Z = (q = n.varProfileMasters) == null ? void 0 : q.value) == null ? void 0 : Z.map((te) => createVNode(Select.Option, {
15085
- value: te.id
15084
+ return (Z = (q = n.varProfileMasters) == null ? void 0 : q.value) == null ? void 0 : Z.map((ee) => createVNode(Select.Option, {
15085
+ value: ee.id
15086
15086
  }, {
15087
- default: () => [n.t(te == null ? void 0 : te.prf_var_nam).value]
15087
+ default: () => [n.t(ee == null ? void 0 : ee.prf_var_nam).value]
15088
15088
  }));
15089
15089
  },
15090
15090
  suffixIcon: () => createVNode(CaretDownOutlined$1, {
@@ -24,7 +24,12 @@ export declare type IKgButtonUpdateBeforeClickCbParam = {
24
24
  };
25
25
  export declare type IKgButtonUpdateBeforeClickCb = ((args: IKgButtonUpdateBeforeClickCbParam) => Promise<boolean>) & IKgEventCb;
26
26
  /** 事件监听函数: deleteOk. */
27
- export declare type IKgButtonDeleteOkCb = (() => Promise<boolean>) & IKgEventCb;
27
+ export declare type IKgButtonDeleteOkCbParam = {
28
+ button?: VarButton | null;
29
+ /** 删除的行. */
30
+ rows: Array<IKgTableRow> | null;
31
+ };
32
+ export declare type IKgButtonDeleteOkCb = ((args: IKgButtonDeleteOkCbParam) => Promise<boolean>) & IKgEventCb;
28
33
  /** 事件监听函数: otherOk. */
29
34
  export declare type IKgButtonOtherOkCbParam = {
30
35
  button?: VarButton | null;
@@ -36,7 +41,7 @@ export declare type IKgButtonOtherOkCb = ((args: IKgButtonOtherOkCbParam) => Pro
36
41
  export declare type IKgButtonSubmitSaveCb = (() => Promise<boolean>) & IKgEventCb;
37
42
  /** 事件监听函数: submitCancel. */
38
43
  export declare type IKgButtonSubmitCancelCb = (() => Promise<boolean>) & IKgEventCb;
39
- export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonOtherOkCbParam | any;
44
+ export declare type IKgButtonCbParam = IKgButtonClickCbParam | IKgButtonUpdateBeforeClickCbParam | IKgButtonDeleteOkCbParam | IKgButtonOtherOkCbParam | any;
40
45
  export declare type IKgButtonCb = IKgButtonClickCb | IKgButtonUpdateBeforeClickCb | IKgButtonDeleteOkCb | IKgButtonOtherOkCb | IKgButtonSubmitSaveCb | IKgButtonSubmitCancelCb;
41
46
  export interface IKgButtonState {
42
47
  clickListenersMap: Map<string, Array<IKgButtonClickCb>>;
@@ -15,35 +15,43 @@ export declare type IUseKgSubmit = {
15
15
  displayType: Ref<KG_VAR_SUBMIT__DISPLAY_TYPE>;
16
16
  /**
17
17
  * 监听事件: 打开弹窗.
18
+ * @param cb 回调函数.
18
19
  * @param once 是否只会触发一次. 默认为 undefined.
19
20
  * */
20
21
  onOpen(cb: IKgSubmitOpenCb, once?: boolean): IRemoveEventListenerHandler;
21
22
  /**
22
23
  * 监听事件: 点击保存按钮之后, 执行默认逻辑之前. 可以在此时修改表单的值; 可以在此时对表单的值进行验证, 如果返回 true 表示表单验证失败, 不会再执行后面的代码.
24
+ * @param cb 回调函数.
23
25
  * @param once 是否只会触发一次. 默认为 undefined.
24
26
  */
25
27
  onBeforeOk(cb: IKgSubmitBeforeOkCb, once?: boolean): IRemoveEventListenerHandler;
26
28
  /** 监听事件: 点击保存按钮之后, 表单验证成功. 如果返回 true, 不会再执行后面的代码.
29
+ * @param cb 回调函数.
27
30
  * @param once 是否只会触发一次. 默认为 undefined.
28
31
  */
29
32
  onAfterValidate(cb: IKgSubmitAfterValidateCb, once?: boolean): IRemoveEventListenerHandler;
30
33
  /** 监听事件: 发起请求之前.
34
+ * @param cb 回调函数.
31
35
  * @param once 是否只会触发一次. 默认为 undefined.
32
36
  */
33
37
  onBeforeRequest(cb: IKgSubmitBeforeRequestCb, once?: boolean): IRemoveEventListenerHandler;
34
38
  /** 监听事件: 点击保存按钮之后, 执行默认逻辑之后, 调用接口成功, 即将关闭弹窗.
39
+ * @param cb 回调函数.
35
40
  * @param once 是否只会触发一次. 默认为 undefined.
36
41
  */
37
42
  onOk(cb: IKgSubmitOkCb, once?: boolean): IRemoveEventListenerHandler;
38
43
  /** 监听事件: 请求失败. 请求失败了, 或者请求返回了错误消息.
44
+ * @param cb 回调函数.
39
45
  * @param once 是否只会触发一次. 默认为 undefined.
40
46
  */
41
47
  onError(cb: IKgSubmitErrorCb, once?: boolean): IRemoveEventListenerHandler;
42
48
  /** 监听事件: 关闭弹窗. 点击取消或者点击确定并且成功之后, 都会触发.
49
+ * @param cb 回调函数.
43
50
  * @param once 是否只会触发一次. 默认为 undefined.
44
51
  */
45
52
  onClose(cb: IKgSubmitCloseCb, once?: boolean): IRemoveEventListenerHandler;
46
53
  /** 监听事件: 查找弹窗点击确定.
54
+ * @param cb 回调函数.
47
55
  * @param once 是否只会触发一次. 默认为 undefined.
48
56
  */
49
57
  onLookupOk(cb: IKgSubmitLookupOkCb, once?: boolean): IRemoveEventListenerHandler;
@@ -190,6 +190,10 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
190
190
  emit(frm_id: string, event: IKgVarEvent, args?: any): void;
191
191
  enter(frm_id: IFormID): Promise<void>;
192
192
  leave(frm_id: string): void;
193
+ /**
194
+ * 查询所有变量配置.
195
+ * @param frm_id 界面标识.
196
+ */
193
197
  retrieve(frm_id?: string | null): Promise<void>;
194
198
  setIsCreating(frm_id: string, value: boolean): void;
195
199
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",