@gct-paas/core 0.1.5-dev.3 → 0.1.5-dev.5
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.esm.min.js +1 -1
- package/es/enums/page-designer/widget.d.ts +2 -2
- package/es/global/gct/gct.d.ts +108 -107
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useFile.d.ts +4 -0
- package/es/hooks/useFile.mjs +22 -0
- package/es/index.mjs +3 -1
- package/es/interface/i-kit-plugin-module/i-kit-plugin-module.d.ts +23 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +3 -0
- package/es/interface/index.d.ts +1 -1
- package/es/locale/index.d.ts +3 -1
- package/es/locale/index.mjs +18 -3
- package/es/modules/platform-config/store.d.ts +106 -106
- package/es/modules/platform-config/useSecuritySetting.d.ts +1 -1
- package/es/modules/user-stores/store/tenant.store.d.ts +6 -8
- package/es/modules/user-stores/store/tenant.store.mjs +12 -14
- package/es/modules/user-stores/store/user.store.d.ts +7 -2
- package/es/modules/user-stores/store/user.store.mjs +15 -4
- package/es/modules/user-stores/types/tenant.d.ts +7 -1
- package/es/router/index.mjs +2 -2
- package/es/setup-app.mjs +4 -2
- package/es/store/global-store.mjs +3 -0
- package/es/store/index.d.ts +1 -0
- package/es/store/index.mjs +1 -0
- package/es/store/session-store.d.ts +7 -0
- package/es/store/session-store.mjs +7 -0
- package/es/store/storage-store.d.ts +2 -0
- package/es/store/storage-store.mjs +3 -2
- package/es/types/index.d.ts +0 -1
- package/es/utils/file/download.d.ts +1 -1
- package/es/utils/file/parser.d.ts +1 -1
- package/es/utils/kit-pkg-util/kit-pkg-util.d.ts +34 -13
- package/es/utils/kit-pkg-util/kit-pkg-util.mjs +51 -40
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +2 -2
- package/es/utils/tools/tools.d.ts +1 -1
- package/package.json +4 -4
- package/es/interface/i-kit-info/i-kit-info.d.ts +0 -20
|
@@ -3,39 +3,22 @@ import { SysConfigResponse } from '@gct-paas/api/platform';
|
|
|
3
3
|
* 平台配置 Store
|
|
4
4
|
*/
|
|
5
5
|
export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"platform-config", Pick<{
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
7
|
+
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
8
|
+
postBasicSetting: () => Promise<string>;
|
|
8
9
|
deploySetting: {
|
|
9
10
|
deployMode: import('./enums').DeployModeEnum;
|
|
10
11
|
};
|
|
11
12
|
setDeploySetting: (data: SysConfigResponse) => void;
|
|
12
13
|
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
transparent: number;
|
|
22
|
-
width: number;
|
|
23
|
-
height: number;
|
|
24
|
-
};
|
|
25
|
-
postWatermarkSetting: () => Promise<void>;
|
|
26
|
-
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
27
|
-
themeSetting: import('./interfaces').IThemeSetting;
|
|
28
|
-
setThemeSetting: (data: SysConfigResponse) => void;
|
|
29
|
-
postThemeSetting: () => Promise<void>;
|
|
30
|
-
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
31
|
-
toggleMenuCollapsed: () => void;
|
|
32
|
-
menuCollapsedWidth: number;
|
|
33
|
-
menuWidthRange: number[];
|
|
34
|
-
themeColors: string[];
|
|
35
|
-
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
36
|
-
postSecuritySetting: () => Promise<void>;
|
|
37
|
-
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
38
|
-
getSignWay: () => "LOGIN" | "SIGN" | "DOMAIN";
|
|
14
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
15
|
+
postLoginSetting: () => Promise<void>;
|
|
16
|
+
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
17
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
18
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
19
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
20
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
21
|
+
loginModeConfig: Map<string, IObject>;
|
|
39
22
|
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
40
23
|
setOrgSetting: (data: SysConfigResponse) => void;
|
|
41
24
|
postOrgSetting: () => Promise<void>;
|
|
@@ -62,27 +45,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
62
45
|
label: string;
|
|
63
46
|
value: string;
|
|
64
47
|
}[]>;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
renderInit: () => Promise<void>;
|
|
78
|
-
}, "projectSetting" | "deploySetting" | "watermarkSetting" | "themeSetting" | "menuCollapsed" | "menuCollapsedWidth" | "menuWidthRange" | "themeColors" | "securitySetting" | "orgSetting" | "relationFields" | "relationFiledsCopy" | "loginSetting" | "loginModeAuthTypes" | "openIDOAuthAuthTypes" | "sysLoginSort" | "openIDOAuthAuthSort" | "loginModeConfig" | "basicSetting">, Pick<{
|
|
79
|
-
projectSetting: {};
|
|
80
|
-
setProjectConfig: (config: {}) => void;
|
|
81
|
-
deploySetting: {
|
|
82
|
-
deployMode: import('./enums').DeployModeEnum;
|
|
83
|
-
};
|
|
84
|
-
setDeploySetting: (data: SysConfigResponse) => void;
|
|
85
|
-
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
48
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
49
|
+
postSecuritySetting: () => Promise<void>;
|
|
50
|
+
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
51
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
52
|
+
themeSetting: import('./interfaces').IThemeSetting;
|
|
53
|
+
setThemeSetting: (data: SysConfigResponse) => void;
|
|
54
|
+
postThemeSetting: () => Promise<void>;
|
|
55
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
56
|
+
toggleMenuCollapsed: () => void;
|
|
57
|
+
menuCollapsedWidth: number;
|
|
58
|
+
menuWidthRange: number[];
|
|
59
|
+
themeColors: string[];
|
|
86
60
|
watermarkSetting: {
|
|
87
61
|
openWatermark: boolean;
|
|
88
62
|
watermarkContent: string;
|
|
@@ -97,18 +71,27 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
97
71
|
};
|
|
98
72
|
postWatermarkSetting: () => Promise<void>;
|
|
99
73
|
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
74
|
+
projectSetting: {};
|
|
75
|
+
setProjectConfig: (config: {}) => void;
|
|
76
|
+
init: () => Promise<void>;
|
|
77
|
+
renderInit: () => Promise<void>;
|
|
78
|
+
}, "basicSetting" | "deploySetting" | "loginModeAuthTypes" | "loginModeConfig" | "loginSetting" | "menuCollapsed" | "menuCollapsedWidth" | "menuWidthRange" | "openIDOAuthAuthSort" | "openIDOAuthAuthTypes" | "orgSetting" | "projectSetting" | "relationFields" | "relationFiledsCopy" | "securitySetting" | "sysLoginSort" | "themeColors" | "themeSetting" | "watermarkSetting">, Pick<{
|
|
79
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
80
|
+
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
81
|
+
postBasicSetting: () => Promise<string>;
|
|
82
|
+
deploySetting: {
|
|
83
|
+
deployMode: import('./enums').DeployModeEnum;
|
|
84
|
+
};
|
|
85
|
+
setDeploySetting: (data: SysConfigResponse) => void;
|
|
86
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
87
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
88
|
+
postLoginSetting: () => Promise<void>;
|
|
89
|
+
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
90
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
91
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
92
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
93
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
94
|
+
loginModeConfig: Map<string, IObject>;
|
|
112
95
|
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
113
96
|
setOrgSetting: (data: SysConfigResponse) => void;
|
|
114
97
|
postOrgSetting: () => Promise<void>;
|
|
@@ -135,27 +118,18 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
135
118
|
label: string;
|
|
136
119
|
value: string;
|
|
137
120
|
}[]>;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
renderInit: () => Promise<void>;
|
|
151
|
-
}, "isIndependentApp">, Pick<{
|
|
152
|
-
projectSetting: {};
|
|
153
|
-
setProjectConfig: (config: {}) => void;
|
|
154
|
-
deploySetting: {
|
|
155
|
-
deployMode: import('./enums').DeployModeEnum;
|
|
156
|
-
};
|
|
157
|
-
setDeploySetting: (data: SysConfigResponse) => void;
|
|
158
|
-
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
121
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
122
|
+
postSecuritySetting: () => Promise<void>;
|
|
123
|
+
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
124
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
125
|
+
themeSetting: import('./interfaces').IThemeSetting;
|
|
126
|
+
setThemeSetting: (data: SysConfigResponse) => void;
|
|
127
|
+
postThemeSetting: () => Promise<void>;
|
|
128
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
129
|
+
toggleMenuCollapsed: () => void;
|
|
130
|
+
menuCollapsedWidth: number;
|
|
131
|
+
menuWidthRange: number[];
|
|
132
|
+
themeColors: string[];
|
|
159
133
|
watermarkSetting: {
|
|
160
134
|
openWatermark: boolean;
|
|
161
135
|
watermarkContent: string;
|
|
@@ -170,18 +144,27 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
170
144
|
};
|
|
171
145
|
postWatermarkSetting: () => Promise<void>;
|
|
172
146
|
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
147
|
+
projectSetting: {};
|
|
148
|
+
setProjectConfig: (config: {}) => void;
|
|
149
|
+
init: () => Promise<void>;
|
|
150
|
+
renderInit: () => Promise<void>;
|
|
151
|
+
}, "isIndependentApp">, Pick<{
|
|
152
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
153
|
+
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
154
|
+
postBasicSetting: () => Promise<string>;
|
|
155
|
+
deploySetting: {
|
|
156
|
+
deployMode: import('./enums').DeployModeEnum;
|
|
157
|
+
};
|
|
158
|
+
setDeploySetting: (data: SysConfigResponse) => void;
|
|
159
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
160
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
161
|
+
postLoginSetting: () => Promise<void>;
|
|
162
|
+
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
163
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
164
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
165
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
166
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
167
|
+
loginModeConfig: Map<string, IObject>;
|
|
185
168
|
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
186
169
|
setOrgSetting: (data: SysConfigResponse) => void;
|
|
187
170
|
postOrgSetting: () => Promise<void>;
|
|
@@ -208,18 +191,35 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
208
191
|
label: string;
|
|
209
192
|
value: string;
|
|
210
193
|
}[]>;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
194
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
195
|
+
postSecuritySetting: () => Promise<void>;
|
|
196
|
+
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
197
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
198
|
+
themeSetting: import('./interfaces').IThemeSetting;
|
|
199
|
+
setThemeSetting: (data: SysConfigResponse) => void;
|
|
200
|
+
postThemeSetting: () => Promise<void>;
|
|
201
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
202
|
+
toggleMenuCollapsed: () => void;
|
|
203
|
+
menuCollapsedWidth: number;
|
|
204
|
+
menuWidthRange: number[];
|
|
205
|
+
themeColors: string[];
|
|
206
|
+
watermarkSetting: {
|
|
207
|
+
openWatermark: boolean;
|
|
208
|
+
watermarkContent: string;
|
|
209
|
+
fontSize: number;
|
|
210
|
+
color: string;
|
|
211
|
+
verticalAlign: string;
|
|
212
|
+
textAlign: string;
|
|
213
|
+
text: string;
|
|
214
|
+
transparent: number;
|
|
215
|
+
width: number;
|
|
216
|
+
height: number;
|
|
217
|
+
};
|
|
218
|
+
postWatermarkSetting: () => Promise<void>;
|
|
219
|
+
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
220
|
+
projectSetting: {};
|
|
221
|
+
setProjectConfig: (config: {}) => void;
|
|
222
222
|
init: () => Promise<void>;
|
|
223
223
|
renderInit: () => Promise<void>;
|
|
224
|
-
}, "
|
|
224
|
+
}, "getSignWay" | "init" | "postBasicSetting" | "postLoginSetting" | "postOrgSetting" | "postSecuritySetting" | "postThemeSetting" | "postWatermarkSetting" | "renderInit" | "setBasicSetting" | "setDeploySetting" | "setLoginSetting" | "setOrgSetting" | "setProjectConfig" | "setSecuritySetting" | "setThemeSetting" | "setWatermarkSetting" | "toggleMenuCollapsed">>;
|
|
225
225
|
export type IPlatformConfigStore = ReturnType<typeof usePlatformConfigStore>;
|
|
@@ -8,5 +8,5 @@ export declare function useSecuritySetting(isPlatform?: boolean): {
|
|
|
8
8
|
securitySetting: SecurityConfig;
|
|
9
9
|
postSecuritySetting: () => Promise<void>;
|
|
10
10
|
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
11
|
-
getSignWay: () => "
|
|
11
|
+
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
12
12
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { UserOfTenantDTO } from '@gct-paas/api/platform';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
getTenantUserInfoAction(): Promise<UserOfTenantDTO | undefined>;
|
|
9
|
-
}>;
|
|
2
|
+
import { tenantState } from '../types/tenant';
|
|
3
|
+
export declare const useTenantStore: import('pinia').StoreDefinition<"tenant", tenantState, {
|
|
4
|
+
getTenantUserInfoAction(state: {
|
|
5
|
+
tenantUserInfo: Record<string, UserOfTenantDTO>;
|
|
6
|
+
} & import('pinia').PiniaCustomStateProperties<tenantState>): () => Promise<UserOfTenantDTO>;
|
|
7
|
+
}, {}>;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
+
import { getTenant } from "../../../utils/tools/tools.mjs";
|
|
2
|
+
import "../../../utils/index.mjs";
|
|
1
3
|
import { defineStore } from "pinia";
|
|
2
4
|
//#region src/modules/user-stores/store/tenant.store.ts
|
|
3
5
|
var useTenantStore = defineStore("tenant", {
|
|
4
|
-
state: () => ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
setTenant(tenantId) {
|
|
11
|
-
this.tenantId = tenantId;
|
|
12
|
-
},
|
|
13
|
-
async getTenantUserInfoAction() {
|
|
14
|
-
if (!this.tenantId) return;
|
|
6
|
+
state: () => ({ tenantUserInfo: {} }),
|
|
7
|
+
getters: { getTenantUserInfoAction(state) {
|
|
8
|
+
return async () => {
|
|
9
|
+
const tenantId = getTenant();
|
|
10
|
+
if (!tenantId) return Promise.reject(null);
|
|
11
|
+
if (state.tenantUserInfo[tenantId]) return state.tenantUserInfo[tenantId];
|
|
15
12
|
const info = await _api.platform.tenant.getUserInfo();
|
|
16
|
-
|
|
13
|
+
state.tenantUserInfo[tenantId] = info;
|
|
17
14
|
return info;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
15
|
+
};
|
|
16
|
+
} },
|
|
17
|
+
actions: {}
|
|
20
18
|
});
|
|
21
19
|
//#endregion
|
|
22
20
|
export { useTenantStore };
|
|
@@ -290,13 +290,18 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
|
|
|
290
290
|
}, {
|
|
291
291
|
login(config: LoginParams, { hasError }?: {
|
|
292
292
|
hasError: any;
|
|
293
|
-
}): Promise<
|
|
293
|
+
}): Promise<UserLoginResp>;
|
|
294
294
|
getUserInfoAction(Token?: string): Promise<UserLoginResp | null>;
|
|
295
295
|
/**单应用登录 */
|
|
296
296
|
afterLoginSingleApp(): Promise<void>;
|
|
297
297
|
/**登录后逻辑 */
|
|
298
298
|
afterLoginAction(): Promise<null | undefined>;
|
|
299
|
-
|
|
299
|
+
/**退出登录 接口*/
|
|
300
|
+
submitLoginOut(): Promise<void>;
|
|
301
|
+
/**
|
|
302
|
+
* 清空对应信息
|
|
303
|
+
*/
|
|
304
|
+
appLoginOut(): Promise<void>;
|
|
300
305
|
setUserInfo(info: IObject): Promise<void>;
|
|
301
306
|
updateUserInfo(data: IObject): Promise<void>;
|
|
302
307
|
}>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { getTenant, getToken, setToken } from "../../../utils/tools/tools.mjs";
|
|
2
|
+
import { sha256 } from "../../../utils/uuid/uuid.mjs";
|
|
2
3
|
import { getDeviceFingerprint, getPageIdentification } from "../../../utils/deviceFingerprint.mjs";
|
|
3
4
|
import "../../../utils/index.mjs";
|
|
5
|
+
import { globalRefStorage } from "../../../store/storage-store.mjs";
|
|
6
|
+
import "../../../store/index.mjs";
|
|
4
7
|
import { defineStore } from "pinia";
|
|
5
8
|
//#region src/modules/user-stores/store/user.store.ts
|
|
6
9
|
var useUserStore = defineStore("user", {
|
|
@@ -26,9 +29,9 @@ var useUserStore = defineStore("user", {
|
|
|
26
29
|
async login(config, { hasError } = {}) {
|
|
27
30
|
try {
|
|
28
31
|
const { token, signWay } = await loginApi(config, hasError);
|
|
29
|
-
|
|
32
|
+
globalRefStorage.value.signWay = signWay || "";
|
|
30
33
|
setToken(token);
|
|
31
|
-
return this.
|
|
34
|
+
return this.getUserInfoAction(token);
|
|
32
35
|
} catch (error) {
|
|
33
36
|
return Promise.reject(error);
|
|
34
37
|
}
|
|
@@ -47,8 +50,13 @@ var useUserStore = defineStore("user", {
|
|
|
47
50
|
async afterLoginAction() {
|
|
48
51
|
if (!getToken) return null;
|
|
49
52
|
},
|
|
50
|
-
async
|
|
53
|
+
async submitLoginOut() {
|
|
51
54
|
await doLogout();
|
|
55
|
+
this.appLoginOut();
|
|
56
|
+
},
|
|
57
|
+
async appLoginOut() {
|
|
58
|
+
setToken();
|
|
59
|
+
this.setUserInfo({});
|
|
52
60
|
},
|
|
53
61
|
async setUserInfo(info) {
|
|
54
62
|
this.userInfo = {
|
|
@@ -75,7 +83,10 @@ var useUserStore = defineStore("user", {
|
|
|
75
83
|
*/
|
|
76
84
|
async function loginApi(params, { hasError = true } = {}) {
|
|
77
85
|
const fingerprint = await getDeviceFingerprint();
|
|
78
|
-
return await _api.platform.login.postSign(
|
|
86
|
+
return await _api.platform.login.postSign({
|
|
87
|
+
...params,
|
|
88
|
+
password: sha256(params.password || "")
|
|
89
|
+
}, { headers: {
|
|
79
90
|
browser: fingerprint,
|
|
80
91
|
"Auth-Code": params.authCode,
|
|
81
92
|
hasError
|
package/es/router/index.mjs
CHANGED
|
@@ -16,9 +16,9 @@ var RouterUtil = class {
|
|
|
16
16
|
* @description 将单个或多个路由记录添加到路由器中
|
|
17
17
|
*/
|
|
18
18
|
async add(route) {
|
|
19
|
-
if (Array.isArray(route)) route.forEach((r) => this.
|
|
19
|
+
if (Array.isArray(route)) route.forEach((r) => this.router.addRoute(r));
|
|
20
20
|
else this.router.addRoute(route);
|
|
21
|
-
await this.router.replace(this.router.currentRoute.value.fullPath);
|
|
21
|
+
if (!this.router.hasRoute(this.router.currentRoute.value.name)) await this.router.replace(this.router.currentRoute.value.fullPath);
|
|
22
22
|
}
|
|
23
23
|
/**刷新当前路由 */
|
|
24
24
|
async redo() {
|
package/es/setup-app.mjs
CHANGED
|
@@ -16,9 +16,11 @@ import { HttpUtil } from "@gct-paas/api";
|
|
|
16
16
|
async function setupApp(_app) {
|
|
17
17
|
HttpUtil.use(interceptors);
|
|
18
18
|
await _gct.init();
|
|
19
|
-
const token = getToken();
|
|
20
|
-
if (token) await useUserStore().getUserInfoAction(token);
|
|
21
19
|
await usePlatformConfigStore().init();
|
|
20
|
+
const token = getToken();
|
|
21
|
+
if (token) try {
|
|
22
|
+
await useUserStore().getUserInfoAction(token);
|
|
23
|
+
} catch {}
|
|
22
24
|
}
|
|
23
25
|
//#endregion
|
|
24
26
|
export { setupApp };
|
package/es/store/index.d.ts
CHANGED
package/es/store/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { useGlobalStore } from "./global-store.mjs";
|
|
|
2
2
|
import { usePlatformConfigStore } from "../modules/platform-config/store.mjs";
|
|
3
3
|
import "../modules/platform-config/index.mjs";
|
|
4
4
|
import "./storage-store.mjs";
|
|
5
|
+
import "./session-store.mjs";
|
|
5
6
|
import { createPinia, setActivePinia } from "pinia";
|
|
6
7
|
//#region src/store/index.ts
|
|
7
8
|
/**
|
|
@@ -2,9 +2,10 @@ import { useStorage } from "@vueuse/core";
|
|
|
2
2
|
/**
|
|
3
3
|
* 全局双向绑定持续化缓存Map
|
|
4
4
|
*/
|
|
5
|
-
var globalRefStorage = useStorage("
|
|
5
|
+
var globalRefStorage = useStorage("GCT_GLOBAL_STORAGE:PAAS", {
|
|
6
6
|
timezone: "UTC+08:00",
|
|
7
|
-
lang: ""
|
|
7
|
+
lang: "",
|
|
8
|
+
signWay: ""
|
|
8
9
|
});
|
|
9
10
|
//#endregion
|
|
10
11
|
export { globalRefStorage };
|
package/es/types/index.d.ts
CHANGED
|
@@ -15,8 +15,8 @@ export declare function downloadByOnlineUrl(url: string, filename: string, mime?
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function downloadByBase64(buf: string, filename: string, mime?: string, bom?: BlobPart): void;
|
|
17
17
|
export declare function uploaderFiles({ multiple, accept }?: {
|
|
18
|
-
multiple?: boolean | undefined;
|
|
19
18
|
accept?: string | undefined;
|
|
19
|
+
multiple?: boolean | undefined;
|
|
20
20
|
}): Promise<File[]>;
|
|
21
21
|
/**
|
|
22
22
|
* Download according to the background interface file stream
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UploadTypeEnum } from '../../enums';
|
|
2
2
|
export declare const sizeParser: (size: number) => string;
|
|
3
|
-
export declare const typeParser: (fileName: string) => "attachment" | "img" | UploadTypeEnum.JPG | UploadTypeEnum.JPEG | UploadTypeEnum.PNG | UploadTypeEnum.BMP | UploadTypeEnum.DOCX | UploadTypeEnum.XLSX | UploadTypeEnum.DOC | UploadTypeEnum.MP4 | UploadTypeEnum.AVI | UploadTypeEnum.PPT | UploadTypeEnum.GIF
|
|
3
|
+
export declare const typeParser: (fileName: string) => "MP4" | "PDF" | "attachment" | "img" | "ssl" | UploadTypeEnum.JPG | UploadTypeEnum.JPEG | UploadTypeEnum.PNG | UploadTypeEnum.BMP | UploadTypeEnum.DOCX | UploadTypeEnum.XLSX | UploadTypeEnum.DOC | UploadTypeEnum.MP4 | UploadTypeEnum.AVI | UploadTypeEnum.PPT | UploadTypeEnum.GIF;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PluginModeEnum } from '../../enums';
|
|
2
|
-
import {
|
|
3
|
-
import { App } from 'vue';
|
|
2
|
+
import { IPluginKitModule } from '../../interface';
|
|
4
3
|
/**
|
|
5
4
|
* 用于加载套件包的工具类
|
|
6
5
|
*
|
|
@@ -8,25 +7,47 @@ import { App } from 'vue';
|
|
|
8
7
|
* @class KitPkgUtil
|
|
9
8
|
*/
|
|
10
9
|
export declare class KitPkgUtil {
|
|
11
|
-
protected static readonly KIT_PKG_BASE_PATH = "/
|
|
12
|
-
protected static cache: Map<string, IKitInfo>;
|
|
10
|
+
protected static readonly KIT_PKG_BASE_PATH = "/plugin-kit";
|
|
13
11
|
protected static joinPaths(...paths: string[]): string;
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
13
|
+
* 加载套件包,返回套件包入口实例
|
|
16
14
|
*
|
|
17
15
|
* @static
|
|
18
16
|
* @param {string} kit
|
|
19
|
-
* @
|
|
17
|
+
* @param {PluginModeEnum} mode
|
|
18
|
+
* @return {*} {(Promise<IPluginKitModule | null>)}
|
|
20
19
|
*/
|
|
21
|
-
static
|
|
20
|
+
static loadKit(kit: string, mode: PluginModeEnum): Promise<IPluginKitModule | null>;
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
22
|
+
* 加载设计模式套件包
|
|
24
23
|
*
|
|
25
24
|
* @static
|
|
26
|
-
* @param {
|
|
27
|
-
* @
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
* @param {string} kit
|
|
26
|
+
* @return {*} {(Promise<IPluginKitModule | null>)}
|
|
27
|
+
*/
|
|
28
|
+
static loadDesign(kit: string): Promise<IPluginKitModule | null>;
|
|
29
|
+
/**
|
|
30
|
+
* 加载移动端绘制模式套件包
|
|
31
|
+
*
|
|
32
|
+
* @static
|
|
33
|
+
* @param {string} kit
|
|
34
|
+
* @return {*} {(Promise<IPluginKitModule | null>)}
|
|
35
|
+
*/
|
|
36
|
+
static loadMobile(kit: string): Promise<IPluginKitModule | null>;
|
|
37
|
+
/**
|
|
38
|
+
* 加载平板端绘制模式套件包
|
|
39
|
+
*
|
|
40
|
+
* @static
|
|
41
|
+
* @param {string} kit
|
|
42
|
+
* @return {*} {(Promise<IPluginKitModule | null>)}
|
|
43
|
+
*/
|
|
44
|
+
static loadPad(kit: string): Promise<IPluginKitModule | null>;
|
|
45
|
+
/**
|
|
46
|
+
* 加载网页端绘制模式套件包
|
|
47
|
+
*
|
|
48
|
+
* @static
|
|
49
|
+
* @param {string} kit
|
|
50
|
+
* @return {*} {(Promise<IPluginKitModule | null>)}
|
|
30
51
|
*/
|
|
31
|
-
static
|
|
52
|
+
static loadWeb(kit: string): Promise<IPluginKitModule | null>;
|
|
32
53
|
}
|