@kengic/vue 0.10.10 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +288 -257
- package/dist/src/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +0 -2
- package/dist/src/src/components/KgForm.Item/index.vm.d.ts +23 -0
- package/dist/src/src/components/KgSearch/index.hooks.d.ts +4 -6
- package/dist/src/src/components/KgSearch/index.store.d.ts +4 -8
- package/dist/src/src/components/KgTable/index.vm.d.ts +13 -23
- package/dist/src/src/utils/logger.util.d.ts +9 -1
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
@@ -3917,7 +3917,7 @@ const emptyIcon = {
|
|
3917
3917
|
...t.data
|
3918
3918
|
}, r);
|
3919
3919
|
}
|
3920
|
-
}), name = "@kengic/vue", version = "0.
|
3920
|
+
}), name = "@kengic/vue", version = "0.11.0", data$1 = {
|
3921
3921
|
width: 24,
|
3922
3922
|
height: 24,
|
3923
3923
|
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"/>'
|
@@ -4033,24 +4033,24 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4033
4033
|
return H ? N : N.endOf(c);
|
4034
4034
|
}, Y = function(fe, ae) {
|
4035
4035
|
return L.w(x.toDate()[fe].apply(x.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), x);
|
4036
|
-
},
|
4036
|
+
}, q = this.$W, X = this.$M, J = this.$D, te = "set" + (this.$u ? "UTC" : "");
|
4037
4037
|
switch (K) {
|
4038
4038
|
case v:
|
4039
4039
|
return H ? F(1, 0) : F(31, 11);
|
4040
4040
|
case d:
|
4041
4041
|
return H ? F(1, X) : F(0, X + 1);
|
4042
4042
|
case u:
|
4043
|
-
var
|
4043
|
+
var ue = this.$locale().weekStart || 0, _e = (q < ue ? q + 7 : q) - ue;
|
4044
4044
|
return F(H ? J - _e : J + (6 - _e), X);
|
4045
4045
|
case c:
|
4046
4046
|
case y:
|
4047
|
-
return Y(
|
4047
|
+
return Y(te + "Hours", 0);
|
4048
4048
|
case i:
|
4049
|
-
return Y(
|
4049
|
+
return Y(te + "Minutes", 1);
|
4050
4050
|
case o:
|
4051
|
-
return Y(
|
4051
|
+
return Y(te + "Seconds", 2);
|
4052
4052
|
case l:
|
4053
|
-
return Y(
|
4053
|
+
return Y(te + "Milliseconds", 3);
|
4054
4054
|
default:
|
4055
4055
|
return this.clone();
|
4056
4056
|
}
|
@@ -4059,8 +4059,8 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4059
4059
|
}, I.$set = function(V, P) {
|
4060
4060
|
var x, H = L.p(V), K = "set" + (this.$u ? "UTC" : ""), F = (x = {}, x[c] = K + "Date", x[y] = K + "Date", x[d] = K + "Month", x[v] = K + "FullYear", x[i] = K + "Hours", x[o] = K + "Minutes", x[l] = K + "Seconds", x[s] = K + "Milliseconds", x)[H], Y = H === c ? this.$D + (P - this.$W) : P;
|
4061
4061
|
if (H === d || H === v) {
|
4062
|
-
var
|
4063
|
-
|
4062
|
+
var q = this.clone().set(y, 1);
|
4063
|
+
q.$d[F](Y), q.init(), this.$d = q.set(y, Math.min(this.$D, q.daysInMonth())).$d;
|
4064
4064
|
} else
|
4065
4065
|
F && this.$d[F](Y);
|
4066
4066
|
return this.init(), this;
|
@@ -4083,21 +4083,21 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4083
4083
|
return F(1);
|
4084
4084
|
if (K === u)
|
4085
4085
|
return F(7);
|
4086
|
-
var Y = (x = {}, x[o] = a, x[i] = n, x[l] = r, x)[K] || 1,
|
4087
|
-
return L.w(
|
4086
|
+
var Y = (x = {}, x[o] = a, x[i] = n, x[l] = r, x)[K] || 1, q = this.$d.getTime() + V * Y;
|
4087
|
+
return L.w(q, this);
|
4088
4088
|
}, I.subtract = function(V, P) {
|
4089
4089
|
return this.add(-1 * V, P);
|
4090
4090
|
}, I.format = function(V) {
|
4091
4091
|
var P = this, x = this.$locale();
|
4092
4092
|
if (!this.isValid())
|
4093
4093
|
return x.invalidDate || _;
|
4094
|
-
var H = V || "YYYY-MM-DDTHH:mm:ssZ", K = L.z(this), F = this.$H, Y = this.$m,
|
4095
|
-
return ae && (ae[N] || ae(P, H)) || U[N].slice(0,
|
4094
|
+
var H = V || "YYYY-MM-DDTHH:mm:ssZ", K = L.z(this), F = this.$H, Y = this.$m, q = this.$M, X = x.weekdays, J = x.months, te = x.meridiem, ue = function(ae, N, U, Q) {
|
4095
|
+
return ae && (ae[N] || ae(P, H)) || U[N].slice(0, Q);
|
4096
4096
|
}, _e = function(ae) {
|
4097
4097
|
return L.s(F % 12 || 12, ae, "0");
|
4098
|
-
}, fe =
|
4099
|
-
var
|
4100
|
-
return U ?
|
4098
|
+
}, fe = te || function(ae, N, U) {
|
4099
|
+
var Q = ae < 12 ? "AM" : "PM";
|
4100
|
+
return U ? Q.toLowerCase() : Q;
|
4101
4101
|
};
|
4102
4102
|
return H.replace(b, function(ae, N) {
|
4103
4103
|
return N || function(U) {
|
@@ -4107,13 +4107,13 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4107
4107
|
case "YYYY":
|
4108
4108
|
return L.s(P.$y, 4, "0");
|
4109
4109
|
case "M":
|
4110
|
-
return
|
4110
|
+
return q + 1;
|
4111
4111
|
case "MM":
|
4112
|
-
return L.s(
|
4112
|
+
return L.s(q + 1, 2, "0");
|
4113
4113
|
case "MMM":
|
4114
|
-
return
|
4114
|
+
return ue(x.monthsShort, q, J, 3);
|
4115
4115
|
case "MMMM":
|
4116
|
-
return
|
4116
|
+
return ue(J, q);
|
4117
4117
|
case "D":
|
4118
4118
|
return P.$D;
|
4119
4119
|
case "DD":
|
@@ -4121,9 +4121,9 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4121
4121
|
case "d":
|
4122
4122
|
return String(P.$W);
|
4123
4123
|
case "dd":
|
4124
|
-
return
|
4124
|
+
return ue(x.weekdaysMin, P.$W, X, 2);
|
4125
4125
|
case "ddd":
|
4126
|
-
return
|
4126
|
+
return ue(x.weekdaysShort, P.$W, X, 3);
|
4127
4127
|
case "dddd":
|
4128
4128
|
return X[P.$W];
|
4129
4129
|
case "H":
|
@@ -4157,7 +4157,7 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4157
4157
|
}, I.utcOffset = function() {
|
4158
4158
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
4159
4159
|
}, I.diff = function(V, P, x) {
|
4160
|
-
var H, K = this, F = L.p(P), Y = M(V),
|
4160
|
+
var H, K = this, F = L.p(P), Y = M(V), q = (Y.utcOffset() - this.utcOffset()) * a, X = this - Y, J = function() {
|
4161
4161
|
return L.m(K, Y);
|
4162
4162
|
};
|
4163
4163
|
switch (F) {
|
@@ -4171,10 +4171,10 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
|
|
4171
4171
|
H = J() / 3;
|
4172
4172
|
break;
|
4173
4173
|
case u:
|
4174
|
-
H = (X -
|
4174
|
+
H = (X - q) / 6048e5;
|
4175
4175
|
break;
|
4176
4176
|
case c:
|
4177
|
-
H = (X -
|
4177
|
+
H = (X - q) / 864e5;
|
4178
4178
|
break;
|
4179
4179
|
case i:
|
4180
4180
|
H = X / n;
|
@@ -6295,6 +6295,9 @@ var KG_APP_PREFIX = /* @__PURE__ */ ((e) => (e.WMS_DATA_MANAGER = "/wms/data-man
|
|
6295
6295
|
const KG_APP_PREFIXS = ["/wms/data-manager", "/wms/business-manager", "/wcs", "/sys"];
|
6296
6296
|
var KG_FORM_ITEM_TYPE = /* @__PURE__ */ ((e) => (e.INPUT = "INPUT", e.INPUT_PASSWORD = "INPUT_PASSWORD", e.INPUT_NUMBER = "INPUT_NUMBER", e.TEXT_AREA = "TEXT_AREA", e.CHECKBOX = "CHECKBOX", e.CHECKBOX_GROUP = "CHECKBOX_GROUP", e.RADIO_GROUP = "RADIO_GROUP", e.SWITCH = "SWITCH", e.SELECT = "SELECT", e.SELECT_MULTIPLE = "SELECT_MULTIPLE", e.DATE_DATE = "DATE_DATE", e.DATE_DATE_RANGE = "DATE_DATE_RANGE", e.DATE_TIME = "DATE_TIME", e.DATE_TIME_RANGE = "DATE_TIME_RANGE", e.DATE_DATETIME = "DATE_DATETIME", e.DATE_DATETIME_RANGE = "DATE_DATETIME_RANGE", e.DATE_WEEK = "DATE_WEEK", e.DATE_MONTH = "DATE_MONTH", e.DATE_YEAR = "DATE_YEAR", e.BUTTON_UPLOAD = "BUTTON_UPLOAD", e))(KG_FORM_ITEM_TYPE || {}), KG_FORM_CONTEXT = /* @__PURE__ */ ((e) => (e.SEARCH = "SEARCH", e.SUBMIT = "SUBMIT", e.TABLE = "TABLE", e))(KG_FORM_CONTEXT || {}), KG_TABLE_CELL_DISPLAY_TYPE = /* @__PURE__ */ ((e) => (e.YN = "YN", e.ENUM = "ENUM", e.PROGRESS = "PROGRESS", e.FILE_SIZE = "FILE_SIZE", e.UPDATE_LINK = "UPDATE_LINK", e.ROUTE_LINK = "ROUTE_LINK", e.DESC = "DESC", e))(KG_TABLE_CELL_DISPLAY_TYPE || {}), KG_BUTTON_TYPE = /* @__PURE__ */ ((e) => (e.CREATE = "CREATE", e.UPDATE = "UPDATE", e.COPY = "COPY", e.DELETE = "DELETE", e.IMPORT = "IMPORT", e.IMPORT_TEMPLATE = "IMPORT_TEMPLATE", e.EXPORT = "EXPORT", e.SEARCH = "SEARCH", e.REFRESH = "REFRESH", e.OTHER = "OTHER", e))(KG_BUTTON_TYPE || {}), KG_BUTTON_COLOR = /* @__PURE__ */ ((e) => (e.DANGER = "DANGER", e.WARN = "WARN", e))(KG_BUTTON_COLOR || {}), KG_BUTTON_DISPLAY_TYPE = /* @__PURE__ */ ((e) => (e.DEFAULT = "DEFAULT", e.SELECT = "SELECT", e))(KG_BUTTON_DISPLAY_TYPE || {}), KG_VAR_SUBMIT__DISPLAY_TYPE = /* @__PURE__ */ ((e) => (e.MODAL = "MODAL", e.DRAWER = "DRAWER", e.TABLE = "TABLE", e))(KG_VAR_SUBMIT__DISPLAY_TYPE || {}), KG_VAR_SUBMIT__LAYOUT = /* @__PURE__ */ ((e) => (e.VERTICAL = "vertical", e.HORIZONTAL = "horizontal", e))(KG_VAR_SUBMIT__LAYOUT || {}), KG_VAR_INPUT__DATA_TYPE = /* @__PURE__ */ ((e) => (e.NUMBER = "NUMBER", e))(KG_VAR_INPUT__DATA_TYPE || {}), KG_CUSTOM_LEVEL = /* @__PURE__ */ ((e) => (e[e.L0 = 0] = "L0", e[e.L10 = 10] = "L10", e))(KG_CUSTOM_LEVEL || {}), KG_POSSIBILITY_DATA_TYPE = /* @__PURE__ */ ((e) => (e.STRING = "string", e.NUMBER = "number", e.BOOLEAN = "boolean", e))(KG_POSSIBILITY_DATA_TYPE || {}), KG_WIDTH_UNIT = /* @__PURE__ */ ((e) => (e.SPAN = "SPAN", e.PX = "PX", e))(KG_WIDTH_UNIT || {}), KG_EXCEL_SUFFIX = /* @__PURE__ */ ((e) => (e.XLS = "xls", e.XLSX = "xlsx", e))(KG_EXCEL_SUFFIX || {}), KG_DESCRIPTION_CODE_NAME = /* @__PURE__ */ ((e) => (e.YN = "yn", e.VAR_SUBMIT_LAYOUT = "var_submit_layout", e.VAR_SPAN = "var_span", e.VAR_BUTTON_DISPLAY_TYPE = "var_button_display_type", e.VAR_WIDTH_UNIT = "var_width_unit", e))(KG_DESCRIPTION_CODE_NAME || {}), KG_DYNAMIC_QUERY_OPERATOR = /* @__PURE__ */ ((e) => (e.EQ = "eq", e.NE = "ne", e.GT = "gt", e.LT = "lt", e.GTE = "gte", e.LTE = "lte", e.START_WITH = "start", e.END_WITH = "end", e.CONTAIN = "contain", e.IN = "in", e.BETWEEN = "between", e))(KG_DYNAMIC_QUERY_OPERATOR || {}), KG_HEADERS = /* @__PURE__ */ ((e) => (e.DYNAMIC_QUERY = "Kg-Dynamic-Query", e))(KG_HEADERS || {});
|
6297
6297
|
class KgLogger {
|
6298
|
+
static deprecated(t, r = {}, a = !0) {
|
6299
|
+
KgLogger.log("deprecated", t, r, a);
|
6300
|
+
}
|
6298
6301
|
static error(t, r = {}, a = !0) {
|
6299
6302
|
KgLogger.log("error", t, r, a);
|
6300
6303
|
}
|
@@ -6316,6 +6319,9 @@ class KgLogger {
|
|
6316
6319
|
case "error":
|
6317
6320
|
l = `[ERROR] ${r}`, o = "color:#f00;";
|
6318
6321
|
break;
|
6322
|
+
case "deprecated":
|
6323
|
+
l = `[DEPRECATED] ${r}`, o = "color:#f00;";
|
6324
|
+
break;
|
6319
6325
|
}
|
6320
6326
|
n ? console.groupCollapsed(`%c[@kengic/vue] ${l}`, o) : console.group(`%c[@kengic/vue] ${l}`, o), toPairs$1(cloneDeep(a)).forEach((i) => {
|
6321
6327
|
console.log(`%c${i[0]}:`, "color: #000; font-weight: bold;", i[1]);
|
@@ -6577,6 +6583,12 @@ class KgUtil {
|
|
6577
6583
|
s[i] = void 0;
|
6578
6584
|
break;
|
6579
6585
|
}
|
6586
|
+
case (!!a && a.isDayjs(c)):
|
6587
|
+
s[i] = this.parseParamFromDayJS(i, c);
|
6588
|
+
break;
|
6589
|
+
case (!!a && isArray$1(c) && c.length === 2 && a.isDayjs(c[0]) && a.isDayjs(c[1])):
|
6590
|
+
s[i] = void 0, s[`${i}_begin`] = this.parseParamFromDayJS(i, c[0]), s[`${i}_end`] = this.parseParamFromDayJS(i, c[1]);
|
6591
|
+
break;
|
6580
6592
|
case isObjectLike(c):
|
6581
6593
|
s[i] = this.parseParams(c, r, a);
|
6582
6594
|
break;
|
@@ -6607,6 +6619,8 @@ class KgUtil {
|
|
6607
6619
|
return t;
|
6608
6620
|
}
|
6609
6621
|
static parseParamFromDayJS(t, r, a) {
|
6622
|
+
if (!a)
|
6623
|
+
return r.format("YYYY-MM-DD HH:mm:ss");
|
6610
6624
|
const n = useKgVar(a), s = useKgTable(a), l = n.store.getVarVariableConfig(a, t);
|
6611
6625
|
if (!l)
|
6612
6626
|
return r;
|
@@ -7498,11 +7512,7 @@ addIcon("material-symbols:save-outline-rounded", data);
|
|
7498
7512
|
addIcon("material-symbols:save-as-outline-rounded", data$1);
|
7499
7513
|
function setup(e) {
|
7500
7514
|
var r;
|
7501
|
-
if (console.log(
|
7502
|
-
`%c\u751F\u4EA7\u73AF\u5883
|
7503
|
-
${name}: ${version}`,
|
7504
|
-
"color:#ffffff;background-color:#1B6EF3;border-radius:2px;padding:1px 3px;font-size:10px;margin-bottom:1px;"
|
7505
|
-
), !(e != null && e.pinia) || !(e != null && e.locale) || !(e != null && e.i18n) || !e.pFunction)
|
7515
|
+
if (console.log(`%c${name}: ${version}`, "color:#ffffff;background-color:#1B6EF3;border-radius:2px;padding:1px 3px;font-size:10px;margin-bottom:1px;"), !(e != null && e.pinia) || !(e != null && e.locale) || !(e != null && e.i18n) || !e.pFunction)
|
7506
7516
|
throw KgLogger.error("\u7F3A\u5C11\u5FC5\u8981\u7684\u521D\u59CB\u5316\u53C2\u6570.", { options: e }), new Error("[@kengic/vue] \u7F3A\u5C11\u5FC5\u8981\u7684\u521D\u59CB\u5316\u53C2\u6570.");
|
7507
7517
|
setPinia(e.pinia);
|
7508
7518
|
const t = useKg();
|
@@ -9158,7 +9168,7 @@ const useKgVarStore = () => (store$7 || (store$7 = defineStore("KgVar", {
|
|
9158
9168
|
getVarGridDetail(e) {
|
9159
9169
|
return (t, r) => {
|
9160
9170
|
var a, n, s;
|
9161
|
-
return !t || !r ? (KgLogger.error("formID \u6216 var_nam \u4E3A\u7A7A.", { frm_id: t, var_nam: r }), null) : (s = (n = (a = this.getCurrentVarGridMaster(t)) == null ? void 0 : a.varGridDetails) == null ? void 0 : n.find((l) => l.var_nam === r)) != null ? s : null;
|
9171
|
+
return !t || !r ? (KgLogger.error("KgVarStore.getVarGridDetail() | formID \u6216 var_nam \u4E3A\u7A7A.", { frm_id: t, var_nam: r }), null) : (s = (n = (a = this.getCurrentVarGridMaster(t)) == null ? void 0 : a.varGridDetails) == null ? void 0 : n.find((l) => l.var_nam === r)) != null ? s : null;
|
9162
9172
|
};
|
9163
9173
|
}
|
9164
9174
|
},
|
@@ -9467,9 +9477,9 @@ function useKgVar(e, t, r = 0) {
|
|
9467
9477
|
u.dispose(c);
|
9468
9478
|
}));
|
9469
9479
|
const d = (J) => computed(() => u.t(c, J)), p = computed(() => u.isRetrieving(c)), v = computed(() => u.isRetrievingVarProfileMaster(c)), y = computed(() => u.isRetrievingVarGridMaster(c)), _ = computed(() => u.isRetrieved(c)), g = computed(() => u.isCreating(c)), b = computed(() => u.isCreatingRequesting(c)), E = computed(() => u.isUpdating(c)), T = computed(() => u.isUpdatingRequesting(c)), k = computed(() => u.isCopying(c)), A = computed(() => u.isCopyingRequesting(c)), C = computed(() => u.isDeleting(c)), D = computed(() => u.isDeletingRequesting(c)), w = computed(() => u.isOtherRequesting(c)), O = computed(() => u.getVarButtons(c)), M = computed(() => u.getVarButtonSearch(c)), L = computed(() => u.getVarButtonCreate(c)), R = computed(() => u.getVarButtonUpdate(c)), B = computed(() => u.getVarButtonCopy(c)), $ = computed(() => u.getVarButtonDelete(c)), I = computed(() => u.getVarProfileMasters(c)), V = computed(() => u.getCurrentVarProfileMasterID(c)), P = computed(() => u.getCurrentVarProfileMaster(c)), x = computed(() => {
|
9470
|
-
var J,
|
9471
|
-
return (
|
9472
|
-
}), H = computed(() => u.getVarGridConfig(c)), K = computed(() => u.getVarGridMasters(c)), F = computed(() => u.getCurrentVarGridMasterID(c)), Y = computed(() => u.getCurrentVarGridMaster(c)),
|
9480
|
+
var J, te;
|
9481
|
+
return (te = (J = P.value) == null ? void 0 : J.varProfileDetails) != null ? te : null;
|
9482
|
+
}), H = computed(() => u.getVarGridConfig(c)), K = computed(() => u.getVarGridMasters(c)), F = computed(() => u.getCurrentVarGridMasterID(c)), Y = computed(() => u.getCurrentVarGridMaster(c)), q = computed(() => u.getSystemVarGridDetails(c)), X = computed(() => u.getCurrentVarGridDetails(c));
|
9473
9483
|
return {
|
9474
9484
|
formID: c,
|
9475
9485
|
store: u,
|
@@ -9500,7 +9510,7 @@ function useKgVar(e, t, r = 0) {
|
|
9500
9510
|
varGridMasters: K,
|
9501
9511
|
currentVarGridMasteID: F,
|
9502
9512
|
currentVarGridMaster: Y,
|
9503
|
-
systemVarGridDetails:
|
9513
|
+
systemVarGridDetails: q,
|
9504
9514
|
currentVarGridDetails: X,
|
9505
9515
|
setIsCreating: s,
|
9506
9516
|
setIsUpdating: l,
|
@@ -11366,14 +11376,14 @@ const getProps$p = () => ({
|
|
11366
11376
|
const r = inject("$dayjs", dayjs), a = inject(DI_KG_VAR__KG_SLOTS, null);
|
11367
11377
|
inject(DI_KG_VAR__KG_PROPS, null);
|
11368
11378
|
const n = useKg(), s = useKgVar(), l = useKgButton(), o = useKgTable(), i = useKgSubmit(), c = useKgSearch();
|
11369
|
-
l.onSubmitSave(async () => (await
|
11379
|
+
l.onSubmitSave(async () => (await ee(), !1)), l.onSubmitCancel(async () => (await z(), !1)), _useFormModel$1();
|
11370
11380
|
const u = computed(() => s.isDeleting.value && M.value.length === 0 && R.value.length === 0), d = computed(() => i.store.isLoading(s.formID)), p = computed(() => s.store.getVarSubmitConfig(s.formID)), v = computed(() => s.store.getVarSubmitFieldsForCreateKey(s.formID)), y = computed(() => s.store.getVarSubmitFieldsForCreateNotKey(s.formID)), _ = computed(() => s.store.getVarSubmitFieldsForUpdateKey(s.formID)), g = computed(() => s.store.getVarSubmitFieldsForUpdateNotKey(s.formID)), b = computed(() => s.store.getVarSubmitFieldsForCopyKey(s.formID)), E = computed(() => s.store.getVarSubmitFieldsForCopyNotKey(s.formID)), T = computed(() => s.store.getVarSubmitFieldsForCreateKeyVisible(s.formID)), k = computed(() => s.store.getVarSubmitFieldsForCreateNotKeyVisible(s.formID)), A = computed(() => s.store.getVarSubmitFieldsForUpdateKeyVisible(s.formID)), C = computed(() => s.store.getVarSubmitFieldsForUpdateNotKeyVisible(s.formID)), D = computed(() => s.store.getVarSubmitFieldsForCopyKeyVisible(s.formID)), w = computed(() => s.store.getVarSubmitFieldsForCopyNotKeyVisible(s.formID)), O = computed(() => s.store.getVarSubmitFieldsForDelete(s.formID)), M = computed(() => {
|
11371
|
-
var G,
|
11381
|
+
var G, W, Z;
|
11372
11382
|
switch (!0) {
|
11373
11383
|
case s.isCreating.value:
|
11374
11384
|
return (G = v.value) != null ? G : [];
|
11375
11385
|
case s.isUpdating.value:
|
11376
|
-
return (
|
11386
|
+
return (W = _.value) != null ? W : [];
|
11377
11387
|
case s.isCopying.value:
|
11378
11388
|
return (Z = b.value) != null ? Z : [];
|
11379
11389
|
case s.isDeleting.value:
|
@@ -11381,12 +11391,12 @@ const getProps$p = () => ({
|
|
11381
11391
|
}
|
11382
11392
|
return [];
|
11383
11393
|
}), L = computed(() => {
|
11384
|
-
var G,
|
11394
|
+
var G, W, Z;
|
11385
11395
|
switch (!0) {
|
11386
11396
|
case s.isCreating.value:
|
11387
11397
|
return (G = T.value) != null ? G : [];
|
11388
11398
|
case s.isUpdating.value:
|
11389
|
-
return (
|
11399
|
+
return (W = A.value) != null ? W : [];
|
11390
11400
|
case s.isCopying.value:
|
11391
11401
|
return (Z = D.value) != null ? Z : [];
|
11392
11402
|
case s.isDeleting.value:
|
@@ -11394,12 +11404,12 @@ const getProps$p = () => ({
|
|
11394
11404
|
}
|
11395
11405
|
return [];
|
11396
11406
|
}), R = computed(() => {
|
11397
|
-
var G,
|
11407
|
+
var G, W, Z, re;
|
11398
11408
|
switch (!0) {
|
11399
11409
|
case s.isCreating.value:
|
11400
11410
|
return (G = y.value) != null ? G : [];
|
11401
11411
|
case s.isUpdating.value:
|
11402
|
-
return (
|
11412
|
+
return (W = g.value) != null ? W : [];
|
11403
11413
|
case s.isCopying.value:
|
11404
11414
|
return (Z = E.value) != null ? Z : [];
|
11405
11415
|
case s.isDeleting.value:
|
@@ -11407,12 +11417,12 @@ const getProps$p = () => ({
|
|
11407
11417
|
}
|
11408
11418
|
return [];
|
11409
11419
|
}), B = computed(() => {
|
11410
|
-
var G,
|
11420
|
+
var G, W, Z, re;
|
11411
11421
|
switch (!0) {
|
11412
11422
|
case s.isCreating.value:
|
11413
11423
|
return (G = k.value) != null ? G : [];
|
11414
11424
|
case s.isUpdating.value:
|
11415
|
-
return (
|
11425
|
+
return (W = C.value) != null ? W : [];
|
11416
11426
|
case s.isCopying.value:
|
11417
11427
|
return (Z = w.value) != null ? Z : [];
|
11418
11428
|
case s.isDeleting.value:
|
@@ -11423,31 +11433,31 @@ const getProps$p = () => ({
|
|
11423
11433
|
kgWidth: 0
|
11424
11434
|
}), x = computed(() => {
|
11425
11435
|
var G;
|
11426
|
-
return !!(u.value ||
|
11436
|
+
return !!(u.value || te.isFullscreen || ((G = p.value) == null ? void 0 : G.resizable_flg) === 0);
|
11427
11437
|
}), H = computed(() => {
|
11428
|
-
var G,
|
11429
|
-
return u.value ? 398 : (
|
11438
|
+
var G, W;
|
11439
|
+
return u.value ? 398 : (W = (G = p.value) == null ? void 0 : G.min_width) != null ? W : DEFAULT_MIN_WIDTH;
|
11430
11440
|
}), K = computed(() => {
|
11431
|
-
var G,
|
11432
|
-
return u.value ? 398 : (
|
11441
|
+
var G, W;
|
11442
|
+
return u.value ? 398 : (W = (G = p.value) == null ? void 0 : G.max_width) != null ? W : DEFAULT_MAX_WIDTH;
|
11433
11443
|
}), F = computed(() => u.value ? 398 : P.value.kgWidth), Y = ref(null);
|
11434
11444
|
_useResizeObserver$1(Y);
|
11435
|
-
const
|
11445
|
+
const q = _useTitle(), X = computed(() => u.value ? 400 : P.value.kgWidth && P.value.kgWidth > 0 ? "auto" : 0), J = computed(() => X.value === 0 ? !1 : !!(s.isCreating.value || s.isUpdating.value || s.isCopying.value || s.isDeleting.value)), te = reactive({
|
11436
11446
|
isFullscreen: !1
|
11437
11447
|
}), {
|
11438
|
-
getClass:
|
11439
|
-
} = _useClass(e,
|
11448
|
+
getClass: ue
|
11449
|
+
} = _useClass(e, te), {
|
11440
11450
|
getLayout: _e
|
11441
11451
|
} = _useLayout(), {
|
11442
11452
|
getDefaultWidth: fe
|
11443
11453
|
} = _useDefaultWidth(), ae = computed(() => {
|
11444
|
-
var G,
|
11454
|
+
var G, W, Z;
|
11445
11455
|
switch (_e.value) {
|
11446
11456
|
case "horizontal":
|
11447
11457
|
switch ((G = p.value) == null ? void 0 : G.label_col_unit) {
|
11448
11458
|
case KG_WIDTH_UNIT.SPAN:
|
11449
11459
|
return {
|
11450
|
-
span: (
|
11460
|
+
span: (W = p.value) == null ? void 0 : W.label_col
|
11451
11461
|
};
|
11452
11462
|
default:
|
11453
11463
|
return {
|
@@ -11460,13 +11470,13 @@ const getProps$p = () => ({
|
|
11460
11470
|
return;
|
11461
11471
|
}
|
11462
11472
|
}), N = computed(() => {
|
11463
|
-
var G,
|
11473
|
+
var G, W;
|
11464
11474
|
switch (_e.value) {
|
11465
11475
|
case "horizontal":
|
11466
11476
|
switch ((G = p.value) == null ? void 0 : G.label_col_unit) {
|
11467
11477
|
case KG_WIDTH_UNIT.SPAN:
|
11468
11478
|
return {
|
11469
|
-
span: 24 - ((
|
11479
|
+
span: 24 - ((W = p.value) == null ? void 0 : W.label_col)
|
11470
11480
|
};
|
11471
11481
|
default:
|
11472
11482
|
return;
|
@@ -11475,8 +11485,8 @@ const getProps$p = () => ({
|
|
11475
11485
|
return;
|
11476
11486
|
}
|
11477
11487
|
});
|
11478
|
-
watch(J, (G,
|
11479
|
-
G === !0 && U(),
|
11488
|
+
watch(J, (G, W) => {
|
11489
|
+
G === !0 && U(), W === !0 && G === !1 && Q();
|
11480
11490
|
}, {
|
11481
11491
|
immediate: !0
|
11482
11492
|
}), watch(fe, (G) => {
|
@@ -11492,7 +11502,7 @@ const getProps$p = () => ({
|
|
11492
11502
|
isDeleting: s.isDeleting.value,
|
11493
11503
|
row: o.selectedRow.value
|
11494
11504
|
}))
|
11495
|
-
return new Promise((
|
11505
|
+
return new Promise((W, Z) => {
|
11496
11506
|
var se;
|
11497
11507
|
const re = watch(i.model, async (ie) => {
|
11498
11508
|
ie && Object.keys(ie).length > 0 && (setTimeout(() => re()), await i.store.emit(s.formID, "open", {
|
@@ -11502,17 +11512,17 @@ const getProps$p = () => ({
|
|
11502
11512
|
isDeleting: s.isDeleting.value,
|
11503
11513
|
row: o.selectedRow.value,
|
11504
11514
|
model: i.model
|
11505
|
-
}),
|
11515
|
+
}), W());
|
11506
11516
|
}, {
|
11507
11517
|
immediate: !0
|
11508
11518
|
});
|
11509
|
-
((se = p.value) == null ? void 0 : se.dft_fullscreen_flg) === 1 && !u.value && (
|
11519
|
+
((se = p.value) == null ? void 0 : se.dft_fullscreen_flg) === 1 && !u.value && (te.isFullscreen = !0);
|
11510
11520
|
});
|
11511
11521
|
}
|
11512
|
-
async function
|
11513
|
-
P.value.kgWidth = fe.value,
|
11522
|
+
async function Q() {
|
11523
|
+
P.value.kgWidth = fe.value, te.isFullscreen = !1, await i.store.emit(s.formID, "close", null);
|
11514
11524
|
}
|
11515
|
-
function
|
11525
|
+
function z() {
|
11516
11526
|
switch (!0) {
|
11517
11527
|
case s.isCreating.value:
|
11518
11528
|
s.store.setIsCreating(s.formID, !1);
|
@@ -11528,8 +11538,8 @@ const getProps$p = () => ({
|
|
11528
11538
|
break;
|
11529
11539
|
}
|
11530
11540
|
}
|
11531
|
-
async function
|
11532
|
-
var G,
|
11541
|
+
async function ee() {
|
11542
|
+
var G, W;
|
11533
11543
|
try {
|
11534
11544
|
if (await i.store.emit(s.formID, "beforeOk", {
|
11535
11545
|
isCreating: s.isCreating.value,
|
@@ -11546,7 +11556,7 @@ const getProps$p = () => ({
|
|
11546
11556
|
} catch (se) {
|
11547
11557
|
KgUtil.throwIfNotFormError(se);
|
11548
11558
|
}
|
11549
|
-
if (await ((
|
11559
|
+
if (await ((W = i.formRef.value) == null ? void 0 : W.validate()), await i.store.emit(s.formID, "afterValidate", {
|
11550
11560
|
isCreating: s.isCreating.value,
|
11551
11561
|
isUpdating: s.isUpdating.value,
|
11552
11562
|
isCopying: s.isCopying.value,
|
@@ -11558,25 +11568,25 @@ const getProps$p = () => ({
|
|
11558
11568
|
return;
|
11559
11569
|
switch (!0) {
|
11560
11570
|
case s.isCreating.value:
|
11561
|
-
await
|
11571
|
+
await ce();
|
11562
11572
|
break;
|
11563
11573
|
case s.isUpdating.value:
|
11564
|
-
await
|
11574
|
+
await le();
|
11565
11575
|
break;
|
11566
11576
|
case s.isCopying.value:
|
11567
|
-
await
|
11577
|
+
await oe();
|
11568
11578
|
break;
|
11569
11579
|
case s.isDeleting.value:
|
11570
|
-
await
|
11580
|
+
await me();
|
11571
11581
|
break;
|
11572
11582
|
}
|
11573
11583
|
} catch (Z) {
|
11574
11584
|
KgUtil.throwIfNotFormError(Z);
|
11575
11585
|
}
|
11576
11586
|
}
|
11577
|
-
async function
|
11578
|
-
var
|
11579
|
-
const G = (
|
11587
|
+
async function ce() {
|
11588
|
+
var W, Z, re, se, ie, de;
|
11589
|
+
const G = (W = s.varButtonCreate.value) == null ? void 0 : W.cmd;
|
11580
11590
|
if (!G) {
|
11581
11591
|
KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
11582
11592
|
VarButton: s.varButtonCreate.value
|
@@ -11603,7 +11613,7 @@ const getProps$p = () => ({
|
|
11603
11613
|
url: G,
|
11604
11614
|
params: ne.value,
|
11605
11615
|
data: ge.value
|
11606
|
-
}), ((de = s.varButtonCreate.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(
|
11616
|
+
}), ((de = s.varButtonCreate.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(q.title.value + n.t("kg.succeed")), await i.store.emit(s.formID, "ok", {
|
11607
11617
|
isCreating: s.isCreating.value,
|
11608
11618
|
isUpdating: s.isUpdating.value,
|
11609
11619
|
isCopying: s.isCopying.value,
|
@@ -11617,9 +11627,9 @@ const getProps$p = () => ({
|
|
11617
11627
|
s.store.setIsCreatingRequesting(s.formID, !1);
|
11618
11628
|
}
|
11619
11629
|
}
|
11620
|
-
async function
|
11621
|
-
var
|
11622
|
-
const G = (
|
11630
|
+
async function le() {
|
11631
|
+
var W, Z, re, se, ie, de;
|
11632
|
+
const G = (W = s.varButtonUpdate.value) == null ? void 0 : W.cmd;
|
11623
11633
|
if (!G) {
|
11624
11634
|
KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
11625
11635
|
VarButton: s.varButtonUpdate.value
|
@@ -11660,9 +11670,9 @@ const getProps$p = () => ({
|
|
11660
11670
|
s.store.setIsUpdatingRequesting(s.formID, !1);
|
11661
11671
|
}
|
11662
11672
|
}
|
11663
|
-
async function
|
11664
|
-
var
|
11665
|
-
const G = (
|
11673
|
+
async function oe() {
|
11674
|
+
var W, Z, re, se, ie, de, ne, ge;
|
11675
|
+
const G = (W = s.varButtonCopy.value) == null ? void 0 : W.cmd;
|
11666
11676
|
if (!G) {
|
11667
11677
|
KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
11668
11678
|
VarButton: s.varButtonCopy.value
|
@@ -11671,11 +11681,11 @@ const getProps$p = () => ({
|
|
11671
11681
|
}
|
11672
11682
|
try {
|
11673
11683
|
s.store.setIsCopyingRequesting(s.formID, !0);
|
11674
|
-
let pe = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCopy.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)),
|
11684
|
+
let pe = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonCopy.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), ve = ref(KgUtil.parseParams({
|
11675
11685
|
...(se = o.selectedFirstRow.value) != null ? se : {},
|
11676
11686
|
...toRaw(i.model.value)
|
11677
11687
|
}, s.formID, r));
|
11678
|
-
if (((ie = p.value) == null ? void 0 : ie.cpy_clear_id_flg) !== 0 && delete
|
11688
|
+
if (((ie = p.value) == null ? void 0 : ie.cpy_clear_id_flg) !== 0 && delete ve.value.id, await i.store.emit(s.formID, "beforeRequest", {
|
11679
11689
|
isCreating: s.isCreating.value,
|
11680
11690
|
isUpdating: s.isUpdating.value,
|
11681
11691
|
isCopying: s.isCopying.value,
|
@@ -11684,14 +11694,14 @@ const getProps$p = () => ({
|
|
11684
11694
|
rows: o.selectedRows.value,
|
11685
11695
|
model: i.model,
|
11686
11696
|
params: pe,
|
11687
|
-
data:
|
11697
|
+
data: ve
|
11688
11698
|
}))
|
11689
11699
|
return;
|
11690
11700
|
await httpClient().request({
|
11691
11701
|
method: (ne = (de = s.varButtonCopy.value) == null ? void 0 : de.cmd_method) != null ? ne : "POST",
|
11692
11702
|
url: G,
|
11693
11703
|
params: pe.value,
|
11694
|
-
data:
|
11704
|
+
data: ve.value
|
11695
11705
|
}), ((ge = s.varButtonCopy.value) == null ? void 0 : ge.show_success_message_flg) !== 0 && message.success(n.t("kg.copySuccess")), await i.store.emit(s.formID, "ok", {
|
11696
11706
|
isCreating: s.isCreating.value,
|
11697
11707
|
isUpdating: s.isUpdating.value,
|
@@ -11706,9 +11716,9 @@ const getProps$p = () => ({
|
|
11706
11716
|
s.store.setIsCopyingRequesting(s.formID, !1);
|
11707
11717
|
}
|
11708
11718
|
}
|
11709
|
-
async function
|
11710
|
-
var
|
11711
|
-
const G = (
|
11719
|
+
async function me() {
|
11720
|
+
var W, Z, re, se, ie, de, ne, ge, pe, ve;
|
11721
|
+
const G = (W = s.varButtonDelete.value) == null ? void 0 : W.cmd;
|
11712
11722
|
if (!G) {
|
11713
11723
|
KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
|
11714
11724
|
VarButton: s.varButtonDelete.value
|
@@ -11717,13 +11727,13 @@ const getProps$p = () => ({
|
|
11717
11727
|
}
|
11718
11728
|
try {
|
11719
11729
|
s.store.setIsDeletingRequesting(s.formID, !0);
|
11720
|
-
let
|
11721
|
-
if (((ie = s.varButtonDelete.value) == null ? void 0 : ie.del_param_clm) !== "__kg__new_delete_param" && (
|
11730
|
+
let ye = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), Ce = ref((se = o.selectedRows.value) != null ? se : []);
|
11731
|
+
if (((ie = s.varButtonDelete.value) == null ? void 0 : ie.del_param_clm) !== "__kg__new_delete_param" && (ye = ref({
|
11722
11732
|
ids: (ne = (de = o.selectedRows.value) == null ? void 0 : de.map((Ie) => {
|
11723
|
-
var
|
11724
|
-
return (
|
11733
|
+
var Te, ke, Ae;
|
11734
|
+
return (Ae = Ie[(ke = (Te = s.varButtonDelete.value) == null ? void 0 : Te.del_param_clm) != null ? ke : "id"]) != null ? Ae : "";
|
11725
11735
|
})) != null ? ne : []
|
11726
|
-
}),
|
11736
|
+
}), Ce = ref({})), await i.store.emit(s.formID, "beforeRequest", {
|
11727
11737
|
isCreating: s.isCreating.value,
|
11728
11738
|
isUpdating: s.isUpdating.value,
|
11729
11739
|
isCopying: s.isCopying.value,
|
@@ -11731,18 +11741,18 @@ const getProps$p = () => ({
|
|
11731
11741
|
row: o.selectedFirstRow.value,
|
11732
11742
|
rows: o.selectedRows.value,
|
11733
11743
|
model: i.model,
|
11734
|
-
params:
|
11735
|
-
data:
|
11744
|
+
params: ye,
|
11745
|
+
data: Ce
|
11736
11746
|
}))
|
11737
11747
|
return;
|
11738
11748
|
await httpClient().request({
|
11739
11749
|
method: (pe = (ge = s.varButtonDelete.value) == null ? void 0 : ge.cmd_method) != null ? pe : "DELETE",
|
11740
11750
|
url: G,
|
11741
|
-
params:
|
11742
|
-
data:
|
11751
|
+
params: ye.value,
|
11752
|
+
data: Ce.value
|
11743
11753
|
}, {
|
11744
11754
|
joinParamsToUrl: !0
|
11745
|
-
}), ((
|
11755
|
+
}), ((ve = s.varButtonDelete.value) == null ? void 0 : ve.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), await l.store.emit(s.formID, "deleteOk", {
|
11746
11756
|
button: s.varButtonDelete.value,
|
11747
11757
|
rows: o.selectedRows.value
|
11748
11758
|
}), await i.store.emit(s.formID, "ok", {
|
@@ -11753,20 +11763,20 @@ const getProps$p = () => ({
|
|
11753
11763
|
row: o.selectedFirstRow.value,
|
11754
11764
|
model: i.model
|
11755
11765
|
}), s.store.setIsDeleting(s.formID, !1), c.search(!0);
|
11756
|
-
} catch (
|
11757
|
-
console.error(
|
11766
|
+
} catch (ye) {
|
11767
|
+
console.error(ye), i.store.emit(s.formID, "error", ye);
|
11758
11768
|
} finally {
|
11759
11769
|
s.store.setIsDeletingRequesting(s.formID, !1);
|
11760
11770
|
}
|
11761
11771
|
}
|
11762
|
-
function
|
11772
|
+
function be(G) {
|
11763
11773
|
var Z, re;
|
11764
|
-
const
|
11765
|
-
return isFunction$2(
|
11774
|
+
const W = (re = (Z = a == null ? void 0 : a.KgSubmit) == null ? void 0 : Z["KgForm.Item"]) == null ? void 0 : re[G.var_nam];
|
11775
|
+
return isFunction$2(W) ? createVNode(KgForm.Item, {
|
11766
11776
|
kgVarName: G.var_nam,
|
11767
11777
|
kgContext: KG_FORM_CONTEXT.SUBMIT,
|
11768
11778
|
kgRules: i.rules.value[G.var_nam],
|
11769
|
-
onKgSubmit:
|
11779
|
+
onKgSubmit: ee
|
11770
11780
|
}, {
|
11771
11781
|
control: ({
|
11772
11782
|
frm_id: se,
|
@@ -11775,25 +11785,25 @@ const getProps$p = () => ({
|
|
11775
11785
|
model: ne,
|
11776
11786
|
varVariableConfig: ge,
|
11777
11787
|
varProfileDetail: pe,
|
11778
|
-
varSubmitField:
|
11779
|
-
}) =>
|
11788
|
+
varSubmitField: ve
|
11789
|
+
}) => W({
|
11780
11790
|
frm_id: se,
|
11781
11791
|
varName: ie,
|
11782
11792
|
props: de,
|
11783
11793
|
model: ne,
|
11784
11794
|
varVariableConfig: ge,
|
11785
11795
|
varProfileDetail: pe,
|
11786
|
-
varSubmitField:
|
11796
|
+
varSubmitField: ve
|
11787
11797
|
})
|
11788
11798
|
}) : createVNode(KgForm.Item, {
|
11789
11799
|
kgVarName: G.var_nam,
|
11790
11800
|
kgContext: KG_FORM_CONTEXT.SUBMIT,
|
11791
11801
|
kgRules: i.rules.value[G.var_nam],
|
11792
|
-
onKgSubmit:
|
11802
|
+
onKgSubmit: ee
|
11793
11803
|
}, null);
|
11794
11804
|
}
|
11795
|
-
function
|
11796
|
-
let G,
|
11805
|
+
function he() {
|
11806
|
+
let G, W;
|
11797
11807
|
return createVNode(KgResizable, {
|
11798
11808
|
kgType: i.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL ? "right" : "left",
|
11799
11809
|
kgMinWidth: H.value,
|
@@ -11816,12 +11826,12 @@ const getProps$p = () => ({
|
|
11816
11826
|
ref: Y
|
11817
11827
|
}, [M.value.length > 0 && createVNode(Row, {
|
11818
11828
|
gutter: 12
|
11819
|
-
}, _isSlot$9(G = M.value.map(
|
11829
|
+
}, _isSlot$9(G = M.value.map(be)) ? G : {
|
11820
11830
|
default: () => [G]
|
11821
11831
|
}), L.value.length > 0 && B.value.length > 0 && createVNode(Divider, null, null), R.value.length > 0 && createVNode(Row, {
|
11822
11832
|
gutter: 12
|
11823
|
-
}, _isSlot$9(
|
11824
|
-
default: () => [
|
11833
|
+
}, _isSlot$9(W = R.value.map(be)) ? W : {
|
11834
|
+
default: () => [W]
|
11825
11835
|
}), u.value && createVNode("div", {
|
11826
11836
|
style: "text-align: center; padding: 6px 0 12px;"
|
11827
11837
|
}, [n.t("kg.confirmDelete")])])]
|
@@ -11829,13 +11839,13 @@ const getProps$p = () => ({
|
|
11829
11839
|
})]
|
11830
11840
|
});
|
11831
11841
|
}
|
11832
|
-
function
|
11833
|
-
let G,
|
11842
|
+
function Se() {
|
11843
|
+
let G, W;
|
11834
11844
|
return createVNode("div", null, [createVNode(Button, {
|
11835
11845
|
type: "primary",
|
11836
11846
|
ghost: !I.value,
|
11837
11847
|
disabled: I.value,
|
11838
|
-
onClick:
|
11848
|
+
onClick: z
|
11839
11849
|
}, _isSlot$9(G = n.t("kg.cancel")) ? G : {
|
11840
11850
|
default: () => [G]
|
11841
11851
|
}), createVNode(Button, {
|
@@ -11843,27 +11853,27 @@ const getProps$p = () => ({
|
|
11843
11853
|
disabled: V.value,
|
11844
11854
|
loading: $.value,
|
11845
11855
|
danger: !!s.isDeleting.value,
|
11846
|
-
onClick:
|
11847
|
-
}, _isSlot$9(
|
11848
|
-
default: () => [
|
11856
|
+
onClick: ee
|
11857
|
+
}, _isSlot$9(W = n.t(s.isDeleting.value ? "kg.delete" : "kg.save")) ? W : {
|
11858
|
+
default: () => [W]
|
11849
11859
|
})]);
|
11850
11860
|
}
|
11851
|
-
function
|
11861
|
+
function Ee() {
|
11852
11862
|
return createVNode("div", {
|
11853
|
-
title:
|
11854
|
-
}, [
|
11863
|
+
title: q.title.value
|
11864
|
+
}, [q.title.value]);
|
11855
11865
|
}
|
11856
11866
|
function Me() {
|
11857
11867
|
return createVNode(KgSubmitHeader, {
|
11858
|
-
isFullscreen:
|
11859
|
-
"onUpdate:isFullscreen": (G) =>
|
11868
|
+
isFullscreen: te.isFullscreen,
|
11869
|
+
"onUpdate:isFullscreen": (G) => te.isFullscreen = G,
|
11860
11870
|
kgShowFullscreenButton: !u.value,
|
11861
11871
|
kgShowConfigButton: !u.value && e.kgShowConfigButton,
|
11862
|
-
onKgCancel:
|
11872
|
+
onKgCancel: z
|
11863
11873
|
}, null);
|
11864
11874
|
}
|
11865
11875
|
return onUnmounted(async () => {
|
11866
|
-
await
|
11876
|
+
await Q();
|
11867
11877
|
}), () => createVNode(Drawer, {
|
11868
11878
|
visible: J.value,
|
11869
11879
|
placement: "right",
|
@@ -11872,13 +11882,13 @@ const getProps$p = () => ({
|
|
11872
11882
|
keyboard: !1,
|
11873
11883
|
destroyOnClose: !0,
|
11874
11884
|
width: X.value,
|
11875
|
-
class:
|
11885
|
+
class: ue.value,
|
11876
11886
|
"kg-frm_id": s.formID
|
11877
11887
|
}, {
|
11878
|
-
title:
|
11888
|
+
title: Ee,
|
11879
11889
|
extra: Me,
|
11880
|
-
default:
|
11881
|
-
footer:
|
11890
|
+
default: he,
|
11891
|
+
footer: Se
|
11882
11892
|
});
|
11883
11893
|
}
|
11884
11894
|
});
|
@@ -14002,23 +14012,23 @@ function _useColumns(e) {
|
|
14002
14012
|
return "right";
|
14003
14013
|
}
|
14004
14014
|
function R() {
|
14005
|
-
var K, F, Y,
|
14006
|
-
return !(C.ord_flg !== 1 || (F = (K = t == null ? void 0 : t.value) == null ? void 0 : K.KgTable) != null && F.kgDisabled || isNil((
|
14015
|
+
var K, F, Y, q;
|
14016
|
+
return !(C.ord_flg !== 1 || (F = (K = t == null ? void 0 : t.value) == null ? void 0 : K.KgTable) != null && F.kgDisabled || isNil((q = (Y = t == null ? void 0 : t.value) == null ? void 0 : Y.KgTable) == null ? void 0 : q.kgDisabled) && e.kgDisabled || r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value || y.length <= 0);
|
14007
14017
|
}
|
14008
14018
|
function B() {
|
14009
|
-
var K, F, Y,
|
14010
|
-
if (((F = (K = v.option.value.KgTable) == null ? void 0 : K.filter) == null ? void 0 : F.on) === !0 && C.filter_flag === 1 && !((
|
14011
|
-
return uniqBy(y.map((
|
14012
|
-
var
|
14019
|
+
var K, F, Y, q, X, J;
|
14020
|
+
if (((F = (K = v.option.value.KgTable) == null ? void 0 : K.filter) == null ? void 0 : F.on) === !0 && C.filter_flag === 1 && !((q = (Y = t == null ? void 0 : t.value) == null ? void 0 : Y.KgTable) != null && q.kgDisabled) && !(isNil((J = (X = t == null ? void 0 : t.value) == null ? void 0 : X.KgTable) == null ? void 0 : J.kgDisabled) && e.kgDisabled) && !(r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value) && !(y.length <= 0))
|
14021
|
+
return uniqBy(y.map((te) => {
|
14022
|
+
var ue;
|
14013
14023
|
return {
|
14014
|
-
value: (
|
14024
|
+
value: (ue = te == null ? void 0 : te[w]) != null ? ue : "",
|
14015
14025
|
text: l({
|
14016
14026
|
column: {
|
14017
14027
|
dataIndex: w
|
14018
14028
|
},
|
14019
14029
|
index: D,
|
14020
|
-
record:
|
14021
|
-
value:
|
14030
|
+
record: te,
|
14031
|
+
value: te == null ? void 0 : te[w]
|
14022
14032
|
}, KG_TABLE_CELL_CONTEXT.TABLE_FILTER)
|
14023
14033
|
};
|
14024
14034
|
}), "value");
|
@@ -14234,22 +14244,22 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14234
14244
|
setup: function(e) {
|
14235
14245
|
var ae;
|
14236
14246
|
const t = inject("$dayjs", dayjs), r = inject(DI_KG_VAR__KG_SLOTS, null), a = inject(DI_KG_VAR__KG_PROPS, null), n = useKg(), s = useKgVar(), l = useKgSearch(), o = useKgTable(), i = useKgSubmit();
|
14237
|
-
l.onSearch(async ({
|
14238
|
-
|
14239
|
-
})
|
14247
|
+
l.onSearch(async (N) => (K(N), !1)), l.onReset(async () => (p.value = {}, K({
|
14248
|
+
isSearchFirstPage: !0
|
14249
|
+
}), !1)), o.store.$onAction(async ({
|
14240
14250
|
name: N,
|
14241
14251
|
args: U
|
14242
14252
|
}) => {
|
14243
14253
|
switch (N) {
|
14244
14254
|
case "setRowSelect":
|
14245
14255
|
if (U[0] === s.formID) {
|
14246
|
-
const
|
14256
|
+
const Q = U[1], z = U[2], ee = Q[o.id.value];
|
14247
14257
|
switch (!0) {
|
14248
|
-
case (
|
14249
|
-
F([...$.value,
|
14258
|
+
case (z && !$.value.includes(ee)):
|
14259
|
+
F([...$.value, ee]);
|
14250
14260
|
break;
|
14251
|
-
case (!
|
14252
|
-
F(without$1($.value,
|
14261
|
+
case (!z && $.value.includes(ee)):
|
14262
|
+
F(without$1($.value, ee));
|
14253
14263
|
break;
|
14254
14264
|
}
|
14255
14265
|
}
|
@@ -14277,31 +14287,31 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14277
14287
|
var N, U;
|
14278
14288
|
return (U = (N = s.varButtonSearch.value) == null ? void 0 : N.cmd) != null ? U : null;
|
14279
14289
|
}), k = computed(() => {
|
14280
|
-
var U,
|
14290
|
+
var U, Q, z, ee, ce, le, oe, me, be;
|
14281
14291
|
let N = {
|
14282
14292
|
pageNo: I.pageIndex,
|
14283
14293
|
pageSize: I.pageSize,
|
14284
|
-
column: (
|
14294
|
+
column: (Q = (U = p.value) == null ? void 0 : U.field) != null ? Q : void 0,
|
14285
14295
|
order: p.value.order === "ascend" ? "asc" : p.value.order === "descend" ? "desc" : void 0,
|
14286
|
-
...(
|
14296
|
+
...(ee = (z = l.model) == null ? void 0 : z.value) != null ? ee : {}
|
14287
14297
|
};
|
14288
14298
|
return s.varButtonSearch.value && (N = {
|
14289
14299
|
...N,
|
14290
|
-
...KgVarUtil.parseCommandParameter((
|
14291
|
-
}), (
|
14300
|
+
...KgVarUtil.parseCommandParameter((le = (ce = s.varButtonSearch.value) == null ? void 0 : ce.cmd_prm) != null ? le : "")
|
14301
|
+
}), (oe = s.varGridConfig.value) != null && oe.cmd_prm && (N = {
|
14292
14302
|
...N,
|
14293
|
-
...KgVarUtil.parseCommandParameter((
|
14294
|
-
}), ((
|
14303
|
+
...KgVarUtil.parseCommandParameter((me = s.varGridConfig.value.cmd_prm) != null ? me : "")
|
14304
|
+
}), ((be = s.varGridConfig.value) == null ? void 0 : be.convert_sort_field_to_under_score_flg) === 1 && N.column && (N.column = snakeCase$1(N.column)), N;
|
14295
14305
|
}), A = computed(() => {
|
14296
|
-
var N, U,
|
14306
|
+
var N, U, Q, z;
|
14297
14307
|
if (!isNil((U = (N = a == null ? void 0 : a.value) == null ? void 0 : N.KgTable) == null ? void 0 : U.kgDisabled))
|
14298
|
-
return (
|
14308
|
+
return (z = (Q = a == null ? void 0 : a.value) == null ? void 0 : Q.KgTable) == null ? void 0 : z.kgDisabled;
|
14299
14309
|
if (!isNil(e.kgDisabled))
|
14300
14310
|
return e.kgDisabled;
|
14301
14311
|
}), C = computed(() => {
|
14302
|
-
var N, U,
|
14312
|
+
var N, U, Q, z;
|
14303
14313
|
if (!isNil((U = (N = a == null ? void 0 : a.value) == null ? void 0 : N.KgTable) == null ? void 0 : U.kgCheckboxDisabled))
|
14304
|
-
return (
|
14314
|
+
return (z = (Q = a == null ? void 0 : a.value) == null ? void 0 : Q.KgTable) == null ? void 0 : z.kgCheckboxDisabled;
|
14305
14315
|
if (!isNil(e.kgCheckboxDisabled))
|
14306
14316
|
return e.kgCheckboxDisabled;
|
14307
14317
|
}), D = computed(() => !!A.value || y.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value), w = computed(() => !!A.value || y.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value || I.total === 0), O = computed(() => {
|
@@ -14357,8 +14367,10 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14357
14367
|
});
|
14358
14368
|
watch(o.pageSizeOptions, (N) => {
|
14359
14369
|
N.length > 0 && !N.includes(I.pageSize) && (I.pageSize = o.pageSizeOption.value);
|
14360
|
-
}), watch([T, o.isReadAutomatically, l.isReady], ([N, U,
|
14361
|
-
N && U &&
|
14370
|
+
}), watch([T, o.isReadAutomatically, l.isReady], ([N, U, Q]) => {
|
14371
|
+
N && U && Q && !o.store.getIsRetrieved(s.formID) && K({
|
14372
|
+
isSearchFirstPage: !0
|
14373
|
+
});
|
14362
14374
|
}, {
|
14363
14375
|
immediate: !0
|
14364
14376
|
}), watch(s.isCreating, (N, U) => {
|
@@ -14379,7 +14391,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14379
14391
|
N && (o.store.setDatas(s.formID, without$1(b.value, N)), o.store.setSelectedRows(s.formID, []));
|
14380
14392
|
}
|
14381
14393
|
function H(N, U) {
|
14382
|
-
var
|
14394
|
+
var Q;
|
14383
14395
|
if (!(!!A.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value) && !!L.value) {
|
14384
14396
|
if (!U) {
|
14385
14397
|
o.store.setSelectedRows(s.formID, []);
|
@@ -14387,7 +14399,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14387
14399
|
}
|
14388
14400
|
switch (N == null ? void 0 : N.detail) {
|
14389
14401
|
case 1:
|
14390
|
-
switch ((
|
14402
|
+
switch ((Q = s.varGridConfig.value) == null ? void 0 : Q.operation_on_row_click) {
|
14391
14403
|
case 0:
|
14392
14404
|
break;
|
14393
14405
|
case 1:
|
@@ -14403,58 +14415,66 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14403
14415
|
}
|
14404
14416
|
}
|
14405
14417
|
}
|
14406
|
-
function K(N =
|
14407
|
-
KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u6267\u884C\u5F00\u59CB
|
14408
|
-
|
14409
|
-
|
14418
|
+
function K(N = {}) {
|
14419
|
+
KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u6267\u884C\u5F00\u59CB.`, {
|
14420
|
+
param: N
|
14421
|
+
});
|
14422
|
+
const U = watch(o.isReady, (z) => {
|
14423
|
+
z && (setTimeout(() => U()), Q());
|
14410
14424
|
}, {
|
14411
14425
|
immediate: !0
|
14412
14426
|
});
|
14413
|
-
async function
|
14414
|
-
var
|
14427
|
+
async function Q() {
|
14428
|
+
var z, ee;
|
14415
14429
|
if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u6267\u884C\u5F00\u59CB.`), !T.value) {
|
14416
14430
|
KgLogger.error(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6309\u94AE\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.`, {
|
14417
14431
|
VarButton: s.varButtonSearch.value
|
14418
14432
|
});
|
14419
14433
|
return;
|
14420
14434
|
}
|
14421
|
-
N && (I.pageIndex = 1), o.store.setIsRetrieving(s.formID, !0);
|
14435
|
+
N.isSearchFirstPage && (I.pageIndex = 1), o.store.setIsRetrieving(s.formID, !0);
|
14422
14436
|
try {
|
14423
|
-
const
|
14437
|
+
const ce = KgUtil.parseParams(k.value, o.profileFormID.value, t), le = ref({});
|
14424
14438
|
await o.store.emit(s.formID, "beforeRetrieve", {
|
14425
|
-
params:
|
14426
|
-
response:
|
14427
|
-
}) || (
|
14439
|
+
params: ce,
|
14440
|
+
response: le
|
14441
|
+
}) || (le.value = await httpClient().request({
|
14428
14442
|
method: "GET",
|
14429
14443
|
url: T.value,
|
14430
|
-
params:
|
14444
|
+
params: ce,
|
14431
14445
|
headers: {
|
14432
|
-
[KG_HEADERS.DYNAMIC_QUERY]: ((
|
14446
|
+
[KG_HEADERS.DYNAMIC_QUERY]: ((z = s.currentVarProfileMaster.value) == null ? void 0 : z.dyn_flg) === 1
|
14433
14447
|
}
|
14434
14448
|
}, {
|
14435
14449
|
successMessageMode: "none"
|
14436
14450
|
}), KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6210\u529F.`, {
|
14437
|
-
params:
|
14451
|
+
params: ce,
|
14452
|
+
response: le.value
|
14438
14453
|
}));
|
14439
14454
|
const {
|
14440
|
-
datas:
|
14441
|
-
total:
|
14442
|
-
} = E(
|
14455
|
+
datas: oe,
|
14456
|
+
total: me
|
14457
|
+
} = E(le);
|
14443
14458
|
await o.store.emit(s.formID, "beforeSetDatas", {
|
14444
|
-
datas:
|
14445
|
-
total:
|
14446
|
-
setDatas(
|
14447
|
-
o.store.setDatas(s.formID,
|
14459
|
+
datas: oe,
|
14460
|
+
total: me,
|
14461
|
+
setDatas(he) {
|
14462
|
+
o.store.setDatas(s.formID, he);
|
14448
14463
|
}
|
14449
|
-
}), d.value = {}, o.store.setDatas(s.formID,
|
14450
|
-
|
14451
|
-
|
14452
|
-
|
14453
|
-
|
14464
|
+
}), d.value = {}, o.store.setDatas(s.formID, oe.value), I.total = me.value;
|
14465
|
+
const be = cloneDeep($.value);
|
14466
|
+
H(), c.value = [], await nextTick(), N.isPreserveSelectedRows ? o.store.setSelectedRows(s.formID, be.map((he) => {
|
14467
|
+
var Se;
|
14468
|
+
return (Se = oe.value) == null ? void 0 : Se.find((Ee) => Ee[o.id.value] === he);
|
14469
|
+
}).filter((he) => !!he)) : ((ee = s.varGridConfig.value) == null ? void 0 : ee.check_first_row_after_retrieve) === 1 && oe.value.length > 0 && o.store.setSelectedRows(s.formID, [oe.value[0]]), await o.store.emit(s.formID, "retrieve", {
|
14470
|
+
page: le.value,
|
14471
|
+
datas: oe,
|
14472
|
+
setDatas(he) {
|
14473
|
+
o.store.setDatas(s.formID, he);
|
14454
14474
|
}
|
14455
14475
|
}), o.store.setIsRetrieved(s.formID, !0);
|
14456
|
-
} catch (
|
14457
|
-
throw
|
14476
|
+
} catch (ce) {
|
14477
|
+
throw ce;
|
14458
14478
|
} finally {
|
14459
14479
|
o.store.setIsRetrieving(s.formID, !1);
|
14460
14480
|
}
|
@@ -14462,38 +14482,40 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14462
14482
|
}
|
14463
14483
|
function F(N) {
|
14464
14484
|
o.store.setSelectedRows(s.formID, N.map((U) => {
|
14465
|
-
var
|
14466
|
-
return (
|
14485
|
+
var Q;
|
14486
|
+
return (Q = b.value) == null ? void 0 : Q.find((z) => z[o.id.value] === U);
|
14467
14487
|
}).filter((U) => !!U));
|
14468
14488
|
}
|
14469
14489
|
function Y(N) {
|
14470
|
-
var U,
|
14490
|
+
var U, Q;
|
14471
14491
|
switch (o.isMultiSelect.value) {
|
14472
14492
|
case !0:
|
14473
14493
|
{
|
14474
|
-
const
|
14475
|
-
$.value.includes(
|
14494
|
+
const z = N[o.id.value];
|
14495
|
+
$.value.includes(z) ? $.value = without$1($.value, z) : $.value = [...(U = $.value) != null ? U : [], z];
|
14476
14496
|
}
|
14477
14497
|
break;
|
14478
14498
|
case !1:
|
14479
14499
|
{
|
14480
|
-
const
|
14481
|
-
(
|
14500
|
+
const z = N[o.id.value];
|
14501
|
+
(Q = $.value) != null && Q.includes(z) ? $.value = [] : $.value = [z];
|
14482
14502
|
}
|
14483
14503
|
break;
|
14484
14504
|
}
|
14485
|
-
o.store.setSelectedRows(s.formID, $.value.map((
|
14486
|
-
var
|
14487
|
-
return (
|
14488
|
-
}).filter((
|
14505
|
+
o.store.setSelectedRows(s.formID, $.value.map((z) => {
|
14506
|
+
var ee;
|
14507
|
+
return (ee = b.value) == null ? void 0 : ee.find((ce) => ce[o.id.value] === z);
|
14508
|
+
}).filter((z) => !!z));
|
14489
14509
|
}
|
14490
|
-
function
|
14510
|
+
function q(N, U) {
|
14491
14511
|
U.width = N, s.store.setVarGridDetailWidth(s.formID, U.dataIndex, N);
|
14492
14512
|
}
|
14493
|
-
async function X(N, U,
|
14494
|
-
switch (
|
14513
|
+
async function X(N, U, Q, z) {
|
14514
|
+
switch (z.action) {
|
14495
14515
|
case "sort": {
|
14496
|
-
p.value =
|
14516
|
+
p.value = Q, await nextTick(), K({
|
14517
|
+
isSearchFirstPage: !0
|
14518
|
+
});
|
14497
14519
|
break;
|
14498
14520
|
}
|
14499
14521
|
case "filter":
|
@@ -14501,21 +14523,21 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14501
14523
|
}
|
14502
14524
|
}
|
14503
14525
|
function J(N, U) {
|
14504
|
-
var
|
14505
|
-
const
|
14506
|
-
switch ((
|
14526
|
+
var z;
|
14527
|
+
const Q = U[o.id.value];
|
14528
|
+
switch ((z = s.varGridConfig.value) == null ? void 0 : z.expand_accordion_flg) {
|
14507
14529
|
case 0:
|
14508
|
-
N ? c.value = uniq([...c.value,
|
14530
|
+
N ? c.value = uniq([...c.value, Q]) : c.value = without$1(c.value, Q);
|
14509
14531
|
break;
|
14510
14532
|
default:
|
14511
|
-
N ? c.value = [
|
14533
|
+
N ? c.value = [Q] : c.value = [];
|
14512
14534
|
break;
|
14513
14535
|
}
|
14514
14536
|
}
|
14515
|
-
function
|
14537
|
+
function te(N, U) {
|
14516
14538
|
U !== I.pageSize ? (I.pageIndex = 1, I.pageSize = U) : I.pageIndex = N, K();
|
14517
14539
|
}
|
14518
|
-
function
|
14540
|
+
function ue({
|
14519
14541
|
title: N,
|
14520
14542
|
column: U
|
14521
14543
|
}) {
|
@@ -14540,19 +14562,19 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14540
14562
|
index: 0
|
14541
14563
|
}, null), M.value && createVNode(TableSummary.Cell, {
|
14542
14564
|
index: O.value ? 1 : 0
|
14543
|
-
}, null), u.value.map((U,
|
14544
|
-
const
|
14545
|
-
let
|
14546
|
-
return O.value && M.value ?
|
14547
|
-
index:
|
14548
|
-
align:
|
14565
|
+
}, null), u.value.map((U, Q) => {
|
14566
|
+
const z = String(U.dataIndex), ee = z ? s.store.getVarGridDetail(s.formID, z) : null, ce = (() => ["left", "center", "right"].includes((ee == null ? void 0 : ee.align) || "") ? ee == null ? void 0 : ee.align : "left")();
|
14567
|
+
let le = Q;
|
14568
|
+
return O.value && M.value ? le += 2 : (O.value || M.value) && (le += 1), createVNode(TableSummary.Cell, {
|
14569
|
+
index: le,
|
14570
|
+
align: ce
|
14549
14571
|
}, {
|
14550
14572
|
default: () => {
|
14551
|
-
var
|
14552
|
-
return [(
|
14573
|
+
var oe, me;
|
14574
|
+
return [(me = (oe = r == null ? void 0 : r.KgTable) == null ? void 0 : oe["summary.bodyCell"]) == null ? void 0 : me.call(oe, {
|
14553
14575
|
column: U,
|
14554
|
-
index:
|
14555
|
-
varGridDetail:
|
14576
|
+
index: le,
|
14577
|
+
varGridDetail: ee
|
14556
14578
|
})];
|
14557
14579
|
}
|
14558
14580
|
});
|
@@ -14564,7 +14586,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14564
14586
|
return !o.isReadAutomatically.value && !o.store.getIsRetrieved(s.formID) ? n.t("kg.KgTable.emptyText") : n.t("kg.emptyText");
|
14565
14587
|
}
|
14566
14588
|
return () => {
|
14567
|
-
var N, U,
|
14589
|
+
var N, U, Q;
|
14568
14590
|
return createVNode("div", {
|
14569
14591
|
class: R.value,
|
14570
14592
|
"kg-frm_id": s.formID,
|
@@ -14586,17 +14608,17 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14586
14608
|
expandColumnWidth: 28,
|
14587
14609
|
expandedRowKeys: c.value,
|
14588
14610
|
rowSelection: L.value,
|
14589
|
-
customRow: (
|
14590
|
-
onClick: (
|
14611
|
+
customRow: (z) => ({
|
14612
|
+
onClick: (ee) => H(ee, z)
|
14591
14613
|
}),
|
14592
|
-
onResizeColumn:
|
14614
|
+
onResizeColumn: q,
|
14593
14615
|
onChange: X,
|
14594
14616
|
onExpand: J
|
14595
14617
|
}, {
|
14596
|
-
headerCell:
|
14618
|
+
headerCell: ue,
|
14597
14619
|
bodyCell: g,
|
14598
14620
|
emptyText: fe,
|
14599
|
-
expandedRowRender: (
|
14621
|
+
expandedRowRender: (Q = r == null ? void 0 : r.KgTable) == null ? void 0 : Q.expandedRowRender,
|
14600
14622
|
summary: _e
|
14601
14623
|
}), (o.isShowBottomLeft.value || o.isShowBottomRight.value) && createVNode("div", {
|
14602
14624
|
class: B.value
|
@@ -14614,7 +14636,7 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14614
14636
|
size: "default",
|
14615
14637
|
current: I.pageIndex,
|
14616
14638
|
pageSize: I.pageSize,
|
14617
|
-
pageSizeOptions: o.pageSizeOptions.value.map((
|
14639
|
+
pageSizeOptions: o.pageSizeOptions.value.map((z) => String(z)),
|
14618
14640
|
total: I.total,
|
14619
14641
|
showSizeChanger: !0,
|
14620
14642
|
showQuickJumper: !1,
|
@@ -14623,12 +14645,12 @@ const KgTable$1 = "", getProps$g = () => ({
|
|
14623
14645
|
locale: {
|
14624
14646
|
page: ""
|
14625
14647
|
},
|
14626
|
-
showTotal: (
|
14627
|
-
from:
|
14628
|
-
to:
|
14629
|
-
total:
|
14648
|
+
showTotal: (z, ee) => n.t("kg.KgTable.totalText", {
|
14649
|
+
from: ee[0],
|
14650
|
+
to: ee[1],
|
14651
|
+
total: z
|
14630
14652
|
}),
|
14631
|
-
onChange: (
|
14653
|
+
onChange: (z, ee) => te(z, ee)
|
14632
14654
|
}, null)])])]);
|
14633
14655
|
};
|
14634
14656
|
}
|
@@ -15815,7 +15837,7 @@ function useKgSearch(e) {
|
|
15815
15837
|
KgLogger.error(`${t.formID} | useKgSearch | search() | \u67E5\u8BE2\u51FD\u6570\u4E3A\u7A7A.`);
|
15816
15838
|
return;
|
15817
15839
|
}
|
15818
|
-
d(i);
|
15840
|
+
typeof i == "boolean" ? (KgLogger.deprecated(`${t.formID} | useKgSearch | search() | \u65E7\u7684\u53C2\u6570\u683C\u5F0F\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u65B0\u7684\u53C2\u6570\u683C\u5F0F.`), d({ isSearchFirstPage: i })) : d(i);
|
15819
15841
|
}
|
15820
15842
|
},
|
15821
15843
|
{ immediate: !0 }
|
@@ -16492,9 +16514,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16492
16514
|
});
|
16493
16515
|
_useLayoutHeaderResizeObserver();
|
16494
16516
|
const g = _useFormModel(v, y, _), b = computed(() => {
|
16495
|
-
var K, F, Y,
|
16517
|
+
var K, F, Y, q;
|
16496
16518
|
if (!isNil((F = (K = r == null ? void 0 : r.value) == null ? void 0 : K.KgSearch) == null ? void 0 : F.kgDisabled))
|
16497
|
-
return (
|
16519
|
+
return (q = (Y = r == null ? void 0 : r.value) == null ? void 0 : Y.KgSearch) == null ? void 0 : q.kgDisabled;
|
16498
16520
|
if (!isNil(e.kgDisabled))
|
16499
16521
|
return e.kgDisabled;
|
16500
16522
|
}), E = computed(() => {
|
@@ -16520,22 +16542,27 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16520
16542
|
let K = "kg-search";
|
16521
16543
|
return o.value && (K += " kg-search--visible"), c.value && (K += " kg-search--teleport"), K;
|
16522
16544
|
});
|
16523
|
-
async function R(K =
|
16524
|
-
|
16525
|
-
|
16545
|
+
async function R(K = {}) {
|
16546
|
+
var F, Y;
|
16547
|
+
if (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6267\u884C\u5F00\u59CB.`), l.isRetrieving.value) {
|
16548
|
+
KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6B63\u5728\u67E5\u8BE2.`);
|
16549
|
+
return;
|
16550
|
+
}
|
16551
|
+
if (((F = n.varButtonSearch.value) == null ? void 0 : F.permission_type) === 2 && !a.p((Y = n.varButtonSearch.value) == null ? void 0 : Y.permission_code)) {
|
16552
|
+
KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6CA1\u6709\u6743\u9650.`);
|
16553
|
+
return;
|
16554
|
+
}
|
16555
|
+
if (n.isCreating.value || n.isUpdating.value || n.isCopying.value || n.isDeleting.value) {
|
16556
|
+
KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6B63\u5728\u521B\u5EFA/\u66F4\u65B0/\u590D\u5236/\u5220\u9664.`);
|
16526
16557
|
return;
|
16527
16558
|
}
|
16528
16559
|
o.value ? (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u663E\u793A\u67E5\u8BE2\u6761\u4EF6\u7EC4\u4EF6.`), y.value && y.value.validate().then(async () => {
|
16529
|
-
await s.store.emit(n.formID, "search",
|
16530
|
-
|
16531
|
-
});
|
16532
|
-
}).catch((F) => {
|
16560
|
+
await s.store.emit(n.formID, "search", K);
|
16561
|
+
}).catch((q) => {
|
16533
16562
|
KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u8868\u5355\u9A8C\u8BC1\u5931\u8D25.`, {
|
16534
|
-
e:
|
16563
|
+
e: q
|
16535
16564
|
});
|
16536
|
-
})) : (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u9690\u85CF\u67E5\u8BE2\u6761\u4EF6\u7EC4\u4EF6.`), await s.store.emit(n.formID, "search",
|
16537
|
-
resetPageIndex: K
|
16538
|
-
}));
|
16565
|
+
})) : (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u9690\u85CF\u67E5\u8BE2\u6761\u4EF6\u7EC4\u4EF6.`), await s.store.emit(n.formID, "search", K));
|
16539
16566
|
}
|
16540
16567
|
s.store.setSearchFn(n.formID, R);
|
16541
16568
|
async function B() {
|
@@ -16549,7 +16576,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16549
16576
|
}
|
16550
16577
|
s.store.setResetFn(n.formID, B);
|
16551
16578
|
function $() {
|
16552
|
-
return R(
|
16579
|
+
return R({
|
16580
|
+
isSearchFirstPage: !0
|
16581
|
+
}), Promise.resolve(!0);
|
16553
16582
|
}
|
16554
16583
|
function I() {
|
16555
16584
|
var K;
|
@@ -16564,19 +16593,19 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16564
16593
|
}, [t.KgSearch.left()]), C.value ? createVNode(CaretUpOutlined$1, null, null) : createVNode(CaretDownOutlined$1, null, null), createVNode("span", null, [a.t("kg.KgSearch.title")])]);
|
16565
16594
|
}
|
16566
16595
|
function V() {
|
16567
|
-
var K, F, Y,
|
16596
|
+
var K, F, Y, q;
|
16568
16597
|
return ((Y = (F = (K = n.varProfileMasters) == null ? void 0 : K.value) == null ? void 0 : F.length) != null ? Y : 0) === 0 ? null : createVNode(Fragment, null, [createVNode(Select, {
|
16569
|
-
value: (
|
16598
|
+
value: (q = n.currentVarProfileMasterID.value) != null ? q : void 0,
|
16570
16599
|
"onUpdate:value": (X) => n.store.setCurrentVarProfileMasterID(n.formID, X),
|
16571
16600
|
disabled: T.value,
|
16572
16601
|
class: "kg-search-profile-master-select"
|
16573
16602
|
}, {
|
16574
16603
|
default: () => {
|
16575
16604
|
var X, J;
|
16576
|
-
return (J = (X = n.varProfileMasters) == null ? void 0 : X.value) == null ? void 0 : J.map((
|
16577
|
-
value:
|
16605
|
+
return (J = (X = n.varProfileMasters) == null ? void 0 : X.value) == null ? void 0 : J.map((te) => createVNode(Select.Option, {
|
16606
|
+
value: te.id
|
16578
16607
|
}, {
|
16579
|
-
default: () => [n.t(
|
16608
|
+
default: () => [n.t(te == null ? void 0 : te.prf_var_nam).value]
|
16580
16609
|
}));
|
16581
16610
|
},
|
16582
16611
|
suffixIcon: () => createVNode(CaretDownOutlined$1, {
|
@@ -16597,7 +16626,7 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16597
16626
|
}, null)]);
|
16598
16627
|
}
|
16599
16628
|
function P() {
|
16600
|
-
var K, F, Y,
|
16629
|
+
var K, F, Y, q, X;
|
16601
16630
|
return createVNode(Fragment, null, [V(), !(((K = n.varButtonSearch.value) == null ? void 0 : K.permission_type) !== 2 && !a.p((F = n.varButtonSearch.value) == null ? void 0 : F.permission_code)) && createVNode(Button, {
|
16602
16631
|
type: "primary",
|
16603
16632
|
ghost: !E.value,
|
@@ -16609,7 +16638,7 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16609
16638
|
}), createVNode(KgButton.Item, {
|
16610
16639
|
kgType: KG_BUTTON_TYPE.SEARCH,
|
16611
16640
|
kgVarName: (Y = n.varButtonSearch.value) == null ? void 0 : Y.var_nam,
|
16612
|
-
kgIcon: (
|
16641
|
+
kgIcon: (q = n.varButtonSearch.value) == null ? void 0 : q.icon,
|
16613
16642
|
kgText: D.value,
|
16614
16643
|
kgColor: (X = n.varButtonSearch.value) == null ? void 0 : X.color,
|
16615
16644
|
kgPrimary: w.value,
|
@@ -16636,7 +16665,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
|
|
16636
16665
|
key: Y.var_nam,
|
16637
16666
|
kgVarName: Y.var_nam,
|
16638
16667
|
kgContext: KG_FORM_CONTEXT.SEARCH,
|
16639
|
-
onKgSubmit: () => R(
|
16668
|
+
onKgSubmit: () => R({
|
16669
|
+
isSearchFirstPage: !0
|
16670
|
+
})
|
16640
16671
|
}, null))];
|
16641
16672
|
}
|
16642
16673
|
})]
|