@pubinfo/module-rbac 2.1.10-beta.2 → 2.1.11

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 (226) hide show
  1. package/dist/ComponentSelect-A7uGTuHW.js +3498 -0
  2. package/dist/{DynamicRoutesForm-DP_sq_Uu.js → DynamicRoutesForm-DSzy_bh5.js} +43 -42
  3. package/dist/HCheckList-ODQHidN8.js +37 -0
  4. package/dist/HoverCard-CmJCoa2b.js +44 -0
  5. package/dist/{IconSelect-CiLpc63Z.js → IconSelect-DouEg3xY.js} +89 -88
  6. package/dist/ImportExport-DisdLoY8.js +342 -0
  7. package/dist/{LayoutForm-Cp4bBrYl.js → LayoutForm-Bdfs5WeK.js} +35 -34
  8. package/dist/{MetaForm-CVSgktB_.js → MetaForm-CcDwS8vh.js} +6128 -6143
  9. package/dist/{OrgAndPosition-ClASobEv.js → OrgAndPosition-jDX7m0HD.js} +61 -60
  10. package/dist/{ResourceEdit-w8qh1MFO.js → ResourceEdit-0BYZRye_.js} +128 -127
  11. package/dist/{ResourceRelation-ChEwIbWM.js → ResourceRelation-CU-QpUhP.js} +25 -25
  12. package/dist/{ResourceRelation-D_j898zp.js → ResourceRelation-roz0a8Td.js} +35 -34
  13. package/dist/{RoleRelation-DzyVn5dk.js → RoleRelation-BQQFaum0.js} +28 -27
  14. package/dist/{RoleSelector-Cd6_RUsc.js → RoleSelector-gkar_UGG.js} +89 -89
  15. package/dist/{TenantEdit-BOvXk7BZ.js → TenantEdit-BsahDUlf.js} +94 -93
  16. package/dist/{UserAuthorization-DLeivbs7.js → UserAuthorization-2Fl4IGw7.js} +81 -80
  17. package/dist/{UserEdit-YKS1FVW_.js → UserEdit-CX3Qau8T.js} +102 -101
  18. package/dist/{animation_item-BU-LInxP.js → animation_item-DBOz2rcX.js} +20 -22
  19. package/dist/{blackWhiteList-CNQltBqC.js → blackWhiteList-DbG7JH8n.js} +69 -69
  20. package/dist/blackWhiteList.css +1 -1
  21. package/dist/breadcrumb_setting-DTR6CPZQ.js +108 -0
  22. package/dist/{browserType-Dn_hQtAN.js → browserType-B8A1Osvk.js} +11 -10
  23. package/dist/chunk-DiMWNkAf.js +18 -0
  24. package/dist/cloneDeep-CSOSavu3.js +6 -0
  25. package/dist/components/GroupSelector/index.vue.d.ts +7 -1
  26. package/dist/components/ResourceIcones/Select.vue.d.ts +2 -1
  27. package/dist/components/ResourceSelector/index.vue.d.ts +7 -1
  28. package/dist/components/RoleSelector/RoleSearch.vue.d.ts +9 -1
  29. package/dist/components/RoleSelector/RoleSelector.vue.d.ts +7 -1
  30. package/dist/{createAndEditDataPermission-CaOBJgoV.js → createAndEditDataPermission-8_KNLzJT.js} +49 -48
  31. package/dist/createAndEditDataPermission.css +1 -1
  32. package/dist/{data-permission-ZRQ-Aoib.js → data-permission-LpuDLDm0.js} +41 -41
  33. package/dist/{dayjs.min-sGDSMYRj.js → dayjs.min-Cb7gQFd4.js} +1 -1
  34. package/dist/{dictionary-CtGgtPfc.js → dictionary-CEaxjqZe.js} +46 -46
  35. package/dist/drawerBlackWhiteList-DXLdWurZ.js +120 -0
  36. package/dist/drawerDictionary-DYJTAZr6.js +126 -0
  37. package/dist/drawerDictionaryItem-BChXD2-q.js +138 -0
  38. package/dist/{drawerGroup-DEuiiDPP.js → drawerGroup-CdnZkZxi.js} +67 -66
  39. package/dist/drawerOrganization-CwtSFUj0.js +247 -0
  40. package/dist/drawerPosition-CfyfeQCN.js +166 -0
  41. package/dist/drawerRegion-DAwY_29K.js +183 -0
  42. package/dist/drawerRole-B7uCfHk-.js +154 -0
  43. package/dist/{drawerRole-Dv61PBZR.js → drawerRole-DK6DrinO.js} +77 -76
  44. package/dist/{drawerRole-DNDyOvXw.js → drawerRole-DrzMHL0O.js} +69 -68
  45. package/dist/{group-BbkZjv5e.js → group-CaOhkh72.js} +48 -48
  46. package/dist/group.css +1 -1
  47. package/dist/index.css +1 -1
  48. package/dist/index.js +613 -689
  49. package/dist/isEmpty-BjEzPyCa.js +12 -0
  50. package/dist/{itemlist-By-FV6pN.js → itemlist-CFwRUV2Y.js} +44 -44
  51. package/dist/json-asset-03f0a035.json +1 -0
  52. package/dist/json-asset-0ee63e7f.json +1 -0
  53. package/dist/json-asset-10eef4fe.json +1 -0
  54. package/dist/json-asset-13f452f1.json +1 -0
  55. package/dist/json-asset-14b7b290.json +1 -0
  56. package/dist/json-asset-15b8cef1.json +1 -0
  57. package/dist/json-asset-15f77960.json +1 -0
  58. package/dist/json-asset-1ae9b726.json +1 -0
  59. package/dist/json-asset-1b02359f.json +1 -0
  60. package/dist/json-asset-1ef286cd.json +1 -0
  61. package/dist/json-asset-23cfd18c.json +1 -0
  62. package/dist/json-asset-265a0a5d.json +1 -0
  63. package/dist/json-asset-28d57c49.json +1 -0
  64. package/dist/json-asset-2b54ed10.json +1 -0
  65. package/dist/json-asset-2bb6f642.json +1 -0
  66. package/dist/json-asset-2cdc07bd.json +1 -0
  67. package/dist/json-asset-31c58607.json +1 -0
  68. package/dist/json-asset-32884f23.json +1 -0
  69. package/dist/json-asset-32fca43a.json +1 -0
  70. package/dist/json-asset-3a75445b.json +1 -0
  71. package/dist/json-asset-3f27d67c.json +1 -0
  72. package/dist/json-asset-4189453f.json +1 -0
  73. package/dist/json-asset-4702b37c.json +1 -0
  74. package/dist/json-asset-520a5c68.json +1 -0
  75. package/dist/json-asset-56bea508.json +1 -0
  76. package/dist/json-asset-57c732a3.json +1 -0
  77. package/dist/json-asset-5be4a28f.json +1 -0
  78. package/dist/json-asset-5e6d7cfa.json +1 -0
  79. package/dist/json-asset-64e176c9.json +1 -0
  80. package/dist/json-asset-6583dca6.json +1 -0
  81. package/dist/json-asset-66c640c6.json +1 -0
  82. package/dist/json-asset-68393156.json +1 -0
  83. package/dist/json-asset-688465aa.json +1 -0
  84. package/dist/json-asset-6bf334f4.json +1 -0
  85. package/dist/json-asset-7b4f72ce.json +1 -0
  86. package/dist/json-asset-837ec087.json +1 -0
  87. package/dist/json-asset-838ac1ba.json +1 -0
  88. package/dist/json-asset-8465c2cf.json +1 -0
  89. package/dist/json-asset-9e9f04a4.json +1 -0
  90. package/dist/json-asset-a13964cb.json +1 -0
  91. package/dist/json-asset-ab93a057.json +1 -0
  92. package/dist/json-asset-abe308fc.json +1 -0
  93. package/dist/json-asset-b24f2cd3.json +1 -0
  94. package/dist/json-asset-bf00eaed.json +1 -0
  95. package/dist/json-asset-cb22efd7.json +1 -0
  96. package/dist/json-asset-cb953f20.json +1 -0
  97. package/dist/json-asset-cc209e34.json +1 -0
  98. package/dist/json-asset-cfdffceb.json +1 -0
  99. package/dist/json-asset-d33c0299.json +1 -0
  100. package/dist/json-asset-d430c8ca.json +1 -0
  101. package/dist/json-asset-d8cfa560.json +1 -0
  102. package/dist/json-asset-da91beb6.json +1 -0
  103. package/dist/json-asset-e2bdf85c.json +1 -0
  104. package/dist/json-asset-e34ad826.json +1 -0
  105. package/dist/json-asset-e80720aa.json +1 -0
  106. package/dist/json-asset-e894bc92.json +1 -0
  107. package/dist/json-asset-f28020f2.json +1 -0
  108. package/dist/json-asset-f71ebbf4.json +1 -0
  109. package/dist/json-asset-fb1f4917.json +1 -0
  110. package/dist/json-asset-ff2e97c4.json +1 -0
  111. package/dist/{layout_setting-BUAgQ1Bk.js → layout_setting-79srmFgJ.js} +11 -11
  112. package/dist/layout_setting.css +1 -1
  113. package/dist/{log-vjU7aBPR.js → log-BYris9iT.js} +6 -6
  114. package/dist/{loginHistoryDetail-C7GT2yME.js → loginHistoryDetail-CZnfmbbM.js} +24 -23
  115. package/dist/{login_history-D08W00Qu.js → login_history-BiwaLpxA.js} +33 -33
  116. package/dist/login_history.css +1 -1
  117. package/dist/menu_setting-C2GciMXz.js +155 -0
  118. package/dist/not-data-Bml86wdH.js +3 -0
  119. package/dist/{operateHistoryDetail-BaNJRfwy.js → operateHistoryDetail-HId-EZzy.js} +27 -26
  120. package/dist/{operate_history-kJwIuPg2.js → operate_history-sPd9IHMV.js} +33 -33
  121. package/dist/operate_history.css +1 -1
  122. package/dist/{organization-Cmj3DUXl.js → organization-Dv3FbKke.js} +1438 -1444
  123. package/dist/organization.css +1 -1
  124. package/dist/other_setting-oVuhA70c.js +213 -0
  125. package/dist/other_setting.css +1 -1
  126. package/dist/page_animation_setting-D0CtzyOZ.js +108 -0
  127. package/dist/page_animation_setting.css +1 -1
  128. package/dist/{page_w_setting-CD_HtSUv.js → page_w_setting-Q--ct16C.js} +11 -11
  129. package/dist/page_w_setting.css +1 -1
  130. package/dist/{position-CLpbgKGj.js → position-CCZ2MSMP.js} +41 -41
  131. package/dist/{region-Dd9pt_Si.js → region-D3mjqB8H.js} +62 -62
  132. package/dist/{resource-C7dXB0EE.js → resource-DaQ7CvM_.js} +69 -69
  133. package/dist/{role-JGtvRObt.js → role-4UgEw3nH.js} +49 -49
  134. package/dist/{role_group-CKOb_m63.js → role_group-hkRlCnyl.js} +41 -41
  135. package/dist/{safe_setting-G_ZP-jWQ.js → safe_setting-4fv3qNRZ.js} +85 -85
  136. package/dist/{setItem-yKhjmUh0.js → setItem-Vkcwkj-O.js} +33 -32
  137. package/dist/setItem.css +1 -1
  138. package/dist/tabbar_setting-DhrW4Jj5.js +139 -0
  139. package/dist/{tenant-BBiCJkU_.js → tenant-lWfGw2u1.js} +48 -48
  140. package/dist/{theme_setting-vhNDLlkc.js → theme_setting-CEb7UYQO.js} +47 -47
  141. package/dist/theme_setting.css +1 -1
  142. package/dist/toolbar_setting-znESrYgi.js +140 -0
  143. package/dist/useAppAndResource-B7FmNfKG.js +52 -0
  144. package/dist/{user-DvCyUhZW.js → user-BkUpcQC8.js} +96 -96
  145. package/dist/{vanilla-picker-DcG96G63.js → vanilla-picker-Byb6q187.js} +239 -239
  146. package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +5 -1
  147. package/dist/views/components/setItem.vue.d.ts +5 -1
  148. package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -1
  149. package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +5 -1
  150. package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +5 -1
  151. package/dist/views/group/components/drawerGroup.vue.d.ts +5 -1
  152. package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +8 -1
  153. package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +8 -1
  154. package/dist/views/organization/components/drawerOrganization.vue.d.ts +5 -1
  155. package/dist/views/organization/components/drawerRole.vue.d.ts +5 -1
  156. package/dist/views/other_setting/interface.d.ts +1 -2
  157. package/dist/views/position/components/drawerPosition.vue.d.ts +5 -1
  158. package/dist/views/region/components/drawerRegion.vue.d.ts +5 -1
  159. package/dist/views/resource/components/ImportExport.vue.d.ts +5 -1
  160. package/dist/views/resource/components/ResourceEdit.vue.d.ts +5 -1
  161. package/dist/views/role/components/drawerRole.vue.d.ts +5 -1
  162. package/dist/views/role_group/components/drawerRole.vue.d.ts +5 -1
  163. package/dist/views/tenant/components/TenantEdit.vue.d.ts +5 -1
  164. package/dist/views/user/components/UserAuthorization.vue.d.ts +5 -1
  165. package/dist/views/user/components/UserEdit.vue.d.ts +5 -1
  166. package/dist/watermark_setting-DYirSIAn.js +191 -0
  167. package/dist/watermark_setting.css +1 -1
  168. package/package.json +13 -13
  169. package/src/views/other_setting/index.vue +2 -2
  170. package/src/views/other_setting/interface.ts +1 -1
  171. package/dist/ComponentSelect-D0OCk6H1.js +0 -3572
  172. package/dist/ComponentSelect-WO-3S5rH.js +0 -2
  173. package/dist/DynamicRoutesForm-DjZ3eVLW.js +0 -4
  174. package/dist/HCheckList-B5Qk_HBI.js +0 -2
  175. package/dist/HCheckList-DLBewmPw.js +0 -36
  176. package/dist/HoverCard-69ZIOivd.js +0 -2
  177. package/dist/HoverCard-BDFcxxvk.js +0 -43
  178. package/dist/IconSelect-C_Gj5G4I.js +0 -3
  179. package/dist/ImportExport-CL5uPlby.js +0 -342
  180. package/dist/ImportExport-CPy2rvv7.js +0 -4
  181. package/dist/LayoutForm-QFjwakyQ.js +0 -4
  182. package/dist/MetaForm-Bb-um1Zo.js +0 -4
  183. package/dist/OrgAndPosition-DoiGY5xb.js +0 -2
  184. package/dist/ResourceEdit-BTaNdwC_.js +0 -10
  185. package/dist/ResourceRelation-BIOzTOKA.js +0 -2
  186. package/dist/RoleRelation-CyTcqRfZ.js +0 -2
  187. package/dist/TenantEdit-BlMmL6q5.js +0 -2
  188. package/dist/UserAuthorization-qGr1Sdat.js +0 -3
  189. package/dist/UserEdit-CwfyqNWf.js +0 -3
  190. package/dist/animation_item-GzGItm3s.js +0 -2
  191. package/dist/breadcrumb_setting-Ds-XJRR1.js +0 -108
  192. package/dist/browserType-BXTT4j6i.js +0 -2
  193. package/dist/chunk-Cpsc_9al.js +0 -18
  194. package/dist/cloneDeep-DDAtsK42.js +0 -7
  195. package/dist/createAndEditDataPermission-CChlLDUm.js +0 -5
  196. package/dist/drawerBlackWhiteList-BqIDyn2Q.js +0 -2
  197. package/dist/drawerBlackWhiteList-CkbZ_9PZ.js +0 -119
  198. package/dist/drawerDictionary-D911w7pC.js +0 -2
  199. package/dist/drawerDictionary-dMHs-6Cw.js +0 -125
  200. package/dist/drawerDictionaryItem-CbTa_qL-.js +0 -137
  201. package/dist/drawerDictionaryItem-DLUI5Yuc.js +0 -2
  202. package/dist/drawerGroup-CEEDMBg9.js +0 -3
  203. package/dist/drawerOrganization-CqEMD3gE.js +0 -246
  204. package/dist/drawerOrganization-mks5NMd9.js +0 -2
  205. package/dist/drawerPosition-Bd0s7qze.js +0 -165
  206. package/dist/drawerPosition-DwlTrlGA.js +0 -2
  207. package/dist/drawerRegion-DUbQAZuV.js +0 -182
  208. package/dist/drawerRegion-DwVzsZfT.js +0 -2
  209. package/dist/drawerRole-BNrbcSmr.js +0 -3
  210. package/dist/drawerRole-BxUIekjh.js +0 -3
  211. package/dist/drawerRole-CyA2oFht.js +0 -4
  212. package/dist/drawerRole-D5X7oHB_.js +0 -153
  213. package/dist/isEmpty-BvRqbmpu.js +0 -13
  214. package/dist/loginHistoryDetail-CkH5UUGU.js +0 -3
  215. package/dist/menu_setting-5Jet091Q.js +0 -155
  216. package/dist/not-data-Cx--tk_h.js +0 -2
  217. package/dist/not-data-tyTawN37.js +0 -2
  218. package/dist/operateHistoryDetail-CeVPJzD6.js +0 -3
  219. package/dist/other_setting-DQ70WnZK.js +0 -213
  220. package/dist/page_animation_setting-Lp6cMuFM.js +0 -108
  221. package/dist/routeSystem-DXMoWhFo.js +0 -2
  222. package/dist/setItem-Qa7UapHO.js +0 -4
  223. package/dist/tabbar_setting-B3kMhRNm.js +0 -139
  224. package/dist/toolbar_setting-DNBdxeGP.js +0 -140
  225. package/dist/useAppAndResource-CPL2VpOJ.js +0 -52
  226. package/dist/watermark_setting-CXp4Og0Y.js +0 -191
