@kengic/vue 0.6.7 → 0.6.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +2868 -2806
- package/dist/src/components/KgAppSelect/index.hooks.d.ts +8 -2
- package/dist/src/components/KgButton/index.hooks.d.ts +20 -3
- package/dist/src/components/KgForm/index.d.ts +2 -0
- package/dist/src/components/KgForm/index.hooks.d.ts +21 -0
- package/dist/src/components/KgForm/index.store.d.ts +59 -0
- package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +3 -9
- package/dist/src/components/KgForm.Item/addon/KgForm.Item.Addon.Lookup.Modal.d.ts +1 -9
- package/dist/src/components/KgForm.Item/addon/KgForm.Item.Addon.Lookup.d.ts +2 -8
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +2 -6
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +4 -8
- package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +0 -4
- package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +0 -4
- package/dist/src/components/KgForm.Item/index.vm.d.ts +0 -10
- package/dist/src/components/KgSearch/index.hooks.d.ts +8 -8
- package/dist/src/components/KgSubmit/index.hooks.d.ts +3 -1
- package/dist/src/components/KgSubmit/index.store.d.ts +25 -12
- package/dist/src/components/KgTable/index.store.d.ts +1 -1
- package/dist/src/components/KgTable/index.vm.d.ts +1 -1
- package/dist/src/components/KgVar/index.hooks.d.ts +14 -5
- package/dist/src/components/KgVar/index.store.d.ts +108 -112
- package/dist/src/components/KgWarehouse/index.hooks.d.ts +4 -1
- package/dist/src/components/util.d.ts +15 -0
- package/dist/src/consts/index.vm.d.ts +1 -1
- package/dist/src/utils/logger.util.d.ts +2 -2
- package/package.json +1 -1
@@ -5,7 +5,6 @@ import { Dayjs } from 'dayjs';
|
|
5
5
|
import { ComputedRef, ExtractPropTypes, InjectionKey, PropType } from 'vue';
|
6
6
|
import { VarProfileDetail, VarSubmitField, VarVariableConfig } from '../../apis/WMS/models';
|
7
7
|
import { KG_FORM_CONTEXT } from '../../consts';
|
8
|
-
import { IKgTableRow } from '../KgTable';
|
9
8
|
export declare type IKgFormItemValue = string | number | Array<string | number>;
|
10
9
|
export declare const getProps: () => {
|
11
10
|
/** 变量名称. */
|
@@ -66,11 +65,6 @@ export declare const getProps: () => {
|
|
66
65
|
default: undefined;
|
67
66
|
};
|
68
67
|
kgRules: PropType<RuleObject[]>;
|
69
|
-
/**
|
70
|
-
* 查找弹窗确定之前的回调函数, 如果返回 false, 则查找弹窗不会触发 kgOk 事件.
|
71
|
-
* 通常用于在弹窗确定之前, 对选择的数据进行校验, 如果校验失败, 则不允许确定, 需要重新选择数据.
|
72
|
-
*/
|
73
|
-
onKgLookupBeforeOk: PropType<(value: any | Array<any>, record: IKgTableRow | Array<IKgTableRow>) => boolean>;
|
74
68
|
value: PropType<IKgFormItemValue>;
|
75
69
|
'onUpdate:value': PropType<(value: IKgFormItemValue | null) => void>;
|
76
70
|
onKgSubmit: PropType<() => void>;
|
@@ -78,8 +72,6 @@ export declare const getProps: () => {
|
|
78
72
|
onKgChange: PropType<(value: any | null) => void>;
|
79
73
|
/** 下拉列表选中某个(可能多个)数据. */
|
80
74
|
onKgSelectChange: PropType<(value: any | null) => void>;
|
81
|
-
/** 查找弹窗选中某个(可能多个)数据. */
|
82
|
-
onKgLookupChange: PropType<(value: any | null) => void>;
|
83
75
|
/** 下拉列表数据发生变更. */
|
84
76
|
onKgSelectDatasChange: PropType<(datas: Array<any>) => void>;
|
85
77
|
/** 列表数据发生变更. */
|
@@ -95,7 +87,5 @@ export declare type IKgFormItemSlotControlParam = {
|
|
95
87
|
varProfileDetail: VarProfileDetail;
|
96
88
|
varSubmitField: VarSubmitField;
|
97
89
|
};
|
98
|
-
/** 依赖注入 onKgLookupBeforeOk 参数. */
|
99
|
-
export declare const DI_ON_KG_LOOKUP_BEFORE_OK: InjectionKey<(value: any | Array<any>, record: IKgTableRow | Array<IKgTableRow>) => boolean>;
|
100
90
|
/** 依赖注入 kgContext 参数. */
|
101
91
|
export declare const DI_KG_CONTEXT: InjectionKey<string>;
|
@@ -5,6 +5,14 @@ export declare type IUseKgSearch = {
|
|
5
5
|
formID: string;
|
6
6
|
/** 状态数据. */
|
7
7
|
store: IKgSearchStore;
|
8
|
+
/** 是否准备就绪. 即查询条件是否已经初始化完成了. */
|
9
|
+
isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
|
10
|
+
/** 表单数据对象. */
|
11
|
+
model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
|
12
|
+
/** 执行查询. */
|
13
|
+
search: ComputedRef<ReturnType<IKgSearchStore['getSearchFn']>>;
|
14
|
+
/** 执行重置. */
|
15
|
+
reset: ComputedRef<ReturnType<IKgSearchStore['getResetFn']>>;
|
8
16
|
/**
|
9
17
|
* 监听事件: search, 点击查询按钮, 并且表单验证通过.
|
10
18
|
* @param cb 回调函数.
|
@@ -21,14 +29,6 @@ export declare type IUseKgSearch = {
|
|
21
29
|
* @param once 是否只会触发一次.
|
22
30
|
* */
|
23
31
|
onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
|
24
|
-
/** 是否准备就绪. 即查询条件是否已经初始化完成了. */
|
25
|
-
isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
|
26
|
-
/** 表单数据对象. */
|
27
|
-
model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
|
28
|
-
/** 执行查询. */
|
29
|
-
search: ComputedRef<ReturnType<IKgSearchStore['getSearchFn']>>;
|
30
|
-
/** 执行重置. */
|
31
|
-
reset: ComputedRef<ReturnType<IKgSearchStore['getResetFn']>>;
|
32
32
|
};
|
33
33
|
/**
|
34
34
|
* @param formID 界面标识.
|
@@ -2,7 +2,7 @@ import { RuleObject } from 'ant-design-vue/es/form';
|
|
2
2
|
import { FormInstance } from 'ant-design-vue/lib/form/Form';
|
3
3
|
import { Ref } from 'vue';
|
4
4
|
import { IRemoveEventListenerHandler, KG_VAR_SUBMIT__DISPLAY_TYPE } from '../../consts';
|
5
|
-
import { IKgSubmitAfterValidateCb, IKgSubmitBeforeOkCb, IKgSubmitBeforeRequestCb, IKgSubmitCloseCb, IKgSubmitErrorCb, IKgSubmitOkCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
|
5
|
+
import { IKgSubmitAfterValidateCb, IKgSubmitBeforeOkCb, IKgSubmitBeforeRequestCb, IKgSubmitCloseCb, IKgSubmitErrorCb, IKgSubmitLookupOkCb, IKgSubmitOkCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
|
6
6
|
export declare type IUseKgSubmit = {
|
7
7
|
formID: string;
|
8
8
|
/** 状态数据. */
|
@@ -27,6 +27,8 @@ export declare type IUseKgSubmit = {
|
|
27
27
|
onError(cb: IKgSubmitErrorCb): IRemoveEventListenerHandler;
|
28
28
|
/** 监听事件: 关闭弹窗. 点击取消或者点击确定并且成功之后, 都会触发. */
|
29
29
|
onClose(cb: IKgSubmitCloseCb): IRemoveEventListenerHandler;
|
30
|
+
/** 监听事件: 查找弹窗点击确定. */
|
31
|
+
onLookupOk(cb: IKgSubmitLookupOkCb): IRemoveEventListenerHandler;
|
30
32
|
};
|
31
33
|
/**
|
32
34
|
* @param formID 界面标识.
|
@@ -5,15 +5,17 @@ import { Ref } from 'vue';
|
|
5
5
|
import { IKgTableRow } from '../KgTable';
|
6
6
|
/**
|
7
7
|
* 事件类型.
|
8
|
-
* 'open':
|
9
|
-
* 'beforeOk':
|
10
|
-
* 'afterValidate':
|
11
|
-
* 'beforeRequest':
|
12
|
-
* 'ok':
|
13
|
-
* 'error':
|
14
|
-
* 'close':
|
8
|
+
* 'open': 打开弹窗
|
9
|
+
* 'beforeOk': 点击保存按钮之后, 执行默认逻辑之前
|
10
|
+
* 'afterValidate': 表单验证成功
|
11
|
+
* 'beforeRequest': 发起请求之前
|
12
|
+
* 'ok': 请求成功, 即将关闭弹窗
|
13
|
+
* 'error': 请求失败. 请求失败了, 或者请求返回了错误消息
|
14
|
+
* 'close': 关闭弹窗
|
15
|
+
* 'lookupBeforeOk': 查找弹窗点击确定之前. 如果返回 true 则查找弹窗不会触发 kgOk 事件
|
16
|
+
* 'lookupOk': 查找弹窗点击确定
|
15
17
|
*/
|
16
|
-
export declare type IKgSubmitEvent = 'open' | '
|
18
|
+
export declare type IKgSubmitEvent = 'open' | 'beforeOk' | 'afterValidate' | 'beforeRequest' | 'ok' | 'error' | 'close' | 'lookupBeforeOk' | 'lookupOk';
|
17
19
|
/** 事件监听函数: open. */
|
18
20
|
export declare type IKgSubmitOpenCbParam = {
|
19
21
|
isCreating: boolean;
|
@@ -24,8 +26,6 @@ export declare type IKgSubmitOpenCbParam = {
|
|
24
26
|
model: Ref<Record<string, any>>;
|
25
27
|
};
|
26
28
|
export declare type IKgSubmitOpenCb = (param: IKgSubmitOpenCbParam) => Promise<boolean>;
|
27
|
-
/** 事件监听函数: close. */
|
28
|
-
export declare type IKgSubmitCloseCb = (param?: any | null) => Promise<boolean>;
|
29
29
|
/** 事件监听函数: beforeOk. */
|
30
30
|
export declare type IKgSubmitBeforeOkCbParam = {
|
31
31
|
isCreating: boolean;
|
@@ -65,15 +65,28 @@ export declare type IKgSubmitBeforeRequestCb = (param: IKgSubmitBeforeRequestCbP
|
|
65
65
|
export declare type IKgSubmitOkCb = (param?: any | null) => Promise<boolean>;
|
66
66
|
/** 事件监听函数: error. */
|
67
67
|
export declare type IKgSubmitErrorCb = (param: any) => Promise<boolean>;
|
68
|
-
|
68
|
+
/** 事件监听函数: close. */
|
69
|
+
export declare type IKgSubmitCloseCb = (param?: any | null) => Promise<boolean>;
|
70
|
+
/** 事件监听函数: lookupOk. */
|
71
|
+
export declare type IKgSubmitLookupOkCbParam = {
|
72
|
+
/** 变量. */
|
73
|
+
var_nam: string;
|
74
|
+
/** 单选时, 勾选的那一行. */
|
75
|
+
row: IKgTableRow | null;
|
76
|
+
/** 多选时, 勾选的所有行. */
|
77
|
+
rows: Array<IKgTableRow> | null;
|
78
|
+
};
|
79
|
+
export declare type IKgSubmitLookupOkCb = (param: IKgSubmitLookupOkCbParam) => Promise<boolean>;
|
80
|
+
export declare type IKgSubmitCb = IKgSubmitOpenCb | IKgSubmitBeforeOkCb | IKgSubmitAfterValidateCb | IKgSubmitBeforeRequestCb | IKgSubmitOkCb | IKgSubmitErrorCb | IKgSubmitCloseCb | IKgSubmitLookupOkCb;
|
69
81
|
export interface IKgSubmitState {
|
70
82
|
openListenersMap: Map<string, Array<IKgSubmitOpenCb>>;
|
71
|
-
closeListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
|
72
83
|
beforeOkListenersMap: Map<string, Array<IKgSubmitBeforeOkCb>>;
|
73
84
|
afterValidateListenersMap: Map<string, Array<IKgSubmitAfterValidateCb>>;
|
74
85
|
beforeRequestListenersMap: Map<string, Array<IKgSubmitBeforeRequestCb>>;
|
75
86
|
okListenersMap: Map<string, Array<IKgSubmitOkCb>>;
|
76
87
|
errorListenersMap: Map<string, Array<IKgSubmitErrorCb>>;
|
88
|
+
closeListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
|
89
|
+
lookupOkListenersMap: Map<string, Array<IKgSubmitLookupOkCb>>;
|
77
90
|
isLoadingMap: Map<string, boolean>;
|
78
91
|
/** 表单数据对象. */
|
79
92
|
modelMap: Map<string, Record<string, any>>;
|
@@ -6,7 +6,7 @@ import { IKgTableRow } from './index.vm';
|
|
6
6
|
* 事件类型.
|
7
7
|
* 'rowDoubleClick': 双击某行
|
8
8
|
* 'beforeRetrieve': 即将发起查询请求
|
9
|
-
* 'retrieve':
|
9
|
+
* 'retrieve': 表格数据查询完成
|
10
10
|
*/
|
11
11
|
export declare type IKgTableEvent = 'rowDoubleClick' | 'beforeRetrieve' | 'retrieve';
|
12
12
|
/** 事件监听函数: rowDoubleClick. */
|
@@ -143,4 +143,4 @@ export declare const KG_TABLE_TD_CHECK_WIDTH = 32;
|
|
143
143
|
/** 序号列的宽度. */
|
144
144
|
export declare const KG_TABLE_TD_INDEX_WIDTH = 40;
|
145
145
|
/** 在表格内创建时, 空白行的临时主键. */
|
146
|
-
export declare const KG_TABLE_TEMP_ID = "
|
146
|
+
export declare const KG_TABLE_TEMP_ID = "__KG_TABLE_TEMP_ID__";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ComputedRef } from 'vue';
|
2
2
|
import { VarProfileDetail } from '../../apis/WMS/models';
|
3
3
|
import { IRemoveEventListenerHandler } from '../../consts';
|
4
|
-
import {
|
4
|
+
import { IKgVarRetrieveCb, IKgVarStore } from './index.store';
|
5
5
|
export declare type IUseKgVar = {
|
6
6
|
/** 界面标识. */
|
7
7
|
formID: string;
|
@@ -55,12 +55,21 @@ export declare type IUseKgVar = {
|
|
55
55
|
systemVarGridDetails: ComputedRef<ReturnType<IKgVarStore['getSystemVarGridDetails']>>;
|
56
56
|
/** 当前的 VarGridDetail 列表. */
|
57
57
|
currentVarGridDetails: ComputedRef<ReturnType<IKgVarStore['getCurrentVarGridDetails']>>;
|
58
|
-
|
58
|
+
/** 设置'正在创建'. */
|
59
|
+
setIsCreating(value: boolean): void;
|
60
|
+
/** 设置'正在更新'. */
|
61
|
+
setIsUpdating(value: boolean): void;
|
62
|
+
/** 设置'正在复制'. */
|
63
|
+
setIsCopying(value: boolean): void;
|
64
|
+
/** 设置'正在删除'. */
|
65
|
+
setIsDeleting(value: boolean): void;
|
59
66
|
/**
|
60
|
-
* 监听事件:
|
67
|
+
* 监听事件: retrieve, 变量配置查询完成.
|
61
68
|
* @param cb 回调函数.
|
62
|
-
|
63
|
-
|
69
|
+
*/
|
70
|
+
onRetrieve(cb: IKgVarRetrieveCb): IRemoveEventListenerHandler;
|
71
|
+
/** 翻译变量. */
|
72
|
+
t: (var_nam?: string | null) => ComputedRef<string>;
|
64
73
|
};
|
65
74
|
/**
|
66
75
|
* 启用变量.
|
@@ -2,12 +2,12 @@ import { type StoreDefinition } from 'pinia';
|
|
2
2
|
import { VarButton, VarButtonConfig, VarCatalog, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitConfig, VarSubmitField, VarVariableConfig, VarVariableInput } from '../../apis/WMS/models';
|
3
3
|
/**
|
4
4
|
* 事件类型.
|
5
|
-
* '
|
5
|
+
* 'retrieve': 变量配置查询完成
|
6
6
|
*/
|
7
|
-
export declare type IKgVarEvent = '
|
8
|
-
/** 事件监听函数: '
|
9
|
-
export declare type
|
10
|
-
export declare type IKgVarCb =
|
7
|
+
export declare type IKgVarEvent = 'retrieve';
|
8
|
+
/** 事件监听函数: 'retrieve'. */
|
9
|
+
export declare type IKgVarRetrieveCb = () => void;
|
10
|
+
export declare type IKgVarCb = IKgVarRetrieveCb;
|
11
11
|
export declare type IFormID = {
|
12
12
|
formID: string;
|
13
13
|
/**
|
@@ -27,7 +27,9 @@ export interface IKgVarState {
|
|
27
27
|
*/
|
28
28
|
formIDs: Array<IFormID>;
|
29
29
|
/** 正在查询变量配置. */
|
30
|
-
|
30
|
+
isRetrievingMap: Map<string, boolean>;
|
31
|
+
/** 变量配置查询完成. */
|
32
|
+
isRetrievedMap: Map<string, boolean>;
|
31
33
|
/** 正在查询 VarProfileMaster. */
|
32
34
|
isRetrievingVarProfileMasterMap: Map<string, boolean>;
|
33
35
|
/** 正在查询 VarGridMaster. */
|
@@ -71,195 +73,189 @@ export interface IKgVarState {
|
|
71
73
|
/** 当前表格视图. */
|
72
74
|
currentVarGridMasterID: string | null;
|
73
75
|
}>;
|
74
|
-
/** 事件监听函数列表:
|
75
|
-
|
76
|
+
/** 事件监听函数列表: retrieve. */
|
77
|
+
onRetrieveListenersMap: Map<string, Array<IKgVarRetrieveCb>>;
|
76
78
|
}
|
77
79
|
export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState, {
|
78
80
|
/** 获取最顶层的界面标识, 即 level 最大的界面, 可能包含多个. */
|
79
81
|
getTopFormIDs(): Array<string>;
|
80
82
|
/** 获取界面层级. */
|
81
|
-
getFormLevel(): (
|
82
|
-
isRetrieving(): (
|
83
|
-
isRetrievingVarProfileMaster(): (
|
84
|
-
isRetrievingVarGridMaster(): (
|
85
|
-
isCreating(): (
|
86
|
-
isUpdating(): (
|
87
|
-
isCopying(): (
|
88
|
-
isDeleting(): (
|
89
|
-
isCreatingRequesting(): (
|
90
|
-
isUpdatingRequesting(): (
|
91
|
-
isCopyingRequesting(): (
|
92
|
-
isDeletingRequesting(): (
|
93
|
-
isOtherRequesting(): (
|
94
|
-
getVarCatalogs(): (
|
95
|
-
getVarCatalog(): (
|
96
|
-
getVarLookup(): (
|
97
|
-
getVarPossibility(): (
|
98
|
-
getVarVariableConfig(): (
|
99
|
-
getVarVariableInput(): (
|
100
|
-
getVarButtons(): (
|
101
|
-
getVarSubmitConfig(): (
|
83
|
+
getFormLevel(): (frm_id?: string | null) => number;
|
84
|
+
isRetrieving(): (frm_id?: string | null) => boolean | null;
|
85
|
+
isRetrievingVarProfileMaster(): (frm_id?: string | null) => boolean | null;
|
86
|
+
isRetrievingVarGridMaster(): (frm_id?: string | null) => boolean | null;
|
87
|
+
isCreating(): (frm_id?: string | null) => boolean | null;
|
88
|
+
isUpdating(): (frm_id?: string | null) => boolean | null;
|
89
|
+
isCopying(): (frm_id?: string | null) => boolean | null;
|
90
|
+
isDeleting(): (frm_id?: string | null) => boolean | null;
|
91
|
+
isCreatingRequesting(): (frm_id?: string | null) => boolean | null;
|
92
|
+
isUpdatingRequesting(): (frm_id?: string | null) => boolean | null;
|
93
|
+
isCopyingRequesting(): (frm_id?: string | null) => boolean | null;
|
94
|
+
isDeletingRequesting(): (frm_id?: string | null) => boolean | null;
|
95
|
+
isOtherRequesting(): (frm_id?: string | null) => boolean | null;
|
96
|
+
getVarCatalogs(): (frm_id?: string | null) => Array<VarCatalog> | null;
|
97
|
+
getVarCatalog(): (frm_id?: string | null, var_nam?: string | null) => VarCatalog | null;
|
98
|
+
getVarLookup(): (frm_id?: string | null, var_nam?: string | null) => VarLookup | null;
|
99
|
+
getVarPossibility(): (frm_id?: string | null, var_nam?: string | null) => VarPossibility | null;
|
100
|
+
getVarVariableConfig(): (frm_id?: string | null, var_nam?: string | null) => VarVariableConfig | null;
|
101
|
+
getVarVariableInput(): (frm_id?: string | null, var_nam?: string | null) => VarVariableInput | null;
|
102
|
+
getVarButtons(): (frm_id?: string | null) => Array<VarButton> | null;
|
103
|
+
getVarSubmitConfig(): (frm_id?: string | null) => VarSubmitConfig | null;
|
102
104
|
/** 获取所有提交字段. */
|
103
|
-
getVarSubmitFields(): (
|
105
|
+
getVarSubmitFields(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
104
106
|
/** 获取创建时的提交字段. */
|
105
|
-
getVarSubmitFieldsForCreate(): (
|
107
|
+
getVarSubmitFieldsForCreate(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
106
108
|
/** 获取创建时的提交字段: 关键字段. */
|
107
|
-
getVarSubmitFieldsForCreateKey(): (
|
109
|
+
getVarSubmitFieldsForCreateKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
108
110
|
/** 获取创建时的提交字段: 不是关键字段. */
|
109
|
-
getVarSubmitFieldsForCreateNotKey(): (
|
111
|
+
getVarSubmitFieldsForCreateNotKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
110
112
|
/** 获取更新时的提交字段. */
|
111
|
-
getVarSubmitFieldsForUpdate(): (
|
113
|
+
getVarSubmitFieldsForUpdate(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
112
114
|
/** 获取更新时的提交字段: 关键字段. */
|
113
|
-
getVarSubmitFieldsForUpdateKey(): (
|
115
|
+
getVarSubmitFieldsForUpdateKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
114
116
|
/** 获取更新时的提交字段: 不是关键字段. */
|
115
|
-
getVarSubmitFieldsForUpdateNotKey(): (
|
117
|
+
getVarSubmitFieldsForUpdateNotKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
116
118
|
/** 获取复制时的提交字段. */
|
117
|
-
getVarSubmitFieldsForCopy(): (
|
119
|
+
getVarSubmitFieldsForCopy(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
118
120
|
/** 获取复制时的提交字段: 关键字段. */
|
119
|
-
getVarSubmitFieldsForCopyKey(): (
|
121
|
+
getVarSubmitFieldsForCopyKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
120
122
|
/** 获取复制时的提交字段: 不是关键字段. */
|
121
|
-
getVarSubmitFieldsForCopyNotKey(): (
|
123
|
+
getVarSubmitFieldsForCopyNotKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
122
124
|
/** 获取删除时的提交字段. */
|
123
|
-
getVarSubmitFieldsForDelete(): (
|
125
|
+
getVarSubmitFieldsForDelete(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
124
126
|
/** 获取删除时的提交字段: 关键字段. */
|
125
|
-
getVarSubmitFieldsForDeleteKey(): (
|
127
|
+
getVarSubmitFieldsForDeleteKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
126
128
|
/** 获取删除时的提交字段: 不是关键字段. */
|
127
|
-
getVarSubmitFieldsForDeleteNotKey(): (
|
128
|
-
getVarSubmitField(): (
|
129
|
-
getVarButton(): (
|
130
|
-
getVarButtonConfig(): (
|
131
|
-
getVarButtonSearch(): (
|
132
|
-
getVarButtonCreate(): (
|
133
|
-
getVarButtonUpdate(): (
|
134
|
-
getVarButtonCopy(): (
|
135
|
-
getVarButtonDelete(): (
|
136
|
-
getVarProfileConfig(): (
|
137
|
-
getVarProfileMasters(): (
|
138
|
-
getVarProfileDetail(): (
|
129
|
+
getVarSubmitFieldsForDeleteNotKey(): (frm_id?: string | null) => Array<VarSubmitField> | null;
|
130
|
+
getVarSubmitField(): (frm_id?: string | null, var_nam?: string | null) => VarSubmitField | null;
|
131
|
+
getVarButton(): (frm_id?: string | null, var_nam?: string | null) => VarButton | null;
|
132
|
+
getVarButtonConfig(): (frm_id?: string | null) => VarButtonConfig | null;
|
133
|
+
getVarButtonSearch(): (frm_id?: string | null) => VarButton | null;
|
134
|
+
getVarButtonCreate(): (frm_id?: string | null) => VarButton | null;
|
135
|
+
getVarButtonUpdate(): (frm_id?: string | null) => VarButton | null;
|
136
|
+
getVarButtonCopy(): (frm_id?: string | null) => VarButton | null;
|
137
|
+
getVarButtonDelete(): (frm_id?: string | null) => VarButton | null;
|
138
|
+
getVarProfileConfig(): (frm_id?: string | null) => VarProfileConfig | null;
|
139
|
+
getVarProfileMasters(): (frm_id?: string | null) => Array<VarProfileMasterDTO> | null;
|
140
|
+
getVarProfileDetail(): (frm_id?: string | null, var_nam?: string | null) => VarProfileDetail | null;
|
139
141
|
/**
|
140
|
-
* 根据
|
142
|
+
* 根据 frm_id 获取 VarProfileDetail 列表.
|
141
143
|
*/
|
142
|
-
getVarProfileDetails(): (
|
144
|
+
getVarProfileDetails(): (frm_id?: string | null) => Array<VarProfileDetail> | null;
|
143
145
|
/**
|
144
|
-
* 根据
|
146
|
+
* 根据 frm_id 获取系统的 VarProfileDetail 列表, 即 customLevel 为 0 的 VarProfileMaster 下面的所有 VarProfileDetail.
|
145
147
|
*/
|
146
|
-
getSystemVarProfileDetails(): (
|
147
|
-
getCurrentVarProfileMaster(): (
|
148
|
-
getCurrentVarProfileMasterID(): (
|
148
|
+
getSystemVarProfileDetails(): (frm_id?: string | null) => Array<VarProfileDetail> | null;
|
149
|
+
getCurrentVarProfileMaster(): (frm_id?: string | null) => VarProfileMasterDTO | null;
|
150
|
+
getCurrentVarProfileMasterID(): (frm_id?: string | null) => string | null;
|
149
151
|
/** 获取所有的 VarGridConfig. */
|
150
152
|
getVarGridConfigMap(): Map<string, VarGridConfig | null>;
|
151
|
-
getVarGridConfig(): (
|
152
|
-
getVarGridMasters(): (
|
153
|
-
getVarGridDetail(): (
|
154
|
-
/** 根据
|
155
|
-
getCurrentVarGridMaster(): (
|
156
|
-
getCurrentVarGridDetails(): (
|
153
|
+
getVarGridConfig(): (frm_id?: string | null) => VarGridConfig | null;
|
154
|
+
getVarGridMasters(): (frm_id?: string | null) => Array<VarGridMasterDTO> | null;
|
155
|
+
getVarGridDetail(): (frm_id?: string | null, var_nam?: string | null) => VarGridDetail | null;
|
156
|
+
/** 根据 frm_id 获取当前的 VarGridMaster. */
|
157
|
+
getCurrentVarGridMaster(): (frm_id?: string | null) => VarGridMasterDTO | null;
|
158
|
+
getCurrentVarGridDetails(): (frm_id?: string | null) => Array<VarGridDetail> | null;
|
157
159
|
/**
|
158
|
-
* 根据
|
160
|
+
* 根据 frm_id 获取系统的 VarGridDetail 列表, 即 customLevel 为 0 的 VarGridMaster 下面的所有 VarGridDetail.
|
159
161
|
*/
|
160
|
-
getSystemVarGridDetails(): (
|
161
|
-
getCurrentVisibleVarGridDetails(): (
|
162
|
-
getCurrentVisibleVarGridDetailsTotalWidth(): (
|
162
|
+
getSystemVarGridDetails(): (frm_id?: string | null) => Array<VarGridDetail> | null;
|
163
|
+
getCurrentVisibleVarGridDetails(): (frm_id?: string | null) => Array<VarGridDetail> | null;
|
164
|
+
getCurrentVisibleVarGridDetailsTotalWidth(): (frm_id?: string | null) => number | null;
|
163
165
|
}, {
|
164
166
|
/**
|
165
167
|
* 注册事件监听.
|
166
|
-
* @param
|
168
|
+
* @param frm_id 界面标识.
|
167
169
|
* @param event 事件名称.
|
168
170
|
* @param cb 回调函数.
|
169
171
|
*/
|
170
|
-
addEventListener(
|
172
|
+
addEventListener(frm_id: string, event: IKgVarEvent, cb: IKgVarCb): void;
|
171
173
|
/**
|
172
174
|
* 退订事件监听.
|
173
|
-
* @param
|
175
|
+
* @param frm_id 界面标识.
|
174
176
|
* @param event 事件名称.
|
175
177
|
* @param cb 回调函数.
|
176
178
|
*/
|
177
|
-
removeEventListener(
|
179
|
+
removeEventListener(frm_id: string, event: IKgVarEvent, cb?: IKgVarCb): void;
|
178
180
|
/**
|
179
181
|
* 触发事件.
|
180
|
-
* @param
|
182
|
+
* @param frm_id 界面标识.
|
181
183
|
* @param event 事件名称.
|
182
184
|
* @param args 事件参数.
|
183
185
|
*/
|
184
|
-
emit(
|
185
|
-
enter(
|
186
|
-
leave(
|
187
|
-
retrieve(
|
188
|
-
setIsCreating(
|
186
|
+
emit(frm_id: string, event: IKgVarEvent, args?: any): void;
|
187
|
+
enter(frm_id: IFormID): Promise<void>;
|
188
|
+
leave(frm_id: string): void;
|
189
|
+
retrieve(frm_id?: string | null): Promise<void>;
|
190
|
+
setIsCreating(frm_id: string, value: boolean): void;
|
189
191
|
/**
|
190
192
|
*
|
191
|
-
* @param
|
193
|
+
* @param frm_id
|
192
194
|
* @param value
|
193
195
|
* @param whenReady 是否等待变量配置数据加载完成.
|
194
196
|
*/
|
195
|
-
setIsUpdating(
|
196
|
-
setIsCopying(
|
197
|
-
setIsDeleting(
|
198
|
-
setIsCreatingRequesting(
|
199
|
-
setIsUpdatingRequesting(
|
200
|
-
setIsCopyingRequesting(
|
201
|
-
setIsDeletingRequesting(
|
202
|
-
setIsOtherRequesting(
|
197
|
+
setIsUpdating(frm_id: string, value: boolean, whenReady?: boolean): void;
|
198
|
+
setIsCopying(frm_id: string, value: boolean): void;
|
199
|
+
setIsDeleting(frm_id: string, deleting: boolean): void;
|
200
|
+
setIsCreatingRequesting(frm_id: string, value: boolean): void;
|
201
|
+
setIsUpdatingRequesting(frm_id: string, value: boolean): void;
|
202
|
+
setIsCopyingRequesting(frm_id: string, value: boolean): void;
|
203
|
+
setIsDeletingRequesting(frm_id: string, deleting: boolean): void;
|
204
|
+
setIsOtherRequesting(frm_id: string, deleting: boolean): void;
|
203
205
|
/**
|
204
206
|
* 设置当前选择的查询条件的 ID.
|
205
|
-
* @param
|
207
|
+
* @param frm_id 界面标识.
|
206
208
|
* @param currentVarProfileMasterID 当前选择的查询条件的 ID.
|
207
209
|
*/
|
208
|
-
setCurrentVarProfileMasterID(
|
210
|
+
setCurrentVarProfileMasterID(frm_id: string, currentVarProfileMasterID: string): Promise<void>;
|
209
211
|
/**
|
210
212
|
* 设置查询字段是否启用.
|
211
|
-
* @param
|
213
|
+
* @param frm_id 界面标识.
|
212
214
|
* @param var_nam 变量名称.
|
213
215
|
* @param enable 是否启用.
|
214
216
|
*/
|
215
|
-
setVarProfileDetailEnable(
|
216
|
-
/**
|
217
|
-
* 设置查询条件是否显示.
|
218
|
-
* @param formID 界面标识.
|
219
|
-
* @param visible 是否显示
|
220
|
-
*/
|
221
|
-
setVarProfileConfigVisible(formID: string, visible: boolean): void;
|
217
|
+
setVarProfileDetailEnable(frm_id: string, var_nam: string | null | undefined, enable: number): void;
|
222
218
|
/**
|
223
219
|
* 设置当前选择的表格视图的 ID.
|
224
|
-
* @param
|
220
|
+
* @param frm_id 界面标识.
|
225
221
|
* @param currentVarGridMasterID 当前选择的表格视图的 ID.
|
226
222
|
*/
|
227
|
-
setCurrentVarGridMasterID(
|
223
|
+
setCurrentVarGridMasterID(frm_id: string, currentVarGridMasterID: string): Promise<void>;
|
228
224
|
/**
|
229
225
|
* 设置列的宽度.
|
230
|
-
* @param
|
226
|
+
* @param frm_id 界面标识.
|
231
227
|
* @param var_nam 变量名称.
|
232
228
|
* @param width 新的宽度.
|
233
229
|
*/
|
234
|
-
setVarGridDetailWidth(
|
230
|
+
setVarGridDetailWidth(frm_id: string, var_nam: string | null | undefined, width: number): void;
|
235
231
|
/**
|
236
|
-
*
|
237
|
-
* @param
|
232
|
+
* 修改 VarGridDetail 的部分属性.
|
233
|
+
* @param frm_id 界面标识.
|
238
234
|
* @param var_nam 变量名称.
|
239
|
-
* @param
|
235
|
+
* @param properties 要修改的属性.
|
240
236
|
*/
|
241
|
-
|
237
|
+
patchVarGridDetail(frm_id: string, var_nam: string | null | undefined, properties: VarGridDetail): void;
|
242
238
|
/**
|
243
239
|
* 设置某个 VarPossibility 配置.
|
244
|
-
* @param
|
240
|
+
* @param frm_id 界面标识.
|
245
241
|
* @param var_nam 变量名称
|
246
242
|
* @param varPossibility 配置.
|
247
243
|
*/
|
248
|
-
setVarPossibility(
|
244
|
+
setVarPossibility(frm_id: string | null | undefined, var_nam: string | null | undefined, varPossibility: VarPossibility): void;
|
249
245
|
/**
|
250
246
|
* 修改 VarSubmitField 的部分属性.
|
251
|
-
* @param
|
247
|
+
* @param frm_id 界面标识.
|
252
248
|
* @param var_nam 变量名称
|
253
249
|
* @param properties 要修改的属性.
|
254
250
|
*/
|
255
|
-
patchVarSubmitField(
|
251
|
+
patchVarSubmitField(frm_id: string | null | undefined, var_nam: string | null | undefined, properties: VarSubmitField): void;
|
256
252
|
/**
|
257
253
|
* 修改 VarPossibility 的接口参数 cmd_prm 的部分属性.
|
258
|
-
* @param
|
254
|
+
* @param frm_id 界面标识.
|
259
255
|
* @param var_nam 变量名称
|
260
256
|
* @param properties 要修改的属性.
|
261
257
|
*/
|
262
|
-
patchVarPossibilityCommandParameter(
|
258
|
+
patchVarPossibilityCommandParameter(frm_id: string | null | undefined, var_nam: string | null | undefined, properties: Record<string, any>): void;
|
263
259
|
}>;
|
264
260
|
export declare type IKgVarStore = ReturnType<IKgVarStoreDefinition>;
|
265
261
|
export declare const useKgVarStore: () => IKgVarStoreDefinition;
|
@@ -8,7 +8,10 @@ export declare type IUseKgWarehouse = {
|
|
8
8
|
visible: ComputedRef<boolean>;
|
9
9
|
/** 当前仓库. */
|
10
10
|
warehouse: ComputedRef<WhDTO | null>;
|
11
|
-
/**
|
11
|
+
/**
|
12
|
+
* 监听事件: 组件加载完成.
|
13
|
+
* @param cb 回调函数.
|
14
|
+
*/
|
12
15
|
onMounted(cb: IKgWarehouseMountedCb): IRemoveEventListenerHandler;
|
13
16
|
};
|
14
17
|
/**
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IRemoveEventListenerHandler } from '../consts';
|
2
|
+
/**
|
3
|
+
* 构造事件监听.
|
4
|
+
* @param frm_id 界面标识.
|
5
|
+
* @param store 状态管理.
|
6
|
+
* @param event 事件名称.
|
7
|
+
* @param once 是否只会触发一次.
|
8
|
+
*/
|
9
|
+
export declare function onEventFactory<S extends {
|
10
|
+
addEventListener(frm_id: string, event: E, cb: C): void;
|
11
|
+
removeEventListener(frm_id: string, event: E, cb?: C): void;
|
12
|
+
} | {
|
13
|
+
addEventListener(event: E, cb: C): void;
|
14
|
+
removeEventListener(event: E, cb?: C): void;
|
15
|
+
} = any, E = any, C = any>(frm_id: string | null, store: S, event: E, once?: boolean): (cb: C) => IRemoveEventListenerHandler;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/**
|
2
2
|
* 日志服务.
|
3
3
|
*/
|
4
|
-
declare class
|
4
|
+
declare class KgLogger {
|
5
5
|
/**
|
6
6
|
* 打印错误日志.
|
7
7
|
*
|
@@ -45,4 +45,4 @@ declare class Logger {
|
|
45
45
|
*/
|
46
46
|
static debug(message: string, args?: Record<string, any>, collapsed?: boolean): void;
|
47
47
|
}
|
48
|
-
export {
|
48
|
+
export { KgLogger };
|