@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,216 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Form } from '../interface';
|
|
3
|
+
import { useMetaForm } from '../hooks/useMetaForm';
|
|
4
|
+
import HoverCard from './HoverCard.vue';
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
name: 'MetaForm',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const form = defineModel<Form>({
|
|
11
|
+
default: {
|
|
12
|
+
meta: {
|
|
13
|
+
url: '',
|
|
14
|
+
component: '',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const { show } = useMetaForm(form);
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div>
|
|
24
|
+
<a-divider>其他配置</a-divider>
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
其他配置区域:根据资源类型的不同,显示不同的配置选项
|
|
28
|
+
- 开发模式:仅对应用和动态应用有效,用于开发环境的特殊配置
|
|
29
|
+
- 缓存标签页/固定标签页:仅对菜单有效,因为只有菜单会在浏览器标签页中展示
|
|
30
|
+
- 其他显示相关配置:适用于所有可视化的资源类型
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
<a-row :gutter="[8, 8]">
|
|
34
|
+
<a-col :span="12">
|
|
35
|
+
<a-form-item name="enable" :label-col="{ span: 0 }">
|
|
36
|
+
<HoverCard class="flex items-center justify-between">
|
|
37
|
+
<div class="text-sm font-medium">
|
|
38
|
+
启用
|
|
39
|
+
</div>
|
|
40
|
+
<a-switch v-model:checked="form.enable" />
|
|
41
|
+
</HoverCard>
|
|
42
|
+
</a-form-item>
|
|
43
|
+
</a-col>
|
|
44
|
+
|
|
45
|
+
<!-- 开发模式:仅在应用或动态应用中显示 -->
|
|
46
|
+
<a-col v-if="show.devMode" :span="12">
|
|
47
|
+
<HoverCard :more="form.meta?.isDev" class="flex flex-wrap items-center">
|
|
48
|
+
<a-form-item
|
|
49
|
+
name="isDev"
|
|
50
|
+
:label-col="{ span: 0 }"
|
|
51
|
+
class="form-item-bottom-0 w-full"
|
|
52
|
+
>
|
|
53
|
+
<div class="flex items-center justify-between">
|
|
54
|
+
<div class="text-sm font-medium">
|
|
55
|
+
开发模式
|
|
56
|
+
</div>
|
|
57
|
+
<a-switch v-model:checked="form.meta!.isDev" />
|
|
58
|
+
</div>
|
|
59
|
+
</a-form-item>
|
|
60
|
+
|
|
61
|
+
<template #more>
|
|
62
|
+
<!-- 开发模式文本:仅在开启开发模式时显示 -->
|
|
63
|
+
<a-form-item
|
|
64
|
+
v-if="form.meta?.isDev"
|
|
65
|
+
label="提示文本"
|
|
66
|
+
name="devText"
|
|
67
|
+
tooltip="此文本将在用户点击开发模式应用时显示在提示框中"
|
|
68
|
+
:label-col="{ style: { fontSize: '12px' } }"
|
|
69
|
+
class="w-full"
|
|
70
|
+
>
|
|
71
|
+
<a-input
|
|
72
|
+
v-model:value="form.meta!.devText"
|
|
73
|
+
placeholder="请输入开发模式下的提示文本"
|
|
74
|
+
:maxlength="100"
|
|
75
|
+
show-count
|
|
76
|
+
size="small"
|
|
77
|
+
/>
|
|
78
|
+
</a-form-item>
|
|
79
|
+
</template>
|
|
80
|
+
</HoverCard>
|
|
81
|
+
</a-col>
|
|
82
|
+
|
|
83
|
+
<a-col v-if="show.iframe" :span="12">
|
|
84
|
+
<a-form-item name="enable" :label-col="{ span: 0 }">
|
|
85
|
+
<HoverCard class="flex items-center justify-between">
|
|
86
|
+
<div class="text-sm font-medium">
|
|
87
|
+
启用缓存
|
|
88
|
+
</div>
|
|
89
|
+
<a-switch v-model:checked="form.meta!.iframeCache" />
|
|
90
|
+
</HoverCard>
|
|
91
|
+
</a-form-item>
|
|
92
|
+
</a-col>
|
|
93
|
+
|
|
94
|
+
<!-- 缓存标签页:仅在菜单中显示 -->
|
|
95
|
+
<a-col v-if="show.cacheAndPin" :span="12">
|
|
96
|
+
<HoverCard :more="form.meta?.cache" class="flex flex-wrap items-center">
|
|
97
|
+
<a-form-item name="cache" :label-col="{ span: 0 }" class="form-item-bottom-0 w-full">
|
|
98
|
+
<div class="flex items-center justify-between">
|
|
99
|
+
<div class="text-sm font-medium">
|
|
100
|
+
缓存标签页
|
|
101
|
+
</div>
|
|
102
|
+
<a-switch v-model:checked="form.meta!.cache" />
|
|
103
|
+
</div>
|
|
104
|
+
</a-form-item>
|
|
105
|
+
|
|
106
|
+
<template #more>
|
|
107
|
+
<a-form-item
|
|
108
|
+
label="指定页缓存"
|
|
109
|
+
name="cacheName"
|
|
110
|
+
tooltip="设置页面name值,前往指定页面时,当前页被缓存"
|
|
111
|
+
:label-col="{ style: { fontSize: '12px', width: '120px' } }"
|
|
112
|
+
class="w-full"
|
|
113
|
+
>
|
|
114
|
+
<a-input
|
|
115
|
+
v-model:value="form.meta!.cacheName"
|
|
116
|
+
placeholder="路由名称(多个用,隔开)"
|
|
117
|
+
size="small"
|
|
118
|
+
/>
|
|
119
|
+
</a-form-item>
|
|
120
|
+
|
|
121
|
+
<a-form-item
|
|
122
|
+
label="指定页不缓存"
|
|
123
|
+
name="cacheName"
|
|
124
|
+
tooltip="设置页面name值,前往指定页面时,当前页不缓存"
|
|
125
|
+
:label-col="{ style: { fontSize: '12px', width: '120px' } }"
|
|
126
|
+
class="w-full"
|
|
127
|
+
>
|
|
128
|
+
<a-input
|
|
129
|
+
v-model:value="form.meta!.noCache"
|
|
130
|
+
placeholder="路由名称(多个用,隔开)"
|
|
131
|
+
size="small"
|
|
132
|
+
/>
|
|
133
|
+
</a-form-item>
|
|
134
|
+
</template>
|
|
135
|
+
</HoverCard>
|
|
136
|
+
</a-col>
|
|
137
|
+
|
|
138
|
+
<!-- 固定标签页:仅在菜单中显示 -->
|
|
139
|
+
<a-col v-if="show.cacheAndPin" :span="12">
|
|
140
|
+
<a-form-item name="pin" :label-col="{ span: 0 }">
|
|
141
|
+
<HoverCard class="flex items-center justify-between">
|
|
142
|
+
<div class="text-sm font-medium">
|
|
143
|
+
固定在标签页
|
|
144
|
+
</div>
|
|
145
|
+
<a-switch v-model:checked="form.meta!.pin" />
|
|
146
|
+
</HoverCard>
|
|
147
|
+
</a-form-item>
|
|
148
|
+
</a-col>
|
|
149
|
+
|
|
150
|
+
<!-- 侧边栏显示:不适用于应用和动态应用 -->
|
|
151
|
+
<a-col v-if="show.sidebar" :span="12">
|
|
152
|
+
<a-form-item name="sidebar" :label-col="{ span: 0 }">
|
|
153
|
+
<HoverCard class="flex items-center justify-between">
|
|
154
|
+
<div class="text-sm font-medium">
|
|
155
|
+
在侧边栏显示
|
|
156
|
+
</div>
|
|
157
|
+
<a-switch v-model:checked="form.meta!.sidebar" />
|
|
158
|
+
</HoverCard>
|
|
159
|
+
</a-form-item>
|
|
160
|
+
</a-col>
|
|
161
|
+
|
|
162
|
+
<!-- 标签栏显示:不适用于应用、动态应用和目录 -->
|
|
163
|
+
<a-col v-if="show.tabbar" :span="12">
|
|
164
|
+
<a-form-item name="tabbar" :label-col="{ span: 0 }">
|
|
165
|
+
<HoverCard class="flex items-center justify-between">
|
|
166
|
+
<div class="text-sm font-medium">
|
|
167
|
+
在标签栏显示
|
|
168
|
+
</div>
|
|
169
|
+
<a-switch v-model:checked="form.meta!.tabbar" />
|
|
170
|
+
</HoverCard>
|
|
171
|
+
</a-form-item>
|
|
172
|
+
</a-col>
|
|
173
|
+
|
|
174
|
+
<a-col v-if="show.breadcrumb" :span="12">
|
|
175
|
+
<a-form-item name="breadcrumb" :label-col="{ span: 0 }">
|
|
176
|
+
<HoverCard class="flex items-center justify-between">
|
|
177
|
+
<div class="text-sm font-medium">
|
|
178
|
+
在面包屑显示
|
|
179
|
+
</div>
|
|
180
|
+
<a-switch v-model:checked="form.meta!.breadcrumb" />
|
|
181
|
+
</HoverCard>
|
|
182
|
+
</a-form-item>
|
|
183
|
+
</a-col>
|
|
184
|
+
|
|
185
|
+
<a-col :span="12">
|
|
186
|
+
<a-form-item name="custom" :label-col="{ span: 0 }">
|
|
187
|
+
<HoverCard class="flex items-center justify-between">
|
|
188
|
+
<div class="text-sm font-medium">
|
|
189
|
+
自定义 meta 数据
|
|
190
|
+
|
|
191
|
+
<span class="text-[rgba(0,0,0,0.45)]">
|
|
192
|
+
<a-tooltip title="自定义的数据在路由的 meta.custom 中获取">
|
|
193
|
+
<QuestionCircleOutlined />
|
|
194
|
+
</a-tooltip>
|
|
195
|
+
</span>
|
|
196
|
+
</div>
|
|
197
|
+
|
|
198
|
+
<JsonEditorModal v-model="form.meta!.custom" title="自定义 meta 数据">
|
|
199
|
+
<template #trigger>
|
|
200
|
+
<a-button type="primary" size="small">
|
|
201
|
+
配置
|
|
202
|
+
</a-button>
|
|
203
|
+
</template>
|
|
204
|
+
</JsonEditorModal>
|
|
205
|
+
</HoverCard>
|
|
206
|
+
</a-form-item>
|
|
207
|
+
</a-col>
|
|
208
|
+
</a-row>
|
|
209
|
+
</div>
|
|
210
|
+
</template>
|
|
211
|
+
|
|
212
|
+
<style lang="css" scoped>
|
|
213
|
+
.form-item-bottom-0, .ant-form-item {
|
|
214
|
+
margin-bottom: 0;
|
|
215
|
+
}
|
|
216
|
+
</style>
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Rule } from 'ant-design-vue/es/form';
|
|
3
|
+
import type { FormExpose } from 'ant-design-vue/es/form/Form';
|
|
4
|
+
import type { AddForm, EditForm, Form, TreeNode } from '../interface';
|
|
5
|
+
import { useToggle } from '@vueuse/core';
|
|
6
|
+
import { message } from 'ant-design-vue';
|
|
7
|
+
import { cloneDeep } from 'lodash-es';
|
|
8
|
+
import { PartyLoginModal } from 'pubinfo-nightly';
|
|
9
|
+
import { getRbacResourceInfo, postRbacResourceAddResource, postRbacResourceResourceUpdate } from '@/api/modules/rbac';
|
|
10
|
+
import { DATA_PERMISSION_TYPE, dataPermissionOptions } from '@/views/data-permission/enum';
|
|
11
|
+
import { ACTION, RESOURCE_COLOR, RESOURCE_TYPE, resourceOptions } from '../enum';
|
|
12
|
+
import { useMetaForm } from '../hooks/useMetaForm';
|
|
13
|
+
import { defaultMeta } from '../model';
|
|
14
|
+
import DynamicRoutesForm from './DynamicRoutesForm.vue';
|
|
15
|
+
import ResourceIconSelect from './IconSelect.vue';
|
|
16
|
+
import LayoutForm from './LayoutForm.vue';
|
|
17
|
+
import MetaForm from './MetaForm.vue';
|
|
18
|
+
|
|
19
|
+
defineOptions({
|
|
20
|
+
name: 'ResourceEdit',
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const props = defineProps<{ dataSource: TreeNode[] }>();
|
|
24
|
+
const emit = defineEmits(['submit']);
|
|
25
|
+
|
|
26
|
+
const [open, setOpen] = useToggle(false);
|
|
27
|
+
const formRef = ref<FormExpose>();
|
|
28
|
+
const form = ref<Partial<Form>>({});
|
|
29
|
+
const state = reactive<{
|
|
30
|
+
title: string
|
|
31
|
+
record: TreeNode
|
|
32
|
+
initData: Partial<Form>
|
|
33
|
+
}>({
|
|
34
|
+
title: '',
|
|
35
|
+
record: {},
|
|
36
|
+
initData: {
|
|
37
|
+
type: RESOURCE_TYPE.DYNAMIC_APP,
|
|
38
|
+
sort: 0,
|
|
39
|
+
enable: true,
|
|
40
|
+
enableDataPermission: false,
|
|
41
|
+
dataPermissionType: DATA_PERMISSION_TYPE.ALL,
|
|
42
|
+
meta: {
|
|
43
|
+
url: '',
|
|
44
|
+
component: '',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const rules: Record<string, Rule[]> = {
|
|
50
|
+
name: [{ required: true, message: '请输入资源名称', trigger: 'blur' }],
|
|
51
|
+
type: [{ required: true, message: '请选择资源类型', trigger: 'change' }],
|
|
52
|
+
code: [{ required: true, message: '请输入资源编码', trigger: 'blur' }],
|
|
53
|
+
sort: [{ type: 'number', required: true, message: '请输入排序', trigger: 'blur' }],
|
|
54
|
+
enable: [{ type: 'boolean', required: true, message: '请选择是否启用', trigger: 'change' }],
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const parentNode = computed(() => {
|
|
58
|
+
return recursiveTreeFind(props.dataSource, node => node.id === form.value.parentId) ?? {};
|
|
59
|
+
});
|
|
60
|
+
function recursiveTreeFind<T extends { children?: T[] }>(tree: T[], fn: (node: T) => boolean) {
|
|
61
|
+
const list = [...tree];
|
|
62
|
+
for (const node of list) {
|
|
63
|
+
if (fn(node)) {
|
|
64
|
+
return node;
|
|
65
|
+
}
|
|
66
|
+
if (node.children) {
|
|
67
|
+
list.push(...node.children);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const resourceComputedOptions = computed(() => {
|
|
74
|
+
switch (parentNode.value?.type) {
|
|
75
|
+
case RESOURCE_TYPE.APP:
|
|
76
|
+
case RESOURCE_TYPE.DYNAMIC_APP:
|
|
77
|
+
return resourceOptions.filter(node => [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(node.value));
|
|
78
|
+
|
|
79
|
+
case RESOURCE_TYPE.INDEX:
|
|
80
|
+
return resourceOptions.filter(node => [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK, RESOURCE_TYPE.NON_MENU].includes(node.value));
|
|
81
|
+
|
|
82
|
+
case RESOURCE_TYPE.MENU:
|
|
83
|
+
case RESOURCE_TYPE.NON_MENU:
|
|
84
|
+
return resourceOptions.filter(node => [RESOURCE_TYPE.BUTTON, RESOURCE_TYPE.NON_MENU].includes(node.value));
|
|
85
|
+
|
|
86
|
+
case RESOURCE_TYPE.BUTTON:
|
|
87
|
+
case RESOURCE_TYPE.IFRAME:
|
|
88
|
+
case RESOURCE_TYPE.LINK:
|
|
89
|
+
return [];
|
|
90
|
+
|
|
91
|
+
default:
|
|
92
|
+
return resourceOptions.filter(node => [RESOURCE_TYPE.APP, RESOURCE_TYPE.DYNAMIC_APP].includes(node.value));
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const { show, resetIncompatibleOptions } = useMetaForm(form);
|
|
97
|
+
|
|
98
|
+
// 计算第三方登录的目标URL (iframe或link地址)
|
|
99
|
+
const partyLoginTargetUrl = computed(() => {
|
|
100
|
+
return form.value.meta?.iframe || form.value.meta?.link || '';
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const [formLoading, setFormLoading] = useToggle(false);
|
|
104
|
+
async function onOpen(key: ACTION, record?: Form) {
|
|
105
|
+
state.title = key;
|
|
106
|
+
form.value = cloneDeep(state.initData);
|
|
107
|
+
setOpen(true);
|
|
108
|
+
|
|
109
|
+
try {
|
|
110
|
+
setFormLoading(true);
|
|
111
|
+
if (key === ACTION.ADD_CHILD) {
|
|
112
|
+
form.value.parentId = record?.id as string;
|
|
113
|
+
form.value.type = resourceComputedOptions.value[0].value;
|
|
114
|
+
|
|
115
|
+
// 清除不适用于当前资源类型的配置项,确保业务逻辑一致性
|
|
116
|
+
resetIncompatibleOptions();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (key === ACTION.EDIT) {
|
|
120
|
+
const res = await getRbacResourceInfo({ id: record?.id as string });
|
|
121
|
+
if (res.success) {
|
|
122
|
+
form.value = res.data ?? {};
|
|
123
|
+
// 合并默认 meta 对象和返回的 meta 对象,form.value.meta 优先
|
|
124
|
+
form.value.meta = { ...defaultMeta, ...res.data?.meta };
|
|
125
|
+
|
|
126
|
+
// 确保编辑现有资源时也遵循业务规则约束
|
|
127
|
+
resetIncompatibleOptions();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
setFormLoading(false);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const [loading, setLoading] = useToggle(false);
|
|
137
|
+
function onSubmit() {
|
|
138
|
+
formRef.value?.validate().then(() => {
|
|
139
|
+
const params = cloneDeep({
|
|
140
|
+
...form.value,
|
|
141
|
+
icon: form.value.icon || undefined,
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
// app, 目录等不参与数据权限筛选
|
|
145
|
+
if (!show.value.dataPermission) {
|
|
146
|
+
params.enableDataPermission = false;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 如果是开发模式的应用,给出警告提示
|
|
150
|
+
if (show.value.devMode && form.value.meta?.isDev) {
|
|
151
|
+
console.warn('开发模式应用的子路由将不会在生产环境中注册到vue-router,请确保这是预期行为。');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// 处理 cache 相关逻辑
|
|
155
|
+
if (params.meta?.cache) {
|
|
156
|
+
if (params.meta.cacheName) {
|
|
157
|
+
params.meta.cache = params.meta.cacheName.split(',');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (params.meta?.noCache) {
|
|
162
|
+
params.meta.noCache = params.meta.noCache.split(',');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (!params.meta?.cache) {
|
|
166
|
+
delete params?.meta?.noCache;
|
|
167
|
+
}
|
|
168
|
+
delete params?.meta?.cacheName;
|
|
169
|
+
|
|
170
|
+
// 可以在提交前检查目录下是否有有效的子菜单,如果没有则给出提示
|
|
171
|
+
// 这部分逻辑可能需要额外的API调用来检查子资源
|
|
172
|
+
|
|
173
|
+
const promise
|
|
174
|
+
= state.title === ACTION.EDIT
|
|
175
|
+
? postRbacResourceResourceUpdate(params as EditForm)
|
|
176
|
+
: postRbacResourceAddResource({ parentId: '', ...params } as AddForm);
|
|
177
|
+
setLoading(true);
|
|
178
|
+
promise
|
|
179
|
+
.then((res) => {
|
|
180
|
+
if (res?.success) {
|
|
181
|
+
message.success(`${state.title}成功!`);
|
|
182
|
+
setOpen(false);
|
|
183
|
+
emit('submit');
|
|
184
|
+
}
|
|
185
|
+
})
|
|
186
|
+
.finally(() => setLoading(false));
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
defineExpose({
|
|
191
|
+
open: onOpen,
|
|
192
|
+
});
|
|
193
|
+
</script>
|
|
194
|
+
|
|
195
|
+
<template>
|
|
196
|
+
<a-drawer
|
|
197
|
+
v-model:open="open"
|
|
198
|
+
:title="state.title"
|
|
199
|
+
placement="right"
|
|
200
|
+
:width="800"
|
|
201
|
+
destroy-on-close
|
|
202
|
+
:footer-style="{ textAlign: 'right' }"
|
|
203
|
+
>
|
|
204
|
+
<a-spin :spinning="formLoading">
|
|
205
|
+
<a-form
|
|
206
|
+
ref="formRef"
|
|
207
|
+
:model="form"
|
|
208
|
+
:rules="rules"
|
|
209
|
+
:label-col="{ style: { width: '100px' } }"
|
|
210
|
+
>
|
|
211
|
+
<a-row :gutter="8">
|
|
212
|
+
<a-col v-if="parentNode?.name" :span="24">
|
|
213
|
+
<a-form-item name="parentId">
|
|
214
|
+
<template #label>
|
|
215
|
+
<DatabaseOutlined class="mr-1" />
|
|
216
|
+
父资源
|
|
217
|
+
</template>
|
|
218
|
+
{{ parentNode?.name }}
|
|
219
|
+
</a-form-item>
|
|
220
|
+
</a-col>
|
|
221
|
+
<a-col :span="24">
|
|
222
|
+
<a-form-item label="资源类型" name="type" :tooltip="!parentNode?.type ? '动态应用为后端路由,应用为前端路由' : ''">
|
|
223
|
+
<div
|
|
224
|
+
v-if="state.title === ACTION.EDIT"
|
|
225
|
+
class="flex items-center space-x-1"
|
|
226
|
+
>
|
|
227
|
+
<a-tag v-if="form.type" :color="RESOURCE_COLOR[Number(form.type)]" :bordered="false">
|
|
228
|
+
{{ resourceComputedOptions.find(e => e.value === form.type)?.label }}
|
|
229
|
+
</a-tag>
|
|
230
|
+
</div>
|
|
231
|
+
<a-radio-group
|
|
232
|
+
v-else
|
|
233
|
+
v-model:value="form.type"
|
|
234
|
+
:options="resourceComputedOptions"
|
|
235
|
+
option-type="button"
|
|
236
|
+
button-style="solid"
|
|
237
|
+
/>
|
|
238
|
+
</a-form-item>
|
|
239
|
+
</a-col>
|
|
240
|
+
<a-col :span="24">
|
|
241
|
+
<ResourceIconSelect v-model="form" />
|
|
242
|
+
</a-col>
|
|
243
|
+
</a-row>
|
|
244
|
+
<a-row :gutter="8">
|
|
245
|
+
<a-col :span="12">
|
|
246
|
+
<a-form-item label="资源名称" name="name">
|
|
247
|
+
<a-input v-model:value="form.name" placeholder="请输入资源名称" :maxlength="128" />
|
|
248
|
+
</a-form-item>
|
|
249
|
+
</a-col>
|
|
250
|
+
|
|
251
|
+
<DynamicRoutesForm v-model="form" :parent="parentNode" />
|
|
252
|
+
|
|
253
|
+
<a-col :span="12">
|
|
254
|
+
<a-form-item label="资源编码" name="code">
|
|
255
|
+
<a-input v-model:value="form.code" placeholder="请输入资源编码(权限码)" :maxlength="50" />
|
|
256
|
+
</a-form-item>
|
|
257
|
+
</a-col>
|
|
258
|
+
|
|
259
|
+
<a-col :span="12">
|
|
260
|
+
<a-form-item label="接口权限" name="permissionCode">
|
|
261
|
+
<a-input v-model:value="form.permissionCode" placeholder="请输入接口权限(接口地址,多个使用逗号分隔)" :maxlength="256" />
|
|
262
|
+
</a-form-item>
|
|
263
|
+
</a-col>
|
|
264
|
+
|
|
265
|
+
<a-col :span="12">
|
|
266
|
+
<a-form-item label="显示顺序" name="sort">
|
|
267
|
+
<a-input-number v-model:value="form.sort" :max="999" />
|
|
268
|
+
</a-form-item>
|
|
269
|
+
</a-col>
|
|
270
|
+
</a-row>
|
|
271
|
+
|
|
272
|
+
<a-row v-if="show.dynamic" :gutter="8">
|
|
273
|
+
<a-col :span="24">
|
|
274
|
+
<a-form-item label="对接第三方" name="description" :label-col="{ span: 3 }">
|
|
275
|
+
<PartyLoginModal v-model="form.meta!.partyLogin" :target-url="partyLoginTargetUrl">
|
|
276
|
+
<template #trigger>
|
|
277
|
+
<a-input
|
|
278
|
+
:value="form.meta!.partyLogin && form.meta!.partyLogin.length > 0 ? '已配置第三方登录流程' : ''"
|
|
279
|
+
placeholder="配置第三方登录流程"
|
|
280
|
+
readonly
|
|
281
|
+
/>
|
|
282
|
+
</template>
|
|
283
|
+
</PartyLoginModal>
|
|
284
|
+
</a-form-item>
|
|
285
|
+
</a-col>
|
|
286
|
+
</a-row>
|
|
287
|
+
|
|
288
|
+
<a-row :gutter="8">
|
|
289
|
+
<a-col :span="24">
|
|
290
|
+
<a-form-item label="描述" name="description" :label-col="{ span: 3 }">
|
|
291
|
+
<a-textarea
|
|
292
|
+
v-model:value="form.description"
|
|
293
|
+
placeholder="请输入描述"
|
|
294
|
+
:maxlength="255"
|
|
295
|
+
:auto-size="{ minRows: 2 }"
|
|
296
|
+
show-count
|
|
297
|
+
/>
|
|
298
|
+
</a-form-item>
|
|
299
|
+
</a-col>
|
|
300
|
+
</a-row>
|
|
301
|
+
|
|
302
|
+
<a-row v-if="show.dataPermission" :gutter="8">
|
|
303
|
+
<a-col :span="8">
|
|
304
|
+
<a-form-item label="启用数据权限" name="enableDataPermission">
|
|
305
|
+
<a-switch v-model:checked="form.enableDataPermission" />
|
|
306
|
+
</a-form-item>
|
|
307
|
+
</a-col>
|
|
308
|
+
<a-col :span="16">
|
|
309
|
+
<a-form-item v-if="form.enableDataPermission" label="数据权限规则" name="dataPermissionType">
|
|
310
|
+
<a-select v-model:value="form.dataPermissionType" :options="dataPermissionOptions" />
|
|
311
|
+
</a-form-item>
|
|
312
|
+
</a-col>
|
|
313
|
+
</a-row>
|
|
314
|
+
|
|
315
|
+
<MetaForm v-model="form" />
|
|
316
|
+
<LayoutForm v-model="form" />
|
|
317
|
+
</a-form>
|
|
318
|
+
</a-spin>
|
|
319
|
+
|
|
320
|
+
<template #footer>
|
|
321
|
+
<a-space>
|
|
322
|
+
<a-button @click="setOpen(false)">
|
|
323
|
+
取消
|
|
324
|
+
</a-button>
|
|
325
|
+
<a-button type="primary" :loading="loading" @click="onSubmit()">
|
|
326
|
+
提交
|
|
327
|
+
</a-button>
|
|
328
|
+
</a-space>
|
|
329
|
+
</template>
|
|
330
|
+
</a-drawer>
|
|
331
|
+
</template>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ColumnsType } from 'ant-design-vue/es/table';
|
|
3
|
+
import type { TreeNode } from '../interface';
|
|
4
|
+
import { useToggle } from '@vueuse/core';
|
|
5
|
+
import { useRequest } from 'alova/client';
|
|
6
|
+
import { theme } from 'ant-design-vue';
|
|
7
|
+
import { getRbacResourceGetRoleListByResourceId } from '@/api/modules/rbac';
|
|
8
|
+
|
|
9
|
+
defineOptions({
|
|
10
|
+
name: 'RoleRelation',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const { token } = theme.useToken();
|
|
14
|
+
|
|
15
|
+
const [open, setOpen] = useToggle(false);
|
|
16
|
+
const { loading, data: dataSource, send } = useRequest(
|
|
17
|
+
params => getRbacResourceGetRoleListByResourceId(params, {
|
|
18
|
+
transform(data) {
|
|
19
|
+
return data.data ?? [];
|
|
20
|
+
},
|
|
21
|
+
}),
|
|
22
|
+
{ immediate: false },
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
const columns: ColumnsType<API.PubRoleBo> = [
|
|
26
|
+
{
|
|
27
|
+
title: '角色名称',
|
|
28
|
+
dataIndex: 'name',
|
|
29
|
+
ellipsis: true,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: '创建人',
|
|
33
|
+
dataIndex: 'createUserName',
|
|
34
|
+
width: 180,
|
|
35
|
+
ellipsis: true,
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
function onOpen(record: TreeNode) {
|
|
40
|
+
setOpen(true);
|
|
41
|
+
send({ id: record.id });
|
|
42
|
+
computeTableHeight();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const tableHeight = computed(() => {
|
|
46
|
+
return window.innerHeight
|
|
47
|
+
- 57 // Drawer header
|
|
48
|
+
- 48 // Drawer padding
|
|
49
|
+
- 55 // Table header
|
|
50
|
+
- 64; // Table pagination
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
function computeTableHeightHandler() {
|
|
54
|
+
nextTick(() => {
|
|
55
|
+
const tableBody = document.querySelector('.role-relation')?.querySelector<HTMLElement>('.ant-table-body');
|
|
56
|
+
if (tableBody) {
|
|
57
|
+
tableBody.style.height = `${tableHeight.value}px`;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function computeTableHeight() {
|
|
63
|
+
nextTick(computeTableHeightHandler);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
defineExpose({
|
|
67
|
+
open: onOpen,
|
|
68
|
+
});
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<a-drawer
|
|
73
|
+
v-model:open="open"
|
|
74
|
+
title="分配查看"
|
|
75
|
+
placement="right"
|
|
76
|
+
:width="520"
|
|
77
|
+
:footer-style="{ textAlign: 'right' }"
|
|
78
|
+
>
|
|
79
|
+
<a-table
|
|
80
|
+
row-key="id"
|
|
81
|
+
:loading="loading"
|
|
82
|
+
:columns="columns"
|
|
83
|
+
:data-source="dataSource"
|
|
84
|
+
:scroll="{ y: `${tableHeight}px` }"
|
|
85
|
+
:pagination="{ defaultPageSize: 20, showSizeChanger: true }"
|
|
86
|
+
class="role-relation"
|
|
87
|
+
>
|
|
88
|
+
<template #bodyCell="{ column, text }">
|
|
89
|
+
<template v-if="column.dataIndex === 'name'">
|
|
90
|
+
<div class="w-full truncate space-x-2">
|
|
91
|
+
<a-avatar size="small" :style="{ backgroundColor: token.colorPrimary }">
|
|
92
|
+
{{ text[0] }}
|
|
93
|
+
</a-avatar>
|
|
94
|
+
<span>{{ text }}</span>
|
|
95
|
+
</div>
|
|
96
|
+
</template>
|
|
97
|
+
</template>
|
|
98
|
+
</a-table>
|
|
99
|
+
</a-drawer>
|
|
100
|
+
</template>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RESOURCE_TYPE } from 'pubinfo-nightly';
|
|
2
|
+
|
|
3
|
+
/** 操作按钮 */
|
|
4
|
+
export enum ACTION {
|
|
5
|
+
/** 分配查看 */
|
|
6
|
+
ROLE_RELATION = '分配查看',
|
|
7
|
+
/** 新建 */
|
|
8
|
+
ADD = '新建',
|
|
9
|
+
/** 新建下级 */
|
|
10
|
+
ADD_CHILD = '新建下级',
|
|
11
|
+
/** 导入/导出 */
|
|
12
|
+
IMPORT_EXPORT = '导入 / 导出',
|
|
13
|
+
/** 修改 */
|
|
14
|
+
EDIT = '修改',
|
|
15
|
+
/** 删除 */
|
|
16
|
+
REMOVE = '删除',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { RESOURCE_TYPE };
|
|
20
|
+
|
|
21
|
+
export const RESOURCE_ICON = ['', 'app', 'index', 'menu', 'btn', 'nonmenu', 'micro', 'dynamic', 'iframe', 'link'];
|
|
22
|
+
export const RESOURCE_COLOR = ['', 'geekblue', 'blue', 'default', 'cyan', 'default', 'geekblue', 'geekblue', 'default', 'default'];
|
|
23
|
+
|
|
24
|
+
export const resourceOptions = [
|
|
25
|
+
{ label: '动态应用', value: RESOURCE_TYPE.DYNAMIC_APP },
|
|
26
|
+
{ label: '应用', value: RESOURCE_TYPE.APP },
|
|
27
|
+
{ label: '目录', value: RESOURCE_TYPE.INDEX },
|
|
28
|
+
{ label: '菜单', value: RESOURCE_TYPE.MENU },
|
|
29
|
+
{ label: '按钮', value: RESOURCE_TYPE.BUTTON },
|
|
30
|
+
{ label: '非菜单页', value: RESOURCE_TYPE.NON_MENU },
|
|
31
|
+
{ label: '内嵌', value: RESOURCE_TYPE.IFRAME },
|
|
32
|
+
{ label: '外链', value: RESOURCE_TYPE.LINK },
|
|
33
|
+
];
|