@@ -0,0 +1,342 @@
1
+ import { o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk-DiMWNkAf.js";
2
+ import { G as postRbacResourceBackupExportResourceData, H as getRbacResourceBackupDetail, K as postRbacResourceBackupImportResourceData, Lt as useToggle, U as getRbacResourceBackupList, V as deleteRbacResourceBackupDeleteResourceBackup, W as getRbacResourceBackupRestore } from "./index.js";
3
+ import { i as resourceOptions, n as RESOURCE_COLOR } from "./enum-3E_sUqRF.js";
4
+ import { t as require_dayjs_min } from "./dayjs.min-Cb7gQFd4.js";
5
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, normalizeStyle, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, unref, vShow, withCtx, withDirectives } from "vue";
6
+ import { ClockCircleOutlined, CloudDownloadOutlined, CloudUploadOutlined, DeleteOutlined, UndoOutlined } from "@ant-design/icons-vue";
7
+ import { Upload, message, theme } from "ant-design-vue";
8
+ import { Button, Card as Card$1, Col, Empty as Empty$1, Modal as Modal$1, Popconfirm, Row, Space as Space$1, Spin as Spin$1, Tag as Tag$1, Tree as Tree$1, Upload as Upload$1 } from "ant-design-vue/es";
9
+ var require_FileSaver_min = /* @__PURE__ */ __commonJSMin(((e, t) => {
10
+ (function(t, n) {
11
+ typeof define == "function" && define.amd ? define([], n) : e === void 0 ? (n(), t.FileSaver = { exports: {} }.exports) : n();
12
+ })(e, function() {
13
+ function e(e, t) {
14
+ return t === void 0 ? t = { autoBom: !1 } : typeof t != "object" && (console.warn("Deprecated: Expected third argument to be a object"), t = { autoBom: !t }), t.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["", e], { type: e.type }) : e;
15
+ }
16
+ function n(e, t, n) {
17
+ var r = new XMLHttpRequest();
18
+ r.open("GET", e), r.responseType = "blob", r.onload = function() {
19
+ s(r.response, t, n);
20
+ }, r.onerror = function() {
21
+ console.error("could not download file");
22
+ }, r.send();
23
+ }
24
+ function r(e) {
25
+ var t = new XMLHttpRequest();
26
+ t.open("HEAD", e, !1);
27
+ try {
28
+ t.send();
29
+ } catch {}
30
+ return 200 <= t.status && 299 >= t.status;
31
+ }
32
+ function i(e) {
33
+ try {
34
+ e.dispatchEvent(new MouseEvent("click"));
35
+ } catch {
36
+ var t = document.createEvent("MouseEvents");
37
+ t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
38
+ }
39
+ }
40
+ var a = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : void 0, o = a.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), s = a.saveAs || (typeof window != "object" || window !== a ? function() {} : "download" in HTMLAnchorElement.prototype && !o ? function(e, t, o) {
41
+ var s = a.URL || a.webkitURL, c = document.createElement("a");
42
+ t = t || e.name || "download", c.download = t, c.rel = "noopener", typeof e == "string" ? (c.href = e, c.origin === location.origin ? i(c) : r(c.href) ? n(e, t, o) : i(c, c.target = "_blank")) : (c.href = s.createObjectURL(e), setTimeout(function() {
43
+ s.revokeObjectURL(c.href);
44
+ }, 4e4), setTimeout(function() {
45
+ i(c);
46
+ }, 0));
47
+ } : "msSaveOrOpenBlob" in navigator ? function(t, a, o) {
48
+ if (a = a || t.name || "download", typeof t != "string") navigator.msSaveOrOpenBlob(e(t, o), a);
49
+ else if (r(t)) n(t, a, o);
50
+ else {
51
+ var s = document.createElement("a");
52
+ s.href = t, s.target = "_blank", setTimeout(function() {
53
+ i(s);
54
+ });
55
+ }
56
+ } : function(e, t, r, i) {
57
+ if (i ||= open("", "_blank"), i && (i.document.title = i.document.body.innerText = "downloading..."), typeof e == "string") return n(e, t, r);
58
+ var s = e.type === "application/octet-stream", c = /constructor/i.test(a.HTMLElement) || a.safari, l = /CriOS\/[\d]+/.test(navigator.userAgent);
59
+ if ((l || s && c || o) && typeof FileReader < "u") {
60
+ var u = new FileReader();
61
+ u.onloadend = function() {
62
+ var e = u.result;
63
+ e = l ? e : e.replace(/^data:[^;]*;/, "data:attachment/file;"), i ? i.location.href = e : location = e, i = null;
64
+ }, u.readAsDataURL(e);
65
+ } else {
66
+ var d = a.URL || a.webkitURL, f = d.createObjectURL(e);
67
+ i ? i.location = f : location.href = f, i = null, setTimeout(function() {
68
+ d.revokeObjectURL(f);
69
+ }, 4e4);
70
+ }
71
+ });
72
+ a.saveAs = s.saveAs = s, t !== void 0 && (t.exports = s);
73
+ });
74
+ })), import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min(), 1), import_FileSaver_min = require_FileSaver_min(), _hoisted_1 = { class: "h-[70vh]" }, _hoisted_2 = { class: "size-full" }, _hoisted_3 = {
75
+ key: 0,
76
+ class: "flex flex-col items-center justify-center size-full"
77
+ }, _hoisted_4 = {
78
+ key: 1,
79
+ class: "flex flex-col items-center justify-center size-full"
80
+ }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "space-x-1" }, _hoisted_7 = { class: "text-sm truncate" }, ImportExport_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
81
+ name: "ImportExport",
82
+ __name: "ImportExport",
83
+ props: { dataSource: {} },
84
+ emits: ["submit"],
85
+ setup(e, { expose: t, emit: n }) {
86
+ let f = e, m = n, { token: g } = theme.useToken(), [_, v] = useToggle(!1), [y, b] = useToggle(!1), x = reactive({
87
+ selectedId: "",
88
+ list: [],
89
+ treeData: []
90
+ }), S = computed(() => x.selectedId ? [{
91
+ key: "current",
92
+ tab: "当前资源"
93
+ }, {
94
+ key: "history",
95
+ tab: "历史记录"
96
+ }] : [{
97
+ key: "current",
98
+ tab: "当前资源"
99
+ }]), C = ref([]), w = computed(() => f.dataSource), T = reactive({
100
+ list: S,
101
+ key: "current",
102
+ onTabChange(e) {
103
+ T.key = e;
104
+ }
105
+ });
106
+ function E() {
107
+ v(!0), T.key = "current", C.value = [], x.selectedId = "", k();
108
+ }
109
+ let [D, O] = useToggle(!1);
110
+ async function k() {
111
+ try {
112
+ O(!0);
113
+ let e = await getRbacResourceBackupList({ type: "0" });
114
+ e.success && (x.list = e?.data ?? []);
115
+ } finally {
116
+ O(!1);
117
+ }
118
+ }
119
+ let [A, j] = useToggle(!1);
120
+ async function M(e) {
121
+ if (x.selectedId === e) {
122
+ x.selectedId = "", T.key = "current";
123
+ return;
124
+ }
125
+ x.selectedId = e, T.key = "history";
126
+ try {
127
+ j(!0);
128
+ let t = await getRbacResourceBackupDetail({ id: e });
129
+ t.success && (x.treeData = t.data?.content ?? []);
130
+ } finally {
131
+ j(!1);
132
+ }
133
+ }
134
+ async function N() {
135
+ if (C.value.length === 0) {
136
+ message.info("请选中你要导出的资源节点。");
137
+ return;
138
+ }
139
+ try {
140
+ b(!0);
141
+ let e = await postRbacResourceBackupExportResourceData(C.value);
142
+ e.success && (F(e.data), message.success("导出成功!"));
143
+ } finally {
144
+ b(!1);
145
+ }
146
+ }
147
+ async function P(e) {
148
+ try {
149
+ return b(!0), (await postRbacResourceBackupImportResourceData({ parentId: C.value[0] ?? "0" }, {}, e)).success && (message.success("导入成功!"), k()), Upload.LIST_IGNORE;
150
+ } catch {
151
+ return Upload.LIST_IGNORE;
152
+ } finally {
153
+ b(!1), m("submit");
154
+ }
155
+ }
156
+ function F(e, t = `资源数据_${(0, import_dayjs_min.default)().format("YYYYMMDDHHmmss")}.json`) {
157
+ let n = JSON.stringify(e, null, 2);
158
+ (0, import_FileSaver_min.saveAs)(new Blob([n], { type: "application/json;charset=utf-8" }), t);
159
+ }
160
+ let [I, L] = useToggle(!1);
161
+ async function R() {
162
+ try {
163
+ L(!0), (await getRbacResourceBackupRestore({ id: x.selectedId })).success && (message.success("恢复备份成功!"), k(), m("submit"));
164
+ } finally {
165
+ L(!1);
166
+ }
167
+ }
168
+ let [z, B] = useToggle(!1);
169
+ async function V() {
170
+ try {
171
+ B(!0), (await deleteRbacResourceBackupDeleteResourceBackup({ id: x.selectedId })).success && (message.success("删除备份成功!"), k(), T.key = "current", x.selectedId = "");
172
+ } finally {
173
+ B(!1);
174
+ }
175
+ }
176
+ return t({ open: E }), (e, t) => {
177
+ let n = Button, r = Upload$1, i = Space$1, a = Popconfirm, o = Tag$1, s = Tree$1, c = Spin$1, l = Card$1, f = Col, p = Empty$1, m = Row, h = Modal$1;
178
+ return openBlock(), createBlock(h, {
179
+ open: unref(_),
180
+ "onUpdate:open": t[5] ||= (e) => isRef(_) ? _.value = e : null,
181
+ title: "导入 / 导出",
182
+ centered: "",
183
+ width: 1e3,
184
+ "destroy-on-close": "",
185
+ "mask-closable": !1,
186
+ footer: null
187
+ }, {
188
+ default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(m, {
189
+ gutter: 8,
190
+ class: "h-full"
191
+ }, {
192
+ default: withCtx(() => [createVNode(f, {
193
+ span: "16",
194
+ class: "h-full"
195
+ }, {
196
+ default: withCtx(() => [createVNode(l, {
197
+ "head-style": {
198
+ marginBottom: 0,
199
+ padding: "0 12px"
200
+ },
201
+ "body-style": {
202
+ padding: "12px",
203
+ height: "calc(100% - 56px)",
204
+ overflow: "auto"
205
+ },
206
+ "tab-list": unref(T).list,
207
+ "active-tab-key": unref(T).key,
208
+ class: "h-full",
209
+ onTabChange: t[4] ||= (e) => unref(T).onTabChange(e)
210
+ }, {
211
+ tabBarExtraContent: withCtx(() => [unref(T).key === "current" ? (openBlock(), createBlock(i, { key: 0 }, {
212
+ default: withCtx(() => [createVNode(r, { "before-upload": P }, {
213
+ default: withCtx(() => [createVNode(n, {
214
+ type: "primary",
215
+ loading: unref(y)
216
+ }, {
217
+ default: withCtx(() => [createVNode(unref(CloudUploadOutlined)), t[6] ||= createTextVNode(" 导入 ", -1)]),
218
+ _: 1
219
+ }, 8, ["loading"])]),
220
+ _: 1
221
+ }), createVNode(n, {
222
+ disabled: unref(C).length === 0,
223
+ loading: unref(y),
224
+ onClick: t[0] ||= (e) => N()
225
+ }, {
226
+ default: withCtx(() => [createVNode(unref(CloudDownloadOutlined)), t[7] ||= createTextVNode(" 导出 ", -1)]),
227
+ _: 1
228
+ }, 8, ["disabled", "loading"])]),
229
+ _: 1
230
+ })) : createCommentVNode("", !0), unref(T).key === "history" ? (openBlock(), createBlock(i, { key: 1 }, {
231
+ default: withCtx(() => [createVNode(a, {
232
+ title: "是否使用该历史数据覆盖当前数据?",
233
+ onConfirm: t[1] ||= (e) => R()
234
+ }, {
235
+ default: withCtx(() => [createVNode(n, { loading: unref(I) }, {
236
+ default: withCtx(() => [createVNode(unref(UndoOutlined)), t[8] ||= createTextVNode(" 恢复备份 ", -1)]),
237
+ _: 1
238
+ }, 8, ["loading"])]),
239
+ _: 1
240
+ }), createVNode(a, {
241
+ title: "是否删除该历史数据备份?",
242
+ onConfirm: t[2] ||= (e) => V()
243
+ }, {
244
+ default: withCtx(() => [createVNode(n, {
245
+ loading: unref(z),
246
+ danger: ""
247
+ }, {
248
+ default: withCtx(() => [createVNode(unref(DeleteOutlined)), t[9] ||= createTextVNode(" 删除备份 ", -1)]),
249
+ _: 1
250
+ }, 8, ["loading"])]),
251
+ _: 1
252
+ })]),
253
+ _: 1
254
+ })) : createCommentVNode("", !0)]),
255
+ default: withCtx(() => [withDirectives(createElementVNode("div", null, [createVNode(s, {
256
+ key: "current",
257
+ "selected-keys": unref(C),
258
+ "onUpdate:selectedKeys": t[3] ||= (e) => isRef(C) ? C.value = e : null,
259
+ "field-names": {
260
+ children: "children",
261
+ title: "name",
262
+ key: "id"
263
+ },
264
+ "tree-data": unref(w),
265
+ "block-node": ""
266
+ }, {
267
+ title: withCtx((e) => [createVNode(o, {
268
+ color: unref(RESOURCE_COLOR)[e.type],
269
+ bordered: !1
270
+ }, {
271
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(resourceOptions).find((t) => t.value === e.type)?.label), 1)]),
272
+ _: 2
273
+ }, 1032, ["color"]), createElementVNode("span", null, toDisplayString(e.name), 1)]),
274
+ _: 1
275
+ }, 8, ["selected-keys", "tree-data"])], 512), [[vShow, unref(T).key === "current"]]), withDirectives(createElementVNode("div", _hoisted_2, [createVNode(c, { spinning: unref(A) }, {
276
+ default: withCtx(() => [createVNode(s, {
277
+ key: "history",
278
+ "field-names": {
279
+ children: "children",
280
+ title: "name",
281
+ key: "id"
282
+ },
283
+ "tree-data": unref(x).treeData,
284
+ selectable: !1,
285
+ class: "size-full"
286
+ }, {
287
+ title: withCtx((e) => [createVNode(o, {
288
+ color: unref(RESOURCE_COLOR)[e.type],
289
+ bordered: !1
290
+ }, {
291
+ default: withCtx(() => [createTextVNode(toDisplayString(unref(resourceOptions).find((t) => t.value === e.type)?.label), 1)]),
292
+ _: 2
293
+ }, 1032, ["color"]), createElementVNode("span", null, toDisplayString(e.name), 1)]),
294
+ _: 1
295
+ }, 8, ["tree-data"])]),
296
+ _: 1
297
+ }, 8, ["spinning"])], 512), [[vShow, unref(T).key === "history"]])]),
298
+ _: 1
299
+ }, 8, ["tab-list", "active-tab-key"])]),
300
+ _: 1
301
+ }), createVNode(f, {
302
+ span: "8",
303
+ class: "h-full"
304
+ }, {
305
+ default: withCtx(() => [createVNode(l, {
306
+ title: "历史记录",
307
+ "head-style": {
308
+ marginBottom: 0,
309
+ padding: "0 12px"
310
+ },
311
+ "body-style": {
312
+ padding: "8px",
313
+ height: "calc(100% - 56px)",
314
+ overflowY: "auto"
315
+ },
316
+ class: "h-full"
317
+ }, {
318
+ default: withCtx(() => [
319
+ unref(D) ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(c)])) : createCommentVNode("", !0),
320
+ unref(x).list.length === 0 && !unref(D) ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(p)])) : createCommentVNode("", !0),
321
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(x).list, (e) => (openBlock(), createElementBlock("div", {
322
+ key: e.id,
323
+ class: "flex justify-between items-center space-x-2 cursor-pointer hover:bg-gray-50 py-1 px-2 rounded",
324
+ style: normalizeStyle({ backgroundColor: unref(x).selectedId === e.id ? unref(g).colorPrimaryBg : "" }),
325
+ onClick: (t) => M(e.id)
326
+ }, [createElementVNode("div", _hoisted_6, [createVNode(unref(ClockCircleOutlined)), createElementVNode("span", _hoisted_7, toDisplayString(e.createTime), 1)]), createElementVNode("span", {
327
+ class: "text-xs shrink-0",
328
+ style: normalizeStyle({ color: unref(g).colorTextTertiary })
329
+ }, toDisplayString(e.createUserName), 5)], 12, _hoisted_5))), 128))
330
+ ]),
331
+ _: 1
332
+ })]),
333
+ _: 1
334
+ })]),
335
+ _: 1
336
+ })])]),
337
+ _: 1
338
+ }, 8, ["open"]);
339
+ };
340
+ }
341
+ }), ImportExport_exports = /* @__PURE__ */ __exportAll({ default: () => ImportExport_default }), ImportExport_default = ImportExport_vue_vue_type_script_setup_true_lang_default;
342
+ export { ImportExport_exports as n, ImportExport_default as t };
@@ -1,13 +1,14 @@
1
+ import { r as __exportAll } from "./chunk-DiMWNkAf.js";
1
2
  import { h as _plugin_vue_export_helper_default } from "./index.js";
