@kengic/vue 0.13.10 → 0.14.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +26 -7
- package/dist/src/apis/WMS/Controllers/WhController/ListVO.d.ts +1 -1
- package/dist/src/apis/WMS/models.d.ts +4 -4
- package/dist/src/components/KgAppSelect/index.store.d.ts +9 -1
- package/dist/src/config/index.store.d.ts +5 -0
- package/dist/src/config/setup.d.ts +4 -2
- package/dist/src/utils/auth.util.d.ts +8 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/kengic-vue.js
CHANGED
@@ -39,7 +39,7 @@ const index$7 = "", en = {
|
|
39
39
|
"LT-desc": "Less Than",
|
40
40
|
LTE: "\u2A7D",
|
41
41
|
"LTE-desc": "Less Than Or Equal",
|
42
|
-
NE: "
|
42
|
+
NE: "!=",
|
43
43
|
"NE-desc": "Not Equal",
|
44
44
|
START_WITH: "S%",
|
45
45
|
"START_WITH-desc": "Start With",
|
@@ -231,7 +231,7 @@ const index$7 = "", en = {
|
|
231
231
|
"LT-desc": "\u5C0F\u4E8E",
|
232
232
|
LTE: "\u2A7D",
|
233
233
|
"LTE-desc": "\u5C0F\u4E8E\u7B49\u4E8E",
|
234
|
-
NE: "
|
234
|
+
NE: "!=",
|
235
235
|
"NE-desc": "\u4E0D\u7B49\u4E8E",
|
236
236
|
START_WITH: "S%",
|
237
237
|
"START_WITH-desc": "\u4EE5...\u5F00\u5934",
|
@@ -393,6 +393,11 @@ var KG_APP_PREFIX = /* @__PURE__ */ ((e) => (e.WMS_DATA_MANAGER = "/wms/data-man
|
|
393
393
|
const KG_APP_PREFIXS = ["/wms/data-manager", "/wms/business-manager", "/wcs", "/sys"];
|
394
394
|
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_HTTP_HEADERS = /* @__PURE__ */ ((e) => (e.KG_DYNAMIC_QUERY = "Kg-Dynamic-Query", e.KG_QUERY_SQL = "Kg-Query-Sql", e.KG_QUERY_WHERE_SQL = "Kg-Query-Where-Sql", e.KG_QUERY_ORDER_BY_SQL = "Kg-Query-Order-By-Sql", e))(KG_HTTP_HEADERS || {});
|
395
395
|
const __KG__RESPONSE__ = "__KG__RESPONSE__";
|
396
|
+
class KgAuthUtil {
|
397
|
+
static isAppAuthenticated(t) {
|
398
|
+
return t, !1;
|
399
|
+
}
|
400
|
+
}
|
396
401
|
class KgDomUtil {
|
397
402
|
static isNotClickable(t, r = []) {
|
398
403
|
return !t || [...r, "kg-not-clickable"].some((a) => t.classList.contains(a)) ? !0 : t.parentElement && t.parentElement.tagName !== "BODY" ? KgDomUtil.isNotClickable(t.parentElement) : !1;
|
@@ -4872,7 +4877,7 @@ const emptyIcon = {
|
|
4872
4877
|
...t.data
|
4873
4878
|
}, r);
|
4874
4879
|
}
|
4875
|
-
}), name = "@kengic/vue", version = "0.
|
4880
|
+
}), name = "@kengic/vue", version = "0.14.0-beta.0", data$1 = {
|
4876
4881
|
width: 24,
|
4877
4882
|
height: 24,
|
4878
4883
|
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"/>'
|
@@ -5170,6 +5175,7 @@ const useKgStore = (e) => (store$9 || (store$9 = defineStore("Kg", {
|
|
5170
5175
|
pFunction: null,
|
5171
5176
|
router: null,
|
5172
5177
|
useUserStore: null,
|
5178
|
+
usePermissionStore: null,
|
5173
5179
|
option: {}
|
5174
5180
|
}),
|
5175
5181
|
getters: {
|
@@ -5182,6 +5188,9 @@ const useKgStore = (e) => (store$9 || (store$9 = defineStore("Kg", {
|
|
5182
5188
|
getUseUserStore() {
|
5183
5189
|
return this.useUserStore;
|
5184
5190
|
},
|
5191
|
+
getUsePermissionStore() {
|
5192
|
+
return this.usePermissionStore;
|
5193
|
+
},
|
5185
5194
|
getOption() {
|
5186
5195
|
var t;
|
5187
5196
|
return (t = this.option) != null ? t : {};
|
@@ -5197,6 +5206,9 @@ const useKgStore = (e) => (store$9 || (store$9 = defineStore("Kg", {
|
|
5197
5206
|
setUseUserStore(t) {
|
5198
5207
|
this.useUserStore = t;
|
5199
5208
|
},
|
5209
|
+
setUsePermissionStore(t) {
|
5210
|
+
this.usePermissionStore = t;
|
5211
|
+
},
|
5200
5212
|
setT(t) {
|
5201
5213
|
if (!this.locale) {
|
5202
5214
|
KgLogger.error("\u5F53\u524D\u8BED\u8A00\u4E3A\u7A7A.");
|
@@ -5304,7 +5316,7 @@ function setup(e) {
|
|
5304
5316
|
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.locale) || !(e != null && e.i18n) || !e.pFunction)
|
5305
5317
|
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.");
|
5306
5318
|
const t = useKg();
|
5307
|
-
t.store.setLocale(e.locale), t.store.setRouter(e.router), t.store.setUseUserStore(e.useUserStore), t.store.setT(e.i18n), t.store.setP(e.pFunction), t.store.setOption((r = e.option) != null ? r : {});
|
5319
|
+
t.store.setLocale(e.locale), t.store.setRouter(e.router), t.store.setUseUserStore(e.useUserStore), t.store.setUsePermissionStore(e.usePermissionStore), t.store.setT(e.i18n), t.store.setP(e.pFunction), t.store.setOption((r = e.option) != null ? r : {});
|
5308
5320
|
}
|
5309
5321
|
function onEventFactory(e, t, r) {
|
5310
5322
|
return (a, n) => {
|
@@ -11049,6 +11061,7 @@ class VarProfileDetail {
|
|
11049
11061
|
v(this, "dft_dyn_op");
|
11050
11062
|
v(this, "dft_val");
|
11051
11063
|
v(this, "ena_flg");
|
11064
|
+
v(this, "exclude_from_where_sql_flag");
|
11052
11065
|
v(this, "frm_id");
|
11053
11066
|
v(this, "grp_nam");
|
11054
11067
|
v(this, "id");
|
@@ -11056,7 +11069,6 @@ class VarProfileDetail {
|
|
11056
11069
|
v(this, "prf_var_nam");
|
11057
11070
|
v(this, "rqr_flg");
|
11058
11071
|
v(this, "srtseq");
|
11059
|
-
v(this, "table_alias");
|
11060
11072
|
v(this, "use_underscore_when_dynamic_query_flag");
|
11061
11073
|
v(this, "var_nam");
|
11062
11074
|
v(this, "vis_flg");
|
@@ -11066,6 +11078,7 @@ class VarProfileDetail {
|
|
11066
11078
|
case "dft_dyn_op":
|
11067
11079
|
case "dft_val":
|
11068
11080
|
case "ena_flg":
|
11081
|
+
case "exclude_from_where_sql_flag":
|
11069
11082
|
case "frm_id":
|
11070
11083
|
case "grp_nam":
|
11071
11084
|
case "id":
|
@@ -11073,7 +11086,6 @@ class VarProfileDetail {
|
|
11073
11086
|
case "prf_var_nam":
|
11074
11087
|
case "rqr_flg":
|
11075
11088
|
case "srtseq":
|
11076
|
-
case "table_alias":
|
11077
11089
|
case "use_underscore_when_dynamic_query_flag":
|
11078
11090
|
case "var_nam":
|
11079
11091
|
case "vis_flg":
|
@@ -17432,7 +17444,13 @@ class KgUtil {
|
|
17432
17444
|
});
|
17433
17445
|
let g = `WHERE (1 = 1)${reduce(
|
17434
17446
|
u,
|
17435
|
-
(y, p, _) =>
|
17447
|
+
(y, p, _) => {
|
17448
|
+
var b;
|
17449
|
+
if (l.includes(_))
|
17450
|
+
return y;
|
17451
|
+
const m = r ? (b = i == null ? void 0 : i.store) == null ? void 0 : b.getVarProfileDetail(r, _) : null;
|
17452
|
+
return (m == null ? void 0 : m.exclude_from_where_sql_flag) === 1 || !p ? y : y + p;
|
17453
|
+
},
|
17436
17454
|
""
|
17437
17455
|
)}`;
|
17438
17456
|
g = encodeURIComponent(g);
|
@@ -18324,6 +18342,7 @@ export {
|
|
18324
18342
|
KG_VAR_SUBMIT__LAYOUT,
|
18325
18343
|
KG_WIDTH_UNIT,
|
18326
18344
|
KgAppSelect,
|
18345
|
+
KgAuthUtil,
|
18327
18346
|
KgButton,
|
18328
18347
|
KgDomUtil,
|
18329
18348
|
KgForm,
|
@@ -391,6 +391,8 @@ export declare class VarProfileDetail {
|
|
391
391
|
dft_val?: string | null;
|
392
392
|
/** 是否启用(EnableFlag). */
|
393
393
|
ena_flg?: number | null;
|
394
|
+
/** 是否不拼接到 WHERE SQL 中. */
|
395
|
+
exclude_from_where_sql_flag?: number | null;
|
394
396
|
/** 界面标识(FormID). */
|
395
397
|
frm_id?: string | null;
|
396
398
|
/** 分组(GroupName). */
|
@@ -405,8 +407,6 @@ export declare class VarProfileDetail {
|
|
405
407
|
rqr_flg?: number | null;
|
406
408
|
/** 显示顺序(SortSequence). */
|
407
409
|
srtseq?: number | null;
|
408
|
-
/** 表的别名. */
|
409
|
-
table_alias?: string | null;
|
410
410
|
/** 高级查询时是否将字段转换为 underscore 命名方式. */
|
411
411
|
use_underscore_when_dynamic_query_flag?: number | null;
|
412
412
|
/** 变量名称(VariableName). */
|
@@ -669,7 +669,7 @@ export declare class VarVariableInput {
|
|
669
669
|
var_nam?: string | null;
|
670
670
|
constructor(obj?: VarVariableInput);
|
671
671
|
}
|
672
|
-
/**
|
672
|
+
/** 仓库数据传输对象 */
|
673
673
|
export declare class WhDTO {
|
674
674
|
/** 是否可用 */
|
675
675
|
activeFlg?: number | null;
|
@@ -693,7 +693,7 @@ export declare class WhDTO {
|
|
693
693
|
permCreLod?: string | null;
|
694
694
|
/** 永久创建箱 */
|
695
695
|
permCreSub?: string | null;
|
696
|
-
/**
|
696
|
+
/** 仓库名称 */
|
697
697
|
whDsc?: string | null;
|
698
698
|
/** 仓库编号 */
|
699
699
|
whId?: string | null;
|
@@ -40,11 +40,19 @@ export declare type IKgAppSelectStoreDefinition = StoreDefinition<'KgAppSelect',
|
|
40
40
|
gotoApp(app: KG_APP): Promise<void>;
|
41
41
|
/**
|
42
42
|
* 进入某个地址.
|
43
|
-
* 如果该地址不属于当前模块,
|
43
|
+
* 如果该地址不属于当前模块, 则先切换到对应的模块, 再进入该地址.
|
44
44
|
* @param path 要进入的地址.
|
45
45
|
*/
|
46
46
|
gotoPath(path: string): Promise<void>;
|
47
|
+
/**
|
48
|
+
* 判断某个菜单是否属于当前模块.
|
49
|
+
* @param menu 菜单.
|
50
|
+
*/
|
47
51
|
isMenuInCurrentApp(menu: Menu): boolean;
|
52
|
+
/**
|
53
|
+
* 初始化当前模块.
|
54
|
+
* 比如刷新页面时, 需要根据当前页面地址设置当前模块.
|
55
|
+
*/
|
48
56
|
init(): void;
|
49
57
|
}>;
|
50
58
|
export declare type IKgAppSelectStore = ReturnType<IKgAppSelectStoreDefinition>;
|
@@ -87,7 +87,10 @@ export interface IKgState {
|
|
87
87
|
/** 检查权限的方法. */
|
88
88
|
pFunction: P | null;
|
89
89
|
router: Router | null;
|
90
|
+
/** 用户数据. */
|
90
91
|
useUserStore: StoreDefinition | null;
|
92
|
+
/** 权限数据. */
|
93
|
+
usePermissionStore: StoreDefinition | null;
|
91
94
|
/** 配置参数. */
|
92
95
|
option: IKgStateOption;
|
93
96
|
}
|
@@ -96,12 +99,14 @@ export declare type IKgStoreDefinition = StoreDefinition<'Kg', IKgState, {
|
|
96
99
|
getLocale: ComputedRef<IKgLocale> | null;
|
97
100
|
getRouter: Router | null;
|
98
101
|
getUseUserStore(): StoreDefinition<any, any, any, any> | null;
|
102
|
+
getUsePermissionStore(): StoreDefinition<any, any, any, any> | null;
|
99
103
|
/** 获取配置参数. */
|
100
104
|
getOption: IKgStateOption;
|
101
105
|
}, {
|
102
106
|
setLocale(locale: ComputedRef<IKgLocale> | null): void;
|
103
107
|
setRouter(router: Router): void;
|
104
108
|
setUseUserStore(useUserStore: StoreDefinition<any, any, any, any>): void;
|
109
|
+
setUsePermissionStore(usePermissionStore: StoreDefinition<any, any, any, any>): void;
|
105
110
|
setT(i18n: any): void;
|
106
111
|
setP(fn: P): void;
|
107
112
|
setOption(option: IKgStateOption): void;
|
@@ -21,11 +21,13 @@ export declare type IKgOptions = {
|
|
21
21
|
* ReturnType<typeof createI18n>
|
22
22
|
*/
|
23
23
|
i18n: any;
|
24
|
-
/** 权限方法, 用来判断是否具有某个(某些)权限. */
|
25
|
-
pFunction: P;
|
26
24
|
router: Router;
|
27
25
|
/** 状态数据: 用户. */
|
28
26
|
useUserStore: StoreDefinition<any, any, any, any>;
|
27
|
+
/** 状态数据: 权限. */
|
28
|
+
usePermissionStore: StoreDefinition<any, any, any, any>;
|
29
|
+
/** 权限方法, 用来判断是否具有某个(某些)权限. */
|
30
|
+
pFunction: P;
|
29
31
|
/** 配置参数. */
|
30
32
|
option?: IKgStateOption;
|
31
33
|
};
|