@kengic/vue 0.2.1-beta.1 → 0.2.1-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +4599 -2202
- package/dist/src/apis/WMS/models.d.ts +177 -9
- package/dist/src/components/KgButton/KgButton.Copy.d.ts +21 -15
- package/dist/src/components/KgButton/KgButton.Create.d.ts +23 -15
- package/dist/src/components/KgButton/KgButton.Delete.d.ts +21 -15
- package/dist/src/components/KgButton/KgButton.Export.d.ts +21 -15
- package/dist/src/components/KgButton/KgButton.Import.d.ts +32 -0
- package/dist/src/components/KgButton/KgButton.Other.d.ts +32 -0
- package/dist/src/components/KgButton/KgButton.Search.d.ts +32 -0
- package/dist/src/components/KgButton/KgButton.Update.d.ts +23 -15
- package/dist/src/components/KgButton/KgButton.d.ts +22 -16
- package/dist/src/components/KgButton/KgButtons.d.ts +22 -0
- package/dist/src/components/KgButton/index.d.ts +1 -0
- package/dist/src/components/KgButton/index.vm.d.ts +15 -9
- package/dist/src/components/KgControl/KgControl.Date.d.ts +28 -22
- package/dist/src/components/KgControl/KgControl.Input.d.ts +28 -22
- package/dist/src/components/KgControl/KgControl.InputNumber.d.ts +110 -0
- package/dist/src/components/KgControl/KgControl.Select.d.ts +32 -26
- package/dist/src/components/KgControl/KgControl.Switch.d.ts +28 -22
- package/dist/src/components/KgControl/KgControl.d.ts +28 -22
- package/dist/src/components/KgControl/addon/KgControl.Addon.Lookup.Modal.d.ts +5 -5
- package/dist/src/components/KgControl/addon/KgControl.Addon.Lookup.d.ts +5 -5
- package/dist/src/components/KgControl/index.vm.d.ts +23 -12
- package/dist/src/components/KgSearch/KgSearch.d.ts +30 -7
- package/dist/src/components/KgSearch/index.d.ts +1 -1
- package/dist/src/components/KgSearch/index.hooks.d.ts +18 -0
- package/dist/src/components/KgSearch/index.store.d.ts +40 -7
- package/dist/src/components/KgTable/{KgTable.Td.d.ts → KgTable.Cell.d.ts} +1 -1
- package/dist/src/components/KgTable/KgTable.Info.d.ts +53 -0
- package/dist/src/components/KgTable/KgTable.data.d.ts +7 -5
- package/dist/src/components/KgTable/index.d.ts +1 -1
- package/dist/src/components/KgTable/index.hooks.d.ts +15 -0
- package/dist/src/components/KgTable/index.store.d.ts +25 -6
- package/dist/src/components/KgTable/index.vm.d.ts +14 -4
- package/dist/src/components/KgVar/index.d.ts +1 -1
- package/dist/src/components/KgVar/index.hooks.d.ts +29 -0
- package/dist/src/components/KgVar/index.store.d.ts +29 -4
- package/dist/src/consts/i18n/en.d.ts +14 -0
- package/dist/src/consts/i18n/index.d.ts +28 -0
- package/dist/src/consts/i18n/zh_CN.d.ts +14 -0
- package/dist/src/consts/index.d.ts +17 -19
- package/dist/src/utils/kg.util.d.ts +4 -0
- package/package.json +5 -1
- package/dist/src/components/KgSearch/index.hook.d.ts +0 -4
- package/dist/src/components/KgTable/index.hook.d.ts +0 -7
- package/dist/src/components/KgVar/index.hook.d.ts +0 -45
|
@@ -5,6 +5,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5
5
|
type: import("vue").PropType<string>;
|
|
6
6
|
required: boolean;
|
|
7
7
|
};
|
|
8
|
+
kgDisabled: import("vue").PropType<boolean>;
|
|
8
9
|
kgGutter: {
|
|
9
10
|
type: import("vue").PropType<number>;
|
|
10
11
|
default: number;
|
|
@@ -13,21 +14,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
14
|
type: import("vue").PropType<number>;
|
|
14
15
|
default: number;
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
default: string;
|
|
17
|
+
kgShowLabel: {
|
|
18
|
+
type: import("vue").PropType<boolean>;
|
|
19
|
+
default: boolean;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
type: import("vue").PropType<
|
|
23
|
-
default:
|
|
21
|
+
kgAllowClear: {
|
|
22
|
+
type: import("vue").PropType<boolean>;
|
|
23
|
+
default: boolean;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
kgType: import("vue").PropType<KG_CONTROL_TYPE>;
|
|
26
|
+
kgPlaceholder: {
|
|
26
27
|
type: import("vue").PropType<string>;
|
|
27
28
|
default: string;
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
kgValueColumn: import("vue").PropType<string>;
|
|
31
|
+
kgLabelColumn: import("vue").PropType<string>;
|
|
32
|
+
kgCommand: import("vue").PropType<string>;
|
|
33
|
+
kgCommandParameter: import("vue").PropType<string>;
|
|
31
34
|
kgValidateInfo: {
|
|
32
35
|
type: import("vue").PropType<import("ant-design-vue/lib/form/useForm").ValidateInfo>;
|
|
33
36
|
default: () => {};
|
|
@@ -49,6 +52,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
52
|
type: import("vue").PropType<string>;
|
|
50
53
|
required: boolean;
|
|
51
54
|
};
|
|
55
|
+
kgDisabled: import("vue").PropType<boolean>;
|
|
52
56
|
kgGutter: {
|
|
53
57
|
type: import("vue").PropType<number>;
|
|
54
58
|
default: number;
|
|
@@ -57,21 +61,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
57
61
|
type: import("vue").PropType<number>;
|
|
58
62
|
default: number;
|
|
59
63
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
default: string;
|
|
64
|
+
kgShowLabel: {
|
|
65
|
+
type: import("vue").PropType<boolean>;
|
|
66
|
+
default: boolean;
|
|
64
67
|
};
|
|
65
|
-
|
|
66
|
-
type: import("vue").PropType<
|
|
67
|
-
default:
|
|
68
|
+
kgAllowClear: {
|
|
69
|
+
type: import("vue").PropType<boolean>;
|
|
70
|
+
default: boolean;
|
|
68
71
|
};
|
|
69
|
-
|
|
72
|
+
kgType: import("vue").PropType<KG_CONTROL_TYPE>;
|
|
73
|
+
kgPlaceholder: {
|
|
70
74
|
type: import("vue").PropType<string>;
|
|
71
75
|
default: string;
|
|
72
76
|
};
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
kgValueColumn: import("vue").PropType<string>;
|
|
78
|
+
kgLabelColumn: import("vue").PropType<string>;
|
|
79
|
+
kgCommand: import("vue").PropType<string>;
|
|
80
|
+
kgCommandParameter: import("vue").PropType<string>;
|
|
75
81
|
kgValidateInfo: {
|
|
76
82
|
type: import("vue").PropType<import("ant-design-vue/lib/form/useForm").ValidateInfo>;
|
|
77
83
|
default: () => {};
|
|
@@ -95,9 +101,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
101
|
}, {
|
|
96
102
|
kgGutter: number;
|
|
97
103
|
kgSpan: number;
|
|
104
|
+
kgShowLabel: boolean;
|
|
105
|
+
kgAllowClear: boolean;
|
|
98
106
|
kgPlaceholder: string;
|
|
99
|
-
kgCodeColumn: string;
|
|
100
|
-
kgDescriptionColumn: string;
|
|
101
107
|
kgValidateInfo: import("ant-design-vue/lib/form/useForm").ValidateInfo;
|
|
102
108
|
kgActionType: import("axios").Method;
|
|
103
109
|
kgShowTime: boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import './KgControl.Addon.Lookup.Modal.less';
|
|
3
|
-
import {
|
|
3
|
+
import { IKgTableRecord } from '../../KgTable';
|
|
4
4
|
export declare const getProps: () => {
|
|
5
5
|
visible: PropType<boolean>;
|
|
6
6
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
|
7
|
-
onKgOk: PropType<(value:
|
|
7
|
+
onKgOk: PropType<(value: string | Array<string>, record: IKgTableRecord | Array<IKgTableRecord>) => void>;
|
|
8
8
|
};
|
|
9
|
-
export declare type
|
|
9
|
+
export declare type IProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
10
10
|
declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
visible: PropType<boolean>;
|
|
12
12
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
|
13
|
-
onKgOk: PropType<(value:
|
|
13
|
+
onKgOk: PropType<(value: string | string[], record: IKgTableRecord<{}> | IKgTableRecord<{}>[]) => void>;
|
|
14
14
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:visible" | "kgOk")[], "update:visible" | "kgOk", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
15
15
|
visible: PropType<boolean>;
|
|
16
16
|
'onUpdate:visible': PropType<(value: boolean) => void>;
|
|
17
|
-
onKgOk: PropType<(value:
|
|
17
|
+
onKgOk: PropType<(value: string | string[], record: IKgTableRecord<{}> | IKgTableRecord<{}>[]) => void>;
|
|
18
18
|
}>> & {
|
|
19
19
|
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
20
20
|
onKgOk?: ((...args: any[]) => any) | undefined;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import './KgControl.Addon.Lookup.less';
|
|
3
|
-
import {
|
|
3
|
+
import { IKgTableRecord } from '../../KgTable';
|
|
4
4
|
export declare const getProps: () => {
|
|
5
|
-
onKgOk: PropType<(value: any, row:
|
|
5
|
+
onKgOk: PropType<(value: any, row: IKgTableRecord) => void>;
|
|
6
6
|
};
|
|
7
|
-
export declare type
|
|
7
|
+
export declare type IProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
8
8
|
declare const _default: import("vue").DefineComponent<{
|
|
9
|
-
onKgOk: PropType<(value: any, row:
|
|
9
|
+
onKgOk: PropType<(value: any, row: IKgTableRecord<{}>) => void>;
|
|
10
10
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgOk"[], "kgOk", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
11
|
-
onKgOk: PropType<(value: any, row:
|
|
11
|
+
onKgOk: PropType<(value: any, row: IKgTableRecord<{}>) => void>;
|
|
12
12
|
}>> & {
|
|
13
13
|
onKgOk?: ((...args: any[]) => any) | undefined;
|
|
14
14
|
}, {}>;
|
|
@@ -11,6 +11,8 @@ export declare const getProps: () => {
|
|
|
11
11
|
type: PropType<string>;
|
|
12
12
|
required: boolean;
|
|
13
13
|
};
|
|
14
|
+
/** 是否禁用. */
|
|
15
|
+
kgDisabled: PropType<boolean>;
|
|
14
16
|
/**
|
|
15
17
|
* 控件间隔.
|
|
16
18
|
* @default 6
|
|
@@ -27,6 +29,23 @@ export declare const getProps: () => {
|
|
|
27
29
|
type: PropType<number>;
|
|
28
30
|
default: number;
|
|
29
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* 是否显示标签文本.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
kgShowLabel: {
|
|
37
|
+
type: PropType<boolean>;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
/**
|
|
42
|
+
* 是否运行清空.
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
kgAllowClear: {
|
|
46
|
+
type: PropType<boolean>;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
30
49
|
/**
|
|
31
50
|
* 控件类型.
|
|
32
51
|
* @default {@link KG_CONTROL_TYPE.INPUT}
|
|
@@ -42,25 +61,17 @@ export declare const getProps: () => {
|
|
|
42
61
|
/**
|
|
43
62
|
* 数据列.
|
|
44
63
|
* {@link KG_CONTROL_TYPE.SELECT} 和 {@link KG_CONTROL_TYPE.SELECT_MULTIPLE} 适用.
|
|
45
|
-
* @default 'codval'
|
|
46
64
|
*/
|
|
47
|
-
|
|
48
|
-
type: PropType<string>;
|
|
49
|
-
default: string;
|
|
50
|
-
};
|
|
65
|
+
kgValueColumn: PropType<string>;
|
|
51
66
|
/**
|
|
52
67
|
* 显示列.
|
|
53
68
|
* {@link KG_CONTROL_TYPE.SELECT} 和 {@link KG_CONTROL_TYPE.SELECT_MULTIPLE} 适用.
|
|
54
|
-
* @default 'shortDsc'
|
|
55
69
|
*/
|
|
56
|
-
|
|
57
|
-
type: PropType<string>;
|
|
58
|
-
default: string;
|
|
59
|
-
};
|
|
70
|
+
kgLabelColumn: PropType<string>;
|
|
60
71
|
/** 接口地址. */
|
|
61
|
-
|
|
72
|
+
kgCommand: PropType<string>;
|
|
62
73
|
/** 接口参数. */
|
|
63
|
-
|
|
74
|
+
kgCommandParameter: PropType<string>;
|
|
64
75
|
/**
|
|
65
76
|
* 表单验证信息.
|
|
66
77
|
* @default {}
|
|
@@ -1,18 +1,41 @@
|
|
|
1
1
|
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
2
|
import './KgSearch.less';
|
|
3
3
|
export declare const getProps: () => {
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 是否显示. 如果隐藏, 则在页面上不会显示, 但是功能是正常的.
|
|
6
|
+
* @default true
|
|
7
|
+
*/
|
|
8
|
+
kgVisible: {
|
|
9
|
+
type: PropType<boolean>;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
onKgSearch: PropType<(model: Record<string, any> | null) => void>;
|
|
6
13
|
};
|
|
7
14
|
export declare type KgSearchProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
8
15
|
declare const _default: import("vue").DefineComponent<{
|
|
9
|
-
/**
|
|
10
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 是否显示. 如果隐藏, 则在页面上不会显示, 但是功能是正常的.
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
kgVisible: {
|
|
21
|
+
type: PropType<boolean>;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
onKgSearch: PropType<(model: Record<string, any> | null) => void>;
|
|
11
25
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSearch" | "kgReset")[], "kgSearch" | "kgReset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
12
|
-
/**
|
|
13
|
-
|
|
26
|
+
/**
|
|
27
|
+
* 是否显示. 如果隐藏, 则在页面上不会显示, 但是功能是正常的.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
kgVisible: {
|
|
31
|
+
type: PropType<boolean>;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
onKgSearch: PropType<(model: Record<string, any> | null) => void>;
|
|
14
35
|
}>> & {
|
|
15
36
|
onKgSearch?: ((...args: any[]) => any) | undefined;
|
|
16
37
|
onKgReset?: ((...args: any[]) => any) | undefined;
|
|
17
|
-
}, {
|
|
38
|
+
}, {
|
|
39
|
+
kgVisible: boolean;
|
|
40
|
+
}>;
|
|
18
41
|
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { IKgSearchResetCb, IKgSearchSearchCb, KgSearchStore } from './index.store';
|
|
3
|
+
export declare type IUseKgSearch = {
|
|
4
|
+
kgSearchStore: KgSearchStore;
|
|
5
|
+
onSearch(cb: IKgSearchSearchCb): void;
|
|
6
|
+
onReset(cb: IKgSearchResetCb): void;
|
|
7
|
+
isReady: ComputedRef<ReturnType<KgSearchStore['getIsReady']>>;
|
|
8
|
+
model: ComputedRef<ReturnType<KgSearchStore['getModel']>>;
|
|
9
|
+
form: ComputedRef<ReturnType<KgSearchStore['getForm']>>;
|
|
10
|
+
/** 查询. */
|
|
11
|
+
search: ComputedRef<ReturnType<KgSearchStore['getSearchFn']>>;
|
|
12
|
+
/** 重置. */
|
|
13
|
+
reset: ComputedRef<ReturnType<KgSearchStore['getResetFn']>>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @param formID 界面标识.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useKgSearch(formID?: string): IUseKgSearch;
|
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
|
2
|
+
import { Form } from 'ant-design-vue';
|
|
3
|
+
/** 事件类型. */
|
|
4
|
+
export declare type IKgSearchEvent = 'search' | 'reset';
|
|
5
|
+
/** '查询'事件监听函数. */
|
|
6
|
+
export declare type IKgSearchSearchCb = (model: Record<string, any> | null, resetPageIndex?: boolean) => void;
|
|
7
|
+
/** '重置'事件监听函数. */
|
|
8
|
+
export declare type IKgSearchResetCb = () => void;
|
|
9
|
+
/** 查询方法. */
|
|
10
|
+
export declare type IKgSearchSearchFn = (resetPageIndex?: boolean) => boolean;
|
|
11
|
+
/** 重置方法. */
|
|
12
|
+
export declare type IKgSearchResetFn = () => void;
|
|
2
13
|
export interface KgSearchState {
|
|
14
|
+
/** 是否准备就绪. 查询条件是否初始化完成了. */
|
|
15
|
+
isReadyMap: Map<string, boolean>;
|
|
16
|
+
/** 表单数据. */
|
|
17
|
+
modelMap: Map<string, Record<string, any>>;
|
|
18
|
+
/** 表单对象. */
|
|
19
|
+
formMap: Map<string, ReturnType<typeof Form.useForm>>;
|
|
3
20
|
/** '查询'事件监听函数列表. */
|
|
4
|
-
|
|
21
|
+
onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
|
|
5
22
|
/** '重置'事件监听函数列表. */
|
|
6
|
-
|
|
23
|
+
onResetListenersMap: Map<string, Array<IKgSearchResetCb>>;
|
|
24
|
+
/** 查询方法, 可供外部调用, 用来触发查询操作. */
|
|
25
|
+
searchFnMap: Map<string, IKgSearchSearchFn>;
|
|
26
|
+
/** 重置方法, 可供外部调用, 用来触发重置操作. */
|
|
27
|
+
resetFnMap: Map<string, IKgSearchResetFn>;
|
|
7
28
|
}
|
|
8
|
-
export declare type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
29
|
+
export declare type KgSearchStoreDefinition = StoreDefinition<'KgSearch', KgSearchState, {
|
|
30
|
+
getIsReady(): (formID?: string | null) => boolean;
|
|
31
|
+
getModel(): (formID?: string | null) => Record<string, any> | null;
|
|
32
|
+
getForm(): (formID?: string | null) => ReturnType<typeof Form.useForm> | null;
|
|
33
|
+
getSearchFn(): (formID?: string | null) => IKgSearchSearchFn | null;
|
|
34
|
+
getResetFn(): (formID?: string | null) => IKgSearchResetFn | null;
|
|
35
|
+
}, {
|
|
36
|
+
dispose: (formID?: string | null) => void;
|
|
37
|
+
setIsReady: (formID?: string | null, value?: boolean) => void;
|
|
38
|
+
addEventListener: (formID: string, event: IKgSearchEvent, cb: IKgSearchSearchCb) => void;
|
|
39
|
+
removeEventListener: (formID: string, event: IKgSearchEvent, cb?: IKgSearchSearchCb | IKgSearchResetCb) => void;
|
|
40
|
+
emit: (formID: string, event: IKgSearchEvent, model?: Record<string, any> | null, resetPageIndex?: boolean) => void;
|
|
41
|
+
setModel: (formID: string, model: Record<string, any>) => void;
|
|
42
|
+
setSearchFn: (formID?: string | null, fn?: IKgSearchSearchFn | null) => void;
|
|
43
|
+
setResetFn: (formID?: string | null, fn?: IKgSearchResetFn | null) => void;
|
|
12
44
|
}>;
|
|
13
|
-
export declare
|
|
45
|
+
export declare type KgSearchStore = ReturnType<KgSearchStoreDefinition>;
|
|
46
|
+
export declare const useKgSearchStore: () => KgSearchStoreDefinition;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import './KgTable.Info.less';
|
|
3
|
+
export declare const getProps: () => {
|
|
4
|
+
/**
|
|
5
|
+
* 行数.
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
8
|
+
kgTotal: {
|
|
9
|
+
type: PropType<number>;
|
|
10
|
+
default: number;
|
|
11
|
+
};
|
|
12
|
+
/** 是否显示'清空'按钮. */
|
|
13
|
+
kgShowClearCheck: PropType<boolean>;
|
|
14
|
+
/** 是否显示'清空表格'按钮. */
|
|
15
|
+
kgShowClearTable: PropType<boolean>;
|
|
16
|
+
/** 是否显示'定位'按钮. */
|
|
17
|
+
kgShowLocate: PropType<boolean>;
|
|
18
|
+
};
|
|
19
|
+
export declare type KgTableInfoProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
|
20
|
+
declare const _default: import("vue").DefineComponent<{
|
|
21
|
+
/**
|
|
22
|
+
* 行数.
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
kgTotal: {
|
|
26
|
+
type: PropType<number>;
|
|
27
|
+
default: number;
|
|
28
|
+
};
|
|
29
|
+
/** 是否显示'清空'按钮. */
|
|
30
|
+
kgShowClearCheck: PropType<boolean>;
|
|
31
|
+
/** 是否显示'清空表格'按钮. */
|
|
32
|
+
kgShowClearTable: PropType<boolean>;
|
|
33
|
+
/** 是否显示'定位'按钮. */
|
|
34
|
+
kgShowLocate: PropType<boolean>;
|
|
35
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
36
|
+
/**
|
|
37
|
+
* 行数.
|
|
38
|
+
* @default 0
|
|
39
|
+
*/
|
|
40
|
+
kgTotal: {
|
|
41
|
+
type: PropType<number>;
|
|
42
|
+
default: number;
|
|
43
|
+
};
|
|
44
|
+
/** 是否显示'清空'按钮. */
|
|
45
|
+
kgShowClearCheck: PropType<boolean>;
|
|
46
|
+
/** 是否显示'清空表格'按钮. */
|
|
47
|
+
kgShowClearTable: PropType<boolean>;
|
|
48
|
+
/** 是否显示'定位'按钮. */
|
|
49
|
+
kgShowLocate: PropType<boolean>;
|
|
50
|
+
}>>, {
|
|
51
|
+
kgTotal: number;
|
|
52
|
+
}>;
|
|
53
|
+
export default _default;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
2
|
import { ColumnsType } from 'ant-design-vue/es/table';
|
|
3
|
-
import {
|
|
3
|
+
import { IKgTableRecord } from './index.vm';
|
|
4
|
+
export declare type IUseColumns = {
|
|
5
|
+
columns: ComputedRef<ColumnsType<IKgTableRecord>>;
|
|
6
|
+
scrollX: ComputedRef<string>;
|
|
7
|
+
};
|
|
4
8
|
/**
|
|
5
9
|
* 表格的列.
|
|
6
10
|
*/
|
|
7
|
-
export declare function
|
|
8
|
-
columns: Ref<UnwrapRef<ColumnsType<IKgTableRow>>>;
|
|
9
|
-
};
|
|
11
|
+
export declare function _useColumns(): IUseColumns;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { IKgTableRowDoubleClickCb, KgTableStore } from './index.store';
|
|
3
|
+
export declare type IUseKgTable = {
|
|
4
|
+
kgTableStore: KgTableStore;
|
|
5
|
+
/** 当前勾选的行. */
|
|
6
|
+
selectedRows: ComputedRef<ReturnType<KgTableStore['getSelectedRows']>>;
|
|
7
|
+
/** 是否已经加载过一次了. */
|
|
8
|
+
isRetrieved: ComputedRef<ReturnType<KgTableStore['getIsRetrieved']>>;
|
|
9
|
+
/** 监听双击事件. */
|
|
10
|
+
onRowDoubleClick(cb: IKgTableRowDoubleClickCb): void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @param formID 界面标识.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useKgTable(formID?: string): IUseKgTable;
|
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
import { StoreDefinition } from 'pinia';
|
|
2
|
-
import {
|
|
2
|
+
import { IKgTableRecord } from './index.vm';
|
|
3
|
+
/** 事件类型. */
|
|
4
|
+
export declare type IKgTableEvent = 'rowDoubleClick';
|
|
5
|
+
/** '双击某行'事件监听函数. */
|
|
6
|
+
export declare type IKgTableRowDoubleClickCb = (record: IKgTableRecord) => void;
|
|
3
7
|
export interface KgTableState {
|
|
4
8
|
/** 勾选的行. */
|
|
5
|
-
selectedRowsMap: Map<string, Array<
|
|
9
|
+
selectedRowsMap: Map<string, Array<IKgTableRecord>>;
|
|
10
|
+
/**
|
|
11
|
+
* 是否已经查询过一次了.
|
|
12
|
+
* 如果表格禁用了自动查询, 当用户手动点击查询按钮后, 该属性为 true.
|
|
13
|
+
* 如果表格启用了自动查询, 当第一次自动查询之后, 该属性为 true.
|
|
14
|
+
*/
|
|
15
|
+
isRetrievedMap: Map<string, boolean>;
|
|
16
|
+
/** '双击某行'事件监听函数列表. */
|
|
17
|
+
onRowDoubleClickListenersMap: Map<string, Array<IKgTableRowDoubleClickCb>>;
|
|
6
18
|
}
|
|
7
|
-
export declare type
|
|
8
|
-
getSelectedRows(): (formID?: string | null) => Array<
|
|
19
|
+
export declare type KgTableStoreDefinition = StoreDefinition<'KgTable', KgTableState, {
|
|
20
|
+
getSelectedRows(): (formID?: string | null) => Array<IKgTableRecord> | null;
|
|
21
|
+
getIsRetrieved(): (formID?: string | null) => boolean | null;
|
|
9
22
|
}, {
|
|
10
|
-
|
|
23
|
+
dispose: (formID?: string | null) => void;
|
|
24
|
+
addEventListener: (formID: string, event: IKgTableEvent, cb: IKgTableRowDoubleClickCb) => void;
|
|
25
|
+
removeEventListener: (formID: string, event: IKgTableEvent, cb?: IKgTableRowDoubleClickCb) => void;
|
|
26
|
+
emit: (formID: string, event: IKgTableEvent, record?: any | null) => void;
|
|
27
|
+
setSelectedRows(formID: string, selectedRows: Array<IKgTableRecord>): void;
|
|
28
|
+
setIsRetrieved(formID: string, value: boolean): void;
|
|
11
29
|
}>;
|
|
12
|
-
export declare
|
|
30
|
+
export declare type KgTableStore = ReturnType<KgTableStoreDefinition>;
|
|
31
|
+
export declare const useKgTableStore: () => KgTableStoreDefinition;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export interface IKgTableRow {
|
|
1
|
+
import { ColumnType } from 'ant-design-vue/es/table/interface';
|
|
2
|
+
/** 表格的行对象. */
|
|
3
|
+
export declare type IKgTableRecord<T = {}> = {
|
|
5
4
|
id?: string | null;
|
|
6
5
|
[index: string]: any;
|
|
6
|
+
} & {
|
|
7
|
+
[K in keyof T]: T[K];
|
|
8
|
+
};
|
|
9
|
+
/** 表体的单元格插槽参数. */
|
|
10
|
+
export interface IKgTableBodyCell<T = {}> {
|
|
11
|
+
text: any | null;
|
|
12
|
+
value: any | null;
|
|
13
|
+
index: number;
|
|
14
|
+
record: IKgTableRecord<T>;
|
|
15
|
+
column: ColumnType;
|
|
16
|
+
defaultRender: JSX.Element;
|
|
7
17
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './index.
|
|
1
|
+
export * from './index.hooks';
|
|
2
2
|
export * from './index.store';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { IKgVarStore } from './index.store';
|
|
3
|
+
import { VarProfileDetail } from '../../apis/WMS/models';
|
|
4
|
+
export declare type IUseKgVar = {
|
|
5
|
+
formID: string;
|
|
6
|
+
kgVarStore: IKgVarStore;
|
|
7
|
+
varButtons: ComputedRef<ReturnType<IKgVarStore['getVarButtons']>>;
|
|
8
|
+
varGridConfig: ComputedRef<ReturnType<IKgVarStore['getVarGridConfig']>>;
|
|
9
|
+
/** 所有查询条件. */
|
|
10
|
+
varProfileMasters: ComputedRef<ReturnType<IKgVarStore['getVarProfileMasters']>>;
|
|
11
|
+
/** 当前查询条件. */
|
|
12
|
+
currentVarProfileMaster: ComputedRef<ReturnType<IKgVarStore['getCurrentVarProfileMaster']>>;
|
|
13
|
+
/** 当前查询条件 ID. */
|
|
14
|
+
currentVarProfileMasterID: ComputedRef<ReturnType<IKgVarStore['getCurrentVarProfileMasterID']>>;
|
|
15
|
+
/** 所有查询字段. */
|
|
16
|
+
varProfileDetails: ComputedRef<Array<VarProfileDetail>>;
|
|
17
|
+
/** 所有要显示的查询字段. */
|
|
18
|
+
visibleVarProfileDetails: ComputedRef<Array<VarProfileDetail>>;
|
|
19
|
+
t1: (varName?: string | null) => ComputedRef<string>;
|
|
20
|
+
t2: (varName?: string | null) => string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 启用变量.
|
|
24
|
+
* 1. 在子组件中调用时, 可以不传该参数, 此时会通过依赖注入获取.
|
|
25
|
+
* 2. 在寄生页面中想访问宿主页面的变量配置时, 需要传宿主页面的界面标识.
|
|
26
|
+
* 3. 在组件外调用时, 必须传界面标识.
|
|
27
|
+
* @param formID 界面标识.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useKgVar(formID?: string): IUseKgVar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type StoreDefinition } from 'pinia';
|
|
2
|
-
import { VarCatalog, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup } from '../../apis/WMS/models';
|
|
2
|
+
import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO } from '../../apis/WMS/models';
|
|
3
3
|
export interface KgVarState {
|
|
4
4
|
/**
|
|
5
5
|
* 当前可能打开了多个界面, 需要按照先后顺序记录下来, 当打开变量配置弹窗时, 打开的是最近那个页面的变量配置.
|
|
@@ -9,6 +9,20 @@ export interface KgVarState {
|
|
|
9
9
|
varCatalogsMap: Map<string, Array<VarCatalog>>;
|
|
10
10
|
/** 变量查找. */
|
|
11
11
|
varLookupsMap: Map<string, Array<VarLookup>>;
|
|
12
|
+
/** 变量下拉列表配置. */
|
|
13
|
+
varPossibilitiesMap: Map<string, Array<VarPossibility>>;
|
|
14
|
+
/** 变量控件配置. */
|
|
15
|
+
varConfigsMap: Map<string, Array<VarConfig>>;
|
|
16
|
+
/** 按钮. */
|
|
17
|
+
varButtonsMap: Map<string, Array<VarButton>>;
|
|
18
|
+
/** 查询条件. */
|
|
19
|
+
varProfileMap: Map<string, {
|
|
20
|
+
varProfile: VarProfileDTO | null;
|
|
21
|
+
/** 当前查询条件. */
|
|
22
|
+
currentVarProfileMasterID: string | null;
|
|
23
|
+
}>;
|
|
24
|
+
/** 表格配置. */
|
|
25
|
+
varGridConfigMap: Map<string, VarGridConfig | null>;
|
|
12
26
|
/** 表格. */
|
|
13
27
|
varGridMap: Map<string, {
|
|
14
28
|
varGrid: VarGridDTO | null;
|
|
@@ -16,18 +30,29 @@ export interface KgVarState {
|
|
|
16
30
|
currentVarGridMasterID: string | null;
|
|
17
31
|
}>;
|
|
18
32
|
}
|
|
19
|
-
export declare type
|
|
33
|
+
export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', KgVarState, {
|
|
20
34
|
getTopFormID(): string | null;
|
|
21
35
|
getVarCatalogs(): (formID?: string | null) => Array<VarCatalog> | null;
|
|
22
36
|
getVarCatalog(): (formID?: string | null, varName?: string | null) => VarCatalog | null;
|
|
23
37
|
getVarLookup(): (formID?: string | null, varName?: string | null) => VarLookup | null;
|
|
38
|
+
getVarPossibility(): (formID?: string | null, varName?: string | null) => VarPossibility | null;
|
|
39
|
+
getVarConfig(): (formID?: string | null, varName?: string | null) => VarConfig | null;
|
|
40
|
+
getVarButtons(): (formID?: string | null) => Array<VarButton> | null;
|
|
41
|
+
getVarButtonSearch(): (formID?: string | null) => VarButton | null;
|
|
42
|
+
getVarButton(): (formID?: string | null, varName?: string | null) => VarButton | null;
|
|
43
|
+
getVarProfileMasters(): (formID?: string | null) => Array<VarProfileMasterDTO> | null;
|
|
44
|
+
getVarProfileDetails(): (formID?: string | null) => Array<VarProfileDetail> | null;
|
|
45
|
+
getCurrentVarProfileMaster(): (formID?: string | null) => VarProfileMasterDTO | null;
|
|
46
|
+
getCurrentVarProfileMasterID(): (formID?: string | null) => string | null;
|
|
47
|
+
getVarGridConfig(): (formID?: string | null) => VarGridConfig | null;
|
|
24
48
|
getVarGridMasters(): (formID?: string | null) => Array<VarGridMasterDTO> | null;
|
|
25
49
|
getVarGridMaster(): (formID?: string | null) => VarGridMasterDTO | null;
|
|
26
50
|
getVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
|
|
27
51
|
}, {
|
|
28
52
|
leave(formID: string): void;
|
|
29
|
-
deleteAll(formID: string): void;
|
|
30
53
|
retrieveAll(formID?: string | null): Promise<void>;
|
|
31
54
|
enter(formID: string): Promise<void>;
|
|
55
|
+
setCurrentVarProfileMasterID(formID: string, currentVarProfileMasterID: string): void;
|
|
32
56
|
}>;
|
|
33
|
-
export declare
|
|
57
|
+
export declare type IKgVarStore = ReturnType<IKgVarStoreDefinition>;
|
|
58
|
+
export declare const useKgVarStore: () => IKgVarStoreDefinition;
|
|
@@ -18,10 +18,24 @@ declare const _default: {
|
|
|
18
18
|
cancel: string;
|
|
19
19
|
confirm: string;
|
|
20
20
|
lookup: string;
|
|
21
|
+
button: string;
|
|
21
22
|
confirmDelete: string;
|
|
23
|
+
deleteSuccess: string;
|
|
24
|
+
emptyText: string;
|
|
22
25
|
KgSearch: {
|
|
23
26
|
title: string;
|
|
24
27
|
};
|
|
28
|
+
KgTable: {
|
|
29
|
+
emptyText: string;
|
|
30
|
+
totalText: string;
|
|
31
|
+
};
|
|
32
|
+
KgTableInfo: {
|
|
33
|
+
check: string;
|
|
34
|
+
row: string;
|
|
35
|
+
clearCheck: string;
|
|
36
|
+
locate: string;
|
|
37
|
+
clearTable: string;
|
|
38
|
+
};
|
|
25
39
|
};
|
|
26
40
|
};
|
|
27
41
|
export default _default;
|