@indfnd/utils 0.1.39 → 0.1.40
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/CHANGELOG.md +7 -0
- package/dist/ind-utils.es.js +173 -84
- package/dist/ind-utils.umd.cjs +17 -17
- package/package.json +1 -1
- package/src/utils/token.ts +23 -11
- package/types/api/com.d.ts +2 -4
- package/types/api/index-desc.d.ts +2 -4
- package/types/api/index.d.ts +7 -7
- package/types/api/item.d.ts +4 -6
- package/types/api/permission.d.ts +2 -2
- package/types/api/platform/base64.d.ts +5 -5
- package/types/api/platform/config.d.ts +2 -2
- package/types/api/platform/dict.d.ts +4 -6
- package/types/api/platform/index.d.ts +6 -6
- package/types/api/platform/menu.d.ts +11 -21
- package/types/api/platform/oss.d.ts +8 -16
- package/types/api/platform/user.d.ts +12 -19
- package/types/api/user.d.ts +2 -2
- package/types/config/base.config.d.ts +33 -33
- package/types/config/dev.config.d.ts +3 -3
- package/types/config/index.d.ts +6 -6
- package/types/config/prod.config.d.ts +3 -3
- package/types/index.d.ts +4 -4
- package/types/utils/base64.d.ts +22 -22
- package/types/utils/blob.d.ts +3 -3
- package/types/utils/cache/dict-cache.d.ts +3 -3
- package/types/utils/cache/index-desc.d.ts +4 -4
- package/types/utils/cache/index.d.ts +4 -4
- package/types/utils/cache/permission-cache.d.ts +4 -4
- package/types/utils/cache/user-cache.d.ts +4 -4
- package/types/utils/date.d.ts +4 -4
- package/types/utils/enum.d.ts +39 -43
- package/types/utils/event.d.ts +5 -13
- package/types/utils/excel.d.ts +5 -5
- package/types/utils/half-year.d.ts +6 -6
- package/types/utils/index.d.ts +20 -20
- package/types/utils/is-type.d.ts +33 -33
- package/types/utils/mime-type.d.ts +67 -67
- package/types/utils/number.d.ts +8 -8
- package/types/utils/quarter.d.ts +7 -7
- package/types/utils/request/axios.extends.d.ts +6 -18
- package/types/utils/request/cache-rules.d.ts +3 -3
- package/types/utils/request/content-type.d.ts +9 -9
- package/types/utils/request/index.d.ts +9 -9
- package/types/utils/request/interceptors.d.ts +4 -4
- package/types/utils/request/url-params.d.ts +6 -6
- package/types/utils/sm3/index.d.ts +6 -6
- package/types/utils/sm3/sm3.d.ts +3 -3
- package/types/utils/storage.d.ts +8 -8
- package/types/utils/table.d.ts +31 -40
- package/types/utils/token.d.ts +3 -3
- package/types/utils/token.d.ts.map +1 -1
- package/types/utils/uuid.d.ts +4 -4
- package/types/utils/validate.d.ts +5 -5
package/package.json
CHANGED
package/src/utils/token.ts
CHANGED
|
@@ -4,24 +4,36 @@ const TOKEN_KEY = 'v8-token'
|
|
|
4
4
|
|
|
5
5
|
const TOKEN_KEY_IBP = 'lambo-token'
|
|
6
6
|
|
|
7
|
+
function isHb() {
|
|
8
|
+
return __IS_HB__
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
// 要从门户跳转过来,sessionStorage不能带token过来,改成localStorage
|
|
8
12
|
export function setToken(token: string) {
|
|
9
|
-
setLocalStorage(TOKEN_KEY, token)
|
|
10
13
|
setSessionStorage(TOKEN_KEY_IBP, token)
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
// 以下逻辑将会话信息持久化存储了,湖北企业微信环境每次点击都走一次单点登录逻辑,不持久化存储
|
|
16
|
+
if (!isHb) {
|
|
17
|
+
setLocalStorage(TOKEN_KEY, token)
|
|
18
|
+
Cookie.set('TOKEN_KEY', token, 1)
|
|
19
|
+
Cookie.set('lambo-sso-key', token, 1)
|
|
20
|
+
}
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
export function getToken(): string | boolean {
|
|
16
24
|
let token = getSessionStorage(TOKEN_KEY_IBP)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
// 以下逻辑将会话信息持久化存储了,湖北企业微信环境每次点击都走一次单点登录逻辑,不持久化存储
|
|
27
|
+
if (!isHb) {
|
|
28
|
+
if (!token) {
|
|
29
|
+
token = Cookie.get('lambo-sso-key')
|
|
30
|
+
}
|
|
31
|
+
if (!token) {
|
|
32
|
+
token = Cookie.get('TOKEN_KEY')
|
|
33
|
+
}
|
|
34
|
+
if (!token) {
|
|
35
|
+
token = getLocalStorage(TOKEN_KEY)
|
|
36
|
+
}
|
|
25
37
|
}
|
|
26
38
|
return token || false
|
|
27
39
|
}
|
package/types/api/com.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export declare function listComTreeApi(
|
|
2
|
-
|
|
3
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
4
|
-
//# sourceMappingURL=com.d.ts.map
|
|
1
|
+
export declare function listComTreeApi(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
2
|
+
//# sourceMappingURL=com.d.ts.map
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export declare function listIndexDescApi(
|
|
2
|
-
|
|
3
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
4
|
-
//# sourceMappingURL=index-desc.d.ts.map
|
|
1
|
+
export declare function listIndexDescApi(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
2
|
+
//# sourceMappingURL=index-desc.d.ts.map
|
package/types/api/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './platform'
|
|
2
|
-
export * from './com'
|
|
3
|
-
export * from './index-desc'
|
|
4
|
-
export * from './item'
|
|
5
|
-
export * from './permission'
|
|
6
|
-
export * from './user'
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './platform';
|
|
2
|
+
export * from './com';
|
|
3
|
+
export * from './index-desc';
|
|
4
|
+
export * from './item';
|
|
5
|
+
export * from './permission';
|
|
6
|
+
export * from './user';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
package/types/api/item.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare function listItemTreeApi(
|
|
2
|
-
|
|
3
|
-
): Promise<import(
|
|
4
|
-
|
|
5
|
-
export declare function getItem(params: any): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
6
|
-
//# sourceMappingURL=item.d.ts.map
|
|
1
|
+
export declare function listItemTreeApi(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
2
|
+
export declare function getPriceInfo(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
3
|
+
export declare function getItem(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
4
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getApplicationTreeApi(params: any): Promise<any
|
|
2
|
-
//# sourceMappingURL=permission.d.ts.map
|
|
1
|
+
export declare function getApplicationTreeApi(params: any): Promise<any>;
|
|
2
|
+
//# sourceMappingURL=permission.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export namespace Base64 {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
let Base64Chars: string;
|
|
3
|
+
function encode(s: any): any;
|
|
4
|
+
function ucs2_utf8(s: any): any[];
|
|
5
|
+
function utf8_ucs2(s: any): string;
|
|
6
6
|
}
|
|
7
|
-
//# sourceMappingURL=base64.d.ts.map
|
|
7
|
+
//# sourceMappingURL=base64.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function getGlobalConfig(): Promise<any
|
|
2
|
-
//# sourceMappingURL=config.d.ts.map
|
|
1
|
+
export function getGlobalConfig(): Promise<any>;
|
|
2
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare function getDictsMapApi(
|
|
2
|
-
|
|
3
|
-
): Promise<
|
|
4
|
-
|
|
5
|
-
export declare function getDictMapApi(dictIdArr: string[]): Promise<{}>
|
|
6
|
-
//# sourceMappingURL=dict.d.ts.map
|
|
1
|
+
export declare function getDictsMapApi(dictId: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
2
|
+
export declare function getDictApi(dictId: string): Promise<any>;
|
|
3
|
+
export declare function getDictMapApi(dictIdArr: string[]): Promise<{}>;
|
|
4
|
+
//# sourceMappingURL=dict.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './dict'
|
|
2
|
-
export * from './menu'
|
|
3
|
-
export * from './oss'
|
|
4
|
-
export * from './user'
|
|
5
|
-
export * from './config.js'
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './dict';
|
|
2
|
+
export * from './menu';
|
|
3
|
+
export * from './oss';
|
|
4
|
+
export * from './user';
|
|
5
|
+
export * from './config.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
export declare function getPermissionApi(): Promise<import(
|
|
2
|
-
export declare function getMenuHistoryApi(): Promise<import(
|
|
3
|
-
export declare function menuHistoryApi(
|
|
4
|
-
|
|
5
|
-
): Promise<import(
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
8
|
-
): Promise<import(
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
|
|
12
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
13
|
-
export declare function deleteMenuCollectApi(
|
|
14
|
-
collectId: any,
|
|
15
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
16
|
-
export declare function removeMenuCollectApi(
|
|
17
|
-
params: any,
|
|
18
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
19
|
-
export declare function getAppListApi(): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
20
|
-
export declare function getMaxTabNumValueApi(): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
21
|
-
//# sourceMappingURL=menu.d.ts.map
|
|
1
|
+
export declare function getPermissionApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
2
|
+
export declare function getMenuHistoryApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
3
|
+
export declare function menuHistoryApi(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
4
|
+
export declare function deleteMenuHistoryApi(historyId: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
5
|
+
export declare function getMenuCollectApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
6
|
+
export declare function addMenuCollectApi(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
|
+
export declare function deleteMenuCollectApi(collectId: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
export declare function removeMenuCollectApi(params: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
export declare function getAppListApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
export declare function getMaxTabNumValueApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ResponseType } from 'axios'
|
|
1
|
+
import { ResponseType } from 'axios';
|
|
2
2
|
/**
|
|
3
3
|
* 文档中心下载文件的url,主要用于图片等直接写在 href 里
|
|
4
4
|
*
|
|
5
5
|
* @param fileId 文件Id
|
|
6
6
|
* @returns url
|
|
7
7
|
*/
|
|
8
|
-
export declare function getOssFileUrl(fileId?: string): string
|
|
8
|
+
export declare function getOssFileUrl(fileId?: string): string;
|
|
9
9
|
/**
|
|
10
10
|
* 文档中心上传文件的url
|
|
11
11
|
*
|
|
12
12
|
* @returns url
|
|
13
13
|
*/
|
|
14
|
-
export declare function putOssFileUrl(): string
|
|
14
|
+
export declare function putOssFileUrl(): string;
|
|
15
15
|
/**
|
|
16
16
|
* 获取文档中心文件
|
|
17
17
|
*
|
|
@@ -19,10 +19,7 @@ export declare function putOssFileUrl(): string
|
|
|
19
19
|
* @param responseType 数据类型,支持 arraybuffer | blob | document | json | text | stream
|
|
20
20
|
* @returns 文件内容
|
|
21
21
|
*/
|
|
22
|
-
export declare function getOssFileApi(
|
|
23
|
-
fileId: string,
|
|
24
|
-
responseType?: ResponseType,
|
|
25
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
22
|
+
export declare function getOssFileApi(fileId: string, responseType?: ResponseType): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
26
23
|
/**
|
|
27
24
|
* 将文件上传到文档中心
|
|
28
25
|
*
|
|
@@ -30,19 +27,14 @@ export declare function getOssFileApi(
|
|
|
30
27
|
* @param blob 文件的Blob数据
|
|
31
28
|
* @returns 文件Id
|
|
32
29
|
*/
|
|
33
|
-
export declare function putOssFileApi(
|
|
34
|
-
filename: string,
|
|
35
|
-
blob: Blob,
|
|
36
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
30
|
+
export declare function putOssFileApi(filename: string, blob: Blob): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
37
31
|
/**
|
|
38
32
|
* 获取文档中心预览URL
|
|
39
33
|
*
|
|
40
34
|
* @param fileId 文件Id
|
|
41
35
|
* @returns 文件内容
|
|
42
36
|
*/
|
|
43
|
-
export declare function getPreviewUrlApi(
|
|
44
|
-
fileId: string,
|
|
45
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
37
|
+
export declare function getPreviewUrlApi(fileId: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
46
38
|
/**
|
|
47
39
|
* 获取文档中心预览URL
|
|
48
40
|
*
|
|
@@ -50,5 +42,5 @@ export declare function getPreviewUrlApi(
|
|
|
50
42
|
* @param fileName 文件名
|
|
51
43
|
* @returns 文件内容
|
|
52
44
|
*/
|
|
53
|
-
export declare function downLoadScDcApi(fileId: string, fileName: string): Promise<void
|
|
54
|
-
//# sourceMappingURL=oss.d.ts.map
|
|
45
|
+
export declare function downLoadScDcApi(fileId: string, fileName: string): Promise<void>;
|
|
46
|
+
//# sourceMappingURL=oss.d.ts.map
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
export declare function loginApi({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare function getGlobalPolicyApi(): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
14
|
-
export declare function updatePasswordApi(
|
|
15
|
-
data: any,
|
|
16
|
-
): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
17
|
-
export declare function getCaptchaURL(validCodeId: string): string
|
|
18
|
-
export declare function logoutApi(): Promise<import('axios').AxiosResponse<any, any, {}>>
|
|
19
|
-
//# sourceMappingURL=user.d.ts.map
|
|
1
|
+
export declare function loginApi({ userName, password, validCodeId, validCodeInput }: {
|
|
2
|
+
userName: any;
|
|
3
|
+
password: any;
|
|
4
|
+
validCodeId: any;
|
|
5
|
+
validCodeInput: any;
|
|
6
|
+
}): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
|
+
export declare function getUserInfoApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
export declare function getGlobalPolicyApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
export declare function updatePasswordApi(data: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
export declare function getCaptchaURL(validCodeId: string): string;
|
|
11
|
+
export declare function logoutApi(): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
|
+
//# sourceMappingURL=user.d.ts.map
|
package/types/api/user.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function listUserTreeApi(params: any): Promise<any
|
|
2
|
-
//# sourceMappingURL=user.d.ts.map
|
|
1
|
+
export declare function listUserTreeApi(params: any): Promise<any>;
|
|
2
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
export default _default
|
|
34
|
-
//# sourceMappingURL=base.config.d.ts.map
|
|
2
|
+
title: string;
|
|
3
|
+
icomId: string;
|
|
4
|
+
showMenus: boolean;
|
|
5
|
+
routerBase: string;
|
|
6
|
+
loginRouteName: string;
|
|
7
|
+
rootRouteName: string;
|
|
8
|
+
homeRouteName: string;
|
|
9
|
+
authServerContext: string;
|
|
10
|
+
ossServerContext: string;
|
|
11
|
+
ismAmServerContext: string;
|
|
12
|
+
ismAcServerContext: string;
|
|
13
|
+
ismSqServerContext: string;
|
|
14
|
+
ilmServerContext: string;
|
|
15
|
+
imgServerContext: string;
|
|
16
|
+
imaServerContext: string;
|
|
17
|
+
ucExtServerContext: string;
|
|
18
|
+
dataManageServerContext: string;
|
|
19
|
+
kkfilepreviewContext: string;
|
|
20
|
+
errorMessage: string;
|
|
21
|
+
leftLockDays: number;
|
|
22
|
+
labelStyle: {
|
|
23
|
+
labelWidthButton: number;
|
|
24
|
+
labelWidthSmall: number;
|
|
25
|
+
labelWidthMiddle: number;
|
|
26
|
+
labelWidthMiddleLarge: number;
|
|
27
|
+
labelWidthLarge: number;
|
|
28
|
+
labelWidthSuperLarge: number;
|
|
29
|
+
};
|
|
30
|
+
/** 点击跳转的文字颜色 */
|
|
31
|
+
linkColor: string;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
//# sourceMappingURL=base.config.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function getDevConfig(): {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=dev.config.d.ts.map
|
|
2
|
+
showMenus: boolean;
|
|
3
|
+
};
|
|
4
|
+
//# sourceMappingURL=dev.config.d.ts.map
|
package/types/config/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare let config: any
|
|
2
|
-
declare function useConfig(isDev?: boolean): any
|
|
3
|
-
declare function setConfig(key: any, value: any): void
|
|
4
|
-
export default config
|
|
5
|
-
export { config, useConfig, setConfig }
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
declare let config: any;
|
|
2
|
+
declare function useConfig(isDev?: boolean): any;
|
|
3
|
+
declare function setConfig(key: any, value: any): void;
|
|
4
|
+
export default config;
|
|
5
|
+
export { config, useConfig, setConfig };
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare function getProdConfig(): {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
//# sourceMappingURL=prod.config.d.ts.map
|
|
2
|
+
showMenus: boolean;
|
|
3
|
+
};
|
|
4
|
+
//# sourceMappingURL=prod.config.d.ts.map
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './api'
|
|
2
|
-
export * from './config'
|
|
3
|
-
export * from './utils'
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './config';
|
|
3
|
+
export * from './utils';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
package/types/utils/base64.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
declare let Base64ForLogin: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
export { Base64ForLogin }
|
|
23
|
-
//# sourceMappingURL=base64.d.ts.map
|
|
2
|
+
Base64Chars: string;
|
|
3
|
+
/**
|
|
4
|
+
* Encode a string to a Base64 string follow Bse64 regular.
|
|
5
|
+
* @param s, a normal string
|
|
6
|
+
* @return a Base64 string
|
|
7
|
+
*/
|
|
8
|
+
encode: (s: any) => any;
|
|
9
|
+
/**
|
|
10
|
+
* Encodes a ucs2 string to a utf8 integer array.
|
|
11
|
+
* @param s, a string
|
|
12
|
+
* @return an integer array
|
|
13
|
+
*/
|
|
14
|
+
ucs2_utf8: (s: any) => any[];
|
|
15
|
+
/**
|
|
16
|
+
* Encodes a utf8 integer array to a ucs2 string.
|
|
17
|
+
* @param s, an integer array
|
|
18
|
+
* @return a string
|
|
19
|
+
*/
|
|
20
|
+
utf8_ucs2: (s: any) => string;
|
|
21
|
+
};
|
|
22
|
+
export { Base64ForLogin };
|
|
23
|
+
//# sourceMappingURL=base64.d.ts.map
|
package/types/utils/blob.d.ts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* @param contentType 数据的MIME Type,如 png 为 image/png
|
|
6
6
|
* @returns Blob数据
|
|
7
7
|
*/
|
|
8
|
-
export declare function base64ToBlob(base64Data: string, contentType: string): Blob
|
|
9
|
-
export declare function blobToBase64(blob: Blob, hasPrefix?: boolean): Promise<unknown
|
|
10
|
-
//# sourceMappingURL=blob.d.ts.map
|
|
8
|
+
export declare function base64ToBlob(base64Data: string, contentType: string): Blob;
|
|
9
|
+
export declare function blobToBase64(blob: Blob, hasPrefix?: boolean): Promise<unknown>;
|
|
10
|
+
//# sourceMappingURL=blob.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function getDictCache(dictId: string): any
|
|
2
|
-
export declare function setDictCache(dictId: string, data: any): void
|
|
3
|
-
//# sourceMappingURL=dict-cache.d.ts.map
|
|
1
|
+
export declare function getDictCache(dictId: string): any;
|
|
2
|
+
export declare function setDictCache(dictId: string, data: any): void;
|
|
3
|
+
//# sourceMappingURL=dict-cache.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getIndexDescCache(): any
|
|
2
|
-
export declare function setIndexDescCache(data: any): void
|
|
3
|
-
export declare function clearIndexDescCache(): void
|
|
4
|
-
//# sourceMappingURL=index-desc.d.ts.map
|
|
1
|
+
export declare function getIndexDescCache(): any;
|
|
2
|
+
export declare function setIndexDescCache(data: any): void;
|
|
3
|
+
export declare function clearIndexDescCache(): void;
|
|
4
|
+
//# sourceMappingURL=index-desc.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './index-desc'
|
|
2
|
-
export * from './permission-cache'
|
|
3
|
-
export * from './user-cache'
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './index-desc';
|
|
2
|
+
export * from './permission-cache';
|
|
3
|
+
export * from './user-cache';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getPermissionCache(): any
|
|
2
|
-
export declare function setPermissionCache(data: any): void
|
|
3
|
-
export declare function clearPermissionCache(): void
|
|
4
|
-
//# sourceMappingURL=permission-cache.d.ts.map
|
|
1
|
+
export declare function getPermissionCache(): any;
|
|
2
|
+
export declare function setPermissionCache(data: any): void;
|
|
3
|
+
export declare function clearPermissionCache(): void;
|
|
4
|
+
//# sourceMappingURL=permission-cache.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getUserInfoCache(): any
|
|
2
|
-
export declare function setUserInfoCache(data: any): void
|
|
3
|
-
export declare function clearUserInfoCache(): void
|
|
4
|
-
//# sourceMappingURL=user-cache.d.ts.map
|
|
1
|
+
export declare function getUserInfoCache(): any;
|
|
2
|
+
export declare function setUserInfoCache(data: any): void;
|
|
3
|
+
export declare function clearUserInfoCache(): void;
|
|
4
|
+
//# sourceMappingURL=user-cache.d.ts.map
|
package/types/utils/date.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function str2Date(value: string): Date
|
|
2
|
-
export declare function formatDate(value: string): string
|
|
3
|
-
export declare function formatDateChinese(value: string): string
|
|
4
|
-
//# sourceMappingURL=date.d.ts.map
|
|
1
|
+
export declare function str2Date(value: string): Date;
|
|
2
|
+
export declare function formatDate(value: string): string;
|
|
3
|
+
export declare function formatDateChinese(value: string): string;
|
|
4
|
+
//# sourceMappingURL=date.d.ts.map
|
package/types/utils/enum.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
/** 是否枚举的key */
|
|
2
|
-
export declare const IS_OR_NOT_ENUM_KEY =
|
|
2
|
+
export declare const IS_OR_NOT_ENUM_KEY = "IS_ENUM";
|
|
3
3
|
/** 是否枚举的map形式 */
|
|
4
4
|
export declare const IS_OR_NOT_ENUM: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
5
|
+
'1': string;
|
|
6
|
+
'0': string;
|
|
7
|
+
};
|
|
8
8
|
/** 是否枚举的list形式 */
|
|
9
9
|
export declare const IS_OR_NOT_ENUM_LIST: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}[]
|
|
10
|
+
K: string;
|
|
11
|
+
V: string;
|
|
12
|
+
}[];
|
|
13
13
|
export declare const UC_ENUM: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
14
|
+
MANAGE_UNIT_ID: string;
|
|
15
|
+
ORG_CODE_ADMIN: string;
|
|
16
|
+
ORG_CODE_MKT: string;
|
|
17
|
+
ORG_CODE_LOG: string;
|
|
18
|
+
ORG_CODE_ACTIVITY: string;
|
|
19
|
+
ADMIN_LEVEL_IND: string;
|
|
20
|
+
ADMIN_LEVEL_CENTER: string;
|
|
21
|
+
ADMIN_LEVEL_FAC: string;
|
|
22
|
+
ADMIN_LEVEL_DIST: string;
|
|
23
|
+
ADMIN_LEVEL_COMMON_DEPT: string;
|
|
24
|
+
ADMIN_LEVEL_COMMON_POST: string;
|
|
25
|
+
LEVEL_IND: string;
|
|
26
|
+
LEVEL_CENTER: string;
|
|
27
|
+
LEVEL_FAC: string;
|
|
28
|
+
LEVEL_DIST: string;
|
|
29
|
+
LEVEL_CIGAR_DIST: string;
|
|
30
|
+
LEVEL_COMMON_DEPT: string;
|
|
31
|
+
LEVEL_COMMON_POST: string;
|
|
32
|
+
LEVEL_DIST_MANAGE_POST: string;
|
|
33
|
+
LEVEL_CUST_MANAGE_POST: string;
|
|
34
|
+
LEVEL_CIGAR_DIST_MANAGE_POST: string;
|
|
35
|
+
LEVEL_CIGAR_CUST_MANAGE_POST: string;
|
|
36
|
+
LEVEL_INTERNAL_POST: string;
|
|
37
|
+
};
|
|
38
38
|
/**
|
|
39
39
|
* 将自定义的列表转换为枚举列表格式,如
|
|
40
40
|
* ```
|
|
@@ -47,14 +47,10 @@ export declare const UC_ENUM: {
|
|
|
47
47
|
* @param vProp value对应属性名
|
|
48
48
|
* @returns 公共组件可直接使用的枚举列表
|
|
49
49
|
*/
|
|
50
|
-
export declare function renderEnumList(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
): {
|
|
55
|
-
K: any
|
|
56
|
-
V: any
|
|
57
|
-
}[]
|
|
50
|
+
export declare function renderEnumList(list?: any[], kProp?: string, vProp?: string): {
|
|
51
|
+
K: any;
|
|
52
|
+
V: any;
|
|
53
|
+
}[];
|
|
58
54
|
/**
|
|
59
55
|
* 将自定义的列表转换为枚举对象格式,如
|
|
60
56
|
* ```
|
|
@@ -66,7 +62,7 @@ export declare function renderEnumList(
|
|
|
66
62
|
* @param vProp value对应属性名
|
|
67
63
|
* @returns 公共组件可直接使用的枚举对象
|
|
68
64
|
*/
|
|
69
|
-
export declare function renderEnumData(list?: any[], kProp?: string, vProp?: string): any
|
|
65
|
+
export declare function renderEnumData(list?: any[], kProp?: string, vProp?: string): any;
|
|
70
66
|
/**
|
|
71
67
|
* 统一处理表格列定义的枚举列
|
|
72
68
|
* - 由于表格组件不方便获取枚举数据,需要各业务先获取枚举数据后,重新组织列定义
|
|
@@ -76,7 +72,7 @@ export declare function renderEnumData(list?: any[], kProp?: string, vProp?: str
|
|
|
76
72
|
* @param enumRelation 枚举数据,支持多个枚举,格式为 `{ '枚举Id1': [{ K: '', V: ''}] }` 或 `{ '枚举Id1': { 'K': 'V' } }`
|
|
77
73
|
* @returns 新的列定义
|
|
78
74
|
*/
|
|
79
|
-
export declare function renderColumnEnums(columns?: any[], enumRelation?: {}): any[]
|
|
75
|
+
export declare function renderColumnEnums(columns?: any[], enumRelation?: {}): any[];
|
|
80
76
|
/**
|
|
81
77
|
* 统一处理表单的类枚举列
|
|
82
78
|
* - 用于处理需特定接口获取数据的列表
|
|
@@ -86,5 +82,5 @@ export declare function renderColumnEnums(columns?: any[], enumRelation?: {}): a
|
|
|
86
82
|
* @param enumRelation 枚举数据,支持多个枚举,格式为 `{ '枚举Id1': [{ K: '', V: ''}] }` 或 `{ '枚举Id1': { 'K': 'V' } }`
|
|
87
83
|
* @returns 新的表单定义
|
|
88
84
|
*/
|
|
89
|
-
export declare function renderFieldEnums(fieldList?: any[], enumRelation?: {}): any[]
|
|
90
|
-
//# sourceMappingURL=enum.d.ts.map
|
|
85
|
+
export declare function renderFieldEnums(fieldList?: any[], enumRelation?: {}): any[];
|
|
86
|
+
//# sourceMappingURL=enum.d.ts.map
|