@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,414 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { EventDataNode, TreeProps } from 'ant-design-vue/es/tree';
|
|
3
|
+
import type { Key } from 'ant-design-vue/es/vc-tree/interface.d';
|
|
4
|
+
import type { CheckInfo } from 'ant-design-vue/es/vc-tree/props';
|
|
5
|
+
import type { ResourceMode } from './enum';
|
|
6
|
+
import type { StringMap } from './hooks/useAppAndResource';
|
|
7
|
+
import { useToggle } from '@vueuse/core';
|
|
8
|
+
import { Form } from 'ant-design-vue';
|
|
9
|
+
import { RESOURCE_MODE } from './enum';
|
|
10
|
+
|
|
11
|
+
defineOptions({
|
|
12
|
+
name: 'ResourceSelector',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<{
|
|
16
|
+
title?: string
|
|
17
|
+
mode?: ResourceMode
|
|
18
|
+
}>(), {
|
|
19
|
+
title: '资源选择',
|
|
20
|
+
mode: RESOURCE_MODE.ROLE,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits(['select']);
|
|
24
|
+
|
|
25
|
+
const isDataPermissionMode = computed(() => props.mode === RESOURCE_MODE.DATA_PERMISSION);
|
|
26
|
+
|
|
27
|
+
type TreeNode = API.PubResource & {
|
|
28
|
+
children?: TreeNode[]
|
|
29
|
+
};
|
|
30
|
+
interface ReInfo {
|
|
31
|
+
id: string
|
|
32
|
+
name: string
|
|
33
|
+
}
|
|
34
|
+
interface CheckedKeys {
|
|
35
|
+
checked: Key[]
|
|
36
|
+
halfChecked: Key[]
|
|
37
|
+
}
|
|
38
|
+
const checkedKeys: Ref<CheckedKeys> = ref({ checked: [], halfChecked: [] });
|
|
39
|
+
const expandedKeys = ref<string[]>([]);
|
|
40
|
+
const rightItems: Ref<ReInfo[]> = ref([]);
|
|
41
|
+
const resourceMap: Ref<StringMap<string>> = ref({});
|
|
42
|
+
const resourceCount: Ref<number> = ref(0);
|
|
43
|
+
const treeData = ref<TreeProps['treeData'] & TreeNode[]>([]);
|
|
44
|
+
|
|
45
|
+
const open = defineModel<boolean>('open');
|
|
46
|
+
|
|
47
|
+
const setOpen = useToggle(open);
|
|
48
|
+
|
|
49
|
+
watch(() => checkedKeys.value.checked, (val) => {
|
|
50
|
+
rightItems.value = val.reduce((acc: ReInfo[], item) => {
|
|
51
|
+
const temp = {
|
|
52
|
+
id: item as string,
|
|
53
|
+
name: resourceMap.value[item],
|
|
54
|
+
};
|
|
55
|
+
acc.push(temp);
|
|
56
|
+
return acc;
|
|
57
|
+
}, []);
|
|
58
|
+
}, { deep: true });
|
|
59
|
+
|
|
60
|
+
function onOpen(ids: Key[], tree: any[], resMap: StringMap<string>) {
|
|
61
|
+
checkedKeys.value.checked = [...ids];
|
|
62
|
+
treeData.value = tree;
|
|
63
|
+
resourceMap.value = resMap;
|
|
64
|
+
resourceCount.value = Object.keys(resourceMap.value).length;
|
|
65
|
+
|
|
66
|
+
// 默认展开第一级
|
|
67
|
+
if (tree[0]?.id) {
|
|
68
|
+
expandedKeys.value = [tree[0]?.id];
|
|
69
|
+
}
|
|
70
|
+
setOpen(true);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function onCheck(node: Key[] | CheckedKeys, e: CheckInfo) {
|
|
74
|
+
// 数据权限模式时, 采用check-strictly=true时的默认值,即:只勾选/反选被点击的节点
|
|
75
|
+
if (isDataPermissionMode.value) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
角色模式时:
|
|
81
|
+
1.勾选:勾选节点时,同时勾选其所有祖先节点;
|
|
82
|
+
2.反选:反选节点时,同时反选其所有子节点,不动祖先节点。
|
|
83
|
+
*/
|
|
84
|
+
if (e.checked) {
|
|
85
|
+
function getParents(obj: any) {
|
|
86
|
+
if (obj.parent) {
|
|
87
|
+
checkedKeys.value.checked.push(obj.key);
|
|
88
|
+
getParents(obj.parent);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
checkedKeys.value.checked.push(obj.key);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
getParents(e.node);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const childKeys = getAllDescendantIds([e.node], e.node.id);
|
|
98
|
+
childKeys.forEach((delkey) => {
|
|
99
|
+
const index = checkedKeys.value.checked.findIndex(item => item === delkey);
|
|
100
|
+
if (index >= 0) {
|
|
101
|
+
checkedKeys.value.checked.splice(index, 1);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
checkedKeys.value.checked = Array.from(new Set(checkedKeys.value.checked));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function clearAllChecked() {
|
|
109
|
+
checkedKeys.value.checked = [];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function handleCloseTag(removedTagId: string) {
|
|
113
|
+
const allDeleteIds = getAllDescendantIds(treeData.value, removedTagId);
|
|
114
|
+
allDeleteIds.forEach((delkey) => {
|
|
115
|
+
const index = checkedKeys.value.checked.findIndex(item => item === delkey);
|
|
116
|
+
if (index >= 0) {
|
|
117
|
+
checkedKeys.value.checked.splice(index, 1);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** 获取该节点信息 */
|
|
123
|
+
function getNodeById(nodes: any, id: string): TreeNode | undefined {
|
|
124
|
+
for (const node of nodes) {
|
|
125
|
+
if (node.id === id) {
|
|
126
|
+
return node;
|
|
127
|
+
}
|
|
128
|
+
if (node.children) {
|
|
129
|
+
const foundNode = getNodeById(node.children, id);
|
|
130
|
+
if (foundNode) {
|
|
131
|
+
return foundNode;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** 获取该节点下所有子节点的ID(包括该节点) */
|
|
139
|
+
function getAllDescendantIds(nodes: any, targetNodeId: string): string[] {
|
|
140
|
+
const result: string[] = [];
|
|
141
|
+
const targetNode = getNodeById(nodes, targetNodeId);
|
|
142
|
+
if (targetNode) {
|
|
143
|
+
function dfs(node: TreeNode): void {
|
|
144
|
+
result.push(node.id as string);
|
|
145
|
+
if (node.children) {
|
|
146
|
+
for (const child of node.children) {
|
|
147
|
+
dfs(child);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
dfs(targetNode);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return result;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function checkAllChildren(record: EventDataNode) {
|
|
159
|
+
const data: string[] = getAllChildren(record.id);
|
|
160
|
+
// 如果有子节点需要选中,那么当前节点一定选中
|
|
161
|
+
if (data.length > 0) {
|
|
162
|
+
data.push(record.id);
|
|
163
|
+
data.forEach((item) => {
|
|
164
|
+
const itemIndex = checkedKeys.value.checked.findIndex(ckey => ckey === item);
|
|
165
|
+
if (itemIndex < 0) {
|
|
166
|
+
checkedKeys.value.checked.push(item);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function clearAllChildren(record: EventDataNode) {
|
|
173
|
+
const data: string[] = getAllChildren(record.id);
|
|
174
|
+
data.forEach((item) => {
|
|
175
|
+
const itemIndex = checkedKeys.value.checked.findIndex(ckey => ckey === item);
|
|
176
|
+
if (itemIndex >= 0) {
|
|
177
|
+
checkedKeys.value.checked.splice(itemIndex, 1);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function checkNextChildren(record: EventDataNode) {
|
|
183
|
+
const data: string[] = getNextChildren(record.id);
|
|
184
|
+
// 如果有子节点需要选中,那么当前节点一定选中
|
|
185
|
+
if (data.length > 0) {
|
|
186
|
+
data.push(record.id);
|
|
187
|
+
data.forEach((item) => {
|
|
188
|
+
const itemIndex = checkedKeys.value.checked.findIndex(ckey => ckey === item);
|
|
189
|
+
if (itemIndex < 0) {
|
|
190
|
+
checkedKeys.value.checked.push(item);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function clearNextChildren(record: EventDataNode) {
|
|
197
|
+
const data: string[] = getNextChildren(record.id);
|
|
198
|
+
data.forEach((item) => {
|
|
199
|
+
const itemIndex = checkedKeys.value.checked.findIndex(ckey => ckey === item);
|
|
200
|
+
if (itemIndex >= 0) {
|
|
201
|
+
checkedKeys.value.checked.splice(itemIndex, 1);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function getNextChildren(id: string) {
|
|
207
|
+
const targetNode = getNodeById(treeData.value, id);
|
|
208
|
+
if (targetNode && targetNode.children && targetNode.children.length > 0) {
|
|
209
|
+
return targetNode.children.reduce((acc: string[], item) => {
|
|
210
|
+
// 不勾选禁用的节点
|
|
211
|
+
if (isDataPermissionMode.value && (item as any)?.disabled) {
|
|
212
|
+
return acc;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
acc.push(item.id!);
|
|
216
|
+
return acc;
|
|
217
|
+
}, []);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
return [];
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function getAllChildren(id: string) {
|
|
225
|
+
const data: string[] = getAllDescendantIds(treeData.value, id);
|
|
226
|
+
const index = data.indexOf(id);
|
|
227
|
+
data.splice(index, 1);
|
|
228
|
+
|
|
229
|
+
// 不勾选禁用的节点
|
|
230
|
+
return data
|
|
231
|
+
?.map(id => getNodeById(treeData.value, id))
|
|
232
|
+
?.filter(item => isDataPermissionMode.value ? !(item as any).disabled : true)
|
|
233
|
+
?.map(item => item!.id as string);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const { onFieldChange } = Form.useInjectFormItemContext();
|
|
237
|
+
function notifySelect() {
|
|
238
|
+
emit('select', rightItems.value);
|
|
239
|
+
onFieldChange();
|
|
240
|
+
setOpen(false);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
defineExpose({
|
|
244
|
+
open: onOpen,
|
|
245
|
+
});
|
|
246
|
+
</script>
|
|
247
|
+
|
|
248
|
+
<template>
|
|
249
|
+
<a-modal
|
|
250
|
+
v-model:open="open"
|
|
251
|
+
class="custom_modal"
|
|
252
|
+
:title="title"
|
|
253
|
+
:mask-closable="false"
|
|
254
|
+
:width="750"
|
|
255
|
+
>
|
|
256
|
+
<div class="h-340px border-1px border-solid flex flex-row border_color">
|
|
257
|
+
<div class="w-360px flex flex-col">
|
|
258
|
+
<div class="w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]">
|
|
259
|
+
<div class="">
|
|
260
|
+
全部资源
|
|
261
|
+
</div>
|
|
262
|
+
<div>{{ checkedKeys.checked.length }}/{{ resourceCount }}</div>
|
|
263
|
+
</div>
|
|
264
|
+
<div class="flex-1 overflow-auto py-10px pr-10px">
|
|
265
|
+
<a-tree
|
|
266
|
+
v-model:checked-keys="checkedKeys"
|
|
267
|
+
v-model:expanded-keys="expandedKeys"
|
|
268
|
+
class="h-full custom_tree"
|
|
269
|
+
block-node
|
|
270
|
+
checkable
|
|
271
|
+
check-strictly
|
|
272
|
+
:field-names="{ children: 'children', title: 'name', key: 'id' }"
|
|
273
|
+
:tree-data="treeData"
|
|
274
|
+
@check="onCheck"
|
|
275
|
+
>
|
|
276
|
+
<template #title="record">
|
|
277
|
+
<div class="flex items-center">
|
|
278
|
+
<PubinfoIcon v-if="record.checked" name="zy_checked" size="24px" />
|
|
279
|
+
<PubinfoIcon v-else name="zy_default" size="24px" />
|
|
280
|
+
<span class="mx-4px">
|
|
281
|
+
{{ record.name }}
|
|
282
|
+
</span>
|
|
283
|
+
<!-- "操作"功能显示逻辑:角色模式下非叶子节点时显示; 数据权限模式下非叶子节点 且 数据disabled字段不为true时显示 -->
|
|
284
|
+
<a-dropdown v-if="!record.leaf && (!isDataPermissionMode || !record.disabled)" class="bg-[#e8f3ff] dark:bg-[#141414]" :trigger="['click']">
|
|
285
|
+
<a class="ant-dropdown-link whitespace-nowrap" style="padding: 2px 4px;" @click.prevent>
|
|
286
|
+
<span class="text-base">操作</span>
|
|
287
|
+
<DownOutlined :style="{ fontSize: '10px' }" />
|
|
288
|
+
</a>
|
|
289
|
+
<template #overlay>
|
|
290
|
+
<a-menu>
|
|
291
|
+
<a-menu-item key="0">
|
|
292
|
+
<a @click="checkAllChildren(record)">选中所有下级</a>
|
|
293
|
+
</a-menu-item>
|
|
294
|
+
<a-menu-item key="1">
|
|
295
|
+
<a @click="clearAllChildren(record)">取消所有下级</a>
|
|
296
|
+
</a-menu-item>
|
|
297
|
+
<a-menu-item key="3">
|
|
298
|
+
<a @click="checkNextChildren(record)">选中下一级</a>
|
|
299
|
+
</a-menu-item>
|
|
300
|
+
<a-menu-item key="4">
|
|
301
|
+
<a @click="clearNextChildren(record)">取消下一级</a>
|
|
302
|
+
</a-menu-item>
|
|
303
|
+
</a-menu>
|
|
304
|
+
</template>
|
|
305
|
+
</a-dropdown>
|
|
306
|
+
</div>
|
|
307
|
+
</template>
|
|
308
|
+
</a-tree>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
|
|
312
|
+
<div class="flex-1 flex flex-col border-solid border-0px border-l-1px border_color">
|
|
313
|
+
<div class="w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]">
|
|
314
|
+
<div class="">
|
|
315
|
+
已选资源
|
|
316
|
+
</div>
|
|
317
|
+
<div class="cursor-pointer text-[#165DFF]" @click="clearAllChecked">
|
|
318
|
+
清空
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
<div class="flex-1 p-10px overflow-auto">
|
|
322
|
+
<div v-for="item in rightItems" :key="item.id" class="inline-block mb-6px max-w-300px">
|
|
323
|
+
<a-tooltip v-if="item.name?.length > 20" :title="item.name">
|
|
324
|
+
<a-tag class="custom_tag bg-[#e8f3ff] dark:bg-[#141414]" closable @close="handleCloseTag(item.id)">
|
|
325
|
+
{{ `${item.name?.slice(0, 20)}...` }}
|
|
326
|
+
</a-tag>
|
|
327
|
+
</a-tooltip>
|
|
328
|
+
<a-tag
|
|
329
|
+
v-else
|
|
330
|
+
class="custom_tag bg-[#e8f3ff] dark:bg-[#141414]"
|
|
331
|
+
closable
|
|
332
|
+
@close="handleCloseTag(item.id)"
|
|
333
|
+
>
|
|
334
|
+
{{ item.name }}
|
|
335
|
+
</a-tag>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
|
|
341
|
+
<template #footer>
|
|
342
|
+
<a-button @click="setOpen(false)">
|
|
343
|
+
取消
|
|
344
|
+
</a-button>
|
|
345
|
+
<a-button type="primary" @click="notifySelect">
|
|
346
|
+
确定
|
|
347
|
+
</a-button>
|
|
348
|
+
</template>
|
|
349
|
+
</a-modal>
|
|
350
|
+
</template>
|
|
351
|
+
|
|
352
|
+
<style scoped>
|
|
353
|
+
.border_color {
|
|
354
|
+
--at-apply: border-[#e5e6eb];
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
[data-theme="dark"] .border_color {
|
|
358
|
+
--at-apply: border-[#fdfdfd1f];
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.border_c {
|
|
362
|
+
--at-apply: border rounded-[10px] border-dashed border-[#ccc];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
:deep(.ant-dropdown-link) {
|
|
366
|
+
--at-apply: text-xs px-1.5 py-1 rounded-sm scale-[0.7];
|
|
367
|
+
}
|
|
368
|
+
</style>
|
|
369
|
+
|
|
370
|
+
<style lang='css' scoped>
|
|
371
|
+
.custom_modal :deep(.ant-modal-content) {
|
|
372
|
+
--at-apply: p-0 rounded-none;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.custom_modal :deep(.ant-modal-header) {
|
|
376
|
+
--at-apply: mb-0 px-4 py-3 border-b-[#e5e6eb] border-b border-solid;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.custom_modal :deep(.ant-modal-title) {
|
|
380
|
+
--at-apply: text-base font-medium text-[#1d2129];
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.custom_modal :deep(.ant-modal-body) {
|
|
384
|
+
--at-apply: p-4;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.custom_modal :deep(.ant-modal-footer) {
|
|
388
|
+
--at-apply: p-4 border-t-[#e5e6eb] border-t border-solid;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.custom_modal :deep(.ant-modal-footer) .ant-btn {
|
|
392
|
+
--at-apply: rounded-sm;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
:deep(.ant-tree-checkbox) {
|
|
396
|
+
--at-apply: mt-0 mr-2px;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
:deep(.ant-tree-checkbox + span .ant-tree-iconEle) {
|
|
400
|
+
--at-apply: mr-1;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.custom_tag {
|
|
404
|
+
--at-apply: px-2 py-[3px] rounded-sm border-0;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.custom_tag :deep(.ant-tag-close-icon) {
|
|
408
|
+
--at-apply: text-[#165dff] text-op-60;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.custom_tag :deep(.ant-tag-close-icon):hover {
|
|
412
|
+
--at-apply: text-[#165dff] text-op-100;
|
|
413
|
+
}
|
|
414
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { SelectValue } from 'ant-design-vue/es/select';
|
|
3
|
+
import { SearchOutlined } from '@ant-design/icons-vue';
|
|
4
|
+
import { getRbacPubRoleGroupGetAll } from '@/api/modules/rbac';
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
name: 'RoleSearch',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<{
|
|
11
|
+
group?: boolean
|
|
12
|
+
}>(), {
|
|
13
|
+
group: false,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const emit = defineEmits(['select']);
|
|
17
|
+
|
|
18
|
+
const searchContent = defineModel<string>();
|
|
19
|
+
const groupId = defineModel<string>('groupId');
|
|
20
|
+
|
|
21
|
+
const groups = ref<API.PubRoleGroup[]>([]);
|
|
22
|
+
|
|
23
|
+
async function getRoleGroup() {
|
|
24
|
+
const res = await getRbacPubRoleGroupGetAll({ name: '' });
|
|
25
|
+
if (res.success) {
|
|
26
|
+
groups.value = res.data ?? [];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
onMounted(() => {
|
|
31
|
+
if (props.group) {
|
|
32
|
+
getRoleGroup();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<a-input v-model:value="searchContent" placeholder="请输入" allow-clear>
|
|
39
|
+
<template #addonBefore>
|
|
40
|
+
<a-select v-if="group" v-model:value="groupId" style="width: 90px;" @change="($event: SelectValue) => emit('select', $event)">
|
|
41
|
+
<a-select-option value="">
|
|
42
|
+
全部
|
|
43
|
+
</a-select-option>
|
|
44
|
+
<a-select-option v-for="item in groups" :key="item.id" :value="item.id">
|
|
45
|
+
<a-tooltip :title="item.name">
|
|
46
|
+
{{ item.name }}
|
|
47
|
+
</a-tooltip>
|
|
48
|
+
</a-select-option>
|
|
49
|
+
</a-select>
|
|
50
|
+
|
|
51
|
+
<div v-else>
|
|
52
|
+
全部
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<template #suffix>
|
|
57
|
+
<SearchOutlined />
|
|
58
|
+
</template>
|
|
59
|
+
</a-input>
|
|
60
|
+
</template>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CheckboxChangeEvent } from 'ant-design-vue/es/checkbox/interface';
|
|
3
|
+
import type { SelectValue } from './interface';
|
|
4
|
+
import type { Role } from './useRole';
|
|
5
|
+
import { CloseOutlined } from '@ant-design/icons-vue';
|
|
6
|
+
import { useToggle } from '@vueuse/core';
|
|
7
|
+
import { Card, Checkbox, CheckboxGroup, Modal, Spin, theme } from 'ant-design-vue';
|
|
8
|
+
import RoleSearch from './RoleSearch.vue';
|
|
9
|
+
import TooltipLabel from './TooltipLabel.vue';
|
|
10
|
+
import { useRole, useRoleGroup } from './useRole';
|
|
11
|
+
|
|
12
|
+
defineOptions({
|
|
13
|
+
name: 'RoleSelector',
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
withDefaults(defineProps<{
|
|
17
|
+
group?: boolean
|
|
18
|
+
}>(), {
|
|
19
|
+
group: false,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const emit = defineEmits(['select']);
|
|
23
|
+
|
|
24
|
+
const { token } = theme.useToken();
|
|
25
|
+
|
|
26
|
+
const open = defineModel<boolean>('open');
|
|
27
|
+
const setOpen = useToggle(open);
|
|
28
|
+
|
|
29
|
+
const selectValue = ref<SelectValue[]>([]);
|
|
30
|
+
|
|
31
|
+
const role = reactive(useRole());
|
|
32
|
+
const roleGroup = reactive(useRoleGroup());
|
|
33
|
+
|
|
34
|
+
const search = ref('');
|
|
35
|
+
const groupId = ref('');
|
|
36
|
+
async function onSearchSelect(id: string) {
|
|
37
|
+
await roleGroup.getData(id);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function onOpen(value: SelectValue[] = []) {
|
|
41
|
+
selectValue.value = value;
|
|
42
|
+
search.value = '';
|
|
43
|
+
groupId.value = '';
|
|
44
|
+
await role.getData();
|
|
45
|
+
setOpen(true);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const roleData = computed(() => {
|
|
49
|
+
return groupId.value === '' ? role.roles : roleGroup.roles;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
function filterName(v: Role) {
|
|
53
|
+
return roleData.value.findIndex(item => item.id === v.id) > -1 && v.name?.includes(search.value);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function onCheck(e: CheckboxChangeEvent, item: Role) {
|
|
57
|
+
if (e.target.checked) {
|
|
58
|
+
selectValue.value.push({ value: item.id, label: item.name } as SelectValue);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
selectValue.value = selectValue.value.filter(e => e.value !== item.id);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function onClose(value: SelectValue['value']) {
|
|
66
|
+
selectValue.value = selectValue.value.filter(e => e.value !== value);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function onSubmit() {
|
|
70
|
+
emit('select', selectValue.value);
|
|
71
|
+
setOpen(false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function onClear() {
|
|
75
|
+
const disabledData = selectValue.value.filter(e => !role.roles.some(role => role.id === e.value));
|
|
76
|
+
selectValue.value = disabledData;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
defineExpose({
|
|
80
|
+
open: onOpen,
|
|
81
|
+
});
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<Modal
|
|
86
|
+
v-model:open="open"
|
|
87
|
+
title="角色选择"
|
|
88
|
+
:mask-closable="false"
|
|
89
|
+
:width="750"
|
|
90
|
+
:z-index="1001"
|
|
91
|
+
ok-text="确认"
|
|
92
|
+
cancel-text="取消"
|
|
93
|
+
destroy-on-close
|
|
94
|
+
@ok="onSubmit()"
|
|
95
|
+
>
|
|
96
|
+
<div class="border border-solid h-[400px]" :style="{ borderColor: token.colorBorder }">
|
|
97
|
+
<div class="h-full flex">
|
|
98
|
+
<Card
|
|
99
|
+
:bordered="false"
|
|
100
|
+
size="small"
|
|
101
|
+
:head-style="{ backgroundColor: token.colorBgLayout, borderRadius: 0, borderWidth: 0, borderBottomWidth: '1px', padding: 0 }"
|
|
102
|
+
:body-style="{ flex: 1, padding: 0, height: 'calc(100% - 38px)' }"
|
|
103
|
+
:style="{ boxShadow: 'none', borderRadius: 0, borderColor: token.colorBorder }"
|
|
104
|
+
class="flex h-full flex-col w-1/2"
|
|
105
|
+
>
|
|
106
|
+
<div class="p-2 flex flex-col h-full gap-2">
|
|
107
|
+
<RoleSearch v-model="search" v-model:group-id="groupId" :group="group" @select="onSearchSelect" />
|
|
108
|
+
|
|
109
|
+
<div class="flex-1 overflow-y-auto overflow-x-hidden">
|
|
110
|
+
<div v-if="role.loading || roleGroup.loading" class="flex items-center justify-center size-full">
|
|
111
|
+
<Spin />
|
|
112
|
+
</div>
|
|
113
|
+
<CheckboxGroup v-else :value="selectValue.map(e => e.value)" class="w-full overflow-x-hidden">
|
|
114
|
+
<div
|
|
115
|
+
v-for="item in roleData"
|
|
116
|
+
v-show="filterName(item)"
|
|
117
|
+
:key="item.id"
|
|
118
|
+
class="w-full py-2 border-0 border-b border-solid truncate"
|
|
119
|
+
:style="{ borderColor: token.colorBorder }"
|
|
120
|
+
>
|
|
121
|
+
<Checkbox :value="item.id" @change="($event) => onCheck($event, item)">
|
|
122
|
+
<TooltipLabel :name="item.name" />
|
|
123
|
+
</Checkbox>
|
|
124
|
+
</div>
|
|
125
|
+
</CheckboxGroup>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</Card>
|
|
129
|
+
|
|
130
|
+
<div
|
|
131
|
+
:style="{ borderColor: token.colorBorder }"
|
|
132
|
+
class="h-full border-0 border-r border-solid"
|
|
133
|
+
/>
|
|
134
|
+
|
|
135
|
+
<Card
|
|
136
|
+
:bordered="false"
|
|
137
|
+
size="small"
|
|
138
|
+
:head-style="{ backgroundColor: token.colorBgLayout, borderRadius: 0, borderWidth: 0, borderBottomWidth: '1px' }"
|
|
139
|
+
:body-style="{ flex: 1, padding: 0, overflow: 'hidden' }"
|
|
140
|
+
:style="{ boxShadow: 'none', borderRadius: 0 }"
|
|
141
|
+
class="flex h-full flex-col flex-1"
|
|
142
|
+
>
|
|
143
|
+
<template #title>
|
|
144
|
+
<span class="font-normal">
|
|
145
|
+
已选角色
|
|
146
|
+
</span>
|
|
147
|
+
</template>
|
|
148
|
+
<template #extra>
|
|
149
|
+
<a :style="{ color: token.colorPrimary }" @click="onClear()">
|
|
150
|
+
清空
|
|
151
|
+
</a>
|
|
152
|
+
</template>
|
|
153
|
+
|
|
154
|
+
<div class="gap-1 p-2 h-full overflow-y-auto">
|
|
155
|
+
<div
|
|
156
|
+
v-for="item in selectValue"
|
|
157
|
+
:key="item.value"
|
|
158
|
+
class="inline-block mb-1 py-1 px-2 mx-0.5 max-w-full rounded"
|
|
159
|
+
:style="{ backgroundColor: token.colorPrimaryBg }"
|
|
160
|
+
>
|
|
161
|
+
<TooltipLabel :name="item.label" :size="20" />
|
|
162
|
+
<CloseOutlined
|
|
163
|
+
v-if="role.roles.some(role => role.id === item.value)"
|
|
164
|
+
class="ml-1 cursor-pointer text-xs"
|
|
165
|
+
:style="{ color: token.colorPrimary }"
|
|
166
|
+
@click="onClose(item.value)"
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
</Card>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</Modal>
|
|
174
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Tooltip } from 'ant-design-vue';
|
|
3
|
+
|
|
4
|
+
defineOptions({
|
|
5
|
+
name: 'TooltipLabel',
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
withDefaults(defineProps<{
|
|
10
|
+
name?: string
|
|
11
|
+
size?: number
|
|
12
|
+
}>(), {
|
|
13
|
+
size: 21,
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<Tooltip v-if="(name || '').length > size" :title="name">
|
|
19
|
+
<span v-bind="$attrs">{{ `${name?.slice(0, size)}...` }}</span>
|
|
20
|
+
</Tooltip>
|
|
21
|
+
<span v-else v-bind="$attrs">
|
|
22
|
+
{{ name }}
|
|
23
|
+
</span>
|
|
24
|
+
</template>
|