@kengic/vue 0.23.0 → 0.23.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +9391 -8199
  4. package/dist/project/build/script/buildConf.ts +1 -2
  5. package/dist/project/build/script/postBuild.ts +1 -1
  6. package/dist/project/src/api/sys/model/userModel.ts +1 -0
  7. package/dist/setting-outlined.7f72790b.mjs +8 -0
  8. package/dist/src/apis/WMS/Controllers/DescriptionController/List.d.ts +2 -0
  9. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/index.d.ts +0 -7
  10. package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/ExecuteQuery.d.ts +18 -0
  11. package/dist/src/apis/WMS/Controllers/VarConfigPossibilityController/index.d.ts +1 -0
  12. package/dist/src/apis/WMS/Controllers/WhController/ListVO.d.ts +2 -0
  13. package/dist/src/apis/WMS/Controllers/index.d.ts +1 -0
  14. package/dist/src/apis/WMS/models.d.ts +27 -11
  15. package/dist/src/components/KgAppSelect/index.hooks.d.ts +3 -3
  16. package/dist/src/components/KgAppSelect/index.store.d.ts +30 -29
  17. package/dist/src/components/KgButton/KgButton.Item.d.ts +15 -15
  18. package/dist/src/components/KgButton/KgButton.Item.data.d.ts +15 -15
  19. package/dist/src/components/KgButton/KgButton.d.ts +18 -12
  20. package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +14 -14
  21. package/dist/src/components/KgButton/components/KgButton.Create.d.ts +14 -14
  22. package/dist/src/components/KgButton/components/KgButton.Delete.d.ts +15 -15
  23. package/dist/src/components/KgButton/components/KgButton.Export.d.ts +14 -14
  24. package/dist/src/components/KgButton/components/KgButton.ExportTemplate.d.ts +14 -14
  25. package/dist/src/components/KgButton/components/KgButton.Import.d.ts +14 -14
  26. package/dist/src/components/KgButton/components/KgButton.Other.d.ts +15 -15
  27. package/dist/src/components/KgButton/components/KgButton.Search.d.ts +15 -15
  28. package/dist/src/components/KgButton/components/KgButton.Update.d.ts +14 -14
  29. package/dist/src/components/KgButton/index.d.ts +4 -4
  30. package/dist/src/components/KgButton/index.hooks.d.ts +7 -5
  31. package/dist/src/components/KgButton/index.store.d.ts +19 -16
  32. package/dist/src/components/KgForm/KgForm.d.ts +3 -3
  33. package/dist/src/components/KgForm/index.d.ts +4 -4
  34. package/dist/src/components/KgForm/index.hooks.d.ts +21 -8
  35. package/dist/src/components/KgForm/index.store.d.ts +74 -34
  36. package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +3 -3
  37. package/dist/src/components/KgForm.Item/KgForm.Item.service.d.ts +3 -3
  38. package/dist/src/components/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +8 -7
  39. package/dist/src/components/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +6 -7
  40. package/dist/src/components/KgForm.Item/components/KgForm.Item.Date.d.ts +6 -5
  41. package/dist/src/components/KgForm.Item/components/KgForm.Item.DateRange.d.ts +6 -5
  42. package/dist/src/components/KgForm.Item/components/KgForm.Item.Image.d.ts +3 -3
  43. package/dist/src/components/KgForm.Item/components/KgForm.Item.Input.d.ts +6 -5
  44. package/dist/src/components/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +6 -5
  45. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +6 -5
  46. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +7 -3
  47. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.service.d.ts +16 -13
  48. package/dist/src/components/KgForm.Item/components/KgForm.Item.Switch.d.ts +6 -5
  49. package/dist/src/components/KgForm.Item/components/KgForm.Item.TextArea.d.ts +6 -5
  50. package/dist/src/components/KgForm.Item/index.d.ts +1 -1
  51. package/dist/src/components/KgForm.Item/index.vm.d.ts +9 -7
  52. package/dist/src/components/KgModal/KgModal.d.ts +105 -21
  53. package/dist/src/components/KgModal/KgModal.service.d.ts +1 -1
  54. package/dist/src/components/KgModal/components/KgModal.HeaderButtons.d.ts +18 -0
  55. package/dist/src/components/KgResizable/KgResizable.d.ts +55 -55
  56. package/dist/src/components/KgSearch/KgSearch.d.ts +0 -16
  57. package/dist/src/components/KgSearch/KgSearch.service.d.ts +20 -16
  58. package/dist/src/components/KgSearch/index.hooks.d.ts +30 -12
  59. package/dist/src/components/KgSearch/index.store.d.ts +44 -37
  60. package/dist/src/components/KgSubmit/index.hooks.d.ts +48 -15
  61. package/dist/src/components/KgSubmit/index.store.d.ts +53 -47
  62. package/dist/src/components/KgSubmit/index.vm.d.ts +2 -1
  63. package/dist/src/components/KgTable/components/setting/KgTable.Setting.service.d.ts +1 -1
  64. package/dist/src/components/KgTable/index.hooks.d.ts +23 -8
  65. package/dist/src/components/KgTable/index.store.d.ts +48 -34
  66. package/dist/src/components/KgTable/index.vm.d.ts +1 -1
  67. package/dist/src/components/KgVar/index.hooks.d.ts +15 -11
  68. package/dist/src/components/KgVar/index.store.d.ts +55 -60
  69. package/dist/src/components/KgVar/index.store.service.d.ts +2 -1
  70. package/dist/src/components/KgVar/index.vm.d.ts +7 -7
  71. package/dist/src/components/KgVarConfig/components/KgVarConfig.Modal.d.ts +1 -1
  72. package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +6 -23
  73. package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +0 -16
  74. package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.d.ts +4 -21
  75. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigInput.d.ts +2 -0
  76. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigLookup.d.ts +2 -0
  77. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigPossibility.d.ts +2 -0
  78. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarConfigTip.d.ts +2 -0
  79. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.VarVariable.d.ts +2 -0
  80. package/dist/src/components/KgVarConfig/index.d.ts +1 -0
  81. package/dist/src/components/KgVarConfig/index.hooks.d.ts +17 -0
  82. package/dist/src/components/KgVarConfig/index.store.d.ts +29 -16
  83. package/dist/src/components/KgVarConfig/index.vm.d.ts +40 -0
  84. package/dist/src/components/KgWarehouse/index.hooks.d.ts +10 -6
  85. package/dist/src/components/KgWarehouse/index.store.d.ts +15 -14
  86. package/dist/src/components/util.d.ts +7 -7
  87. package/dist/src/consts/i18n/en.d.ts +31 -11
  88. package/dist/src/consts/i18n/zh_CN.d.ts +31 -11
  89. package/dist/src/consts/index.d.ts +0 -284
  90. package/dist/src/consts/index.vm.d.ts +435 -24
  91. package/dist/src/helpers/ant-design-vue.d.ts +1 -1
  92. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.Button.d.ts +0 -1
  93. package/dist/src/pages/KgPageDda/components/KgPageDda.Create.store.d.ts +117 -192
  94. package/dist/src/pages/KgPageDda/{index.const.d.ts → index.vm.d.ts} +1 -0
  95. package/dist/src/services/http-client.d.ts +2 -2
  96. package/dist/src/utils/kg-var.util.d.ts +4 -3
  97. package/dist/src/utils/kg.util.d.ts +42 -25
  98. package/package.json +2 -2
  99. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Delete.d.ts +0 -18
  100. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/DeleteBatch.d.ts +0 -18
  101. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/Edit.d.ts +0 -16
  102. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ExportXls.d.ts +0 -30
  103. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/ImportExcel.d.ts +0 -15
  104. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/List.d.ts +0 -37
  105. package/dist/src/apis/WMS/Controllers/VarConfigDescriptionController/QueryById.d.ts +0 -19
  106. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.CreateModal.d.ts +0 -32
  107. /package/dist/src/components/KgTable/components/setting/config/{KgTable.Setting.ConfigModal.VarGridMaster.hooks.d.ts → KgTable.Setting.ConfigModal.VarGridMaster.service.d.ts} +0 -0
  108. /package/dist/src/components/KgVarConfig/components/var/{KgVarConfig.Modal.Var.Vars.d.ts → KgVarConfig.Modal.Var.VarConfigControl.d.ts} +0 -0
