@pubinfo/core 2.0.13 → 2.0.15

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 (76) hide show
  1. package/dist/{AppSetting-Df8mPhxN.js → AppSetting-CF0Y36Kx.js} +27 -27
  2. package/dist/{HCheckList.vue_vue_type_script_setup_true_lang-CD2VmdPG.js → HCheckList.vue_vue_type_script_setup_true_lang-B7ZyR4n6.js} +1 -1
  3. package/dist/{HToggle-CcxWxVmB.js → HToggle-Dap0xf8L.js} +1 -1
  4. package/dist/HeaderThinMenu-Bu4X2-vs.js +4 -0
  5. package/dist/{PreferencesContent-Bu8-g2qs.js → PreferencesContent-DWHQ2EOo.js} +57 -57
  6. package/dist/{SettingBreadcrumb-CTLEf4nt.js → SettingBreadcrumb-P-C21e5U.js} +5 -5
  7. package/dist/{SettingCopyright-B_ZS9FXO.js → SettingCopyright-XUQuMUND.js} +4 -4
  8. package/dist/{SettingEnableTransition-DgZyY8Rh.js → SettingEnableTransition-hJTXOtuP.js} +14 -14
  9. package/dist/{SettingHome-BN6WzWxX.js → SettingHome-1C9Ph1Dl.js} +4 -4
  10. package/dist/{SettingMenu-CNgEpRN_.js → SettingMenu-B2h4e61Z.js} +4 -4
  11. package/dist/{SettingMode-B_Sf7CqN.js → SettingMode-bStWvnHg.js} +9 -9
  12. package/dist/{SettingNavSearch-SQuD6lr7.js → SettingNavSearch-BvTlahqj.js} +4 -4
  13. package/dist/{SettingOther-CrgOHNra.js → SettingOther-ihHycIPn.js} +10 -10
  14. package/dist/{SettingPage-B4hfRME8.js → SettingPage-d8HGOfhZ.js} +2 -2
  15. package/dist/{SettingTabbar-7EcsmyZo.js → SettingTabbar-YLshyP8G.js} +25 -25
  16. package/dist/{SettingThemes-CVjQoEk4.js → SettingThemes-Do-SwCzx.js} +16 -16
  17. package/dist/{SettingToolbar-Bls_SdlL.js → SettingToolbar-DHbr1d6B.js} +7 -7
  18. package/dist/{SettingTopbar-jqUqG5vW.js → SettingTopbar-QwqH9maD.js} +5 -5
  19. package/dist/{SettingWidthMode-8LFo6UKy.js → SettingWidthMode-CGmv4JQk.js} +3 -3
  20. package/dist/core/resolver/layout.d.ts +1 -1
  21. package/dist/features/api/modules/auth/renzhengfuwu.d.ts +43 -1
  22. package/dist/features/api/modules/rbac/index.d.ts +1 -0
  23. package/dist/features/api/modules/rbac/yonghujiekou.d.ts +7 -0
  24. package/dist/features/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.d.ts +43 -0
  25. package/dist/features/api/modules/rbac/ziyuanjiekou.d.ts +7 -0
  26. package/dist/features/enum.d.ts +0 -1
  27. package/dist/features/stores/modules/iframe.d.ts +3 -3
  28. package/dist/{index-BX0RSX9i.js → index-B69sIuLj.js} +1 -1
  29. package/dist/{index-Bl4PBBmY.js → index-B8wbywmR.js} +1 -1
  30. package/dist/{index-Cc8zVLOC.js → index-CEodMjIg.js} +4 -4
  31. package/dist/{index-Dalsj2EI.js → index-Ctu3_aXu.js} +12229 -12106
  32. package/dist/{index-C6HIzbdv.js → index-Da79wYQP.js} +1 -1
  33. package/dist/{index-Cjl98Ty_.js → index-WLA0JU4Y.js} +17 -17
  34. package/dist/{index-Dw9-vGGZ.js → index-egA-td8O.js} +8551 -7697
  35. package/dist/index-ondkWqUz.js +4 -0
  36. package/dist/index.js +27 -27
  37. package/dist/{pick-Cghe_Z7L.js → pick-BS5wr8z9.js} +1 -1
  38. package/dist/style.css +1 -1
  39. package/package.json +14 -9
  40. package/runtime/components/PubinfoDev/index.d.ts +18 -0
  41. package/runtime/components/PubinfoDev/index.js +15 -0
  42. package/runtime/components/index.d.ts +1 -0
  43. package/runtime/components/index.js +1 -0
  44. package/runtime/index.d.ts +1 -0
  45. package/runtime/index.js +1 -0
  46. package/src/built-in/authorization/router.ts +1 -1
  47. package/src/built-in/layout-component/components/Content/IframeView.vue +16 -11
  48. package/src/built-in/layout-component/components/Content/index.vue +2 -1
  49. package/src/built-in/layout-component/components/Header/HeaderFullMenu/index.vue +8 -4
  50. package/src/built-in/settings/router.ts +15 -4
  51. package/src/built-in/system-info/components/SystemInfo.vue +67 -37
  52. package/src/core/resolver/layout.ts +13 -3
  53. package/src/features/api/modules/auth/index.ts +0 -2
  54. package/src/features/api/modules/auth/renzhengfuwu.ts +132 -1
  55. package/src/features/api/modules/auth/typings.d.ts +75 -1
  56. package/src/features/api/modules/configData/heibaimingdanfuwu.ts +2 -0
  57. package/src/features/api/modules/configData/index.ts +0 -2
  58. package/src/features/api/modules/configData/zidifuwu.ts +4 -0
  59. package/src/features/api/modules/rbac/gangweijiekou.ts +3 -0
  60. package/src/features/api/modules/rbac/index.ts +1 -2
  61. package/src/features/api/modules/rbac/typings.d.ts +97 -1
  62. package/src/features/api/modules/rbac/yonghujiekou.ts +25 -0
  63. package/src/features/api/modules/rbac/yonghushoucangbiaojiekou.ts +2 -0
  64. package/src/features/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +1 -0
  65. package/src/features/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.ts +158 -0
  66. package/src/features/api/modules/rbac/ziyuanjiekou.ts +21 -0
  67. package/src/features/enum.ts +1 -1
  68. package/src/features/stores/modules/iframe.ts +12 -3
  69. package/src/features/stores/modules/menu.ts +20 -13
  70. package/src/features/stores/modules/route.ts +4 -3
  71. package/src/index.ts +1 -0
  72. package/types/global.d.ts +5 -0
  73. package/types/vue-router.d.ts +2 -2
  74. package/dist/HeaderThinMenu-BMjyPDYS.js +0 -4
  75. package/dist/index-CUbMQSBZ.js +0 -4
  76. package/src/features/components/MicroAppContainer/index.vue +0 -9
