@pubinfo/module-rbac 2.1.10 → 2.1.12
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/{ComponentSelect-A7uGTuHW.js → ComponentSelect-CYmAgdm3.js} +998 -963
- package/dist/DynamicRoutesForm-CMF3oh8h.js +171 -0
- package/dist/HCheckList-CAhQwX7m.js +39 -0
- package/dist/HoverCard-B-uU48hF.js +46 -0
- package/dist/IconSelect-CvxGRN_O.js +719 -0
- package/dist/ImportExport-CzZssb7_.js +345 -0
- package/dist/ImportExport-b1SnWRLj.js +6 -0
- package/dist/LayoutForm-Bpdyi_2o.js +129 -0
- package/dist/MetaForm-ZLzLz68d.js +39037 -0
- package/dist/OrgAndPosition-B0RE1Vc_.js +187 -0
- package/dist/OrgSelector-C2rPIonI.js +4877 -0
- package/dist/OrgSelector.css +1 -0
- package/dist/ResourceEdit-9fvxbd0K.js +383 -0
- package/dist/ResourceEdit-BMqfJ3aQ.js +13 -0
- package/dist/ResourceRelation-BrluMHdX.js +81 -0
- package/dist/ResourceRelation-IJvXnlpo.js +95 -0
- package/dist/RoleRelation-DuRuQG08.js +82 -0
- package/dist/RoleSelector-BTNYbcC6.js +282 -0
- package/dist/TenantEdit-Df3gZKLA.js +249 -0
- package/dist/UserAuthorization-DX7jNDDe.js +237 -0
- package/dist/UserEdit-BLb0n7WM.js +322 -0
- package/dist/_baseClone-C7vkGgsW.js +138 -0
- package/dist/_initCloneObject-r-eWKqzl.js +531 -0
- package/dist/add-child-DPb_m2by.js +4 -0
- package/dist/{animation_item-DBOz2rcX.js → animation_item-Coe-B0jQ.js} +24 -19
- package/dist/assist-BRMYD-oT.js +89 -0
- package/dist/authority-B9wtmsQd.js +4 -0
- package/dist/authorize-DxrutyIG.js +4 -0
- package/dist/blackWhiteList-d6TVsK48.js +214 -0
- package/dist/blacklist-disable-BKSw91qq.js +4 -0
- package/dist/blacklist-enable-CIB1fOHT.js +4 -0
- package/dist/breadcrumb_setting-DMbvWP5t.js +111 -0
- package/dist/browser-chrome-CM60RcrG.js +4 -0
- package/dist/browser-edge-4LBRzooM.js +4 -0
- package/dist/browser-ie-BF-wqbf6.js +4 -0
- package/dist/browser-other-iXJH-9iL.js +4 -0
- package/dist/browser-safari-CIpt0yPc.js +4 -0
- package/dist/browserType-Bik20-72.js +28 -0
- package/dist/chunk-WQLz0Won.js +20 -0
- package/dist/cloneDeep-REaxTPsZ.js +8 -0
- package/dist/createAndEditDataPermission-OunqmBu_.js +438 -0
- package/dist/data-permission-2pzeFLxP.js +159 -0
- package/dist/{dayjs.min-Cb7gQFd4.js → dayjs.min-CJunOGCc.js} +5 -3
- package/dist/dictionary-DGqlAhRk.js +182 -0
- package/dist/dist-DxAYQq3U.js +21 -0
- package/dist/drawerBlackWhiteList-VxyjaBkA.js +123 -0
- package/dist/drawerDictionary-DhAB-LV9.js +129 -0
- package/dist/drawerDictionaryItem-DYsJzZ2f.js +141 -0
- package/dist/drawerGroup-CTO8Lmbb.js +189 -0
- package/dist/drawerOrganization-DWhTc1fB.js +253 -0
- package/dist/drawerPosition-BmM9mLlP.js +169 -0
- package/dist/drawerRegion-BD-xc1x2.js +189 -0
- package/dist/drawerRole-B348x40k.js +214 -0
- package/dist/drawerRole-CgAPM-0g.js +172 -0
- package/dist/drawerRole-Cjp9iDsa.js +157 -0
- package/dist/edit-Drp8yjRe.js +4 -0
- package/dist/enum-CG0P82pn.js +6 -0
- package/dist/{enum-3E_sUqRF.js → enum-CR5ztb5v2.js} +15 -14
- package/dist/enum-CYCebJeC.js +62 -0
- package/dist/enum-DS4SGhiF.js +6 -0
- package/dist/enum-zdKA3Jy-.js +23 -0
- package/dist/group-C6Rj3K5I.js +178 -0
- package/dist/icard-BULUUV5m.js +4 -0
- package/dist/icon_animation-DuEY1FMm.js +4 -0
- package/dist/icon_breadcrumb-Y788iP_T.js +4 -0
- package/dist/icon_copyright-C1BER6kq.js +4 -0
- package/dist/icon_jt-ICOdrIF6.js +4 -0
- package/dist/icon_layout-D_wV9rX3.js +4 -0
- package/dist/icon_mainpage-Cz6_cxpJ.js +4 -0
- package/dist/icon_menu-y7SblUoR.js +4 -0
- package/dist/icon_page_size-BjwT656E.js +4 -0
- package/dist/icon_position_type-CPxcDgmM.js +4 -0
- package/dist/icon_safe_manage-CoqVRBLl.js +4 -0
- package/dist/icon_screen_scale-DURlkq3C.js +4 -0
- package/dist/icon_system_manage-BLXs2CQg.js +4 -0
- package/dist/icon_tabbar-_0QWhSBV.js +4 -0
- package/dist/icon_toolbar-BXpfu0iq.js +4 -0
- package/dist/icon_topbar-DrwvB8Jw.js +4 -0
- package/dist/icon_watermark-DwNqjAiA.js +4 -0
- package/dist/index.css +1 -1
- package/dist/index.js +587 -6775
- package/dist/isEmpty-2rx9iUQv.js +14 -0
- package/dist/isEqual-CNeQLaCM.js +474 -0
- package/dist/itemlist-BGe-z1IR.js +159 -0
- package/dist/layout_setting-Cds3TCHc.js +71 -0
- package/dist/log-DOMU9MyH.js +18 -0
- package/dist/log-center-BrGlNhMd.js +4 -0
- package/dist/loginHistoryDetail-Coba_ajy.js +80 -0
- package/dist/{login_history-BiwaLpxA.js → login_history-CrXkEsHb.js} +38 -35
- package/dist/menu_setting-Br5dOEUk.js +158 -0
- package/dist/not-data-C-MacYF3.js +5 -0
- package/dist/operateHistoryDetail-DfDQL5BF.js +92 -0
- package/dist/{operate_history-sPd9IHMV.js → operate_history-BtHgPhmF.js} +38 -35
- package/dist/org-main-BRMBumDm.js +4 -0
- package/dist/org-unmain-0BHnrNdD.js +4 -0
- package/dist/organization-BbFERZ1l.js +15411 -0
- package/dist/other_setting-D92SlFvl.js +216 -0
- package/dist/page_animation_setting-Cy2R0vZy.js +111 -0
- package/dist/page_w_setting-DryWrqcx.js +66 -0
- package/dist/position-B1bqGly6.js +169 -0
- package/dist/rbac-B59CVHDt.js +460 -0
- package/dist/region-B_n1KXMG.js +182 -0
- package/dist/remove-BTME2Fhs.js +4 -0
- package/dist/request-7X2hpUru.js +5 -0
- package/dist/resource-CPNNd1l0.js +275 -0
- package/dist/resource-app-D8to3Lkn.js +4 -0
- package/dist/resource-btn-Cz-A_EQF.js +4 -0
- package/dist/resource-dynamic-BUqWxUiU.js +4 -0
- package/dist/resource-index-D2roT002.js +4 -0
- package/dist/resource-menu-BRER68rK.js +4 -0
- package/dist/resource-micro-Hyucl9de.js +4 -0
- package/dist/resource-nonmenu-7FcPEpHv.js +4 -0
- package/dist/role-CMd7WDRC.js +195 -0
- package/dist/role_group-DHh2s911.js +174 -0
- package/dist/safe_setting-CuTBmUve.js +225 -0
- package/dist/setItem-BwXZ5Uqx.js +4 -0
- package/dist/setItem-DlhIkIgh.js +78 -0
- package/dist/setting-manage-UHelpLrr.js +4 -0
- package/dist/stores-C-zbXsms.js +2 -0
- package/dist/tabbar_setting-CjW9LGPp.js +142 -0
- package/dist/tenant-B_vgufMG.js +180 -0
- package/dist/theme-check-mark-DRzx4sTs.js +4 -0
- package/dist/theme-title-BRvQ_qPg.js +4 -0
- package/dist/theme_setting-DMP0_nZ1.js +114 -0
- package/dist/toolbar_setting-ClxxvA7R.js +143 -0
- package/dist/useAppAndResource-D6WnpUPR.js +55 -0
- package/dist/user-BhytPqnx.js +348 -0
- package/dist/{vanilla-picker-Byb6q187.js → vanilla-picker-2HFham9c.js} +61 -59
- package/dist/view-Cridj7u2.js +4 -0
- package/dist/view-lBxqXfPW.js +114 -0
- package/dist/watermark_setting-b3vBYWwY.js +194 -0
- package/dist/zddata-CnvPWtIW.js +4 -0
- package/dist/zy_checked-C25HQlnr.js +4 -0
- package/dist/zy_default-B7RKtyqy.js +4 -0
- package/package.json +3 -3
- package/dist/DynamicRoutesForm-DSzy_bh5.js +0 -169
- package/dist/HCheckList-ODQHidN8.js +0 -37
- package/dist/HoverCard-CmJCoa2b.js +0 -44
- package/dist/IconSelect-DouEg3xY.js +0 -717
- package/dist/ImportExport-DisdLoY8.js +0 -342
- package/dist/LayoutForm-Bdfs5WeK.js +0 -125
- package/dist/MetaForm-CcDwS8vh.js +0 -38902
- package/dist/OrgAndPosition-jDX7m0HD.js +0 -184
- package/dist/ResourceEdit-0BYZRye_.js +0 -381
- package/dist/ResourceRelation-CU-QpUhP.js +0 -76
- package/dist/ResourceRelation-roz0a8Td.js +0 -91
- package/dist/RoleRelation-BQQFaum0.js +0 -79
- package/dist/RoleSelector-gkar_UGG.js +0 -275
- package/dist/TenantEdit-BsahDUlf.js +0 -246
- package/dist/UserAuthorization-2Fl4IGw7.js +0 -233
- package/dist/UserEdit-CX3Qau8T.js +0 -320
- package/dist/add-child-CFHHkjfg.js +0 -2
- package/dist/authority-L7SfiMdP.js +0 -2
- package/dist/authorize-qMpV_BXT.js +0 -2
- package/dist/blackWhiteList-DbG7JH8n.js +0 -211
- package/dist/blacklist-disable-BT6Xx-JG.js +0 -2
- package/dist/blacklist-enable-CJ6DK_V2.js +0 -2
- package/dist/breadcrumb_setting-DTR6CPZQ.js +0 -108
- package/dist/browser-chrome-DuAegVCe.js +0 -2
- package/dist/browser-edge-DzkWdXRd.js +0 -2
- package/dist/browser-ie-DZ9g_MXr.js +0 -2
- package/dist/browser-other-BmkifoYq.js +0 -2
- package/dist/browser-safari-CXrCuF2a.js +0 -2
- package/dist/browserType-B8A1Osvk.js +0 -26
- package/dist/chunk-DiMWNkAf.js +0 -18
- package/dist/cloneDeep-CSOSavu3.js +0 -6
- package/dist/createAndEditDataPermission-8_KNLzJT.js +0 -431
- package/dist/data-permission-LpuDLDm0.js +0 -152
- package/dist/dictionary-CEaxjqZe.js +0 -179
- package/dist/drawerBlackWhiteList-DXLdWurZ.js +0 -120
- package/dist/drawerDictionary-DYJTAZr6.js +0 -126
- package/dist/drawerDictionaryItem-BChXD2-q.js +0 -138
- package/dist/drawerGroup-CdnZkZxi.js +0 -185
- package/dist/drawerOrganization-CwtSFUj0.js +0 -247
- package/dist/drawerPosition-CfyfeQCN.js +0 -166
- package/dist/drawerRegion-DAwY_29K.js +0 -183
- package/dist/drawerRole-B7uCfHk-.js +0 -154
- package/dist/drawerRole-DK6DrinO.js +0 -209
- package/dist/drawerRole-DrzMHL0O.js +0 -167
- package/dist/edit-fZ7h_z_Z.js +0 -2
- package/dist/enum-3mYayxff.js +0 -61
- package/dist/enum-Cr7uWnB2.js +0 -23
- package/dist/enum-D2UEJsrC.js +0 -4
- package/dist/group-CaOhkh72.js +0 -172
- package/dist/icard-H-d9Pip-.js +0 -2
- package/dist/icon_animation-BCdRKkE5.js +0 -2
- package/dist/icon_breadcrumb-BR6LK8hP.js +0 -2
- package/dist/icon_copyright-BfWn1s6t.js +0 -2
- package/dist/icon_jt-DOMTq9De.js +0 -2
- package/dist/icon_layout-DKqAThpM.js +0 -2
- package/dist/icon_mainpage-CXB9JMGv.js +0 -2
- package/dist/icon_menu-BYQtWV-Q.js +0 -2
- package/dist/icon_page_size-r-z4oHWp.js +0 -2
- package/dist/icon_position_type-JDFdklRh.js +0 -2
- package/dist/icon_safe_manage-BDTIOduB.js +0 -2
- package/dist/icon_screen_scale-vEaAdr9S.js +0 -2
- package/dist/icon_system_manage-CkhQtieE.js +0 -2
- package/dist/icon_tabbar-DZNj-h-p.js +0 -2
- package/dist/icon_toolbar-BBYhGmEf.js +0 -2
- package/dist/icon_topbar-Bc379eaS.js +0 -2
- package/dist/icon_watermark-CTP8r-e2.js +0 -2
- package/dist/isEmpty-BjEzPyCa.js +0 -12
- package/dist/itemlist-CFwRUV2Y.js +0 -156
- package/dist/layout_setting-79srmFgJ.js +0 -68
- package/dist/log-BYris9iT.js +0 -14
- package/dist/log-center-CGT-BGAN.js +0 -2
- package/dist/loginHistoryDetail-CZnfmbbM.js +0 -78
- package/dist/menu_setting-C2GciMXz.js +0 -155
- package/dist/not-data-Bml86wdH.js +0 -3
- package/dist/operateHistoryDetail-HId-EZzy.js +0 -90
- package/dist/org-main-DnftBa38.js +0 -2
- package/dist/org-unmain-ByMarqFw.js +0 -2
- package/dist/organization-Dv3FbKke.js +0 -15316
- package/dist/other_setting-oVuhA70c.js +0 -213
- package/dist/page_animation_setting-D0CtzyOZ.js +0 -108
- package/dist/page_w_setting-Q--ct16C.js +0 -63
- package/dist/position-CCZ2MSMP.js +0 -166
- package/dist/region-D3mjqB8H.js +0 -179
- package/dist/remove-DfZZBE2T.js +0 -2
- package/dist/resource-DaQ7CvM_.js +0 -271
- package/dist/resource-app-QSLZ7Hts.js +0 -2
- package/dist/resource-btn-BcB4xMgR.js +0 -2
- package/dist/resource-dynamic-D69oEbaO.js +0 -2
- package/dist/resource-index-BIHr3PZY.js +0 -2
- package/dist/resource-menu-0JSNn7S7.js +0 -2
- package/dist/resource-micro-CcX_pmaJ.js +0 -2
- package/dist/resource-nonmenu-DFItasMT.js +0 -2
- package/dist/role-4UgEw3nH.js +0 -192
- package/dist/role_group-hkRlCnyl.js +0 -171
- package/dist/safe_setting-4fv3qNRZ.js +0 -221
- package/dist/setItem-Vkcwkj-O.js +0 -77
- package/dist/setting-manage-C9whamLP.js +0 -2
- package/dist/stores-DPQF8JRt.js +0 -2
- package/dist/tabbar_setting-DhrW4Jj5.js +0 -139
- package/dist/tenant-lWfGw2u1.js +0 -177
- package/dist/theme-check-mark-DG4oWCQN.js +0 -2
- package/dist/theme-title-BCYnl2jK.js +0 -2
- package/dist/theme_setting-CEb7UYQO.js +0 -111
- package/dist/toolbar_setting-znESrYgi.js +0 -140
- package/dist/useAppAndResource-B7FmNfKG.js +0 -52
- package/dist/user-BkUpcQC8.js +0 -339
- package/dist/view-Bnu34EJT.js +0 -2
- package/dist/watermark_setting-DYirSIAn.js +0 -191
- package/dist/zddata-Ceyga3_2.js +0 -2
- package/dist/zy_checked-DvD7k9F8.js +0 -2
- package/dist/zy_default-DJ2tB3Fo.js +0 -2
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { o as e, t } from "./chunk-WQLz0Won.js";
|
|
2
|
+
import { n } from "./dist-DxAYQq3U.js";
|
|
3
|
+
import { A as r, D as i, M as a, O as o, j as s, k as c } from "./rbac-B59CVHDt.js";
|
|
4
|
+
import { i as l, n as u } from "./enum-CR5ztb5v2.js";
|
|
5
|
+
import { t as d } from "./dayjs.min-CJunOGCc.js";
|
|
6
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as v, createVNode as y, defineComponent as b, isRef as x, normalizeStyle as S, openBlock as C, reactive as w, ref as T, renderList as ee, toDisplayString as E, unref as D, vShow as O, withCtx as k, withDirectives as A } from "vue";
|
|
7
|
+
import { ClockCircleOutlined as te, CloudDownloadOutlined as j, CloudUploadOutlined as ne, DeleteOutlined as re, UndoOutlined as ie } from "@ant-design/icons-vue";
|
|
8
|
+
import { Upload as M, message as N, theme as ae } from "ant-design-vue";
|
|
9
|
+
import { Button as oe, Card as se, Col as ce, Empty as le, Modal as ue, Popconfirm as de, Row as fe, Space as pe, Spin as me, Tag as P, Tree as F, Upload as I } from "ant-design-vue/es";
|
|
10
|
+
//#region ../../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/dist/FileSaver.min.js
|
|
11
|
+
var L = /* @__PURE__ */ t(((e, t) => {
|
|
12
|
+
(function(t, n) {
|
|
13
|
+
typeof define == "function" && define.amd ? define([], n) : e === void 0 ? (n(), t.FileSaver = { exports: {} }.exports) : n();
|
|
14
|
+
})(e, function() {
|
|
15
|
+
function e(e, t) {
|
|
16
|
+
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;
|
|
17
|
+
}
|
|
18
|
+
function n(e, t, n) {
|
|
19
|
+
var r = new XMLHttpRequest();
|
|
20
|
+
r.open("GET", e), r.responseType = "blob", r.onload = function() {
|
|
21
|
+
s(r.response, t, n);
|
|
22
|
+
}, r.onerror = function() {
|
|
23
|
+
console.error("could not download file");
|
|
24
|
+
}, r.send();
|
|
25
|
+
}
|
|
26
|
+
function r(e) {
|
|
27
|
+
var t = new XMLHttpRequest();
|
|
28
|
+
t.open("HEAD", e, !1);
|
|
29
|
+
try {
|
|
30
|
+
t.send();
|
|
31
|
+
} catch {}
|
|
32
|
+
return 200 <= t.status && 299 >= t.status;
|
|
33
|
+
}
|
|
34
|
+
function i(e) {
|
|
35
|
+
try {
|
|
36
|
+
e.dispatchEvent(new MouseEvent("click"));
|
|
37
|
+
} catch {
|
|
38
|
+
var t = document.createEvent("MouseEvents");
|
|
39
|
+
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
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) {
|
|
43
|
+
var s = a.URL || a.webkitURL, c = document.createElement("a");
|
|
44
|
+
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() {
|
|
45
|
+
s.revokeObjectURL(c.href);
|
|
46
|
+
}, 4e4), setTimeout(function() {
|
|
47
|
+
i(c);
|
|
48
|
+
}, 0));
|
|
49
|
+
} : "msSaveOrOpenBlob" in navigator ? function(t, a, o) {
|
|
50
|
+
if (a = a || t.name || "download", typeof t != "string") navigator.msSaveOrOpenBlob(e(t, o), a);
|
|
51
|
+
else if (r(t)) n(t, a, o);
|
|
52
|
+
else {
|
|
53
|
+
var s = document.createElement("a");
|
|
54
|
+
s.href = t, s.target = "_blank", setTimeout(function() {
|
|
55
|
+
i(s);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
} : function(e, t, r, i) {
|
|
59
|
+
if (i ||= open("", "_blank"), i && (i.document.title = i.document.body.innerText = "downloading..."), typeof e == "string") return n(e, t, r);
|
|
60
|
+
var s = e.type === "application/octet-stream", c = /constructor/i.test(a.HTMLElement) || a.safari, l = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
61
|
+
if ((l || s && c || o) && typeof FileReader < "u") {
|
|
62
|
+
var u = new FileReader();
|
|
63
|
+
u.onloadend = function() {
|
|
64
|
+
var e = u.result;
|
|
65
|
+
e = l ? e : e.replace(/^data:[^;]*;/, "data:attachment/file;"), i ? i.location.href = e : location = e, i = null;
|
|
66
|
+
}, u.readAsDataURL(e);
|
|
67
|
+
} else {
|
|
68
|
+
var d = a.URL || a.webkitURL, f = d.createObjectURL(e);
|
|
69
|
+
i ? i.location = f : location.href = f, i = null, setTimeout(function() {
|
|
70
|
+
d.revokeObjectURL(f);
|
|
71
|
+
}, 4e4);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
a.saveAs = s.saveAs = s, t !== void 0 && (t.exports = s);
|
|
75
|
+
});
|
|
76
|
+
})), R = /* @__PURE__ */ e(d(), 1), z = L(), he = { class: "h-[70vh]" }, ge = { class: "size-full" }, _e = {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "flex flex-col items-center justify-center size-full"
|
|
79
|
+
}, ve = {
|
|
80
|
+
key: 1,
|
|
81
|
+
class: "flex flex-col items-center justify-center size-full"
|
|
82
|
+
}, ye = ["onClick"], be = { class: "space-x-1" }, xe = { class: "text-sm truncate" }, B = /* @__PURE__ */ b({
|
|
83
|
+
name: "ImportExport",
|
|
84
|
+
__name: "ImportExport",
|
|
85
|
+
props: { dataSource: {} },
|
|
86
|
+
emits: ["submit"],
|
|
87
|
+
setup(e, { expose: t, emit: d }) {
|
|
88
|
+
let b = e, L = d, { token: B } = ae.useToken(), [V, Se] = n(!1), [H, U] = n(!1), W = w({
|
|
89
|
+
selectedId: "",
|
|
90
|
+
list: [],
|
|
91
|
+
treeData: []
|
|
92
|
+
}), Ce = p(() => W.selectedId ? [{
|
|
93
|
+
key: "current",
|
|
94
|
+
tab: "当前资源"
|
|
95
|
+
}, {
|
|
96
|
+
key: "history",
|
|
97
|
+
tab: "历史记录"
|
|
98
|
+
}] : [{
|
|
99
|
+
key: "current",
|
|
100
|
+
tab: "当前资源"
|
|
101
|
+
}]), G = T([]), we = p(() => b.dataSource), K = w({
|
|
102
|
+
list: Ce,
|
|
103
|
+
key: "current",
|
|
104
|
+
onTabChange(e) {
|
|
105
|
+
K.key = e;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
function Te() {
|
|
109
|
+
Se(!0), K.key = "current", G.value = [], W.selectedId = "", Y();
|
|
110
|
+
}
|
|
111
|
+
let [q, J] = n(!1);
|
|
112
|
+
async function Y() {
|
|
113
|
+
try {
|
|
114
|
+
J(!0);
|
|
115
|
+
let e = await c({ type: "0" });
|
|
116
|
+
e.success && (W.list = e?.data ?? []);
|
|
117
|
+
} finally {
|
|
118
|
+
J(!1);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
let [Ee, X] = n(!1);
|
|
122
|
+
async function De(e) {
|
|
123
|
+
if (W.selectedId === e) {
|
|
124
|
+
W.selectedId = "", K.key = "current";
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
W.selectedId = e, K.key = "history";
|
|
128
|
+
try {
|
|
129
|
+
X(!0);
|
|
130
|
+
let t = await o({ id: e });
|
|
131
|
+
t.success && (W.treeData = t.data?.content ?? []);
|
|
132
|
+
} finally {
|
|
133
|
+
X(!1);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
async function Oe() {
|
|
137
|
+
if (G.value.length === 0) {
|
|
138
|
+
N.info("请选中你要导出的资源节点。");
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
try {
|
|
142
|
+
U(!0);
|
|
143
|
+
let e = await s(G.value);
|
|
144
|
+
e.success && (Ae(e.data), N.success("导出成功!"));
|
|
145
|
+
} finally {
|
|
146
|
+
U(!1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
async function ke(e) {
|
|
150
|
+
try {
|
|
151
|
+
return U(!0), (await a({ parentId: G.value[0] ?? "0" }, {}, e)).success && (N.success("导入成功!"), Y()), M.LIST_IGNORE;
|
|
152
|
+
} catch {
|
|
153
|
+
return M.LIST_IGNORE;
|
|
154
|
+
} finally {
|
|
155
|
+
U(!1), L("submit");
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function Ae(e, t = `资源数据_${(0, R.default)().format("YYYYMMDDHHmmss")}.json`) {
|
|
159
|
+
let n = JSON.stringify(e, null, 2);
|
|
160
|
+
(0, z.saveAs)(new Blob([n], { type: "application/json;charset=utf-8" }), t);
|
|
161
|
+
}
|
|
162
|
+
let [je, Z] = n(!1);
|
|
163
|
+
async function Q() {
|
|
164
|
+
try {
|
|
165
|
+
Z(!0), (await r({ id: W.selectedId })).success && (N.success("恢复备份成功!"), Y(), L("submit"));
|
|
166
|
+
} finally {
|
|
167
|
+
Z(!1);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
let [Me, $] = n(!1);
|
|
171
|
+
async function Ne() {
|
|
172
|
+
try {
|
|
173
|
+
$(!0), (await i({ id: W.selectedId })).success && (N.success("删除备份成功!"), Y(), K.key = "current", W.selectedId = "");
|
|
174
|
+
} finally {
|
|
175
|
+
$(!1);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return t({ open: Te }), (e, t) => {
|
|
179
|
+
let n = oe, r = I, i = pe, a = de, o = P, s = F, c = me, d = se, p = ce, b = le, w = fe, T = ue;
|
|
180
|
+
return C(), m(T, {
|
|
181
|
+
open: D(V),
|
|
182
|
+
"onUpdate:open": t[5] ||= (e) => x(V) ? V.value = e : null,
|
|
183
|
+
title: "导入 / 导出",
|
|
184
|
+
centered: "",
|
|
185
|
+
width: 1e3,
|
|
186
|
+
"destroy-on-close": "",
|
|
187
|
+
"mask-closable": !1,
|
|
188
|
+
footer: null
|
|
189
|
+
}, {
|
|
190
|
+
default: k(() => [_("div", he, [y(w, {
|
|
191
|
+
gutter: 8,
|
|
192
|
+
class: "h-full"
|
|
193
|
+
}, {
|
|
194
|
+
default: k(() => [y(p, {
|
|
195
|
+
span: "16",
|
|
196
|
+
class: "h-full"
|
|
197
|
+
}, {
|
|
198
|
+
default: k(() => [y(d, {
|
|
199
|
+
"head-style": {
|
|
200
|
+
marginBottom: 0,
|
|
201
|
+
padding: "0 12px"
|
|
202
|
+
},
|
|
203
|
+
"body-style": {
|
|
204
|
+
padding: "12px",
|
|
205
|
+
height: "calc(100% - 56px)",
|
|
206
|
+
overflow: "auto"
|
|
207
|
+
},
|
|
208
|
+
"tab-list": D(K).list,
|
|
209
|
+
"active-tab-key": D(K).key,
|
|
210
|
+
class: "h-full",
|
|
211
|
+
onTabChange: t[4] ||= (e) => D(K).onTabChange(e)
|
|
212
|
+
}, {
|
|
213
|
+
tabBarExtraContent: k(() => [D(K).key === "current" ? (C(), m(i, { key: 0 }, {
|
|
214
|
+
default: k(() => [y(r, { "before-upload": ke }, {
|
|
215
|
+
default: k(() => [y(n, {
|
|
216
|
+
type: "primary",
|
|
217
|
+
loading: D(H)
|
|
218
|
+
}, {
|
|
219
|
+
default: k(() => [y(D(ne)), t[6] ||= v(" 导入 ", -1)]),
|
|
220
|
+
_: 1
|
|
221
|
+
}, 8, ["loading"])]),
|
|
222
|
+
_: 1
|
|
223
|
+
}), y(n, {
|
|
224
|
+
disabled: D(G).length === 0,
|
|
225
|
+
loading: D(H),
|
|
226
|
+
onClick: t[0] ||= (e) => Oe()
|
|
227
|
+
}, {
|
|
228
|
+
default: k(() => [y(D(j)), t[7] ||= v(" 导出 ", -1)]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["disabled", "loading"])]),
|
|
231
|
+
_: 1
|
|
232
|
+
})) : h("", !0), D(K).key === "history" ? (C(), m(i, { key: 1 }, {
|
|
233
|
+
default: k(() => [y(a, {
|
|
234
|
+
title: "是否使用该历史数据覆盖当前数据?",
|
|
235
|
+
onConfirm: t[1] ||= (e) => Q()
|
|
236
|
+
}, {
|
|
237
|
+
default: k(() => [y(n, { loading: D(je) }, {
|
|
238
|
+
default: k(() => [y(D(ie)), t[8] ||= v(" 恢复备份 ", -1)]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["loading"])]),
|
|
241
|
+
_: 1
|
|
242
|
+
}), y(a, {
|
|
243
|
+
title: "是否删除该历史数据备份?",
|
|
244
|
+
onConfirm: t[2] ||= (e) => Ne()
|
|
245
|
+
}, {
|
|
246
|
+
default: k(() => [y(n, {
|
|
247
|
+
loading: D(Me),
|
|
248
|
+
danger: ""
|
|
249
|
+
}, {
|
|
250
|
+
default: k(() => [y(D(re)), t[9] ||= v(" 删除备份 ", -1)]),
|
|
251
|
+
_: 1
|
|
252
|
+
}, 8, ["loading"])]),
|
|
253
|
+
_: 1
|
|
254
|
+
})]),
|
|
255
|
+
_: 1
|
|
256
|
+
})) : h("", !0)]),
|
|
257
|
+
default: k(() => [A(_("div", null, [y(s, {
|
|
258
|
+
key: "current",
|
|
259
|
+
"selected-keys": D(G),
|
|
260
|
+
"onUpdate:selectedKeys": t[3] ||= (e) => x(G) ? G.value = e : null,
|
|
261
|
+
"field-names": {
|
|
262
|
+
children: "children",
|
|
263
|
+
title: "name",
|
|
264
|
+
key: "id"
|
|
265
|
+
},
|
|
266
|
+
"tree-data": D(we),
|
|
267
|
+
"block-node": ""
|
|
268
|
+
}, {
|
|
269
|
+
title: k((e) => [y(o, {
|
|
270
|
+
color: D(u)[e.type],
|
|
271
|
+
bordered: !1
|
|
272
|
+
}, {
|
|
273
|
+
default: k(() => [v(E(D(l).find((t) => t.value === e.type)?.label), 1)]),
|
|
274
|
+
_: 2
|
|
275
|
+
}, 1032, ["color"]), _("span", null, E(e.name), 1)]),
|
|
276
|
+
_: 1
|
|
277
|
+
}, 8, ["selected-keys", "tree-data"])], 512), [[O, D(K).key === "current"]]), A(_("div", ge, [y(c, { spinning: D(Ee) }, {
|
|
278
|
+
default: k(() => [y(s, {
|
|
279
|
+
key: "history",
|
|
280
|
+
"field-names": {
|
|
281
|
+
children: "children",
|
|
282
|
+
title: "name",
|
|
283
|
+
key: "id"
|
|
284
|
+
},
|
|
285
|
+
"tree-data": D(W).treeData,
|
|
286
|
+
selectable: !1,
|
|
287
|
+
class: "size-full"
|
|
288
|
+
}, {
|
|
289
|
+
title: k((e) => [y(o, {
|
|
290
|
+
color: D(u)[e.type],
|
|
291
|
+
bordered: !1
|
|
292
|
+
}, {
|
|
293
|
+
default: k(() => [v(E(D(l).find((t) => t.value === e.type)?.label), 1)]),
|
|
294
|
+
_: 2
|
|
295
|
+
}, 1032, ["color"]), _("span", null, E(e.name), 1)]),
|
|
296
|
+
_: 1
|
|
297
|
+
}, 8, ["tree-data"])]),
|
|
298
|
+
_: 1
|
|
299
|
+
}, 8, ["spinning"])], 512), [[O, D(K).key === "history"]])]),
|
|
300
|
+
_: 1
|
|
301
|
+
}, 8, ["tab-list", "active-tab-key"])]),
|
|
302
|
+
_: 1
|
|
303
|
+
}), y(p, {
|
|
304
|
+
span: "8",
|
|
305
|
+
class: "h-full"
|
|
306
|
+
}, {
|
|
307
|
+
default: k(() => [y(d, {
|
|
308
|
+
title: "历史记录",
|
|
309
|
+
"head-style": {
|
|
310
|
+
marginBottom: 0,
|
|
311
|
+
padding: "0 12px"
|
|
312
|
+
},
|
|
313
|
+
"body-style": {
|
|
314
|
+
padding: "8px",
|
|
315
|
+
height: "calc(100% - 56px)",
|
|
316
|
+
overflowY: "auto"
|
|
317
|
+
},
|
|
318
|
+
class: "h-full"
|
|
319
|
+
}, {
|
|
320
|
+
default: k(() => [
|
|
321
|
+
D(q) ? (C(), g("div", _e, [y(c)])) : h("", !0),
|
|
322
|
+
D(W).list.length === 0 && !D(q) ? (C(), g("div", ve, [y(b)])) : h("", !0),
|
|
323
|
+
(C(!0), g(f, null, ee(D(W).list, (e) => (C(), g("div", {
|
|
324
|
+
key: e.id,
|
|
325
|
+
class: "flex justify-between items-center space-x-2 cursor-pointer hover:bg-gray-50 py-1 px-2 rounded",
|
|
326
|
+
style: S({ backgroundColor: D(W).selectedId === e.id ? D(B).colorPrimaryBg : "" }),
|
|
327
|
+
onClick: (t) => De(e.id)
|
|
328
|
+
}, [_("div", be, [y(D(te)), _("span", xe, E(e.createTime), 1)]), _("span", {
|
|
329
|
+
class: "text-xs shrink-0",
|
|
330
|
+
style: S({ color: D(B).colorTextTertiary })
|
|
331
|
+
}, E(e.createUserName), 5)], 12, ye))), 128))
|
|
332
|
+
]),
|
|
333
|
+
_: 1
|
|
334
|
+
})]),
|
|
335
|
+
_: 1
|
|
336
|
+
})]),
|
|
337
|
+
_: 1
|
|
338
|
+
})])]),
|
|
339
|
+
_: 1
|
|
340
|
+
}, 8, ["open"]);
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
//#endregion
|
|
345
|
+
export { B as t };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { r as e } from "./chunk-WQLz0Won.js";
|
|
2
|
+
import { h as t } from "./index.js";
|
|
3
|
+
import { r as n } from "./enum-CR5ztb5v2.js";
|
|
4
|
+
import { t as r } from "./HoverCard-B-uU48hF.js";
|
|
5
|
+
import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, unref as f, useModel as p, withCtx as m } from "vue";
|
|
6
|
+
import { Col as h, Divider as g, FormItem as _, Row as v, Switch as y } from "ant-design-vue/es";
|
|
7
|
+
import './LayoutForm.css';//#region src/views/resource/hooks/useLayoutForm.ts
|
|
8
|
+
function b(e) {
|
|
9
|
+
return {
|
|
10
|
+
show: i(() => {
|
|
11
|
+
let t = e.value.type;
|
|
12
|
+
return [n.APP, n.DYNAMIC_APP].includes(t);
|
|
13
|
+
}),
|
|
14
|
+
layoutForm: i(() => {
|
|
15
|
+
if (!e.value.meta?.layout) return {
|
|
16
|
+
header: !0,
|
|
17
|
+
sidebar: !0,
|
|
18
|
+
tabs: !0,
|
|
19
|
+
toolbar: !0
|
|
20
|
+
};
|
|
21
|
+
let t = {
|
|
22
|
+
header: !0,
|
|
23
|
+
sidebar: !0,
|
|
24
|
+
tabs: !0,
|
|
25
|
+
toolbar: !0
|
|
26
|
+
};
|
|
27
|
+
return e.value.meta.layout = {
|
|
28
|
+
...t,
|
|
29
|
+
...e.value.meta.layout
|
|
30
|
+
}, e.value.meta.layout;
|
|
31
|
+
})
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/views/resource/components/LayoutForm.vue?vue&type=script&setup=true&lang.ts
|
|
36
|
+
var x = { key: 0 }, S = /* @__PURE__ */ u({
|
|
37
|
+
name: "LayoutForm",
|
|
38
|
+
__name: "LayoutForm",
|
|
39
|
+
props: {
|
|
40
|
+
modelValue: { default: { meta: { layout: {
|
|
41
|
+
header: !0,
|
|
42
|
+
sidebar: !0,
|
|
43
|
+
tabs: !0,
|
|
44
|
+
toolbar: !0
|
|
45
|
+
} } } },
|
|
46
|
+
modelModifiers: {}
|
|
47
|
+
},
|
|
48
|
+
emits: ["update:modelValue"],
|
|
49
|
+
setup(e) {
|
|
50
|
+
let { layoutForm: t, show: n } = b(p(e, "modelValue"));
|
|
51
|
+
return (e, i) => {
|
|
52
|
+
let u = g, p = y, b = _, S = h, C = v;
|
|
53
|
+
return f(n) ? (d(), o("div", x, [l(u, null, {
|
|
54
|
+
default: m(() => [...i[4] ||= [c("布局配置", -1)]]),
|
|
55
|
+
_: 1
|
|
56
|
+
}), l(C, { gutter: [8, 8] }, {
|
|
57
|
+
default: m(() => [
|
|
58
|
+
l(S, { span: 12 }, {
|
|
59
|
+
default: m(() => [l(b, {
|
|
60
|
+
name: "enable",
|
|
61
|
+
"label-col": { span: 0 }
|
|
62
|
+
}, {
|
|
63
|
+
default: m(() => [l(r, { class: "flex items-center justify-between" }, {
|
|
64
|
+
default: m(() => [i[5] ||= s("div", { class: "text-sm font-medium" }, " 显示 Header ", -1), l(p, {
|
|
65
|
+
checked: f(t).header,
|
|
66
|
+
"onUpdate:checked": i[0] ||= (e) => f(t).header = e
|
|
67
|
+
}, null, 8, ["checked"])]),
|
|
68
|
+
_: 1
|
|
69
|
+
})]),
|
|
70
|
+
_: 1
|
|
71
|
+
})]),
|
|
72
|
+
_: 1
|
|
73
|
+
}),
|
|
74
|
+
l(S, { span: 12 }, {
|
|
75
|
+
default: m(() => [l(b, {
|
|
76
|
+
name: "enable",
|
|
77
|
+
"label-col": { span: 0 }
|
|
78
|
+
}, {
|
|
79
|
+
default: m(() => [l(r, { class: "flex items-center justify-between" }, {
|
|
80
|
+
default: m(() => [i[6] ||= s("div", { class: "text-sm font-medium" }, " 显示 Sidebar ", -1), l(p, {
|
|
81
|
+
checked: f(t).sidebar,
|
|
82
|
+
"onUpdate:checked": i[1] ||= (e) => f(t).sidebar = e
|
|
83
|
+
}, null, 8, ["checked"])]),
|
|
84
|
+
_: 1
|
|
85
|
+
})]),
|
|
86
|
+
_: 1
|
|
87
|
+
})]),
|
|
88
|
+
_: 1
|
|
89
|
+
}),
|
|
90
|
+
l(S, { span: 12 }, {
|
|
91
|
+
default: m(() => [l(b, {
|
|
92
|
+
name: "enable",
|
|
93
|
+
"label-col": { span: 0 }
|
|
94
|
+
}, {
|
|
95
|
+
default: m(() => [l(r, { class: "flex items-center justify-between" }, {
|
|
96
|
+
default: m(() => [i[7] ||= s("div", { class: "text-sm font-medium" }, " 显示 Tabs ", -1), l(p, {
|
|
97
|
+
checked: f(t).tabs,
|
|
98
|
+
"onUpdate:checked": i[2] ||= (e) => f(t).tabs = e
|
|
99
|
+
}, null, 8, ["checked"])]),
|
|
100
|
+
_: 1
|
|
101
|
+
})]),
|
|
102
|
+
_: 1
|
|
103
|
+
})]),
|
|
104
|
+
_: 1
|
|
105
|
+
}),
|
|
106
|
+
l(S, { span: 12 }, {
|
|
107
|
+
default: m(() => [l(b, {
|
|
108
|
+
name: "enable",
|
|
109
|
+
"label-col": { span: 0 }
|
|
110
|
+
}, {
|
|
111
|
+
default: m(() => [l(r, { class: "flex items-center justify-between" }, {
|
|
112
|
+
default: m(() => [i[8] ||= s("div", { class: "text-sm font-medium" }, " 显示 Toolbar ", -1), l(p, {
|
|
113
|
+
checked: f(t).toolbar,
|
|
114
|
+
"onUpdate:checked": i[3] ||= (e) => f(t).toolbar = e
|
|
115
|
+
}, null, 8, ["checked"])]),
|
|
116
|
+
_: 1
|
|
117
|
+
})]),
|
|
118
|
+
_: 1
|
|
119
|
+
})]),
|
|
120
|
+
_: 1
|
|
121
|
+
})
|
|
122
|
+
]),
|
|
123
|
+
_: 1
|
|
124
|
+
})])) : a("", !0);
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}), C = /* @__PURE__ */ e({ default: () => w }), w = /* @__PURE__ */ t(S, [["__scopeId", "data-v-8c0e12f9"]]);
|
|
128
|
+
//#endregion
|
|
129
|
+
export { C as n, w as t };
|