@kengic/vue 0.14.3 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kengic-vue.js +78 -77
- package/dist/src/components/KgButton/KgButton.d.ts +18 -0
- package/dist/src/components/KgTable/index.store.d.ts +4 -2
- package/dist/src/config/index.store.d.ts +6 -6
- package/dist/src/utils/kg-route.util.d.ts +1 -1
- package/dist/src/utils/kg.util.d.ts +1 -1
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
|
@@ -2870,7 +2870,7 @@ const emptyIcon = {
|
|
|
2870
2870
|
...t.data
|
|
2871
2871
|
}, r);
|
|
2872
2872
|
}
|
|
2873
|
-
}), name = "@kengic/vue", version = "0.
|
|
2873
|
+
}), name = "@kengic/vue", version = "0.15.0", data$1 = {
|
|
2874
2874
|
width: 24,
|
|
2875
2875
|
height: 24,
|
|
2876
2876
|
body: '<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h11.175q.4 0 .763.15t.637.425l2.85 2.85q.275.275.425.638t.15.762V12.3q-.475-.2-.988-.263T19 12.05V7.825L16.175 5H5v14h6v2H5ZM5 5v14V5Zm8 17v-1.65q0-.2.075-.388t.225-.337l5.225-5.2q.225-.225.5-.325t.55-.1q.3 0 .575.113t.5.337l.925.925q.2.225.313.5t.112.55q0 .275-.1.563t-.325.512l-5.2 5.2q-.15.15-.338.225T15.65 23H14q-.425 0-.712-.287T13 22Zm7.5-5.575l-.925-.925l.925.925Zm-6 5.075h.95l3.025-3.05l-.45-.475l-.475-.45l-3.05 3.025v.95Zm3.525-3.525l-.475-.45l.925.925l-.45-.475ZM7 10h7q.425 0 .713-.288T15 9V7q0-.425-.288-.713T14 6H7q-.425 0-.713.288T6 7v2q0 .425.288.713T7 10Zm5 8h.1l2.9-2.875V15q0-1.25-.875-2.125T12 12q-1.25 0-2.125.875T9 15q0 1.25.875 2.125T12 18Z"/>'
|
|
@@ -3515,11 +3515,11 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
|
3515
3515
|
}, O.valueOf = function() {
|
|
3516
3516
|
return this.$d.getTime();
|
|
3517
3517
|
}, O.startOf = function(V, $) {
|
|
3518
|
-
var P = this, G = !!K.u($) || $, N = K.p(V), x = function(
|
|
3519
|
-
var F = K.w(P.$u ? Date.UTC(P.$y, ae,
|
|
3518
|
+
var P = this, G = !!K.u($) || $, N = K.p(V), x = function(pe, ae) {
|
|
3519
|
+
var F = K.w(P.$u ? Date.UTC(P.$y, ae, pe) : new Date(P.$y, ae, pe), P);
|
|
3520
3520
|
return G ? F : F.endOf(c);
|
|
3521
|
-
}, Y = function(
|
|
3522
|
-
return K.w(P.toDate()[
|
|
3521
|
+
}, Y = function(pe, ae) {
|
|
3522
|
+
return K.w(P.toDate()[pe].apply(P.toDate("s"), (G ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), P);
|
|
3523
3523
|
}, q = this.$W, J = this.$M, X = this.$D, ee = "set" + (this.$u ? "UTC" : "");
|
|
3524
3524
|
switch (N) {
|
|
3525
3525
|
case E:
|
|
@@ -3582,7 +3582,7 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
|
3582
3582
|
return ae && (ae[F] || ae($, G)) || U[F].slice(0, Q);
|
|
3583
3583
|
}, he = function(ae) {
|
|
3584
3584
|
return K.s(x % 12 || 12, ae, "0");
|
|
3585
|
-
},
|
|
3585
|
+
}, pe = ee || function(ae, F, U) {
|
|
3586
3586
|
var Q = ae < 12 ? "AM" : "PM";
|
|
3587
3587
|
return U ? Q.toLowerCase() : Q;
|
|
3588
3588
|
};
|
|
@@ -3622,9 +3622,9 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
|
3622
3622
|
case "hh":
|
|
3623
3623
|
return he(2);
|
|
3624
3624
|
case "a":
|
|
3625
|
-
return
|
|
3625
|
+
return pe(x, Y, !0);
|
|
3626
3626
|
case "A":
|
|
3627
|
-
return
|
|
3627
|
+
return pe(x, Y, !1);
|
|
3628
3628
|
case "m":
|
|
3629
3629
|
return String(Y);
|
|
3630
3630
|
case "mm":
|
|
@@ -9548,7 +9548,7 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9548
9548
|
var F, U;
|
|
9549
9549
|
return (U = (F = s.varButtonSearch.value) == null ? void 0 : F.cmd) != null ? U : null;
|
|
9550
9550
|
}), k = computed(() => {
|
|
9551
|
-
var U, Q, z, te, ue, ie,
|
|
9551
|
+
var U, Q, z, te, ue, ie, _e, ve, Ce;
|
|
9552
9552
|
let F = {
|
|
9553
9553
|
pageNo: O.pageIndex,
|
|
9554
9554
|
pageSize: O.pageSize,
|
|
@@ -9559,7 +9559,7 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9559
9559
|
return s.varButtonSearch.value && (F = {
|
|
9560
9560
|
...F,
|
|
9561
9561
|
...KgVarUtil.parseCommandParameter((ie = (ue = s.varButtonSearch.value) == null ? void 0 : ue.cmd_prm) != null ? ie : "")
|
|
9562
|
-
}), (
|
|
9562
|
+
}), (_e = s.varGridConfig.value) != null && _e.cmd_prm && (F = {
|
|
9563
9563
|
...F,
|
|
9564
9564
|
...KgVarUtil.parseCommandParameter((ve = s.varGridConfig.value.cmd_prm) != null ? ve : "")
|
|
9565
9565
|
}), ((Ce = s.varGridConfig.value) == null ? void 0 : Ce.convert_sort_field_to_under_score_flg) === 1 && F.column && (F.column = snakeCase$1(F.column)), F;
|
|
@@ -9686,7 +9686,7 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9686
9686
|
immediate: !0
|
|
9687
9687
|
});
|
|
9688
9688
|
async function Q() {
|
|
9689
|
-
var z, te, ue, ie,
|
|
9689
|
+
var z, te, ue, ie, _e, ve, Ce;
|
|
9690
9690
|
if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u6267\u884C\u5F00\u59CB.`), !T.value) {
|
|
9691
9691
|
KgLogger.error(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6309\u94AE\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3.`, {
|
|
9692
9692
|
VarButton: s.varButtonSearch.value
|
|
@@ -9700,30 +9700,30 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9700
9700
|
params: be,
|
|
9701
9701
|
response: ye
|
|
9702
9702
|
})) {
|
|
9703
|
-
const
|
|
9703
|
+
const ce = ((te = (z = n.option.value.KgSearch) == null ? void 0 : z.dynamicQuery) == null ? void 0 : te.on) === !0 && ((ue = s.currentVarProfileMaster.value) == null ? void 0 : ue.dyn_flg) === 1, {
|
|
9704
9704
|
sql: Te,
|
|
9705
9705
|
whereSql: Ae,
|
|
9706
|
-
orderBySql:
|
|
9707
|
-
} = KgUtil.getQuerySql(k.value, o.profileFormID.value, null, t),
|
|
9708
|
-
method: (
|
|
9706
|
+
orderBySql: B
|
|
9707
|
+
} = KgUtil.getQuerySql(k.value, o.profileFormID.value, null, t), W = await httpClient().request({
|
|
9708
|
+
method: (_e = (ie = s.varButtonSearch.value) == null ? void 0 : ie.cmd_method) != null ? _e : "GET",
|
|
9709
9709
|
url: T.value,
|
|
9710
9710
|
params: be,
|
|
9711
9711
|
data: be,
|
|
9712
9712
|
headers: {
|
|
9713
|
-
[KG_HTTP_HEADERS.KG_DYNAMIC_QUERY]:
|
|
9713
|
+
[KG_HTTP_HEADERS.KG_DYNAMIC_QUERY]: ce,
|
|
9714
9714
|
[KG_HTTP_HEADERS.KG_QUERY_SQL]: Te,
|
|
9715
9715
|
[KG_HTTP_HEADERS.KG_QUERY_WHERE_SQL]: Ae,
|
|
9716
|
-
[KG_HTTP_HEADERS.KG_QUERY_ORDER_BY_SQL]:
|
|
9716
|
+
[KG_HTTP_HEADERS.KG_QUERY_ORDER_BY_SQL]: B
|
|
9717
9717
|
}
|
|
9718
9718
|
}, {
|
|
9719
9719
|
isReturnNativeResponse: !0,
|
|
9720
9720
|
successMessageMode: "none"
|
|
9721
9721
|
});
|
|
9722
|
-
if (!
|
|
9722
|
+
if (!W.data)
|
|
9723
9723
|
throw message.error(n.t("kg.KgTable.request-fail-no-data")), new Error(n.t("kg.KgTable.request-fail-no-data"));
|
|
9724
|
-
if (![0, 200].includes((ve =
|
|
9725
|
-
throw message.error(
|
|
9726
|
-
|
|
9724
|
+
if (![0, 200].includes((ve = W.data.code) != null ? ve : -1) || !W.data.success)
|
|
9725
|
+
throw message.error(W.data.message || n.t("kg.KgTable.request-fail-error")), new Error(W.data.message || n.t("kg.KgTable.request-fail-error"));
|
|
9726
|
+
ce && W.headers[KG_HTTP_HEADERS.KG_DYNAMIC_QUERY.toLowerCase()] !== "true" && message.warning(n.t("kg.KgTable.dynamic-query-is-off-in-server")), ye.value = W.data.result, KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6210\u529F.`, {
|
|
9727
9727
|
params: be,
|
|
9728
9728
|
response: ye.value
|
|
9729
9729
|
});
|
|
@@ -9735,19 +9735,20 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9735
9735
|
await o.store.emit(s.formID, "beforeSetDatas", {
|
|
9736
9736
|
datas: Ee,
|
|
9737
9737
|
total: Me,
|
|
9738
|
-
setDatas(
|
|
9739
|
-
o.store.setDatas(s.formID,
|
|
9738
|
+
setDatas(ce) {
|
|
9739
|
+
o.store.setDatas(s.formID, ce);
|
|
9740
9740
|
}
|
|
9741
9741
|
}), d.value = {}, o.store.setDatas(s.formID, Ee.value), O.total = Me.value;
|
|
9742
|
-
const
|
|
9743
|
-
G(), c.value = [], await nextTick(), F.isPreserveSelectedRows ? o.store.setSelectedRows(s.formID,
|
|
9742
|
+
const Ie = cloneDeep(w.value);
|
|
9743
|
+
G(), c.value = [], await nextTick(), F.isPreserveSelectedRows ? o.store.setSelectedRows(s.formID, Ie.map((ce) => {
|
|
9744
9744
|
var Te;
|
|
9745
|
-
return (Te = Ee.value) == null ? void 0 : Te.find((Ae) => Ae[o.id.value] ===
|
|
9746
|
-
}).filter((
|
|
9747
|
-
|
|
9745
|
+
return (Te = Ee.value) == null ? void 0 : Te.find((Ae) => Ae[o.id.value] === ce);
|
|
9746
|
+
}).filter((ce) => !!ce)) : ((Ce = s.varGridConfig.value) == null ? void 0 : Ce.check_first_row_after_retrieve) === 1 && Ee.value.length > 0 && o.store.setSelectedRows(s.formID, [Ee.value[0]]), await o.store.emit(s.formID, "retrieve", {
|
|
9747
|
+
params: be,
|
|
9748
|
+
response: ye.value,
|
|
9748
9749
|
datas: Ee,
|
|
9749
|
-
setDatas(
|
|
9750
|
-
o.store.setDatas(s.formID,
|
|
9750
|
+
setDatas(ce) {
|
|
9751
|
+
o.store.setDatas(s.formID, ce);
|
|
9751
9752
|
}
|
|
9752
9753
|
}), o.store.setIsRetrieved(s.formID, !0);
|
|
9753
9754
|
} catch (be) {
|
|
@@ -9847,8 +9848,8 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9847
9848
|
align: ue
|
|
9848
9849
|
}, {
|
|
9849
9850
|
default: () => {
|
|
9850
|
-
var
|
|
9851
|
-
return [(ve = (
|
|
9851
|
+
var _e, ve;
|
|
9852
|
+
return [(ve = (_e = r == null ? void 0 : r.KgTable) == null ? void 0 : _e["summary.bodyCell"]) == null ? void 0 : ve.call(_e, {
|
|
9852
9853
|
column: U,
|
|
9853
9854
|
index: ie,
|
|
9854
9855
|
varGridDetail: te
|
|
@@ -9859,7 +9860,7 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9859
9860
|
})]
|
|
9860
9861
|
}) : null;
|
|
9861
9862
|
}
|
|
9862
|
-
function
|
|
9863
|
+
function pe() {
|
|
9863
9864
|
return !o.isReadAutomatically.value && !o.store.getIsRetrieved(s.formID) ? n.t("kg.KgTable.emptyText") : n.t("kg.emptyText");
|
|
9864
9865
|
}
|
|
9865
9866
|
return () => {
|
|
@@ -9894,7 +9895,7 @@ const KgTable$1 = "", getProps$o = () => ({
|
|
|
9894
9895
|
}, {
|
|
9895
9896
|
headerCell: le,
|
|
9896
9897
|
bodyCell: g,
|
|
9897
|
-
emptyText:
|
|
9898
|
+
emptyText: pe,
|
|
9898
9899
|
expandedRowRender: (Q = r == null ? void 0 : r.KgTable) == null ? void 0 : Q.expandedRowRender,
|
|
9899
9900
|
summary: he
|
|
9900
9901
|
}), (o.isShowBottomLeft.value || o.isShowBottomRight.value) && createVNode("div", {
|
|
@@ -13318,7 +13319,7 @@ const getProps$h = () => ({
|
|
|
13318
13319
|
setup(e, {
|
|
13319
13320
|
attrs: t
|
|
13320
13321
|
}) {
|
|
13321
|
-
var Te, Ae
|
|
13322
|
+
var ce, Te, Ae;
|
|
13322
13323
|
const r = inject("$dayjs", dayjs), a = inject(DI_KG_VAR__KG_SLOTS, null);
|
|
13323
13324
|
inject(DI_KG_VAR__KG_PROPS, null);
|
|
13324
13325
|
const n = useKg(), s = useKgVar(), l = useKgButton(), o = useKgTable(), i = useKgSubmit(), c = useKgSearch();
|
|
@@ -13395,7 +13396,7 @@ const getProps$h = () => ({
|
|
|
13395
13396
|
} = _useClass(e, ee), {
|
|
13396
13397
|
getLayout: he
|
|
13397
13398
|
} = _useLayout(), {
|
|
13398
|
-
getDefaultWidth:
|
|
13399
|
+
getDefaultWidth: pe
|
|
13399
13400
|
} = _useDefaultWidth(), ae = computed(() => {
|
|
13400
13401
|
var B, W, Z;
|
|
13401
13402
|
switch (he.value) {
|
|
@@ -13444,7 +13445,7 @@ const getProps$h = () => ({
|
|
|
13444
13445
|
}
|
|
13445
13446
|
return n.t("kg.save");
|
|
13446
13447
|
}), Q = computed(() => i.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL && !ee.isFullscreen);
|
|
13447
|
-
((
|
|
13448
|
+
((Ae = (Te = (ce = n.option.value) == null ? void 0 : ce.KgModal) == null ? void 0 : Te.drag) == null ? void 0 : Ae.on) === !0 && useKgDragModal({
|
|
13448
13449
|
visible: X,
|
|
13449
13450
|
draggable: Q,
|
|
13450
13451
|
destroyOnClose: ref(!0),
|
|
@@ -13455,7 +13456,7 @@ const getProps$h = () => ({
|
|
|
13455
13456
|
B === !0 && z(), W === !0 && B === !1 && te();
|
|
13456
13457
|
}, {
|
|
13457
13458
|
immediate: !0
|
|
13458
|
-
}), watch(
|
|
13459
|
+
}), watch(pe, (B) => {
|
|
13459
13460
|
B && ($.value.kgWidth = B);
|
|
13460
13461
|
}, {
|
|
13461
13462
|
immediate: !0
|
|
@@ -13486,7 +13487,7 @@ const getProps$h = () => ({
|
|
|
13486
13487
|
});
|
|
13487
13488
|
}
|
|
13488
13489
|
async function te() {
|
|
13489
|
-
$.value.kgWidth =
|
|
13490
|
+
$.value.kgWidth = pe.value, ee.isFullscreen = !1, await i.store.emit(s.formID, "close", null);
|
|
13490
13491
|
}
|
|
13491
13492
|
function ue() {
|
|
13492
13493
|
switch (!0) {
|
|
@@ -13534,7 +13535,7 @@ const getProps$h = () => ({
|
|
|
13534
13535
|
return;
|
|
13535
13536
|
switch (!0) {
|
|
13536
13537
|
case s.isCreating.value:
|
|
13537
|
-
await
|
|
13538
|
+
await _e();
|
|
13538
13539
|
break;
|
|
13539
13540
|
case s.isUpdating.value:
|
|
13540
13541
|
await ve();
|
|
@@ -13550,8 +13551,8 @@ const getProps$h = () => ({
|
|
|
13550
13551
|
KgUtil.throwIfNotFormError(Z);
|
|
13551
13552
|
}
|
|
13552
13553
|
}
|
|
13553
|
-
async function
|
|
13554
|
-
var W, Z, re, se, oe,
|
|
13554
|
+
async function _e() {
|
|
13555
|
+
var W, Z, re, se, oe, de, ge;
|
|
13555
13556
|
const B = (W = s.varButtonCreate.value) == null ? void 0 : W.cmd;
|
|
13556
13557
|
if (!B) {
|
|
13557
13558
|
KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
|
@@ -13561,7 +13562,7 @@ const getProps$h = () => ({
|
|
|
13561
13562
|
}
|
|
13562
13563
|
s.store.setIsCreatingRequesting(s.formID, !0);
|
|
13563
13564
|
try {
|
|
13564
|
-
let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCreate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)),
|
|
13565
|
+
let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCreate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), fe = ref(KgUtil.parseParams(toRaw(i.model.value), s.formID, r));
|
|
13565
13566
|
if (await i.store.emit(s.formID, "beforeRequest", {
|
|
13566
13567
|
isCreating: s.isCreating.value,
|
|
13567
13568
|
isUpdating: s.isUpdating.value,
|
|
@@ -13571,16 +13572,16 @@ const getProps$h = () => ({
|
|
|
13571
13572
|
rows: o.selectedRows.value,
|
|
13572
13573
|
model: i.model,
|
|
13573
13574
|
params: ne,
|
|
13574
|
-
data:
|
|
13575
|
+
data: fe
|
|
13575
13576
|
}))
|
|
13576
13577
|
return;
|
|
13577
13578
|
const Se = await httpClient().request({
|
|
13578
13579
|
method: (oe = (se = s.varButtonCreate.value) == null ? void 0 : se.cmd_method) != null ? oe : "POST",
|
|
13579
13580
|
url: B,
|
|
13580
13581
|
params: ne.value,
|
|
13581
|
-
data:
|
|
13582
|
+
data: fe.value
|
|
13582
13583
|
});
|
|
13583
|
-
((
|
|
13584
|
+
((de = s.varButtonCreate.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(q.title.value + n.t("kg.succeed")), s.store.setIsCreating(s.formID, !1), ((ge = s.varButtonCreate.value) == null ? void 0 : ge.reload_all_after_done_flg) !== 0 && c.search({
|
|
13584
13585
|
isSearchFirstPage: !0
|
|
13585
13586
|
}), await i.store.emit(s.formID, "ok", {
|
|
13586
13587
|
isCreating: !0,
|
|
@@ -13598,7 +13599,7 @@ const getProps$h = () => ({
|
|
|
13598
13599
|
}
|
|
13599
13600
|
}
|
|
13600
13601
|
async function ve() {
|
|
13601
|
-
var W, Z, re, se, oe,
|
|
13602
|
+
var W, Z, re, se, oe, de, ge;
|
|
13602
13603
|
const B = (W = s.varButtonUpdate.value) == null ? void 0 : W.cmd;
|
|
13603
13604
|
if (!B) {
|
|
13604
13605
|
KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
|
@@ -13608,7 +13609,7 @@ const getProps$h = () => ({
|
|
|
13608
13609
|
}
|
|
13609
13610
|
try {
|
|
13610
13611
|
s.store.setIsUpdatingRequesting(s.formID, !0);
|
|
13611
|
-
let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonUpdate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)),
|
|
13612
|
+
let ne = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonUpdate.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), fe = ref(KgUtil.parseParams(toRaw(i.model.value), s.formID, r));
|
|
13612
13613
|
if (await i.store.emit(s.formID, "beforeRequest", {
|
|
13613
13614
|
isCreating: s.isCreating.value,
|
|
13614
13615
|
isUpdating: s.isUpdating.value,
|
|
@@ -13618,15 +13619,15 @@ const getProps$h = () => ({
|
|
|
13618
13619
|
rows: o.selectedRows.value,
|
|
13619
13620
|
model: i.model,
|
|
13620
13621
|
params: ne,
|
|
13621
|
-
data:
|
|
13622
|
+
data: fe
|
|
13622
13623
|
}))
|
|
13623
13624
|
return;
|
|
13624
13625
|
await httpClient().request({
|
|
13625
13626
|
method: (oe = (se = s.varButtonUpdate.value) == null ? void 0 : se.cmd_method) != null ? oe : "POST",
|
|
13626
13627
|
url: B,
|
|
13627
13628
|
params: ne.value,
|
|
13628
|
-
data:
|
|
13629
|
-
}), ((
|
|
13629
|
+
data: fe.value
|
|
13630
|
+
}), ((de = s.varButtonUpdate.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(n.t("kg.updateSuccess")), s.store.setIsUpdating(s.formID, !1), ((ge = s.varButtonUpdate.value) == null ? void 0 : ge.reload_all_after_done_flg) !== 0 && c.search({
|
|
13630
13631
|
isPreserveSelectedRows: !0
|
|
13631
13632
|
}), await i.store.emit(s.formID, "ok", {
|
|
13632
13633
|
isCreating: !1,
|
|
@@ -13643,7 +13644,7 @@ const getProps$h = () => ({
|
|
|
13643
13644
|
}
|
|
13644
13645
|
}
|
|
13645
13646
|
async function Ce() {
|
|
13646
|
-
var W, Z, re, se, oe,
|
|
13647
|
+
var W, Z, re, se, oe, de, ge, ne, fe;
|
|
13647
13648
|
const B = (W = s.varButtonCopy.value) == null ? void 0 : W.cmd;
|
|
13648
13649
|
if (!B) {
|
|
13649
13650
|
KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
|
@@ -13670,11 +13671,11 @@ const getProps$h = () => ({
|
|
|
13670
13671
|
}))
|
|
13671
13672
|
return;
|
|
13672
13673
|
await httpClient().request({
|
|
13673
|
-
method: (
|
|
13674
|
+
method: (ge = (de = s.varButtonCopy.value) == null ? void 0 : de.cmd_method) != null ? ge : "POST",
|
|
13674
13675
|
url: B,
|
|
13675
13676
|
params: me.value,
|
|
13676
13677
|
data: Se.value
|
|
13677
|
-
}), ((ne = s.varButtonCopy.value) == null ? void 0 : ne.show_success_message_flg) !== 0 && message.success(n.t("kg.copySuccess")), s.store.setIsCopying(s.formID, !1), ((
|
|
13678
|
+
}), ((ne = s.varButtonCopy.value) == null ? void 0 : ne.show_success_message_flg) !== 0 && message.success(n.t("kg.copySuccess")), s.store.setIsCopying(s.formID, !1), ((fe = s.varButtonCopy.value) == null ? void 0 : fe.reload_all_after_done_flg) !== 0 && c.search({
|
|
13678
13679
|
isSearchFirstPage: !0
|
|
13679
13680
|
}), await i.store.emit(s.formID, "ok", {
|
|
13680
13681
|
isCreating: !1,
|
|
@@ -13691,7 +13692,7 @@ const getProps$h = () => ({
|
|
|
13691
13692
|
}
|
|
13692
13693
|
}
|
|
13693
13694
|
async function be() {
|
|
13694
|
-
var W, Z, re, se, oe,
|
|
13695
|
+
var W, Z, re, se, oe, de, ge, ne, fe, me, Se;
|
|
13695
13696
|
const B = (W = s.varButtonDelete.value) == null ? void 0 : W.cmd;
|
|
13696
13697
|
if (!B) {
|
|
13697
13698
|
KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
|
@@ -13701,13 +13702,13 @@ const getProps$h = () => ({
|
|
|
13701
13702
|
}
|
|
13702
13703
|
try {
|
|
13703
13704
|
s.store.setIsDeletingRequesting(s.formID, !0);
|
|
13704
|
-
let ke = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)),
|
|
13705
|
+
let ke = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), we = ref((se = o.selectedRows.value) != null ? se : []);
|
|
13705
13706
|
if (((oe = s.varButtonDelete.value) == null ? void 0 : oe.del_param_clm) !== "__kg__new_delete_param" && (ke = ref({
|
|
13706
|
-
ids: (
|
|
13707
|
+
ids: (ge = (de = o.selectedRows.value) == null ? void 0 : de.map((Ke) => {
|
|
13707
13708
|
var De, Re, Ve;
|
|
13708
13709
|
return (Ve = Ke[(Re = (De = s.varButtonDelete.value) == null ? void 0 : De.del_param_clm) != null ? Re : "id"]) != null ? Ve : "";
|
|
13709
|
-
})) != null ?
|
|
13710
|
-
}),
|
|
13710
|
+
})) != null ? ge : []
|
|
13711
|
+
}), we = ref({})), await i.store.emit(s.formID, "beforeRequest", {
|
|
13711
13712
|
isCreating: s.isCreating.value,
|
|
13712
13713
|
isUpdating: s.isUpdating.value,
|
|
13713
13714
|
isCopying: s.isCopying.value,
|
|
@@ -13716,14 +13717,14 @@ const getProps$h = () => ({
|
|
|
13716
13717
|
rows: o.selectedRows.value,
|
|
13717
13718
|
model: i.model,
|
|
13718
13719
|
params: ke,
|
|
13719
|
-
data:
|
|
13720
|
+
data: we
|
|
13720
13721
|
}))
|
|
13721
13722
|
return;
|
|
13722
13723
|
await httpClient().request({
|
|
13723
|
-
method: (
|
|
13724
|
+
method: (fe = (ne = s.varButtonDelete.value) == null ? void 0 : ne.cmd_method) != null ? fe : "DELETE",
|
|
13724
13725
|
url: B,
|
|
13725
13726
|
params: ke.value,
|
|
13726
|
-
data:
|
|
13727
|
+
data: we.value
|
|
13727
13728
|
}, {
|
|
13728
13729
|
joinParamsToUrl: !0
|
|
13729
13730
|
}), ((me = s.varButtonDelete.value) == null ? void 0 : me.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), s.store.setIsDeleting(s.formID, !1), ((Se = s.varButtonDelete.value) == null ? void 0 : Se.reload_all_after_done_flg) !== 0 && c.search({
|
|
@@ -13757,18 +13758,18 @@ const getProps$h = () => ({
|
|
|
13757
13758
|
control: ({
|
|
13758
13759
|
frm_id: se,
|
|
13759
13760
|
varName: oe,
|
|
13760
|
-
props:
|
|
13761
|
-
model:
|
|
13761
|
+
props: de,
|
|
13762
|
+
model: ge,
|
|
13762
13763
|
varVariableConfig: ne,
|
|
13763
|
-
varProfileDetail:
|
|
13764
|
+
varProfileDetail: fe,
|
|
13764
13765
|
varSubmitField: me
|
|
13765
13766
|
}) => W({
|
|
13766
13767
|
frm_id: se,
|
|
13767
13768
|
varName: oe,
|
|
13768
|
-
props:
|
|
13769
|
-
model:
|
|
13769
|
+
props: de,
|
|
13770
|
+
model: ge,
|
|
13770
13771
|
varVariableConfig: ne,
|
|
13771
|
-
varProfileDetail:
|
|
13772
|
+
varProfileDetail: fe,
|
|
13772
13773
|
varSubmitField: me
|
|
13773
13774
|
})
|
|
13774
13775
|
}) : createVNode(KgForm.Item, {
|
|
@@ -13778,7 +13779,7 @@ const getProps$h = () => ({
|
|
|
13778
13779
|
onKgSubmit: ie
|
|
13779
13780
|
}, null);
|
|
13780
13781
|
}
|
|
13781
|
-
function
|
|
13782
|
+
function Oe() {
|
|
13782
13783
|
let B, W;
|
|
13783
13784
|
return createVNode(KgResizable, {
|
|
13784
13785
|
kgType: i.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL ? "right" : "left",
|
|
@@ -13815,7 +13816,7 @@ const getProps$h = () => ({
|
|
|
13815
13816
|
})]
|
|
13816
13817
|
});
|
|
13817
13818
|
}
|
|
13818
|
-
function
|
|
13819
|
+
function Ee() {
|
|
13819
13820
|
let B;
|
|
13820
13821
|
return createVNode("div", null, [createVNode(Button, {
|
|
13821
13822
|
type: "primary",
|
|
@@ -13834,12 +13835,12 @@ const getProps$h = () => ({
|
|
|
13834
13835
|
default: () => [U.value]
|
|
13835
13836
|
})]);
|
|
13836
13837
|
}
|
|
13837
|
-
function
|
|
13838
|
+
function Me() {
|
|
13838
13839
|
return createVNode("div", {
|
|
13839
13840
|
title: q.title.value
|
|
13840
13841
|
}, [q.title.value]);
|
|
13841
13842
|
}
|
|
13842
|
-
function
|
|
13843
|
+
function Ie() {
|
|
13843
13844
|
return createVNode(KgSubmitHeader, {
|
|
13844
13845
|
isFullscreen: ee.isFullscreen,
|
|
13845
13846
|
"onUpdate:isFullscreen": (B) => ee.isFullscreen = B,
|
|
@@ -13861,10 +13862,10 @@ const getProps$h = () => ({
|
|
|
13861
13862
|
class: le.value,
|
|
13862
13863
|
"kg-frm_id": s.formID
|
|
13863
13864
|
}, {
|
|
13864
|
-
title:
|
|
13865
|
-
extra:
|
|
13866
|
-
default:
|
|
13867
|
-
footer:
|
|
13865
|
+
title: Me,
|
|
13866
|
+
extra: Ie,
|
|
13867
|
+
default: Oe,
|
|
13868
|
+
footer: Ee
|
|
13868
13869
|
});
|
|
13869
13870
|
}
|
|
13870
13871
|
}), KgVar$1 = "", getProps$g = () => ({
|
|
@@ -17234,7 +17235,7 @@ class KgUtil {
|
|
|
17234
17235
|
static parseParams(t, r, a) {
|
|
17235
17236
|
let n = toRaw(unref(t));
|
|
17236
17237
|
if (!n || !isObjectLike(n))
|
|
17237
|
-
return n;
|
|
17238
|
+
return n != null ? n : {};
|
|
17238
17239
|
const s = isArray$1(n) ? [] : {};
|
|
17239
17240
|
return r ? (Object.keys(n).sort().forEach((l) => {
|
|
17240
17241
|
const o = n[l];
|
|
@@ -2,15 +2,33 @@ import { ExtractPropTypes, PropType } from 'vue';
|
|
|
2
2
|
import { VarButton } from '../../apis/WMS/models';
|
|
3
3
|
import './KgButton.less';
|
|
4
4
|
export declare const getProps: () => {
|
|
5
|
+
/**
|
|
6
|
+
* 按钮是否禁用. 返回 true 表示禁用.
|
|
7
|
+
*/
|
|
5
8
|
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* 按钮是否处于加载状态. 返回 true 表示处于加载状态.
|
|
11
|
+
*/
|
|
6
12
|
KgLoading: PropType<(button: VarButton) => boolean | undefined>;
|
|
7
13
|
};
|
|
8
14
|
export declare type IKgButtonProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
9
15
|
declare const _default: import("vue").DefineComponent<{
|
|
16
|
+
/**
|
|
17
|
+
* 按钮是否禁用. 返回 true 表示禁用.
|
|
18
|
+
*/
|
|
10
19
|
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
|
20
|
+
/**
|
|
21
|
+
* 按钮是否处于加载状态. 返回 true 表示处于加载状态.
|
|
22
|
+
*/
|
|
11
23
|
KgLoading: PropType<(button: VarButton) => boolean | undefined>;
|
|
12
24
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
25
|
+
/**
|
|
26
|
+
* 按钮是否禁用. 返回 true 表示禁用.
|
|
27
|
+
*/
|
|
13
28
|
kgDisabled: PropType<(button: VarButton) => boolean | undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* 按钮是否处于加载状态. 返回 true 表示处于加载状态.
|
|
31
|
+
*/
|
|
14
32
|
KgLoading: PropType<(button: VarButton) => boolean | undefined>;
|
|
15
33
|
}>>, {}>;
|
|
16
34
|
export default _default;
|
|
@@ -25,7 +25,7 @@ export declare type IKgTableRowDoubleClickCb = ((param: IKgTableRowDoubleClickPa
|
|
|
25
25
|
/** 事件监听函数: beforeRetrieve. */
|
|
26
26
|
export declare type IKgTableBeforeRetrieveCbParam = {
|
|
27
27
|
/** 查询接口请求参数. */
|
|
28
|
-
params:
|
|
28
|
+
params: Record<string, any>;
|
|
29
29
|
/** 查询接口返回的数据, 调用者可以直接修改该数据, 从而实现手动提供表格数据. */
|
|
30
30
|
response: Ref;
|
|
31
31
|
};
|
|
@@ -42,8 +42,10 @@ export declare type IKgTableBeforeSetDatasCbParam = {
|
|
|
42
42
|
export declare type IKgTableBeforeSetDatasCb = ((param: IKgTableBeforeSetDatasCbParam) => Promise<boolean>) & IKgEventCb;
|
|
43
43
|
/** 事件监听函数: retrieve. */
|
|
44
44
|
export declare type IKgTableRetrieveCbParam = {
|
|
45
|
+
/** 查询接口请求参数. */
|
|
46
|
+
params: Record<string, any>;
|
|
45
47
|
/** 接口返回的分页数据. */
|
|
46
|
-
|
|
48
|
+
response: IPage<IKgTableRow> | null | undefined;
|
|
47
49
|
/** 列表数据. */
|
|
48
50
|
datas: Ref<Array<IKgTableRow>>;
|
|
49
51
|
/** 设置列表数据. */
|
|
@@ -68,12 +68,12 @@ export declare type IKgStateOption = {
|
|
|
68
68
|
};
|
|
69
69
|
/** 翻译的方法. */
|
|
70
70
|
export declare type T = {
|
|
71
|
-
(key: string |
|
|
72
|
-
(key: string |
|
|
73
|
-
(key: string |
|
|
74
|
-
(key: string |
|
|
75
|
-
(key: string |
|
|
76
|
-
(key: string |
|
|
71
|
+
(key: string | null | undefined): string;
|
|
72
|
+
(key: string | null | undefined, locale: string): string;
|
|
73
|
+
(key: string | null | undefined, locale: string, list: unknown[]): string;
|
|
74
|
+
(key: string | null | undefined, locale: string, named: Record<string, unknown>): string;
|
|
75
|
+
(key: string | null | undefined, list: unknown[]): string;
|
|
76
|
+
(key: string | null | undefined, named: Record<string, unknown>): string;
|
|
77
77
|
};
|
|
78
78
|
/** 检查权限的方法. */
|
|
79
79
|
export declare type P = {
|
|
@@ -23,7 +23,7 @@ export declare class KgRouteUtil {
|
|
|
23
23
|
* @param path 路径.
|
|
24
24
|
* @param app 模块.
|
|
25
25
|
*/
|
|
26
|
-
static isPathInApp(path: string |
|
|
26
|
+
static isPathInApp(path: string | null | undefined, app: KG_APP | null): boolean;
|
|
27
27
|
/**
|
|
28
28
|
* 根据地址获取模块.
|
|
29
29
|
* @param path 地址.
|
|
@@ -37,7 +37,7 @@ export declare class KgUtil {
|
|
|
37
37
|
* @param formID 界面标识.
|
|
38
38
|
* @param $dayjs dayjs.
|
|
39
39
|
*/
|
|
40
|
-
static parseParams(params
|
|
40
|
+
static parseParams(params: Record<string, any> | null | undefined, formID?: string | null, $dayjs?: typeof dayjs): Record<string, any>;
|
|
41
41
|
/**
|
|
42
42
|
* <p>处理查询参数, 最终拼接为一个 SQL 格式如下: `WHERE ... ORDER BY ...`.</p>
|
|
43
43
|
* <p>
|