@gct-paas/core 0.0.1-dev.18 → 0.0.1-dev.20

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.
Files changed (84) hide show
  1. package/dist/index.min.cjs +1 -1
  2. package/dist/index.system.min.js +1 -1
  3. package/es/constants/index.d.ts +1 -1
  4. package/es/constants/index.mjs +1 -1
  5. package/es/service/gct-apaas/api.service.d.ts +3 -1
  6. package/es/service/gct-apaas/api.service.mjs +4 -0
  7. package/es/service/gct-apaas/app-global-settings.service.d.ts +0 -1
  8. package/es/service/gct-apaas/category.service.d.ts +3 -0
  9. package/es/service/gct-apaas/chat.service.d.ts +10 -0
  10. package/es/service/gct-apaas/chat.service.mjs +14 -0
  11. package/es/service/gct-apaas/control-config.service.d.ts +36 -0
  12. package/es/service/gct-apaas/control-config.service.mjs +38 -0
  13. package/es/service/gct-apaas/customer-complaint.service.d.ts +34 -0
  14. package/es/service/gct-apaas/customer-complaint.service.mjs +42 -0
  15. package/es/service/gct-apaas/dify-chat.service.d.ts +8 -0
  16. package/es/service/gct-apaas/dify-chat.service.mjs +18 -0
  17. package/es/service/gct-apaas/doc-control-started.service.d.ts +26 -0
  18. package/es/service/gct-apaas/doc-control-started.service.mjs +22 -0
  19. package/es/service/gct-apaas/doc-control-task-done.service.d.ts +26 -0
  20. package/es/service/gct-apaas/doc-control-task-done.service.mjs +22 -0
  21. package/es/service/gct-apaas/doc-control-task-todo.service.d.ts +38 -0
  22. package/es/service/gct-apaas/doc-control-task-todo.service.mjs +30 -0
  23. package/es/service/gct-apaas/doc-control.service.d.ts +13 -0
  24. package/es/service/gct-apaas/doc-control.service.mjs +18 -0
  25. package/es/service/gct-apaas/edhr-instance-search-history.service.d.ts +14 -0
  26. package/es/service/gct-apaas/edhr-instance-search-history.service.mjs +18 -0
  27. package/es/service/gct-apaas/edhr-instance.service.d.ts +5 -2
  28. package/es/service/gct-apaas/edhr-tmpl.service.d.ts +3 -1
  29. package/es/service/gct-apaas/edhr-tmpl.service.mjs +8 -0
  30. package/es/service/gct-apaas/entities.d.ts +2368 -164
  31. package/es/service/gct-apaas/file-task.service.d.ts +9 -0
  32. package/es/service/gct-apaas/file-task.service.mjs +22 -0
  33. package/es/service/gct-apaas/index.d.ts +22 -0
  34. package/es/service/gct-apaas/index.mjs +22 -0
  35. package/es/service/gct-apaas/menu-config.service.d.ts +0 -5
  36. package/es/service/gct-apaas/menu-config.service.mjs +0 -4
  37. package/es/service/gct-apaas/online-form-instance.service.d.ts +33 -14
  38. package/es/service/gct-apaas/online-form-instance.service.mjs +20 -8
  39. package/es/service/gct-apaas/online-form-log.service.d.ts +2 -1
  40. package/es/service/gct-apaas/online-form-tmpl.service.d.ts +1 -0
  41. package/es/service/gct-apaas/online-form-tmpl.service.mjs +4 -0
  42. package/es/service/gct-apaas/online-form.service.d.ts +5 -0
  43. package/es/service/gct-apaas/online-form.service.mjs +4 -0
  44. package/es/service/gct-apaas/process-definition-version.service.d.ts +1 -2
  45. package/es/service/gct-apaas/process-definition-version.service.mjs +0 -4
  46. package/es/service/gct-apaas/process-definition.service.d.ts +1 -0
  47. package/es/service/gct-apaas/process-definition.service.mjs +4 -0
  48. package/es/service/gct-apaas/process-instance-relation-.service.d.ts +25 -0
  49. package/es/service/gct-apaas/process-instance-relation-.service.mjs +34 -0
  50. package/es/service/gct-apaas/process-path.service.d.ts +6 -2
  51. package/es/service/gct-apaas/process-path.service.mjs +4 -0
  52. package/es/service/gct-apaas/process-task-done.service.d.ts +5 -0
  53. package/es/service/gct-apaas/process-task-todo.service.d.ts +10 -0
  54. package/es/service/gct-apaas/product-release.service.d.ts +6 -4
  55. package/es/service/gct-platform/api.service.d.ts +2 -1
  56. package/es/service/gct-platform/api.service.mjs +4 -0
  57. package/es/service/gct-platform/app.service.d.ts +2 -1
  58. package/es/service/gct-platform/app.service.mjs +4 -0
  59. package/es/service/gct-platform/category.service.d.ts +1 -0
  60. package/es/service/gct-platform/category.service.mjs +4 -0
  61. package/es/service/gct-platform/datasource-move-data.service.d.ts +5 -1
  62. package/es/service/gct-platform/datasource-move-data.service.mjs +2 -2
  63. package/es/service/gct-platform/datasource-move-detail.service.d.ts +4 -1
  64. package/es/service/gct-platform/datasource-move-detail.service.mjs +2 -2
  65. package/es/service/gct-platform/datasource-move.service.d.ts +2 -5
  66. package/es/service/gct-platform/datasource-move.service.mjs +5 -5
  67. package/es/service/gct-platform/entities.d.ts +739 -41
  68. package/es/service/gct-platform/file-task.service.d.ts +41 -0
  69. package/es/service/gct-platform/file-task.service.mjs +38 -0
  70. package/es/service/gct-platform/index.d.ts +4 -0
  71. package/es/service/gct-platform/index.mjs +4 -0
  72. package/es/service/gct-platform/minio-file.service.d.ts +9 -0
  73. package/es/service/gct-platform/minio-file.service.mjs +14 -0
  74. package/es/service/gct-platform/plat.service.d.ts +1 -0
  75. package/es/service/gct-platform/plat.service.mjs +4 -0
  76. package/es/service/gct-platform/plugin-version.service.d.ts +1 -1
  77. package/es/service/gct-platform/plugin-version.service.mjs +3 -3
  78. package/es/service/gct-platform/plugin.service.d.ts +26 -4
  79. package/es/service/gct-platform/plugin.service.mjs +17 -5
  80. package/es/service/gct-platform/tenant.service.d.ts +2 -5
  81. package/es/service/gct-platform/tenant.service.mjs +2 -2
  82. package/es/utils/axios/axios.mjs +1 -1
  83. package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +24 -12
  84. package/package.json +4 -4
