@kengic/vue 0.26.5-beta.0 → 0.26.5-beta.1

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.
@@ -0,0 +1,47 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import './KgStation.less';
3
+ export declare const getProps: () => {
4
+ /**
5
+ * <p>是否隐藏.</p>
6
+ * <p>此组件需要在不同的地方使用,</p>
7
+ * <ul>
8
+ * <li>在有的地方需要显示当前选择的工作站, 并且可以通过点击打开弹窗, 比如顶部导航栏,</li>
9
+ * <li>在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,</li>
10
+ * </ul>
11
+ *
12
+ * @default undefined
13
+ */
14
+ kgInvisible: PropType<boolean>;
15
+ onKgOk: PropType<() => void>;
16
+ };
17
+ export declare type KgStationProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
18
+ declare const _default: import("vue").DefineComponent<{
19
+ /**
20
+ * <p>是否隐藏.</p>
21
+ * <p>此组件需要在不同的地方使用,</p>
22
+ * <ul>
23
+ * <li>在有的地方需要显示当前选择的工作站, 并且可以通过点击打开弹窗, 比如顶部导航栏,</li>
24
+ * <li>在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,</li>
25
+ * </ul>
26
+ *
27
+ * @default undefined
28
+ */
29
+ kgInvisible: PropType<boolean>;
30
+ onKgOk: PropType<() => void>;
31
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgOk"[], "kgOk", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
32
+ /**
33
+ * <p>是否隐藏.</p>
34
+ * <p>此组件需要在不同的地方使用,</p>
35
+ * <ul>
36
+ * <li>在有的地方需要显示当前选择的工作站, 并且可以通过点击打开弹窗, 比如顶部导航栏,</li>
37
+ * <li>在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,</li>
38
+ * </ul>
39
+ *
40
+ * @default undefined
41
+ */
42
+ kgInvisible: PropType<boolean>;
43
+ onKgOk: PropType<() => void>;
44
+ }>> & {
45
+ onKgOk?: ((...args: any[]) => any) | undefined;
46
+ }, {}>;
47
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default as KgStation } from './KgStation';
2
+ export * from './index.hooks';
3
+ export * from './index.store';
@@ -0,0 +1,28 @@
1
+ import { Pinia } from 'pinia';
2
+ import { ComputedRef } from 'vue';
3
+ import { IKgStationStore, WorkstationDTO, WorkstationAreaDTO } from './index.store';
4
+ export declare type IUseKgStation = {
5
+ /**
6
+ * 当前工作区.
7
+ */
8
+ area: ComputedRef<WorkstationAreaDTO | null>;
9
+ /**
10
+ * 当前工作站.
11
+ */
12
+ station: ComputedRef<WorkstationDTO | null>;
13
+ /**
14
+ * 所有工作站.
15
+ */
16
+ stations: ComputedRef<IKgStationStore['getStations']>;
17
+ store: IKgStationStore;
18
+ /**
19
+ * 是否显示弹窗.
20
+ */
21
+ visible: ComputedRef<IKgStationStore['getVisible']>;
22
+ };
23
+ /**
24
+ * 在某些地方调用时(比如在路由守卫中), pinia 尚未设置, 此时需要手动传入 pinia 实例.
25
+ *
26
+ * @param pinia
27
+ */
28
+ export declare function useKgStation(pinia?: Pinia): IUseKgStation;
@@ -0,0 +1,58 @@
1
+ import { StoreDefinition } from 'pinia';
2
+ export declare type WorkstationDTO = {
3
+ id?: string;
4
+ whId?: string;
5
+ devcod?: string;
6
+ devcodDsc?: string;
7
+ hmewrkare?: string;
8
+ workstationAreas?: Array<WorkstationAreaDTO>;
9
+ };
10
+ export declare type WorkstationAreaDTO = {
11
+ id?: string;
12
+ whId?: string;
13
+ wrkare?: string;
14
+ wrkareDsc?: string;
15
+ };
16
+ export interface IUseKgStationStoreState {
17
+ /**
18
+ * 当前工作站.
19
+ */
20
+ station: WorkstationDTO | null;
21
+ /**
22
+ * 所有工作站.
23
+ */
24
+ stations: Array<WorkstationDTO> | undefined;
25
+ /**
26
+ * 是否显示弹窗.
27
+ */
28
+ visible: boolean;
29
+ }
30
+ export interface IUseKgStationStoreGetters {
31
+ getStation: WorkstationDTO | null;
32
+ getStations: Array<WorkstationDTO> | undefined;
33
+ /**
34
+ * 是否显示弹窗.
35
+ */
36
+ getVisible: boolean;
37
+ }
38
+ export interface IUseKgStationStoreActions {
39
+ /**
40
+ * 查询所有工作站.
41
+ */
42
+ requestStations(): Promise<void>;
43
+ /**
44
+ * 设置当前工作站.
45
+ *
46
+ * @param station 当前工作站.
47
+ */
48
+ setStation(station?: WorkstationDTO | null): void;
49
+ /**
50
+ * 设置是否显示弹窗.
51
+ *
52
+ * @param visible 是否显示.
53
+ */
54
+ setVisible(visible: boolean): void;
55
+ }
56
+ export declare type IUseKgStationStore = StoreDefinition<'KgStation', IUseKgStationStoreState, IUseKgStationStoreGetters, IUseKgStationStoreActions>;
57
+ export declare type IKgStationStore = ReturnType<IUseKgStationStore>;
58
+ export declare const useKgStationStore: IUseKgStationStore;
@@ -2,10 +2,13 @@ import { ExtractPropTypes, PropType } from 'vue';
2
2
  import './KgWarehouse.less';
