@kengic/vue 0.2.2-beta.13 → 0.2.2-beta.15

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.
@@ -1,15 +1,17 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { IKgTableRowDoubleClickCb, KgTableStore } from './index.store';
2
+ import { IKgTableRetrieveCb, IKgTableRowDoubleClickCb, KgTableStore } from './index.store';
3
3
  export declare type IUseKgTable = {
4
4
  formID: string;
5
5
  /** 状态数据. */
6
- kgTableStore: KgTableStore;
6
+ store: KgTableStore;
7
7
  /** 当前勾选的行. */
8
8
  selectedRows: ComputedRef<ReturnType<KgTableStore['getSelectedRows']>>;
9
9
  /** 是否正在查询. */
10
10
  isRetrieving: ComputedRef<ReturnType<KgTableStore['getIsRetrieving']>>;
11
- /** 监听双击事件. */
11
+ /** 监听事件: 双击某行. */
12
12
  onRowDoubleClick(cb: IKgTableRowDoubleClickCb): void;
13
+ /** 监听事件: 查询数据成功. */
14
+ onRetrieve(cb: IKgTableRetrieveCb): void;
13
15
  };
14
16
  /**
15
17
  * @param formID 界面标识.
@@ -1,9 +1,16 @@
1
1
  import { StoreDefinition } from 'pinia';
2
2
  import { IKgTableRecord } from './index.vm';
3
- /** 事件类型. */
4
- export declare type IKgTableEvent = 'rowDoubleClick';
5
- /** '双击某行'事件监听函数. */
3
+ import { IPage } from '../../apis/WMS/models';
4
+ /**
5
+ * 事件类型.
6
+ * 'rowDoubleClick': 双击某行
7
+ * 'retrieve': 查询数据成功
8
+ */
9
+ export declare type IKgTableEvent = 'rowDoubleClick' | 'retrieve';
10
+ /** 事件监听函数: 双击某行. */
6
11
  export declare type IKgTableRowDoubleClickCb = (record: IKgTableRecord) => void;
