@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,24 @@
|
|
|
1
|
+
export enum ACTION {
|
|
2
|
+
/** 新增 */
|
|
3
|
+
ADD = '新增',
|
|
4
|
+
/** 编辑 */
|
|
5
|
+
EDIT = '编辑',
|
|
6
|
+
/** 删除 */
|
|
7
|
+
REMOVE = '删除',
|
|
8
|
+
/** 新建下级 */
|
|
9
|
+
ADDNEXT = '新建下级',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum RANGE {
|
|
13
|
+
/** 省 */
|
|
14
|
+
PROVINCE = '1',
|
|
15
|
+
/** 市 */
|
|
16
|
+
CITY = '2',
|
|
17
|
+
/** 区/县 */
|
|
18
|
+
COUNTY = '3',
|
|
19
|
+
}
|
|
20
|
+
export const rangeOptions = [
|
|
21
|
+
{ label: '省', value: RANGE.PROVINCE },
|
|
22
|
+
{ label: '市', value: RANGE.CITY },
|
|
23
|
+
{ label: '区/县', value: RANGE.COUNTY },
|
|
24
|
+
];
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
<script setup lang="tsx">
|
|
2
|
+
import type { ProColumns } from '@pubinfo/pro-components';
|
|
3
|
+
import type { Key } from 'ant-design-vue/es/vc-table/interface';
|
|
4
|
+
import { ProTable } from '@pubinfo/pro-components';
|
|
5
|
+
import { message, Modal } from 'ant-design-vue';
|
|
6
|
+
import { cloneDeep } from 'lodash-es';
|
|
7
|
+
import { getRegionDeleteRegionByCode, getRegionGetListByParentId } from '@/api/modules/assist';
|
|
8
|
+
import DrawerRegion from './components/drawerRegion.vue';
|
|
9
|
+
import { ACTION } from './enum';
|
|
10
|
+
|
|
11
|
+
defineOptions({
|
|
12
|
+
name: 'RegionManage',
|
|
13
|
+
});
|
|
14
|
+
const { auth } = useAuth();
|
|
15
|
+
|
|
16
|
+
type TreeNode = API.PubRegion & {
|
|
17
|
+
children?: TreeNode[]
|
|
18
|
+
};
|
|
19
|
+
const query = ref<API.getRegionGetListByParentIdParams>({ parentId: '' });
|
|
20
|
+
|
|
21
|
+
const data: Ref<TreeNode[]> = ref([]);
|
|
22
|
+
const chilData = ref<TreeNode>({});
|
|
23
|
+
|
|
24
|
+
const tableRef = ref<typeof ProTable>();
|
|
25
|
+
const drawerRegionRef = ref<InstanceType<typeof DrawerRegion>>();
|
|
26
|
+
|
|
27
|
+
// 刷新数据展开未重置的问题
|
|
28
|
+
const expandedRowKeys = ref<Key[]>([]);
|
|
29
|
+
function expandedRowsChange(expandedRows: Key[]): void {
|
|
30
|
+
expandedRowKeys.value = expandedRows;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const columns: ProColumns<TreeNode> = [
|
|
34
|
+
{
|
|
35
|
+
minWidth: 240,
|
|
36
|
+
title: '区域名称',
|
|
37
|
+
dataIndex: 'name',
|
|
38
|
+
ellipsis: true,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
minWidth: 100,
|
|
42
|
+
title: '区域范围',
|
|
43
|
+
dataIndex: 'type',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
minWidth: 140,
|
|
47
|
+
title: '行政区划编码',
|
|
48
|
+
dataIndex: 'code',
|
|
49
|
+
ellipsis: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
minWidth: 100,
|
|
53
|
+
title: '区域编码',
|
|
54
|
+
dataIndex: 'regionCode',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
minWidth: 100,
|
|
58
|
+
title: '显示顺序',
|
|
59
|
+
dataIndex: 'sort',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
hideInSearch: true,
|
|
63
|
+
title: '操作',
|
|
64
|
+
dataIndex: 'action',
|
|
65
|
+
width: 240,
|
|
66
|
+
fixed: 'right',
|
|
67
|
+
hideInTable() {
|
|
68
|
+
return !auth([
|
|
69
|
+
'region_add_child',
|
|
70
|
+
'region_edit',
|
|
71
|
+
'region_remove',
|
|
72
|
+
]);
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
];
|
|
76
|
+
|
|
77
|
+
function onAction(key: string, record?: TreeNode): void {
|
|
78
|
+
switch (key) {
|
|
79
|
+
case ACTION.ADDNEXT:
|
|
80
|
+
query.value.parentId = record!.id;
|
|
81
|
+
chilData.value = record!;
|
|
82
|
+
drawerRegionRef.value?.open(key, record);
|
|
83
|
+
break;
|
|
84
|
+
case ACTION.ADD:
|
|
85
|
+
query.value.parentId = '';
|
|
86
|
+
chilData.value = {};
|
|
87
|
+
drawerRegionRef.value?.open(key);
|
|
88
|
+
break;
|
|
89
|
+
case ACTION.EDIT:
|
|
90
|
+
query.value.parentId = record!.parentId;
|
|
91
|
+
chilData.value = getNodeById(data.value, query.value.parentId!);
|
|
92
|
+
drawerRegionRef.value?.open(key, record);
|
|
93
|
+
break;
|
|
94
|
+
case ACTION.REMOVE:
|
|
95
|
+
query.value.parentId = record!.parentId;
|
|
96
|
+
chilData.value = getNodeById(data.value, query.value.parentId!);
|
|
97
|
+
Modal.confirm({
|
|
98
|
+
title: '删除',
|
|
99
|
+
content: '确定要删除该区域吗?',
|
|
100
|
+
onOk() {
|
|
101
|
+
getRegionDeleteRegionByCode({ code: record!.code! })
|
|
102
|
+
.then((res: API.ResponseDataBoolean) => {
|
|
103
|
+
if (res.success) {
|
|
104
|
+
message.success('删除成功');
|
|
105
|
+
getRegionData();
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* 获取表格数据 */
|
|
115
|
+
async function request() {
|
|
116
|
+
const res = await getRegionGetListByParentId({
|
|
117
|
+
...query.value,
|
|
118
|
+
});
|
|
119
|
+
if (chilData.value && Object.keys(chilData.value).length > 0) {
|
|
120
|
+
const length = res.data!.length;
|
|
121
|
+
if (length > 0) {
|
|
122
|
+
chilData.value.children = res.data?.map((e: API.PubRegion) => {
|
|
123
|
+
return {
|
|
124
|
+
...e,
|
|
125
|
+
children: e.isLeaf ? undefined : [],
|
|
126
|
+
};
|
|
127
|
+
}) as TreeNode[];
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
chilData.value.children = undefined;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
expandedRowKeys.value = [];
|
|
135
|
+
data.value = res.data?.map((e: API.PubRegion) => {
|
|
136
|
+
return {
|
|
137
|
+
...e,
|
|
138
|
+
children: e.isLeaf ? undefined : [],
|
|
139
|
+
};
|
|
140
|
+
}) as TreeNode[];
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
success: true,
|
|
144
|
+
data: data.value,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/* 表格中父节点展开 */
|
|
149
|
+
function expand(flag: boolean, data: TreeNode) {
|
|
150
|
+
const dataTemp = cloneDeep(data);
|
|
151
|
+
if (flag) {
|
|
152
|
+
if (dataTemp.children?.length === 0) {
|
|
153
|
+
query.value.parentId = data.id;
|
|
154
|
+
chilData.value = data;
|
|
155
|
+
tableRef.value?.fetch();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* 新建或者编辑后刷新列表 */
|
|
161
|
+
function getRegionData() {
|
|
162
|
+
tableRef.value?.reload();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* 获取某节点的信息 */
|
|
166
|
+
function getNodeById(nodes: TreeNode[], id: string): any {
|
|
167
|
+
for (const node of nodes) {
|
|
168
|
+
if (node.id === id) {
|
|
169
|
+
return node;
|
|
170
|
+
}
|
|
171
|
+
if (node.children) {
|
|
172
|
+
const foundNode = getNodeById(node.children, id);
|
|
173
|
+
if (foundNode) {
|
|
174
|
+
return foundNode;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
</script>
|
|
181
|
+
|
|
182
|
+
<template>
|
|
183
|
+
<div
|
|
184
|
+
w-full
|
|
185
|
+
h-full
|
|
186
|
+
py-10px
|
|
187
|
+
px-10px
|
|
188
|
+
>
|
|
189
|
+
<ProTable
|
|
190
|
+
ref="tableRef"
|
|
191
|
+
row-key="id"
|
|
192
|
+
:search="false"
|
|
193
|
+
:request="request"
|
|
194
|
+
:columns="columns"
|
|
195
|
+
:data-source="data"
|
|
196
|
+
:pagination="false"
|
|
197
|
+
auto-height
|
|
198
|
+
:expanded-row-keys="expandedRowKeys"
|
|
199
|
+
:scroll="{ x: 1100 }"
|
|
200
|
+
@expanded-rows-change="expandedRowsChange"
|
|
201
|
+
@expand="expand"
|
|
202
|
+
>
|
|
203
|
+
<template #toolbar>
|
|
204
|
+
<a-button v-auth="'region_add'" type="primary" @click="onAction(ACTION.ADD)">
|
|
205
|
+
<PlusCircleOutlined />
|
|
206
|
+
{{ ACTION.ADD }}
|
|
207
|
+
</a-button>
|
|
208
|
+
</template>
|
|
209
|
+
<template #bodyCell="{ column, record }">
|
|
210
|
+
<template v-if="column.dataIndex === 'action'">
|
|
211
|
+
<a-space>
|
|
212
|
+
<a
|
|
213
|
+
v-auth="'region_add_child'"
|
|
214
|
+
class="flex items-center"
|
|
215
|
+
@click="onAction(ACTION.ADDNEXT, record)"
|
|
216
|
+
>
|
|
217
|
+
<PubinfoIcon name="add-child" class="text-base" />
|
|
218
|
+
<span class="ml-4px">{{ ACTION.ADDNEXT }}</span>
|
|
219
|
+
</a>
|
|
220
|
+
<a
|
|
221
|
+
v-auth="'region_edit'"
|
|
222
|
+
class="flex items-center"
|
|
223
|
+
@click="onAction(ACTION.EDIT, record)"
|
|
224
|
+
>
|
|
225
|
+
<PubinfoIcon name="edit" class="text-base" />
|
|
226
|
+
<span class="ml-4px">{{ ACTION.EDIT }}</span>
|
|
227
|
+
</a>
|
|
228
|
+
<span
|
|
229
|
+
v-auth="'region_remove'"
|
|
230
|
+
class="flex items-center text-red-500 hover:cursor-pointer hover:opacity-80"
|
|
231
|
+
@click="onAction(ACTION.REMOVE, record)"
|
|
232
|
+
>
|
|
233
|
+
<PubinfoIcon name="remove" class="text-base" />
|
|
234
|
+
<span class="ml-4px">{{ ACTION.REMOVE }}</span>
|
|
235
|
+
</span>
|
|
236
|
+
</a-space>
|
|
237
|
+
</template>
|
|
238
|
+
</template>
|
|
239
|
+
</ProTable>
|
|
240
|
+
<DrawerRegion
|
|
241
|
+
ref="drawerRegionRef"
|
|
242
|
+
:tree-data="data"
|
|
243
|
+
@submit="getRegionData()"
|
|
244
|
+
/>
|
|
245
|
+
</div>
|
|
246
|
+
</template>
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TreeProps } from 'ant-design-vue';
|
|
3
|
+
import { CaretDownOutlined } from '@ant-design/icons-vue';
|
|
4
|
+
import * as popover from '@destyler/popover';
|
|
5
|
+
import { normalizeProps, useMachine } from '@destyler/vue';
|
|
6
|
+
import { Empty } from 'ant-design-vue';
|
|
7
|
+
import ComponentsIcones from '@/components/DirectoryIcones/ComponentsIcones.vue';
|
|
8
|
+
import FolderIcones from '@/components/DirectoryIcones/FolderIcones.vue';
|
|
9
|
+
import ModuleIcones from '@/components/DirectoryIcones/ModuleIcones.vue';
|
|
10
|
+
import PackagesIcones from '@/components/DirectoryIcones/PackagesIcones.vue';
|
|
11
|
+
import SrcIcones from '@/components/DirectoryIcones/SrcIcones.vue';
|
|
12
|
+
import ViewIcones from '@/components/DirectoryIcones/ViewIcones.vue';
|
|
13
|
+
import VueIcones from '@/components/DirectoryIcones/VueIcones.vue';
|
|
14
|
+
import { useViewStore } from '@/stores/view';
|
|
15
|
+
|
|
16
|
+
defineOptions({
|
|
17
|
+
name: 'ComponentSelect',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
|
21
|
+
|
|
22
|
+
// 使用 Pinia store
|
|
23
|
+
const viewStore = useViewStore();
|
|
24
|
+
|
|
25
|
+
const moduleValue = defineModel<string>({
|
|
26
|
+
default: '',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const scope = defineModel<string>('scope', {
|
|
30
|
+
default: '',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const searchInputEl = useTemplateRef<HTMLInputElement>('searchInputRef');
|
|
34
|
+
|
|
35
|
+
const [state, send] = useMachine(popover.machine({
|
|
36
|
+
id: useId(),
|
|
37
|
+
initialFocusEl: () => searchInputEl.value,
|
|
38
|
+
}));
|
|
39
|
+
const api = computed(() => popover.connect(state.value, send, normalizeProps));
|
|
40
|
+
|
|
41
|
+
const visibleRef: Ref<boolean> = ref<boolean>(false);
|
|
42
|
+
// 搜索关键字
|
|
43
|
+
const searchQuery = ref('');
|
|
44
|
+
|
|
45
|
+
// 计算:由输入框当前值与作用域,推导目录树的选中节点 key
|
|
46
|
+
// 约定:根 key 为 'local' 或 'module:<id>',叶子 key = `${root}/${path}`
|
|
47
|
+
const selectedKeys = computed<string[]>(() => {
|
|
48
|
+
if (!moduleValue.value) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const prefix = scope.value ? `module:${scope.value}` : 'local';
|
|
52
|
+
return [`${prefix}/${moduleValue.value}`];
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// 手风琴展开:控制顶层(local、module:<id>)仅展开一个
|
|
56
|
+
const expandedKeysRef = ref<string[]>([]);
|
|
57
|
+
|
|
58
|
+
function isRootKey(key: string) {
|
|
59
|
+
// 根 key 无分隔符:'local' 或 'module:<id>'
|
|
60
|
+
return !key.includes('/');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function getRootKeyFromPathKey(key: string) {
|
|
64
|
+
// 从 'local/...' 或 'module:<id>/...' 提取根 key
|
|
65
|
+
const idx = key.indexOf('/');
|
|
66
|
+
return idx === -1 ? key : key.slice(0, idx);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 从选中叶子节点的完整 key 生成展开链(父级链,不含叶子本身)。
|
|
71
|
+
* 例如:'local/a/b/c' -> ['local', 'local/a', 'local/a/b']
|
|
72
|
+
*/
|
|
73
|
+
function getExpansionChainFromSelected(key: string) {
|
|
74
|
+
const parts = key.split('/');
|
|
75
|
+
const chain: string[] = [];
|
|
76
|
+
let acc = '';
|
|
77
|
+
// 到倒数第二段(父节点)即可;叶子无需加入 expandedKeys
|
|
78
|
+
for (let i = 0; i < Math.max(0, parts.length - 1); i++) {
|
|
79
|
+
const seg = parts[i];
|
|
80
|
+
acc = i === 0 ? seg : `${acc}/${seg}`;
|
|
81
|
+
chain.push(acc);
|
|
82
|
+
}
|
|
83
|
+
return chain;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 子层级允许多级展开(以便能展开到选中路径)。
|
|
88
|
+
*/
|
|
89
|
+
function onExpand(nextKeys: (string | number)[], e: any) {
|
|
90
|
+
const keys = (nextKeys as string[]) || [];
|
|
91
|
+
const nodeKey: string | undefined = e?.node?.key;
|
|
92
|
+
const expanded: boolean = !!e?.expanded;
|
|
93
|
+
|
|
94
|
+
let rootToKeep: string | undefined;
|
|
95
|
+
if (nodeKey && isRootKey(nodeKey)) {
|
|
96
|
+
rootToKeep = expanded ? nodeKey : undefined;
|
|
97
|
+
}
|
|
98
|
+
else if (nodeKey) {
|
|
99
|
+
rootToKeep = getRootKeyFromPathKey(nodeKey);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
rootToKeep = keys.find(isRootKey);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const filtered = keys.filter(k => !isRootKey(String(k)) || String(k) === rootToKeep);
|
|
106
|
+
expandedKeysRef.value = filtered as string[];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 抽取:根据当前选中路径展开到对应层级
|
|
110
|
+
function expandToSelected() {
|
|
111
|
+
const first = selectedKeys.value[0];
|
|
112
|
+
if (!first) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const chain = getExpansionChainFromSelected(first);
|
|
116
|
+
expandedKeysRef.value = chain;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// 手风琴效果:当选中项变化时,展开到对应层级
|
|
120
|
+
watch(selectedKeys, () => {
|
|
121
|
+
expandToSelected();
|
|
122
|
+
}, { immediate: true });
|
|
123
|
+
|
|
124
|
+
// 弹层再次打开时,若之前被手动折叠,重新展开到选中层级
|
|
125
|
+
watch(visibleRef, (open) => {
|
|
126
|
+
if (open) {
|
|
127
|
+
expandToSelected();
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// 弹层再次打开时,若之前被手动折叠,重新展开到选中层级
|
|
132
|
+
watch(visibleRef, (open) => {
|
|
133
|
+
if (open) {
|
|
134
|
+
expandToSelected();
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
// 从 store 获取树数据并支持搜索过滤
|
|
139
|
+
const displayedTreeData = computed<TreeProps['treeData']>(() => {
|
|
140
|
+
const q = searchQuery.value.trim();
|
|
141
|
+
if (!q) {
|
|
142
|
+
return viewStore.getRouteTreeData() as unknown as TreeProps['treeData'];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return viewStore.filterRouteTree(q) as unknown as TreeProps['treeData'];
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// 收集非叶子节点 key,用于搜索时全部展开
|
|
149
|
+
function collectNonLeafKeys(nodes: any[]): string[] {
|
|
150
|
+
const keys: string[] = [];
|
|
151
|
+
const dfs = (ns: any[]) => {
|
|
152
|
+
for (const n of ns || []) {
|
|
153
|
+
const hasChildren = Array.isArray(n?.children) && n.children.length > 0;
|
|
154
|
+
if (hasChildren) {
|
|
155
|
+
keys.push(String(n.key));
|
|
156
|
+
dfs(n.children);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
dfs(nodes);
|
|
161
|
+
return keys;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// 搜索展开控制:有关键字时展开所有非叶节点,清空时回到选中项展开
|
|
165
|
+
watch(searchQuery, (q) => {
|
|
166
|
+
const hasQ = String(q || '').trim().length > 0;
|
|
167
|
+
if (hasQ) {
|
|
168
|
+
const data = displayedTreeData.value as any[];
|
|
169
|
+
expandedKeysRef.value = collectNonLeafKeys(data);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
expandToSelected();
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// 选择项:回填路径与作用域,并关闭弹层
|
|
177
|
+
function onSelect(keys: (string | number)[], e: any) {
|
|
178
|
+
const node = e?.node;
|
|
179
|
+
const data = node?.dataRef ?? node;
|
|
180
|
+
if (data?.isLeaf) {
|
|
181
|
+
// 叶子节点:写入路径与作用域
|
|
182
|
+
moduleValue.value = data.value || '';
|
|
183
|
+
scope.value = data.scope || '';
|
|
184
|
+
// 选中后清空搜索
|
|
185
|
+
searchQuery.value = '';
|
|
186
|
+
// 选中后关闭弹窗(可按需保留)
|
|
187
|
+
visibleRef.value = false;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
</script>
|
|
191
|
+
|
|
192
|
+
<template>
|
|
193
|
+
<div class="mt-0">
|
|
194
|
+
<div v-bind="api.getTriggerProps()">
|
|
195
|
+
<a-input
|
|
196
|
+
v-model:value="moduleValue"
|
|
197
|
+
:addon-before="scope || '本地'"
|
|
198
|
+
placeholder="请输入或选择组件路径(views下的路径)"
|
|
199
|
+
/>
|
|
200
|
+
</div>
|
|
201
|
+
<!-- 始终挂载 Teleport,内部用 Transition 控制出现/消失动画 -->
|
|
202
|
+
<Teleport to="body">
|
|
203
|
+
<div
|
|
204
|
+
v-if="api.open"
|
|
205
|
+
v-bind="api.getPositionerProps()"
|
|
206
|
+
class="z-1050"
|
|
207
|
+
>
|
|
208
|
+
<div
|
|
209
|
+
v-bind="api.getContentProps()"
|
|
210
|
+
class="z-1050 w-162 rounded-md border border-solid p-4
|
|
211
|
+
border-[--g-border-color] shadow-md outline-none
|
|
212
|
+
bg-#ffffff dark:bg-#141414 text-dark dark:text-light
|
|
213
|
+
data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
214
|
+
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0
|
|
215
|
+
data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"
|
|
216
|
+
>
|
|
217
|
+
<div class="w-152 mb-2">
|
|
218
|
+
<a-form-item-rest>
|
|
219
|
+
<a-input
|
|
220
|
+
ref="searchInputRef"
|
|
221
|
+
v-model:value="searchQuery"
|
|
222
|
+
allow-clear
|
|
223
|
+
size="small"
|
|
224
|
+
placeholder="搜索组件或路径"
|
|
225
|
+
/>
|
|
226
|
+
</a-form-item-rest>
|
|
227
|
+
</div>
|
|
228
|
+
<template v-if="displayedTreeData && displayedTreeData.length">
|
|
229
|
+
<a-directory-tree
|
|
230
|
+
v-model:expanded-keys="expandedKeysRef"
|
|
231
|
+
class="w-152 h-100 overflow-y-auto directory-tree-root"
|
|
232
|
+
:selected-keys="selectedKeys"
|
|
233
|
+
:tree-data="displayedTreeData"
|
|
234
|
+
:show-icon="true"
|
|
235
|
+
:show-line="true"
|
|
236
|
+
:virtual="true"
|
|
237
|
+
expand-action="click"
|
|
238
|
+
@expand="onExpand"
|
|
239
|
+
@select="onSelect"
|
|
240
|
+
>
|
|
241
|
+
<template #switcherIcon="{ switcherCls }">
|
|
242
|
+
<CaretDownOutlined :class="switcherCls" />
|
|
243
|
+
</template>
|
|
244
|
+
<!-- 自定义展开/折叠图标:根节点(local/module:<id>)用包图标,目录与叶子分别用你提供的图标 -->
|
|
245
|
+
<template #icon="{ expanded, dataRef }">
|
|
246
|
+
<span
|
|
247
|
+
class="inline-flex items-center text-inherit not-italic leading-[0] text-center
|
|
248
|
+
normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4"
|
|
249
|
+
>
|
|
250
|
+
<!-- 根:无 '/' 的 key 表示 -->
|
|
251
|
+
<PackagesIcones v-if="dataRef?.root && !dataRef?.module" :expanded="expanded" />
|
|
252
|
+
<ModuleIcones v-else-if="dataRef?.root && dataRef?.module" :expanded="expanded" />
|
|
253
|
+
<!-- 叶子:Vue 文件图标 -->
|
|
254
|
+
<VueIcones v-else-if="dataRef?.isLeaf" />
|
|
255
|
+
<!-- 特殊目录 -->
|
|
256
|
+
<ComponentsIcones v-else-if="['components', 'component'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
|
|
257
|
+
<ViewIcones v-else-if="['views', 'view', 'pages', 'page'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
|
|
258
|
+
<SrcIcones v-else-if="['src'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
|
|
259
|
+
<!-- 其他目录 -->
|
|
260
|
+
<FolderIcones v-else :expanded="expanded" />
|
|
261
|
+
</span>
|
|
262
|
+
</template>
|
|
263
|
+
</a-directory-tree>
|
|
264
|
+
</template>
|
|
265
|
+
<template v-else>
|
|
266
|
+
<div class="flex items-center justify-center h-[220px]">
|
|
267
|
+
<a-empty :image="simpleImage" description="没有找到匹配的组件" />
|
|
268
|
+
</div>
|
|
269
|
+
</template>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</Teleport>
|
|
273
|
+
</div>
|
|
274
|
+
</template>
|
|
275
|
+
|
|
276
|
+
<style>
|
|
277
|
+
.directory-tree-root .ant-tree-treenode-selected::before {
|
|
278
|
+
background: #e6f4ff !important;
|
|
279
|
+
border-radius: 6px !important;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.dark .directory-tree-root .ant-tree-treenode-selected::before {
|
|
283
|
+
/* Dark theme: use a deeper primary‑tinted background for selected row (previously #e6f4ff) */
|
|
284
|
+
background: #3166D4 !important; /* fallback solid */
|
|
285
|
+
border-radius: 6px !important;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.directory-tree-root .ant-tree-treenode:hover:before {
|
|
289
|
+
border-radius: 6px !important;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.directory-tree-root .ant-tree-title{
|
|
293
|
+
color: #000 !important;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.dark .directory-tree-root .ant-tree-title{
|
|
297
|
+
color: #FFF !important;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.directory-tree-root .anticon-file{
|
|
301
|
+
opacity: 0 !important;
|
|
302
|
+
}
|
|
303
|
+
</style>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Form } from '../interface';
|
|
3
|
+
import { RESOURCE_TYPE } from '../enum';
|
|
4
|
+
import ComponentSelect from './ComponentSelect.vue';
|
|
5
|
+
|
|
6
|
+
defineOptions({
|
|
7
|
+
name: 'DynamicRoutesForm',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
defineProps<{
|
|
11
|
+
parent: Form
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
const form = defineModel<Form>({
|
|
15
|
+
default: {
|
|
16
|
+
meta: {
|
|
17
|
+
url: '',
|
|
18
|
+
component: '',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const show = computed(() => {
|
|
24
|
+
const type = form.value.type as RESOURCE_TYPE;
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
path: [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
28
|
+
component: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU].includes(type),
|
|
29
|
+
iframe: [RESOURCE_TYPE.IFRAME].includes(type),
|
|
30
|
+
link: [RESOURCE_TYPE.LINK].includes(type),
|
|
31
|
+
routeName: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
32
|
+
activeMenu: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** 是否展示微应用/动态应用的额外表单项 */
|
|
37
|
+
const isDynamicRoutesForm = computed(() => {
|
|
38
|
+
return true;
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<template>
|
|
43
|
+
<!-- eslint-disable-next-line -->
|
|
44
|
+
<template v-if="isDynamicRoutesForm">
|
|
45
|
+
<a-col v-if="show.path" :span="12">
|
|
46
|
+
<a-form-item label="资源路径" :name="['meta', 'url']" :rules="[{ required: true, message: '请输入资源路径' }]">
|
|
47
|
+
<a-input v-model:value="form.meta!.url" placeholder="请输入资源路径" :maxlength="256" />
|
|
48
|
+
</a-form-item>
|
|
49
|
+
</a-col>
|
|
50
|
+
|
|
51
|
+
<a-col v-if="show.component" :span="24">
|
|
52
|
+
<a-form-item label="组件路径" :name="['meta', 'component']" :rules="[{ required: true, message: '请输入组件路径' }]">
|
|
53
|
+
<ComponentSelect
|
|
54
|
+
v-model="form.meta!.component"
|
|
55
|
+
v-model:scope="form.meta!.scope"
|
|
56
|
+
/>
|
|
57
|
+
</a-form-item>
|
|
58
|
+
</a-col>
|
|
59
|
+
|
|
60
|
+
<a-col v-if="show.link" :span="24">
|
|
61
|
+
<a-form-item label="外链地址" :name="['meta', 'link']">
|
|
62
|
+
<a-input v-model:value="form.meta!.link" placeholder="请输入外链地址" :maxlength="256" />
|
|
63
|
+
</a-form-item>
|
|
64
|
+
</a-col>
|
|
65
|
+
|
|
66
|
+
<a-col v-if="show.iframe" :span="24">
|
|
67
|
+
<a-form-item label="内嵌地址" :name="['meta', 'iframe']">
|
|
68
|
+
<a-input v-model:value="form.meta!.iframe" placeholder="请输入内嵌地址" :maxlength="256" />
|
|
69
|
+
</a-form-item>
|
|
70
|
+
</a-col>
|
|
71
|
+
|
|
72
|
+
<a-col v-if="show.routeName" :span="12">
|
|
73
|
+
<a-form-item label="路由名称" :name="['meta', 'routeName']">
|
|
74
|
+
<a-input v-model:value="form.meta!.routeName" placeholder="请输入路由名称(name)" :maxlength="256" />
|
|
75
|
+
</a-form-item>
|
|
76
|
+
</a-col>
|
|
77
|
+
|
|
78
|
+
<a-col v-if="show.activeMenu" :span="12">
|
|
79
|
+
<a-form-item label="激活路径" :name="['meta', 'activeMenu']" tooltip="跳转到当前路由时,需要激活的菜单路径。 当不在导航菜单中显示时,需要指定激活路径">
|
|
80
|
+
<a-input v-model:value="form.meta!.activeMenu" placeholder="请输入激活路径" :maxlength="256" />
|
|
81
|
+
</a-form-item>
|
|
82
|
+
</a-col>
|
|
83
|
+
</template>
|
|
84
|
+
</template>
|