@pubinfo-nightly/module-rbac 2025.11.14
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/LICENSE +21 -0
- package/dist/ComponentSelect-ZLey_5w7.js +4 -0
- package/dist/ComponentSelect.css +1 -0
- package/dist/ComponentSelect.vue_vue_type_style_index_0_lang-CMEO08Uz.js +3981 -0
- package/dist/DynamicRoutesForm-BU4EAISs.js +4 -0
- package/dist/DynamicRoutesForm.vue_vue_type_script_setup_true_lang-bEqJ03T_.js +179 -0
- package/dist/HCheckList-Dkxhu1br.js +4 -0
- package/dist/HCheckList.vue_vue_type_script_setup_true_lang-n_QczT28.js +41 -0
- package/dist/HoverCard-7agF2aDO.js +4 -0
- package/dist/HoverCard.vue_vue_type_script_setup_true_lang-DEScDCo1.js +62 -0
- package/dist/IconSelect-DtNpk3Rj.js +4 -0
- package/dist/IconSelect.css +1 -0
- package/dist/IconSelect.vue_vue_type_script_setup_true_lang-D450SiKg.js +757 -0
- package/dist/ImportExport-DAe_Sl13.js +4 -0
- package/dist/ImportExport.vue_vue_type_script_setup_true_lang-CV0DrMvw.js +456 -0
- package/dist/LayoutForm-Pv6UyKl3.js +173 -0
- package/dist/LayoutForm.css +1 -0
- package/dist/MetaForm-BMPtZc0g.js +42413 -0
- package/dist/MetaForm.css +1 -0
- package/dist/OrgAndPosition-R-YixdXG.js +4 -0
- package/dist/OrgAndPosition.vue_vue_type_script_setup_true_lang-jEjTok4n.js +195 -0
- package/dist/ResourceEdit-D59JUDvG.js +4 -0
- package/dist/ResourceEdit.vue_vue_type_script_setup_true_lang-IWn27Vz1.js +429 -0
- package/dist/ResourceRelation-CeM9Eq39.js +90 -0
- package/dist/ResourceRelation-qhIdXLAy.js +111 -0
- package/dist/ResourceRelation.css +1 -0
- package/dist/ResourceRelation2.css +1 -0
- package/dist/RoleRelation-BuqK0cnl.js +4 -0
- package/dist/RoleRelation.vue_vue_type_script_setup_true_lang-BjEOlM2g.js +93 -0
- package/dist/RoleSelector.vue_vue_type_script_setup_true_lang-ZwsINUBu.js +352 -0
- package/dist/TenantEdit-C61O1pSu.js +4 -0
- package/dist/TenantEdit.vue_vue_type_script_setup_true_lang-BwsA9hth.js +306 -0
- package/dist/UserAuthorization-Ch_iKzms.js +273 -0
- package/dist/UserAuthorization.css +1 -0
- package/dist/UserEdit-B1fnFcSC.js +4 -0
- package/dist/UserEdit.vue_vue_type_script_setup_true_lang-SIR1ZO_N.js +315 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/add-child-B9gDBQjZ.js +4 -0
- package/dist/animation_item-BZ1HNA6o.js +4 -0
- package/dist/animation_item.vue_vue_type_script_setup_true_lang-CmwThjHB.js +4858 -0
- package/dist/api/modules/assist/gonggaofuwu.d.ts +43 -0
- package/dist/api/modules/assist/index.d.ts +3 -0
- package/dist/api/modules/assist/qunzujiekou.d.ts +43 -0
- package/dist/api/modules/assist/quyujiekou.d.ts +36 -0
- package/dist/api/modules/configData/heibaimingdanfuwu.d.ts +36 -0
- package/dist/api/modules/configData/index.d.ts +3 -0
- package/dist/api/modules/configData/xitongpeizhifuwu.d.ts +99 -0
- package/dist/api/modules/configData/zidifuwu.d.ts +71 -0
- package/dist/api/modules/log/caozuorizhifuwu.d.ts +15 -0
- package/dist/api/modules/log/denglurizhifuwu.d.ts +15 -0
- package/dist/api/modules/log/index.d.ts +2 -0
- package/dist/api/modules/rbac/gangweijiekou.d.ts +43 -0
- package/dist/api/modules/rbac/index.d.ts +12 -0
- package/dist/api/modules/rbac/jiaosejiekou.d.ts +50 -0
- package/dist/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +50 -0
- package/dist/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +64 -0
- package/dist/api/modules/rbac/yonghujiekou.d.ts +106 -0
- package/dist/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +36 -0
- package/dist/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +29 -0
- package/dist/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.d.ts +43 -0
- package/dist/api/modules/rbac/ziyuanjiekou.d.ts +92 -0
- package/dist/api/modules/rbac/zuhuguanlijiekou.d.ts +36 -0
- package/dist/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +29 -0
- package/dist/api/modules/rbac/zuzhijiekou.d.ts +64 -0
- package/dist/api/request.d.ts +1 -0
- package/dist/authority-B-0S66Fv.js +4 -0
- package/dist/authorize-DnyYvAo3.js +4 -0
- package/dist/blacklist-disable-DzVU8JLV.js +4 -0
- package/dist/blacklist-enable-BmWQR1i4.js +4 -0
- package/dist/browser-chrome-O9MASusF.js +4 -0
- package/dist/browser-edge-Dk6N_uRy.js +4 -0
- package/dist/browser-ie-Dtz7hQTC.js +4 -0
- package/dist/browser-other-Crzi8vov.js +4 -0
- package/dist/browser-safari-DF0pVlrn.js +4 -0
- package/dist/browserType-DQySszjD.js +4 -0
- package/dist/browserType.vue_vue_type_script_setup_true_lang-od1-AmrS.js +32 -0
- package/dist/cloneDeep-BOLZdR62.js +8 -0
- package/dist/components/DirectoryIcones/ComponentsIcones.vue.d.ts +7 -0
- package/dist/components/DirectoryIcones/FolderIcones.vue.d.ts +7 -0
- package/dist/components/DirectoryIcones/ModuleIcones.vue.d.ts +7 -0
- package/dist/components/DirectoryIcones/PackagesIcones.vue.d.ts +7 -0
- package/dist/components/DirectoryIcones/SrcIcones.vue.d.ts +7 -0
- package/dist/components/DirectoryIcones/ViewIcones.vue.d.ts +7 -0
- package/dist/components/DirectoryIcones/VueIcones.vue.d.ts +2 -0
- package/dist/components/GroupSelector/index.vue.d.ts +15 -0
- package/dist/components/GroupSelector/interface.d.ts +6 -0
- package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +68 -0
- package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +72 -0
- package/dist/components/OrgUserSelector/index.d.ts +9 -0
- package/dist/components/OrgUserSelector/provider.d.ts +24 -0
- package/dist/components/ResourceIcones/BoxColorPicker.vue.d.ts +26 -0
- package/dist/components/ResourceIcones/Select.vue.d.ts +58 -0
- package/dist/components/ResourceSelector/enum.d.ts +5 -0
- package/dist/components/ResourceSelector/hooks/useAppAndResource.d.ts +29 -0
- package/dist/components/ResourceSelector/index.vue.d.ts +24 -0
- package/dist/components/RoleSelector/RoleSearch.vue.d.ts +19 -0
- package/dist/components/RoleSelector/RoleSelector.vue.d.ts +20 -0
- package/dist/components/RoleSelector/TooltipLabel.vue.d.ts +8 -0
- package/dist/components/RoleSelector/index.d.ts +2 -0
- package/dist/components/RoleSelector/interface.d.ts +4 -0
- package/dist/components/RoleSelector/useRole.d.ts +13 -0
- package/dist/composables/useLottie.d.ts +11 -0
- package/dist/composables/useWebSocketManager.d.ts +8 -0
- package/dist/context.d.ts +2 -0
- package/dist/createAndEditDataPermission-DPeFulie.js +4 -0
- package/dist/createAndEditDataPermission.css +1 -0
- package/dist/createAndEditDataPermission.vue_vue_type_script_setup_true_lang-DlUIYtif.js +528 -0
- package/dist/dayjs.min-B2Yn1Frg.js +284 -0
- package/dist/drawerBlackWhiteList-eWyKScZN.js +4 -0
- package/dist/drawerBlackWhiteList.vue_vue_type_script_setup_true_lang-CNBKo3Jg.js +173 -0
- package/dist/drawerDictionary-BRGmcIFT.js +4 -0
- package/dist/drawerDictionary.vue_vue_type_script_setup_true_lang-0zsptmrP.js +146 -0
- package/dist/drawerDictionaryItem-CFBfyhEw.js +4 -0
- package/dist/drawerDictionaryItem.vue_vue_type_script_setup_true_lang-DeJblyyZ.js +158 -0
- package/dist/drawerGroup-Bs1Z8XPo.js +4 -0
- package/dist/drawerGroup.vue_vue_type_script_setup_true_lang-ClG-M0Ru.js +202 -0
- package/dist/drawerOrganization-Bs0YtPuo.js +4 -0
- package/dist/drawerOrganization.vue_vue_type_script_setup_true_lang-5YJaULAh.js +250 -0
- package/dist/drawerPosition-BA_gLotd.js +4 -0
- package/dist/drawerPosition.vue_vue_type_script_setup_true_lang-ZqfbI05C.js +181 -0
- package/dist/drawerRegion-CauOP4lh.js +4 -0
- package/dist/drawerRegion.vue_vue_type_script_setup_true_lang-DeL9jV-P.js +235 -0
- package/dist/drawerRole-CXGVqxPX.js +4 -0
- package/dist/drawerRole-CfJjf3v_.js +4 -0
- package/dist/drawerRole-nmMTIQYS.js +4 -0
- package/dist/drawerRole.vue_vue_type_script_setup_true_lang-B-VZS3gq.js +243 -0
- package/dist/drawerRole.vue_vue_type_script_setup_true_lang-B1eT0e_Q.js +197 -0
- package/dist/drawerRole.vue_vue_type_script_setup_true_lang-Surpf3ov.js +191 -0
- package/dist/edit-B69fMWPH.js +4 -0
- package/dist/enum-C9ihxJe7.js +4 -0
- package/dist/enum-D5iPiZiT.js +17 -0
- package/dist/enum-DDKThkSw.js +24 -0
- package/dist/enum-DkSNwGbC.js +74 -0
- package/dist/gangweijiekou-CUGlx4Ni.js +48 -0
- package/dist/icard-C4FaIC0V.js +4 -0
- package/dist/icon_animation-CfRxn8ne.js +4 -0
- package/dist/icon_breadcrumb-CAPCH16K.js +4 -0
- package/dist/icon_copyright-T9HuRtib.js +4 -0
- package/dist/icon_jt-BZgxEG_D.js +4 -0
- package/dist/icon_layout-BynQzkfn.js +4 -0
- package/dist/icon_mainpage-Bu_lyj_6.js +4 -0
- package/dist/icon_menu-D41hl_4p.js +4 -0
- package/dist/icon_page_size-Bioi61il.js +4 -0
- package/dist/icon_position_type-QpezzPDJ.js +4 -0
- package/dist/icon_safe_manage-ByWMOnwf.js +4 -0
- package/dist/icon_screen_scale-CuPyb7Ni.js +4 -0
- package/dist/icon_system_manage-BxRLv7Nw.js +4 -0
- package/dist/icon_tabbar-CetwmJHN.js +4 -0
- package/dist/icon_toolbar-DXt_LXp8.js +4 -0
- package/dist/icon_topbar-C186yIiC.js +4 -0
- package/dist/icon_watermark-DhaloO3m.js +4 -0
- package/dist/index-B0zXLUdu.js +350 -0
- package/dist/index-B5aP0re3.js +170 -0
- package/dist/index-BEB4liGe.js +151 -0
- package/dist/index-BNwGLzXe.js +168 -0
- package/dist/index-BXvJhqJD.js +97 -0
- package/dist/index-BhZNbJp6.js +189 -0
- package/dist/index-Bm3WQuJD.js +226 -0
- package/dist/index-C2G4xRrJ.js +144 -0
- package/dist/index-C5WD-YUu.js +246 -0
- package/dist/index-CJQB8KAz.js +186 -0
- package/dist/index-CLnFLvHy.js +193 -0
- package/dist/index-CbVJdR5M.js +194 -0
- package/dist/index-ChWnVs6j.js +196 -0
- package/dist/index-CoZM8pyH.js +197 -0
- package/dist/index-Copy5kiW.js +17701 -0
- package/dist/index-D3Xw_aOi.js +144 -0
- package/dist/index-DHVEXch0.js +253 -0
- package/dist/index-DQhQqT_Z.js +269 -0
- package/dist/index-Dl0hWfIE.js +118 -0
- package/dist/index-En8oOf9e.js +168 -0
- package/dist/index-VZuizuKs.js +257 -0
- package/dist/index-XhYtVVT9.js +88 -0
- package/dist/index-iBmBJd50.js +181 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +7496 -0
- package/dist/index10.css +1 -0
- package/dist/index11.css +1 -0
- package/dist/index12.css +1 -0
- package/dist/index13.css +1 -0
- package/dist/index14.css +1 -0
- package/dist/index15.css +1 -0
- package/dist/index16.css +1 -0
- package/dist/index17.css +1 -0
- package/dist/index2.css +1 -0
- package/dist/index3.css +1 -0
- package/dist/index4.css +1 -0
- package/dist/index5.css +1 -0
- package/dist/index6.css +1 -0
- package/dist/index7.css +1 -0
- package/dist/index8.css +1 -0
- package/dist/index9.css +1 -0
- package/dist/interface.d.ts +71 -0
- package/dist/isEmpty-BgDIb4aS.js +20 -0
- package/dist/itemlist-zTYJtoSs.js +172 -0
- package/dist/jiaosejiekou-p42Hm9h3.js +58 -0
- package/dist/log-center-Bw9UlmOq.js +4 -0
- package/dist/loginHistoryDetail-BZVwG8m2.js +105 -0
- package/dist/loginHistoryDetail.css +1 -0
- package/dist/login_history-CMZGS2PN.js +221 -0
- package/dist/login_history.css +1 -0
- package/dist/not-data-BDuvYboz.js +4 -0
- package/dist/operateHistoryDetail-Badx3zl-.js +123 -0
- package/dist/operateHistoryDetail.css +1 -0
- package/dist/operate_history-B42WNY1u.js +217 -0
- package/dist/operate_history.css +1 -0
- package/dist/org-main-DfWpX8Wv.js +4 -0
- package/dist/org-unmain-DrX63NH5.js +4 -0
- package/dist/remove-D2ES5tEr.js +4 -0
- package/dist/resource-app-1lqF6C6F.js +4 -0
- package/dist/resource-btn-Cfo6ddAY.js +4 -0
- package/dist/resource-dynamic-BAwkCWS4.js +4 -0
- package/dist/resource-index-BS4V5uy8.js +4 -0
- package/dist/resource-menu-CEWU8Iis.js +4 -0
- package/dist/resource-micro-9S0h5AlK.js +4 -0
- package/dist/resource-nonmenu-BZ9e4ynT.js +4 -0
- package/dist/routes/index.d.ts +16 -0
- package/dist/routes/modules/authority.manage.menu.d.ts +3 -0
- package/dist/routes/modules/log.manage.menu.d.ts +3 -0
- package/dist/routes/modules/safe.manage.menu.d.ts +3 -0
- package/dist/routes/modules/stylesetting.manage.menu.d.ts +3 -0
- package/dist/routes/modules/system.manage.menu.d.ts +3 -0
- package/dist/setItem-Blb3dox4.js +87 -0
- package/dist/setItem.css +1 -0
- package/dist/setting-manage-Xj_s0OoK.js +4 -0
- package/dist/shujuquanxianzhubiaokongzhiqi-SpN37fyO.js +65 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/view.d.ts +56 -0
- package/dist/theme-check-mark-D58efagJ.js +4 -0
- package/dist/theme-title-CYUX2SBW.js +4 -0
- package/dist/useAppAndResource-DDywX2iz.js +54 -0
- package/dist/utils/dict.d.ts +6 -0
- package/dist/utils/routeSystem.d.ts +55 -0
- package/dist/utils/validateObjectStructure.d.ts +11 -0
- package/dist/vanilla-picker-BAEwS4Fy.js +536 -0
- package/dist/view-BCWU0JWM.js +4 -0
- package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +14 -0
- package/dist/views/blackWhiteList/enum.d.ts +7 -0
- package/dist/views/blackWhiteList/index.vue.d.ts +1535 -0
- package/dist/views/blackWhiteList/types.d.ts +4 -0
- package/dist/views/breadcrumb_setting/animationData.d.ts +7 -0
- package/dist/views/breadcrumb_setting/index.vue.d.ts +2 -0
- package/dist/views/components/HCheckList.vue.d.ts +20 -0
- package/dist/views/components/animation_item.vue.d.ts +14 -0
- package/dist/views/components/setItem.vue.d.ts +61 -0
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +172 -0
- package/dist/views/data-permission/enum.d.ts +34 -0
- package/dist/views/data-permission/index.vue.d.ts +1691 -0
- package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +12 -0
- package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +12 -0
- package/dist/views/dictionary/enum.d.ts +8 -0
- package/dist/views/dictionary/index.vue.d.ts +1532 -0
- package/dist/views/dictionary/itemlist.vue.d.ts +1532 -0
- package/dist/views/group/components/drawerGroup.vue.d.ts +12 -0
- package/dist/views/group/enum.d.ts +21 -0
- package/dist/views/group/index.vue.d.ts +1532 -0
- package/dist/views/layout_setting/index.vue.d.ts +2 -0
- package/dist/views/log_center/components/browserType.vue.d.ts +12 -0
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +14 -0
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +14 -0
- package/dist/views/log_center/login_history.vue.d.ts +1511 -0
- package/dist/views/log_center/operate_history.vue.d.ts +1511 -0
- package/dist/views/menu_setting/animationData.d.ts +13 -0
- package/dist/views/menu_setting/index.vue.d.ts +2 -0
- package/dist/views/organization/components/drawerOrganization.vue.d.ts +12 -0
- package/dist/views/organization/components/drawerRole.vue.d.ts +44 -0
- package/dist/views/organization/enum.d.ts +25 -0
- package/dist/views/organization/index.vue.d.ts +81 -0
- package/dist/views/other_setting/animationData.d.ts +7 -0
- package/dist/views/other_setting/index.vue.d.ts +2 -0
- package/dist/views/other_setting/interface.d.ts +23 -0
- package/dist/views/page_animation_setting/animationData.d.ts +11 -0
- package/dist/views/page_animation_setting/index.vue.d.ts +2 -0
- package/dist/views/page_w_setting/index.vue.d.ts +2 -0
- package/dist/views/position/components/drawerPosition.vue.d.ts +12 -0
- package/dist/views/position/enum.d.ts +8 -0
- package/dist/views/position/index.vue.d.ts +1532 -0
- package/dist/views/region/components/drawerRegion.vue.d.ts +12 -0
- package/dist/views/region/enum.d.ts +22 -0
- package/dist/views/region/index.vue.d.ts +1533 -0
- package/dist/views/resource/components/ComponentSelect.vue.d.ts +14 -0
- package/dist/views/resource/components/DynamicRoutesForm.vue.d.ts +13 -0
- package/dist/views/resource/components/HoverCard.vue.d.ts +21 -0
- package/dist/views/resource/components/IconSelect.vue.d.ts +10 -0
- package/dist/views/resource/components/ImportExport.vue.d.ts +13 -0
- package/dist/views/resource/components/LayoutForm.vue.d.ts +10 -0
- package/dist/views/resource/components/MetaForm.vue.d.ts +10 -0
- package/dist/views/resource/components/ResourceEdit.vue.d.ts +16 -0
- package/dist/views/resource/components/RoleRelation.vue.d.ts +6 -0
- package/dist/views/resource/enum.d.ts +23 -0
- package/dist/views/resource/hooks/useLayoutForm.d.ts +12 -0
- package/dist/views/resource/hooks/useMetaForm.d.ts +6 -0
- package/dist/views/resource/index.vue.d.ts +1571 -0
- package/dist/views/resource/interface.d.ts +9 -0
- package/dist/views/resource/model.d.ts +53 -0
- package/dist/views/role/components/ResourceRelation.vue.d.ts +1515 -0
- package/dist/views/role/components/drawerRole.vue.d.ts +49 -0
- package/dist/views/role/enum.d.ts +25 -0
- package/dist/views/role/index.vue.d.ts +3090 -0
- package/dist/views/role/interface.d.ts +6 -0
- package/dist/views/role_group/components/drawerRole.vue.d.ts +45 -0
- package/dist/views/role_group/enum.d.ts +21 -0
- package/dist/views/role_group/index.vue.d.ts +1565 -0
- package/dist/views/role_group/interface.d.ts +6 -0
- package/dist/views/safe_setting/index.vue.d.ts +4 -0
- package/dist/views/tabbar_setting/animationData.d.ts +11 -0
- package/dist/views/tabbar_setting/index.vue.d.ts +2 -0
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +14 -0
- package/dist/views/tenant/enum.d.ts +7 -0
- package/dist/views/tenant/index.vue.d.ts +1534 -0
- package/dist/views/tenant/interface.d.ts +6 -0
- package/dist/views/theme_setting/index.vue.d.ts +2 -0
- package/dist/views/toolbar_setting/animationData.d.ts +15 -0
- package/dist/views/toolbar_setting/index.vue.d.ts +2 -0
- package/dist/views/user/components/OrgAndPosition.vue.d.ts +14 -0
- package/dist/views/user/components/UserAuthorization.vue.d.ts +47 -0
- package/dist/views/user/components/UserEdit.vue.d.ts +16 -0
- package/dist/views/user/enum.d.ts +13 -0
- package/dist/views/user/index.vue.d.ts +1594 -0
- package/dist/views/user/interface.d.ts +39 -0
- package/dist/views/watermark_setting/animationData.d.ts +3 -0
- package/dist/views/watermark_setting/index.vue.d.ts +31 -0
- package/dist/xitongpeizhifuwu-BoCbGEk7.js +23 -0
- package/dist/zddata-DQP5Kx3c.js +4 -0
- package/dist/ziyuanjiekou-BC65-bFK.js +69 -0
- package/dist/zuzhijiaosebiaokongzhiqi-Cj4ZjkfZ.js +28 -0
- package/dist/zy_checked-Bb6zRsYe.js +4 -0
- package/dist/zy_default-BGjhoury.js +4 -0
- package/package.json +59 -0
- package/src/api/modules/assist/gonggaofuwu.ts +124 -0
- package/src/api/modules/assist/index.ts +3 -0
- package/src/api/modules/assist/qunzujiekou.ts +128 -0
- package/src/api/modules/assist/quyujiekou.ts +108 -0
- package/src/api/modules/assist/typings.d.ts +368 -0
- package/src/api/modules/configData/heibaimingdanfuwu.ts +106 -0
- package/src/api/modules/configData/index.ts +3 -0
- package/src/api/modules/configData/typings.d.ts +357 -0
- package/src/api/modules/configData/xitongpeizhifuwu.ts +346 -0
- package/src/api/modules/configData/zidifuwu.ts +227 -0
- package/src/api/modules/log/caozuorizhifuwu.ts +43 -0
- package/src/api/modules/log/denglurizhifuwu.ts +43 -0
- package/src/api/modules/log/index.ts +2 -0
- package/src/api/modules/log/typings.d.ts +183 -0
- package/src/api/modules/rbac/gangweijiekou.ts +132 -0
- package/src/api/modules/rbac/index.ts +12 -0
- package/src/api/modules/rbac/jiaosejiekou.ts +139 -0
- package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +152 -0
- package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +200 -0
- package/src/api/modules/rbac/typings.d.ts +2124 -0
- package/src/api/modules/rbac/yonghujiekou.ts +327 -0
- package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +110 -0
- package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +82 -0
- package/src/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.ts +158 -0
- package/src/api/modules/rbac/ziyuanjiekou.ts +262 -0
- package/src/api/modules/rbac/zuhuguanlijiekou.ts +100 -0
- package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +85 -0
- package/src/api/modules/rbac/zuzhijiekou.ts +189 -0
- package/src/api/request.ts +4 -0
- package/src/assets/icons/add-child.svg +1 -0
- package/src/assets/icons/authority.svg +1 -0
- package/src/assets/icons/authorize.svg +1 -0
- package/src/assets/icons/blacklist-disable.svg +1 -0
- package/src/assets/icons/blacklist-enable.svg +1 -0
- package/src/assets/icons/browser-chrome.svg +1 -0
- package/src/assets/icons/browser-edge.svg +1 -0
- package/src/assets/icons/browser-ie.svg +1 -0
- package/src/assets/icons/browser-other.svg +1 -0
- package/src/assets/icons/browser-safari.svg +1 -0
- package/src/assets/icons/edit.svg +1 -0
- package/src/assets/icons/icard.svg +1 -0
- package/src/assets/icons/icon_animation.svg +1 -0
- package/src/assets/icons/icon_breadcrumb.svg +1 -0
- package/src/assets/icons/icon_copyright.svg +1 -0
- package/src/assets/icons/icon_jt.svg +1 -0
- package/src/assets/icons/icon_layout.svg +1 -0
- package/src/assets/icons/icon_mainpage.svg +1 -0
- package/src/assets/icons/icon_menu.svg +1 -0
- package/src/assets/icons/icon_page_size.svg +1 -0
- package/src/assets/icons/icon_position_type.svg +1 -0
- package/src/assets/icons/icon_safe_manage.svg +1 -0
- package/src/assets/icons/icon_screen_scale.svg +6 -0
- package/src/assets/icons/icon_system_manage.svg +1 -0
- package/src/assets/icons/icon_tabbar.svg +1 -0
- package/src/assets/icons/icon_toolbar.svg +1 -0
- package/src/assets/icons/icon_topbar.svg +1 -0
- package/src/assets/icons/icon_watermark.svg +1 -0
- package/src/assets/icons/log-center.svg +1 -0
- package/src/assets/icons/not-data.svg +1 -0
- package/src/assets/icons/org-main.svg +1 -0
- package/src/assets/icons/org-unmain.svg +1 -0
- package/src/assets/icons/remove.svg +1 -0
- package/src/assets/icons/resource-app.svg +1 -0
- package/src/assets/icons/resource-btn.svg +1 -0
- package/src/assets/icons/resource-dynamic.svg +39 -0
- package/src/assets/icons/resource-index.svg +1 -0
- package/src/assets/icons/resource-menu.svg +1 -0
- package/src/assets/icons/resource-micro.svg +40 -0
- package/src/assets/icons/resource-nonmenu.svg +1 -0
- package/src/assets/icons/setting-manage.svg +1 -0
- package/src/assets/icons/theme-check-mark.svg +1 -0
- package/src/assets/icons/theme-title.svg +1 -0
- package/src/assets/icons/view.svg +1 -0
- package/src/assets/icons/zddata.svg +1 -0
- package/src/assets/icons/zy_checked.svg +1 -0
- package/src/assets/icons/zy_default.svg +1 -0
- package/src/assets/images/layout/item1.webp +0 -0
- package/src/assets/images/layout/item1_dark.webp +0 -0
- package/src/assets/images/layout/item2.webp +0 -0
- package/src/assets/images/layout/item2_dark.webp +0 -0
- package/src/assets/images/layout/item3.webp +0 -0
- package/src/assets/images/layout/item3_dark.webp +0 -0
- package/src/assets/images/layout/item4.webp +0 -0
- package/src/assets/images/layout/item4_dark.webp +0 -0
- package/src/assets/images/layout/item5.webp +0 -0
- package/src/assets/images/layout/item5_dark.webp +0 -0
- package/src/assets/images/page-width/anto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/auto.webp +0 -0
- package/src/assets/images/page-width/auto_dark.webp +0 -0
- package/src/assets/images/page-width/auto_min_w.webp +0 -0
- package/src/assets/images/page-width/auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto.webp +0 -0
- package/src/assets/images/page-width/icon_auto_dark.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w.webp +0 -0
- package/src/assets/images/page-width/icon_auto_min_w_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle.webp +0 -0
- package/src/assets/images/page-width/icon_middle_dark.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w.webp +0 -0
- package/src/assets/images/page-width/icon_middle_max_w_dark.webp +0 -0
- package/src/assets/images/page-width/middle.webp +0 -0
- package/src/assets/images/page-width/middle_dark.webp +0 -0
- package/src/assets/images/page-width/middle_max_w.webp +0 -0
- package/src/assets/images/page-width/middle_max_w_dark.webp +0 -0
- package/src/assets/lottie/breadcrumb/dark/enable.json +1 -0
- package/src/assets/lottie/breadcrumb/dark/enableMainMenu.json +1 -0
- package/src/assets/lottie/breadcrumb/dark/style.json +1 -0
- package/src/assets/lottie/breadcrumb/light/enable.json +1 -0
- package/src/assets/lottie/breadcrumb/light/enableMainMenu.json +1 -0
- package/src/assets/lottie/breadcrumb/light/style.json +1 -0
- package/src/assets/lottie/layout/data-test.json +1 -0
- package/src/assets/lottie/layout/data.json +1 -0
- package/src/assets/lottie/menu/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/menu/dark/enableSubMenuCollapseButton.json +1 -0
- package/src/assets/lottie/menu/dark/isRounded.json +1 -0
- package/src/assets/lottie/menu/dark/menuActiveStyle.json +1 -0
- package/src/assets/lottie/menu/dark/subMenuCollapse.json +1 -0
- package/src/assets/lottie/menu/dark/subMenuUniqueOpened.json +1 -0
- package/src/assets/lottie/menu/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/menu/light/enableSubMenuCollapseButton.json +1 -0
- package/src/assets/lottie/menu/light/isRounded.json +1 -0
- package/src/assets/lottie/menu/light/menuActiveStyle.json +1 -0
- package/src/assets/lottie/menu/light/subMenuCollapse.json +1 -0
- package/src/assets/lottie/menu/light/subMenuUniqueOpened.json +1 -0
- package/src/assets/lottie/other/dark/enableCopyright.json +1 -0
- package/src/assets/lottie/other/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/other/dark/switchTabbarAndToolbar.json +1 -0
- package/src/assets/lottie/other/light/enableCopyright.json +1 -0
- package/src/assets/lottie/other/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/other/light/switchTabbarAndToolbar.json +1 -0
- package/src/assets/lottie/page_animation/dark/fadeinout.json +1 -0
- package/src/assets/lottie/page_animation/dark/fadeinout_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/tobottom.json +1 -0
- package/src/assets/lottie/page_animation/dark/tobottom_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/toleft.json +1 -0
- package/src/assets/lottie/page_animation/dark/toleft_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/toright.json +1 -0
- package/src/assets/lottie/page_animation/dark/toright_old.json +1 -0
- package/src/assets/lottie/page_animation/dark/totop.json +1 -0
- package/src/assets/lottie/page_animation/dark/totop_old.json +1 -0
- package/src/assets/lottie/page_animation/light/fadeinout.json +1 -0
- package/src/assets/lottie/page_animation/light/tobottom.json +1 -0
- package/src/assets/lottie/page_animation/light/toleft.json +1 -0
- package/src/assets/lottie/page_animation/light/toright.json +1 -0
- package/src/assets/lottie/page_animation/light/totop.json +1 -0
- package/src/assets/lottie/tabbar/dark/enable.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableHotkeys.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableIcon.json +1 -0
- package/src/assets/lottie/tabbar/dark/enableMemory.json +1 -0
- package/src/assets/lottie/tabbar/dark/style.json +1 -0
- package/src/assets/lottie/tabbar/light/enable.json +1 -0
- package/src/assets/lottie/tabbar/light/enableHotkeys.json +1 -0
- package/src/assets/lottie/tabbar/light/enableIcon.json +1 -0
- package/src/assets/lottie/tabbar/light/enableMemory.json +1 -0
- package/src/assets/lottie/tabbar/light/style.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableColorScheme.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableFullscreen.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableI18n.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableNotification.json +1 -0
- package/src/assets/lottie/toolbar/dark/enablePageReload.json +1 -0
- package/src/assets/lottie/toolbar/dark/enableUserPreferences.json +1 -0
- package/src/assets/lottie/toolbar/dark/navSearchEnable.json +1 -0
- package/src/assets/lottie/toolbar/dark/navSearchEnableHotkeys.json +1 -0
- package/src/assets/lottie/toolbar/light/enableColorScheme.json +1 -0
- package/src/assets/lottie/toolbar/light/enableFullscreen.json +1 -0
- package/src/assets/lottie/toolbar/light/enableI18n.json +1 -0
- package/src/assets/lottie/toolbar/light/enableNotification.json +1 -0
- package/src/assets/lottie/toolbar/light/enablePageReload.json +1 -0
- package/src/assets/lottie/toolbar/light/enableUserPreferences.json +1 -0
- package/src/assets/lottie/toolbar/light/navSearchEnable.json +1 -0
- package/src/assets/lottie/toolbar/light/navSearchEnableHotkeys.json +1 -0
- package/src/assets/lottie/watermark/dark/enableWatermark.json +1 -0
- package/src/assets/lottie/watermark/light/enableWatermark.json +1 -0
- package/src/assets/styles/vxe-table.css +13 -0
- package/src/components/DirectoryIcones/ComponentsIcones.vue +18 -0
- package/src/components/DirectoryIcones/FolderIcones.vue +18 -0
- package/src/components/DirectoryIcones/ModuleIcones.vue +18 -0
- package/src/components/DirectoryIcones/PackagesIcones.vue +18 -0
- package/src/components/DirectoryIcones/SrcIcones.vue +18 -0
- package/src/components/DirectoryIcones/ViewIcones.vue +18 -0
- package/src/components/DirectoryIcones/VueIcones.vue +9 -0
- package/src/components/GroupSelector/index.vue +280 -0
- package/src/components/GroupSelector/interface.ts +6 -0
- package/src/components/JsonEditorModal/index.vue +59 -0
- package/src/components/OrgTree/index.vue +91 -0
- package/src/components/OrgUserSelector/OrgSelector.vue +135 -0
- package/src/components/OrgUserSelector/UserSelector.vue +164 -0
- package/src/components/OrgUserSelector/index.ts +52 -0
- package/src/components/OrgUserSelector/provider.ts +373 -0
- package/src/components/ResourceIcones/BoxColorPicker.vue +228 -0
- package/src/components/ResourceIcones/Select.vue +474 -0
- package/src/components/ResourceSelector/enum.ts +5 -0
- package/src/components/ResourceSelector/hooks/useAppAndResource.ts +96 -0
- package/src/components/ResourceSelector/index.vue +414 -0
- package/src/components/RoleSelector/RoleSearch.vue +60 -0
- package/src/components/RoleSelector/RoleSelector.vue +174 -0
- package/src/components/RoleSelector/TooltipLabel.vue +24 -0
- package/src/components/RoleSelector/index.ts +2 -0
- package/src/components/RoleSelector/interface.ts +4 -0
- package/src/components/RoleSelector/useRole.ts +56 -0
- package/src/composables/useLottie.ts +65 -0
- package/src/composables/useWebSocketManager.ts +103 -0
- package/src/context.ts +4 -0
- package/src/index.ts +51 -0
- package/src/interface.ts +83 -0
- package/src/routes/index.ts +160 -0
- package/src/routes/modules/authority.manage.menu.ts +92 -0
- package/src/routes/modules/log.manage.menu.ts +37 -0
- package/src/routes/modules/safe.manage.menu.ts +59 -0
- package/src/routes/modules/stylesetting.manage.menu.ts +114 -0
- package/src/routes/modules/system.manage.menu.ts +82 -0
- package/src/stores/index.ts +1 -0
- package/src/stores/view.ts +292 -0
- package/src/utils/dict.ts +21 -0
- package/src/utils/routeSystem.ts +53 -0
- package/src/utils/validateObjectStructure.ts +47 -0
- package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +132 -0
- package/src/views/blackWhiteList/enum.ts +7 -0
- package/src/views/blackWhiteList/index.vue +297 -0
- package/src/views/blackWhiteList/types.ts +4 -0
- package/src/views/breadcrumb_setting/animationData.ts +15 -0
- package/src/views/breadcrumb_setting/index.vue +147 -0
- package/src/views/components/HCheckList.vue +47 -0
- package/src/views/components/animation_item.vue +37 -0
- package/src/views/components/setItem.vue +119 -0
- package/src/views/data-permission/components/createAndEditDataPermission.vue +354 -0
- package/src/views/data-permission/enum.ts +59 -0
- package/src/views/data-permission/index.vue +187 -0
- package/src/views/dictionary/components/drawerDictionary.vue +108 -0
- package/src/views/dictionary/components/drawerDictionaryItem.vue +115 -0
- package/src/views/dictionary/enum.ts +8 -0
- package/src/views/dictionary/index.vue +194 -0
- package/src/views/dictionary/itemlist.vue +164 -0
- package/src/views/group/components/drawerGroup.vue +177 -0
- package/src/views/group/enum.ts +25 -0
- package/src/views/group/index.vue +202 -0
- package/src/views/layout_setting/index.vue +296 -0
- package/src/views/log_center/components/browserType.vue +35 -0
- package/src/views/log_center/components/loginHistoryDetail.vue +69 -0
- package/src/views/log_center/components/operateHistoryDetail.vue +78 -0
- package/src/views/log_center/login_history.vue +234 -0
- package/src/views/log_center/operate_history.vue +228 -0
- package/src/views/menu_setting/animationData.ts +27 -0
- package/src/views/menu_setting/index.vue +207 -0
- package/src/views/organization/components/drawerOrganization.vue +161 -0
- package/src/views/organization/components/drawerRole.vue +161 -0
- package/src/views/organization/enum.ts +26 -0
- package/src/views/organization/index.vue +497 -0
- package/src/views/other_setting/animationData.ts +15 -0
- package/src/views/other_setting/index.vue +250 -0
- package/src/views/other_setting/interface.ts +26 -0
- package/src/views/page_animation_setting/animationData.ts +23 -0
- package/src/views/page_animation_setting/index.vue +192 -0
- package/src/views/page_w_setting/index.vue +255 -0
- package/src/views/position/components/drawerPosition.vue +131 -0
- package/src/views/position/enum.ts +8 -0
- package/src/views/position/index.vue +167 -0
- package/src/views/region/components/drawerRegion.vue +143 -0
- package/src/views/region/enum.ts +24 -0
- package/src/views/region/index.vue +246 -0
- package/src/views/resource/components/ComponentSelect.vue +303 -0
- package/src/views/resource/components/DynamicRoutesForm.vue +84 -0
- package/src/views/resource/components/HoverCard.vue +62 -0
- package/src/views/resource/components/IconSelect.vue +188 -0
- package/src/views/resource/components/ImportExport.vue +313 -0
- package/src/views/resource/components/LayoutForm.vue +92 -0
- package/src/views/resource/components/MetaForm.vue +216 -0
- package/src/views/resource/components/ResourceEdit.vue +331 -0
- package/src/views/resource/components/RoleRelation.vue +100 -0
- package/src/views/resource/enum.ts +33 -0
- package/src/views/resource/hooks/useLayoutForm.ts +57 -0
- package/src/views/resource/hooks/useMetaForm.ts +130 -0
- package/src/views/resource/index.vue +261 -0
- package/src/views/resource/interface.ts +10 -0
- package/src/views/resource/model.ts +81 -0
- package/src/views/role/components/ResourceRelation.vue +112 -0
- package/src/views/role/components/drawerRole.vue +191 -0
- package/src/views/role/enum.ts +26 -0
- package/src/views/role/index.vue +183 -0
- package/src/views/role/interface.ts +6 -0
- package/src/views/role_group/components/ResourceRelation.vue +90 -0
- package/src/views/role_group/components/drawerRole.vue +154 -0
- package/src/views/role_group/enum.ts +22 -0
- package/src/views/role_group/index.vue +170 -0
- package/src/views/role_group/interface.ts +6 -0
- package/src/views/safe_setting/index.vue +235 -0
- package/src/views/tabbar_setting/animationData.ts +23 -0
- package/src/views/tabbar_setting/index.vue +186 -0
- package/src/views/tenant/components/TenantEdit.vue +219 -0
- package/src/views/tenant/enum.ts +7 -0
- package/src/views/tenant/index.vue +185 -0
- package/src/views/tenant/interface.ts +4 -0
- package/src/views/theme_setting/index.vue +436 -0
- package/src/views/toolbar_setting/animationData.ts +38 -0
- package/src/views/toolbar_setting/index.vue +176 -0
- package/src/views/user/components/OrgAndPosition.vue +156 -0
- package/src/views/user/components/UserAuthorization.vue +261 -0
- package/src/views/user/components/UserEdit.vue +267 -0
- package/src/views/user/enum.ts +13 -0
- package/src/views/user/index.vue +266 -0
- package/src/views/user/interface.ts +43 -0
- package/src/views/watermark_setting/animationData.ts +7 -0
- package/src/views/watermark_setting/index.vue +229 -0
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import * as AntdIcons from '@ant-design/icons-vue';
|
|
3
|
+
import { Empty } from 'ant-design-vue';
|
|
4
|
+
import { getAllIconModules, PubinfoIcon } from 'pubinfo-nightly';
|
|
5
|
+
import { computed, ref, watch } from 'vue';
|
|
6
|
+
import ResourceIconesBoxColorPicker from './BoxColorPicker.vue';
|
|
7
|
+
|
|
8
|
+
defineOptions({ name: 'ResourceIconesSelect' });
|
|
9
|
+
|
|
10
|
+
// v-model(对外的值)
|
|
11
|
+
const modelValueRef = defineModel<string>();
|
|
12
|
+
// 额外样式参数的多路 v-model:边框(boxType)、角度(angle)、背景(background)、圆角(radius)、图标色(iconColor)
|
|
13
|
+
const modelBoxType = defineModel<'null' | 'square' | 'prism'>('boxType', { default: 'null' });
|
|
14
|
+
const modelAngle = defineModel<number | string>('angle', { default: 65 });
|
|
15
|
+
const modelBackground = defineModel<string | { from: string, to: string }>('background', { default: { from: '#65E54A', to: '#35C724' } });
|
|
16
|
+
// 圆角使用百分比,默认 50%
|
|
17
|
+
const modelRadius = defineModel<number | string>('radius', { default: '50%' });
|
|
18
|
+
const modelIconColor = defineModel<string>('iconColor', { default: '' });
|
|
19
|
+
// 图标大小(百分比或 CSS 长度),默认 50%
|
|
20
|
+
const modelIconSize = defineModel<number | string>('iconSize', { default: '50%' });
|
|
21
|
+
// 对话框内部临时选择值(仅在点击确定时写回到 v-model)
|
|
22
|
+
const tempValueRef = ref<string | undefined>(modelValueRef.value);
|
|
23
|
+
// 对话框内部样式状态
|
|
24
|
+
const boxType = ref<'null' | 'square' | 'prism'>(modelBoxType.value || 'null');
|
|
25
|
+
const boxAngle = ref<number | string>(modelAngle.value ?? 65);
|
|
26
|
+
const boxBackground = ref<string | { from: string, to: string }>(modelBackground.value ?? { from: '#65E54A', to: '#35C724' });
|
|
27
|
+
const boxRadius = ref<number | string>(modelRadius.value ?? '50%');
|
|
28
|
+
const boxIconSize = ref<number | string>(modelIconSize.value ?? '50%');
|
|
29
|
+
// 图标颜色:无背景默认不着色(空字符串表示未设置);有背景默认白色
|
|
30
|
+
const iconColor = ref<string>(modelIconColor.value ?? '');
|
|
31
|
+
const iconColorPickerRef = ref<HTMLInputElement | null>(null);
|
|
32
|
+
|
|
33
|
+
// 弹窗
|
|
34
|
+
const visibleRef = ref(false);
|
|
35
|
+
function handleOpenModal() {
|
|
36
|
+
// 打开时同步一次外部值到临时值,避免未确认的变更影响外部
|
|
37
|
+
tempValueRef.value = modelValueRef.value;
|
|
38
|
+
// 同步样式参数到对话框内部状态
|
|
39
|
+
boxType.value = modelBoxType.value || 'null';
|
|
40
|
+
boxAngle.value = modelAngle.value ?? 65;
|
|
41
|
+
// 深拷贝背景,避免未确认时影响外部,同时确保确认时能产生新引用
|
|
42
|
+
const bg = modelBackground.value;
|
|
43
|
+
boxBackground.value = typeof bg === 'string'
|
|
44
|
+
? bg
|
|
45
|
+
: (bg ? { ...(bg as any) } : { from: '#65E54A', to: '#35C724' });
|
|
46
|
+
boxRadius.value = modelRadius.value ?? '50%';
|
|
47
|
+
boxIconSize.value = modelIconSize.value ?? '50%';
|
|
48
|
+
iconColor.value = modelIconColor.value ?? '';
|
|
49
|
+
visibleRef.value = true;
|
|
50
|
+
}
|
|
51
|
+
function handleClose() {
|
|
52
|
+
visibleRef.value = false;
|
|
53
|
+
}
|
|
54
|
+
function handleConfirm() {
|
|
55
|
+
// 将临时值写回 v-model,再关闭弹窗
|
|
56
|
+
modelValueRef.value = tempValueRef.value as any;
|
|
57
|
+
// 回写样式参数
|
|
58
|
+
modelBoxType.value = boxType.value;
|
|
59
|
+
modelAngle.value = boxAngle.value;
|
|
60
|
+
// 使用新对象引用写回,确保仅背景变化也会触发更新
|
|
61
|
+
const bg2 = boxBackground.value as any;
|
|
62
|
+
modelBackground.value = typeof bg2 === 'string' ? bg2 : (bg2 ? { ...bg2 } : bg2);
|
|
63
|
+
modelRadius.value = boxRadius.value;
|
|
64
|
+
modelIconSize.value = boxIconSize.value;
|
|
65
|
+
modelIconColor.value = iconColor.value;
|
|
66
|
+
visibleRef.value = false;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 基础数据
|
|
70
|
+
interface IconItem { name: string, module?: string }
|
|
71
|
+
|
|
72
|
+
// 提取文件名(去后缀)
|
|
73
|
+
function extractName(path: string) {
|
|
74
|
+
const seg = path.split(/[\\/]/).pop() || path;
|
|
75
|
+
return seg.replace(/\.(svg|png|jpe?g)$/i, '');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 资产图标模块 -> 图标列表 (Map 迭代)
|
|
79
|
+
const moduleIconMap = computed(() => {
|
|
80
|
+
const m = new Map<string, string[]>();
|
|
81
|
+
const all = getAllIconModules();
|
|
82
|
+
for (const [mod, record] of all.entries()) {
|
|
83
|
+
const arr = Object.keys(record)
|
|
84
|
+
.map(extractName)
|
|
85
|
+
.sort();
|
|
86
|
+
m.set(mod, arr);
|
|
87
|
+
}
|
|
88
|
+
return m;
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// AntD 图标(带前缀 antd:)
|
|
92
|
+
const antdIcons = computed<string[]>(() => Object.keys(AntdIcons)
|
|
93
|
+
.filter(n => /(?:Outlined|Filled|TwoTone)$/.test(n))
|
|
94
|
+
.map(n => `antd:${n}`)
|
|
95
|
+
.sort(),
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
// 模块列表(全部 + 本地(local) 优先 + 其余模块 + Ant Design)
|
|
99
|
+
const moduleOptions = computed(() => {
|
|
100
|
+
const keys = Array.from(moduleIconMap.value.keys());
|
|
101
|
+
const hasLocal = keys.includes('local');
|
|
102
|
+
const others = keys.filter(k => k !== 'local').sort();
|
|
103
|
+
return [
|
|
104
|
+
{ label: '全部', value: 'all' },
|
|
105
|
+
...(hasLocal ? [{ label: '本地', value: 'local' }] : []),
|
|
106
|
+
...others.map(v => ({ label: v, value: v })),
|
|
107
|
+
{ label: 'Ant Design', value: 'antd' },
|
|
108
|
+
];
|
|
109
|
+
});
|
|
110
|
+
const activeModule = ref('all');
|
|
111
|
+
|
|
112
|
+
// 搜索关键字
|
|
113
|
+
const keyword = ref('');
|
|
114
|
+
|
|
115
|
+
// 所有图标集合
|
|
116
|
+
const allIcons = computed<IconItem[]>(() => {
|
|
117
|
+
const list: IconItem[] = [];
|
|
118
|
+
for (const [mod, arr] of moduleIconMap.value.entries()) {
|
|
119
|
+
arr.forEach((n) => {
|
|
120
|
+
if (mod === 'local') {
|
|
121
|
+
list.push({ name: n, module: mod });
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
list.push({ name: `${mod}-[${n}]`, module: mod });
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
antdIcons.value.forEach(n => list.push({ name: n, module: 'antd' }));
|
|
129
|
+
return list;
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// 模块过滤
|
|
133
|
+
const moduleFiltered = computed(() => {
|
|
134
|
+
if (activeModule.value === 'all') {
|
|
135
|
+
return allIcons.value;
|
|
136
|
+
}
|
|
137
|
+
if (activeModule.value === 'antd') {
|
|
138
|
+
return allIcons.value.filter(i => i.module === 'antd');
|
|
139
|
+
}
|
|
140
|
+
return allIcons.value.filter(i => i.module === activeModule.value);
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
// 搜索过滤(名称包含)
|
|
144
|
+
const filtered = computed(() => {
|
|
145
|
+
const k = keyword.value.trim().toLowerCase();
|
|
146
|
+
if (!k) {
|
|
147
|
+
return moduleFiltered.value;
|
|
148
|
+
}
|
|
149
|
+
return moduleFiltered.value.filter(i => i.name.toLowerCase().includes(k));
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// 计数
|
|
153
|
+
function moduleCount(val: string) {
|
|
154
|
+
if (val === 'all') {
|
|
155
|
+
return allIcons.value.length;
|
|
156
|
+
}
|
|
157
|
+
if (val === 'antd') {
|
|
158
|
+
return allIcons.value.filter(i => i.module === 'antd').length;
|
|
159
|
+
}
|
|
160
|
+
return allIcons.value.filter(i => i.module === val).length;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// 分页 (30/页)
|
|
164
|
+
const pageSize = 30;
|
|
165
|
+
const currentPage = ref(1);
|
|
166
|
+
const pageCount = computed(() => Math.max(1, Math.ceil(filtered.value.length / pageSize)));
|
|
167
|
+
const pageIcons = computed(() => {
|
|
168
|
+
const start = (currentPage.value - 1) * pageSize;
|
|
169
|
+
return filtered.value.slice(start, start + pageSize);
|
|
170
|
+
});
|
|
171
|
+
watch([keyword, activeModule], () => {
|
|
172
|
+
currentPage.value = 1;
|
|
173
|
+
});
|
|
174
|
+
// 当过滤结果长度变化时,若当前页超出范围则回退到最后一页
|
|
175
|
+
watch(filtered, () => {
|
|
176
|
+
if (currentPage.value > pageCount.value) {
|
|
177
|
+
currentPage.value = pageCount.value;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
function onPageChange(page: number) {
|
|
181
|
+
currentPage.value = page;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 选择
|
|
185
|
+
function handleSelect(icon: IconItem) {
|
|
186
|
+
tempValueRef.value = icon.name;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
|
190
|
+
function openIconColorPicker() {
|
|
191
|
+
if (!((tempValueRef.value || '').startsWith('antd:'))) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const el = iconColorPickerRef.value;
|
|
195
|
+
if (el) {
|
|
196
|
+
el.style.width = '16px';
|
|
197
|
+
el.style.height = '16px';
|
|
198
|
+
el.click();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
// 当前选中是否为 AntD 图标
|
|
202
|
+
const isAntdIcon = computed(() => (tempValueRef.value || '').startsWith('antd:'));
|
|
203
|
+
|
|
204
|
+
// 当切换背景时,控制图标颜色的默认值:
|
|
205
|
+
// - 选择背景(从无到有)时,默认为白色
|
|
206
|
+
// - 取消背景(从有到无)时,恢复为未设置(使用图标默认颜色)
|
|
207
|
+
watch(boxType, (val, oldVal) => {
|
|
208
|
+
if (oldVal === 'null' && val !== 'null' && !iconColor.value) {
|
|
209
|
+
iconColor.value = '#ffffff';
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// 预览统一尺寸(外层 box 尺寸)与 padding,确保三个选项视觉对齐
|
|
214
|
+
const previewBoxOuter = 24; // 与 Square/Prism 默认保持一致
|
|
215
|
+
const previewBoxPadding = 4; // 与 shapeBoxDefaults 中的 padding 对齐
|
|
216
|
+
</script>
|
|
217
|
+
|
|
218
|
+
<template>
|
|
219
|
+
<slot :open="handleOpenModal">
|
|
220
|
+
<a-input :value="modelValueRef" readonly @click="handleOpenModal">
|
|
221
|
+
<template #addonAfter>
|
|
222
|
+
<a-tooltip>
|
|
223
|
+
<template #title>
|
|
224
|
+
<PubinfoIcon :name="modelValueRef || ''" size="40px" class="cursor-default" />
|
|
225
|
+
</template>
|
|
226
|
+
<PubinfoIcon :name="modelValueRef || ''" size="20px" class="cursor-default" />
|
|
227
|
+
</a-tooltip>
|
|
228
|
+
</template>
|
|
229
|
+
</a-input>
|
|
230
|
+
</slot>
|
|
231
|
+
<a-form-item-rest>
|
|
232
|
+
<a-modal
|
|
233
|
+
v-model:open="visibleRef"
|
|
234
|
+
title="选择图标"
|
|
235
|
+
width="1200px"
|
|
236
|
+
:footer="null"
|
|
237
|
+
destroy-on-close
|
|
238
|
+
@cancel="handleClose"
|
|
239
|
+
>
|
|
240
|
+
<div class="flex gap-4 min-h-[600px]">
|
|
241
|
+
<!-- 左侧模块列表 -->
|
|
242
|
+
<div class="w-58 flex flex-col border-r border-[#e5e7eb] dark:border-[#30363d] pr-3">
|
|
243
|
+
<div class="mb-3">
|
|
244
|
+
<a-input
|
|
245
|
+
v-model:value="keyword"
|
|
246
|
+
allow-clear
|
|
247
|
+
:bordered="true"
|
|
248
|
+
placeholder="搜索图标"
|
|
249
|
+
class="h-9 text-13px"
|
|
250
|
+
>
|
|
251
|
+
<template #prefix>
|
|
252
|
+
<PubinfoIcon name="i-carbon-search" size="16" class="text-[#7a869a]" />
|
|
253
|
+
</template>
|
|
254
|
+
</a-input>
|
|
255
|
+
</div>
|
|
256
|
+
<div class="flex-1 overflow-auto space-y-1 pr-1">
|
|
257
|
+
<div
|
|
258
|
+
v-for="m in moduleOptions"
|
|
259
|
+
:key="m.value"
|
|
260
|
+
class="flex items-center justify-between px-3 py-2 rounded-md cursor-pointer text-13px border border-transparent hover:bg-[#f3f6fa] dark:hover:bg-[#262c33] transition"
|
|
261
|
+
:class="activeModule === m.value ? 'bg-[#eef5ff] dark:bg-[#1e2a33] border-[#1677ff] text-[#1677ff] font-medium' : 'text-[#4b5563]'"
|
|
262
|
+
@click="activeModule = m.value"
|
|
263
|
+
>
|
|
264
|
+
<span class="truncate max-w-[120px]">{{ m.label }}</span>
|
|
265
|
+
<span class="ml-2 inline-block min-w-6 text-center text-11px rounded bg-[#eef1f5] dark:bg-[#2d3339] px-1 text-[#5d6671] dark:text-[#9aa3ad]">{{ moduleCount(m.value) }}</span>
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
<!-- 主体 -->
|
|
270
|
+
<div class="flex-1 flex flex-col min-w-0">
|
|
271
|
+
<template v-if="filtered.length">
|
|
272
|
+
<div class="grid grid-cols-6 gap-3 auto-rows-[96px] overflow-auto flex-1 p-1">
|
|
273
|
+
<a-tooltip
|
|
274
|
+
v-for="icon in pageIcons"
|
|
275
|
+
:key="`${icon.module || ''}:${icon.name}`"
|
|
276
|
+
:mouse-enter-delay="0.35"
|
|
277
|
+
>
|
|
278
|
+
<template #title>
|
|
279
|
+
<div class="text-12px leading-tight space-y-1">
|
|
280
|
+
<div class="font-medium">
|
|
281
|
+
{{ icon.name }}
|
|
282
|
+
</div>
|
|
283
|
+
<div v-if="icon.module" class="opacity-70">
|
|
284
|
+
模块: {{ icon.module }}
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
287
|
+
</template>
|
|
288
|
+
<div
|
|
289
|
+
class="group relative flex flex-col items-center justify-center cursor-pointer rounded-md border"
|
|
290
|
+
:class="tempValueRef === icon.name
|
|
291
|
+
? 'border-solid border-[#1677ff]'
|
|
292
|
+
: 'border-dashed border-[#e5e7eb] dark:border-[#30363d]'"
|
|
293
|
+
@click="handleSelect(icon)"
|
|
294
|
+
>
|
|
295
|
+
<PubinfoIcon :name="icon.name" size="30px" />
|
|
296
|
+
</div>
|
|
297
|
+
</a-tooltip>
|
|
298
|
+
</div>
|
|
299
|
+
<!-- 分页 -->
|
|
300
|
+
<div class="mt-4 flex justify-center select-none">
|
|
301
|
+
<a-pagination
|
|
302
|
+
:current="currentPage"
|
|
303
|
+
:page-size="pageSize"
|
|
304
|
+
:total="filtered.length"
|
|
305
|
+
:show-size-changer="false"
|
|
306
|
+
show-quick-jumper
|
|
307
|
+
@change="onPageChange"
|
|
308
|
+
/>
|
|
309
|
+
</div>
|
|
310
|
+
</template>
|
|
311
|
+
<div v-else class="flex-1 flex items-center justify-center">
|
|
312
|
+
<a-empty :image="simpleImage" description="没有匹配的图标" />
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
<!-- 右侧预留区域 -->
|
|
316
|
+
<div v-if="tempValueRef" class="relative w-60 flex flex-col border-l border-[#e5e7eb] dark:border-[#30363d] pl-4 min-h-0">
|
|
317
|
+
<div class="flex flex-col flex-1 w-full rounded-md border border-dashed border-[#d0d7de] dark:border-[#30363d] text-12px text-[#6b7280] dark:text-[#94a3b8] p-3 overflow-hidden">
|
|
318
|
+
<!-- 选项:固定顶部 -->
|
|
319
|
+
<div class="shrink-0 flex justify-center items-center pb-4 border-b border-b-dashed border-b-[#d0d7de] dark:border-b-[#30363d]">
|
|
320
|
+
<a-radio-group v-model:value="boxType" class="flex justify-center items-center">
|
|
321
|
+
<a-radio-button value="null">
|
|
322
|
+
<div class="w-8 h-8 flex justify-center items-center">
|
|
323
|
+
<PubinfoIcon :name="tempValueRef" :size="previewBoxOuter - previewBoxPadding * 2" />
|
|
324
|
+
</div>
|
|
325
|
+
</a-radio-button>
|
|
326
|
+
<a-radio-button value="square">
|
|
327
|
+
<div class="w-8 h-8 flex justify-center items-center">
|
|
328
|
+
<PubinfoIcon
|
|
329
|
+
:name="tempValueRef"
|
|
330
|
+
box="square"
|
|
331
|
+
:size="previewBoxOuter"
|
|
332
|
+
radius="25%"
|
|
333
|
+
color="#ffffff"
|
|
334
|
+
/>
|
|
335
|
+
</div>
|
|
336
|
+
</a-radio-button>
|
|
337
|
+
<a-radio-button value="prism">
|
|
338
|
+
<div class="w-8 h-8 flex justify-center items-center">
|
|
339
|
+
<PubinfoIcon
|
|
340
|
+
:name="tempValueRef"
|
|
341
|
+
box="prism"
|
|
342
|
+
:size="previewBoxOuter"
|
|
343
|
+
color="#ffffff"
|
|
344
|
+
radius="2%"
|
|
345
|
+
/>
|
|
346
|
+
</div>
|
|
347
|
+
</a-radio-button>
|
|
348
|
+
</a-radio-group>
|
|
349
|
+
</div>
|
|
350
|
+
<!-- 中间配置:保持在中部,可滚动,占据剩余空间 -->
|
|
351
|
+
<div class="flex-1 w-full mt-3 px-2 overflow-auto space-y-3">
|
|
352
|
+
<!-- 背景设置:始终显示;当 boxType 为 null 时禁用 -->
|
|
353
|
+
<div class="flex flex-col justify-start w-full opacity-100">
|
|
354
|
+
<div class="text-12px mb-2 opacity-70">
|
|
355
|
+
背景设置
|
|
356
|
+
</div>
|
|
357
|
+
<ResourceIconesBoxColorPicker
|
|
358
|
+
v-model:angle="boxAngle"
|
|
359
|
+
v-model:background="boxBackground"
|
|
360
|
+
v-model:radius="boxRadius"
|
|
361
|
+
v-model:icon-size="boxIconSize"
|
|
362
|
+
:disabled="boxType === 'null'"
|
|
363
|
+
/>
|
|
364
|
+
</div>
|
|
365
|
+
<!-- 图标颜色设置:始终显示;非 AntD 图标时禁用 -->
|
|
366
|
+
<div class="flex items-center gap-3 mb-0! w-full flex-col">
|
|
367
|
+
<div class="flex">
|
|
368
|
+
<label class="text-12px opacity-70 w-14 shrink-0 flex items-center">
|
|
369
|
+
图标色
|
|
370
|
+
<a-tooltip>
|
|
371
|
+
<template #title>
|
|
372
|
+
仅 Ant Design 图标有效
|
|
373
|
+
</template>
|
|
374
|
+
<PubinfoIcon name="i-carbon-information" size="12px" class="ml-1 cursor-help" />
|
|
375
|
+
</a-tooltip>
|
|
376
|
+
</label>
|
|
377
|
+
<div class="flex flex-col">
|
|
378
|
+
<a-input
|
|
379
|
+
v-model:value="iconColor"
|
|
380
|
+
allow-clear
|
|
381
|
+
:placeholder="boxType === 'null' ? '默认' : '#ffffff'"
|
|
382
|
+
size="small"
|
|
383
|
+
class="flex-1 min-w-0"
|
|
384
|
+
:disabled="!isAntdIcon"
|
|
385
|
+
>
|
|
386
|
+
<template #prefix>
|
|
387
|
+
<div class="relative inline-flex items-center">
|
|
388
|
+
<button
|
|
389
|
+
type="button"
|
|
390
|
+
:disabled="!isAntdIcon"
|
|
391
|
+
class="w-4 h-4 rounded border border-gray-300 dark:border-gray-700"
|
|
392
|
+
:class="!isAntdIcon ? 'opacity-50 cursor-not-allowed' : ''"
|
|
393
|
+
:style="{ background: iconColor || '#ffffff' }"
|
|
394
|
+
@click="openIconColorPicker"
|
|
395
|
+
/>
|
|
396
|
+
<input
|
|
397
|
+
ref="iconColorPickerRef"
|
|
398
|
+
type="color"
|
|
399
|
+
:value="iconColor || '#ffffff'"
|
|
400
|
+
:disabled="!isAntdIcon"
|
|
401
|
+
class="absolute left-0 top-0 opacity-0 pointer-events-none"
|
|
402
|
+
style="width:16px;height:16px;"
|
|
403
|
+
@input="iconColor = ($event.target as HTMLInputElement).value"
|
|
404
|
+
>
|
|
405
|
+
</div>
|
|
406
|
+
</template>
|
|
407
|
+
</a-input>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
</div>
|
|
411
|
+
<!-- 预览:固定底部 -->
|
|
412
|
+
<div class="w-full mt-auto flex aspect-square">
|
|
413
|
+
<div class="flex-1 w-full h-full py-4 rounded-md border-t border-t-dashed border-t-[#d0d7de] dark:border-t-[#30363d] flex flex-col items-center gap-2">
|
|
414
|
+
<template v-if="tempValueRef">
|
|
415
|
+
<div class="w-full h-full flex items-center justify-center">
|
|
416
|
+
<PubinfoIcon
|
|
417
|
+
v-if="boxType === 'null'"
|
|
418
|
+
:name="tempValueRef"
|
|
419
|
+
:size="80"
|
|
420
|
+
:color="(isAntdIcon && iconColor) ? iconColor : undefined"
|
|
421
|
+
/>
|
|
422
|
+
<PubinfoIcon
|
|
423
|
+
v-else
|
|
424
|
+
:name="tempValueRef"
|
|
425
|
+
:box="boxType"
|
|
426
|
+
:size="80"
|
|
427
|
+
:angle="boxAngle"
|
|
428
|
+
:background="boxBackground"
|
|
429
|
+
:radius="boxRadius"
|
|
430
|
+
:icon-size="boxIconSize"
|
|
431
|
+
:color="isAntdIcon ? (iconColor || '#ffffff') : undefined"
|
|
432
|
+
/>
|
|
433
|
+
</div>
|
|
434
|
+
</template>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
<!-- 侧栏底部操作按钮 -->
|
|
439
|
+
<div class="mt-4 flex justify-end gap-2">
|
|
440
|
+
<a-button @click="handleClose">
|
|
441
|
+
取消
|
|
442
|
+
</a-button>
|
|
443
|
+
<a-button type="primary" @click="handleConfirm">
|
|
444
|
+
确定
|
|
445
|
+
</a-button>
|
|
446
|
+
</div>
|
|
447
|
+
</div>
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</a-modal>
|
|
451
|
+
</a-form-item-rest>
|
|
452
|
+
</template>
|
|
453
|
+
|
|
454
|
+
<style scoped>
|
|
455
|
+
/* Center radio group and prevent wrapper stretching */
|
|
456
|
+
:deep(.ant-radio-group) {
|
|
457
|
+
display: inline-flex;
|
|
458
|
+
align-items: center;
|
|
459
|
+
}
|
|
460
|
+
:deep(.ant-radio-button-wrapper) {
|
|
461
|
+
display: inline-flex;
|
|
462
|
+
align-items: center;
|
|
463
|
+
justify-content: center;
|
|
464
|
+
padding: 4px 10px;
|
|
465
|
+
height: auto !important;
|
|
466
|
+
line-height: 1 !important;
|
|
467
|
+
flex: 0 0 auto;
|
|
468
|
+
}
|
|
469
|
+
:deep(.ant-radio-button-wrapper > span) {
|
|
470
|
+
display: inline-flex;
|
|
471
|
+
align-items: center;
|
|
472
|
+
justify-content: center;
|
|
473
|
+
}
|
|
474
|
+
</style>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { ResourceMode } from '../enum';
|
|
2
|
+
import { getRbacResourceAppList, getRbacResourceGroupResourceTree } from '@/api/modules/rbac';
|
|
3
|
+
import { RESOURCE_MODE } from '../enum';
|
|
4
|
+
|
|
5
|
+
export type TreeNode = API.PubResource & {
|
|
6
|
+
children?: TreeNode[]
|
|
7
|
+
disabled?: boolean
|
|
8
|
+
};
|
|
9
|
+
export interface StringMap<T> { [key: string]: T };
|
|
10
|
+
|
|
11
|
+
export interface SelectedResourceInfo {
|
|
12
|
+
id: string
|
|
13
|
+
name: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function useAppAndResource(mode?: ResourceMode) {
|
|
17
|
+
const resourceModelRef = ref();
|
|
18
|
+
const appList: Ref<API.PubResource[] | { label: string | undefined, value: string | undefined }[]> = ref([]);
|
|
19
|
+
const treeData: Ref<TreeNode[]> = ref([]);
|
|
20
|
+
const resourceMap: Ref<StringMap<string>> = ref({});
|
|
21
|
+
const selectedResources = ref<SelectedResourceInfo[]>([]);
|
|
22
|
+
const isDataPermissionMode = computed(() => mode === RESOURCE_MODE.DATA_PERMISSION);
|
|
23
|
+
|
|
24
|
+
function getAppList() {
|
|
25
|
+
getRbacResourceAppList().then((res) => {
|
|
26
|
+
if (res?.success) {
|
|
27
|
+
const data = res.data ?? [];
|
|
28
|
+
const list: { label: string | undefined, value: string | undefined }[] = data.map((item: API.PubResource) => {
|
|
29
|
+
return { label: item.name, value: item.id };
|
|
30
|
+
});
|
|
31
|
+
appList.value = list;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function updateTreeDataAndResourceMap(appId: string) {
|
|
37
|
+
const treeRes = await getRbacResourceGroupResourceTree({ appId });
|
|
38
|
+
treeData.value = treeRes?.data ?? [];
|
|
39
|
+
markDisabledNodesAndGenerateMap(treeData.value);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function markDisabledNodesAndGenerateMap(nodes: TreeNode[]) {
|
|
43
|
+
nodes.forEach((node) => {
|
|
44
|
+
if (node.id) {
|
|
45
|
+
resourceMap.value[node.id] = node.name!;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (isDataPermissionMode.value && node.enableDataPermission === false) {
|
|
49
|
+
// 未开启数据权限的节点标记为不可选
|
|
50
|
+
node.disabled = true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (node.children && node.children.length) {
|
|
54
|
+
markDisabledNodesAndGenerateMap(node.children);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function setSelectedResources(resources: SelectedResourceInfo[]) {
|
|
60
|
+
selectedResources.value = resources;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
function updateSelectedResources(resourceIds: string[]) {
|
|
64
|
+
if (!resourceIds.length || !Object.keys(resourceMap.value).length) {
|
|
65
|
+
return [];
|
|
66
|
+
}
|
|
67
|
+
selectedResources.value = resourceIds.map((id) => {
|
|
68
|
+
return { id, name: resourceMap.value[id] };
|
|
69
|
+
}).filter(item => item.name);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
function clearSelectedResources() {
|
|
73
|
+
selectedResources.value = [];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function openResourceModel(resourceIds: string[]) {
|
|
77
|
+
if (resourceModelRef.value && resourceModelRef.value.open) {
|
|
78
|
+
resourceModelRef.value.open(resourceIds, treeData.value, resourceMap.value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return {
|
|
83
|
+
appList,
|
|
84
|
+
resourceModelRef,
|
|
85
|
+
treeData,
|
|
86
|
+
resourceMap,
|
|
87
|
+
selectedResources,
|
|
88
|
+
isDataPermissionMode,
|
|
89
|
+
getAppList,
|
|
90
|
+
updateTreeDataAndResourceMap,
|
|
91
|
+
setSelectedResources,
|
|
92
|
+
updateSelectedResources,
|
|
93
|
+
clearSelectedResources,
|
|
94
|
+
openResourceModel,
|
|
95
|
+
};
|
|
96
|
+
}
|