@@ -1,8 +1,34 @@
1
1
  /* eslint-disable */
2
2
  // @ts-nocheck
3
3
  declare namespace API {
4
+ type CaptchaCheckDto = {
5
+ /** 类型 clickWord:文字、blockPuzzle:滑块 */
6
+ captchaType: string;
7
+ /** 加密坐标 */
8
+ pointJson: string;
9
+ /** token */
10
+ token: string;
11
+ };
12
+
13
+ type CaptchaGetDto = {
14
+ /** 类型 clickWord:文字、blockPuzzle:滑块、imageCode:图片 */
15
+ captchaType?: string;
16
+ /** 客户端UI组件id */
17
+ clientUid?: string;
18
+ /** 时间戳 1751542686180 */
19
+ ts?: string;
20
+ /** 尺寸(长x宽),例:150x50表示长为150宽为50,不填默认150x50,最大尺寸:长500,宽200 */
21
+ size?: string;
22
+ /** 验证码长度,不填默认4位 */
23
+ length?: string;
24
+ };
25
+
4
26
  type getAuthCheckCacheTokenParams = {
5
27
  accessToken: string;
28
+ };
29
+
30
+ type getAuthGetTokenListByUserIdParams = {
31
+ /** 用户id */
6
32
  userId: string;
7
33
  };
8
34
 
@@ -14,11 +40,26 @@ declare namespace API {
14
40
  };
15
41
 
16
42
  type IResponseCode = {
17
- code?: number;
18
43
  msg?: string;
44
+ code?: number;
19
45
  hint?: string;
20
46
  };
21
47
 
48
+ type LoginByPwdCaptchaDto = {
49
+ /** 登录类型 */
50
+ loginType: string;
51
+ /** 登录名 */
52
+ loginName: string;
53
+ /** 密码 */
54
+ loginPwd: string;
55
+ /** imageCode:验证码hash/其他:加密后的token,AES.encode(token+"---"+pointListStr, key) */
56
+ codeHash: string;
57
+ /** 验证码 imageCode类型必填 */
58
+ code?: string;
59
+ /** 验证码类型,clickWord:文字、blockPuzzle:滑块、imageCode(默认):图片 */
60
+ captchaType?: string;
61
+ };
62
+
22
63
  type LoginByPwdDto = {
23
64
  /** 登录类型 */
24
65
  loginType: string;
@@ -45,11 +86,36 @@ declare namespace API {
45
86
  orgId: string;
46
87
  };
47
88
 
89
+ type postAuthLoginOutByUserIdAndDevTypeParams = {
90
+ /** 用户id */
91
+ userId: string;
92
+ /** 设备类型 */
93
+ devType: string;
94
+ };
95
+
96
+ type postAuthLoginOutByUserIdParams = {
97
+ /** 用户id */
98
+ userId: string;
99
+ };
100
+
48
101
  type postAuthTokenRefreshParams = {
49
102
  /** 刷新令牌 */
50
103
  refreshToken: string;
51
104
  };
52
105
 
106
+ type PubLoginTokenVo = {
107
+ /** id */
108
+ id?: string;
109
+ /** 服务名称 */
110
+ appName?: string;
111
+ /** 用户id */
112
+ userId?: string;
113
+ /** 创建时间 */
114
+ createTime?: string;
115
+ /** 设备dev */
116
+ devType?: string;
117
+ };
118
+
53
119
  type ResponseDataBoolean = {
54
120
  code?: number;
55
121
  msg?: string;
@@ -58,6 +124,14 @@ declare namespace API {
58
124
  success?: boolean;
59
125
  };
60
126
 
127
+ type ResponseDataListPubLoginTokenVo = {
128
+ code?: number;
129
+ msg?: string;
130
+ hint?: string;
131
+ data?: PubLoginTokenVo[];
132
+ success?: boolean;
133
+ };
134
+
61
135
  type ResponseDataLoginTokenVo = {
62
136
  code?: number;
63
137
  msg?: string;
@@ -38,6 +38,7 @@ export function getBlackWhiteListDeleteById<
38
38
  return request.Get<R, T>(`/blackWhiteList/delete/${param0}`, {
39
39
  params: { ...queryParams },
40
40
  ...(options || {}),
41
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
41
42
  });
42
43
  }
43
44
 
@@ -58,6 +59,7 @@ export function getBlackWhiteListGetBlackWhiteListById<
58
59
  return request.Get<R, T>(`/blackWhiteList/getBlackWhiteList/${param0}`, {
59
60
  params: { ...queryParams },
60
61
  ...(options || {}),
62
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
61
63
  });
62
64
  }
63
65
 
@@ -1,5 +1,3 @@
1
1
  export * from './heibaimingdanfuwu';
2
- // API 更新时间:
3
- // API 唯一标识:
4
2
  export * from './xitongpeizhifuwu';
5
3
  export * from './zidifuwu';
@@ -20,6 +20,7 @@ export function postDictItemDeleteById<
20
20
  {
21
21
  params: { ...queryParams },
22
22
  ...(options || {}),
23
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
23
24
  },
24
25
  );
25
26
  }
