@kengic/vue 0.25.0 → 0.25.1-beta.1
Sign up to get free protection for your applications and to get access to all the features.
package/dist/kengic-vue.js
CHANGED
@@ -2437,7 +2437,7 @@ const emptyIcon = {
|
|
2437
2437
|
...t.data
|
2438
2438
|
}, a);
|
2439
2439
|
}
|
2440
|
-
}), version = "0.25.
|
2440
|
+
}), version = "0.25.1-beta.1";
|
2441
2441
|
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
2442
2442
|
const freeGlobal$1 = freeGlobal;
|
2443
2443
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self, root = freeGlobal$1 || freeSelf || Function("return this")();
|
@@ -4787,9 +4787,9 @@ class KgRouteUtil {
|
|
4787
4787
|
var d, v, g, m, p, T, E, k, N, O, C, A, V, y, R, F, B, I, M, P, D, K, w, x, L, U, W, X, te, se, le, ue, ce, oe;
|
4788
4788
|
if (!t)
|
4789
4789
|
return [];
|
4790
|
-
const a = useKg(), r = (
|
4791
|
-
|
4792
|
-
|
4790
|
+
const a = useKg(), r = (H) => {
|
4791
|
+
H.forEach((q) => {
|
4792
|
+
q.key && q.key !== q.value && (q.value = q.key), q.children && r(q.children);
|
4793
4793
|
});
|
4794
4794
|
};
|
4795
4795
|
r(t);
|
@@ -4873,33 +4873,33 @@ class KgRouteUtil {
|
|
4873
4873
|
children: [],
|
4874
4874
|
...n
|
4875
4875
|
};
|
4876
|
-
t.forEach((
|
4876
|
+
t.forEach((H) => {
|
4877
4877
|
switch (!0) {
|
4878
|
-
case
|
4879
|
-
|
4878
|
+
case H.app === "PDA":
|
4879
|
+
H.parentId = KG_TMP_MENU_ID__PDA, u.children.push(H);
|
4880
4880
|
break;
|
4881
|
-
case KgRouteUtil.isPathInApp(
|
4882
|
-
|
4881
|
+
case KgRouteUtil.isPathInApp(H.url, KG_APP.WMS_DATA_MANAGER):
|
4882
|
+
H.parentId = KG_TMP_MENU_ID__DATA_MANAGER, i.children.push(H);
|
4883
4883
|
break;
|
4884
|
-
case KgRouteUtil.isPathInApp(
|
4885
|
-
|
4884
|
+
case KgRouteUtil.isPathInApp(H.url, KG_APP.WMS_BUSINESS_MANAGER):
|
4885
|
+
H.parentId = KG_TMP_MENU_ID__BUSINESS_MANAGER, s.children.push(H);
|
4886
4886
|
break;
|
4887
|
-
case KgRouteUtil.isPathInApp(
|
4888
|
-
|
4887
|
+
case KgRouteUtil.isPathInApp(H.url, KG_APP.WCS):
|
4888
|
+
H.parentId = KG_TMP_MENU_ID__WCS, l.children.push(H);
|
4889
4889
|
break;
|
4890
|
-
case KgRouteUtil.isPathInApp(
|
4891
|
-
|
4890
|
+
case KgRouteUtil.isPathInApp(H.url, KG_APP.SYS):
|
4891
|
+
H.parentId = KG_TMP_MENU_ID__SYS, o.children.push(H);
|
4892
4892
|
break;
|
4893
4893
|
}
|
4894
4894
|
});
|
4895
4895
|
let c = [];
|
4896
4896
|
((U = (L = i.children) == null ? void 0 : L.length) != null ? U : 0 > 0) && c.push(i), ((X = (W = s.children) == null ? void 0 : W.length) != null ? X : 0 > 0) && c.push(s), ((se = (te = l.children) == null ? void 0 : te.length) != null ? se : 0 > 0) && c.push(l), ((ue = (le = o.children) == null ? void 0 : le.length) != null ? ue : 0 > 0) && c.push(o), ((oe = (ce = u.children) == null ? void 0 : ce.length) != null ? oe : 0 > 0) && c.push(u);
|
4897
|
-
const _ = (
|
4898
|
-
|
4897
|
+
const _ = (H) => {
|
4898
|
+
H.sort((q, G) => {
|
4899
4899
|
var $, Y;
|
4900
|
-
return Number(($ =
|
4901
|
-
}),
|
4902
|
-
|
4900
|
+
return Number(($ = q == null ? void 0 : q.sortNo) != null ? $ : 0) - Number((Y = G == null ? void 0 : G.sortNo) != null ? Y : 0);
|
4901
|
+
}), H.forEach((q) => {
|
4902
|
+
q.children && _(q.children);
|
4903
4903
|
});
|
4904
4904
|
};
|
4905
4905
|
return _(c), c;
|
@@ -5079,11 +5079,11 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
5079
5079
|
}, P.valueOf = function() {
|
5080
5080
|
return this.$d.getTime();
|
5081
5081
|
}, P.startOf = function(D, K) {
|
5082
|
-
var w = this, x = !!F.u(K) || K, L = F.p(D), U = function(oe,
|
5083
|
-
var
|
5084
|
-
return x ?
|
5085
|
-
}, W = function(oe,
|
5086
|
-
return F.w(w.toDate()[oe].apply(w.toDate("s"), (x ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(
|
5082
|
+
var w = this, x = !!F.u(K) || K, L = F.p(D), U = function(oe, H) {
|
5083
|
+
var q = F.w(w.$u ? Date.UTC(w.$y, H, oe) : new Date(w.$y, H, oe), w);
|
5084
|
+
return x ? q : q.endOf(u);
|
5085
|
+
}, W = function(oe, H) {
|
5086
|
+
return F.w(w.toDate()[oe].apply(w.toDate("s"), (x ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(H)), w);
|
5087
5087
|
}, X = this.$W, te = this.$M, se = this.$D, le = "set" + (this.$u ? "UTC" : "");
|
5088
5088
|
switch (L) {
|
5089
5089
|
case v:
|
@@ -5142,16 +5142,16 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
5142
5142
|
var K = this, w = this.$locale();
|
5143
5143
|
if (!this.isValid())
|
5144
5144
|
return w.invalidDate || m;
|
5145
|
-
var x = D || "YYYY-MM-DDTHH:mm:ssZ", L = F.z(this), U = this.$H, W = this.$m, X = this.$M, te = w.weekdays, se = w.months, le = w.meridiem, ue = function(
|
5146
|
-
return
|
5147
|
-
}, ce = function(
|
5148
|
-
return F.s(U % 12 || 12,
|
5149
|
-
}, oe = le || function(
|
5150
|
-
var $ =
|
5145
|
+
var x = D || "YYYY-MM-DDTHH:mm:ssZ", L = F.z(this), U = this.$H, W = this.$m, X = this.$M, te = w.weekdays, se = w.months, le = w.meridiem, ue = function(H, q, G, $) {
|
5146
|
+
return H && (H[q] || H(K, x)) || G[q].slice(0, $);
|
5147
|
+
}, ce = function(H) {
|
5148
|
+
return F.s(U % 12 || 12, H, "0");
|
5149
|
+
}, oe = le || function(H, q, G) {
|
5150
|
+
var $ = H < 12 ? "AM" : "PM";
|
5151
5151
|
return G ? $.toLowerCase() : $;
|
5152
5152
|
};
|
5153
|
-
return x.replace(T, function(
|
5154
|
-
return
|
5153
|
+
return x.replace(T, function(H, q) {
|
5154
|
+
return q || function(G) {
|
5155
5155
|
switch (G) {
|
5156
5156
|
case "YY":
|
5157
5157
|
return String(K.$y).slice(-2);
|
@@ -5203,7 +5203,7 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
5203
5203
|
return L;
|
5204
5204
|
}
|
5205
5205
|
return null;
|
5206
|
-
}(
|
5206
|
+
}(H) || L.replace(":", "");
|
5207
5207
|
});
|
5208
5208
|
}, P.utcOffset = function() {
|
5209
5209
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
@@ -5666,6 +5666,9 @@ class KgUtil {
|
|
5666
5666
|
const t = document.body.querySelector("#__kg_loading__");
|
5667
5667
|
t && (t.style.display = "none");
|
5668
5668
|
}
|
5669
|
+
static snakeCase(t) {
|
5670
|
+
return snakeCase$1(t).replaceAll(/_(\d)+/g, "$1");
|
5671
|
+
}
|
5669
5672
|
}
|
5670
5673
|
function _isSlot$g(e) {
|
5671
5674
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !isVNode(e);
|
@@ -6029,7 +6032,7 @@ class KgVarUtil {
|
|
6029
6032
|
let y = A;
|
6030
6033
|
const R = l[A];
|
6031
6034
|
let F = d == null ? void 0 : d[A];
|
6032
|
-
switch ((((M = (I = u.option.value.KgSearch) == null ? void 0 : I.dynamicQuery) == null ? void 0 : M.on) !== !0 || r && ((K = (D = (P = _ == null ? void 0 : _.kgSearch) == null ? void 0 : P.currentVarProfileMaster) == null ? void 0 : D.value) == null ? void 0 : K.dyn_flg) !== 1) && (F = KG_DYNAMIC_QUERY_OPERATOR.EQ), r && (V == null ? void 0 : V.use_underscore_when_dynamic_query_flag) !== 0 && (y = A.split(".").map((w) => snakeCase
|
6035
|
+
switch ((((M = (I = u.option.value.KgSearch) == null ? void 0 : I.dynamicQuery) == null ? void 0 : M.on) !== !0 || r && ((K = (D = (P = _ == null ? void 0 : _.kgSearch) == null ? void 0 : P.currentVarProfileMaster) == null ? void 0 : D.value) == null ? void 0 : K.dyn_flg) !== 1) && (F = KG_DYNAMIC_QUERY_OPERATOR.EQ), r && (V == null ? void 0 : V.use_underscore_when_dynamic_query_flag) !== 0 && (y = A.split(".").map((w) => KgUtil.snakeCase(w)).join(".")), !0) {
|
6033
6036
|
case (!!s && s.isDayjs(R)): {
|
6034
6037
|
const w = R;
|
6035
6038
|
let x = r ? KgUtil.parseParamFromDayjs({
|
@@ -6368,7 +6371,7 @@ class KgVarUtil {
|
|
6368
6371
|
}
|
6369
6372
|
}
|
6370
6373
|
let A = l.column;
|
6371
|
-
((C = c == null ? void 0 : c.varGridConfig.value) == null ? void 0 : C.convert_sort_field_to_under_score_flg) === 1 && (A = l.column.split(".").map((V) => snakeCase
|
6374
|
+
((C = c == null ? void 0 : c.varGridConfig.value) == null ? void 0 : C.convert_sort_field_to_under_score_flg) === 1 && (A = l.column.split(".").map((V) => KgUtil.snakeCase(V)).join(".")), A && (p = `ORDER BY ${A}`, l.order === "asc" ? p += " ASC" : l.order === "desc" && (p += " DESC"), p = encodeURIComponent(p.trim()));
|
6372
6375
|
}
|
6373
6376
|
let T = "";
|
6374
6377
|
if (!isNil(l.pageNo)) {
|
@@ -7525,14 +7528,14 @@ function useDragToResize(e) {
|
|
7525
7528
|
x !== L && (d.value = `${x}px`, u.value.style.width = `${x}px`, u.value.style.left = `${W}px`);
|
7526
7529
|
}
|
7527
7530
|
function F(D) {
|
7528
|
-
var le, ue, ce, oe,
|
7531
|
+
var le, ue, ce, oe, H, q;
|
7529
7532
|
if (!u.value) {
|
7530
7533
|
____ERROR____("\u5F39\u7A97\u5143\u7D20\u4E3A\u7A7A.");
|
7531
7534
|
return;
|
7532
7535
|
}
|
7533
7536
|
const {
|
7534
7537
|
event: K
|
7535
|
-
} = D != null ? D : {}, w = K.pageY, x = (ue = (le = c.value) == null ? void 0 : le.clientHeight) != null ? ue : s, L = (oe = (ce = _.value) == null ? void 0 : ce.clientHeight) != null ? oe : 0, U = Math.min((
|
7538
|
+
} = D != null ? D : {}, w = K.pageY, x = (ue = (le = c.value) == null ? void 0 : le.clientHeight) != null ? ue : s, L = (oe = (ce = _.value) == null ? void 0 : ce.clientHeight) != null ? oe : 0, U = Math.min((q = (H = a.value) == null ? void 0 : H.kgMinHeight) != null ? q : x + L + KG_MODAL_BORDER_WIDTH * 2, i.value);
|
7536
7539
|
let W = Math.min(m.value, Math.max(U, E + w - N));
|
7537
7540
|
u.value.offsetTop + W > i.value && (W = i.value - u.value.offsetTop);
|
7538
7541
|
const X = u.value.offsetHeight, se = Number(getComputedStyle(u.value).top.replace(/px/g, "")) + (W - X) / 2;
|
@@ -9991,11 +9994,11 @@ const getProps$B = () => ({
|
|
9991
9994
|
const n = useKg(), i = useKgVar();
|
9992
9995
|
i.kgButton.onSubmitSave(async () => (await P(), !1)), i.kgButton.onSubmitCancel(async () => (await M(), !1)), _useFormModel$1();
|
9993
9996
|
const s = computed(() => i.isDeleting.value && i.kgSubmit.currentVarSubmitDetailsForKey.value.length === 0 && i.kgSubmit.currentVarSubmitDetailsForNotKey.value.length === 0), l = computed(() => i.kgSubmit.store.isLoading(i.formID)), o = computed(() => i.kgButton.isCurrentButtonRequesting.value || !!i.store.isCreatingRequesting(i.formID) || !!i.store.isUpdatingRequesting(i.formID) || !!i.store.isCopyingRequesting(i.formID) || !!i.store.isDeletingRequesting(i.formID)), u = computed(() => o.value || l.value), c = computed(() => l.value), _ = ref(!1), d = computed(() => {
|
9994
|
-
var
|
9995
|
-
return s.value ? SUBMIT_DEFAULT_MIN_WIDTH : (
|
9997
|
+
var H;
|
9998
|
+
return s.value ? SUBMIT_DEFAULT_MIN_WIDTH : (H = i.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : H.min_width;
|
9996
9999
|
}), v = computed(() => {
|
9997
|
-
var
|
9998
|
-
return s.value ? SUBMIT_DEFAULT_MIN_WIDTH : (
|
10000
|
+
var H, q;
|
10001
|
+
return s.value ? SUBMIT_DEFAULT_MIN_WIDTH : (q = (H = i.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : H.max_width) != null ? q : void 0;
|
9999
10002
|
}), g = computed(() => {
|
10000
10003
|
if (s.value)
|
10001
10004
|
return 154;
|
@@ -10015,13 +10018,13 @@ const getProps$B = () => ({
|
|
10015
10018
|
} = _useClass(e), {
|
10016
10019
|
getDefaultWidth: A
|
10017
10020
|
} = _useDefaultWidth(), V = computed(() => {
|
10018
|
-
var
|
10021
|
+
var H, q, G;
|
10019
10022
|
switch (i.kgSubmit.currentVarSubmitConfig$Layout.value) {
|
10020
10023
|
case KG__VAR_SUBMIT_CONFIG__LAYOUT.HORIZONTAL:
|
10021
|
-
switch ((
|
10024
|
+
switch ((H = i.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : H.label_col_unit) {
|
10022
10025
|
case KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT.SPAN:
|
10023
10026
|
return {
|
10024
|
-
span: (
|
10027
|
+
span: (q = i.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : q.label_col
|
10025
10028
|
};
|
10026
10029
|
case KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT.PX:
|
10027
10030
|
default:
|
@@ -10035,13 +10038,13 @@ const getProps$B = () => ({
|
|
10035
10038
|
return;
|
10036
10039
|
}
|
10037
10040
|
}), y = computed(() => {
|
10038
|
-
var
|
10041
|
+
var H, q;
|
10039
10042
|
switch (i.kgSubmit.currentVarSubmitConfig$Layout.value) {
|
10040
10043
|
case KG__VAR_SUBMIT_CONFIG__LAYOUT.HORIZONTAL:
|
10041
|
-
switch ((
|
10044
|
+
switch ((H = i.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : H.label_col_unit) {
|
10042
10045
|
case KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT.SPAN:
|
10043
10046
|
return {
|
10044
|
-
span: 24 - ((
|
10047
|
+
span: 24 - ((q = i.kgSubmit.currentVarSubmitConfig.value) == null ? void 0 : q.label_col)
|
10045
10048
|
};
|
10046
10049
|
default:
|
10047
10050
|
return;
|
@@ -10050,11 +10053,11 @@ const getProps$B = () => ({
|
|
10050
10053
|
return;
|
10051
10054
|
}
|
10052
10055
|
}), R = computed(() => {
|
10053
|
-
var
|
10054
|
-
return (
|
10056
|
+
var H, q;
|
10057
|
+
return (H = i.kgSubmit.currentVarSubmitConfig$Props.value.okButton) != null && H.textVarName ? i.t((q = i.kgSubmit.currentVarSubmitConfig$Props.value.okButton) == null ? void 0 : q.textVarName).value : n.t("kg.ok");
|
10055
10058
|
}), F = ref([(oe = i.kgSubmit.currentVarSubmitDetailSectionsForVisible.value[0]) != null ? oe : ""]);
|
10056
|
-
watch(N, (
|
10057
|
-
|
10059
|
+
watch(N, (H, q) => {
|
10060
|
+
H === !0 && B(), q === !0 && H === !1 && I();
|
10058
10061
|
}, {
|
10059
10062
|
immediate: !0
|
10060
10063
|
});
|
@@ -10066,7 +10069,7 @@ const getProps$B = () => ({
|
|
10066
10069
|
isUpdating: i.isUpdating.value,
|
10067
10070
|
row: i.kgTable.selectedRow.value
|
10068
10071
|
}))
|
10069
|
-
return new Promise((
|
10072
|
+
return new Promise((q, G) => {
|
10070
10073
|
var Y;
|
10071
10074
|
const $ = watch(i.kgSubmit.formModel, async (Q) => {
|
10072
10075
|
Q && Object.keys(Q).length > 0 && (setTimeout(() => $()), await i.kgSubmit.store.emit(i.formID, "open", {
|
@@ -10076,7 +10079,7 @@ const getProps$B = () => ({
|
|
10076
10079
|
isUpdating: i.isUpdating.value,
|
10077
10080
|
model: i.kgSubmit.formModel,
|
10078
10081
|
row: i.kgTable.selectedRow.value
|
10079
|
-
}),
|
10082
|
+
}), q());
|
10080
10083
|
}, {
|
10081
10084
|
immediate: !0
|
10082
10085
|
});
|
@@ -10090,7 +10093,7 @@ const getProps$B = () => ({
|
|
10090
10093
|
i.kgButton.setCurrentButton(null);
|
10091
10094
|
}
|
10092
10095
|
async function P() {
|
10093
|
-
var
|
10096
|
+
var H, q;
|
10094
10097
|
try {
|
10095
10098
|
if (!i.kgSubmit.formRef.value || await i.kgSubmit.store.emit(i.formID, "beforeOk", {
|
10096
10099
|
model: i.kgSubmit.formModel
|
@@ -10098,7 +10101,7 @@ const getProps$B = () => ({
|
|
10098
10101
|
return;
|
10099
10102
|
await nextTick();
|
10100
10103
|
try {
|
10101
|
-
await ((
|
10104
|
+
await ((H = i.kgSubmit.formRef.value) == null ? void 0 : H.validate());
|
10102
10105
|
} catch (Y) {
|
10103
10106
|
KgUtil.throwNotFormValidationError({
|
10104
10107
|
error: Y,
|
@@ -10106,7 +10109,7 @@ const getProps$B = () => ({
|
|
10106
10109
|
isShowFormValidationErrorMessage: !1
|
10107
10110
|
});
|
10108
10111
|
}
|
10109
|
-
if (await ((
|
10112
|
+
if (await ((q = i.kgSubmit.formRef.value) == null ? void 0 : q.validate()), await i.kgSubmit.store.emit(i.formID, "afterValidate", {
|
10110
10113
|
isCopying: i.isCopying.value,
|
10111
10114
|
isCreating: i.isCreating.value,
|
10112
10115
|
isDeleting: i.isDeleting.value,
|
@@ -10142,10 +10145,10 @@ const getProps$B = () => ({
|
|
10142
10145
|
}
|
10143
10146
|
}
|
10144
10147
|
async function D() {
|
10145
|
-
var
|
10148
|
+
var H, q, G, $, Y, Q, z, ae, J, Z;
|
10146
10149
|
i.store.setIsCreatingRequesting(i.formID, !0);
|
10147
10150
|
try {
|
10148
|
-
let ee = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((
|
10151
|
+
let ee = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((q = (H = i.varButtonCreate.value) == null ? void 0 : H.cmd_prm) != null ? q : ""), i.formID, a)), ne = ref(KgUtil.parseParams(toRaw(i.kgSubmit.formModel.value), i.formID, a));
|
10149
10152
|
if (await i.kgSubmit.store.emit(i.formID, "beforeRequest", {
|
10150
10153
|
data: ne,
|
10151
10154
|
isCopying: i.isCopying.value,
|
@@ -10190,10 +10193,10 @@ const getProps$B = () => ({
|
|
10190
10193
|
}
|
10191
10194
|
}
|
10192
10195
|
async function K() {
|
10193
|
-
var
|
10196
|
+
var H, q, G, $, Y, Q, z, ae, J, Z;
|
10194
10197
|
try {
|
10195
10198
|
i.store.setIsUpdatingRequesting(i.formID, !0);
|
10196
|
-
let ee = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((
|
10199
|
+
let ee = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((q = (H = i.varButtonUpdate.value) == null ? void 0 : H.cmd_prm) != null ? q : ""), i.formID, a)), ne = ref(KgUtil.parseParams(toRaw(i.kgSubmit.formModel.value), i.formID, a));
|
10197
10200
|
if (await i.kgSubmit.store.emit(i.formID, "beforeRequest", {
|
10198
10201
|
data: ne,
|
10199
10202
|
isCopying: i.isCopying.value,
|
@@ -10238,10 +10241,10 @@ const getProps$B = () => ({
|
|
10238
10241
|
}
|
10239
10242
|
}
|
10240
10243
|
async function w() {
|
10241
|
-
var
|
10244
|
+
var H, q, G, $, Y, Q, z, ae, J, Z, ee, ne;
|
10242
10245
|
try {
|
10243
10246
|
i.store.setIsCopyingRequesting(i.formID, !0);
|
10244
|
-
let ie = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((
|
10247
|
+
let ie = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((q = (H = i.varButtonCopy.value) == null ? void 0 : H.cmd_prm) != null ? q : ""), i.formID, a)), re = ref(KgUtil.parseParams({
|
10245
10248
|
...(G = i.kgTable.selectedFirstRow.value) != null ? G : {},
|
10246
10249
|
...toRaw(i.kgSubmit.formModel.value)
|
10247
10250
|
}, i.formID, a));
|
@@ -10289,10 +10292,10 @@ const getProps$B = () => ({
|
|
10289
10292
|
}
|
10290
10293
|
}
|
10291
10294
|
async function x() {
|
10292
|
-
var
|
10295
|
+
var H, q, G, $, Y, Q, z, ae, J, Z, ee, ne, ie;
|
10293
10296
|
try {
|
10294
10297
|
i.store.setIsDeletingRequesting(i.formID, !0);
|
10295
|
-
let re = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((
|
10298
|
+
let re = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((q = (H = i.varButtonDelete.value) == null ? void 0 : H.cmd_prm) != null ? q : ""), i.formID, a)), _e = ref((G = i.kgTable.selectedRows.value) != null ? G : []);
|
10296
10299
|
if ((($ = i.varButtonDelete.value) == null ? void 0 : $.del_param_clm) !== "__kg__new_delete_param" && (re = ref({
|
10297
10300
|
ids: (Q = (Y = i.kgTable.selectedRows.value) == null ? void 0 : Y.map((he) => {
|
10298
10301
|
var be, fe, me;
|
@@ -10343,13 +10346,13 @@ const getProps$B = () => ({
|
|
10343
10346
|
}
|
10344
10347
|
}
|
10345
10348
|
async function L() {
|
10346
|
-
var
|
10349
|
+
var H, q, G, $;
|
10347
10350
|
try {
|
10348
10351
|
i.kgButton.setIsCurrentButtonRequesting({
|
10349
10352
|
isRequesting: !0
|
10350
10353
|
});
|
10351
10354
|
const Y = i.kgButton.currentButton.value;
|
10352
|
-
let Q = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((
|
10355
|
+
let Q = ref(KgUtil.parseParams(KgVarUtil.parseRequestParamsToJSON((H = Y == null ? void 0 : Y.cmd_prm) != null ? H : ""), i.formID, a)), z = ref(KgUtil.parseParams(toRaw(i.kgSubmit.formModel.value), i.formID, a));
|
10353
10356
|
if (await i.kgSubmit.store.emit(i.formID, "beforeRequest", {
|
10354
10357
|
data: z,
|
10355
10358
|
isCopying: i.isCopying.value,
|
@@ -10365,7 +10368,7 @@ const getProps$B = () => ({
|
|
10365
10368
|
const J = Y == null ? void 0 : Y.cmd;
|
10366
10369
|
if (!J)
|
10367
10370
|
throw message.error(n.t("\u6309\u94AE\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.")), new Error("\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740");
|
10368
|
-
z.value.selectedRows = (
|
10371
|
+
z.value.selectedRows = (q = i.kgTable.selectedRows.value) != null ? q : [];
|
10369
10372
|
const Z = (G = Y == null ? void 0 : Y.cmd_method) != null ? G : "POST", ee = await httpClient().request({
|
10370
10373
|
url: J,
|
10371
10374
|
method: Z,
|
@@ -10395,12 +10398,12 @@ const getProps$B = () => ({
|
|
10395
10398
|
});
|
10396
10399
|
}
|
10397
10400
|
}
|
10398
|
-
function U(
|
10401
|
+
function U(H) {
|
10399
10402
|
var Y, Q, z, ae;
|
10400
|
-
const
|
10403
|
+
const q = H.var_nam, G = (Q = (Y = r == null ? void 0 : r.KgSubmit) == null ? void 0 : Y["KgForm.Item.control"]) == null ? void 0 : Q[q], $ = (ae = (z = r == null ? void 0 : r.KgSubmit) == null ? void 0 : z["KgForm.Item.controlRight"]) == null ? void 0 : ae[q];
|
10401
10404
|
return createVNode(KgForm.Item, {
|
10402
|
-
key:
|
10403
|
-
kgVarName:
|
10405
|
+
key: q,
|
10406
|
+
kgVarName: q,
|
10404
10407
|
kgContext: KG_FORM_CONTEXT.SUBMIT,
|
10405
10408
|
onKgSubmit: P
|
10406
10409
|
}, {
|
@@ -10412,41 +10415,41 @@ const getProps$B = () => ({
|
|
10412
10415
|
return i.kgSubmit.currentVarSubmitDetailSectionsForVisible.value.length > 0 ? te() : X();
|
10413
10416
|
}
|
10414
10417
|
function X() {
|
10415
|
-
let
|
10418
|
+
let H, q;
|
10416
10419
|
return createVNode(Fragment, null, [i.kgSubmit.currentVarSubmitDetailsForKey.value.length > 0 && createVNode(Row, {
|
10417
10420
|
gutter: 12
|
10418
|
-
}, _isSlot$b(
|
10419
|
-
default: () => [
|
10421
|
+
}, _isSlot$b(H = i.kgSubmit.currentVarSubmitDetailsForKey.value.map(U)) ? H : {
|
10422
|
+
default: () => [H]
|
10420
10423
|
}), i.kgSubmit.currentVarSubmitDetailsForKeyAndVisible.value.length > 0 && i.kgSubmit.currentVarSubmitDetailsForNotKeyAndVisible.value.length > 0 && createVNode(Divider, null, null), i.kgSubmit.currentVarSubmitDetailsForNotKey.value.length > 0 && createVNode(Row, {
|
10421
10424
|
gutter: 12
|
10422
|
-
}, _isSlot$b(
|
10423
|
-
default: () => [
|
10425
|
+
}, _isSlot$b(q = i.kgSubmit.currentVarSubmitDetailsForNotKey.value.map(U)) ? q : {
|
10426
|
+
default: () => [q]
|
10424
10427
|
}), s.value && createVNode("div", {
|
10425
10428
|
style: "text-align: center; padding: 6px 0 12px;"
|
10426
10429
|
}, [n.t("kg.confirmDelete")])]);
|
10427
10430
|
}
|
10428
10431
|
function te() {
|
10429
|
-
let
|
10432
|
+
let H;
|
10430
10433
|
return createVNode("div", {
|
10431
10434
|
class: "section"
|
10432
10435
|
}, [createVNode(Menu, {
|
10433
10436
|
mode: "inline",
|
10434
10437
|
selectedKeys: F.value,
|
10435
10438
|
onSelect: ce
|
10436
|
-
}, _isSlot$b(
|
10437
|
-
key:
|
10439
|
+
}, _isSlot$b(H = i.kgSubmit.currentVarSubmitDetailSectionsForVisible.value.map((q) => createVNode(Menu.Item, {
|
10440
|
+
key: q
|
10438
10441
|
}, {
|
10439
|
-
default: () => [i.t(
|
10440
|
-
}))) ?
|
10441
|
-
default: () => [
|
10442
|
-
}), createVNode("div", null, [i.kgSubmit.currentVarSubmitDetailSectionsForVisible.value.map((
|
10442
|
+
default: () => [i.t(q).value]
|
10443
|
+
}))) ? H : {
|
10444
|
+
default: () => [H]
|
10445
|
+
}), createVNode("div", null, [i.kgSubmit.currentVarSubmitDetailSectionsForVisible.value.map((q) => createVNode(Fragment, null, [createVNode("div", {
|
10443
10446
|
class: "kg-section-header"
|
10444
|
-
}, [i.t(
|
10447
|
+
}, [i.t(q).value]), createVNode(Row, {
|
10445
10448
|
gutter: 12
|
10446
10449
|
}, {
|
10447
10450
|
default: () => {
|
10448
10451
|
var G;
|
10449
|
-
return [(G = i.kgSubmit.currentVarSubmitDetailsForVisible.value.filter(($) => $.section ===
|
10452
|
+
return [(G = i.kgSubmit.currentVarSubmitDetailsForVisible.value.filter(($) => $.section === q)) == null ? void 0 : G.map(U)];
|
10450
10453
|
}
|
10451
10454
|
})]))])]);
|
10452
10455
|
}
|
@@ -10455,10 +10458,10 @@ const getProps$B = () => ({
|
|
10455
10458
|
spinning: l.value
|
10456
10459
|
}, {
|
10457
10460
|
default: () => {
|
10458
|
-
var
|
10461
|
+
var H;
|
10459
10462
|
return [createVNode(KgForm, {
|
10460
10463
|
ref: i.kgSubmit.formRef,
|
10461
|
-
model: (
|
10464
|
+
model: (H = i.kgSubmit.formModel.value) != null ? H : void 0,
|
10462
10465
|
layout: i.kgSubmit.currentVarSubmitConfig$Layout.value,
|
10463
10466
|
labelCol: V.value,
|
10464
10467
|
wrapperCol: y.value
|
@@ -10471,14 +10474,14 @@ const getProps$B = () => ({
|
|
10471
10474
|
});
|
10472
10475
|
}
|
10473
10476
|
function le() {
|
10474
|
-
let
|
10477
|
+
let H;
|
10475
10478
|
return createVNode("div", null, [createVNode(Button, {
|
10476
10479
|
type: "primary",
|
10477
10480
|
ghost: !u.value,
|
10478
10481
|
disabled: u.value,
|
10479
10482
|
onClick: M
|
10480
|
-
}, _isSlot$b(
|
10481
|
-
default: () => [
|
10483
|
+
}, _isSlot$b(H = n.t("kg.cancel")) ? H : {
|
10484
|
+
default: () => [H]
|
10482
10485
|
}), createVNode(Button, {
|
10483
10486
|
type: "primary",
|
10484
10487
|
disabled: c.value,
|
@@ -10495,8 +10498,8 @@ const getProps$B = () => ({
|
|
10495
10498
|
innerHTML: E.value || " "
|
10496
10499
|
}, null);
|
10497
10500
|
}
|
10498
|
-
function ce(
|
10499
|
-
F.value =
|
10501
|
+
function ce(H) {
|
10502
|
+
F.value = H.selectedKeys;
|
10500
10503
|
}
|
10501
10504
|
return onUnmounted(async () => {
|
10502
10505
|
i.kgSubmit.store.dispose(i.formID), await I();
|
@@ -14690,7 +14693,7 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
14690
14693
|
name: "KgTable",
|
14691
14694
|
props: getProps$r(),
|
14692
14695
|
setup: function(e) {
|
14693
|
-
var
|
14696
|
+
var q;
|
14694
14697
|
const t = inject("$dayjs", dayjs), a = inject(KG__DI__KG_VAR__KG_SLOTS, null), r = inject(KG__DI__KG_VAR__KG_PROPS, null), n = useKg(), i = useKgVar();
|
14695
14698
|
i.kgSearch.onSearch(async (G) => (U(G), !1)), i.kgSearch.onReset(async () => (c.value = {}, !1)), i.kgTable.store.$onAction(async ({
|
14696
14699
|
name: G,
|
@@ -14749,7 +14752,7 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
14749
14752
|
...KgVarUtil.parseRequestParamsToJSON((ee = (Z = i.varGridConfig.value) == null ? void 0 : Z.cmd_prm) != null ? ee : ""),
|
14750
14753
|
...k.value
|
14751
14754
|
};
|
14752
|
-
return ((ne = i.varGridConfig.value) == null ? void 0 : ne.convert_sort_field_to_under_score_flg) === 1 && G.column && (G.column = snakeCase
|
14755
|
+
return ((ne = i.varGridConfig.value) == null ? void 0 : ne.convert_sort_field_to_under_score_flg) === 1 && G.column && (G.column = KgUtil.snakeCase(G.column)), G;
|
14753
14756
|
}), k = computed(() => {
|
14754
14757
|
var $, Y, Q;
|
14755
14758
|
let G = {};
|
@@ -14810,12 +14813,12 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
14810
14813
|
G += " kg-table--row-high";
|
14811
14814
|
break;
|
14812
14815
|
}
|
14813
|
-
return s.value && (G += " kg-table--is-
|
14816
|
+
return s.value && (G += " kg-table--is-shift-keydown"), G;
|
14814
14817
|
}), B = computed(() => {
|
14815
14818
|
var $;
|
14816
14819
|
let G = "kg-table-bottom";
|
14817
14820
|
return (($ = i.varGridConfig.value) == null ? void 0 : $.show_bottom_border_flg) === 1 && (G += " kg-table-bottom--border"), G;
|
14818
|
-
}), I = (
|
14821
|
+
}), I = (q = i.kgTable.store.getSelectedRowKeys(i.formID)) != null ? q : ref([]), M = reactive({
|
14819
14822
|
pageIndex: 1,
|
14820
14823
|
pageSize: 10,
|
14821
14824
|
total: 0
|
@@ -14846,10 +14849,10 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
14846
14849
|
G === !0 ? w() : G === !1 && $ === !0 && x();
|
14847
14850
|
});
|
14848
14851
|
function D(G) {
|
14849
|
-
|
14852
|
+
G.shiftKey && (s.value = !0);
|
14850
14853
|
}
|
14851
14854
|
function K(G) {
|
14852
|
-
|
14855
|
+
G.shiftKey || (s.value = !1);
|
14853
14856
|
}
|
14854
14857
|
function w() {
|
14855
14858
|
if (i.kgSubmit.currentVarSubmitConfig$DisplayType.value === KG__VAR_SUBMIT_CONFIG__DISPLAY_TYPE.TABLE) {
|
@@ -14881,9 +14884,15 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
14881
14884
|
} = G, z = document.getSelection();
|
14882
14885
|
if ((z == null ? void 0 : z.type) === "Range")
|
14883
14886
|
if ($ != null && $.shiftKey)
|
14884
|
-
|
14885
|
-
|
14887
|
+
____DEBUG____(`${i.formID} | KgTable | onRowClick() | \u6309\u4F4F\u4E86 SHIFT \u952E, \u56E0\u6B64\u6E05\u7A7A\u9009\u62E9\u7684\u6587\u672C.`, {
|
14888
|
+
param: G
|
14889
|
+
}), z.removeAllRanges();
|
14890
|
+
else {
|
14891
|
+
____DEBUG____(`${i.formID} | KgTable | onRowClick() | \u901A\u8FC7\u9F20\u6807\u5DE6\u952E\u62D6\u62FD\u9009\u62E9\u6587\u672C.`, {
|
14892
|
+
param: G
|
14893
|
+
});
|
14886
14894
|
return;
|
14895
|
+
}
|
14887
14896
|
if (!Q && !!N.value || i.isCreating.value || i.isUpdating.value || i.isCopying.value || i.isDeleting.value) {
|
14888
14897
|
____DEBUG____(`${i.formID} | KgTable | onRowClick() | \u8868\u683C\u7981\u7528/\u6B63\u5728\u589E\u5220\u6539\u590D.`, {
|
14889
14898
|
param: G
|
@@ -15156,7 +15165,7 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
15156
15165
|
})]
|
15157
15166
|
}) : null;
|
15158
15167
|
}
|
15159
|
-
function
|
15168
|
+
function H() {
|
15160
15169
|
return !i.kgTable.isAutoRequest.value && !i.kgTable.store.getIsRequested(i.formID) ? n.t("kg.KgTable.emptyText") : n.t("kg.emptyText");
|
15161
15170
|
}
|
15162
15171
|
return onMounted(() => {
|
@@ -15198,7 +15207,7 @@ const KgTable$1 = "", getProps$r = () => ({
|
|
15198
15207
|
}, {
|
15199
15208
|
headerCell: ce,
|
15200
15209
|
bodyCell: g,
|
15201
|
-
emptyText:
|
15210
|
+
emptyText: H,
|
15202
15211
|
expandedRowRender: (Y = a == null ? void 0 : a.KgTable) == null ? void 0 : Y.expandedRowRender,
|
15203
15212
|
summary: oe
|
15204
15213
|
}), (i.kgTable.isShowBottomLeft.value || i.kgTable.isShowBottomRight.value) && createVNode("div", {
|
@@ -37,7 +37,9 @@ interface IRequestOptions {
|
|
37
37
|
/** 是否使用模拟数据. */
|
38
38
|
mock?: boolean;
|
39
39
|
/**
|
40
|
-
*
|
40
|
+
* <p>各个请求参数的高级查询操作符.</p>
|
41
|
+
* <p>如果该参数不为空, 表示该请求启用了高级查询.</p>
|
42
|
+
* <p>其中的 key 表示参数名, 对应的 value 表示该参数的高级查询操作符(>,=,<...).</p>
|
41
43
|
*/
|
42
44
|
dynamicQueryOperatorModel?: Record<string, KG_DYNAMIC_QUERY_OPERATOR>;
|
43
45
|
/**
|
@@ -58,7 +58,7 @@ export declare class KgVarUtil {
|
|
58
58
|
* </p>
|
59
59
|
*
|
60
60
|
* @param param.$dayjs dayjs.
|
61
|
-
* @param param.
|
61
|
+
* @param param.dynamicQueryOperatorModel 各个字段的高级查询操作符.
|
62
62
|
* @param param.formID 界面标识.
|
63
63
|
* @param param.kgSearchFormID 查询条件的界面标识.
|
64
64
|
* @param param.params 请求参数.
|
@@ -115,6 +115,13 @@ export declare class KgUtil {
|
|
115
115
|
static showLoading(): void;
|
116
116
|
/** 隐藏全局遮罩. */
|
117
117
|
static hideLoading(): void;
|
118
|
+
/**
|
119
|
+
* <p>使用 lodash 的 snakeCase() 将字符串转换为 snake_case 的命名方式. 但是数字前面不加下划线.</p>
|
120
|
+
*
|
121
|
+
* @param value 转换前的字符串.
|
122
|
+
* @return 转换后的字符串.
|
123
|
+
*/
|
124
|
+
static snakeCase(value: any): string;
|
118
125
|
}
|
119
126
|
export declare type ModalFunc = {
|
120
127
|
destroy: () => void;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.25.
|
3
|
+
"version": "0.25.1-beta.1",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
|