2
3
  import { r as RESOURCE_TYPE } from "./enum-3E_sUqRF.js";
3
- import { t as HoverCard_default } from "./HoverCard-BDFcxxvk.js";
4
+ import { t as HoverCard_default } from "./HoverCard-CmJCoa2b.js";
4
5
  import { computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, resolveComponent, unref, useModel, withCtx } from "vue";
5
6
  import { Col, Divider, FormItem, Row, Switch } from "ant-design-vue/es";
6
7
  import './LayoutForm.css';function useLayoutForm(e) {
7
8
  return {
8
9
  show: computed(() => {
9
- let g = e.value.type;
10
- return [RESOURCE_TYPE.APP, RESOURCE_TYPE.DYNAMIC_APP].includes(g);
10
+ let t = e.value.type;
11
+ return [RESOURCE_TYPE.APP, RESOURCE_TYPE.DYNAMIC_APP].includes(t);
11
12
  }),
12
13
  layoutForm: computed(() => {
13
14
  if (!e.value.meta?.layout) return {
@@ -16,20 +17,20 @@ import './LayoutForm.css';function useLayoutForm(e) {
16
17
  tabs: !0,
17
18
  toolbar: !0
18
19
  };
19
- let h = {
20
+ let t = {
20
21
  header: !0,
21
22
  sidebar: !0,
22
23
  tabs: !0,
23
24
  toolbar: !0
24
25
  };
25
26
  return e.value.meta.layout = {
26
- ...h,
27
+ ...t,
27
28
  ...e.value.meta.layout
28
29
  }, e.value.meta.layout;
29
30
  })
30
31
  };
31
32
  }
32
- var _hoisted_1 = { key: 0 }, LayoutForm_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
33
+ var _hoisted_1 = { key: 0 }, LayoutForm_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
33
34
  name: "LayoutForm",
34
35
  __name: "LayoutForm",
35
36
  props: {
@@ -43,23 +44,23 @@ var _hoisted_1 = { key: 0 }, LayoutForm_default = /* @__PURE__ */ _plugin_vue_ex
43
44
  },
44
45
  emits: ["update:modelValue"],
45
46
  setup(e) {
46
- let { layoutForm: h, show: _ } = useLayoutForm(useModel(e, "modelValue"));
47
- return (e, v) => {
48
- let y = Divider, b = Switch, x = FormItem, S = Col, C = Row;
49
- return unref(_) ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(y, null, {
50
- default: withCtx(() => [...v[4] ||= [createTextVNode("布局配置", -1)]]),
47
+ let { layoutForm: t, show: n } = useLayoutForm(useModel(e, "modelValue"));
48
+ return (e, r) => {
49
+ let i = Divider, a = Switch, o = FormItem, s = Col, c = Row;
50
+ return unref(n) ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(i, null, {
51
+ default: withCtx(() => [...r[4] ||= [createTextVNode("布局配置", -1)]]),
51
52
  _: 1
52
- }), createVNode(C, { gutter: [8, 8] }, {
53
+ }), createVNode(c, { gutter: [8, 8] }, {
53
54
  default: withCtx(() => [
54
- createVNode(S, { span: 12 }, {
55
- default: withCtx(() => [createVNode(x, {
55
+ createVNode(s, { span: 12 }, {
56
+ default: withCtx(() => [createVNode(o, {
56
57
  name: "enable",
57
58
  "label-col": { span: 0 }
58
59
  }, {
59
60
  default: withCtx(() => [createVNode(HoverCard_default, { class: "flex items-center justify-between" }, {
60
- default: withCtx(() => [v[5] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Header ", -1), createVNode(b, {
61
- checked: unref(h).header,
62
- "onUpdate:checked": v[0] ||= (e) => unref(h).header = e
61
+ default: withCtx(() => [r[5] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Header ", -1), createVNode(a, {
62
+ checked: unref(t).header,
63
+ "onUpdate:checked": r[0] ||= (e) => unref(t).header = e
63
64
  }, null, 8, ["checked"])]),
64
65
  _: 1
65
66
  })]),
@@ -67,15 +68,15 @@ var _hoisted_1 = { key: 0 }, LayoutForm_default = /* @__PURE__ */ _plugin_vue_ex
67
68
  })]),
68
69
  _: 1
69
70
  }),
70
- createVNode(S, { span: 12 }, {
71
- default: withCtx(() => [createVNode(x, {
71
+ createVNode(s, { span: 12 }, {
72
+ default: withCtx(() => [createVNode(o, {
72
73
  name: "enable",
73
74
  "label-col": { span: 0 }
74
75
  }, {
75
76
  default: withCtx(() => [createVNode(HoverCard_default, { class: "flex items-center justify-between" }, {
76
- default: withCtx(() => [v[6] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Sidebar ", -1), createVNode(b, {
77
- checked: unref(h).sidebar,
78
- "onUpdate:checked": v[1] ||= (e) => unref(h).sidebar = e
77
+ default: withCtx(() => [r[6] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Sidebar ", -1), createVNode(a, {
78
+ checked: unref(t).sidebar,
79
+ "onUpdate:checked": r[1] ||= (e) => unref(t).sidebar = e
79
80
  }, null, 8, ["checked"])]),
80
81
  _: 1
81
82
  })]),
@@ -83,15 +84,15 @@ var _hoisted_1 = { key: 0 }, LayoutForm_default = /* @__PURE__ */ _plugin_vue_ex
83
84
  })]),
84
85
  _: 1
85
86
  }),
86
- createVNode(S, { span: 12 }, {
87
- default: withCtx(() => [createVNode(x, {
87
+ createVNode(s, { span: 12 }, {
88
+ default: withCtx(() => [createVNode(o, {
88
89
  name: "enable",
89
90
  "label-col": { span: 0 }
90
91
  }, {
91
92
  default: withCtx(() => [createVNode(HoverCard_default, { class: "flex items-center justify-between" }, {
92
- default: withCtx(() => [v[7] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Tabs ", -1), createVNode(b, {
93
- checked: unref(h).tabs,
94
- "onUpdate:checked": v[2] ||= (e) => unref(h).tabs = e
93
+ default: withCtx(() => [r[7] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Tabs ", -1), createVNode(a, {
94
+ checked: unref(t).tabs,
95
+ "onUpdate:checked": r[2] ||= (e) => unref(t).tabs = e
95
96
  }, null, 8, ["checked"])]),
96
97
  _: 1
97
98
  })]),
@@ -99,15 +100,15 @@ var _hoisted_1 = { key: 0 }, LayoutForm_default = /* @__PURE__ */ _plugin_vue_ex
99
100
  })]),
100
101
  _: 1
101
102
  }),
102
- createVNode(S, { span: 12 }, {
103
- default: withCtx(() => [createVNode(x, {
103
+ createVNode(s, { span: 12 }, {
104
+ default: withCtx(() => [createVNode(o, {
104
105
  name: "enable",
105
106
  "label-col": { span: 0 }
106
107
  }, {
107
108
  default: withCtx(() => [createVNode(HoverCard_default, { class: "flex items-center justify-between" }, {
108
- default: withCtx(() => [v[8] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Toolbar ", -1), createVNode(b, {
109
- checked: unref(h).toolbar,
110
- "onUpdate:checked": v[3] ||= (e) => unref(h).toolbar = e
109
+ default: withCtx(() => [r[8] ||= createElementVNode("div", { class: "text-sm font-medium" }, " 显示 Toolbar ", -1), createVNode(a, {
110
+ checked: unref(t).toolbar,
111
+ "onUpdate:checked": r[3] ||= (e) => unref(t).toolbar = e
111
112
  }, null, 8, ["checked"])]),
112
113
  _: 1
113
114
  })]),
@@ -120,5 +121,5 @@ var _hoisted_1 = { key: 0 }, LayoutForm_default = /* @__PURE__ */ _plugin_vue_ex
120
121
  })])) : createCommentVNode("", !0);
121
122
  };
122
123
  }
123
- }), [["__scopeId", "data-v-8c0e12f9"]]);
124
- export { LayoutForm_default as t };
124
+ }), LayoutForm_exports = /* @__PURE__ */ __exportAll({ default: () => LayoutForm_default }), LayoutForm_default = /* @__PURE__ */ _plugin_vue_export_helper_default(LayoutForm_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8c0e12f9"]]);
125
+ export { LayoutForm_exports as n, LayoutForm_default as t };