@kengic/vue 0.6.16 → 0.6.17
Sign up to get free protection for your applications and to get access to all the features.
package/dist/kengic-vue.js
CHANGED
@@ -263,6 +263,7 @@ class VarGridConfig {
|
|
263
263
|
constructor(t) {
|
264
264
|
p(this, "aut_load_flg");
|
265
265
|
p(this, "button_display_type");
|
266
|
+
p(this, "check_first_row_after_retrieve");
|
266
267
|
p(this, "cmd_prm");
|
267
268
|
p(this, "convert_sort_field_to_under_score_flg");
|
268
269
|
p(this, "expand_accordion_flg");
|
@@ -282,6 +283,7 @@ class VarGridConfig {
|
|
282
283
|
switch (r) {
|
283
284
|
case "aut_load_flg":
|
284
285
|
case "button_display_type":
|
286
|
+
case "check_first_row_after_retrieve":
|
285
287
|
case "cmd_prm":
|
286
288
|
case "convert_sort_field_to_under_score_flg":
|
287
289
|
case "expand_accordion_flg":
|
@@ -4020,11 +4022,11 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4020
4022
|
}, O.valueOf = function() {
|
4021
4023
|
return this.$d.getTime();
|
4022
4024
|
}, O.startOf = function(D, N) {
|
4023
|
-
var L = this, H = !!w.u(N) || N, K = w.p(D), G = function(ce,
|
4024
|
-
var ue = w.w(L.$u ? Date.UTC(L.$y,
|
4025
|
+
var L = this, H = !!w.u(N) || N, K = w.p(D), G = function(ce, ne) {
|
4026
|
+
var ue = w.w(L.$u ? Date.UTC(L.$y, ne, ce) : new Date(L.$y, ne, ce), L);
|
4025
4027
|
return H ? ue : ue.endOf(c);
|
4026
|
-
}, Y = function(ce,
|
4027
|
-
return w.w(L.toDate()[ce].apply(L.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(
|
4028
|
+
}, Y = function(ce, ne) {
|
4029
|
+
return w.w(L.toDate()[ce].apply(L.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ne)), L);
|
4028
4030
|
}, Q = this.$W, q = this.$M, te = this.$D, re = "set" + (this.$u ? "UTC" : "");
|
4029
4031
|
switch (K) {
|
4030
4032
|
case b:
|
@@ -4032,7 +4034,7 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4032
4034
|
case d:
|
4033
4035
|
return H ? G(1, q) : G(0, q + 1);
|
4034
4036
|
case u:
|
4035
|
-
var
|
4037
|
+
var oe = this.$locale().weekStart || 0, le = (Q < oe ? Q + 7 : Q) - oe;
|
4036
4038
|
return G(H ? te - le : te + (6 - le), q);
|
4037
4039
|
case c:
|
4038
4040
|
case C:
|
@@ -4083,16 +4085,16 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4083
4085
|
var N = this, L = this.$locale();
|
4084
4086
|
if (!this.isValid())
|
4085
4087
|
return L.invalidDate || g;
|
4086
|
-
var H = D || "YYYY-MM-DDTHH:mm:ssZ", K = w.z(this), G = this.$H, Y = this.$m, Q = this.$M, q = L.weekdays, te = L.months, re = function(
|
4087
|
-
return
|
4088
|
-
},
|
4089
|
-
return w.s(G % 12 || 12,
|
4090
|
-
}, le = L.meridiem || function(
|
4091
|
-
var de =
|
4088
|
+
var H = D || "YYYY-MM-DDTHH:mm:ssZ", K = w.z(this), G = this.$H, Y = this.$m, Q = this.$M, q = L.weekdays, te = L.months, re = function(ne, ue, fe, de) {
|
4089
|
+
return ne && (ne[ue] || ne(N, H)) || fe[ue].slice(0, de);
|
4090
|
+
}, oe = function(ne) {
|
4091
|
+
return w.s(G % 12 || 12, ne, "0");
|
4092
|
+
}, le = L.meridiem || function(ne, ue, fe) {
|
4093
|
+
var de = ne < 12 ? "AM" : "PM";
|
4092
4094
|
return fe ? de.toLowerCase() : de;
|
4093
|
-
}, ce = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: Q + 1, MM: w.s(Q + 1, 2, "0"), MMM: re(L.monthsShort, Q, te, 3), MMMM: re(te, Q), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: re(L.weekdaysMin, this.$W, q, 2), ddd: re(L.weekdaysShort, this.$W, q, 3), dddd: q[this.$W], H: String(G), HH: w.s(G, 2, "0"), h:
|
4094
|
-
return H.replace(y, function(
|
4095
|
-
return ue || ce[
|
4095
|
+
}, ce = { YY: String(this.$y).slice(-2), YYYY: this.$y, M: Q + 1, MM: w.s(Q + 1, 2, "0"), MMM: re(L.monthsShort, Q, te, 3), MMMM: re(te, Q), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: re(L.weekdaysMin, this.$W, q, 2), ddd: re(L.weekdaysShort, this.$W, q, 3), dddd: q[this.$W], H: String(G), HH: w.s(G, 2, "0"), h: oe(1), hh: oe(2), a: le(G, Y, !0), A: le(G, Y, !1), m: String(Y), mm: w.s(Y, 2, "0"), s: String(this.$s), ss: w.s(this.$s, 2, "0"), SSS: w.s(this.$ms, 3, "0"), Z: K };
|
4096
|
+
return H.replace(y, function(ne, ue) {
|
4097
|
+
return ue || ce[ne] || K.replace(":", "");
|
4096
4098
|
});
|
4097
4099
|
}, O.utcOffset = function() {
|
4098
4100
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
@@ -8068,6 +8070,14 @@ function transformVarButtons(e) {
|
|
8068
8070
|
VarButton: t
|
8069
8071
|
}), t.export_excel_suffix = KG_EXCEL_SUFFIX.XLS), t)) : [];
|
8070
8072
|
}
|
8073
|
+
function transformVarButtonConfig(e) {
|
8074
|
+
if (!e)
|
8075
|
+
return null;
|
8076
|
+
const t = KG_BUTTON_DISPLAY_TYPE.DEFAULT, r = KG_BUTTON_DISPLAY_TYPE.SELECT;
|
8077
|
+
return isNil(e.display_type) ? e.display_type = t : [t, r].includes(e.display_type) || (e.display_type = t, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarButtonConfig.display_type \u975E\u6CD5, \u5408\u6CD5\u7684\u503C\u4E3A ${[t, r]}, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${t}.`, {
|
8078
|
+
VarButtonConfig: e
|
8079
|
+
})), e;
|
8080
|
+
}
|
8071
8081
|
function transformVarGridDetails(e) {
|
8072
8082
|
return e ? e.sort((t, r) => {
|
8073
8083
|
var a, n;
|
@@ -8618,7 +8628,7 @@ const useKgVarStore = () => (store$7 || (store$7 = defineStore("KgVar", {
|
|
8618
8628
|
varGrid: v,
|
8619
8629
|
varGridConfig: k
|
8620
8630
|
} = await GetAll({ params: { frm_id: e } });
|
8621
|
-
this.varCatalogMap.set(e, s != null ? s : []), this.varLookupMap.set(e, l != null ? l : []), this.varPossibilityMap.set(e, d != null ? d : []), this.varVariableConfigMap.set(e, c != null ? c : []), this.varVariableInputMap.set(e, u != null ? u : []), this.varButtonMap.set(e, transformVarButtons(m)), this.varButtonConfigMap.set(e, b != null ? b : null), this.varSubmitConfigMap.set(e, transformVarSubmitConfig(C)), this.varSubmitFieldMap.set(e, transformVarSubmitFields(g)), this.varProfileConfigMap.set(e, transformVarProfileConfig(y != null ? y : null)), this.varProfileMap.set(e, {
|
8631
|
+
this.varCatalogMap.set(e, s != null ? s : []), this.varLookupMap.set(e, l != null ? l : []), this.varPossibilityMap.set(e, d != null ? d : []), this.varVariableConfigMap.set(e, c != null ? c : []), this.varVariableInputMap.set(e, u != null ? u : []), this.varButtonMap.set(e, transformVarButtons(m)), this.varButtonConfigMap.set(e, transformVarButtonConfig(b != null ? b : null)), this.varSubmitConfigMap.set(e, transformVarSubmitConfig(C)), this.varSubmitFieldMap.set(e, transformVarSubmitFields(g)), this.varProfileConfigMap.set(e, transformVarProfileConfig(y != null ? y : null)), this.varProfileMap.set(e, {
|
8622
8632
|
varProfile: _ != null ? _ : null,
|
8623
8633
|
currentVarProfileMasterID: (a = (r = (t = _ == null ? void 0 : _.varProfileMasters) == null ? void 0 : t.find((T) => T.def_flg === 1 || T.cust_lvl === KG_CUSTOM_LEVEL.L0)) == null ? void 0 : r.id) != null ? a : null
|
8624
8634
|
}), this.varGridConfigMap.set(e, transformVarGridConfig(k != null ? k : null)), this.varGridMap.set(e, {
|
@@ -8799,8 +8809,8 @@ function useKgVar(e, t, r = 0) {
|
|
8799
8809
|
u.leave(c);
|
8800
8810
|
}));
|
8801
8811
|
const d = (q) => computed(() => {
|
8802
|
-
var te, re,
|
8803
|
-
return (
|
8812
|
+
var te, re, oe;
|
8813
|
+
return (oe = (re = (te = u.getVarCatalog(c, q)) == null ? void 0 : te.var_text) != null ? re : q) != null ? oe : "";
|
8804
8814
|
}), m = computed(() => u.isRetrieving(c)), b = computed(() => u.isRetrievingVarProfileMaster(c)), C = computed(() => u.isRetrievingVarGridMaster(c)), g = computed(() => u.isCreating(c)), _ = computed(() => u.isCreatingRequesting(c)), y = computed(() => u.isUpdating(c)), v = computed(() => u.isUpdatingRequesting(c)), k = computed(() => u.isCopying(c)), T = computed(() => u.isCopyingRequesting(c)), M = computed(() => u.isDeleting(c)), E = computed(() => u.isDeletingRequesting(c)), P = computed(() => u.isOtherRequesting(c)), I = computed(() => u.getVarButtons(c)), A = computed(() => u.getVarButtonSearch(c)), w = computed(() => u.getVarButtonCreate(c)), U = computed(() => u.getVarButtonUpdate(c)), $ = computed(() => u.getVarButtonCopy(c)), V = computed(() => u.getVarButtonDelete(c)), O = computed(() => u.getVarProfileMasters(c)), D = computed(() => u.getCurrentVarProfileMaster(c)), N = computed(() => u.getCurrentVarProfileMasterID(c)), L = computed(() => {
|
8805
8815
|
var q, te;
|
8806
8816
|
return (te = (q = D.value) == null ? void 0 : q.varProfileDetails) != null ? te : null;
|
@@ -10556,29 +10566,29 @@ const getProps$p = () => ({
|
|
10556
10566
|
const r = inject("$dayjs", dayjs), a = inject(DI_KG_VAR__KG_SLOTS, null);
|
10557
10567
|
inject(DI_KG_VAR__KG_PROPS, null);
|
10558
10568
|
const n = useKg(), o = useKgVar(), i = useKgButton(), s = useKgTable(), l = useKgSubmit(), c = useKgSearch();
|
10559
|
-
i.onSubmitSave(async () => (await le(), !1)), i.onSubmitCancel(async () => (await
|
10569
|
+
i.onSubmitSave(async () => (await le(), !1)), i.onSubmitCancel(async () => (await oe(), !1)), _useFormModel$1();
|
10560
10570
|
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)), b = 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)), y = computed(() => o.store.getVarSubmitFieldsForCopyKey(o.formID)), v = computed(() => o.store.getVarSubmitFieldsForCopyNotKey(o.formID)), k = computed(() => o.store.getVarSubmitFieldsForDelete(o.formID)), T = computed(() => {
|
10561
|
-
var F,
|
10571
|
+
var F, x, W;
|
10562
10572
|
switch (!0) {
|
10563
10573
|
case o.isCreating.value:
|
10564
10574
|
return (F = b.value) != null ? F : [];
|
10565
10575
|
case o.isUpdating.value:
|
10566
|
-
return (
|
10576
|
+
return (x = g.value) != null ? x : [];
|
10567
10577
|
case o.isCopying.value:
|
10568
|
-
return (
|
10578
|
+
return (W = y.value) != null ? W : [];
|
10569
10579
|
case o.isDeleting.value:
|
10570
10580
|
return [];
|
10571
10581
|
}
|
10572
10582
|
return [];
|
10573
10583
|
}), M = computed(() => {
|
10574
|
-
var F,
|
10584
|
+
var F, x, W, J;
|
10575
10585
|
switch (!0) {
|
10576
10586
|
case o.isCreating.value:
|
10577
10587
|
return (F = C.value) != null ? F : [];
|
10578
10588
|
case o.isUpdating.value:
|
10579
|
-
return (
|
10589
|
+
return (x = _.value) != null ? x : [];
|
10580
10590
|
case o.isCopying.value:
|
10581
|
-
return (
|
10591
|
+
return (W = v.value) != null ? W : [];
|
10582
10592
|
case o.isDeleting.value:
|
10583
10593
|
return (J = k.value) != null ? J : [];
|
10584
10594
|
}
|
@@ -10589,11 +10599,11 @@ const getProps$p = () => ({
|
|
10589
10599
|
var F;
|
10590
10600
|
return !!(u.value || H.isFullscreen || ((F = m.value) == null ? void 0 : F.resizable_flg) === 0);
|
10591
10601
|
}), U = computed(() => {
|
10592
|
-
var F,
|
10593
|
-
return u.value ? 398 : (
|
10602
|
+
var F, x;
|
10603
|
+
return u.value ? 398 : (x = (F = m.value) == null ? void 0 : F.min_width) != null ? x : DEFAULT_MIN_WIDTH;
|
10594
10604
|
}), $ = computed(() => {
|
10595
|
-
var F,
|
10596
|
-
return u.value ? 398 : (
|
10605
|
+
var F, x;
|
10606
|
+
return u.value ? 398 : (x = (F = m.value) == null ? void 0 : F.max_width) != null ? x : DEFAULT_MAX_WIDTH;
|
10597
10607
|
}), V = computed(() => u.value ? 398 : A.value.kgWidth), O = ref(null);
|
10598
10608
|
_useResizeObserver$1(O);
|
10599
10609
|
const D = _useTitle(), N = computed(() => u.value ? 400 : A.value.kgWidth && A.value.kgWidth > 0 ? "auto" : 0), L = computed(() => N.value === 0 ? !1 : !!(o.isCreating.value || o.isUpdating.value || o.isCopying.value || o.isDeleting.value)), H = reactive({
|
@@ -10605,18 +10615,18 @@ const getProps$p = () => ({
|
|
10605
10615
|
} = _useLayout(), {
|
10606
10616
|
getDefaultWidth: Y
|
10607
10617
|
} = _useDefaultWidth(), Q = computed(() => {
|
10608
|
-
var F,
|
10618
|
+
var F, x, W;
|
10609
10619
|
switch (G.value) {
|
10610
10620
|
case "horizontal":
|
10611
10621
|
switch ((F = m.value) == null ? void 0 : F.label_col_unit) {
|
10612
10622
|
case KG_WIDTH_UNIT.SPAN:
|
10613
10623
|
return {
|
10614
|
-
span: (
|
10624
|
+
span: (x = m.value) == null ? void 0 : x.label_col
|
10615
10625
|
};
|
10616
10626
|
default:
|
10617
10627
|
return {
|
10618
10628
|
style: {
|
10619
|
-
width: `${(
|
10629
|
+
width: `${(W = m.value) == null ? void 0 : W.label_col}px`
|
10620
10630
|
}
|
10621
10631
|
};
|
10622
10632
|
}
|
@@ -10624,13 +10634,13 @@ const getProps$p = () => ({
|
|
10624
10634
|
return;
|
10625
10635
|
}
|
10626
10636
|
}), q = computed(() => {
|
10627
|
-
var F,
|
10637
|
+
var F, x;
|
10628
10638
|
switch (G.value) {
|
10629
10639
|
case "horizontal":
|
10630
10640
|
switch ((F = m.value) == null ? void 0 : F.label_col_unit) {
|
10631
10641
|
case KG_WIDTH_UNIT.SPAN:
|
10632
10642
|
return {
|
10633
|
-
span: 24 - ((
|
10643
|
+
span: 24 - ((x = m.value) == null ? void 0 : x.label_col)
|
10634
10644
|
};
|
10635
10645
|
default:
|
10636
10646
|
return;
|
@@ -10639,8 +10649,8 @@ const getProps$p = () => ({
|
|
10639
10649
|
return;
|
10640
10650
|
}
|
10641
10651
|
});
|
10642
|
-
watch(L, (F,
|
10643
|
-
F === !0 && te(),
|
10652
|
+
watch(L, (F, x) => {
|
10653
|
+
F === !0 && te(), x === !0 && F === !1 && re();
|
10644
10654
|
}, {
|
10645
10655
|
immediate: !0
|
10646
10656
|
}), watch(Y, (F) => {
|
@@ -10649,9 +10659,9 @@ const getProps$p = () => ({
|
|
10649
10659
|
immediate: !0
|
10650
10660
|
});
|
10651
10661
|
function te() {
|
10652
|
-
var
|
10653
|
-
const F = watch(l.model, (
|
10654
|
-
|
10662
|
+
var x;
|
10663
|
+
const F = watch(l.model, (W) => {
|
10664
|
+
W && Object.keys(W).length > 0 && (setTimeout(() => F()), l.store.emit(o.formID, "open", {
|
10655
10665
|
isCreating: o.isCreating.value,
|
10656
10666
|
isUpdating: o.isUpdating.value,
|
10657
10667
|
isCopying: o.isCopying.value,
|
@@ -10662,12 +10672,12 @@ const getProps$p = () => ({
|
|
10662
10672
|
}, {
|
10663
10673
|
immediate: !0
|
10664
10674
|
});
|
10665
|
-
((
|
10675
|
+
((x = m.value) == null ? void 0 : x.dft_fullscreen_flg) === 1 && !u.value && (H.isFullscreen = !0);
|
10666
10676
|
}
|
10667
10677
|
async function re() {
|
10668
10678
|
A.value.kgWidth = Y.value, H.isFullscreen = !1, await l.store.emit(o.formID, "close", null);
|
10669
10679
|
}
|
10670
|
-
function
|
10680
|
+
function oe() {
|
10671
10681
|
switch (!0) {
|
10672
10682
|
case o.isCreating.value:
|
10673
10683
|
o.store.setIsCreating(o.formID, !1);
|
@@ -10684,7 +10694,7 @@ const getProps$p = () => ({
|
|
10684
10694
|
}
|
10685
10695
|
}
|
10686
10696
|
async function le() {
|
10687
|
-
var F,
|
10697
|
+
var F, x;
|
10688
10698
|
try {
|
10689
10699
|
if (await l.store.emit(o.formID, "beforeOk", {
|
10690
10700
|
isCreating: o.isCreating.value,
|
@@ -10701,7 +10711,7 @@ const getProps$p = () => ({
|
|
10701
10711
|
} catch (Z) {
|
10702
10712
|
KgUtil.throwIfNotFormError(Z);
|
10703
10713
|
}
|
10704
|
-
if (await ((
|
10714
|
+
if (await ((x = l.formRef.value) == null ? void 0 : x.validate()), await l.store.emit(o.formID, "afterValidate", {
|
10705
10715
|
isCreating: o.isCreating.value,
|
10706
10716
|
isUpdating: o.isUpdating.value,
|
10707
10717
|
isCopying: o.isCopying.value,
|
@@ -10716,7 +10726,7 @@ const getProps$p = () => ({
|
|
10716
10726
|
await ce();
|
10717
10727
|
break;
|
10718
10728
|
case o.isUpdating.value:
|
10719
|
-
await
|
10729
|
+
await ne();
|
10720
10730
|
break;
|
10721
10731
|
case o.isCopying.value:
|
10722
10732
|
await ue();
|
@@ -10725,13 +10735,13 @@ const getProps$p = () => ({
|
|
10725
10735
|
await fe();
|
10726
10736
|
break;
|
10727
10737
|
}
|
10728
|
-
} catch (
|
10729
|
-
KgUtil.throwIfNotFormError(
|
10738
|
+
} catch (W) {
|
10739
|
+
KgUtil.throwIfNotFormError(W);
|
10730
10740
|
}
|
10731
10741
|
}
|
10732
10742
|
async function ce() {
|
10733
|
-
var
|
10734
|
-
const F = (
|
10743
|
+
var x, W, J, Z, ae, se;
|
10744
|
+
const F = (x = o.varButtonCreate.value) == null ? void 0 : x.cmd;
|
10735
10745
|
if (!F) {
|
10736
10746
|
KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10737
10747
|
VarButton: o.varButtonCreate.value
|
@@ -10740,7 +10750,7 @@ const getProps$p = () => ({
|
|
10740
10750
|
}
|
10741
10751
|
o.store.setIsCreatingRequesting(o.formID, !0);
|
10742
10752
|
try {
|
10743
|
-
let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (
|
10753
|
+
let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (W = o.varButtonCreate.value) == null ? void 0 : W.cmd_prm) != null ? J : ""), o.formID, r)), ie = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
|
10744
10754
|
if (await l.store.emit(o.formID, "beforeRequest", {
|
10745
10755
|
isCreating: o.isCreating.value,
|
10746
10756
|
isUpdating: o.isUpdating.value,
|
@@ -10754,7 +10764,7 @@ const getProps$p = () => ({
|
|
10754
10764
|
}))
|
10755
10765
|
return;
|
10756
10766
|
await httpClient().request({
|
10757
|
-
method: (
|
10767
|
+
method: (ae = (Z = o.varButtonCreate.value) == null ? void 0 : Z.cmd_method) != null ? ae : "POST",
|
10758
10768
|
url: F,
|
10759
10769
|
params: ee.value,
|
10760
10770
|
data: ie.value
|
@@ -10772,9 +10782,9 @@ const getProps$p = () => ({
|
|
10772
10782
|
o.store.setIsCreatingRequesting(o.formID, !1);
|
10773
10783
|
}
|
10774
10784
|
}
|
10775
|
-
async function
|
10776
|
-
var
|
10777
|
-
const F = (
|
10785
|
+
async function ne() {
|
10786
|
+
var x, W, J, Z, ae, se;
|
10787
|
+
const F = (x = o.varButtonUpdate.value) == null ? void 0 : x.cmd;
|
10778
10788
|
if (!F) {
|
10779
10789
|
KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10780
10790
|
VarButton: o.varButtonUpdate.value
|
@@ -10783,7 +10793,7 @@ const getProps$p = () => ({
|
|
10783
10793
|
}
|
10784
10794
|
try {
|
10785
10795
|
o.store.setIsUpdatingRequesting(o.formID, !0);
|
10786
|
-
let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (
|
10796
|
+
let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (W = o.varButtonUpdate.value) == null ? void 0 : W.cmd_prm) != null ? J : ""), o.formID, r)), ie = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
|
10787
10797
|
if (await l.store.emit(o.formID, "beforeRequest", {
|
10788
10798
|
isCreating: o.isCreating.value,
|
10789
10799
|
isUpdating: o.isUpdating.value,
|
@@ -10797,7 +10807,7 @@ const getProps$p = () => ({
|
|
10797
10807
|
}))
|
10798
10808
|
return;
|
10799
10809
|
await httpClient().request({
|
10800
|
-
method: (
|
10810
|
+
method: (ae = (Z = o.varButtonUpdate.value) == null ? void 0 : Z.cmd_method) != null ? ae : "POST",
|
10801
10811
|
url: F,
|
10802
10812
|
params: ee.value,
|
10803
10813
|
data: ie.value
|
@@ -10816,8 +10826,8 @@ const getProps$p = () => ({
|
|
10816
10826
|
}
|
10817
10827
|
}
|
10818
10828
|
async function ue() {
|
10819
|
-
var
|
10820
|
-
const F = (
|
10829
|
+
var x, W, J, Z, ae, se, ee, ie;
|
10830
|
+
const F = (x = o.varButtonCopy.value) == null ? void 0 : x.cmd;
|
10821
10831
|
if (!F) {
|
10822
10832
|
KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10823
10833
|
VarButton: o.varButtonCopy.value
|
@@ -10826,11 +10836,11 @@ const getProps$p = () => ({
|
|
10826
10836
|
}
|
10827
10837
|
try {
|
10828
10838
|
o.store.setIsCopyingRequesting(o.formID, !0);
|
10829
|
-
let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (
|
10839
|
+
let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((J = (W = o.varButtonCopy.value) == null ? void 0 : W.cmd_prm) != null ? J : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
|
10830
10840
|
...(Z = s.selectedFirstRow.value) != null ? Z : {},
|
10831
10841
|
...toRaw(l.model.value)
|
10832
10842
|
}, o.formID, r));
|
10833
|
-
if (((
|
10843
|
+
if (((ae = m.value) == null ? void 0 : ae.cpy_clear_id_flg) !== 0 && delete pe.value.id, await l.store.emit(o.formID, "beforeRequest", {
|
10834
10844
|
isCreating: o.isCreating.value,
|
10835
10845
|
isUpdating: o.isUpdating.value,
|
10836
10846
|
isCopying: o.isCopying.value,
|
@@ -10862,8 +10872,8 @@ const getProps$p = () => ({
|
|
10862
10872
|
}
|
10863
10873
|
}
|
10864
10874
|
async function fe() {
|
10865
|
-
var
|
10866
|
-
const F = (
|
10875
|
+
var x, W, J, Z, ae, se;
|
10876
|
+
const F = (x = o.varButtonDelete.value) == null ? void 0 : x.cmd;
|
10867
10877
|
if (!F) {
|
10868
10878
|
KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
10869
10879
|
VarButton: o.varButtonDelete.value
|
@@ -10873,7 +10883,7 @@ const getProps$p = () => ({
|
|
10873
10883
|
try {
|
10874
10884
|
o.store.setIsDeletingRequesting(o.formID, !0);
|
10875
10885
|
let ee = ref({
|
10876
|
-
ids: (J = (
|
10886
|
+
ids: (J = (W = s.selectedRows.value) == null ? void 0 : W.map((pe) => {
|
10877
10887
|
var me, _e, he;
|
10878
10888
|
return (he = pe[(_e = (me = o.varButtonDelete.value) == null ? void 0 : me.del_param_clm) != null ? _e : "id"]) != null ? he : "";
|
10879
10889
|
})) != null ? J : []
|
@@ -10891,7 +10901,7 @@ const getProps$p = () => ({
|
|
10891
10901
|
}))
|
10892
10902
|
return;
|
10893
10903
|
await httpClient().request({
|
10894
|
-
method: (
|
10904
|
+
method: (ae = (Z = o.varButtonDelete.value) == null ? void 0 : Z.cmd_method) != null ? ae : "DELETE",
|
10895
10905
|
url: F,
|
10896
10906
|
params: ee.value,
|
10897
10907
|
data: ie.value
|
@@ -10912,9 +10922,9 @@ const getProps$p = () => ({
|
|
10912
10922
|
}
|
10913
10923
|
}
|
10914
10924
|
function de(F) {
|
10915
|
-
var
|
10916
|
-
const
|
10917
|
-
return isFunction$2(
|
10925
|
+
var W, J;
|
10926
|
+
const x = (J = (W = a == null ? void 0 : a.KgSubmit) == null ? void 0 : W["KgForm.Item"]) == null ? void 0 : J[F.var_nam];
|
10927
|
+
return isFunction$2(x) ? createVNode(KgForm.Item, {
|
10918
10928
|
kgVarName: F.var_nam,
|
10919
10929
|
kgContext: KG_FORM_CONTEXT.SUBMIT,
|
10920
10930
|
kgRules: l.rules.value[F.var_nam],
|
@@ -10922,14 +10932,14 @@ const getProps$p = () => ({
|
|
10922
10932
|
}, {
|
10923
10933
|
control: ({
|
10924
10934
|
varName: Z,
|
10925
|
-
props:
|
10935
|
+
props: ae,
|
10926
10936
|
model: se,
|
10927
10937
|
varVariableConfig: ee,
|
10928
10938
|
varProfileDetail: ie,
|
10929
10939
|
varSubmitField: ge
|
10930
|
-
}) =>
|
10940
|
+
}) => x({
|
10931
10941
|
varName: Z,
|
10932
|
-
props:
|
10942
|
+
props: ae,
|
10933
10943
|
model: se,
|
10934
10944
|
varVariableConfig: ee,
|
10935
10945
|
varProfileDetail: ie,
|
@@ -10943,14 +10953,14 @@ const getProps$p = () => ({
|
|
10943
10953
|
}, null);
|
10944
10954
|
}
|
10945
10955
|
function R() {
|
10946
|
-
let F,
|
10956
|
+
let F, x;
|
10947
10957
|
return createVNode(KgResizable, {
|
10948
10958
|
kgType: l.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL ? "right" : "left",
|
10949
10959
|
kgMinWidth: U.value,
|
10950
10960
|
kgMaxWidth: $.value,
|
10951
10961
|
kgWidth: V.value,
|
10952
10962
|
kgDisabled: w.value,
|
10953
|
-
"onUpdate:kgWidth": (
|
10963
|
+
"onUpdate:kgWidth": (W) => A.value.kgWidth = W
|
10954
10964
|
}, {
|
10955
10965
|
default: () => [createVNode(Spin, {
|
10956
10966
|
spinning: d.value
|
@@ -10970,8 +10980,8 @@ const getProps$p = () => ({
|
|
10970
10980
|
default: () => [F]
|
10971
10981
|
}), T.value.length > 0 && M.value.length > 0 && createVNode(Divider, null, null), M.value.length > 0 && createVNode(Row, {
|
10972
10982
|
gutter: 12
|
10973
|
-
}, _isSlot$8(
|
10974
|
-
default: () => [
|
10983
|
+
}, _isSlot$8(x = M.value.map(de)) ? x : {
|
10984
|
+
default: () => [x]
|
10975
10985
|
}), u.value && createVNode("div", {
|
10976
10986
|
style: "text-align: center; padding: 6px 0 12px;"
|
10977
10987
|
}, [n.t("kg.confirmDelete")])])]
|
@@ -10979,13 +10989,13 @@ const getProps$p = () => ({
|
|
10979
10989
|
})]
|
10980
10990
|
});
|
10981
10991
|
}
|
10982
|
-
function
|
10983
|
-
let F,
|
10992
|
+
function B() {
|
10993
|
+
let F, x;
|
10984
10994
|
return createVNode("div", null, [createVNode(Button, {
|
10985
10995
|
type: "primary",
|
10986
10996
|
ghost: !P.value,
|
10987
10997
|
disabled: P.value,
|
10988
|
-
onClick:
|
10998
|
+
onClick: oe
|
10989
10999
|
}, _isSlot$8(F = n.t("kg.cancel")) ? F : {
|
10990
11000
|
default: () => [F]
|
10991
11001
|
}), createVNode(Button, {
|
@@ -10994,11 +11004,11 @@ const getProps$p = () => ({
|
|
10994
11004
|
loading: E.value,
|
10995
11005
|
danger: !!o.isDeleting.value,
|
10996
11006
|
onClick: le
|
10997
|
-
}, _isSlot$8(
|
10998
|
-
default: () => [
|
11007
|
+
}, _isSlot$8(x = n.t(o.isDeleting.value ? "kg.delete" : "kg.save")) ? x : {
|
11008
|
+
default: () => [x]
|
10999
11009
|
})]);
|
11000
11010
|
}
|
11001
|
-
function
|
11011
|
+
function z() {
|
11002
11012
|
return createVNode("div", {
|
11003
11013
|
title: D.title.value
|
11004
11014
|
}, [D.title.value]);
|
@@ -11009,7 +11019,7 @@ const getProps$p = () => ({
|
|
11009
11019
|
"onUpdate:isFullscreen": (F) => H.isFullscreen = F,
|
11010
11020
|
kgShowFullscreenButton: !u.value,
|
11011
11021
|
kgShowConfigButton: !u.value && e.kgShowConfigButton,
|
11012
|
-
onKgCancel:
|
11022
|
+
onKgCancel: oe
|
11013
11023
|
}, null);
|
11014
11024
|
}
|
11015
11025
|
return onUnmounted(() => {
|
@@ -11025,10 +11035,10 @@ const getProps$p = () => ({
|
|
11025
11035
|
class: K.value,
|
11026
11036
|
"kg-frm_id": o.formID
|
11027
11037
|
}, {
|
11028
|
-
title:
|
11038
|
+
title: z,
|
11029
11039
|
extra: X,
|
11030
11040
|
default: R,
|
11031
|
-
footer:
|
11041
|
+
footer: B
|
11032
11042
|
});
|
11033
11043
|
}
|
11034
11044
|
}), KgYesOrNo$1 = "", getProps$o = () => ({
|
@@ -12001,12 +12011,12 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12001
12011
|
resetPageIndex: R
|
12002
12012
|
}) => (G(R), !1)), l.onReset(async () => (G(!0), !1)), u.store.$onAction(async ({
|
12003
12013
|
name: R,
|
12004
|
-
args:
|
12014
|
+
args: B
|
12005
12015
|
}) => {
|
12006
12016
|
switch (R) {
|
12007
12017
|
case "setRowSelect":
|
12008
|
-
if (
|
12009
|
-
const
|
12018
|
+
if (B[0] === s.formID) {
|
12019
|
+
const z = B[1], X = B[2], F = z[u.id.value];
|
12010
12020
|
switch (!0) {
|
12011
12021
|
case (X && !V.value.includes(F)):
|
12012
12022
|
Y([...V.value, F]);
|
@@ -12018,7 +12028,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12018
12028
|
}
|
12019
12029
|
break;
|
12020
12030
|
case "clearDatas":
|
12021
|
-
|
12031
|
+
B[0] === s.formID && ($.value = [], O.total = 0, K(), b.value = []);
|
12022
12032
|
break;
|
12023
12033
|
}
|
12024
12034
|
});
|
@@ -12030,27 +12040,27 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12030
12040
|
} = _useLoading(), y = ref(null);
|
12031
12041
|
_useResizeObserver(y);
|
12032
12042
|
const v = computed(() => {
|
12033
|
-
var R,
|
12034
|
-
return (
|
12043
|
+
var R, B;
|
12044
|
+
return (B = (R = s.varButtonSearch.value) == null ? void 0 : R.cmd) != null ? B : null;
|
12035
12045
|
}), k = computed(() => {
|
12036
|
-
var
|
12046
|
+
var B, z, X, F, x, W, J;
|
12037
12047
|
let R = {
|
12038
12048
|
pageNo: O.pageIndex,
|
12039
12049
|
pageSize: O.pageSize,
|
12040
12050
|
...D,
|
12041
|
-
...(
|
12051
|
+
...(z = (B = l.model) == null ? void 0 : B.value) != null ? z : {}
|
12042
12052
|
};
|
12043
12053
|
return s.varButtonSearch.value && (R = {
|
12044
12054
|
...R,
|
12045
12055
|
...KgVarUtil.parseCommandParameter((F = (X = s.varButtonSearch.value) == null ? void 0 : X.cmd_prm) != null ? F : "")
|
12046
|
-
}), (
|
12056
|
+
}), (x = s.varGridConfig.value) != null && x.cmd_prm && (R = {
|
12047
12057
|
...R,
|
12048
|
-
...KgVarUtil.parseCommandParameter((
|
12058
|
+
...KgVarUtil.parseCommandParameter((W = s.varGridConfig.value.cmd_prm) != null ? W : "")
|
12049
12059
|
}), ((J = s.varGridConfig.value) == null ? void 0 : J.convert_sort_field_to_under_score_flg) === 1 && R.column && (R.column = snakeCase$1(R.column)), R;
|
12050
12060
|
}), T = computed(() => {
|
12051
|
-
var R,
|
12052
|
-
if (!isNil((
|
12053
|
-
return (X = (
|
12061
|
+
var R, B, z, X;
|
12062
|
+
if (!isNil((B = (R = o == null ? void 0 : o.value) == null ? void 0 : R.KgTable) == null ? void 0 : B.kgDisabled))
|
12063
|
+
return (X = (z = o == null ? void 0 : o.value) == null ? void 0 : z.KgTable) == null ? void 0 : X.kgDisabled;
|
12054
12064
|
if (!isNil(e.kgDisabled))
|
12055
12065
|
return e.kgDisabled;
|
12056
12066
|
}), M = computed(() => !!T.value || _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value), E = computed(() => !!T.value || _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value || O.total === 0), P = computed(() => {
|
@@ -12074,13 +12084,13 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12074
12084
|
onChange: (R) => u.isMultiSelect.value && Y(R)
|
12075
12085
|
};
|
12076
12086
|
}), w = computed(() => {
|
12077
|
-
var
|
12087
|
+
var B;
|
12078
12088
|
let R = "kg-table";
|
12079
|
-
return ((
|
12089
|
+
return ((B = s.varGridConfig.value) == null ? void 0 : B.show_bottom_border_flg) === 1 && (R += " kg-table--bottom-border"), !u.isShowBottomLeft.value && !u.isShowBottomRight.value && (R += " kg-table--no-bottom"), d.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.TABLE && (s.isCreating.value || s.isUpdating.value || s.isCopying.value || s.isDeleting.value) && (R += " kg-table--submitting"), R;
|
12080
12090
|
}), U = computed(() => {
|
12081
|
-
var
|
12091
|
+
var B;
|
12082
12092
|
let R = "kg-table-bottom";
|
12083
|
-
return ((
|
12093
|
+
return ((B = s.varGridConfig.value) == null ? void 0 : B.show_bottom_border_flg) === 1 && (R += " kg-table-bottom--border"), R;
|
12084
12094
|
}), $ = ref([]), V = (de = u.store.getSelectedRowKeys(s.formID)) != null ? de : ref([]), O = reactive({
|
12085
12095
|
pageIndex: 1,
|
12086
12096
|
pageSize: 10,
|
@@ -12095,12 +12105,12 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12095
12105
|
});
|
12096
12106
|
watch(u.pageSizeOptions, (R) => {
|
12097
12107
|
R.length > 0 && !R.includes(O.pageSize) && (O.pageSize = u.pageSizeOption.value);
|
12098
|
-
}), watch([v, u.isReadAutomatically, l.isReady], ([R,
|
12099
|
-
R &&
|
12108
|
+
}), watch([v, u.isReadAutomatically, l.isReady], ([R, B, z]) => {
|
12109
|
+
R && B && z && !u.store.getIsRetrieved(s.formID) && G(!0);
|
12100
12110
|
}, {
|
12101
12111
|
immediate: !0
|
12102
|
-
}), watch(s.isCreating, (R,
|
12103
|
-
R === !0 ? L() : R === !1 &&
|
12112
|
+
}), watch(s.isCreating, (R, B) => {
|
12113
|
+
R === !0 ? L() : R === !1 && B === !0 && H();
|
12104
12114
|
}), onUnmounted(() => {
|
12105
12115
|
u.store.dispose(s.formID);
|
12106
12116
|
});
|
@@ -12113,29 +12123,29 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12113
12123
|
}
|
12114
12124
|
}
|
12115
12125
|
function H() {
|
12116
|
-
const R = $.value.find((
|
12126
|
+
const R = $.value.find((B) => B[u.id.value] === KG_TABLE_TEMP_ID);
|
12117
12127
|
R && ($.value = without$1($.value, R), u.store.setSelectedRows(s.formID, []));
|
12118
12128
|
}
|
12119
|
-
function K(R,
|
12120
|
-
var
|
12129
|
+
function K(R, B) {
|
12130
|
+
var z;
|
12121
12131
|
if (!(!!T.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value) && !!A.value) {
|
12122
|
-
if (!
|
12132
|
+
if (!B) {
|
12123
12133
|
u.store.setSelectedRows(s.formID, []);
|
12124
12134
|
return;
|
12125
12135
|
}
|
12126
12136
|
switch (R == null ? void 0 : R.detail) {
|
12127
12137
|
case 1:
|
12128
|
-
switch ((
|
12138
|
+
switch ((z = s.varGridConfig.value) == null ? void 0 : z.operation_on_row_click) {
|
12129
12139
|
case 0:
|
12130
12140
|
break;
|
12131
12141
|
case 1:
|
12132
|
-
u.store.setSelectedRows(s.formID, [
|
12142
|
+
u.store.setSelectedRows(s.formID, [B]);
|
12133
12143
|
break;
|
12134
12144
|
}
|
12135
12145
|
break;
|
12136
12146
|
case 2:
|
12137
12147
|
u.store.emit(s.formID, "rowDoubleClick", {
|
12138
|
-
row:
|
12148
|
+
row: B
|
12139
12149
|
});
|
12140
12150
|
break;
|
12141
12151
|
}
|
@@ -12143,13 +12153,13 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12143
12153
|
}
|
12144
12154
|
function G(R = !1) {
|
12145
12155
|
KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u8FDB\u5165\u65B9\u6CD5.`);
|
12146
|
-
const
|
12147
|
-
X && (setTimeout(() =>
|
12156
|
+
const B = watch(m, (X) => {
|
12157
|
+
X && (setTimeout(() => B()), z());
|
12148
12158
|
}, {
|
12149
12159
|
immediate: !0
|
12150
12160
|
});
|
12151
|
-
async function
|
12152
|
-
var X, F;
|
12161
|
+
async function z() {
|
12162
|
+
var X, F, x;
|
12153
12163
|
if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u8FDB\u5165\u65B9\u6CD5.`), !v.value) {
|
12154
12164
|
KgLogger.error("[KgTable] '\u67E5\u8BE2\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
12155
12165
|
VarButton: s.varButtonSearch.value
|
@@ -12158,111 +12168,111 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12158
12168
|
}
|
12159
12169
|
R && (O.pageIndex = 1), u.store.setIsRetrieving(s.formID, !0);
|
12160
12170
|
try {
|
12161
|
-
const
|
12171
|
+
const W = KgUtil.parseParams(k.value, u.profileFormID.value, a), J = ref({});
|
12162
12172
|
await u.store.emit(s.formID, "beforeRetrieve", {
|
12163
|
-
params:
|
12164
|
-
response:
|
12165
|
-
}) ? KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u89E6\u53D1 beforeRetrieve \u4E8B\u4EF6.`) :
|
12173
|
+
params: W,
|
12174
|
+
response: J
|
12175
|
+
}) ? KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u89E6\u53D1 beforeRetrieve \u4E8B\u4EF6.`) : J.value = await httpClient().request({
|
12166
12176
|
method: "GET",
|
12167
12177
|
url: v.value,
|
12168
|
-
params:
|
12178
|
+
params: W
|
12169
12179
|
}, {
|
12170
12180
|
successMessageMode: "none"
|
12171
12181
|
});
|
12172
|
-
let
|
12182
|
+
let Z = ref([]), ae = ref(0);
|
12173
12183
|
switch (!0) {
|
12174
|
-
case !
|
12175
|
-
|
12184
|
+
case !J.value:
|
12185
|
+
Z.value = [], ae.value = 0;
|
12176
12186
|
break;
|
12177
|
-
case isArrayLike(
|
12178
|
-
|
12187
|
+
case isArrayLike(J.value):
|
12188
|
+
Z.value = J.value, ae.value = J.value.length;
|
12179
12189
|
break;
|
12180
|
-
case ("total" in
|
12181
|
-
|
12190
|
+
case ("total" in J.value && "records" in J.value):
|
12191
|
+
Z.value = (X = J.value.records) != null ? X : [], ae.value = (F = J.value.total) != null ? F : 0;
|
12182
12192
|
break;
|
12183
12193
|
}
|
12184
12194
|
await u.store.emit(s.formID, "beforeSetDatas", {
|
12185
|
-
datas:
|
12186
|
-
total:
|
12187
|
-
}), $.value =
|
12188
|
-
page:
|
12195
|
+
datas: Z,
|
12196
|
+
total: ae
|
12197
|
+
}), $.value = Z.value, O.total = ae.value, K(), b.value = [], await nextTick(), ((x = s.varGridConfig.value) == null ? void 0 : x.check_first_row_after_retrieve) === 1 && $.value.length > 0 && u.store.setSelectedRows(s.formID, [$.value[0]]), await u.store.emit(s.formID, "retrieve", {
|
12198
|
+
page: J.value,
|
12189
12199
|
datas: $
|
12190
12200
|
}), u.store.setIsRetrieved(s.formID, !0);
|
12191
|
-
} catch (
|
12192
|
-
throw
|
12201
|
+
} catch (W) {
|
12202
|
+
throw W;
|
12193
12203
|
} finally {
|
12194
12204
|
u.store.setIsRetrieving(s.formID, !1);
|
12195
12205
|
}
|
12196
12206
|
}
|
12197
12207
|
}
|
12198
12208
|
function Y(R) {
|
12199
|
-
u.store.setSelectedRows(s.formID, R.map((
|
12200
|
-
var
|
12201
|
-
return (
|
12202
|
-
}).filter((
|
12209
|
+
u.store.setSelectedRows(s.formID, R.map((B) => {
|
12210
|
+
var z;
|
12211
|
+
return (z = $.value) == null ? void 0 : z.find((X) => X[u.id.value] === B);
|
12212
|
+
}).filter((B) => !!B));
|
12203
12213
|
}
|
12204
12214
|
function Q(R) {
|
12205
|
-
var
|
12215
|
+
var B, z;
|
12206
12216
|
switch (u.isMultiSelect.value) {
|
12207
12217
|
case !0:
|
12208
12218
|
{
|
12209
12219
|
const X = R[u.id.value];
|
12210
|
-
V.value.includes(X) ? V.value = without$1(V.value, X) : V.value = [...(
|
12220
|
+
V.value.includes(X) ? V.value = without$1(V.value, X) : V.value = [...(B = V.value) != null ? B : [], X];
|
12211
12221
|
}
|
12212
12222
|
break;
|
12213
12223
|
case !1:
|
12214
12224
|
{
|
12215
12225
|
const X = R[u.id.value];
|
12216
|
-
(
|
12226
|
+
(z = V.value) != null && z.includes(X) ? V.value = [] : V.value = [X];
|
12217
12227
|
}
|
12218
12228
|
break;
|
12219
12229
|
}
|
12220
12230
|
u.store.setSelectedRows(s.formID, V.value.map((X) => {
|
12221
12231
|
var F;
|
12222
|
-
return (F = $.value) == null ? void 0 : F.find((
|
12232
|
+
return (F = $.value) == null ? void 0 : F.find((x) => x[u.id.value] === X);
|
12223
12233
|
}).filter((X) => !!X));
|
12224
12234
|
}
|
12225
|
-
function q(R,
|
12226
|
-
|
12235
|
+
function q(R, B) {
|
12236
|
+
B.width = R, s.store.setVarGridDetailWidth(s.formID, B.dataIndex, R);
|
12227
12237
|
}
|
12228
|
-
async function te(R,
|
12238
|
+
async function te(R, B, z, X) {
|
12229
12239
|
var F;
|
12230
12240
|
switch (X.action) {
|
12231
12241
|
case "sort":
|
12232
12242
|
{
|
12233
12243
|
await nextTick();
|
12234
|
-
let
|
12235
|
-
|
12244
|
+
let x = z;
|
12245
|
+
x.order ? (D.column = (F = x.field) != null ? F : void 0, D.order = x.order === "ascend" ? "asc" : x.order === "descend" ? "desc" : void 0) : (D.column = void 0, D.order = void 0), G(!0);
|
12236
12246
|
}
|
12237
12247
|
break;
|
12238
12248
|
}
|
12239
12249
|
}
|
12240
|
-
function re(R,
|
12250
|
+
function re(R, B) {
|
12241
12251
|
var X;
|
12242
|
-
const
|
12252
|
+
const z = B[u.id.value];
|
12243
12253
|
switch ((X = s.varGridConfig.value) == null ? void 0 : X.expand_accordion_flg) {
|
12244
12254
|
case 0:
|
12245
|
-
R ? b.value = uniq([...b.value,
|
12255
|
+
R ? b.value = uniq([...b.value, z]) : b.value = without$1(b.value, z);
|
12246
12256
|
break;
|
12247
12257
|
default:
|
12248
|
-
R ? b.value = [
|
12258
|
+
R ? b.value = [z] : b.value = [];
|
12249
12259
|
break;
|
12250
12260
|
}
|
12251
12261
|
}
|
12252
|
-
function
|
12253
|
-
|
12262
|
+
function oe(R, B) {
|
12263
|
+
B !== O.pageSize ? (O.pageIndex = 1, O.pageSize = B) : O.pageIndex = R, G();
|
12254
12264
|
}
|
12255
12265
|
function le(R) {
|
12256
|
-
u.store.setSelectedRows(s.formID, [R].map((
|
12257
|
-
var
|
12258
|
-
return (
|
12259
|
-
}).filter((
|
12266
|
+
u.store.setSelectedRows(s.formID, [R].map((B) => {
|
12267
|
+
var z;
|
12268
|
+
return (z = $.value) == null ? void 0 : z.find((X) => X[u.id.value] === B[u.id.value]);
|
12269
|
+
}).filter((B) => !!B)), c.click(s.formID, KG_BUTTON_TYPE.UPDATE);
|
12260
12270
|
}
|
12261
12271
|
function ce({
|
12262
12272
|
title: R,
|
12263
|
-
column:
|
12273
|
+
column: B
|
12264
12274
|
}) {
|
12265
|
-
switch (
|
12275
|
+
switch (B.dataIndex) {
|
12266
12276
|
case "index":
|
12267
12277
|
return createVNode(KgTableSetting, {
|
12268
12278
|
kgDisabled: T.value
|
@@ -12273,7 +12283,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12273
12283
|
}, [R]);
|
12274
12284
|
}
|
12275
12285
|
}
|
12276
|
-
function
|
12286
|
+
function ne() {
|
12277
12287
|
var R;
|
12278
12288
|
return (R = n == null ? void 0 : n.KgTable) != null && R["summary.bodyCell"] ? createVNode(TableSummary, {
|
12279
12289
|
fixed: "bottom"
|
@@ -12283,16 +12293,16 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12283
12293
|
index: 0
|
12284
12294
|
}, null), I.value && createVNode(TableSummary.Cell, {
|
12285
12295
|
index: P.value ? 1 : 0
|
12286
|
-
}, null), C.value.map((
|
12287
|
-
const X = s.store.getVarGridDetail(s.formID,
|
12288
|
-
let F =
|
12296
|
+
}, null), C.value.map((B, z) => {
|
12297
|
+
const X = s.store.getVarGridDetail(s.formID, B.dataIndex);
|
12298
|
+
let F = z;
|
12289
12299
|
return P.value && I.value ? F += 2 : (P.value || I.value) && (F += 1), createVNode(TableSummary.Cell, {
|
12290
12300
|
index: F
|
12291
12301
|
}, {
|
12292
12302
|
default: () => {
|
12293
|
-
var
|
12294
|
-
return [(
|
12295
|
-
column:
|
12303
|
+
var x, W;
|
12304
|
+
return [(W = (x = n == null ? void 0 : n.KgTable) == null ? void 0 : x["summary.bodyCell"]) == null ? void 0 : W.call(x, {
|
12305
|
+
column: B,
|
12296
12306
|
index: F,
|
12297
12307
|
varGridDetail: X
|
12298
12308
|
})];
|
@@ -12304,41 +12314,41 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12304
12314
|
}
|
12305
12315
|
function ue({
|
12306
12316
|
column: R,
|
12307
|
-
index:
|
12308
|
-
record:
|
12317
|
+
index: B,
|
12318
|
+
record: z,
|
12309
12319
|
text: X,
|
12310
12320
|
value: F
|
12311
12321
|
}) {
|
12312
12322
|
var J;
|
12313
|
-
let
|
12314
|
-
R.customRender ?
|
12315
|
-
index:
|
12316
|
-
record:
|
12323
|
+
let x = "";
|
12324
|
+
R.customRender ? x = R.customRender({
|
12325
|
+
index: B,
|
12326
|
+
record: z,
|
12317
12327
|
column: R,
|
12318
12328
|
text: X,
|
12319
12329
|
value: F,
|
12320
|
-
renderIndex:
|
12321
|
-
}) :
|
12322
|
-
const
|
12323
|
-
kgRow:
|
12324
|
-
kgValue:
|
12330
|
+
renderIndex: B
|
12331
|
+
}) : x = F;
|
12332
|
+
const W = createVNode(KgTableCell, {
|
12333
|
+
kgRow: z,
|
12334
|
+
kgValue: x,
|
12325
12335
|
kgVarName: R.dataIndex,
|
12326
|
-
onKgUpdateLinkClick: () => le(
|
12336
|
+
onKgUpdateLinkClick: () => le(z)
|
12327
12337
|
}, null);
|
12328
12338
|
if ((J = n == null ? void 0 : n.KgTable) != null && J.bodyCell) {
|
12329
12339
|
const Z = R.dataIndex ? s.store.getVarGridDetail(s.formID, R.dataIndex) : null;
|
12330
12340
|
return n.KgTable.bodyCell({
|
12331
12341
|
column: R,
|
12332
|
-
index:
|
12333
|
-
record:
|
12342
|
+
index: B,
|
12343
|
+
record: z,
|
12334
12344
|
text: X,
|
12335
12345
|
value: F,
|
12336
|
-
row:
|
12346
|
+
row: z,
|
12337
12347
|
varGridDetail: Z,
|
12338
|
-
defaultRender:
|
12348
|
+
defaultRender: W
|
12339
12349
|
});
|
12340
12350
|
} else
|
12341
|
-
return
|
12351
|
+
return W;
|
12342
12352
|
}
|
12343
12353
|
function fe() {
|
12344
12354
|
return !u.isReadAutomatically.value && !u.store.getIsRetrieved(s.formID) ? i.t("kg.KgTable.emptyText") : i.t("kg.emptyText");
|
@@ -12365,8 +12375,8 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12365
12375
|
expandColumnWidth: 28,
|
12366
12376
|
expandedRowKeys: b.value,
|
12367
12377
|
rowSelection: A.value,
|
12368
|
-
customRow: (
|
12369
|
-
onClick: (
|
12378
|
+
customRow: (B) => ({
|
12379
|
+
onClick: (z) => K(z, B)
|
12370
12380
|
}),
|
12371
12381
|
onResizeColumn: q,
|
12372
12382
|
onChange: te,
|
@@ -12376,7 +12386,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12376
12386
|
bodyCell: ue,
|
12377
12387
|
emptyText: fe,
|
12378
12388
|
expandedRowRender: (R = n == null ? void 0 : n.KgTable) == null ? void 0 : R.expandedRowRender,
|
12379
|
-
summary:
|
12389
|
+
summary: ne
|
12380
12390
|
}), (u.isShowBottomLeft.value || u.isShowBottomRight.value) && createVNode("div", {
|
12381
12391
|
class: U.value
|
12382
12392
|
}, [createVNode("div", {
|
@@ -12393,7 +12403,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12393
12403
|
size: "default",
|
12394
12404
|
current: O.pageIndex,
|
12395
12405
|
pageSize: O.pageSize,
|
12396
|
-
pageSizeOptions: u.pageSizeOptions.value.map((
|
12406
|
+
pageSizeOptions: u.pageSizeOptions.value.map((B) => String(B)),
|
12397
12407
|
total: O.total,
|
12398
12408
|
showSizeChanger: !0,
|
12399
12409
|
showQuickJumper: !1,
|
@@ -12402,12 +12412,12 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
12402
12412
|
locale: {
|
12403
12413
|
page: ""
|
12404
12414
|
},
|
12405
|
-
showTotal: (
|
12406
|
-
from:
|
12407
|
-
to:
|
12408
|
-
total:
|
12415
|
+
showTotal: (B, z) => i.t("kg.KgTable.totalText", {
|
12416
|
+
from: z[0],
|
12417
|
+
to: z[1],
|
12418
|
+
total: B
|
12409
12419
|
}),
|
12410
|
-
onChange: (
|
12420
|
+
onChange: (B, z) => oe(B, z)
|
12411
12421
|
}, null)])])]);
|
12412
12422
|
};
|
12413
12423
|
}
|
@@ -195,6 +195,8 @@ export declare class VarGridConfig {
|
|
195
195
|
aut_load_flg?: number | null;
|
196
196
|
/** 按钮显示样式(ButtonDisplayType). */
|
197
197
|
button_display_type?: string | null;
|
198
|
+
/** 每次查询之后是否自动勾选首行. */
|
199
|
+
check_first_row_after_retrieve?: number | null;
|
198
200
|
/** 接口参数(CommandParameter). */
|
199
201
|
cmd_prm?: string | null;
|
200
202
|
/** 是否将排序字段转换为 under_score 命名方式. */
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { VarButton, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarProfileConfig, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
|
1
|
+
import { VarButton, VarButtonConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarProfileConfig, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
|
2
2
|
export declare function transformVarProfileConfig(varProfileConfig?: VarProfileConfig | null): VarProfileConfig | null;
|
3
3
|
export declare function transformVarGridConfig(varGridConfig?: VarGridConfig | null): VarGridConfig | null;
|
4
4
|
export declare function transformVarGridDTO(varGridDTO?: VarGridDTO | null): VarGridDTO | null;
|
@@ -6,6 +6,7 @@ export declare function transformVarGridMasterDTOs(varGridMasterDTOs?: Array<Var
|
|
6
6
|
export declare function transformVarSubmitConfig(varSubmitConfig?: VarSubmitConfig | null): VarSubmitConfig | null;
|
7
7
|
export declare function transformVarSubmitFields(varSubmitFields?: Array<VarSubmitField> | null): Array<VarSubmitField>;
|
8
8
|
export declare function transformVarButtons(varButtons?: Array<VarButton> | null): Array<VarButton>;
|
9
|
+
export declare function transformVarButtonConfig(varButtonConfig?: VarButtonConfig | null): VarButtonConfig | null;
|
9
10
|
/**
|
10
11
|
* 处理 VarGridDetail 数据, 排序/防呆.
|
11
12
|
*
|