@@ -44,6 +45,7 @@ export function deleteDictItemDeleteById<
44
45
  {
45
46
  params: { ...queryParams },
46
47
  ...(options || {}),
48
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
47
49
  },
48
50
  );
49
51
  }
@@ -152,6 +154,7 @@ export function postDictTypeDeleteById<
152
154
  {
153
155
  params: { ...queryParams },
154
156
  ...(options || {}),
157
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
155
158
  },
156
159
  );
157
160
  }
@@ -176,6 +179,7 @@ export function deleteDictTypeDeleteById<
176
179
  {
177
180
  params: { ...queryParams },
178
181
  ...(options || {}),
182
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
179
183
  },
180
184
  );
181
185
  }
@@ -20,6 +20,7 @@ export function postRbacPostDeleteById<
20
20
  {
21
21
  params: { ...queryParams },
22
22
  ...(options || {}),
23
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
23
24
  },
24
25
  );
25
26
  }
@@ -44,6 +45,7 @@ export function deleteRbacPostDeleteById<
44
45
  {
45
46
  params: { ...queryParams },
46
47
  ...(options || {}),
48
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
47
49
  },
48
50
  );
49
51
  }
@@ -65,6 +67,7 @@ export function getRbacPostDetailById<
65
67
  return request.Get<R, T>(`/rbac/post/detail/${param0}`, {
66
68
  params: { ...queryParams },
67
69
  ...(options || {}),
70
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
68
71
  });
