@pubinfo/module-rbac 2.0.0-beta.8 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComponentSelect-AWuDE4De.js +2 -0
- package/dist/ComponentSelect-CFoCrAFh.js +483 -0
- package/dist/DynamicRoutesForm-DmQMP8-p.js +376 -0
- package/dist/DynamicRoutesForm-xXTdh5EX.js +4 -0
- package/dist/HCheckList-DDP7S_nc.js +37 -0
- package/dist/HCheckList-u43x0KiD.js +2 -0
- package/dist/ImportExport-BbZkZEW_.js +4 -0
- package/dist/ImportExport-Yt6dABIv.js +354 -0
- package/dist/MetaForm-BB80P4w6.js +284 -0
- package/dist/MetaForm-D_na1CP8.js +4 -0
- package/dist/OrgAndPosition-BK5MTlOO.js +188 -0
- package/dist/OrgAndPosition-CDCim7yM.js +2 -0
- package/dist/ResourceEdit-CVwNJMVm.js +309 -0
- package/dist/ResourceEdit-D1e8tLAA.js +8 -0
- package/dist/ResourceRelation-DJDFQYFT.js +93 -0
- package/dist/ResourceRelation-DWhWzKQJ.js +3 -0
- package/dist/ResourceRelation-cfGS-erP.js +78 -0
- package/dist/ResourceSelector-B4AXXCxI.js +247 -0
- package/dist/RoleRelation-BlWDNAM1.js +79 -0
- package/dist/RoleRelation-CAMzPMFz.js +2 -0
- package/dist/RoleSelector-Bqv2p_7X.js +279 -0
- package/dist/TenantEdit-6rMUS9EP.js +253 -0
- package/dist/TenantEdit-BhpSW4w7.js +6 -0
- package/dist/UserAuthorization-Cx9oYms2.js +238 -0
- package/dist/UserAuthorization-D5rSSagE.js +4 -0
- package/dist/UserEdit-CqH6hxTZ.js +336 -0
- package/dist/UserEdit-CqrRx717.js +4 -0
- package/dist/_plugin-vue_export-helper-Cmy-mbsL.js +6 -0
- package/dist/add-child-CJM7MvB2.js +2 -0
- package/dist/animation_item-Bf_Y_nyf.js +4536 -0
- package/dist/animation_item-Wmcl4yBo.js +2 -0
- package/dist/api/modules/assist/qunzujiekou.d.ts +7 -0
- package/dist/api/modules/configData/index.d.ts +1 -1
- package/dist/api/modules/configData/{zidianfuwu.d.ts → zidifuwu.d.ts} +14 -0
- package/dist/api/modules/rbac/gangweijiekou.d.ts +7 -0
- package/dist/api/modules/rbac/index.d.ts +1 -0
- package/dist/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +7 -0
- package/dist/api/modules/rbac/yonghujiekou.d.ts +21 -0
- package/dist/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.d.ts +43 -0
- package/dist/api/modules/rbac/ziyuanjiekou.d.ts +7 -0
- package/dist/api/request.d.ts +1 -1
- package/dist/authority-BofK2fFE.js +2 -0
- package/dist/authorize-Ck1i_5K5.js +2 -0
- package/dist/blackWhiteList-B-EAyXzG.js +213 -0
- package/dist/blacklist-disable-BgMERGDX.js +2 -0
- package/dist/blacklist-enable-D8ds6NgH.js +2 -0
- package/dist/breadcrumb_setting-Bv12pA15.js +111 -0
- package/dist/browser-chrome-BVvmyPYW.js +2 -0
- package/dist/browser-edge-Bc36eH7f.js +2 -0
- package/dist/browser-ie-BiDFft9C.js +2 -0
- package/dist/browser-other-BzyOvDmB.js +2 -0
- package/dist/browser-safari-CBxgFrI_.js +2 -0
- package/dist/browserType-BJeH2o0t.js +26 -0
- package/dist/browserType-pMY0VZ_3.js +2 -0
- package/dist/chunk-B3eAFu3c.js +11 -0
- package/dist/cloneDeep-BnvyNhik.js +7 -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 +4 -4
- package/dist/components/OrgTree/index.vue.d.ts +1 -1
- package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +7 -7
- package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +7 -7
- package/dist/components/OrgUserSelector/index.d.ts +3 -2
- package/dist/components/ResourceIcones/Select.vue.d.ts +9 -0
- package/dist/components/ResourceSelector/index.vue.d.ts +5 -5
- 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 +1 -1
- package/dist/configData-BoeH9I4s.js +86 -0
- package/dist/context.d.ts +3 -0
- package/dist/createAndEditDataPermission-BFmD3zpY.js +443 -0
- package/dist/createAndEditDataPermission-Ll6GWW-p.js +8 -0
- package/dist/data-permission-Dz4eCdAg.js +156 -0
- package/dist/dayjs.min-KffHrkDe.js +297 -0
- package/dist/dictionary-C8UVX_8l.js +180 -0
- package/dist/drawerBlackWhiteList-opDsd2_O.js +125 -0
- package/dist/drawerBlackWhiteList-taaV8A5D.js +3 -0
- package/dist/drawerDictionary-CzT9KJGw.js +130 -0
- package/dist/drawerDictionary-D0Bi75vl.js +4 -0
- package/dist/drawerDictionaryItem-BqQojUNh.js +4 -0
- package/dist/drawerDictionaryItem-LBeuvrE8.js +142 -0
- package/dist/drawerGroup-BI0pYuIO.js +3 -0
- package/dist/drawerGroup-B_pYqrpy.js +188 -0
- package/dist/drawerOrganization-BeDsW0ah.js +251 -0
- package/dist/drawerOrganization-RbLK6k_c.js +3 -0
- package/dist/drawerPosition-CKZCt-Yc.js +3 -0
- package/dist/drawerPosition-DRacJCCQ.js +170 -0
- package/dist/drawerRegion-BM__zqtq.js +187 -0
- package/dist/drawerRegion-CaXvxWEn.js +3 -0
- package/dist/drawerRole-27ggtdnJ.js +6 -0
- package/dist/drawerRole-BOf6UXMc.js +172 -0
- package/dist/drawerRole-CQURGn5D.js +215 -0
- package/dist/drawerRole-D9Dt3l7O.js +5 -0
- package/dist/drawerRole-DPC9SVDe.js +3 -0
- package/dist/drawerRole-DhU_4L0Z.js +159 -0
- package/dist/edit-DF7Qsxtl.js +2 -0
- package/dist/enum-BMY6bmPA.js +54 -0
- package/dist/enum-BZtNAeJC.js +23 -0
- package/dist/enum-CtIne-Ul.js +61 -0
- package/dist/enum-DfCD4cL8.js +4 -0
- package/dist/enum-e5LlvaOv.js +4 -0
- package/dist/group-C0rajn0e.js +174 -0
- package/dist/icard-CtletXtq.js +2 -0
- package/dist/icon_animation-Do8Rw-K9.js +2 -0
- package/dist/icon_breadcrumb-CmZgmswj.js +2 -0
- package/dist/icon_copyright--7CIXSE1.js +2 -0
- package/dist/icon_jt--G-Amuu4.js +2 -0
- package/dist/icon_layout-BkQems5J.js +2 -0
- package/dist/icon_mainpage-98dHnXRL.js +2 -0
- package/dist/icon_menu-8foYPA9U.js +2 -0
- package/dist/icon_page_size-CPjiZpP2.js +2 -0
- package/dist/icon_position_type-Do71e9Ov.js +2 -0
- package/dist/icon_safe_manage-DiBn-uSS.js +2 -0
- package/dist/icon_screen_scale-Ct8iHVKy.js +2 -0
- package/dist/icon_system_manage-CzBNNisy.js +2 -0
- package/dist/icon_tabbar-BajHaWfA.js +2 -0
- package/dist/icon_toolbar-DHKFZD2w.js +2 -0
- package/dist/icon_topbar-C4mu7up7.js +2 -0
- package/dist/icon_watermark-2Wtjrft3.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6873 -5
- package/dist/interface.d.ts +27 -3
- package/dist/itemlist-CZBPz_rC.js +157 -0
- package/dist/layout_setting-oQd8BfKx.js +74 -0
- package/dist/log-CQfCPTsC.js +14 -0
- package/dist/log-center-qtOWNEaD.js +2 -0
- package/dist/loginHistoryDetail-Abn9eS5-.js +78 -0
- package/dist/loginHistoryDetail-DDEuFbYB.js +4 -0
- package/dist/login_history-Btv9KB0x.js +196 -0
- package/dist/menu_setting-Cju5OkSE.js +158 -0
- package/dist/not-data-BA50qHBT.js +2 -0
- package/dist/not-data-BzaRFolb.js +2 -0
- package/dist/operateHistoryDetail-Br_M3mhI.js +90 -0
- package/dist/operateHistoryDetail-CLsHDBp7.js +4 -0
- package/dist/operate_history-D7jq2IH-.js +191 -0
- package/dist/org-main-D0M4-Mu2.js +2 -0
- package/dist/org-unmain-Bh9hzLgK.js +2 -0
- package/dist/organization-CeOyltjo.js +15605 -0
- package/dist/other_setting-rbUoVood.js +220 -0
- package/dist/page_animation_setting-Diclx4mg.js +117 -0
- package/dist/page_w_setting-Dr2tu_oS.js +69 -0
- package/dist/position-Bodjtnh9.js +168 -0
- package/dist/region-B9xObK4Z.js +185 -0
- package/dist/remove-B3pgrGrf.js +2 -0
- package/dist/resource-DhkRTloI.js +270 -0
- package/dist/resource-app-BKgfDs09.js +2 -0
- package/dist/resource-btn-BXLyUStb.js +2 -0
- package/dist/resource-dynamic-Dx3RhbQk.js +2 -0
- package/dist/resource-index-C2COvmY-.js +2 -0
- package/dist/resource-menu-C_Q6AEFw.js +2 -0
- package/dist/resource-micro-D_OBvoET.js +2 -0
- package/dist/resource-nonmenu-CCpeV9Km.js +2 -0
- package/dist/role-DoBrQ1zG.js +196 -0
- package/dist/role_group-BMNZ1M1A.js +172 -0
- package/dist/routes/index.d.ts +3 -1
- package/dist/routes/modules/authority.manage.menu.d.ts +1 -1
- package/dist/routes/modules/log.manage.menu.d.ts +1 -1
- package/dist/routes/modules/safe.manage.menu.d.ts +1 -1
- package/dist/routes/modules/stylesetting.manage.menu.d.ts +1 -1
- package/dist/routes/modules/system.manage.menu.d.ts +1 -1
- package/dist/safe_setting-J6GWqrZx.js +232 -0
- package/dist/setItem-CcNK_f8V.js +77 -0
- package/dist/setItem-CqHPfTBZ.js +5 -0
- package/dist/setting-manage-Di7-Ks18.js +2 -0
- package/dist/stores-DXQ1Ibt6.js +2 -0
- package/dist/style.css +2 -1
- package/dist/tabbar_setting-Di3OcDig.js +142 -0
- package/dist/tenant-pPYq3xtM.js +183 -0
- package/dist/theme-check-mark-DhhsmM5v.js +2 -0
- package/dist/theme-title-DEVFVYNh.js +2 -0
- package/dist/theme_setting-DMyPJp3M.js +117 -0
- package/dist/{index-BleenJqT.js → toolbar_setting-ChcZxAJJ.js} +155 -167
- package/dist/useAppAndResource-DWQG9bqY.js +57 -0
- package/dist/user-BJL1Sw0q.js +345 -0
- package/dist/view-FR2dRATN.js +2 -0
- package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +4 -4
- package/dist/views/blackWhiteList/index.vue.d.ts +319 -319
- package/dist/views/breadcrumb_setting/index.vue.d.ts +1 -1
- package/dist/views/components/HCheckList.vue.d.ts +5 -5
- package/dist/views/components/animation_item.vue.d.ts +5 -5
- package/dist/views/components/setItem.vue.d.ts +18 -18
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +35 -35
- package/dist/views/data-permission/index.vue.d.ts +350 -350
- package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +4 -4
- package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +4 -4
- package/dist/views/dictionary/index.vue.d.ts +319 -319
- package/dist/views/dictionary/itemlist.vue.d.ts +319 -319
- package/dist/views/group/components/drawerGroup.vue.d.ts +4 -4
- package/dist/views/group/index.vue.d.ts +319 -319
- package/dist/views/layout_setting/index.vue.d.ts +1 -1
- package/dist/views/log_center/components/browserType.vue.d.ts +3 -3
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +4 -4
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +4 -4
- package/dist/views/log_center/login_history.vue.d.ts +315 -315
- package/dist/views/log_center/operate_history.vue.d.ts +315 -315
- package/dist/views/menu_setting/index.vue.d.ts +1 -1
- package/dist/views/organization/components/drawerOrganization.vue.d.ts +4 -4
- package/dist/views/organization/components/drawerRole.vue.d.ts +18 -10
- package/dist/views/organization/index.vue.d.ts +23 -15
- package/dist/views/other_setting/index.vue.d.ts +1 -1
- package/dist/views/page_animation_setting/index.vue.d.ts +1 -1
- package/dist/views/page_w_setting/index.vue.d.ts +1 -1
- package/dist/views/position/components/drawerPosition.vue.d.ts +4 -4
- package/dist/views/position/index.vue.d.ts +319 -319
- package/dist/views/region/components/drawerRegion.vue.d.ts +4 -4
- package/dist/views/region/index.vue.d.ts +319 -319
- package/dist/views/resource/components/ComponentSelect.vue.d.ts +12 -0
- package/dist/views/resource/components/DynamicRoutesForm.vue.d.ts +13 -0
- package/dist/views/resource/components/ImportExport.vue.d.ts +13 -0
- package/dist/views/resource/components/MetaForm.vue.d.ts +10 -0
- package/dist/views/resource/components/ResourceEdit.vue.d.ts +4 -4
- package/dist/views/resource/components/RoleRelation.vue.d.ts +2 -2
- package/dist/views/resource/enum.d.ts +6 -13
- package/dist/views/resource/hooks/useMetaForm.d.ts +6 -0
- package/dist/views/resource/index.vue.d.ts +343 -321
- package/dist/views/resource/interface.d.ts +4 -1
- package/dist/views/resource/model.d.ts +37 -0
- package/dist/views/role/components/ResourceRelation.vue.d.ts +316 -316
- package/dist/views/role/components/drawerRole.vue.d.ts +10 -10
- package/dist/views/role/index.vue.d.ts +642 -642
- package/dist/views/role_group/components/drawerRole.vue.d.ts +18 -10
- package/dist/views/role_group/index.vue.d.ts +333 -325
- package/dist/views/safe_setting/index.vue.d.ts +1 -1
- package/dist/views/tabbar_setting/index.vue.d.ts +1 -1
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +10 -10
- package/dist/views/tenant/index.vue.d.ts +325 -325
- package/dist/views/theme_setting/index.vue.d.ts +1 -1
- package/dist/views/toolbar_setting/index.vue.d.ts +1 -1
- package/dist/views/user/components/OrgAndPosition.vue.d.ts +3 -3
- package/dist/views/user/components/UserAuthorization.vue.d.ts +18 -10
- package/dist/views/user/components/UserEdit.vue.d.ts +4 -4
- package/dist/views/user/index.vue.d.ts +337 -329
- package/dist/views/watermark_setting/index.vue.d.ts +9 -9
- package/dist/watermark_setting-tqYUcPzF.js +199 -0
- package/dist/zddata-D9x-CcqP.js +2 -0
- package/dist/zy_checked-B0r0BaR-.js +2 -0
- package/dist/zy_default-BHbIn4if.js +2 -0
- package/package.json +14 -14
- package/src/api/modules/assist/gonggaofuwu.ts +24 -9
- package/src/api/modules/assist/index.ts +0 -2
- package/src/api/modules/assist/qunzujiekou.ts +37 -7
- package/src/api/modules/assist/quyujiekou.ts +12 -3
- package/src/api/modules/assist/typings.d.ts +62 -58
- package/src/api/modules/configData/heibaimingdanfuwu.ts +12 -3
- package/src/api/modules/configData/index.ts +1 -3
- package/src/api/modules/configData/typings.d.ts +84 -74
- package/src/api/modules/configData/xitongpeizhifuwu.ts +39 -15
- package/src/api/modules/configData/{zidianfuwu.ts → zidifuwu.ts} +80 -8
- package/src/api/modules/log/caozuorizhifuwu.ts +8 -2
- package/src/api/modules/log/denglurizhifuwu.ts +8 -2
- package/src/api/modules/log/index.ts +0 -2
- package/src/api/modules/log/typings.d.ts +29 -25
- package/src/api/modules/rbac/gangweijiekou.ts +44 -8
- package/src/api/modules/rbac/index.ts +1 -2
- package/src/api/modules/rbac/jiaosejiekou.ts +24 -9
- package/src/api/modules/rbac/pubJiaosezukongzhiqi.ts +45 -6
- package/src/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.ts +26 -12
- package/src/api/modules/rbac/typings.d.ts +419 -296
- package/src/api/modules/rbac/yonghujiekou.ts +115 -13
- package/src/api/modules/rbac/yonghushoucangbiaojiekou.ts +20 -5
- package/src/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.ts +12 -3
- package/src/api/modules/rbac/ziyuandaorudaochuxiangguanjiekou.ts +158 -0
- package/src/api/modules/rbac/ziyuanjiekou.ts +43 -4
- package/src/api/modules/rbac/zuhuguanlijiekou.ts +20 -11
- package/src/api/modules/rbac/zuzhijiaosebiaokongzhiqi.ts +12 -3
- package/src/api/modules/rbac/zuzhijiekou.ts +28 -10
- package/src/api/request.ts +3 -2
- package/src/assets/icons/resource-dynamic.svg +39 -0
- package/src/assets/icons/resource-micro.svg +40 -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 +64 -89
- package/src/components/OrgTree/index.vue +2 -2
- package/src/components/OrgUserSelector/index.ts +5 -0
- package/src/components/OrgUserSelector/provider.ts +1 -1
- package/src/components/ResourceIcones/Select.vue +240 -0
- package/src/components/ResourceSelector/index.vue +33 -50
- 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/context.ts +20 -0
- package/src/index.ts +21 -18
- package/src/interface.ts +31 -2
- package/src/routes/index.ts +9 -5
- package/src/routes/modules/authority.manage.menu.ts +0 -13
- package/src/routes/modules/log.manage.menu.ts +0 -8
- package/src/routes/modules/safe.manage.menu.ts +0 -12
- package/src/routes/modules/stylesetting.manage.menu.ts +0 -16
- package/src/routes/modules/system.manage.menu.ts +0 -10
- package/src/views/blackWhiteList/components/drawerBlackWhiteList.vue +1 -1
- package/src/views/blackWhiteList/index.vue +14 -26
- package/src/views/breadcrumb_setting/index.vue +3 -3
- package/src/views/components/animation_item.vue +2 -2
- package/src/views/components/setItem.vue +13 -20
- package/src/views/data-permission/components/createAndEditDataPermission.vue +4 -4
- package/src/views/data-permission/enum.ts +7 -7
- package/src/views/data-permission/index.vue +9 -12
- package/src/views/dictionary/components/drawerDictionary.vue +1 -1
- package/src/views/dictionary/components/drawerDictionaryItem.vue +1 -1
- package/src/views/dictionary/index.vue +3 -3
- package/src/views/dictionary/itemlist.vue +3 -3
- package/src/views/group/components/drawerGroup.vue +2 -2
- package/src/views/group/index.vue +13 -18
- package/src/views/layout_setting/index.vue +154 -164
- package/src/views/log_center/components/loginHistoryDetail.vue +6 -8
- package/src/views/log_center/components/operateHistoryDetail.vue +6 -8
- package/src/views/log_center/login_history.vue +6 -11
- package/src/views/log_center/operate_history.vue +6 -11
- package/src/views/menu_setting/index.vue +3 -3
- package/src/views/organization/components/drawerOrganization.vue +3 -3
- package/src/views/organization/components/drawerRole.vue +9 -7
- package/src/views/organization/index.vue +23 -49
- package/src/views/other_setting/index.vue +2 -2
- package/src/views/page_animation_setting/index.vue +10 -18
- package/src/views/page_w_setting/index.vue +133 -116
- package/src/views/position/components/drawerPosition.vue +2 -2
- package/src/views/position/index.vue +1 -1
- package/src/views/region/components/drawerRegion.vue +2 -2
- package/src/views/region/index.vue +1 -1
- package/src/views/resource/components/ComponentSelect.vue +375 -0
- package/src/views/resource/components/DynamicRoutesForm.vue +92 -0
- package/src/views/resource/components/ImportExport.vue +313 -0
- package/src/views/resource/components/MetaForm.vue +119 -0
- package/src/views/resource/components/ResourceEdit.vue +144 -73
- package/src/views/resource/components/RoleRelation.vue +1 -1
- package/src/views/resource/enum.ts +12 -13
- package/src/views/resource/hooks/useMetaForm.ts +103 -0
- package/src/views/resource/index.vue +59 -32
- package/src/views/resource/interface.ts +5 -1
- package/src/views/resource/model.ts +53 -0
- package/src/views/role/components/ResourceRelation.vue +3 -4
- package/src/views/role/components/drawerRole.vue +3 -3
- package/src/views/role/index.vue +1 -1
- package/src/views/role_group/components/ResourceRelation.vue +3 -4
- package/src/views/role_group/components/drawerRole.vue +8 -7
- package/src/views/role_group/index.vue +1 -1
- package/src/views/safe_setting/index.vue +5 -7
- package/src/views/tabbar_setting/index.vue +2 -2
- package/src/views/tenant/components/TenantEdit.vue +1 -1
- package/src/views/tenant/index.vue +1 -1
- package/src/views/theme_setting/index.vue +202 -231
- package/src/views/toolbar_setting/index.vue +3 -3
- package/src/views/user/components/OrgAndPosition.vue +2 -2
- package/src/views/user/components/UserAuthorization.vue +13 -12
- package/src/views/user/components/UserEdit.vue +1 -1
- package/src/views/user/index.vue +1 -1
- package/src/views/watermark_setting/index.vue +8 -15
- package/dist/OrgSelector.vue_vue_type_script_setup_true_lang-BcL0IFuA.js +0 -567
- package/dist/_baseClone-CQ44TFeq.js +0 -191
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/animation_item.vue_vue_type_script_setup_true_lang-BQvmwheq.js +0 -4864
- package/dist/browserType.vue_vue_type_script_setup_true_lang-Cv8wph6G.js +0 -38
- package/dist/cloneDeep-BI4WNBQ9.js +0 -8
- package/dist/enum-BEHz_Q18.js +0 -74
- package/dist/enum-C9ihxJe7.js +0 -4
- package/dist/enum-CTUzwCYG.js +0 -4
- package/dist/enum-DDKThkSw.js +0 -24
- package/dist/gangweijiekou-BxJq_m0o.js +0 -46
- package/dist/index-BS45K9vK.js +0 -685
- package/dist/index-Bbsiwecf.js +0 -1631
- package/dist/index-BhcAk-IH.js +0 -399
- package/dist/index-Bl4v-7On.js +0 -125
- package/dist/index-CFPhIFyG.js +0 -140
- package/dist/index-CLSeuhTv.js +0 -872
- package/dist/index-CLxqmFPw.js +0 -317
- package/dist/index-CTiFd9M0.js +0 -303
- package/dist/index-Cej8u1qo.js +0 -274
- package/dist/index-Cr17VOfm.js +0 -389
- package/dist/index-CsHj-xDw.js +0 -283
- package/dist/index-D0yB_8b0.js +0 -181
- package/dist/index-DFR8dd2B.js +0 -785
- package/dist/index-DNf0NPrD.js +0 -131
- package/dist/index-Dm4sOX43.js +0 -27
- package/dist/index-KboUdpTh.js +0 -18588
- package/dist/index-MtXfNGqS.js +0 -1246
- package/dist/index-U8kjKY6p.js +0 -462
- package/dist/index-UZeQsp70.js +0 -177
- package/dist/index-a0E9oj3q.js +0 -703
- package/dist/index-gmUZUdNl.js +0 -634
- package/dist/index-j_ln_NSt.js +0 -455
- package/dist/index-s32GbmsJ.js +0 -164
- package/dist/index-yEpViVkx.js +0 -409
- package/dist/index-zh8PZXw2.js +0 -862
- package/dist/itemlist-xAbIKRVj.js +0 -369
- package/dist/jiaosejiekou-BfY4h7uI.js +0 -58
- package/dist/login_history-CuQv9Iw3.js +0 -430
- package/dist/operate_history-CGP-1Xy2.js +0 -468
- package/dist/pubJiaosezukongzhiqi-CvYfc8Uz.js +0 -57
- package/dist/request-DQLgc7lT.js +0 -5
- package/dist/setItem-DkOvmWXP.js +0 -152
- package/dist/shujuquanxianzhubiaokongzhiqi-DyNgf1y6.js +0 -65
- package/dist/useAppAndResource-D_b19V4t.js +0 -55
- package/dist/views/organization/components/roleSelect.vue.d.ts +0 -14
- package/dist/views/role_group/components/roleSelect.vue.d.ts +0 -14
- package/dist/views/user/components/roleSelect.vue.d.ts +0 -14
- package/dist/xitongpeizhifuwu-C1Vm-W1B.js +0 -23
- package/dist/zidianfuwu-yCWHhOfO.js +0 -65
- package/dist/ziyuanjiekou-DhrAbneq.js +0 -69
- package/dist/zuzhijiaosebiaokongzhiqi-B1g74RqL.js +0 -28
- package/dist/zuzhijiekou-PeZuFtCO.js +0 -85
- package/src/assets/icons/403.svg +0 -1
- package/src/assets/icons/403_dark.svg +0 -1
- package/src/assets/icons/404.svg +0 -1
- package/src/assets/icons/404_dark.svg +0 -1
- package/src/assets/icons/browser-360.svg +0 -1
- package/src/assets/icons/browser-qq.svg +0 -1
- package/src/assets/icons/browser-uc.svg +0 -1
- package/src/assets/icons/change-org.svg +0 -1
- package/src/assets/icons/empty-data.svg +0 -1
- package/src/assets/icons/favorites.svg +0 -1
- package/src/assets/icons/image-load-fail.svg +0 -1
- package/src/assets/icons/logo-sig.svg +0 -1
- package/src/assets/icons/logo.svg +0 -1
- package/src/assets/icons/mima.svg +0 -1
- package/src/assets/icons/process-management.svg +0 -1
- package/src/assets/icons/project-management.svg +0 -1
- package/src/assets/icons/rbac.svg +0 -1
- package/src/assets/icons/test.svg +0 -1
- package/src/assets/icons/toolbar-collapse.svg +0 -1
- package/src/assets/icons/tree_icon.svg +0 -1
- package/src/assets/icons/tree_icon_checked.svg +0 -1
- package/src/assets/icons/workbench.svg +0 -1
- package/src/views/organization/components/roleSelect.vue +0 -258
- package/src/views/role_group/components/roleSelect.vue +0 -224
- package/src/views/user/components/roleSelect.vue +0 -258
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { TreeProps } from 'ant-design-vue';
|
|
3
|
+
import { CaretDownOutlined } from '@ant-design/icons-vue';
|
|
4
|
+
import { Empty } from 'ant-design-vue';
|
|
5
|
+
import { getAllRouteModules, readProjectModules } from 'pubinfo';
|
|
6
|
+
import ComponentsIcones from '@/components/DirectoryIcones/ComponentsIcones.vue';
|
|
7
|
+
import FolderIcones from '@/components/DirectoryIcones/FolderIcones.vue';
|
|
8
|
+
import ModuleIcones from '@/components/DirectoryIcones/ModuleIcones.vue';
|
|
9
|
+
import PackagesIcones from '@/components/DirectoryIcones/PackagesIcones.vue';
|
|
10
|
+
import SrcIcones from '@/components/DirectoryIcones/SrcIcones.vue';
|
|
11
|
+
import ViewIcones from '@/components/DirectoryIcones/ViewIcones.vue';
|
|
12
|
+
import VueIcones from '@/components/DirectoryIcones/VueIcones.vue';
|
|
13
|
+
|
|
14
|
+
defineOptions({
|
|
15
|
+
name: 'ComponentSelect',
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const simpleImage = Empty.PRESENTED_IMAGE_SIMPLE;
|
|
19
|
+
|
|
20
|
+
const moduleValue = defineModel<string>({
|
|
21
|
+
default: '',
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const scope = defineModel<string>('scope', {
|
|
25
|
+
default: '',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const visibleRef: Ref<boolean> = ref<boolean>(false);
|
|
29
|
+
// 搜索关键字
|
|
30
|
+
const searchQuery = ref('');
|
|
31
|
+
|
|
32
|
+
// 计算:由输入框当前值与作用域,推导目录树的选中节点 key
|
|
33
|
+
// 约定:根 key 为 'local' 或 'module:<id>',叶子 key = `${root}/${path}`
|
|
34
|
+
const selectedKeys = computed<string[]>(() => {
|
|
35
|
+
if (!moduleValue.value) {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
const prefix = scope.value ? `module:${scope.value}` : 'local';
|
|
39
|
+
return [`${prefix}/${moduleValue.value}`];
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// 手风琴展开:控制顶层(local、module:<id>)仅展开一个
|
|
43
|
+
const expandedKeysRef = ref<string[]>([]);
|
|
44
|
+
|
|
45
|
+
function isRootKey(key: string) {
|
|
46
|
+
// 根 key 无分隔符:'local' 或 'module:<id>'
|
|
47
|
+
return !key.includes('/');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function getRootKeyFromPathKey(key: string) {
|
|
51
|
+
// 从 'local/...' 或 'module:<id>/...' 提取根 key
|
|
52
|
+
const idx = key.indexOf('/');
|
|
53
|
+
return idx === -1 ? key : key.slice(0, idx);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 从选中叶子节点的完整 key 生成展开链(父级链,不含叶子本身)。
|
|
58
|
+
* 例如:'local/a/b/c' -> ['local', 'local/a', 'local/a/b']
|
|
59
|
+
*/
|
|
60
|
+
function getExpansionChainFromSelected(key: string) {
|
|
61
|
+
const parts = key.split('/');
|
|
62
|
+
const chain: string[] = [];
|
|
63
|
+
let acc = '';
|
|
64
|
+
// 到倒数第二段(父节点)即可;叶子无需加入 expandedKeys
|
|
65
|
+
for (let i = 0; i < Math.max(0, parts.length - 1); i++) {
|
|
66
|
+
const seg = parts[i];
|
|
67
|
+
acc = i === 0 ? seg : `${acc}/${seg}`;
|
|
68
|
+
chain.push(acc);
|
|
69
|
+
}
|
|
70
|
+
return chain;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 子层级允许多级展开(以便能展开到选中路径)。
|
|
75
|
+
*/
|
|
76
|
+
function onExpand(nextKeys: (string | number)[], e: any) {
|
|
77
|
+
const keys = (nextKeys as string[]) || [];
|
|
78
|
+
const nodeKey: string | undefined = e?.node?.key;
|
|
79
|
+
const expanded: boolean = !!e?.expanded;
|
|
80
|
+
|
|
81
|
+
let rootToKeep: string | undefined;
|
|
82
|
+
if (nodeKey && isRootKey(nodeKey)) {
|
|
83
|
+
rootToKeep = expanded ? nodeKey : undefined;
|
|
84
|
+
}
|
|
85
|
+
else if (nodeKey) {
|
|
86
|
+
rootToKeep = getRootKeyFromPathKey(nodeKey);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
rootToKeep = keys.find(isRootKey);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const filtered = keys.filter(k => !isRootKey(String(k)) || String(k) === rootToKeep);
|
|
93
|
+
expandedKeysRef.value = filtered as string[];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 抽取:根据当前选中路径展开到对应层级
|
|
97
|
+
function expandToSelected() {
|
|
98
|
+
const first = selectedKeys.value[0];
|
|
99
|
+
if (!first) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const chain = getExpansionChainFromSelected(first);
|
|
103
|
+
expandedKeysRef.value = chain;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// 手风琴效果:当选中项变化时,展开到对应层级
|
|
107
|
+
watch(selectedKeys, () => {
|
|
108
|
+
expandToSelected();
|
|
109
|
+
}, { immediate: true });
|
|
110
|
+
|
|
111
|
+
// 弹层再次打开时,若之前被手动折叠,重新展开到选中层级
|
|
112
|
+
watch(visibleRef, (open) => {
|
|
113
|
+
if (open) {
|
|
114
|
+
expandToSelected();
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
// 自定义树形结构
|
|
119
|
+
interface ComponentTreeNode {
|
|
120
|
+
title: string
|
|
121
|
+
key: string
|
|
122
|
+
// 是否为根节点(如:'local'/'module:<id>')
|
|
123
|
+
root?: boolean
|
|
124
|
+
module?: boolean
|
|
125
|
+
children?: ComponentTreeNode[]
|
|
126
|
+
isLeaf?: boolean
|
|
127
|
+
// 额外数据,选择时可用
|
|
128
|
+
value?: string
|
|
129
|
+
scope?: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* 从扁平路径数组构建“目录树”节点
|
|
134
|
+
* @param label 根节点标题(如:'本地'/'模块名')
|
|
135
|
+
* @param keyPrefix 根节点 key(如:'local'/'module:<id>')
|
|
136
|
+
* @param paths 叶子路径(views 相对路径)
|
|
137
|
+
* @param scope 作用域(模块 id),本地为 undefined
|
|
138
|
+
*/
|
|
139
|
+
function buildTree(label: string, keyPrefix: string, paths: string[], scope?: string): ComponentTreeNode {
|
|
140
|
+
const root: ComponentTreeNode = { title: label, key: keyPrefix, root: true, module: keyPrefix !== 'local', children: [] };
|
|
141
|
+
|
|
142
|
+
// 便捷查找当前层的子节点
|
|
143
|
+
const findOrCreate = (parent: ComponentTreeNode, title: string, key: string) => {
|
|
144
|
+
if (!parent.children) {
|
|
145
|
+
parent.children = [];
|
|
146
|
+
}
|
|
147
|
+
let node = parent.children.find(n => n.title === title && !n.isLeaf);
|
|
148
|
+
if (!node) {
|
|
149
|
+
node = { title, key, children: [] };
|
|
150
|
+
parent.children.push(node);
|
|
151
|
+
}
|
|
152
|
+
return node;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
for (const p of paths) {
|
|
156
|
+
const segs = p.split('/').filter(Boolean);
|
|
157
|
+
let current = root;
|
|
158
|
+
let acc = keyPrefix;
|
|
159
|
+
for (let i = 0; i < segs.length; i++) {
|
|
160
|
+
const seg = segs[i];
|
|
161
|
+
acc = acc ? `${acc}/${seg}` : seg;
|
|
162
|
+
const isLast = i === segs.length - 1;
|
|
163
|
+
if (isLast) {
|
|
164
|
+
// 叶子结点携带 value 与 scope 信息
|
|
165
|
+
current.children = current.children || [];
|
|
166
|
+
current.children.push({
|
|
167
|
+
title: seg,
|
|
168
|
+
key: acc,
|
|
169
|
+
isLeaf: true,
|
|
170
|
+
value: p,
|
|
171
|
+
scope,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
current = findOrCreate(current, seg, acc);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return root;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// 计算:树数据,根为“本地”和各模块名,叶子为 views 下的路径
|
|
184
|
+
const componentTreeOptions = computed<TreeProps['treeData']>(() => {
|
|
185
|
+
// 获取主项目的 pages
|
|
186
|
+
const projectStructure = readProjectModules();
|
|
187
|
+
const mainPages = projectStructure?.pages || {};
|
|
188
|
+
|
|
189
|
+
// 获取所有模块的 pages
|
|
190
|
+
const routeModuleMap = getAllRouteModules();
|
|
191
|
+
|
|
192
|
+
const treeNodes: ComponentTreeNode[] = [];
|
|
193
|
+
|
|
194
|
+
// 本地节点
|
|
195
|
+
treeNodes.push(
|
|
196
|
+
buildTree('本地', 'local', Object.keys(mainPages)),
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
// 模块节点
|
|
200
|
+
for (const [id, moduleMap] of routeModuleMap) {
|
|
201
|
+
treeNodes.push(
|
|
202
|
+
buildTree(id, `module:${id}`, Object.keys(moduleMap), id),
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return treeNodes as unknown as TreeProps['treeData'];
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// 根据搜索关键字过滤树数据,保留匹配节点及其祖先
|
|
210
|
+
const displayedTreeData = computed<TreeProps['treeData']>(() => {
|
|
211
|
+
const q = searchQuery.value.trim().toLowerCase();
|
|
212
|
+
const source = componentTreeOptions.value as any[];
|
|
213
|
+
if (!q) {
|
|
214
|
+
return source as unknown as TreeProps['treeData'];
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const filterNodes = (nodes: any[]): any[] => {
|
|
218
|
+
const res: any[] = [];
|
|
219
|
+
for (const n of nodes || []) {
|
|
220
|
+
const title = String(n?.title ?? '').toLowerCase();
|
|
221
|
+
const value = String(n?.value ?? '').toLowerCase();
|
|
222
|
+
const keyStr = String(n?.key ?? '').toLowerCase();
|
|
223
|
+
const selfMatch = title.includes(q) || value.includes(q) || keyStr.includes(q);
|
|
224
|
+
let childrenFiltered: any[] | undefined;
|
|
225
|
+
if (Array.isArray(n?.children) && n.children.length) {
|
|
226
|
+
childrenFiltered = filterNodes(n.children);
|
|
227
|
+
}
|
|
228
|
+
if (selfMatch || (childrenFiltered && childrenFiltered.length)) {
|
|
229
|
+
const cloned = { ...n };
|
|
230
|
+
if (childrenFiltered) {
|
|
231
|
+
cloned.children = childrenFiltered;
|
|
232
|
+
}
|
|
233
|
+
else if (cloned.children) {
|
|
234
|
+
delete cloned.children;
|
|
235
|
+
}
|
|
236
|
+
res.push(cloned);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return res;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
return filterNodes(source) as unknown as TreeProps['treeData'];
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// 收集非叶子节点 key,用于搜索时全部展开
|
|
246
|
+
function collectNonLeafKeys(nodes: any[]): string[] {
|
|
247
|
+
const keys: string[] = [];
|
|
248
|
+
const dfs = (ns: any[]) => {
|
|
249
|
+
for (const n of ns || []) {
|
|
250
|
+
const hasChildren = Array.isArray(n?.children) && n.children.length > 0;
|
|
251
|
+
if (hasChildren) {
|
|
252
|
+
keys.push(String(n.key));
|
|
253
|
+
dfs(n.children);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
dfs(nodes);
|
|
258
|
+
return keys;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// 搜索展开控制:有关键字时展开所有非叶节点,清空时回到选中项展开
|
|
262
|
+
watch(searchQuery, (q) => {
|
|
263
|
+
const hasQ = String(q || '').trim().length > 0;
|
|
264
|
+
if (hasQ) {
|
|
265
|
+
const data = displayedTreeData.value as any[];
|
|
266
|
+
expandedKeysRef.value = collectNonLeafKeys(data);
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
expandToSelected();
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
// 选择项:回填路径与作用域,并关闭弹层
|
|
274
|
+
function onSelect(keys: (string | number)[], e: any) {
|
|
275
|
+
const node = e?.node;
|
|
276
|
+
const data = node?.dataRef ?? node;
|
|
277
|
+
if (data?.isLeaf) {
|
|
278
|
+
// 叶子节点:写入路径与作用域
|
|
279
|
+
moduleValue.value = data.value || '';
|
|
280
|
+
scope.value = data.scope || '';
|
|
281
|
+
// 选中后清空搜索
|
|
282
|
+
searchQuery.value = '';
|
|
283
|
+
// 选中后关闭弹窗(可按需保留)
|
|
284
|
+
visibleRef.value = false;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
</script>
|
|
288
|
+
|
|
289
|
+
<template>
|
|
290
|
+
<a-popover
|
|
291
|
+
v-model:open="visibleRef"
|
|
292
|
+
:arrow="false"
|
|
293
|
+
trigger="click"
|
|
294
|
+
placement="bottom"
|
|
295
|
+
>
|
|
296
|
+
<a-input
|
|
297
|
+
v-model:value="moduleValue"
|
|
298
|
+
:addon-before="scope || '本地'"
|
|
299
|
+
placeholder="请输入或选择组件路径(views下的路径)"
|
|
300
|
+
/>
|
|
301
|
+
<template #content>
|
|
302
|
+
<div class="w-156 mb-2">
|
|
303
|
+
<a-form-item-rest>
|
|
304
|
+
<a-input
|
|
305
|
+
v-model:value="searchQuery"
|
|
306
|
+
allow-clear
|
|
307
|
+
size="small"
|
|
308
|
+
placeholder="搜索组件或路径"
|
|
309
|
+
/>
|
|
310
|
+
</a-form-item-rest>
|
|
311
|
+
</div>
|
|
312
|
+
<template v-if="displayedTreeData && displayedTreeData.length">
|
|
313
|
+
<a-directory-tree
|
|
314
|
+
v-model:expanded-keys="expandedKeysRef"
|
|
315
|
+
class="w-156 h-100 overflow-y-auto directory-tree-root"
|
|
316
|
+
:selected-keys="selectedKeys"
|
|
317
|
+
:tree-data="displayedTreeData"
|
|
318
|
+
:show-icon="true"
|
|
319
|
+
:show-line="true"
|
|
320
|
+
:virtual="true"
|
|
321
|
+
expand-action="click"
|
|
322
|
+
@expand="onExpand"
|
|
323
|
+
@select="onSelect"
|
|
324
|
+
>
|
|
325
|
+
<template #switcherIcon="{ switcherCls }">
|
|
326
|
+
<CaretDownOutlined :class="switcherCls" />
|
|
327
|
+
</template>
|
|
328
|
+
<!-- 自定义展开/折叠图标:根节点(local/module:<id>)用包图标,目录与叶子分别用你提供的图标 -->
|
|
329
|
+
<template #icon="{ expanded, dataRef }">
|
|
330
|
+
<span
|
|
331
|
+
class="inline-flex items-center text-inherit not-italic leading-[0] text-center
|
|
332
|
+
normal-case [vertical-align:-0.125em] [text-rendering:optimizeLegibility] svg:size-4"
|
|
333
|
+
>
|
|
334
|
+
<!-- 根:无 '/' 的 key 表示 -->
|
|
335
|
+
<PackagesIcones v-if="dataRef?.root && !dataRef?.module" :expanded="expanded" />
|
|
336
|
+
<ModuleIcones v-else-if="dataRef?.root && dataRef?.module" :expanded="expanded" />
|
|
337
|
+
<!-- 叶子:Vue 文件图标 -->
|
|
338
|
+
<VueIcones v-else-if="dataRef?.isLeaf" />
|
|
339
|
+
<!-- 特殊目录 -->
|
|
340
|
+
<ComponentsIcones v-else-if="['components', 'component'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
|
|
341
|
+
<ViewIcones v-else-if="['views', 'view', 'pages', 'page'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
|
|
342
|
+
<SrcIcones v-else-if="['src'].includes(String(dataRef?.title).toLowerCase())" :expanded="expanded" />
|
|
343
|
+
<!-- 其他目录 -->
|
|
344
|
+
<FolderIcones v-else :expanded="expanded" />
|
|
345
|
+
</span>
|
|
346
|
+
</template>
|
|
347
|
+
</a-directory-tree>
|
|
348
|
+
</template>
|
|
349
|
+
<template v-else>
|
|
350
|
+
<div class="flex items-center justify-center h-[220px]">
|
|
351
|
+
<a-empty :image="simpleImage" description="没有找到匹配的组件" />
|
|
352
|
+
</div>
|
|
353
|
+
</template>
|
|
354
|
+
</template>
|
|
355
|
+
</a-popover>
|
|
356
|
+
</template>
|
|
357
|
+
|
|
358
|
+
<style>
|
|
359
|
+
.directory-tree-root .ant-tree-treenode-selected::before {
|
|
360
|
+
background: #e6f4ff !important;
|
|
361
|
+
border-radius: 6px !important;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.directory-tree-root .ant-tree-treenode:hover:before {
|
|
365
|
+
border-radius: 6px !important;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.directory-tree-root .ant-tree-title{
|
|
369
|
+
color: #000 !important;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.directory-tree-root .anticon-file{
|
|
373
|
+
opacity: 0 !important;
|
|
374
|
+
}
|
|
375
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Form } from '../interface';
|
|
3
|
+
import ResourceIconesSelect from '@/components/ResourceIcones/Select.vue';
|
|
4
|
+
import { RESOURCE_TYPE } from '../enum';
|
|
5
|
+
import ComponentSelect from './ComponentSelect.vue';
|
|
6
|
+
|
|
7
|
+
defineOptions({
|
|
8
|
+
name: 'DynamicRoutesForm',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
defineProps<{
|
|
12
|
+
parent: Form
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
const form = defineModel<Form>({
|
|
16
|
+
default: {
|
|
17
|
+
meta: {
|
|
18
|
+
url: '',
|
|
19
|
+
component: '',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const show = computed(() => {
|
|
25
|
+
const type = form.value.type as RESOURCE_TYPE;
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
path: [RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.MICRO_APP, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
29
|
+
component: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU].includes(type),
|
|
30
|
+
iframe: [RESOURCE_TYPE.IFRAME].includes(type),
|
|
31
|
+
link: [RESOURCE_TYPE.LINK].includes(type),
|
|
32
|
+
icon: [RESOURCE_TYPE.DYNAMIC_APP, RESOURCE_TYPE.MICRO_APP, RESOURCE_TYPE.INDEX, RESOURCE_TYPE.MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
33
|
+
routeName: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
34
|
+
activeMenu: [RESOURCE_TYPE.MENU, RESOURCE_TYPE.NON_MENU, RESOURCE_TYPE.IFRAME, RESOURCE_TYPE.LINK].includes(type),
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** 是否展示微应用/动态应用的额外表单项 */
|
|
39
|
+
const isDynamicRoutesForm = computed(() => {
|
|
40
|
+
return true;
|
|
41
|
+
});
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<!-- eslint-disable-next-line -->
|
|
46
|
+
<template v-if="isDynamicRoutesForm">
|
|
47
|
+
<a-col v-if="show.path" :span="12">
|
|
48
|
+
<a-form-item label="资源路径" :name="['meta', 'url']" :rules="[{ required: true, message: '请输入资源路径' }]">
|
|
49
|
+
<a-input v-model:value="form.meta!.url" placeholder="请输入资源路径" :maxlength="256" />
|
|
50
|
+
</a-form-item>
|
|
51
|
+
</a-col>
|
|
52
|
+
|
|
53
|
+
<a-col v-if="show.component" :span="24">
|
|
54
|
+
<a-form-item label="组件路径" :name="['meta', 'component']" :rules="[{ required: true, message: '请输入组件路径' }]">
|
|
55
|
+
<ComponentSelect
|
|
56
|
+
v-model="form.meta!.component"
|
|
57
|
+
v-model:scope="form.meta!.scope"
|
|
58
|
+
/>
|
|
59
|
+
</a-form-item>
|
|
60
|
+
</a-col>
|
|
61
|
+
|
|
62
|
+
<a-col v-if="show.link" :span="24">
|
|
63
|
+
<a-form-item label="外链地址" :name="['meta', 'link']">
|
|
64
|
+
<a-input v-model:value="form.meta!.link" placeholder="请输入外链地址" :maxlength="256" />
|
|
65
|
+
</a-form-item>
|
|
66
|
+
</a-col>
|
|
67
|
+
|
|
68
|
+
<a-col v-if="show.iframe" :span="24">
|
|
69
|
+
<a-form-item label="内嵌地址" :name="['meta', 'iframe']">
|
|
70
|
+
<a-input v-model:value="form.meta!.iframe" placeholder="请输入内嵌地址" :maxlength="256" />
|
|
71
|
+
</a-form-item>
|
|
72
|
+
</a-col>
|
|
73
|
+
|
|
74
|
+
<a-col v-if="show.icon" :span="12">
|
|
75
|
+
<a-form-item label="资源图标" name="icon">
|
|
76
|
+
<ResourceIconesSelect v-model="form.icon" />
|
|
77
|
+
</a-form-item>
|
|
78
|
+
</a-col>
|
|
79
|
+
|
|
80
|
+
<a-col v-if="show.routeName" :span="12">
|
|
81
|
+
<a-form-item label="路由名称" :name="['meta', 'routeName']">
|
|
82
|
+
<a-input v-model:value="form.meta!.routeName" placeholder="请输入路由名称(name)" :maxlength="256" />
|
|
83
|
+
</a-form-item>
|
|
84
|
+
</a-col>
|
|
85
|
+
|
|
86
|
+
<a-col v-if="show.activeMenu" :span="12">
|
|
87
|
+
<a-form-item label="激活路径" :name="['meta', 'activeMenu']" tooltip="跳转到当前路由时,需要激活的菜单路径。 当不在导航菜单中显示时,需要指定激活路径">
|
|
88
|
+
<a-input v-model:value="form.meta!.activeMenu" placeholder="请输入激活路径" :maxlength="256" />
|
|
89
|
+
</a-form-item>
|
|
90
|
+
</a-col>
|
|
91
|
+
</template>
|
|
92
|
+
</template>
|