@@ -0,0 +1,41 @@
1
+ import { IHttpResponse } from '../../interface';
2
+ import { PlatformBaseService } from '../base/platform-base.service';
3
+ import { FileTaskRequest, FileTaskResponse } from './entities';
4
+ export interface deleteQuery {
5
+ ids: string;
6
+ }
7
+ export interface postBatchQuery {
8
+ zip?: string;
9
+ }
10
+ export interface getInfoQuery {
11
+ id: string;
12
+ }
13
+ export interface getListQuery {
14
+ formTaskName?: string;
15
+ materialNo?: string;
16
+ name?: string;
17
+ relationType?: string;
18
+ status?: string;
19
+ }
20
+ export interface getPageQuery {
21
+ formTaskName?: string;
22
+ materialNo?: string;
23
+ name?: string;
24
+ pageNo?: number;
25
+ pageSize?: number;
26
+ relationType?: string;
27
+ status?: string;
28
+ }
29
+ export interface putIdQuery {
30
+ id: string;
31
+ }
32
+ export declare class FileTaskService extends PlatformBaseService {
33
+ constructor();
34
+ post(data: FileTaskRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
35
+ delete(query: deleteQuery, config?: Record<string, string>): Promise<IHttpResponse<string>>;
36
+ postBatch(query: postBatchQuery, config?: Record<string, string>): Promise<IHttpResponse<unknown>>;
37
+ getInfo(query: getInfoQuery, config?: Record<string, string>): Promise<IHttpResponse<FileTaskResponse>>;
38
+ getList(query: getListQuery, config?: Record<string, string>): Promise<IHttpResponse<FileTaskResponse>>;
39
+ getPage(query: getPageQuery, config?: Record<string, string>): Promise<IHttpResponse<FileTaskResponse>>;
40
+ putId(query: putIdQuery, data: FileTaskRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
41
+ }
@@ -0,0 +1,38 @@
1
+ import { PlatformBaseService } from '../base/platform-base.service.mjs';
2
+
3
+ "use strict";
4
+ class FileTaskService extends PlatformBaseService {
5
+ constructor() {
6
+ super("file-task");
7
+ }
8
+ // 保存
9
+ async post(data, config = {}) {
10
+ return this._post("", data, null, config);
11
+ }
12
+ // 删除
13
+ async delete(query, config = {}) {
14
+ return this._delete("", null, query, config);
15
+ }
16
+ // 批量下载
17
+ async postBatch(query, config = {}) {
18
+ return this._post("batch", null, query, config);
19
+ }
20
+ // 详情
21
+ async getInfo(query, config = {}) {
22
+ return this._get("info", null, query, config);
23
+ }
24
+ // 列表
25
+ async getList(query, config = {}) {
26
+ return this._get("list", null, query, config);
27
+ }
28
+ // 分页列表
29
+ async getPage(query, config = {}) {
30
+ return this._get("page", null, query, config);
31
+ }
32
+ // 修改
33
+ async putId(query, data, config = {}) {
34
+ return this._put("", data, query, config);
35
+ }
36
+ }
37
+
38
+ export { FileTaskService };
@@ -11,6 +11,7 @@ import { DatasourceMoveService } from './datasource-move.service';
11
11
  import { DatasourceMoveDataService } from './datasource-move-data.service';
12
12
  import { DatasourceMoveDetailService } from './datasource-move-detail.service';
13
13
  import { ExternalMessageService } from './external-message.service';
14
+ import { FileTaskService } from './file-task.service';
14
15
  import { FileService } from './file.service';
15
16
  import { I18NConfigService } from './i18n-config.service';
16
17
  import { I18NInfoService } from './i18n-info.service';
@@ -23,6 +24,7 @@ import { LoginLogService } from './login-log.service';
23
24
  import { LoginService } from './login.service';
24
25
  import { ManagerService } from './manager.service';
25
26
  import { MessageSettingService } from './message-setting.service';
27
+ import { MinioFileService } from './minio-file.service';
26
28
  import { NavMenuService } from './nav-menu.service';
27
29
  import { NavPageService } from './nav-page.service';
28
30
  import { OpenapiGroupService } from './openapi-group.service';
@@ -75,6 +77,7 @@ export declare class ApiManage {
75
77
  datasourceMoveData: DatasourceMoveDataService;
76
78
  datasourceMoveDetail: DatasourceMoveDetailService;
77
79
  externalMessage: ExternalMessageService;
80
+ fileTask: FileTaskService;
78
81
  file: FileService;
79
82
  i18NConfig: I18NConfigService;
80
83
  i18NInfo: I18NInfoService;
@@ -87,6 +90,7 @@ export declare class ApiManage {
87
90
  login: LoginService;
88
91
  manager: ManagerService;
89
92
  messageSetting: MessageSettingService;
93
+ minioFile: MinioFileService;
90
94
  navMenu: NavMenuService;
91
95
  navPage: NavPageService;
92
96
  openapiGroup: OpenapiGroupService;
@@ -11,6 +11,7 @@ import { DatasourceMoveService } from './datasource-move.service.mjs';
11
11
  import { DatasourceMoveDataService } from './datasource-move-data.service.mjs';
12
12
  import { DatasourceMoveDetailService } from './datasource-move-detail.service.mjs';
13
13
  import { ExternalMessageService } from './external-message.service.mjs';
14
+ import { FileTaskService } from './file-task.service.mjs';
14
15
  import { FileService } from './file.service.mjs';
15
16
  import { I18NConfigService } from './i18n-config.service.mjs';
16
17
  import { I18NInfoService } from './i18n-info.service.mjs';
@@ -23,6 +24,7 @@ import { LoginLogService } from './login-log.service.mjs';
23
24
  import { LoginService } from './login.service.mjs';
24
25
  import { ManagerService } from './manager.service.mjs';
25
26
  import { MessageSettingService } from './message-setting.service.mjs';
27
+ import { MinioFileService } from './minio-file.service.mjs';
26
28
  import { NavMenuService } from './nav-menu.service.mjs';
27
29
  import { NavPageService } from './nav-page.service.mjs';
28
30
  import { OpenapiGroupService } from './openapi-group.service.mjs';
@@ -77,6 +79,7 @@ class ApiManage {
77
79
  datasourceMoveData = new DatasourceMoveDataService();
78
80
  datasourceMoveDetail = new DatasourceMoveDetailService();
79
81
  externalMessage = new ExternalMessageService();
82
+ fileTask = new FileTaskService();
80
83
  file = new FileService();
81
84
  i18NConfig = new I18NConfigService();
82
85
  i18NInfo = new I18NInfoService();
@@ -89,6 +92,7 @@ class ApiManage {
89
92
  login = new LoginService();
90
93
  manager = new ManagerService();
91
94
  messageSetting = new MessageSettingService();
95
+ minioFile = new MinioFileService();
92
96
  navMenu = new NavMenuService();
93
97
  navPage = new NavPageService();
94
98
  openapiGroup = new OpenapiGroupService();
@@ -0,0 +1,9 @@
1
+ import { IHttpResponse } from '../../interface';
2
+ import { PlatformBaseService } from '../base/platform-base.service';
3
+ export interface getDownloadQuery {
4
+ fileUrl: string;
5
+ }
6
+ export declare class MinioFileService extends PlatformBaseService {
7
+ constructor();
8
+ getDownload(query: getDownloadQuery, config?: Record<string, string>): Promise<IHttpResponse<unknown>>;
9
+ }
@@ -0,0 +1,14 @@
1
+ import { PlatformBaseService } from '../base/platform-base.service.mjs';
2
+
3
+ "use strict";
4
+ class MinioFileService extends PlatformBaseService {
5
+ constructor() {
6
+ super("minio-file");
7
+ }
8
+ // minIO获取文件公用接口
9
+ async getDownload(query, config = {}) {
10
+ return this._get("download", null, query, config);
11
+ }
12
+ }
13
+
14
+ export { MinioFileService };
@@ -19,6 +19,7 @@ export declare class PlatService extends PlatformBaseService {
19
19
  postOrg(data: OrgConfig, config?: Record<string, string>): Promise<IHttpResponse<string>>;
20
20
  postSecurity(data: SecurityConfig, config?: Record<string, string>): Promise<IHttpResponse<string>>;
21
21
  postTheme(data: SysConfigRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
22
+ postUploadCertFile(config?: Record<string, string>): Promise<IHttpResponse<string>>;
22
23
  postUserRole(data: UserRoles4Update, config?: Record<string, string>): Promise<IHttpResponse<string>>;
23
24
  deleteUserRole(query: deleteUserRoleQuery, config?: Record<string, string>): Promise<IHttpResponse<string>>;
24
25
  getUser(config?: Record<string, string>): Promise<IHttpResponse<UserFieldMeta>>;
@@ -45,6 +45,10 @@ class PlatService extends PlatformBaseService {
45
45
  async postTheme(data, config = {}) {
46
46
  return this._post("theme", data, null, config);
47
47
  }
48
+ // 企微证书文件上传
49
+ async postUploadCertFile(config = {}) {
50
+ return this._post("uploadCertFile", null, null, config);
51
+ }
48
52
  // (平台管理)管理员角色编辑
49
53
  async postUserRole(data, config = {}) {
50
54
  return this._post("user-role", data, null, config);
@@ -19,7 +19,7 @@ export declare class PluginVersionService extends PlatformBaseService {
19
19
  post(data: PluginVersionRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
20
20
  delete(query: deleteQuery, config?: Record<string, string>): Promise<IHttpResponse<string>>;
21
21
  getInfo(query: getInfoQuery, config?: Record<string, string>): Promise<IHttpResponse<PluginVersionResponse>>;
22
- getList(config?: Record<string, string>): Promise<IHttpResponse<PluginVersionResponse>>;
22
+ postList(data: PluginVersionRequest, config?: Record<string, string>): Promise<IHttpResponse<PluginVersionResponse>>;
23
23
  getPage(query: getPageQuery, config?: Record<string, string>): Promise<IHttpResponse<PluginVersionResponse>>;
24
24
  putId(query: putIdQuery, data: PluginVersionRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
25
25
  }
@@ -9,7 +9,7 @@ class PluginVersionService extends PlatformBaseService {
9
9
  async post(data, config = {}) {
10
10
  return this._post("", data, null, config);
11
11
  }
12
- // 删除
12
+ // 删除版本
13
13
  async delete(query, config = {}) {
14
14
  return this._delete("", null, query, config);
15
15
  }
@@ -18,8 +18,8 @@ class PluginVersionService extends PlatformBaseService {
18
18
  return this._get("info", null, query, config);
19
19
  }
20
20
  // 列表
21
- async getList(config = {}) {
22
- return this._get("list", null, null, config);
21
+ async postList(data, config = {}) {
22
+ return this._post("list", data, null, config);
23
23
  }
24
24
  // 分页列表
25
25
  async getPage(query, config = {}) {
@@ -1,15 +1,34 @@
1
1
  import { IHttpResponse } from '../../interface';
2
2
  import { PlatformBaseService } from '../base/platform-base.service';
3
- import { PluginRequest, PluginResponse, PackageJson } from './entities';
3
+ import { PluginRequest, PackageJson, PluginTenant, PluginResponse } from './entities';
4
4
  export interface deleteQuery {
5
5
  ids: string;
6
6
  }
7
+ export interface getGetImagesQuery {
8
+ imageUrl: string;
9
+ }
7
10
  export interface getInfoQuery {
8
11
  id: string;
9
12
  }
10
- export interface getPageQuery {
13
+ export interface postUploadZipQuery {
14
+ categoryId?: string;
15
+ client?: string;
16
+ description?: string;
17
+ icon?: string;
18
+ id?: string;
19
+ key?: string;
20
+ keyWord?: string;
21
+ name?: string;
11
22
  pageNo?: number;
12
23
  pageSize?: number;
24
+ readMe?: string;
25
+ screenShot?: string;
26
+ tag?: string;
27
+ tenantId?: string;
28
+ tmpPath?: string;
29
+ url?: string;
30
+ version?: string;
31
+ zipUrl?: string;
13
32
  }
14
33
  export interface putIdQuery {
15
34
  id: string;
@@ -18,9 +37,12 @@ export declare class PluginService extends PlatformBaseService {
18
37
  constructor();
19
38
  post(data: PluginRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
20
39
  delete(query: deleteQuery, config?: Record<string, string>): Promise<IHttpResponse<string>>;
40
+ postCancelUpload(data: PackageJson, config?: Record<string, string>): Promise<IHttpResponse<boolean>>;
41
+ getGetImages(query: getGetImagesQuery, config?: Record<string, string>): Promise<IHttpResponse<unknown>>;
42
+ getGetTenantCompList(config?: Record<string, string>): Promise<IHttpResponse<PluginTenant>>;
21
43
  getInfo(query: getInfoQuery, config?: Record<string, string>): Promise<IHttpResponse<PluginResponse>>;
22
44
  getList(config?: Record<string, string>): Promise<IHttpResponse<PluginResponse>>;
23
- getPage(query: getPageQuery, config?: Record<string, string>): Promise<IHttpResponse<PluginResponse>>;
24
- postUploadZip(config?: Record<string, string>): Promise<IHttpResponse<PackageJson>>;
45
+ postPage(data: PluginRequest, config?: Record<string, string>): Promise<IHttpResponse<PluginResponse>>;
46
+ postUploadZip(query: postUploadZipQuery, config?: Record<string, string>): Promise<IHttpResponse<PackageJson>>;
25
47
  putId(query: putIdQuery, data: PluginRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
26
48
  }
@@ -9,10 +9,22 @@ class PluginService extends PlatformBaseService {
9
9
  async post(data, config = {}) {
10
10
  return this._post("", data, null, config);
11
11
  }
12
- // 删除
12
+ // 删除插件及插件版本
13
13
  async delete(query, config = {}) {
14
14
  return this._delete("", null, query, config);
15
15
  }
16
+ // 取消上传文件
17
+ async postCancelUpload(data, config = {}) {
18
+ return this._post("cancelUpload", data, null, config);
19
+ }
20
+ // 获取服务器存储的图片
21
+ async getGetImages(query, config = {}) {
22
+ return this._get("getImages", null, query, config);
23
+ }
24
+ // 获取租户下的所有组件信息
25
+ async getGetTenantCompList(config = {}) {
26
+ return this._get("getTenantCompList", null, null, config);
27
+ }
16
28
  // 详情
17
29
  async getInfo(query, config = {}) {
18
30
  return this._get("info", null, query, config);
@@ -22,12 +34,12 @@ class PluginService extends PlatformBaseService {
22
34
  return this._get("list", null, null, config);
23
35
  }
24
36
  // 分页列表
25
- async getPage(query, config = {}) {
26
- return this._get("page", null, query, config);
37
+ async postPage(data, config = {}) {
38
+ return this._post("page", data, null, config);
27
39
  }
28
40
  // 上传压缩文件
29
- async postUploadZip(config = {}) {
30
- return this._post("uploadZip", null, null, config);
41
+ async postUploadZip(query, config = {}) {
42
+ return this._post("uploadZip", null, query, config);
31
43
  }
32
44
  // 修改
33
45
  async putId(query, data, config = {}) {
@@ -1,6 +1,6 @@
1
1
  import { IHttpResponse } from '../../interface';
2
2
  import { PlatformBaseService } from '../base/platform-base.service';
3
- import { Tenant, TenantResponse, UserIdsDTO, UserWithUserExtraDTO, UserSaveRequest, TenantDomainRequest, UserRoles4Update, UserOfTenantDTO, TenantRequest } from './entities';
3
+ import { Tenant, TenantResponse, UserIdsDTO, TenantUserRemoveRequest, UserWithUserExtraDTO, UserSaveRequest, TenantDomainRequest, UserRoles4Update, UserOfTenantDTO, TenantRequest } from './entities';
4
4
  export interface getGetTenantIdByAppIdQuery {
5
5
  appId: string;
6
6
  }
@@ -13,9 +13,6 @@ export interface getListQuery {
13
13
  name?: string;
14
14
  startTime?: string;
15
15
  }
16
- export interface deleteManagementQuery {
17
- ids: string;
18
- }
19
16
  export interface getManagementQuery {
20
17
  enabled?: number;
21
18
  endTime?: string;
@@ -43,7 +40,7 @@ export declare class TenantService extends PlatformBaseService {
43
40
  getInfo(config?: Record<string, string>): Promise<IHttpResponse<TenantResponse>>;
44
41
  getList(query: getListQuery, config?: Record<string, string>): Promise<IHttpResponse<TenantResponse>>;
45
42
  postManagement(data: UserIdsDTO, config?: Record<string, string>): Promise<IHttpResponse<string>>;
46
- deleteManagement(query: deleteManagementQuery, config?: Record<string, string>): Promise<IHttpResponse<string>>;
43
+ deleteManagement(data: TenantUserRemoveRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
47
44
  getManagement(query: getManagementQuery, config?: Record<string, string>): Promise<IHttpResponse<UserWithUserExtraDTO>>;
48
45
  putManagement(data: UserSaveRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
49
46
  putUpdateDomain(data: TenantDomainRequest, config?: Record<string, string>): Promise<IHttpResponse<string>>;
@@ -34,8 +34,8 @@ class TenantService extends PlatformBaseService {
34
34
  return this._post("management", data, null, config);
35
35
  }
36
36
  // 删除
37
- async deleteManagement(query, config = {}) {
38
- return this._delete("management", null, query, config);
37
+ async deleteManagement(data, config = {}) {
38
+ return this._delete("management", data, null, config);
39
39
  }
40
40
  // 分页列表
41
41
  async getManagement(query, config = {}) {
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import * as qs from 'qs';
2
+ import qs from 'qs';
3
3
  import { deepMerge } from '../tools/tools.mjs';
4
4
  import { interceptors } from './interceptors.mjs';
5
5
  import '../../enums/index.mjs';
@@ -34,7 +34,7 @@ class PluginPgkUtil {
34
34
  if (this.cache.has(tag)) {
35
35
  return this.cache.get(tag);
36
36
  }
37
- const res = await _gct.api.platform.plugin.getList();
37
+ const res = await _gct.api.platform.plugin.getGetTenantCompList();
38
38
  const configs = res.data;
39
39
  if (configs.length > 0) {
40
40
  this.cache.set(tag, configs);
@@ -51,7 +51,7 @@ class PluginPgkUtil {
51
51
  static async loadPlugins(mode, configs) {
52
52
  if (configs.length > 0) {
53
53
  const plugins = configs.map((plugin) => {
54
- const baseUrl = path.join(PLUGIN_BASE_URL, plugin.name, "latest/dist");
54
+ const baseUrl = path.join(PLUGIN_BASE_URL, plugin.url, "dist");
55
55
  return {
56
56
  imports: {
57
57
  [plugin.name]: `${baseUrl}/${mode}.system.min.js`
@@ -85,18 +85,30 @@ class PluginPgkUtil {
85
85
  * @returns {*}
86
86
  */
87
87
  static async loadPlugin(app, mode, platform, kit) {
88
+ kit = ["common", ...kit];
88
89
  const tag = `${mode}-${platform}-${kit.join("_")}`;
89
- const plugins = await this.loadPluginConfig(mode, platform);
90
- if (!this.cacheModule.has(tag)) {
91
- const modules = await this.loadPlugins(mode, plugins);
92
- modules.forEach((module) => {
93
- if (module.default) {
94
- app.use(module.default);
95
- }
96
- });
97
- this.cacheModule.set(tag, modules);
90
+ try {
91
+ const configs = await this.loadPluginConfig(mode, platform);
92
+ if (!this.cacheModule.has(tag)) {
93
+ const plugins = [];
94
+ configs.forEach((cfg) => {
95
+ if (cfg.plugins) {
96
+ plugins.push(...cfg.plugins);
97
+ }
98
+ });
99
+ const modules = await this.loadPlugins(mode, plugins);
100
+ modules.forEach((module) => {
101
+ if (module.default) {
102
+ app.use(module.default);
103
+ }
104
+ });
105
+ this.cacheModule.set(tag, modules);
106
+ }
107
+ return configs;
108
+ } catch (error) {
109
+ console.error(error);
98
110
  }
99
- return plugins;
111
+ return [];
100
112
  }
101
113
  /**
102
114
  * 加载设计态插件包
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "0.0.1-dev.18",
3
+ "version": "0.0.1-dev.20",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "main": "dist/index.min.cjs",
@@ -56,8 +56,8 @@
56
56
  "vue-i18n": "9.6.5"
57
57
  },
58
58
  "devDependencies": {
59
- "@gct-paas/build": "0.0.1-dev.18",
60
- "@gct-paas/cli": "0.0.1-dev.18",
59
+ "@gct-paas/build": "0.0.1-dev.20",
60
+ "@gct-paas/cli": "0.0.1-dev.20",
61
61
  "@types/path-browserify": "^1.0.3",
62
62
  "@types/qs": "^6.9.18",
63
63
  "fs-extra": "^11.3.0"
@@ -65,5 +65,5 @@
65
65
  "peerDependencies": {
66
66
  "vue": "^3.x"
67
67
  },
68
- "gitHead": "0a61c5593beffb2a893dffde18fc6759983b72cb"
68
+ "gitHead": "9266f204c9c400c60c3aeffe6981eed0992fc243"
69
69
  }