@gct-paas/core 0.1.4-dev.5 → 0.1.4-dev.7
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.mjs +20168 -0
- package/dist/index.min.cjs +2 -12
- package/dist/index.system.min.js +2 -12
- package/es/create-app-vue.mjs +1 -2
- package/es/enums/index.mjs +0 -4
- package/es/global/gct/gct.d.ts +3 -1
- package/es/global/gct/gct.mjs +2 -0
- package/es/index.mjs +49 -49
- package/es/modules/error-handler/error-strategy.mjs +4 -1
- package/es/store/global-store.mjs +7 -2
- package/es/types/index.d.ts +0 -2
- package/package.json +28 -26
- package/es/interface/controller/edit-form/edit-form.controller.mjs +0 -1
- package/es/interface/controller/editor/i-color-editor.controller.mjs +0 -1
- package/es/interface/controller/editor/i-length-unit-editor.controller.mjs +0 -1
- package/es/interface/controller/editor-item/editor-item.controller.mjs +0 -1
- package/es/interface/controller/form/form.controller.mjs +0 -3
- package/es/interface/controller/form-collapse/form-collapse.controller.mjs +0 -1
- package/es/interface/controller/form-collapse-pane/form-collapse-pane.controller.mjs +0 -1
- package/es/interface/controller/form-edit-item/form-edit-item.controller.mjs +0 -1
- package/es/interface/controller/form-group/form-group.controller.mjs +0 -1
- package/es/interface/controller/form-hidden-item/form-hidden-item.controller.mjs +0 -1
- package/es/interface/controller/form-item/form-item.controller.mjs +0 -1
- package/es/interface/controller/form-item-basic/form-item-basic.controller.mjs +0 -1
- package/es/interface/controller/form-tab/form-tab.controller.mjs +0 -1
- package/es/interface/controller/form-tab-pane/form-tab-pane.controller.mjs +0 -1
- package/es/interface/controller/i-designer-controller.mjs +0 -1
- package/es/interface/controller/index.mjs +0 -1
- package/es/interface/events/form/i-form.event.mjs +0 -1
- package/es/interface/events/index.mjs +0 -1
- package/es/interface/form/i-editor/i-check-switch.mjs +0 -3
- package/es/interface/form/i-editor/i-checkbox-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-color-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-editor-basic.mjs +0 -1
- package/es/interface/form/i-editor/i-icon-select-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-info-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-length-unit-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-number-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-picker-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-radio-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-select-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-span-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-switch-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-text-editor.mjs +0 -3
- package/es/interface/form/i-editor/i-textarea-editor.mjs +0 -3
- package/es/interface/form/i-form/i-edit-form.mjs +0 -1
- package/es/interface/form/i-form/i-form-collapse-pane.mjs +0 -1
- package/es/interface/form/i-form/i-form-collapse.mjs +0 -1
- package/es/interface/form/i-form/i-form-container.mjs +0 -1
- package/es/interface/form/i-form/i-form-edit-item.mjs +0 -1
- package/es/interface/form/i-form/i-form-group-container.mjs +0 -1
- package/es/interface/form/i-form/i-form-group.mjs +0 -1
- package/es/interface/form/i-form/i-form-hidden-item.mjs +0 -1
- package/es/interface/form/i-form/i-form-item-basic.mjs +0 -1
- package/es/interface/form/i-form/i-form-item.mjs +0 -1
- package/es/interface/form/i-form/i-form-tab-pane.mjs +0 -1
- package/es/interface/form/i-form/i-form-tab.mjs +0 -1
- package/es/interface/form/i-form/i-form.mjs +0 -1
- package/es/interface/form/index.mjs +0 -1
- package/es/interface/hooks/i-designer-hooks.mjs +0 -3
- package/es/interface/hooks/index.mjs +0 -1
- package/es/interface/i-dictionary/i-dictionary-item.mjs +0 -1
- package/es/interface/i-dictionary/i-dictionary.mjs +0 -1
- package/es/interface/i-import-style-map/i-import-style-map.mjs +0 -1
- package/es/interface/i-message-util/i-message-util.mjs +0 -1
- package/es/interface/i-modal/i-modal.mjs +0 -3
- package/es/interface/i-modal-data/i-modal-data.mjs +0 -1
- package/es/interface/i-pinia-action/i-global-actions.mjs +0 -1
- package/es/interface/i-pinia-getter/i-global-getters.mjs +0 -1
- package/es/interface/i-pinia-state/i-global-state.mjs +0 -1
- package/es/interface/layout/i-flex-layout/i-flex-container.mjs +0 -1
- package/es/interface/layout/i-flex-layout/i-flex-item.mjs +0 -1
- package/es/interface/layout/i-grid-layout/i-grid-container.mjs +0 -1
- package/es/interface/layout/i-grid-layout/i-grid-item-span.mjs +0 -1
- package/es/interface/layout/i-grid-layout/i-grid-item.mjs +0 -1
- package/es/interface/layout/i-layout-basis/i-layout-container-basis.mjs +0 -1
- package/es/interface/layout/index.mjs +0 -1
- package/es/interface/low-code-types/index.mjs +0 -5
- package/es/interface/low-code-types/modal-types.mjs +0 -3
- package/es/interface/low-code-types/model/index.mjs +0 -1
- package/es/interface/low-code-types/schema/index.mjs +0 -1
- package/es/interface/low-code-types/widget-basic-types.mjs +0 -3
- package/es/interface/provider/i-editor-provider/i-editor-provider.mjs +0 -1
- package/es/interface/provider/i-form-item-provider/i-form-item-provider.mjs +0 -1
- package/es/interface/provider/i-provider-basic/i-provider-basic.mjs +0 -1
- package/es/interface/provider/index.mjs +0 -1
- package/es/interface/state/form/form.state.mjs +0 -1
- package/es/interface/state/form-collapse/form-collapse.state.mjs +0 -1
- package/es/interface/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -1
- package/es/interface/state/form-edit-item/form-edit-item.state.mjs +0 -1
- package/es/interface/state/form-group/form-group.state.mjs +0 -1
- package/es/interface/state/form-hidden-item/form-hidden-item.state.mjs +0 -1
- package/es/interface/state/form-item/form-item.state.mjs +0 -1
- package/es/interface/state/form-item-basic/form-item-basic.state.mjs +0 -1
- package/es/interface/state/form-tab/form-tab.state.mjs +0 -1
- package/es/interface/state/form-tab-pane/form-tab-pane.state.mjs +0 -1
- package/es/interface/state/i-designer-state.mjs +0 -1
- package/es/interface/state/index.mjs +0 -1
- package/es/interface/style/i-border.mjs +0 -1
- package/es/interface/style/i-font.mjs +0 -1
- package/es/interface/style/i-margin.mjs +0 -1
- package/es/interface/style/i-padding.mjs +0 -1
- package/es/interface/style/i-position.mjs +0 -1
- package/es/interface/style/i-spacing.mjs +0 -1
- package/es/interface/style/index.mjs +0 -1
- package/es/modules/api-service/api-manage.d.ts +0 -26
- package/es/modules/api-service/api-manage.mjs +0 -33
- package/es/modules/api-service/api-service.d.ts +0 -96
- package/es/modules/api-service/api-service.interface.d.ts +0 -159
- package/es/modules/api-service/api-service.interface.mjs +0 -4
- package/es/modules/api-service/api-service.mjs +0 -173
- package/es/modules/api-service/http.enum.d.ts +0 -76
- package/es/modules/api-service/http.enum.mjs +0 -63
- package/es/modules/api-service/http.util.d.ts +0 -113
- package/es/modules/api-service/http.util.mjs +0 -160
- package/es/modules/api-service/index.d.ts +0 -8
- package/es/modules/api-service/index.mjs +0 -13
- package/es/modules/error-handler/error-handler.interface.mjs +0 -1
- package/es/modules/platform-config/constants.mjs +0 -63
- package/es/modules/platform-config/types.mjs +0 -27
- package/es/modules/platform-config/useBasicSetting.mjs +0 -50
- package/es/modules/platform-config/useDeploySetting.mjs +0 -32
- package/es/modules/platform-config/useLoginSetting.mjs +0 -183
- package/es/modules/platform-config/useOrgSetting.mjs +0 -121
- package/es/modules/platform-config/useSecuritySetting.mjs +0 -71
- package/es/modules/platform-config/useThemeSetting.mjs +0 -73
- package/es/modules/platform-config/useWatermarkSetting.mjs +0 -48
- package/es/provider/i-designer-provider/i-designer-provider.mjs +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var ResultEnum = /* @__PURE__ */ ((ResultEnum2) => {
|
|
3
|
-
ResultEnum2[ResultEnum2["SUCCESS"] = 200] = "SUCCESS";
|
|
4
|
-
ResultEnum2[ResultEnum2["ERROR"] = -1] = "ERROR";
|
|
5
|
-
ResultEnum2[ResultEnum2["TIMEOUT"] = 401] = "TIMEOUT";
|
|
6
|
-
ResultEnum2["TYPE"] = "success";
|
|
7
|
-
return ResultEnum2;
|
|
8
|
-
})(ResultEnum || {});
|
|
9
|
-
var RequestEnum = /* @__PURE__ */ ((RequestEnum2) => {
|
|
10
|
-
RequestEnum2["GET"] = "GET";
|
|
11
|
-
RequestEnum2["POST"] = "POST";
|
|
12
|
-
RequestEnum2["PUT"] = "PUT";
|
|
13
|
-
RequestEnum2["DELETE"] = "DELETE";
|
|
14
|
-
return RequestEnum2;
|
|
15
|
-
})(RequestEnum || {});
|
|
16
|
-
var ContentTypeEnum = /* @__PURE__ */ ((ContentTypeEnum2) => {
|
|
17
|
-
ContentTypeEnum2["JSON"] = "application/json;charset=UTF-8";
|
|
18
|
-
ContentTypeEnum2["FORM_URLENCODED"] = "application/x-www-form-urlencoded;charset=UTF-8";
|
|
19
|
-
ContentTypeEnum2["FORM_DATA"] = "multipart/form-data;charset=UTF-8";
|
|
20
|
-
return ContentTypeEnum2;
|
|
21
|
-
})(ContentTypeEnum || {});
|
|
22
|
-
var BizServiceEnum = /* @__PURE__ */ ((BizServiceEnum2) => {
|
|
23
|
-
BizServiceEnum2["submit"] = "post";
|
|
24
|
-
BizServiceEnum2["listByIds"] = "get";
|
|
25
|
-
BizServiceEnum2["getone"] = "post";
|
|
26
|
-
BizServiceEnum2["listAll"] = "post";
|
|
27
|
-
BizServiceEnum2["listByPage"] = "post";
|
|
28
|
-
BizServiceEnum2["listTree"] = "post";
|
|
29
|
-
BizServiceEnum2["save"] = "post";
|
|
30
|
-
BizServiceEnum2["saveOrUpdate"] = "post";
|
|
31
|
-
BizServiceEnum2["saveBatch"] = "post";
|
|
32
|
-
BizServiceEnum2["importData"] = "post";
|
|
33
|
-
BizServiceEnum2["exportData"] = "post";
|
|
34
|
-
BizServiceEnum2["remove"] = "post";
|
|
35
|
-
BizServiceEnum2["removeById"] = "delete";
|
|
36
|
-
BizServiceEnum2["removeByIds"] = "delete";
|
|
37
|
-
BizServiceEnum2["update"] = "put";
|
|
38
|
-
BizServiceEnum2["updateById"] = "put";
|
|
39
|
-
BizServiceEnum2["updateByIds"] = "put";
|
|
40
|
-
BizServiceEnum2["rdoSave"] = "post";
|
|
41
|
-
BizServiceEnum2["rdoListAll"] = "post";
|
|
42
|
-
BizServiceEnum2["rdoListByPage"] = "post";
|
|
43
|
-
BizServiceEnum2["rdoListVersionById"] = "get";
|
|
44
|
-
BizServiceEnum2["rdoSaveVersion"] = "post";
|
|
45
|
-
BizServiceEnum2["rdoSaveBatch"] = "post";
|
|
46
|
-
BizServiceEnum2["rdoUpdateVersionById"] = "put";
|
|
47
|
-
BizServiceEnum2["rdoRemoveVersionById"] = "delete";
|
|
48
|
-
BizServiceEnum2["rdoRemoveById"] = "delete";
|
|
49
|
-
BizServiceEnum2["rdoGetVersionById"] = "get";
|
|
50
|
-
BizServiceEnum2["getOne"] = "post";
|
|
51
|
-
BizServiceEnum2["rdoGetVersionByRefId"] = "post";
|
|
52
|
-
BizServiceEnum2["getById"] = "get";
|
|
53
|
-
BizServiceEnum2["rdoListAllVersion"] = "post";
|
|
54
|
-
BizServiceEnum2["rdoRefListByPage"] = "post";
|
|
55
|
-
BizServiceEnum2["export"] = "post";
|
|
56
|
-
BizServiceEnum2["import"] = "post";
|
|
57
|
-
BizServiceEnum2["rdoExport"] = "post";
|
|
58
|
-
BizServiceEnum2["rdoImport"] = "post";
|
|
59
|
-
BizServiceEnum2["biz_search"] = "post";
|
|
60
|
-
return BizServiceEnum2;
|
|
61
|
-
})(BizServiceEnum || {});
|
|
62
|
-
|
|
63
|
-
export { BizServiceEnum, ContentTypeEnum, RequestEnum, ResultEnum };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { IHttpResponse } from './api-service.interface';
|
|
3
|
-
/**
|
|
4
|
-
* 全局请求工具类
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
|
-
* @class HttpUtil
|
|
8
|
-
*/
|
|
9
|
-
export declare class HttpUtil {
|
|
10
|
-
/**
|
|
11
|
-
* 挂载中间件
|
|
12
|
-
*
|
|
13
|
-
* @static
|
|
14
|
-
* @param {(_axios: AxiosInstance) => void} fn 中间件函数
|
|
15
|
-
*/
|
|
16
|
-
static use(fn: (_axios: AxiosInstance) => void): void;
|
|
17
|
-
/**
|
|
18
|
-
* GET 请求方法
|
|
19
|
-
*
|
|
20
|
-
* @static
|
|
21
|
-
* @template T
|
|
22
|
-
* @param {string} url 请求地址
|
|
23
|
-
* @param {IObject} [data={}] 请求数据
|
|
24
|
-
* @param {IParams} [query={}] 查询参数
|
|
25
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
26
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
27
|
-
*/
|
|
28
|
-
static get<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
29
|
-
/**
|
|
30
|
-
* POST 请求方法
|
|
31
|
-
*
|
|
32
|
-
* @static
|
|
33
|
-
* @template T
|
|
34
|
-
* @param {string} url 请求地址
|
|
35
|
-
* @param {IObject} [data={}] 请求数据
|
|
36
|
-
* @param {IParams} [query={}] 查询参数
|
|
37
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
38
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
39
|
-
*/
|
|
40
|
-
static post<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
41
|
-
/**
|
|
42
|
-
* PUT 请求方法
|
|
43
|
-
*
|
|
44
|
-
* @static
|
|
45
|
-
* @template T
|
|
46
|
-
* @param {string} url 请求地址
|
|
47
|
-
* @param {IObject} [data={}] 请求数据
|
|
48
|
-
* @param {IParams} [query={}] 查询参数
|
|
49
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
50
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
51
|
-
*/
|
|
52
|
-
static put<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
53
|
-
/**
|
|
54
|
-
* DELETE 请求方法
|
|
55
|
-
*
|
|
56
|
-
* @static
|
|
57
|
-
* @template T
|
|
58
|
-
* @param {string} url 请求地址
|
|
59
|
-
* @param {IObject} [data={}] 请求数据
|
|
60
|
-
* @param {IParams} [query={}] 查询参数
|
|
61
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
62
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
63
|
-
*/
|
|
64
|
-
static delete<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
65
|
-
/**
|
|
66
|
-
* OPTIONS 请求方法
|
|
67
|
-
*
|
|
68
|
-
* @static
|
|
69
|
-
* @template T
|
|
70
|
-
* @param {string} url 请求地址
|
|
71
|
-
* @param {IObject} [data={}] 请求数据
|
|
72
|
-
* @param {IParams} [query={}] 查询参数
|
|
73
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
74
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
75
|
-
*/
|
|
76
|
-
static options<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
77
|
-
/**
|
|
78
|
-
* PATCH 请求方法
|
|
79
|
-
*
|
|
80
|
-
* @static
|
|
81
|
-
* @template T
|
|
82
|
-
* @param {string} url 请求地址
|
|
83
|
-
* @param {IObject} [data={}] 请求数据
|
|
84
|
-
* @param {IParams} [query={}] 查询参数
|
|
85
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
86
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
87
|
-
*/
|
|
88
|
-
static patch<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
89
|
-
/**
|
|
90
|
-
* HEAD 请求方法
|
|
91
|
-
*
|
|
92
|
-
* @static
|
|
93
|
-
* @template T
|
|
94
|
-
* @param {string} url 请求地址
|
|
95
|
-
* @param {IObject} [data={}] 请求数据
|
|
96
|
-
* @param {IParams} [query={}] 查询参数
|
|
97
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
98
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
99
|
-
*/
|
|
100
|
-
static head<T = unknown>(url: string, data?: IObject, query?: IParams, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
101
|
-
/**
|
|
102
|
-
* 通用请求方法
|
|
103
|
-
*
|
|
104
|
-
* @static
|
|
105
|
-
* @template T
|
|
106
|
-
* @param {string} url 请求地址
|
|
107
|
-
* @param {(IObject | null)} data 请求数据
|
|
108
|
-
* @param {(IParams | null)} query 查询参数
|
|
109
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
110
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
111
|
-
*/
|
|
112
|
-
static request<T = unknown>(url: string, data: IObject | null, query: IParams | null, config?: AxiosRequestConfig): Promise<IHttpResponse<T>>;
|
|
113
|
-
}
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import qs from 'qs';
|
|
3
|
-
import { ContentTypeEnum } from './http.enum.mjs';
|
|
4
|
-
import '../../utils/index.mjs';
|
|
5
|
-
import { deepMerge } from '../../utils/tools/tools.mjs';
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
const instance = axios.create();
|
|
9
|
-
class HttpUtil {
|
|
10
|
-
/**
|
|
11
|
-
* 挂载中间件
|
|
12
|
-
*
|
|
13
|
-
* @static
|
|
14
|
-
* @param {(_axios: AxiosInstance) => void} fn 中间件函数
|
|
15
|
-
*/
|
|
16
|
-
static use(fn) {
|
|
17
|
-
fn(instance);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* GET 请求方法
|
|
21
|
-
*
|
|
22
|
-
* @static
|
|
23
|
-
* @template T
|
|
24
|
-
* @param {string} url 请求地址
|
|
25
|
-
* @param {IObject} [data={}] 请求数据
|
|
26
|
-
* @param {IParams} [query={}] 查询参数
|
|
27
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
28
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
29
|
-
*/
|
|
30
|
-
static get(url, data = {}, query = {}, config = {}) {
|
|
31
|
-
return this.request(url, data, query, { ...config, method: "GET" });
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* POST 请求方法
|
|
35
|
-
*
|
|
36
|
-
* @static
|
|
37
|
-
* @template T
|
|
38
|
-
* @param {string} url 请求地址
|
|
39
|
-
* @param {IObject} [data={}] 请求数据
|
|
40
|
-
* @param {IParams} [query={}] 查询参数
|
|
41
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
42
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
43
|
-
*/
|
|
44
|
-
static post(url, data = {}, query = {}, config = {}) {
|
|
45
|
-
return this.request(url, data, query, { ...config, method: "POST" });
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* PUT 请求方法
|
|
49
|
-
*
|
|
50
|
-
* @static
|
|
51
|
-
* @template T
|
|
52
|
-
* @param {string} url 请求地址
|
|
53
|
-
* @param {IObject} [data={}] 请求数据
|
|
54
|
-
* @param {IParams} [query={}] 查询参数
|
|
55
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
56
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
57
|
-
*/
|
|
58
|
-
static put(url, data = {}, query = {}, config = {}) {
|
|
59
|
-
return this.request(url, data, query, { ...config, method: "PUT" });
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* DELETE 请求方法
|
|
63
|
-
*
|
|
64
|
-
* @static
|
|
65
|
-
* @template T
|
|
66
|
-
* @param {string} url 请求地址
|
|
67
|
-
* @param {IObject} [data={}] 请求数据
|
|
68
|
-
* @param {IParams} [query={}] 查询参数
|
|
69
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
70
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
71
|
-
*/
|
|
72
|
-
static delete(url, data = {}, query = {}, config = {}) {
|
|
73
|
-
return this.request(url, data, query, { ...config, method: "DELETE" });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* OPTIONS 请求方法
|
|
77
|
-
*
|
|
78
|
-
* @static
|
|
79
|
-
* @template T
|
|
80
|
-
* @param {string} url 请求地址
|
|
81
|
-
* @param {IObject} [data={}] 请求数据
|
|
82
|
-
* @param {IParams} [query={}] 查询参数
|
|
83
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
84
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
85
|
-
*/
|
|
86
|
-
static options(url, data = {}, query = {}, config = {}) {
|
|
87
|
-
return this.request(url, data, query, { ...config, method: "OPTIONS" });
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* PATCH 请求方法
|
|
91
|
-
*
|
|
92
|
-
* @static
|
|
93
|
-
* @template T
|
|
94
|
-
* @param {string} url 请求地址
|
|
95
|
-
* @param {IObject} [data={}] 请求数据
|
|
96
|
-
* @param {IParams} [query={}] 查询参数
|
|
97
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
98
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
99
|
-
*/
|
|
100
|
-
static patch(url, data = {}, query = {}, config = {}) {
|
|
101
|
-
return this.request(url, data, query, { ...config, method: "PATCH" });
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* HEAD 请求方法
|
|
105
|
-
*
|
|
106
|
-
* @static
|
|
107
|
-
* @template T
|
|
108
|
-
* @param {string} url 请求地址
|
|
109
|
-
* @param {IObject} [data={}] 请求数据
|
|
110
|
-
* @param {IParams} [query={}] 查询参数
|
|
111
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
112
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
113
|
-
*/
|
|
114
|
-
static head(url, data = {}, query = {}, config = {}) {
|
|
115
|
-
return this.request(url, data, query, { ...config, method: "HEAD" });
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* 通用请求方法
|
|
119
|
-
*
|
|
120
|
-
* @static
|
|
121
|
-
* @template T
|
|
122
|
-
* @param {string} url 请求地址
|
|
123
|
-
* @param {(IObject | null)} data 请求数据
|
|
124
|
-
* @param {(IParams | null)} query 查询参数
|
|
125
|
-
* @param {AxiosRequestConfig} [config={}] 请求配置
|
|
126
|
-
* @returns {Promise<IHttpResponse<T>>} 请求结果
|
|
127
|
-
*/
|
|
128
|
-
static async request(url, data, query, config = {}) {
|
|
129
|
-
if (query) {
|
|
130
|
-
const queryStr = qs.stringify(query, { arrayFormat: "brackets" });
|
|
131
|
-
if (queryStr) {
|
|
132
|
-
if (url.includes("?")) {
|
|
133
|
-
url += `&${queryStr}`;
|
|
134
|
-
} else {
|
|
135
|
-
url += `?${queryStr}`;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
const res = await instance.request(
|
|
140
|
-
deepMerge(
|
|
141
|
-
{
|
|
142
|
-
url,
|
|
143
|
-
data: JSON.stringify(data ? data : {}),
|
|
144
|
-
params: query,
|
|
145
|
-
timeout: 2 * 60 * 1e3,
|
|
146
|
-
headers: {
|
|
147
|
-
"Content-Type": ContentTypeEnum.JSON
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
config
|
|
151
|
-
)
|
|
152
|
-
);
|
|
153
|
-
if (res.status >= 200 && res.status < 300) {
|
|
154
|
-
return res.data;
|
|
155
|
-
}
|
|
156
|
-
throw res;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export { HttpUtil };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ApiMap } from './api-service.interface';
|
|
2
|
-
/**
|
|
3
|
-
* API 实例
|
|
4
|
-
*/
|
|
5
|
-
export declare const api: ApiMap;
|
|
6
|
-
export { ResultEnum, RequestEnum, ContentTypeEnum, BizServiceEnum, } from './http.enum';
|
|
7
|
-
export type { IHttpResponse, ApiConfigItem, ApiItem, ApiMap, } from './api-service.interface';
|
|
8
|
-
export { HttpUtil } from './http.util';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { apiConfig as apiConfig$1 } from '@gct-paas/api/apaas';
|
|
2
|
-
import { apiConfig } from '@gct-paas/api/platform';
|
|
3
|
-
import { ApiManage } from './api-manage.mjs';
|
|
4
|
-
export { BizServiceEnum, ContentTypeEnum, RequestEnum, ResultEnum } from './http.enum.mjs';
|
|
5
|
-
export { HttpUtil } from './http.util.mjs';
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
const api = {
|
|
9
|
-
apaas: new ApiManage("/gct-apaas/api", apiConfig$1),
|
|
10
|
-
platform: new ApiManage("/gct-platform/api", apiConfig)
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export { api };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var LoginSortTypeEnum = /* @__PURE__ */ ((LoginSortTypeEnum2) => {
|
|
3
|
-
LoginSortTypeEnum2["SYSTEM"] = "SYSTEM";
|
|
4
|
-
LoginSortTypeEnum2["THIRD_PARTY"] = "THIRD_PARTY";
|
|
5
|
-
return LoginSortTypeEnum2;
|
|
6
|
-
})(LoginSortTypeEnum || {});
|
|
7
|
-
var LoginTypeEnum = /* @__PURE__ */ ((LoginTypeEnum2) => {
|
|
8
|
-
LoginTypeEnum2["ACCOUNT"] = "ACCOUNT";
|
|
9
|
-
LoginTypeEnum2["DOMAIN_ACCOUNT"] = "DOMAIN_ACCOUNT";
|
|
10
|
-
LoginTypeEnum2["MOBILE"] = "MOBILE";
|
|
11
|
-
LoginTypeEnum2["DINGDING"] = "DINGDING";
|
|
12
|
-
LoginTypeEnum2["FEISHU"] = "FEISHU";
|
|
13
|
-
LoginTypeEnum2["QIYEWEIXIN"] = "QIYEWEIXIN";
|
|
14
|
-
return LoginTypeEnum2;
|
|
15
|
-
})(LoginTypeEnum || {});
|
|
16
|
-
const loginTypeInfo = {
|
|
17
|
-
["ACCOUNT" /* ACCOUNT */]: {
|
|
18
|
-
icon: "icon-a-Accountnumber",
|
|
19
|
-
color: "#0E81EC"
|
|
20
|
-
},
|
|
21
|
-
["DOMAIN_ACCOUNT" /* DOMAIN_ACCOUNT */]: {
|
|
22
|
-
icon: "icon-a-Domainaccount",
|
|
23
|
-
color: "#FFAB06"
|
|
24
|
-
},
|
|
25
|
-
["MOBILE" /* MOBILE */]: {
|
|
26
|
-
icon: "icon-a-Cellphone",
|
|
27
|
-
color: "#6A70FE"
|
|
28
|
-
},
|
|
29
|
-
["DINGDING" /* DINGDING */]: {
|
|
30
|
-
icon: "DingdingIcon"
|
|
31
|
-
},
|
|
32
|
-
["FEISHU" /* FEISHU */]: {
|
|
33
|
-
icon: "FeishuIcon"
|
|
34
|
-
},
|
|
35
|
-
["QIYEWEIXIN" /* QIYEWEIXIN */]: {
|
|
36
|
-
icon: "QiyeweixinIcon"
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const SystemLoginKeys = [
|
|
40
|
-
"ACCOUNT" /* ACCOUNT */,
|
|
41
|
-
"DOMAIN_ACCOUNT" /* DOMAIN_ACCOUNT */,
|
|
42
|
-
"MOBILE" /* MOBILE */
|
|
43
|
-
];
|
|
44
|
-
const OtherLoginKeys = [
|
|
45
|
-
"DINGDING" /* DINGDING */,
|
|
46
|
-
"FEISHU" /* FEISHU */,
|
|
47
|
-
"QIYEWEIXIN" /* QIYEWEIXIN */
|
|
48
|
-
];
|
|
49
|
-
const getLoginTypeOptions = (keys) => {
|
|
50
|
-
if (!keys) {
|
|
51
|
-
return [];
|
|
52
|
-
}
|
|
53
|
-
return keys.map((key) => {
|
|
54
|
-
return {
|
|
55
|
-
id: key,
|
|
56
|
-
label: key,
|
|
57
|
-
value: key,
|
|
58
|
-
...loginTypeInfo[key]
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export { LoginSortTypeEnum, LoginTypeEnum, OtherLoginKeys, SystemLoginKeys, getLoginTypeOptions };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var PlatformSettingEnum = /* @__PURE__ */ ((PlatformSettingEnum2) => {
|
|
3
|
-
PlatformSettingEnum2["BASIC"] = "BASE_CFG";
|
|
4
|
-
PlatformSettingEnum2["WATERMARK"] = "MARK_CFG";
|
|
5
|
-
PlatformSettingEnum2["SECURITY"] = "SECURITY_CFG";
|
|
6
|
-
PlatformSettingEnum2["LOGIN"] = "LOGIN_CFG";
|
|
7
|
-
PlatformSettingEnum2["THEME"] = "THEME_CFG";
|
|
8
|
-
PlatformSettingEnum2["ORGANIZATION"] = "ORG_CFG";
|
|
9
|
-
PlatformSettingEnum2["APK"] = "APK_CFG";
|
|
10
|
-
PlatformSettingEnum2["DEPLOY"] = "DEPLOY_CFG";
|
|
11
|
-
PlatformSettingEnum2["GLOBAL"] = "GLOBAL_CFG";
|
|
12
|
-
return PlatformSettingEnum2;
|
|
13
|
-
})(PlatformSettingEnum || {});
|
|
14
|
-
var PassRule = /* @__PURE__ */ ((PassRule2) => {
|
|
15
|
-
PassRule2["NUMBER"] = "NUMBER";
|
|
16
|
-
PassRule2["LOWERCASE"] = "LOWERCASE";
|
|
17
|
-
PassRule2["UPPERCASE"] = "UPPERCASE";
|
|
18
|
-
PassRule2["SPECHARS"] = "SPECHARS";
|
|
19
|
-
return PassRule2;
|
|
20
|
-
})(PassRule || {});
|
|
21
|
-
var KickRuleEnum = /* @__PURE__ */ ((KickRuleEnum2) => {
|
|
22
|
-
KickRuleEnum2["SAME_END"] = "SAME_END";
|
|
23
|
-
KickRuleEnum2["DIFFERENT_END"] = "DIFFERENT_END";
|
|
24
|
-
return KickRuleEnum2;
|
|
25
|
-
})(KickRuleEnum || {});
|
|
26
|
-
|
|
27
|
-
export { KickRuleEnum, PassRule, PlatformSettingEnum };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { reactive } from 'vue';
|
|
2
|
-
import { PlatformSettingEnum } from './types.mjs';
|
|
3
|
-
import { omit } from 'lodash-es';
|
|
4
|
-
|
|
5
|
-
"use strict";
|
|
6
|
-
const basicSetting = reactive({
|
|
7
|
-
copyright: '\xA9 2016-<span class="ownInput">${\u5F53\u524D\u5E74\u4EFD}</span> \u51A0\u9A8B\u4FE1\u606F\u6280\u672F\uFF08\u82CF\u5DDE\uFF09\u6709\u9650\u516C\u53F8 \u7248\u6743\u6240\u6709',
|
|
8
|
-
description: "",
|
|
9
|
-
icon: "",
|
|
10
|
-
loadingImage: "",
|
|
11
|
-
logo: "",
|
|
12
|
-
name: "\u51A0\u9A8B\u4E91PaaS\u5E73\u53F0",
|
|
13
|
-
thumbnail: "",
|
|
14
|
-
version: import.meta.env.pkg.version
|
|
15
|
-
});
|
|
16
|
-
function useBasicSetting(isPlatform = true) {
|
|
17
|
-
const postBasicSetting = () => {
|
|
18
|
-
if (isPlatform) {
|
|
19
|
-
return _api.platform.plat.postBase(omit({ ...basicSetting }, "version"));
|
|
20
|
-
}
|
|
21
|
-
return _api.apaas.plat.postBase(omit({ ...basicSetting }, "version"));
|
|
22
|
-
};
|
|
23
|
-
async function loadBasicSetting() {
|
|
24
|
-
const res = await _api.platform.plat.getInfo({
|
|
25
|
-
configEnum: PlatformSettingEnum.THEME
|
|
26
|
-
});
|
|
27
|
-
if (res) {
|
|
28
|
-
setBasicSetting(res.data, false);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function setBasicSetting(data, transfer = true) {
|
|
32
|
-
const { value } = data;
|
|
33
|
-
if (!value) return;
|
|
34
|
-
try {
|
|
35
|
-
Object.assign(basicSetting, transfer ? JSON.parse(value) : value, {
|
|
36
|
-
version: import.meta.env.pkg.version
|
|
37
|
-
});
|
|
38
|
-
} catch (err) {
|
|
39
|
-
console.warn(err);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
basicSetting,
|
|
44
|
-
loadBasicSetting,
|
|
45
|
-
setBasicSetting,
|
|
46
|
-
postBasicSetting
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { useBasicSetting };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { reactive, computed } from 'vue';
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
var DeployModeEnum = /* @__PURE__ */ ((DeployModeEnum2) => {
|
|
5
|
-
DeployModeEnum2["STANDARD"] = "STANDARD";
|
|
6
|
-
DeployModeEnum2["INDEPENDENT_APP"] = "INDEPENDENT_APP";
|
|
7
|
-
return DeployModeEnum2;
|
|
8
|
-
})(DeployModeEnum || {});
|
|
9
|
-
const deploySetting = reactive({
|
|
10
|
-
deployMode: "STANDARD" /* STANDARD */
|
|
11
|
-
});
|
|
12
|
-
const isIndependentApp = computed(() => {
|
|
13
|
-
return deploySetting.deployMode === "INDEPENDENT_APP" /* INDEPENDENT_APP */;
|
|
14
|
-
});
|
|
15
|
-
function setDeploySetting(data) {
|
|
16
|
-
const { value } = data;
|
|
17
|
-
if (!value) return;
|
|
18
|
-
try {
|
|
19
|
-
Object.assign(deploySetting, JSON.parse(value));
|
|
20
|
-
} catch (err) {
|
|
21
|
-
console.warn(err);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
function useDeploySetting() {
|
|
25
|
-
return {
|
|
26
|
-
deploySetting,
|
|
27
|
-
setDeploySetting,
|
|
28
|
-
isIndependentApp
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export { DeployModeEnum, useDeploySetting };
|