12
+ /** 事件监听函数: 查询数据成功. */
13
+ export declare type IKgTableRetrieveCb = (page: IPage<IKgTableRecord> | undefined | null) => void;
7
14
  export interface KgTableState {
8
15
  /** 勾选的行. */
9
16
  selectedRowsMap: Map<string, Array<IKgTableRecord>>;
@@ -18,7 +25,8 @@ export interface KgTableState {
18
25
  /** 表格宽度. */
19
26
  tableWidthMap: Map<string, number>;
20
27
  /** '双击某行'事件监听函数列表. */
21
- onRowDoubleClickListenersMap: Map<string, Array<IKgTableRowDoubleClickCb>>;
28
+ rowDoubleClickListenersMap: Map<string, Array<IKgTableRowDoubleClickCb>>;
29
+ retrieveListenersMap: Map<string, Array<IKgTableRetrieveCb>>;
22
30
  }
23
31
  export declare type KgTableStoreDefinition = StoreDefinition<'KgTable', KgTableState, {
24
32
  getSelectedRows(): (formID?: string | null) => Array<IKgTableRecord> | null;
@@ -27,8 +35,8 @@ export declare type KgTableStoreDefinition = StoreDefinition<'KgTable', KgTableS
27
35
  getTableWidth(): (formID?: string | null) => number | null;
28
36
  }, {
29
37
  dispose: (formID?: string | null) => void;
30
- addEventListener: (formID: string, event: IKgTableEvent, cb: IKgTableRowDoubleClickCb) => void;
31
- removeEventListener: (formID: string, event: IKgTableEvent, cb?: IKgTableRowDoubleClickCb) => void;
38
+ addEventListener: (formID: string, event: IKgTableEvent, cb: IKgTableRowDoubleClickCb | IKgTableRetrieveCb) => void;
39
+ removeEventListener: (formID: string, event: IKgTableEvent, cb?: IKgTableRowDoubleClickCb | IKgTableRetrieveCb) => void;
32
40
  emit: (formID: string, event: IKgTableEvent, record?: any | null) => void;
33
41
  setSelectedRows(formID: string, selectedRows: Array<IKgTableRecord>): void;
34
42
  setIsRetrieved(formID: string, value: boolean): void;
@@ -7,30 +7,22 @@ export interface KgVarState {
7
7
  formIDs: Array<string>;
8
8
  /** 正在查询变量配置. */
9
9
  isRetrievingMap: Map<string, boolean>;
10
- /** 变量别名. */
11
10
  varCatalogsMap: Map<string, Array<VarCatalog>>;
12
- /** 变量查找. */
13
11
  varLookupsMap: Map<string, Array<VarLookup>>;
14
- /** 变量下拉列表配置. */
15
12
  varPossibilitiesMap: Map<string, Array<VarPossibility>>;
16
- /** 变量控件配置. */
17
13
  varConfigsMap: Map<string, Array<VarConfig>>;
18
- /** 按钮. */
19
14
  varButtonsMap: Map<string, Array<VarButton>>;
20
- /** 查询条件. */
21
15
  varProfileMap: Map<string, {
22
16
  varProfile: VarProfileDTO | null;
23
- /** 当前查询条件. */
17
+ /** 当前选中的 VarProfileMaster ID. */
24
18
  currentVarProfileMasterID: string | null;
25
19
  }>;
26
- /** 表格配置. */
27
- varGridConfigMap: Map<string, VarGridConfig | null>;
28
- /** 表格. */
29
20
  varGridMap: Map<string, {
30
21
  varGrid: VarGridDTO | null;
31
22
  /** 当前表格视图. */
32
23
  currentVarGridMasterID: string | null;
33
24
  }>;
25
+ varGridConfigMap: Map<string, VarGridConfig | null>;
34
26
  }
35
27
  export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', KgVarState, {
36
28
  getTopFormID(): string | null;
@@ -50,17 +42,35 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', KgVarState,
50
42
  getVarGridConfig(): (formID?: string | null) => VarGridConfig | null;
51
43
  getVarGridMasters(): (formID?: string | null) => Array<VarGridMasterDTO> | null;
52
44
  getVarGridMaster(): (formID?: string | null) => VarGridMasterDTO | null;
53
- getVisibleVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
54
- getVisibleVarGridDetailsTotalWidth(): (formID?: string | null) => number | null;
55
45
  getVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
56
46
  getVarGridDetail(): (formID?: string | null, var_nam?: string | null) => VarGridDetail | null;
47
+ /**
48
+ * 根据 formID 获取系统的 VarGridDetail 列表, 即 customLevel 为 0 的 VarGridMaster 下面的所有 VarGridDetail.
49
+ * @param formID 界面标识.
50
+ */
51
+ getSystemVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
52
+ getVisibleVarGridDetails(): (formID?: string | null) => Array<VarGridDetail> | null;
53
+ getVisibleVarGridDetailsTotalWidth(): (formID?: string | null) => number | null;
57
54
  }, {
58
55
  enter(formID: string): Promise<void>;
59
56
  leave(formID: string): void;
60
57
  retrieve(formID?: string | null): Promise<void>;
61
58
  setIsRetrieving(formID: string, value: boolean): void;
62
59
  setCurrentVarProfileMasterID(formID: string, currentVarProfileMasterID: string): void;
60
+ /**
61
+ * 设置列的宽度.
62
+ * @param formID 界面标识.
63
+ * @param var_nam 变量名称.
64
+ * @param width 新的宽度.
65
+ */
63
66
  setVarGridDetailWidth(formID: string, var_nam: string | null | undefined, width: number): void;
67
+ /**
68
+ * 设置列的可见.
69
+ * @param formID 界面标识.
70
+ * @param var_nam 变量名称.
71
+ * @param visible 是否科技.
72
+ */
73
+ setVarGridDetailVisible(formID: string, var_nam: string | null | undefined, visible: number): void;
64
74
  /**
65
75
  * 设置某个变量下拉列表配置.
66
76
  * @param formID 界面标识.
@@ -4,6 +4,7 @@ declare const _default: {
4
4
  title: string;
5
5
  };
6
6
  KgTable: {
7
+ column: string;
7
8
  emptyText: string;
8
9
  totalText: string;
9
10
  };
@@ -5,6 +5,7 @@ export declare const KG_I18N: {
5
5
  title: string;
6
6
  };
7
7
  KgTable: {
8
+ column: string;
8
9
  emptyText: string;
9
10
  totalText: string;
10
11
  };
@@ -48,6 +49,7 @@ export declare const KG_I18N: {
48
49
  title: string;
49
50
  };
50
51
  KgTable: {
52
+ column: string;
51
53
  emptyText: string;
52
54
  totalText: string;
53
55
  };
@@ -4,6 +4,7 @@ declare const _default: {
4
4
  title: string;
5
5
  };
6
6
  KgTable: {
7
+ column: string;
7
8
  emptyText: string;
8
9
  totalText: string;
9
10
  };
@@ -53,4 +53,8 @@ export declare class KgUtil {
53
53
  * 是否是表单验证错误.
54
54
  */
55
55
  static isFormValidateError(e: any): boolean;
56
+ /** 显示全局遮罩. */
57
+ static showLoading(): void;
58
+ /** 隐藏全局遮罩. */
59
+ static hideLoading(): void;
56
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.2.2-beta.13",
3
+ "version": "0.2.2-beta.15",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",