@kengic/vue 0.22.1-beta.0 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +62 -22
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +7709 -6673
- package/dist/project/build/script/buildConf.ts +1 -2
- package/dist/project/build/script/postBuild.ts +1 -1
- package/dist/project/src/api/sys/model/userModel.ts +1 -0
- package/dist/src/apis/WMS/Controllers/DescriptionController/ListByCodeNamesAndCodeValues.d.ts +16 -0
- package/dist/src/apis/WMS/Controllers/DescriptionController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/index.d.ts +0 -7
- package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +18 -0
- package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/index.d.ts +1 -0
- package/dist/src/apis/WMS/Controllers/index.d.ts +1 -0
- package/dist/src/apis/WMS/models.d.ts +28 -4
- package/dist/src/components/KgAppSelect/index.hooks.d.ts +3 -3
- package/dist/src/components/KgAppSelect/index.store.d.ts +30 -29
- package/dist/src/components/KgButton/KgButton.d.ts +18 -12
- package/dist/src/components/KgButton/index.d.ts +4 -4
- package/dist/src/components/KgButton/index.hooks.d.ts +68 -67
- package/dist/src/components/KgButton/index.store.d.ts +57 -193
- package/dist/src/components/KgForm/index.hooks.d.ts +37 -30
- package/dist/src/components/KgForm/index.store.d.ts +88 -41
- package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +3 -3
- package/dist/src/components/KgForm.Item/{KgForm.Item.hooks.d.ts → KgForm.Item.service.d.ts} +3 -3
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +8 -7
- package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Image.d.ts +3 -3
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +6 -7
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +7 -5
- package/dist/src/components/KgForm.Item/components/{KgForm.Item.Select.hooks.d.ts → KgForm.Item.Select.service.d.ts} +16 -13
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +6 -5
- package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +6 -5
- package/dist/src/components/KgForm.Item/index.d.ts +1 -1
- package/dist/src/components/KgForm.Item/index.vm.d.ts +9 -7
- package/dist/src/components/KgResizable/KgResizable.d.ts +52 -52
- package/dist/src/components/KgSearch/KgSearch.d.ts +0 -16
- package/dist/src/components/KgSearch/KgSearch.service.d.ts +32 -0
- package/dist/src/components/KgSearch/index.hooks.d.ts +57 -138
- package/dist/src/components/KgSearch/index.store.d.ts +84 -193
- package/dist/src/components/KgSubmit/index.hooks.d.ts +112 -278
- package/dist/src/components/KgSubmit/index.store.d.ts +71 -257
- package/dist/src/components/KgSubmit/index.vm.d.ts +2 -1
- package/dist/src/components/KgTable/{KgTable.hooks.d.ts → KgTable.service.d.ts} +8 -16
- package/dist/src/components/KgTable/components/setting/KgTable.Setting.d.ts +0 -1
- package/dist/src/components/KgTable/components/setting/{KgTable.Setting.hooks.d.ts → KgTable.Setting.service.d.ts} +1 -1
- package/dist/src/components/KgTable/components/setting/config/KgTable.Setting.ConfigModal.d.ts +0 -2
- package/dist/src/components/KgTable/index.hooks.d.ts +79 -427
- package/dist/src/components/KgTable/index.store.d.ts +127 -647
- package/dist/src/components/KgTable/index.vm.d.ts +1 -1
- package/dist/src/components/KgVar/index.hooks.d.ts +103 -3468
- package/dist/src/components/KgVar/index.store.d.ts +136 -3229
- package/dist/src/components/KgVar/index.store.service.d.ts +2 -1
- package/dist/src/components/KgVar/index.vm.d.ts +7 -7
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +2 -0
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +2 -0
- package/dist/src/components/KgVarConfig/index.store.d.ts +23 -16
- package/dist/src/components/KgVarConfig/index.vm.d.ts +32 -0
- package/dist/src/components/KgWarehouse/index.hooks.d.ts +10 -6
- package/dist/src/components/KgWarehouse/index.store.d.ts +15 -14
- package/dist/src/components/util.d.ts +7 -7
- package/dist/src/config/index.hooks.d.ts +31 -38
- package/dist/src/config/index.store.d.ts +74 -52
- package/dist/src/consts/i18n/en.d.ts +10 -6
- package/dist/src/consts/i18n/zh_CN.d.ts +10 -6
- package/dist/src/consts/index.d.ts +0 -277
- package/dist/src/consts/index.vm.d.ts +503 -75
- package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +7 -1
- package/dist/src/utils/kg-var.util.d.ts +4 -3
- package/dist/src/utils/kg.util.d.ts +13 -16
- package/package.json +2 -2
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Delete.d.ts +0 -18
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/DeleteBatch.d.ts +0 -18
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Edit.d.ts +0 -16
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ExportXls.d.ts +0 -30
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ImportExcel.d.ts +0 -15
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/List.d.ts +0 -37
- package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/QueryById.d.ts +0 -19
- package/dist/src/components/KgSearch/KgSearch.hooks.d.ts +0 -28
- package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.CreateModal.d.ts +0 -32
- /package/dist/src/components/KgModal/{KgModal.hooks.d.ts → KgModal.service.d.ts} +0 -0
- /package/dist/src/components/KgSubmit/{KgSubmit.hooks.d.ts → KgSubmit.service.d.ts} +0 -0
- /package/dist/src/components/KgTable/components/setting/config/{KgTable.Setting.ConfigModal.VarGridMaster.hooks.d.ts → KgTable.Setting.ConfigModal.VarGridMaster.service.d.ts} +0 -0
- /package/dist/src/components/KgVarConfig/components/var/{KgVarConfig.Modal.Var.Vars.d.ts → KgVarConfig.Modal.Var.VarConfigControl.d.ts} +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import { VarButton, VarButtonConfig, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
|
1
|
+
import { VarButton, VarButtonConfig, VarConfigPossibility, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
|
2
2
|
export declare function transformVarProfileConfig(varProfileConfig?: VarProfileConfig | null): VarProfileConfig | null;
|
3
3
|
export declare function transformVarGridConfig(varGridConfig?: VarGridConfig | null): VarGridConfig | null;
|
4
4
|
export declare function transformVarGridMasterDTOs(varGridMasterDTOs?: Array<VarGridMasterDTO> | null): Array<VarGridMasterDTO>;
|
@@ -6,6 +6,7 @@ export declare function transformVarProfileMasterDTOs(varProfileMasterDTOs?: Arr
|
|
6
6
|
export declare function transformVarSubmitConfigs(varSubmitConfigs?: Array<VarSubmitConfig> | null): Array<VarSubmitConfig>;
|
7
7
|
export declare function transformVarSubmitDetails(varSubmitDetails?: Array<VarSubmitDetail> | null): Array<VarSubmitDetail>;
|
8
8
|
export declare function transformVarButtons(varButtons?: Array<VarButton> | null): Array<VarButton>;
|
9
|
+
export declare function transformVarConfigPossibilities(varConfigPossibilities?: Array<VarConfigPossibility> | null): Array<VarConfigPossibility>;
|
9
10
|
export declare function transformVarButtonConfig(varButtonConfig?: VarButtonConfig | null): VarButtonConfig | null;
|
10
11
|
/**
|
11
12
|
* 处理 VarGridDetail 数据.
|
@@ -6,16 +6,14 @@ import { KgSubmitProps } from '../KgSubmit';
|
|
6
6
|
import { IKgTableSlotParams } from '../KgTable';
|
7
7
|
import { IKgTableProps } from '../KgTable/KgTable';
|
8
8
|
export declare type IKgSlots = {
|
9
|
-
/** KgTable 下面. */
|
10
|
-
afterKgTable?: () => any;
|
11
|
-
KgSearch?: {
|
12
|
-
/** 左侧. */
|
13
|
-
left?: () => any;
|
14
|
-
};
|
15
9
|
KgButton?: {
|
16
10
|
/** 右侧. */
|
17
11
|
right?: () => any;
|
18
12
|
};
|
13
|
+
KgSearch?: {
|
14
|
+
/** 左侧. */
|
15
|
+
left?: () => any;
|
16
|
+
};
|
19
17
|
KgSubmit?: {
|
20
18
|
/** 某个表单控件. */
|
21
19
|
'KgForm.Item.control'?: {
|
@@ -34,12 +32,14 @@ export declare type IKgSlots = {
|
|
34
32
|
/** 表格底部的汇总行.单元格. */
|
35
33
|
'summary.bodyCell'?: (param: IKgTableSlotParams['summary.bodyCell']) => any;
|
36
34
|
};
|
35
|
+
/** KgTable 下面. */
|
36
|
+
afterKgTable?: () => any;
|
37
37
|
};
|
38
38
|
/** 注入 kgSlots 参数. */
|
39
39
|
export declare const DI_KG_VAR__KG_SLOTS: InjectionKey<IKgSlots | undefined>;
|
40
40
|
export declare type IKgProps = {
|
41
|
-
KgSearch?: IKgSearchProps;
|
42
41
|
KgButton?: IKgButtonProps;
|
42
|
+
KgSearch?: IKgSearchProps;
|
43
43
|
KgSubmit?: KgSubmitProps;
|
44
44
|
KgTable?: IKgTableProps;
|
45
45
|
};
|
package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
2
|
+
export default _default;
|
@@ -1,20 +1,27 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
|
-
import {
|
3
|
-
export interface
|
4
|
-
/**
|
2
|
+
import { VarConfigDescription, VarVariable } from '../../apis/WMS/models';
|
3
|
+
export interface IUseKgVarConfigStoreState {
|
4
|
+
/**
|
5
|
+
* 变量.
|
6
|
+
*/
|
5
7
|
variable: {
|
6
|
-
/**
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
/**
|
9
|
+
* 当前选中的变量.
|
10
|
+
*/
|
11
|
+
currentVarVariable: VarVariable | null;
|
12
|
+
/**
|
13
|
+
* 当前选中的变量翻译.
|
14
|
+
*/
|
15
|
+
currentVarConfigDescription: VarConfigDescription | null;
|
10
16
|
};
|
11
17
|
}
|
12
|
-
export
|
13
|
-
|
14
|
-
|
15
|
-
}
|
16
|
-
|
17
|
-
|
18
|
-
}
|
19
|
-
export declare type
|
20
|
-
export declare
|
18
|
+
export interface IUseKgVarConfigStoreGetters {
|
19
|
+
getCurrentVarVariable: VarVariable | null;
|
20
|
+
getCurrentVarConfigDescription: VarConfigDescription | null;
|
21
|
+
}
|
22
|
+
export interface IUseKgVarConfigStoreActions {
|
23
|
+
setCurrentVarConfigDescription(variable: VarConfigDescription | null): void;
|
24
|
+
}
|
25
|
+
export declare type IUseKgVarConfigStore = StoreDefinition<'KgVarConfig', IUseKgVarConfigStoreState, IUseKgVarConfigStoreGetters, IUseKgVarConfigStoreActions>;
|
26
|
+
export declare type IKgVarConfigStore = ReturnType<IUseKgVarConfigStore>;
|
27
|
+
export declare const useKgVarConfigStore: IUseKgVarConfigStore;
|
@@ -1,3 +1,35 @@
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
2
2
|
/** 正在被配置的界面标识. */
|
3
3
|
export declare const DI__KG_VAR_CONFIG__HOST_FORM_ID: InjectionKey<Ref<string | null>>;
|
4
|
+
/**
|
5
|
+
* 界面标识: 变量配置弹窗:变量配置:变量列表.
|
6
|
+
*/
|
7
|
+
export declare const FORM_ID__VAR__VAR_VARIABLE = "KgVarConfig.Modal.Var.VarVariable";
|
8
|
+
/**
|
9
|
+
* 界面标识: 变量配置弹窗:变量配置:变量翻译.
|
10
|
+
*/
|
11
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_DESCRIPTION = "KgVarConfig.Modal.Var.VarConfigDescription";
|
12
|
+
/**
|
13
|
+
* 界面标识: 变量配置弹窗:变量配置:表单控件.
|
14
|
+
*/
|
15
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_CONTROL = "KgVarConfig.Modal.Var.VarConfigControl";
|
16
|
+
/**
|
17
|
+
* 界面标识: 变量配置弹窗:变量配置:列表数据.
|
18
|
+
*/
|
19
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_POSSIBILITY = "KgVarConfig.Modal.Var.VarConfigPossibility";
|
20
|
+
/**
|
21
|
+
* 界面标识: 变量配置弹窗:变量配置:表单输入验证.
|
22
|
+
*/
|
23
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_INPUT = "KgVarConfig.Modal.Var.VarConfigInput";
|
24
|
+
/**
|
25
|
+
* 界面标识: 变量配置弹窗:变量配置:查找弹窗.
|
26
|
+
*/
|
27
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_LOOKUP = "KgVarConfig.Modal.Var.VarConfigLookup";
|
28
|
+
/**
|
29
|
+
* 界面标识: 变量配置弹窗:变量配置:查找弹窗::查找弹窗界面标识.
|
30
|
+
*/
|
31
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_LOOKUP__VAR_DDA = "KgVarConfig.Modal.Var.VarConfigLookup:LookupID";
|
32
|
+
/**
|
33
|
+
* 界面标识: 变量配置弹窗:变量配置:提示文本.
|
34
|
+
*/
|
35
|
+
export declare const FORM_ID__VAR__VAR_CONFIG_TIP = "KgVarConfig.Modal.Var.VarConfigTip";
|
@@ -2,23 +2,27 @@ import { Pinia } from 'pinia';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { WhDTO } from '../../apis/WMS/models';
|
4
4
|
import { IRemoveEventListenerHandler } from '../../consts';
|
5
|
-
import {
|
5
|
+
import { IKgWarehouseMountedEventListener, IKgWarehouseStore } from './index.store';
|
6
6
|
export declare type IUseKgWarehouse = {
|
7
|
+
/**
|
8
|
+
* 事件: 组件加载完成.
|
9
|
+
* @param cb 回调函数.
|
10
|
+
* @param once 是否只会触发一次. 默认为 undefined.
|
11
|
+
*/
|
12
|
+
onMounted(cb: IKgWarehouseMountedEventListener, once?: boolean): IRemoveEventListenerHandler;
|
7
13
|
store: IKgWarehouseStore;
|
8
14
|
/**
|
9
15
|
* 弹窗当前是否显示.
|
10
16
|
*/
|
11
17
|
visible: ComputedRef<boolean>;
|
12
|
-
warehouse: ComputedRef<WhDTO | null>;
|
13
18
|
/**
|
14
|
-
*
|
15
|
-
* @param cb 回调函数.
|
16
|
-
* @param once 是否只会触发一次. 默认为 undefined.
|
19
|
+
* 当前仓库.
|
17
20
|
*/
|
18
|
-
|
21
|
+
warehouse: ComputedRef<WhDTO | null>;
|
19
22
|
};
|
20
23
|
/**
|
21
24
|
* 在某些地方调用时(比如在路由守卫中), pinia 尚未设置, 此时需要手动传入 pinia 实例.
|
25
|
+
*
|
22
26
|
* @param pinia
|
23
27
|
*/
|
24
28
|
export declare function useKgWarehouse(pinia?: Pinia): IUseKgWarehouse;
|
@@ -1,15 +1,14 @@
|
|
1
|
-
import {
|
1
|
+
import { StoreDefinition } from 'pinia';
|
2
2
|
import { WhDTO } from '../../apis/WMS/models';
|
3
|
-
import {
|
3
|
+
import { IKgEventListener } from '../../consts';
|
4
4
|
/**
|
5
5
|
* 事件类型.
|
6
6
|
* 'mounted': 组件加载完成
|
7
7
|
*/
|
8
8
|
export declare type IKgWarehouseEvent = 'mounted';
|
9
|
-
|
10
|
-
export declare type
|
11
|
-
export
|
12
|
-
export interface IKgWarehouseState {
|
9
|
+
export declare type IKgWarehouseMountedEventListener = (() => void) & IKgEventListener;
|
10
|
+
export declare type IKgWarehouseEventListener = IKgWarehouseMountedEventListener;
|
11
|
+
export interface IUseKgWarehouseStoreState {
|
13
12
|
/**
|
14
13
|
* 弹窗当前是否显示.
|
15
14
|
*/
|
@@ -18,27 +17,28 @@ export interface IKgWarehouseState {
|
|
18
17
|
* 当前仓库.
|
19
18
|
*/
|
20
19
|
warehouse: WhDTO | null;
|
21
|
-
mountedListeners: Array<
|
20
|
+
mountedListeners: Array<IKgWarehouseMountedEventListener>;
|
22
21
|
}
|
23
|
-
export
|
22
|
+
export interface IUseKgWarehouseStoreGetters {
|
24
23
|
/**
|
25
24
|
* 弹窗当前是否显示.
|
26
25
|
*/
|
27
26
|
getVisible: boolean;
|
28
27
|
getWarehouse: WhDTO | null;
|
29
|
-
}
|
28
|
+
}
|
29
|
+
export interface IUseKgWarehouseStoreActions {
|
30
30
|
/**
|
31
31
|
* 注册事件监听.
|
32
32
|
* @param event 事件名称.
|
33
33
|
* @param cb 回调函数.
|
34
34
|
*/
|
35
|
-
addEventListener(event: IKgWarehouseEvent, cb:
|
35
|
+
addEventListener(event: IKgWarehouseEvent, cb: IKgWarehouseEventListener): void;
|
36
36
|
/**
|
37
37
|
* 退订事件监听.
|
38
38
|
* @param event 事件名称.
|
39
39
|
* @param cb 回调函数.
|
40
40
|
*/
|
41
|
-
removeEventListener(event: IKgWarehouseEvent, cb?:
|
41
|
+
removeEventListener(event: IKgWarehouseEvent, cb?: IKgWarehouseEventListener): void;
|
42
42
|
/**
|
43
43
|
* 触发事件.
|
44
44
|
* @param event 事件名称.
|
@@ -55,6 +55,7 @@ export declare type IKgWarehouseStoreDefinition = StoreDefinition<'KgWarehouse',
|
|
55
55
|
* @param warehouse 当前仓库.
|
56
56
|
*/
|
57
57
|
setWarehouse(warehouse?: WhDTO | null): void;
|
58
|
-
}
|
59
|
-
export declare type
|
60
|
-
export declare
|
58
|
+
}
|
59
|
+
export declare type IUseKgWarehouseStore = StoreDefinition<'KgWarehouse', IUseKgWarehouseStoreState, IUseKgWarehouseStoreGetters, IUseKgWarehouseStoreActions>;
|
60
|
+
export declare type IKgWarehouseStore = ReturnType<IUseKgWarehouseStore>;
|
61
|
+
export declare const useKgWarehouseStore: IUseKgWarehouseStore;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import {
|
1
|
+
import { IKgEventListener, IRemoveEventListenerHandler } from '../consts';
|
2
2
|
/**
|
3
3
|
* 构造事件监听.
|
4
|
-
* @param
|
4
|
+
* @param formID 界面标识.
|
5
5
|
* @param store 状态管理.
|
6
6
|
* @param event 事件名称.
|
7
7
|
*/
|
8
8
|
export declare function onEventFactory<S extends {
|
9
|
-
addEventListener(
|
10
|
-
removeEventListener(
|
9
|
+
addEventListener(formID: string, event: E, cb: L): void;
|
10
|
+
removeEventListener(formID: string, event: E, cb?: L): void;
|
11
11
|
} | {
|
12
|
-
addEventListener(event: E, cb:
|
13
|
-
removeEventListener(event: E, cb?:
|
14
|
-
} = any, E = any,
|
12
|
+
addEventListener(event: E, cb: L): void;
|
13
|
+
removeEventListener(event: E, cb?: L): void;
|
14
|
+
} = any, E = any, L extends IKgEventListener = any>(formID: string | null, store: S, event: E): (cb: L, once?: boolean) => IRemoveEventListenerHandler;
|
@@ -1,42 +1,35 @@
|
|
1
1
|
import { Pinia } from 'pinia';
|
2
|
+
import { ComputedRef } from 'vue';
|
3
|
+
import { Description } from '../apis/WMS/models';
|
4
|
+
import { IKgStore, P, T } from './index.store';
|
5
|
+
export interface IUseKg {
|
6
|
+
/**
|
7
|
+
* 获取当前语言下的某个描述.
|
8
|
+
*
|
9
|
+
* @param.codeName 描述组名.
|
10
|
+
* @param.codeValue 描述数值.
|
11
|
+
*/
|
12
|
+
getDescription(param: {
|
13
|
+
codeName: string | null | undefined;
|
14
|
+
codeValue: string | null | undefined;
|
15
|
+
}): Description | null;
|
16
|
+
/** 当前语言. */
|
17
|
+
locale: IKgStore['getLocale'];
|
18
|
+
/**
|
19
|
+
* 组件库的配置参数.
|
20
|
+
*/
|
21
|
+
option: ComputedRef<IKgStore['getOption']>;
|
22
|
+
/** 检查权限. */
|
23
|
+
p: P;
|
24
|
+
/**
|
25
|
+
* 路由对象.
|
26
|
+
*/
|
27
|
+
router: ComputedRef<IKgStore['getRouter']>;
|
28
|
+
store: IKgStore;
|
29
|
+
/** 翻译. */
|
30
|
+
t: T;
|
31
|
+
}
|
2
32
|
/**
|
3
33
|
* @param pinia 在某些地方调用时(比如在路由守卫中), pinia 尚未初始化, 此时需要手动传入 pinia 实例.
|
4
34
|
*/
|
5
|
-
export declare function useKg(pinia?: Pinia):
|
6
|
-
store: import("pinia").Store<"Kg", import("./index.store").IKgState, {
|
7
|
-
getLocale(): import("vue").ComputedRef<import("..").IKgLocale> | null;
|
8
|
-
getRouter(): import("vue-router").Router | null;
|
9
|
-
getUseUserStore(): import("pinia").StoreDefinition<string, import("./index.store").UserState, {
|
10
|
-
getToken(): string;
|
11
|
-
getRoleList(): any[];
|
12
|
-
getUserWarehouses(): import("..").SysUserWarehouseDTO[];
|
13
|
-
getSessionTimeout(): boolean;
|
14
|
-
getUserInfo(): import("./index.store").UserInfo;
|
15
|
-
}, {}> | null;
|
16
|
-
getUsePermissionStore(): import("pinia").StoreDefinition<string, import("./index.store").PermissionState, {
|
17
|
-
getPermCodeList(): string[] | number[];
|
18
|
-
getBackMenuList(): import("..").Menu[];
|
19
|
-
}, import("pinia")._ActionsTree> | null;
|
20
|
-
getOption(): import("./index.store").IKgOption;
|
21
|
-
getPublicPath(): string;
|
22
|
-
}, {
|
23
|
-
setLocale(locale: import("vue").ComputedRef<import("..").IKgLocale> | null): void;
|
24
|
-
setRouter(router: import("vue-router").Router): void;
|
25
|
-
setUseUserStore(useUserStore: import("pinia").StoreDefinition<any, any, any, any>): void;
|
26
|
-
setUsePermissionStore(usePermissionStore: import("pinia").StoreDefinition<any, any, any, any>): void;
|
27
|
-
setT(i18n: any): void;
|
28
|
-
setP(fn: import("./index.store").P): void;
|
29
|
-
setOption(option: import("./index.store").IKgOption): void;
|
30
|
-
t(key: string | null | undefined, ...arg: any[]): string;
|
31
|
-
p(permissionCode?: string | string[] | null | undefined): boolean;
|
32
|
-
}>;
|
33
|
-
/** 当前语言. */
|
34
|
-
locale: import("vue").ComputedRef<import("..").IKgLocale>;
|
35
|
-
router: any;
|
36
|
-
/** 配置参数. */
|
37
|
-
option: import("vue").ComputedRef<import("./index.store").IKgOption>;
|
38
|
-
/** 翻译. */
|
39
|
-
t: (key: string | null | undefined, ...arg: any[]) => string;
|
40
|
-
/** 检查权限. */
|
41
|
-
p: (permissionCode?: string | string[] | null | undefined) => boolean;
|
42
|
-
};
|
35
|
+
export declare function useKg(pinia?: Pinia): IUseKg;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
2
2
|
import { ComputedRef } from 'vue';
|
3
3
|
import { Router } from 'vue-router';
|
4
|
-
import { SysUserWarehouseDTO } from '../apis/WMS/models';
|
4
|
+
import { Description, SysUserWarehouseDTO } from '../apis/WMS/models';
|
5
5
|
import { IKgLocale, KG_APP, Menu } from '../consts';
|
6
6
|
export declare type IKgOption = {
|
7
7
|
/** 模块首页地址. */
|
@@ -161,54 +161,61 @@ export interface PermissionState {
|
|
161
161
|
/** 全部权限配置. */
|
162
162
|
allAuthList: AuthItem[];
|
163
163
|
}
|
164
|
-
export interface
|
164
|
+
export interface IUseKgStoreState {
|
165
|
+
/**
|
166
|
+
* <p>系统描述.</p>
|
167
|
+
* <p>第一层 key 为 codeName, 第二层 key 为 codeValue.</p>
|
168
|
+
*/
|
169
|
+
descriptionMap: Map<string, Map<string, Description>>;
|
165
170
|
/** 语言. */
|
166
171
|
locale: ComputedRef<IKgLocale> | null;
|
167
|
-
/**
|
168
|
-
|
172
|
+
/** 配置参数. */
|
173
|
+
option: IKgOption;
|
169
174
|
/** 检查权限的方法. */
|
170
175
|
pFunction: P | null;
|
171
176
|
router: Router | null;
|
172
|
-
/**
|
173
|
-
|
177
|
+
/** 翻译的方法. */
|
178
|
+
tFunction: T | null;
|
174
179
|
/** 权限数据. */
|
175
180
|
usePermissionStore: StoreDefinition | null;
|
176
|
-
/**
|
177
|
-
|
181
|
+
/** 用户数据. */
|
182
|
+
useUserStore: StoreDefinition | null;
|
178
183
|
}
|
179
|
-
export
|
180
|
-
/**
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
184
|
+
export interface IUseKgStoreGetters {
|
185
|
+
/**
|
186
|
+
* 根据 codeName 和 codeValue 获取当前语言下的某个描述.
|
187
|
+
*/
|
188
|
+
getDescription(): (param: {
|
189
|
+
codeName: string | null | undefined;
|
190
|
+
codeValue: string | null | undefined;
|
191
|
+
}) => Description | null;
|
192
|
+
/**
|
193
|
+
* 根据 codeName 获取当前语言下的它的所有描述.
|
194
|
+
*/
|
195
|
+
getDescriptions(): (param: {
|
196
|
+
codeName: string | null | undefined;
|
197
|
+
}) => Array<Description>;
|
198
|
+
/** 组件库的配置参数. */
|
199
|
+
getLocale(): ComputedRef<IKgLocale> | null;
|
200
|
+
/**
|
201
|
+
* 配置参数.
|
202
|
+
*/
|
203
|
+
getOption(): IKgOption;
|
204
|
+
/**
|
205
|
+
* 后端接口地址前缀.
|
206
|
+
*/
|
207
|
+
getPublicPath(): IKgOption;
|
208
|
+
getRouter(): Router | null;
|
209
|
+
/**
|
210
|
+
* 菜单数据.
|
211
|
+
*/
|
190
212
|
getUsePermissionStore(): StoreDefinition<string, PermissionState, {
|
191
213
|
getPermCodeList(): string[] | number[];
|
192
214
|
getBackMenuList(): Menu[];
|
193
215
|
}> | null;
|
194
|
-
/**
|
195
|
-
|
196
|
-
|
197
|
-
setLocale(locale: ComputedRef<IKgLocale> | null): void;
|
198
|
-
setRouter(router: Router): void;
|
199
|
-
setUseUserStore(useUserStore: StoreDefinition<any, any, any, any>): void;
|
200
|
-
setUsePermissionStore(usePermissionStore: StoreDefinition<any, any, any, any>): void;
|
201
|
-
setT(i18n: any): void;
|
202
|
-
setP(fn: P): void;
|
203
|
-
setOption(option: IKgOption): void;
|
204
|
-
/** 翻译. */
|
205
|
-
t: T;
|
206
|
-
/** 检查权限. */
|
207
|
-
p: P;
|
208
|
-
}>;
|
209
|
-
export declare const useKgStore: StoreDefinition<"Kg", IKgState, {
|
210
|
-
getLocale(): ComputedRef<IKgLocale> | null;
|
211
|
-
getRouter(): Router | null;
|
216
|
+
/**
|
217
|
+
* 权限数据.
|
218
|
+
*/
|
212
219
|
getUseUserStore(): StoreDefinition<string, UserState, {
|
213
220
|
getToken(): string;
|
214
221
|
getRoleList(): any[];
|
@@ -216,24 +223,39 @@ export declare const useKgStore: StoreDefinition<"Kg", IKgState, {
|
|
216
223
|
getSessionTimeout(): boolean;
|
217
224
|
getUserInfo(): UserInfo;
|
218
225
|
}, {}> | null;
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
getOption(): IKgOption;
|
226
|
+
}
|
227
|
+
export interface IUseKgStoreActions {
|
228
|
+
/** 检查权限. */
|
229
|
+
p: P;
|
224
230
|
/**
|
225
|
-
*
|
231
|
+
* 请求某组描述数据.
|
232
|
+
*
|
233
|
+
* @param param.codeName 描述组名.
|
226
234
|
*/
|
227
|
-
|
228
|
-
|
235
|
+
requestDescriptions(param: {
|
236
|
+
codeName: string | null | undefined;
|
237
|
+
}): Promise<void>;
|
238
|
+
/**
|
239
|
+
* 设置某组描述的数据.
|
240
|
+
*
|
241
|
+
* @param param.codeName 描述组名.
|
242
|
+
* @param param.descriptions 描述数据.
|
243
|
+
*/
|
244
|
+
setDescriptions(param: {
|
245
|
+
codeName: string | null | undefined;
|
246
|
+
descriptions: Array<Description>;
|
247
|
+
}): void;
|
229
248
|
setLocale(locale: ComputedRef<IKgLocale> | null): void;
|
249
|
+
setOption(option: IKgOption): void;
|
250
|
+
setP(fn: P): void;
|
230
251
|
setRouter(router: Router): void;
|
231
|
-
setUseUserStore(useUserStore: StoreDefinition<any, any, any, any>): void;
|
232
|
-
setUsePermissionStore(usePermissionStore: StoreDefinition<any, any, any, any>): void;
|
233
252
|
setT(i18n: any): void;
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
}
|
253
|
+
setUsePermissionStore(usePermissionStore: StoreDefinition<any, any, any, any>): void;
|
254
|
+
setUseUserStore(useUserStore: StoreDefinition<any, any, any, any>): void;
|
255
|
+
/** 翻译. */
|
256
|
+
t: T;
|
257
|
+
}
|
258
|
+
export declare type IUseKgStore = StoreDefinition<'Kg', IUseKgStoreState, IUseKgStoreGetters, IUseKgStoreActions>;
|
259
|
+
export declare type IKgStore = ReturnType<IUseKgStore>;
|
260
|
+
export declare const useKgStore: IUseKgStore;
|
239
261
|
export {};
|
@@ -90,11 +90,13 @@ declare const _default: {
|
|
90
90
|
invalidWidthForSpan: string;
|
91
91
|
};
|
92
92
|
KgTable: {
|
93
|
+
apiNotSupportDynamicQuery: string;
|
93
94
|
canNotUpdateSystemVarGridMaster: string;
|
94
95
|
column: string;
|
95
96
|
config: string;
|
96
|
-
'dynamic-query-is-off-in-server': string;
|
97
97
|
emptyText: string;
|
98
|
+
isShowDescription: string;
|
99
|
+
other: string;
|
98
100
|
'request-fail-error': string;
|
99
101
|
'request-fail-no-data': string;
|
100
102
|
rowHeight: string;
|
@@ -145,8 +147,6 @@ declare const _default: {
|
|
145
147
|
action: string;
|
146
148
|
allForm: string;
|
147
149
|
allLanguage: string;
|
148
|
-
applyTo: string;
|
149
|
-
catalog: string;
|
150
150
|
confirm: string;
|
151
151
|
createConfig: string;
|
152
152
|
createSuccess: string;
|
@@ -156,19 +156,23 @@ declare const _default: {
|
|
156
156
|
deleteConfirmMessage: string;
|
157
157
|
deleteSuccess: string;
|
158
158
|
discardConfirmMessage: string;
|
159
|
-
form: string;
|
160
159
|
formId: string;
|
161
160
|
groupName: string;
|
162
|
-
language: string;
|
163
161
|
required: string;
|
164
162
|
saveSuccess: string;
|
165
163
|
tabButton: string;
|
166
164
|
tabSearch: string;
|
167
165
|
tabSubmit: string;
|
168
166
|
tabTable: string;
|
167
|
+
varConfigControl: string;
|
168
|
+
varConfigDescription: string;
|
169
|
+
varConfigInput: string;
|
170
|
+
varConfigLookup: string;
|
171
|
+
varConfigPossibility: string;
|
172
|
+
varConfigTip: string;
|
173
|
+
varVariable: string;
|
169
174
|
variable: string;
|
170
175
|
variableName: string;
|
171
|
-
variables: string;
|
172
176
|
};
|
173
177
|
KgVarConfigModalButton: {
|
174
178
|
VarButton: string;
|
@@ -90,11 +90,13 @@ declare const _default: {
|
|
90
90
|
invalidWidthForSpan: string;
|
91
91
|
};
|
92
92
|
KgTable: {
|
93
|
+
apiNotSupportDynamicQuery: string;
|
93
94
|
canNotUpdateSystemVarGridMaster: string;
|
94
95
|
column: string;
|
95
96
|
config: string;
|
96
|
-
'dynamic-query-is-off-in-server': string;
|
97
97
|
emptyText: string;
|
98
|
+
isShowDescription: string;
|
99
|
+
other: string;
|
98
100
|
'request-fail-error': string;
|
99
101
|
'request-fail-no-data': string;
|
100
102
|
rowHeight: string;
|
@@ -145,8 +147,6 @@ declare const _default: {
|
|
145
147
|
action: string;
|
146
148
|
allForm: string;
|
147
149
|
allLanguage: string;
|
148
|
-
applyTo: string;
|
149
|
-
catalog: string;
|
150
150
|
confirm: string;
|
151
151
|
createConfig: string;
|
152
152
|
createSuccess: string;
|
@@ -156,18 +156,22 @@ declare const _default: {
|
|
156
156
|
deleteConfirmMessage: string;
|
157
157
|
deleteSuccess: string;
|
158
158
|
discardConfirmMessage: string;
|
159
|
-
form: string;
|
160
159
|
formId: string;
|
161
160
|
groupName: string;
|
162
|
-
language: string;
|
163
161
|
saveSuccess: string;
|
164
162
|
tabButton: string;
|
165
163
|
tabSearch: string;
|
166
164
|
tabSubmit: string;
|
167
165
|
tabTable: string;
|
166
|
+
varConfigControl: string;
|
167
|
+
varConfigDescription: string;
|
168
|
+
varConfigInput: string;
|
169
|
+
varConfigLookup: string;
|
170
|
+
varConfigPossibility: string;
|
171
|
+
varConfigTip: string;
|
172
|
+
varVariable: string;
|
168
173
|
variable: string;
|
169
174
|
variableName: string;
|
170
|
-
variables: string;
|
171
175
|
};
|
172
176
|
KgVarConfigModalButton: {
|
173
177
|
VarButton: string;
|