@@ -1,21 +1,17 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
2
  import './KgResizable.less';
3
3
  export declare const getProps: () => {
4
- /** 拖拽条的位置. */
5
- kgType: {
6
- type: PropType<"top" | "left" | "right" | "bottom">;
7
- default: string;
8
- };
4
+ /** 样式. */
5
+ kgClass: PropType<string>;
9
6
  /** 是否禁用. */
10
7
  kgDisabled: PropType<boolean>;
11
- /** 当前宽度. */
12
- kgWidth: {
8
+ /** 当前高度. */
9
+ kgHeight: {
13
10
  type: PropType<number>;
14
11
  default: number;
15
12
  };
16
- 'onUpdate:kgWidth': PropType<(value: number) => void>;
17
- /** 最小宽度. */
18
- kgMinWidth: {
13
+ /** 最大高度. */
14
+ kgMaxHeight: {
19
15
  type: PropType<number>;
20
16
  default: number;
21
17
  };
@@ -24,120 +20,124 @@ export declare const getProps: () => {
24
20
  type: PropType<number>;
25
21
  default: number;
26
22
  };
27
- /** 当前高度. */
28
- kgHeight: {
29
- type: PropType<number>;
30
- default: number;
31
- };
32
- 'onUpdate:kgHeight': PropType<(value: number) => void>;
33
23
  /** 最小高度. */
34
24
  kgMinHeight: {
35
25
  type: PropType<number>;
36
26
  default: number;
37
27
  };
38
- /** 最大高度. */
39
- kgMaxHeight: {
28
+ /** 最小宽度. */
29
+ kgMinWidth: {
40
30
  type: PropType<number>;
41
31
  default: number;
42
32
  };
43
- /** 样式. */
44
- kgClass: PropType<string>;
45
- };
46
- export declare type IKgResizableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
47
- declare const _default: import("vue").DefineComponent<{
48
33
  /** 拖拽条的位置. */
49
34
  kgType: {
50
- type: PropType<"top" | "left" | "right" | "bottom">;
35
+ type: PropType<"left" | "right" | "top" | "bottom">;
51
36
  default: string;
52
37
  };
53
- /** 是否禁用. */
54
- kgDisabled: PropType<boolean>;
55
38
  /** 当前宽度. */
56
39
  kgWidth: {
57
40
  type: PropType<number>;
58
41
  default: number;
59
42
  };
43
+ 'onUpdate:kgHeight': PropType<(value: number) => void>;
60
44
  'onUpdate:kgWidth': PropType<(value: number) => void>;
61
- /** 最小宽度. */
62
- kgMinWidth: {
45
+ };
46
+ export declare type IKgResizableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
47
+ declare const _default: import("vue").DefineComponent<{
48
+ /** 样式. */
49
+ kgClass: PropType<string>;
50
+ /** 是否禁用. */
51
+ kgDisabled: PropType<boolean>;
52
+ /** 当前高度. */
53
+ kgHeight: {
63
54
  type: PropType<number>;
64
55
  default: number;
65
56
  };
66
- /** 最大宽度. */
67
- kgMaxWidth: {
57
+ /** 最大高度. */
58
+ kgMaxHeight: {
68
59
  type: PropType<number>;
69
60
  default: number;
70
61
  };
71
- /** 当前高度. */
72
- kgHeight: {
62
+ /** 最大宽度. */
63
+ kgMaxWidth: {
73
64
  type: PropType<number>;
74
65
  default: number;
75
66
  };
76
- 'onUpdate:kgHeight': PropType<(value: number) => void>;
77
67
  /** 最小高度. */
78
68
  kgMinHeight: {
79
69
  type: PropType<number>;
80
70
  default: number;
81
71
  };
82
- /** 最大高度. */
83
- kgMaxHeight: {
72
+ /** 最小宽度. */
73
+ kgMinWidth: {
84
74
  type: PropType<number>;
85
75
  default: number;
86
76
  };
87
- /** 样式. */
88
- kgClass: PropType<string>;
89
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:kgWidth" | "update:kgHeight")[], "update:kgWidth" | "update:kgHeight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
90
77
  /** 拖拽条的位置. */
91
78
  kgType: {
92
- type: PropType<"top" | "left" | "right" | "bottom">;
79
+ type: PropType<"left" | "right" | "top" | "bottom">;
93
80
  default: string;
94
81
  };
95
- /** 是否禁用. */
96
- kgDisabled: PropType<boolean>;
97
82
  /** 当前宽度. */
98
83
  kgWidth: {
99
84
  type: PropType<number>;
100
85
  default: number;
101
86
  };
87
+ 'onUpdate:kgHeight': PropType<(value: number) => void>;
102
88
  'onUpdate:kgWidth': PropType<(value: number) => void>;
103
- /** 最小宽度. */
104
- kgMinWidth: {
89
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:kgWidth" | "update:kgHeight")[], "update:kgWidth" | "update:kgHeight", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
90
+ /** 样式. */
91
+ kgClass: PropType<string>;
92
+ /** 是否禁用. */
93
+ kgDisabled: PropType<boolean>;
94
+ /** 当前高度. */
95
+ kgHeight: {
105
96
  type: PropType<number>;
106
97
  default: number;
107
98
  };
108
- /** 最大宽度. */
109
- kgMaxWidth: {
99
+ /** 最大高度. */
100
+ kgMaxHeight: {
110
101
  type: PropType<number>;
111
102
  default: number;
112
103
  };
113
- /** 当前高度. */
114
- kgHeight: {
104
+ /** 最大宽度. */
105
+ kgMaxWidth: {
115
106
  type: PropType<number>;
116
107
  default: number;
117
108
  };
118
- 'onUpdate:kgHeight': PropType<(value: number) => void>;
119
109
  /** 最小高度. */
120
110
  kgMinHeight: {
121
111
  type: PropType<number>;
122
112
  default: number;
123
113
  };
124
- /** 最大高度. */
125
- kgMaxHeight: {
114
+ /** 最小宽度. */
115
+ kgMinWidth: {
126
116
  type: PropType<number>;
127
117
  default: number;
128
118
  };
129
- /** 样式. */
130
- kgClass: PropType<string>;
119
+ /** 拖拽条的位置. */
120
+ kgType: {
121
+ type: PropType<"left" | "right" | "top" | "bottom">;
122
+ default: string;
123
+ };
124
+ /** 当前宽度. */
125
+ kgWidth: {
126
+ type: PropType<number>;
127
+ default: number;
128
+ };
129
+ 'onUpdate:kgHeight': PropType<(value: number) => void>;
130
+ 'onUpdate:kgWidth': PropType<(value: number) => void>;
131
131
  }>> & {
132
- "onUpdate:kgWidth"?: ((...args: any[]) => any) | undefined;
133
132
  "onUpdate:kgHeight"?: ((...args: any[]) => any) | undefined;
133
+ "onUpdate:kgWidth"?: ((...args: any[]) => any) | undefined;
134
134
  }, {
135
135
  kgMaxHeight: number;
136
136
  kgMaxWidth: number;
137
137
  kgMinHeight: number;
138
138
  kgMinWidth: number;
139
- kgType: "top" | "left" | "right" | "bottom";
140
- kgWidth: number;
141
139
  kgHeight: number;
140
+ kgType: "left" | "right" | "top" | "bottom";
141
+ kgWidth: number;
142
142
  }>;
143
143
  export default _default;
@@ -6,11 +6,6 @@ export declare const getProps: () => {
6
6
  type: PropType<boolean>;
7
7
  default: undefined;
8
8
  };
9
- /** 是否将头部放到页面头部. */
10
- kgTeleportToHeader: {
11
- type: PropType<boolean>;
12
- default: undefined;
13
- };
14
9
  };
15
10
  export declare type IKgSearchProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
16
11
  declare const _default: import("vue").DefineComponent<{
@@ -19,24 +14,13 @@ declare const _default: import("vue").DefineComponent<{
19
14
  type: PropType<boolean>;
20
15
  default: undefined;
21
16
  };
22
- /** 是否将头部放到页面头部. */
23
- kgTeleportToHeader: {
24
- type: PropType<boolean>;
25
- default: undefined;
26
- };
27
17
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
28
18
  /** 是否禁用. */
29
19
  kgDisabled: {
30
20
  type: PropType<boolean>;
31
21
  default: undefined;
32
22
  };
33
- /** 是否将头部放到页面头部. */
34
- kgTeleportToHeader: {
35
- type: PropType<boolean>;
36
- default: undefined;
37
- };
38
23
  }>>, {
39
24
  kgDisabled: boolean;
40
- kgTeleportToHeader: boolean;
41
25
  }>;
42
26
  export default _default;
@@ -1,28 +1,32 @@
1
1
  import { FormInstance } from 'ant-design-vue/lib/form/Form';
2
2
  import { Ref } from 'vue';
3
- import { VarProfileDetail } from '../../apis/WMS/models';
4
- import { IKgResizableProps } from '../KgResizable';
5
3
  /** 头部高度. */
6
4
  export declare const HEADER_HEIGHT = 42;
7
- /** 一个查询字段的高度. */
8
- export declare const FORM_ITEM_HEIGHT = 38;
9
5
  /**
10
- * 根据查询字段计算默认高度.
11
- * 如果搜索字段超过三行(包含三行), 则默认高度为三行的高度, 否则为显示所有字段时的高度.
12
- * 点击头部并展开时, 高度就会设为该默认高度.
13
- *
14
- * @param varProfileDetails 查询字段列表.
15
- * @param headerTeleport 是否将头部放到顶部的导航栏中.
6
+ * 下边距的高度.
7
+ */
8
+ export declare const PADDING_BOTTOM = 6;
9
+ /**
10
+ * 下边框的高度.
16
11
  */
17
- export declare function getDefaultHeight(varProfileDetails?: Array<VarProfileDetail> | null, headerTeleport?: boolean | null): number;
12
+ export declare const BORDER_BOTTOM_WIDTH = 1;
13
+ /**
14
+ * 一个查询字段的高度.
15
+ */
16
+ export declare const FORM_ITEM_HEIGHT = 38;
18
17
  export declare function _useCommon(): {
19
18
  isVisible: import("vue").ComputedRef<boolean>;
20
- isResizable: import("vue").ComputedRef<boolean>;
21
- isTeleportToHeader: import("vue").ComputedRef<boolean>;
22
- formLevel: import("vue").ComputedRef<number>;
19
+ };
20
+ export declare function _useHeight(param: {
21
+ formContainerRef: Ref<HTMLDivElement | null>;
22
+ }): {
23
23
  defaultHeight: import("vue").ComputedRef<number>;
24
- minHeight: import("vue").ComputedRef<1 | 42>;
24
+ maxHeight: import("vue").ComputedRef<number>;
25
+ minHeight: import("vue").ComputedRef<number>;
25
26
  };
26
- export declare function _useFormModel(kgResizableRef: Ref<any | null>, formRef: Ref<FormInstance | null>, kgResizableProps: Ref<IKgResizableProps>): {
27
+ export declare function _useFormModel(param: {
28
+ kgResizableRef: Ref<any | null>;
29
+ formRef: Ref<FormInstance | null>;
30
+ }): {
27
31
  initFormModel: () => Promise<void>;
28
32
  };
@@ -1,42 +1,60 @@
1
1
  import { ComputedRef } from 'vue';
2
+ import { VarProfileDetail } from '../../apis/WMS/models';
2
3
  import { IRemoveEventListenerHandler } from '../../consts';
3
- import { IKgTableRequestParams } from '../KgTable';
4
- import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
4
+ import { IKgTableRequestParameter } from '../KgTable';
5
+ import { IKgSearchReadyEventListener, IKgSearchResetEventListener, IKgSearchSearchEventListener, IKgSearchStore } from './index.store';
5
6
  export declare type IUseKgSearch = {
7
+ /**
8
+ * 当前查询字段列表.
9
+ */
10
+ currentVarProfileDetails: ComputedRef<Array<VarProfileDetail>>;
11
+ /**
12
+ * 当前查询字段列表(可见的).
13
+ */
14
+ currentVarProfileDetailsForVisible: ComputedRef<Array<VarProfileDetail>>;
15
+ currentVarProfileMaster: ComputedRef<ReturnType<IKgSearchStore['getCurrentVarProfileMaster']>>;
16
+ /**
17
+ * 高级查询的操作符表单数据对象.
18
+ */
19
+ dynamicQueryOperatorModel: ComputedRef<ReturnType<IKgSearchStore['getDynamicQueryOperatorModel']>>;
6
20
  /**
7
21
  * 界面标识.
8
22
  */
9
23
  formID: string;
24
+ /**
25
+ * 表单数据对象.
26
+ */
27
+ formModel: ComputedRef<ReturnType<IKgSearchStore['getFormModel']>>;
10
28
  /** 是否就绪: 查询字段初始完成, 组件渲染完成. */
11
29
  isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
12
- /** 表单数据对象. */
13
- model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
30
+ /**
31
+ * 表单数据对象.
32
+ *
33
+ * @deprecated 请使用 {@link formModel}
34
+ */
35
+ model: ComputedRef<ReturnType<IKgSearchStore['getFormModel']>>;
14
36
  /**
15
37
  * 事件: ready, 查询字段初始完成, 组件渲染完成.
16
38
  * @param cb 回调函数.
17
39
  * @param once 是否只会触发一次. 默认为 undefined.
18
40
  */
19
- onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
41
+ onReady(cb: IKgSearchReadyEventListener, once?: boolean): IRemoveEventListenerHandler;
20
42
  /**
21
43
  * 事件: reset, 点击重置按钮.
22
44
  * @param cb 回调函数.
23
45
  * @param once 是否只会触发一次. 默认为 undefined.
24
46
  */
25
- onReset(cb: IKgSearchResetCb, once?: boolean): IRemoveEventListenerHandler;
47
+ onReset(cb: IKgSearchResetEventListener, once?: boolean): IRemoveEventListenerHandler;
26
48
  /**
27
49
  * 事件: search, 点击查询按钮, 并且表单验证通过.
28
50
  * @param cb 回调函数.
29
51
  * @param once 是否只会触发一次. 默认为 undefined.
30
52
  */
31
- onSearch(cb: IKgSearchSearchCb, once?: boolean): IRemoveEventListenerHandler;
32
- /**
33
- * 高级查询的操作符表单数据对象.
34
- */
35
- operatorModel: ComputedRef<ReturnType<IKgSearchStore['getOperatorModel']>>;
53
+ onSearch(cb: IKgSearchSearchEventListener, once?: boolean): IRemoveEventListenerHandler;
36
54
  /** 重置. */
37
55
  reset(): void;
38
56
  /** 查询. */
39
- search(param?: boolean | IKgTableRequestParams): void;
57
+ search(param?: boolean | IKgTableRequestParameter): void;
40
58
  /**
41
59
  * 状态数据.
42
60
  */
@@ -1,6 +1,7 @@
1
1
  import { StoreDefinition } from 'pinia';
2
- import { IKgEventCb } from '../../consts';
3
- import { IKgTableRequestParams } from '../KgTable';
2
+ import { VarProfileMasterDTO } from '../../apis/WMS/models';
3
+ import { IKgEventListener } from '../../consts';
4
+ import { IKgTableRequestParameter } from '../KgTable';
4
5
  /**
5
6
  * 事件类型.
6
7
  * 'ready': 就绪, 查询字段初始完成, 组件渲染完成
@@ -8,33 +9,35 @@ import { IKgTableRequestParams } from '../KgTable';
8
9
  * 'reset': 点击重置按钮
9
10
  */
10
11
  export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
11
- /** 事件监听函数: ready. */
12
- export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
13
- /** 事件监听函数: search. */
14
- export declare type IKgSearchSearchCb = ((param: IKgTableRequestParams) => Promise<boolean>) & IKgEventCb;
15
- /** 事件监听函数: reset. */
16
- export declare type IKgSearchResetCb = ((param: any) => Promise<boolean>) & IKgEventCb;
17
- export declare type IKgSearchCbParam = IKgTableRequestParams;
18
- export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSearchResetCb;
12
+ export declare type IKgSearchReadyEventListenerParameter = {};
13
+ export declare type IKgSearchReadyEventListener = ((param: IKgSearchReadyEventListenerParameter) => Promise<boolean>) & IKgEventListener;
14
+ export declare type IKgSearchSearchEventListenerParameter = {} & IKgTableRequestParameter;
15
+ export declare type IKgSearchSearchEventListener = ((param: IKgSearchSearchEventListenerParameter) => Promise<boolean>) & IKgEventListener;
16
+ export declare type IKgSearchResetEventListenerParameter = {};
17
+ export declare type IKgSearchResetEventListener = ((param: IKgSearchResetEventListenerParameter) => Promise<boolean>) & IKgEventListener;
18
+ export declare type IKgSearchEventListenerParameter = IKgSearchReadyEventListenerParameter | IKgSearchSearchEventListenerParameter | IKgSearchResetEventListenerParameter;
19
+ export declare type IKgSearchEventListener = IKgSearchReadyEventListener | IKgSearchSearchEventListener | IKgSearchResetEventListener;
19
20
  /** 查询方法. */
20
- export declare type IKgSearchSearchFn = (param?: IKgTableRequestParams) => void;
21
+ export declare type IKgSearchSearchFn = (param?: IKgTableRequestParameter) => void;
21
22
  /** 重置方法. */
22
23
  export declare type IKgSearchResetFn = () => void;
23
24
  export interface IUseKgSearchStoreState {
25
+ /**
26
+ * 高级查询操作符的表单数据对象.
27
+ */
28
+ dynamicOperatorModelMap: Map<string, Record<string, string>>;
29
+ /** 表单数据对象. */
30
+ formModel: Map<string, Record<string, any>>;
24
31
  /**
25
32
  * 是否就绪: 查询字段初始完成, 组件渲染完成.
26
33
  */
27
34
  isReadyMap: Map<string, boolean>;
28
- /** 表单数据对象. */
29
- modelMap: Map<string, Record<string, any>>;
30
35
  /** 事件监听函数列表: ready. */
31
- onReadyListenersMap: Map<string, Array<IKgSearchReadyCb>>;
36
+ onReadyEventListenersMap: Map<string, Array<IKgSearchReadyEventListener>>;
32
37
  /** 事件监听函数列表: reset. */
33
- onResetListenersMap: Map<string, Array<IKgSearchResetCb>>;
38
+ onResetEventListenersMap: Map<string, Array<IKgSearchResetEventListener>>;
34
39
  /** 事件监听函数列表: search. */
35
- onSearchListenersMap: Map<string, Array<IKgSearchSearchCb>>;
36
- /** 高级查询的操作符表单数据对象. */
37
- operatorModelMap: Map<string, Record<string, string>>;
40
+ onSearchEventListenersMap: Map<string, Array<IKgSearchSearchEventListener>>;
38
41
  /** 重置方法, 可供外部调用, 用来触发重置操作. */
39
42
  resetFnMap: Map<string, IKgSearchResetFn>;
40
43
  /** 查询方法, 可供外部调用, 用来触发查询操作. */
@@ -42,19 +45,23 @@ export interface IUseKgSearchStoreState {
42
45
  }
43
46
  export interface IUseKgSearchStoreGetters {
44
47
  /**
45
- * 是否就绪.
46
- *
48
+ * 获取当前的 VarProfileMaster.
49
+ */
50
+ getCurrentVarProfileMaster(): (formID: string | null | undefined) => VarProfileMasterDTO | null;
51
+ /**
47
52
  * @param formID 界面标识.
48
53
  */
49
- getIsReady(): (formID: string | null | undefined) => boolean;
54
+ getDynamicQueryOperatorModel(): (formID: string | null | undefined) => Record<string, string> | null;
50
55
  /**
51
56
  * @param formID 界面标识.
52
57
  */
53
- getModel(): (formID: string | null | undefined) => Record<string, any> | null;
58
+ getFormModel(): (formID: string | null | undefined) => Record<string, any> | null;
54
59
  /**
60
+ * 是否就绪.
61
+ *
55
62
  * @param formID 界面标识.
56
63
  */
57
- getOperatorModel(): (formID: string | null | undefined) => Record<string, string> | null;
64
+ getIsReady(): (formID: string | null | undefined) => boolean;
58
65
  /**
59
66
  * 获取重置方法.
60
67
  *
@@ -75,7 +82,7 @@ export interface IUseKgSearchStoreActions {
75
82
  * @param event 事件名称.
76
83
  * @param cb 回调函数.
77
84
  */
78
- addEventListener(formID: string, event: IKgSearchEvent, cb: IKgSearchCb): void;
85
+ addEventListener(formID: string, event: IKgSearchEvent, cb: IKgSearchEventListener): void;
79
86
  /**
80
87
  * 清理数据.
81
88
  * @param formID 页面标识.
@@ -87,41 +94,41 @@ export interface IUseKgSearchStoreActions {
87
94
  * @param event 事件名称.
88
95
  * @param param 事件参数.
89
96
  */
90
- emit(formID: string, event: IKgSearchEvent, param: IKgSearchCbParam): Promise<boolean>;
97
+ emit<T = IKgSearchEventListenerParameter>(formID: string, event: IKgSearchEvent, param: T): Promise<boolean>;
91
98
  /**
92
- * 修改查询字段的表单数据的部分属性.
99
+ * 修改查询字段的高级查询操作符的部分属性.
93
100
  *
94
101
  * @param formID 界面标识.
95
102
  * @param properties 要修改的部分属性.
96
103
  */
97
- patchModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
104
+ patchDynamicQueryOperatorModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
98
105
  /**
99
- * 修改查询字段的高级查询操作符的部分属性.
106
+ * 修改查询字段的表单数据的部分属性.
100
107
  *
101
108
  * @param formID 界面标识.
102
109
  * @param properties 要修改的部分属性.
103
110
  */
104
- patchOperatorModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
111
+ patchModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
105
112
  /**
106
113
  * 退订事件监听.
107
114
  * @param formID 界面标识.
108
115
  * @param event 事件名称.
109
116
  * @param cb 回调函数.
110
117
  */
111
- removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchCb): void;
118
+ removeEventListener(formID: string, event: IKgSearchEvent, cb?: IKgSearchEventListener): void;
119
+ setDynamicQueryOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
112
120
  /**
113
- * 设置是否就绪.
121
+ * 设置表单数据.
114
122
  * @param formID 界面标识.
115
- * @param ready 是否就绪.
123
+ * @param model 表单数据.
116
124
  */
117
- setIsReady(formID: string | null | undefined, ready?: boolean): void;
125
+ setFormModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
118
126
  /**
119
- * 设置表单数据.
127
+ * 设置是否就绪.
120
128
  * @param formID 界面标识.
121
- * @param model 表单数据.
129
+ * @param ready 是否就绪.
122
130
  */
123
- setModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
124
- setOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
131
+ setIsReady(formID: string | null | undefined, ready?: boolean): void;
125
132
  /**
126
133
  * 设置重置方法.
127
134
  * @param formID 界面标识.