69
72
  }
70
73
 
@@ -2,11 +2,10 @@ export * from './gangweijiekou';
2
2
  export * from './jiaosejiekou';
3
3
  export * from './pubJiaosezukongzhiqi';
4
4
  export * from './shujuquanxianzhubiaokongzhiqi';
5
- // API 更新时间:
6
- // API 唯一标识:
7
5
  export * from './yonghujiekou';
8
6
  export * from './yonghushoucangbiaojiekou';
9
7
  export * from './yonghuzuijinchangyongbiaojiekou';
8
+ export * from './ziyuandaorudaochuxiangguanjiekou';
10
9
  export * from './ziyuanjiekou';
11
10
  export * from './zuhuguanlijiekou';
12
11
  export * from './zuzhijiaosebiaokongzhiqi';
@@ -51,6 +51,10 @@ declare namespace API {
51
51
  id: string;
52
52
  };
53
53
 
54
+ type deleteRbacResourceBackupDeleteResourceBackupParams = {
55
+ id: string;
56
+ };
57
+
54
58
  type getRbacCollectByIdDetailParams = {
55
59
  id: string;
56
60
  };
@@ -120,6 +124,19 @@ declare namespace API {
120
124
  id: string;
121
125
  };
122
126
 
127
+ type getRbacResourceBackupDetailParams = {
128
+ id: string;
129
+ };
130
+
131
+ type getRbacResourceBackupListParams = {
132
+ /** 0历史版本,1导入数据 */
133
+ type: string;
134
+ };
135
+
136
+ type getRbacResourceBackupRestoreParams = {
137
+ id: string;
138
+ };
139
+
123
140
  type getRbacResourceGetRoleListByResourceIdParams = {
124
141
  /** 资源id */
125
142
  id: string;
@@ -308,9 +325,27 @@ declare namespace API {
308
325
  userId: string;
309
326
  };
310
327
 
328
+ type postRbacResourceBackupImportResourceDataParams = {
329
+ parentId: string;
330
+ };
331
+
311
332
  type postRbacResourceMineOrAllResourceTreeParams = {
312
333
  needAll?: boolean;
313
334
  enable?: boolean;
335
+ appResourceCodes?: string;
336
+ };
337
+
338
+ type postRbacUserCaptchaChangePasswordWithVerifyCodeParams = {
339
+ /** 原密码(使用公钥加密) */
340
+ oldPassword: string;
341
+ /** 新密码(使用公钥加密) */
342
+ newPassword: string;
343
+ /** 验证码hash,imageCode必填 */
344
+ codeHash: string;
345
+ /** 验证码/token */
346
+ code: string;
347
+ /** 验证码类型 */
348
+ captchaType: string;
314
349
  };
315
350
 
316
351
  type postRbacUserChangePasswordParams = {
@@ -720,6 +755,7 @@ declare namespace API {
720
755
  };
721
756
 
722
757
  type PubResourceAddDto = {
758
+ id?: string;
723
759
  /** 父级id */
724
760
  parentId?: string;
725
761
  /** 资源名称 */
@@ -750,6 +786,42 @@ declare namespace API {
750
786
  meta?: Record<string, any>;
751
787
  };
752
788
 
789
+ type PubResourceBackupBO = {
790
+ /** id */
791
+ id?: string;
792
+ /** 资源数据 */
793
+ content?: PubResourceTreeBo[];
794
+ /** 0备份数据,1导入数据 */
795
+ contentType?: string;
796
+ /** 是否删除,0:否,1:是 */
797
+ deleted?: boolean;
798
+ /** 创建id */
799
+ createdBy?: string;
800
+ /** 创建时间 */
801
+ createTime?: string;
802
+ /** 更新人id */
803
+ updatedBy?: string;
804
+ /** 更新时间 */
805
+ updateTime?: string;
806
+ /** 创建人姓名 */
807
+ createUserName?: string;
808
+ contentStr?: string;
809
+ };
810
+
811
+ type PubResourceExportBO = {
812
+ /** 导出类型:1-导出所有,2-导出选中 */
813
+ exportType?: string;
814
+ resourceTree?: PubResourceTreeBo[];
815
+ md5?: string;
816
+ };
817
+
818
+ type PubResourceReSortUpdateDTO = {
819
+ /** 资源id */
820
+ id?: string;
821
+ /** 子资源列表 */
822
+ children?: PubResourceReSortUpdateDTO[];
823
+ };
824
+
753
825
  type PubResourceTreeBo = {
754
826
  /** 主键 */
755
827
  id?: string;
@@ -1575,6 +1647,14 @@ declare namespace API {
1575
1647
  success?: boolean;
1576
1648
  };
1577
1649
 
1650
+ type ResponseDataListPubResourceBackupBO = {
1651
+ code?: number;
1652
+ msg?: string;
1653
+ hint?: string;
1654
+ data?: PubResourceBackupBO[];
1655
+ success?: boolean;
1656
+ };
1657
+
1578
1658
  type ResponseDataListPubResourceTreeBo = {
1579
1659
  code?: number;
1580
1660
  msg?: string;
@@ -1783,6 +1863,22 @@ declare namespace API {
1783
1863
  success?: boolean;
1784
1864
  };
1785
1865
 
1866
+ type ResponseDataPubResourceBackupBO = {
1867
+ code?: number;
1868
+ msg?: string;
1869
+ hint?: string;
1870
+ data?: PubResourceBackupBO;
1871
+ success?: boolean;
1872
+ };
1873
+
1874
+ type ResponseDataPubResourceExportBO = {
1875
+ code?: number;
1876
+ msg?: string;
1877
+ hint?: string;
1878
+ data?: PubResourceExportBO;
1879
+ success?: boolean;
1880
+ };
1881
+
1786
1882
  type ResponseDataPubRoleBo = {
1787
1883
  code?: number;
1788
1884
  msg?: string;
@@ -1910,7 +2006,7 @@ declare namespace API {
1910
2006
  /** 群组id */
1911
2007
  groups?: shujuquanxianmokuaihuixiandequnzuduixiang[];
1912
2008
  /** 资源id */
1913
- resources?: PubResourceTreeBo[];
2009
+ resources?: PubResource[];
1914
2010
  };
1915
2011
 
1916
2012
  type shujuquanxianchaxunduixiang = {
@@ -1,5 +1,30 @@
1
1
  import { basic as request } from '@/features/api/request';
2
2
 
3
+ /**
4
+ * @description 验证码-修改登录密码
5
+ * @url /rbac/user/captcha/changePasswordWithVerifyCode
6
+ * @method POST
7
+ * @author @pubinfo/openapi
8
+ */
9
+ export function postRbacUserCaptchaChangePasswordWithVerifyCode<
10
+ R = API.ResponseDataVoid,
11
+ T = API.ResponseDataVoid,
12
+ >(
13
+ params: API.postRbacUserCaptchaChangePasswordWithVerifyCodeParams,
14
+ options?: Parameters<typeof request.Post<R, T>>[2],
15
+ ) {
16
+ return request.Post<R, T>(
17
+ '/rbac/user/captcha/changePasswordWithVerifyCode',
18
+ {},
19
+ {
20
+ params: {
21
+ ...params,
22
+ },
23
+ ...(options || {}),
24
+ },
25
+ );
26
+ }
27
+
3
28
  /**
4
29
  * @description 修改登录密码
5
30
  * @url /rbac/user/changePassword
@@ -20,6 +20,7 @@ export function postRbacCollectByIdDelete<
20
20
  {
21
21
  params: { ...queryParams },
22
22
  ...(options || {}),
23
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
23
24
  },
24
25
  );
25
26
  }
@@ -41,6 +42,7 @@ export function getRbacCollectByIdDetail<
41
42
  return request.Get<R, T>(`/rbac/collect/${param0}/detail`, {
42
43
  params: { ...queryParams },
43
44
  ...(options || {}),
45
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
44
46
  });
45
47
  }
46
48
 
@@ -17,6 +17,7 @@ export function getRbacUsedByIdDetail<
17
17
  return request.Get<R, T>(`/rbac/used/${param0}/detail`, {
18
18
  params: { ...queryParams },
19
19
  ...(options || {}),
20
+ meta: { ...(options?.meta ?? {}), pathParams: [param0] },
20
21
  });
21
22
  }
22
23
 
@@ -0,0 +1,158 @@
1
+ import { basic as request } from '@/features/api/request';
2
+
3
+ /**
4
+ * @description 删除备份数据数据
5
+ * @url /rbac/resource-backup/deleteResourceBackup
6
+ * @method DELETE
7
+ * @author @pubinfo/openapi
8
+ */
9
+ export function deleteRbacResourceBackupDeleteResourceBackup<
10
+ R = API.ResponseDataVoid,
11
+ T = API.ResponseDataVoid,
12
+ >(
13
+ params: API.deleteRbacResourceBackupDeleteResourceBackupParams,
14
+ options?: Parameters<typeof request.Delete<R, T>>[2],
15
+ ) {
16
+ return request.Delete<R, T>(
17
+ '/rbac/resource-backup/deleteResourceBackup',
18
+ {},
19
+ {
20
+ params: {
21
+ ...params,
22
+ },
23
+ ...(options || {}),
24
+ },
25
+ );
26
+ }
27
+
28
+ /**
29
+ * @description 查看详情
30
+ * @url /rbac/resource-backup/detail
31
+ * @method GET
32
+ * @author @pubinfo/openapi
33
+ */
34
+ export function getRbacResourceBackupDetail<
35
+ R = API.ResponseDataPubResourceBackupBO,
36
+ T = API.ResponseDataPubResourceBackupBO,
37
+ >(
38
+ params: API.getRbacResourceBackupDetailParams,
39
+ options?: Parameters<typeof request.Get<R, T>>[1],
40
+ ) {
41
+ return request.Get<R, T>('/rbac/resource-backup/detail', {
42
+ params: {
43
+ ...params,
44
+ },
45
+ ...(options || {}),
46
+ });
47
+ }
48
+
49
+ /**
50
+ * @description 资源导出
51
+ * @url /rbac/resource-backup/exportResourceData
52
+ * @method POST
53
+ * @author @pubinfo/openapi
54
+ */
55
+ export function postRbacResourceBackupExportResourceData<
56
+ R = API.ResponseDataPubResourceExportBO,
57
+ T = API.ResponseDataPubResourceExportBO,
58
+ >(body: string[], options?: Parameters<typeof request.Post<R, T>>[2]) {
59
+ return request.Post<R, T>('/rbac/resource-backup/exportResourceData', body, {
60
+ headers: {
61
+ 'Content-Type': 'application/json',
62
+ },
63
+ ...(options || {}),
64
+ });
65
+ }
66
+
67
+ /**
68
+ * @description 资源导入
69
+ * @url /rbac/resource-backup/importResourceData
70
+ * @method POST
71
+ * @author @pubinfo/openapi
72
+ */
73
+ export function postRbacResourceBackupImportResourceData<
74
+ R = API.ResponseDataVoid,
75
+ T = API.ResponseDataVoid,
76
+ >(
77
+ params: API.postRbacResourceBackupImportResourceDataParams,
78
+ body: Record<string, unknown>,
79
+ file?: File,
80
+ options?: Parameters<typeof request.Post<R, T>>[2],
81
+ ) {
82
+ const formData = new FormData();
83
+
84
+ if (file) {
85
+ formData.append('file', file);
86
+ }
87
+
88
+ Object.keys(body).forEach((ele) => {
89
+ const item = (body as any)[ele];
90
+
91
+ if (item !== undefined && item !== null) {
92
+ if (typeof item === 'object' && !(item instanceof File)) {
93
+ if (Array.isArray(item)) {
94
+ item.forEach(f => formData.append(ele, f || ''));
95
+ }
96
+ else {
97
+ formData.append(ele, JSON.stringify(item));
98
+ }
99
+ }
100
+ else {
101
+ formData.append(ele, item);
102
+ }
103
+ }
104
+ });
105
+
106
+ return request.Post<R, T>(
107
+ '/rbac/resource-backup/importResourceData',
108
+ formData,
109
+ {
110
+ params: {
111
+ ...params,
112
+ },
113
+ ...(options || {}),
114
+ },
115
+ );
116
+ }
117
+
118
+ /**
119
+ * @description 查看列表
120
+ * @url /rbac/resource-backup/list
121
+ * @method GET
122
+ * @author @pubinfo/openapi
123
+ */
124
+ export function getRbacResourceBackupList<
125
+ R = API.ResponseDataListPubResourceBackupBO,
126
+ T = API.ResponseDataListPubResourceBackupBO,
127
+ >(
128
+ params: API.getRbacResourceBackupListParams,
129
+ options?: Parameters<typeof request.Get<R, T>>[1],
130
+ ) {
131
+ return request.Get<R, T>('/rbac/resource-backup/list', {
132
+ params: {
133
+ ...params,
134
+ },
135
+ ...(options || {}),
136
+ });
137
+ }
138
+
139
+ /**
140
+ * @description 恢复数据
141
+ * @url /rbac/resource-backup/restore
142
+ * @method GET
143
+ * @author @pubinfo/openapi
144
+ */
145
+ export function getRbacResourceBackupRestore<
146
+ R = API.ResponseDataVoid,
147
+ T = API.ResponseDataVoid,
148
+ >(
149
+ params: API.getRbacResourceBackupRestoreParams,
150
+ options?: Parameters<typeof request.Get<R, T>>[1],
151
+ ) {
152
+ return request.Get<R, T>('/rbac/resource-backup/restore', {
153
+ params: {
154
+ ...params,
155
+ },
156
+ ...(options || {}),
157
+ });
158
+ }
@@ -160,6 +160,27 @@ export function postRbacResourceMineOrAllResourceTree<
160
160
  );
161
161
  }
162
162
 
163
+ /**
164
+ * @description 资源拖拉拽更新
165
+ * @url /rbac/resource/reSortUpdate
166
+ * @method POST
167
+ * @author @pubinfo/openapi
168
+ */
169
+ export function postRbacResourceReSortUpdate<
170
+ R = API.ResponseDataVoid,
171
+ T = API.ResponseDataVoid,
172
+ >(
173
+ body: API.PubResourceReSortUpdateDTO[],
174
+ options?: Parameters<typeof request.Post<R, T>>[2],
175
+ ) {
176
+ return request.Post<R, T>('/rbac/resource/reSortUpdate', body, {
177
+ headers: {
178
+ 'Content-Type': 'application/json',
179
+ },
180
+ ...(options || {}),
181
+ });
182
+ }
183
+
163
184
  /**
164
185
  * @description 资源删除
165
186
  * @url /rbac/resource/resourceDelete
@@ -11,7 +11,7 @@ export enum RESOURCE_TYPE {
11
11
  /** 非菜单页 */
12
12
  NON_MENU = '5',
13
13
  /** 微应用 */
14
- MICRO_APP = '6',
14
+ // MICRO_APP = '6',
15
15
  /** 动态应用 */
16
16
  DYNAMIC_APP = '7',
17
17
  /** 内嵌 */
@@ -77,14 +77,23 @@ const useIframeStore = defineStore(
77
77
  * 如果路径是一个字符串,则关闭单个 iframe 路由。
78
78
  * 如果路径是一个字符串数组,则关闭多个 iframe 路由。
79
79
  * @param path 要关闭的 iframe 路由的路径(路径)。
80
+ * @param destroy 是否真正销毁 iframe(true: 从 openedList 移除;false: 仅标记为非激活保留 DOM)
80
81
  */
81
- function close(path: string | string[]) {
82
+ function close(path: string | string[], destroy = false) {
82
83
  function closeIframeRoute(path: string | string[]) {
83
84
  const idx = list.value.findIndex(item => item.path === path);
84
85
  if (~idx) {
85
- list.value[idx].isOpen = false;
86
- list.value[idx].isLoading = true;
86
+ if (destroy) {
87
+ // 真正销毁:从 openedList 移除,下次进入会重新创建
88
+ list.value[idx].isOpen = false;
89
+ list.value[idx].isLoading = true;
90
+ }
91
+ else {
92
+ // 仅标记非激活:保留 isOpen=true,通过 v-show 隐藏,保持 DOM 实例
93
+ // 不修改 isOpen 状态,让 iframe 继续存在于 openedList
94
+ }
87
95
  }
96
+ // 无论是否销毁,都从最近访问列表中移除
88
97
  recentPathList.value = recentPathList.value.filter(item => item !== path);
89
98
  }
90
99
 
@@ -97,25 +97,32 @@ const useMenuStore = defineStore(
97
97
  * @returns {MenuData['children']} 当前活动菜单的子菜单,如果没有菜单则返回空数组。
98
98
  */
99
99
  const sidebarMenus = computed<MenuData['children']>(() => {
100
- const tempAllMenus = allMenus.value.filter(item => !get(item, 'meta.isDev', false));
101
- if (tempAllMenus.length > 0) {
102
- if (tempAllMenus.length > 1) {
103
- while (get(allMenus.value[actived.value], 'meta.isDev', false) && actived.value < allMenus.value.length - 1) {
104
- actived.value++;
105
- }
106
- return allMenus.value[actived.value].children;
100
+ // 过滤 meta.isDev true 的应用
101
+ const filteredAllMenus = allMenus.value.filter(item => !get(item, 'meta.isDev', false));
102
+
103
+ if (filteredAllMenus.length === 0) {
104
+ return [];
105
+ }
106
+
107
+ while (true) {
108
+ const menu = allMenus.value[actived.value];
109
+
110
+ if (actived.value >= allMenus.value.length - 1) {
111
+ break;
107
112
  }
108
- else {
109
- return get(allMenus.value[0], 'meta.isDev', false) ? [] : allMenus.value[0].children;
113
+
114
+ // 有子菜单且不为开发中的应用
115
+ if (menu.children.length > 0 && !get(menu, 'meta.isDev', false)) {
116
+ break;
110
117
  }
118
+
119
+ actived.value++;
111
120
  }
112
- else {
113
- return [];
114
- }
121
+
122
+ return allMenus.value[actived.value].children ?? [];
115
123
  });
116
124
 
117
125
  /**
118
- * TODO V1: 如果第一个菜单是一个isDev为true的菜单,那么这个计算属性可能会出现问题
119
126
  * 返回第一个侧边栏菜单的最深路径的计算属性。
120
127
  *
121
128
  * @returns {string} 第一个侧边栏菜单的最深路径,如果没有侧边栏菜单则返回'/'。