3
3
  export declare const getProps: () => {
4
4
  /**
5
- * 是否隐藏.
6
- * 此组件需要在不同的地方使用,
7
- * 在有的地方需要显示当前选择的仓库, 并且可以通过点击打开弹窗, 比如顶部导航栏,
8
- * 在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,
5
+ * <p>是否隐藏.</p>
6
+ * <p>此组件需要在不同的地方使用,</p>
7
+ * <ul>
8
+ * <li>在有的地方需要显示当前选择的仓库, 并且可以通过点击打开弹窗, 比如顶部导航栏,</li>
9
+ * <li>在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,</li>
10
+ * </ul>
11
+ *
9
12
  * @default undefined
10
13
  */
11
14
  kgInvisible: PropType<boolean>;
@@ -14,20 +17,26 @@ export declare const getProps: () => {
14
17
  export declare type IKgWarehouseProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
15
18
  declare const _default: import("vue").DefineComponent<{
16
19
  /**
17
- * 是否隐藏.
18
- * 此组件需要在不同的地方使用,
19
- * 在有的地方需要显示当前选择的仓库, 并且可以通过点击打开弹窗, 比如顶部导航栏,
20
- * 在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,
20
+ * <p>是否隐藏.</p>
21
+ * <p>此组件需要在不同的地方使用,</p>
22
+ * <ul>
23
+ * <li>在有的地方需要显示当前选择的仓库, 并且可以通过点击打开弹窗, 比如顶部导航栏,</li>
24
+ * <li>在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,</li>
25
+ * </ul>
26
+ *
21
27
  * @default undefined
22
28
  */
23
29
  kgInvisible: PropType<boolean>;
24
30
  onKgOk: PropType<() => void>;
25
31
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgOk"[], "kgOk", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
26
32
  /**
27
- * 是否隐藏.
28
- * 此组件需要在不同的地方使用,
29
- * 在有的地方需要显示当前选择的仓库, 并且可以通过点击打开弹窗, 比如顶部导航栏,
30
- * 在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,
33
+ * <p>是否隐藏.</p>
34
+ * <p>此组件需要在不同的地方使用,</p>
35
+ * <ul>
36
+ * <li>在有的地方需要显示当前选择的仓库, 并且可以通过点击打开弹窗, 比如顶部导航栏,</li>
37
+ * <li>在有的地方, 不需要显示此组件, 用户通过参数控制是否打开弹窗, 比如登录页,</li>
38
+ * </ul>
39
+ *
31
40
  * @default undefined
32
41
  */
33
42
  kgInvisible: PropType<boolean>;
@@ -1,6 +1,5 @@
1
1
  import { Pinia } from 'pinia';
2
2
  import { ComputedRef } from 'vue';
3
- import { WhDTO } from '../../apis/WMS/models';
4
3
  import { IRemoveEventListenerHandler } from '../../consts';
5
4
  import { IKgWarehouseMountedEventListener, IKgWarehouseStore } from './index.store';
6
5
  export declare type IUseKgWarehouse = {
@@ -12,13 +11,13 @@ export declare type IUseKgWarehouse = {
12
11
  onMounted(listener: IKgWarehouseMountedEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
13
12
  store: IKgWarehouseStore;
14
13
  /**
15
- * 弹窗当前是否显示.
14
+ * 是否显示弹窗.
16
15
  */
17
- visible: ComputedRef<boolean>;
16
+ visible: ComputedRef<IKgWarehouseStore['getVisible']>;
18
17
  /**
19
18
  * 当前仓库.
20
19
  */
21
- warehouse: ComputedRef<WhDTO | null>;
20
+ warehouse: ComputedRef<IKgWarehouseStore['getWarehouse']>;
22
21
  };
23
22
  /**
24
23
  * 在某些地方调用时(比如在路由守卫中), pinia 尚未设置, 此时需要手动传入 pinia 实例.
@@ -9,19 +9,19 @@ export declare type IKgWarehouseEvent = 'mounted';
9
9
  export declare type IKgWarehouseMountedEventListener = (() => void) & IKgEventListener;
10
10
  export declare type IKgWarehouseEventListener = IKgWarehouseMountedEventListener;
11
11
  export interface IUseKgWarehouseStoreState {
12
+ mountedListeners: Array<IKgWarehouseMountedEventListener>;
12
13
  /**
13
- * 弹窗当前是否显示.
14
+ * 是否显示弹窗.
14
15
  */
15
16
  visible: boolean;
16
17
  /**
17
18
  * 当前仓库.
18
19
  */
19
20
  warehouse: WhDTO | null;
20
- mountedListeners: Array<IKgWarehouseMountedEventListener>;
21
21
  }
22
22
  export interface IUseKgWarehouseStoreGetters {
23
23
  /**
24
- * 弹窗当前是否显示.
24
+ * 是否显示弹窗.
25
25
  */
26
26
  getVisible: boolean;
27
27
  getWarehouse: WhDTO | null;
@@ -33,12 +33,6 @@ export interface IUseKgWarehouseStoreActions {
33
33
  * @param listener 事件监听函数.
34
34
  */
35
35
  addEventListener(event: IKgWarehouseEvent, listener: IKgWarehouseEventListener): void;
36
- /**
37
- * 退订事件监听.
38
- * @param event 事件名称.
39
- * @param listener 事件监听函数.
40
- */
41
- removeEventListener(event: IKgWarehouseEvent, listener?: IKgWarehouseEventListener): void;
42
36
  /**
43
37
  * 触发事件.
44
38
  * @param event 事件名称.
@@ -46,12 +40,20 @@ export interface IUseKgWarehouseStoreActions {
46
40
  */
47
41
  emit(event: IKgWarehouseEvent, args?: any | null): void;
48
42
  /**
49
- * 设置弹窗是否显示.
43
+ * 退订事件监听.
44
+ * @param event 事件名称.
45
+ * @param listener 事件监听函数.
46
+ */
47
+ removeEventListener(event: IKgWarehouseEvent, listener?: IKgWarehouseEventListener): void;
48
+ /**
49
+ * 设置是否显示弹窗.
50
+ *
50
51
  * @param visible 是否显示.
51
52
  */
52
53
  setVisible(visible: boolean): void;
53
54
  /**
54
55
  * 设置当前仓库.
56
+ *
55
57
  * @param warehouse 当前仓库.
56
58
  */
57
59
  setWarehouse(warehouse?: WhDTO | null): void;
@@ -5,6 +5,7 @@ export * from './KgModal';
5
5
  export * from './KgProgressA';
6
6
  export * from './KgResizable';
7
7
  export * from './KgSearch';
8
+ export * from './KgStation';
8
9
  export * from './KgSubmit';
9
10
  export * from './KgTable';
10
11
  export * from './KgVar';
@@ -121,6 +121,14 @@ export declare type IKgOption = {
121
121
  /** 默认的仓库编码, 只有在 {@link IKgOption.KgWarehouse.on} 为 false 时才生效. */
122
122
  defaultWarehouseID?: string;
123
123
  };
124
+ /** 工作站选择. */
125
+ KgStation?: {
126
+ /**
127
+ * 是否启用功能.
128
+ * @default true
129
+ */
130
+ isOn?: boolean;
131
+ };
124
132
  /** 模块首页地址. */
125
133
  appIndex?: {
126
134
  /** 默认为 '/wms/data-manager/index'. */
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -96,6 +96,14 @@ declare const _default: {
96
96
  formTitle: string;
97
97
  pleaseSelectVarProfileMaster: string;
98
98
  };
99
+ KgStation: {
100
+ reloadMessage: string;
101
+ selectStation: string;
102
+ station: string;
103
+ title: string;
104
+ workArea: string;
105
+ workStation: string;
106
+ };
99
107
  KgTable: {
100
108
  apiNotSupportDynamicQuery: string;
101
109
  column: string;
@@ -33,7 +33,7 @@ export declare class KgUtil {
33
33
  * <ul>
34
34
  * <li>删除无用属性,</li>
35
35
  * <li>日期转换为字符串,</li>
36
- * <li>解析动态属性, 比如 {WAREHOUSE},</li>
36
+ * <li>解析动态属性, 比如「仓库号」,</li>
37
37
  * </ul>
38
38
  *
39
39
  * @param params 请求参数.
@@ -48,6 +48,8 @@ export declare class KgUtil {
48
48
  * <li>填充通用参数的值:
49
49
  * <ul>
50
50
  * <li>{WAREHOUSE}: 当前仓库编号</li>
51
+ * <li>{WORK_STATION}: 当前工作站</li>
52
+ * <li>{WORK_AREA}: 当前工作区</li>
51
53
  * <li>{LOCALE}: 当前语言</li>
52
54
  * <li>{NOW}: 当前时间</li>
53
55
  * <li>{USER}: 当前用户</li>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.26.5-beta.0",
3
+ "version": "0.26.5-beta.1",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",