@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,59 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
|
|
3
|
+
const routes: RouteRecordRaw = {
|
|
4
|
+
path: '/safe_manage',
|
|
5
|
+
redirect: '/safe_manage/blacklist',
|
|
6
|
+
name: 'SafeManage',
|
|
7
|
+
meta: {
|
|
8
|
+
title: '安全管理',
|
|
9
|
+
icon: 'icon_safe_manage',
|
|
10
|
+
},
|
|
11
|
+
children: [
|
|
12
|
+
{
|
|
13
|
+
path: 'blacklist',
|
|
14
|
+
component: () => import('@/views/blackWhiteList/index.vue'),
|
|
15
|
+
name: 'Blacklist',
|
|
16
|
+
meta: {
|
|
17
|
+
title: '黑名单管理',
|
|
18
|
+
singleMenu: true,
|
|
19
|
+
auth: 'blacklist',
|
|
20
|
+
activeIcon: 'system-point',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
path: 'whitelist',
|
|
25
|
+
component: () => import('@/views/blackWhiteList/index.vue'),
|
|
26
|
+
name: 'Whitelist',
|
|
27
|
+
meta: {
|
|
28
|
+
title: '白名单管理',
|
|
29
|
+
singleMenu: true,
|
|
30
|
+
auth: 'whitelist',
|
|
31
|
+
activeIcon: 'system-point',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
path: 'safe-setting',
|
|
36
|
+
component: () => import('@/views/safe_setting/index.vue'),
|
|
37
|
+
name: 'SafeSetting',
|
|
38
|
+
meta: {
|
|
39
|
+
title: '安全配置',
|
|
40
|
+
singleMenu: true,
|
|
41
|
+
activeIcon: 'system-point',
|
|
42
|
+
auth: 'safe_setting',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: 'watermark-setting',
|
|
47
|
+
component: () => import('@/views/watermark_setting/index.vue'),
|
|
48
|
+
name: 'WatermarkSetting',
|
|
49
|
+
meta: {
|
|
50
|
+
title: '页面水印配置',
|
|
51
|
+
singleMenu: true,
|
|
52
|
+
activeIcon: 'system-point',
|
|
53
|
+
auth: 'watermarkSetting',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default routes;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
|
|
3
|
+
const routes: RouteRecordRaw = {
|
|
4
|
+
path: '/setting_manage',
|
|
5
|
+
redirect: '/setting_manage/theme-setting',
|
|
6
|
+
name: 'SettingManage',
|
|
7
|
+
meta: {
|
|
8
|
+
title: '样式配置',
|
|
9
|
+
icon: 'setting-manage',
|
|
10
|
+
},
|
|
11
|
+
children: [
|
|
12
|
+
{
|
|
13
|
+
path: 'theme-setting',
|
|
14
|
+
component: () => import('@/views/theme_setting/index.vue'),
|
|
15
|
+
name: 'ThemeSetting',
|
|
16
|
+
meta: {
|
|
17
|
+
title: '主题配置',
|
|
18
|
+
singleMenu: true,
|
|
19
|
+
auth: 'themeSetting',
|
|
20
|
+
activeIcon: 'system-point',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
path: 'layout-setting',
|
|
25
|
+
component: () => import('@/views/layout_setting/index.vue'),
|
|
26
|
+
name: 'LayoutSetting',
|
|
27
|
+
meta: {
|
|
28
|
+
title: '布局配置',
|
|
29
|
+
singleMenu: true,
|
|
30
|
+
auth: 'layoutSetting',
|
|
31
|
+
activeIcon: 'system-point',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
path: 'page-animation-setting',
|
|
36
|
+
component: () => import('@/views/page_animation_setting/index.vue'),
|
|
37
|
+
name: 'PageAnimationSetting',
|
|
38
|
+
meta: {
|
|
39
|
+
title: '页面动画配置',
|
|
40
|
+
singleMenu: true,
|
|
41
|
+
auth: 'pageSetting',
|
|
42
|
+
activeIcon: 'system-point',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: 'page-size-setting',
|
|
47
|
+
component: () => import('@/views/page_w_setting/index.vue'),
|
|
48
|
+
name: 'PageSizeSetting',
|
|
49
|
+
meta: {
|
|
50
|
+
title: '页宽配置',
|
|
51
|
+
singleMenu: true,
|
|
52
|
+
auth: 'pagesizeSetting',
|
|
53
|
+
activeIcon: 'system-point',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
path: 'menu-setting',
|
|
58
|
+
component: () => import('@/views/menu_setting/index.vue'),
|
|
59
|
+
name: 'MenuSetting',
|
|
60
|
+
meta: {
|
|
61
|
+
title: '导航栏配置',
|
|
62
|
+
singleMenu: true,
|
|
63
|
+
auth: 'menuSetting',
|
|
64
|
+
activeIcon: 'system-point',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
path: 'tabbar-setting',
|
|
69
|
+
component: () => import('@/views/tabbar_setting/index.vue'),
|
|
70
|
+
name: 'TabbarSetting',
|
|
71
|
+
meta: {
|
|
72
|
+
title: '标签栏配置',
|
|
73
|
+
singleMenu: true,
|
|
74
|
+
auth: 'tabbarSetting',
|
|
75
|
+
activeIcon: 'system-point',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
path: 'toolbar-setting',
|
|
80
|
+
component: () => import('@/views/toolbar_setting/index.vue'),
|
|
81
|
+
name: 'ToolbarSetting',
|
|
82
|
+
meta: {
|
|
83
|
+
title: '工具栏配置',
|
|
84
|
+
singleMenu: true,
|
|
85
|
+
auth: 'toolbarSetting',
|
|
86
|
+
activeIcon: 'system-point',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
path: 'breadcrumb-setting',
|
|
91
|
+
component: () => import('@/views/breadcrumb_setting/index.vue'),
|
|
92
|
+
name: 'BreadcrumbSetting',
|
|
93
|
+
meta: {
|
|
94
|
+
title: '面包屑配置',
|
|
95
|
+
singleMenu: true,
|
|
96
|
+
auth: 'breadcrumbSetting',
|
|
97
|
+
activeIcon: 'system-point',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: 'other-setting',
|
|
102
|
+
component: () => import('@/views/other_setting/index.vue'),
|
|
103
|
+
name: 'OtherSetting',
|
|
104
|
+
meta: {
|
|
105
|
+
title: '其他配置',
|
|
106
|
+
singleMenu: true,
|
|
107
|
+
auth: 'otherSetting',
|
|
108
|
+
activeIcon: 'system-point',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export default routes;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { RouteRecordRaw } from 'vue-router';
|
|
2
|
+
|
|
3
|
+
const routes: RouteRecordRaw = {
|
|
4
|
+
path: '/system_manage',
|
|
5
|
+
redirect: '/system_manage/dictionary',
|
|
6
|
+
name: 'SystemManage',
|
|
7
|
+
meta: {
|
|
8
|
+
title: '系统配置',
|
|
9
|
+
icon: 'icon_safe_manage',
|
|
10
|
+
},
|
|
11
|
+
children: [
|
|
12
|
+
{
|
|
13
|
+
path: '/system_manage/dictionary',
|
|
14
|
+
name: 'DictionaryPage',
|
|
15
|
+
meta: {
|
|
16
|
+
title: '字典管理',
|
|
17
|
+
auth: 'dictionary',
|
|
18
|
+
activeIcon: 'system-point',
|
|
19
|
+
},
|
|
20
|
+
children: [
|
|
21
|
+
{
|
|
22
|
+
path: '',
|
|
23
|
+
name: 'Dictionary',
|
|
24
|
+
component: () => import('@/views/dictionary/index.vue'),
|
|
25
|
+
meta: {
|
|
26
|
+
title: '字典管理',
|
|
27
|
+
sidebar: false,
|
|
28
|
+
breadcrumb: false,
|
|
29
|
+
activeMenu: '/system_manage/dictionary',
|
|
30
|
+
cache: 'DictionaryItem',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
path: 'detail/:id',
|
|
35
|
+
name: 'DictionaryItem',
|
|
36
|
+
component: () => import('@/views/dictionary/itemlist.vue'),
|
|
37
|
+
meta: {
|
|
38
|
+
title: '字典数据',
|
|
39
|
+
sidebar: false,
|
|
40
|
+
breadcrumb: true,
|
|
41
|
+
activeMenu: '/system_manage/dictionary',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
path: 'position',
|
|
48
|
+
component: () => import('@/views/position/index.vue'),
|
|
49
|
+
name: 'Position',
|
|
50
|
+
meta: {
|
|
51
|
+
title: '岗位管理',
|
|
52
|
+
singleMenu: true,
|
|
53
|
+
auth: 'position',
|
|
54
|
+
activeIcon: 'system-point',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: 'region',
|
|
59
|
+
component: () => import('@/views/region/index.vue'),
|
|
60
|
+
name: 'Region',
|
|
61
|
+
meta: {
|
|
62
|
+
title: '区域管理',
|
|
63
|
+
singleMenu: true,
|
|
64
|
+
auth: 'region',
|
|
65
|
+
activeIcon: 'system-point',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
path: 'group',
|
|
70
|
+
component: () => import('@/views/group/index.vue'),
|
|
71
|
+
name: 'Group',
|
|
72
|
+
meta: {
|
|
73
|
+
title: '群组管理',
|
|
74
|
+
singleMenu: true,
|
|
75
|
+
auth: 'group',
|
|
76
|
+
activeIcon: 'system-point',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default routes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useSettingsStore } from 'pubinfo-nightly';
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { acceptHMRUpdate, defineStore } from 'pinia';
|
|
2
|
+
import { getAllRouteModules, readProjectModules } from 'pubinfo-nightly';
|
|
3
|
+
|
|
4
|
+
// WebSocket 消息类型定义
|
|
5
|
+
export interface WebSocketMessage {
|
|
6
|
+
type: 'custom'
|
|
7
|
+
event: 'pubinfo-resolver:update'
|
|
8
|
+
data: {
|
|
9
|
+
action: 'add' | 'unlink'
|
|
10
|
+
file: string
|
|
11
|
+
timestamp: number
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 路由树节点接口
|
|
16
|
+
export interface RouteTreeNode {
|
|
17
|
+
title: string
|
|
18
|
+
key: string
|
|
19
|
+
root?: boolean
|
|
20
|
+
module?: boolean
|
|
21
|
+
children?: RouteTreeNode[]
|
|
22
|
+
isLeaf?: boolean
|
|
23
|
+
value?: string
|
|
24
|
+
scope?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// 模块信息接口
|
|
28
|
+
interface ModuleInfo {
|
|
29
|
+
id: string
|
|
30
|
+
pages: Record<string, string>
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const useViewStore = defineStore('view', () => {
|
|
34
|
+
// 主项目页面路径数据
|
|
35
|
+
const projectPages = ref<Record<string, string>>({});
|
|
36
|
+
|
|
37
|
+
// 模块页面路径数据
|
|
38
|
+
const modulePages = ref<Map<string, Record<string, string>>>(new Map()); // 路由树数据
|
|
39
|
+
const routeTree = ref<RouteTreeNode[]>([]);
|
|
40
|
+
|
|
41
|
+
// 最后更新时间
|
|
42
|
+
const lastUpdateTime = ref<number>(0);
|
|
43
|
+
|
|
44
|
+
// WebSocket 连接状态
|
|
45
|
+
const wsConnected = ref<boolean>(false);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 初始化路由树数据
|
|
49
|
+
*/
|
|
50
|
+
function initializeRouteData() {
|
|
51
|
+
// 获取主项目的 pages - 只存储路径
|
|
52
|
+
const projectStructure = readProjectModules();
|
|
53
|
+
const rawProjectPages = projectStructure?.pages || {};
|
|
54
|
+
projectPages.value = Object.keys(rawProjectPages).reduce((acc, key) => {
|
|
55
|
+
acc[key] = key; // 存储路径本身
|
|
56
|
+
return acc;
|
|
57
|
+
}, {} as Record<string, string>);
|
|
58
|
+
|
|
59
|
+
// 获取所有模块的 pages - 只存储路径
|
|
60
|
+
const routeModuleMap = getAllRouteModules();
|
|
61
|
+
const modulePageMap = new Map<string, Record<string, string>>();
|
|
62
|
+
for (const [id, moduleMap] of routeModuleMap) {
|
|
63
|
+
const pathMap = Object.keys(moduleMap).reduce((acc, key) => {
|
|
64
|
+
acc[key] = key; // 存储路径本身
|
|
65
|
+
return acc;
|
|
66
|
+
}, {} as Record<string, string>);
|
|
67
|
+
modulePageMap.set(id, pathMap);
|
|
68
|
+
}
|
|
69
|
+
modulePages.value = modulePageMap;
|
|
70
|
+
|
|
71
|
+
// 构建路由树
|
|
72
|
+
buildRouteTree();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 构建路由树结构
|
|
77
|
+
*/
|
|
78
|
+
function buildRouteTree() {
|
|
79
|
+
const treeNodes: RouteTreeNode[] = [];
|
|
80
|
+
|
|
81
|
+
// 构建本地项目节点
|
|
82
|
+
if (Object.keys(projectPages.value).length > 0) {
|
|
83
|
+
const localPaths = Object.keys(projectPages.value);
|
|
84
|
+
|
|
85
|
+
treeNodes.push(
|
|
86
|
+
buildTreeNode('本地', 'local', localPaths),
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// 构建模块节点
|
|
91
|
+
for (const [id, moduleMap] of modulePages.value) {
|
|
92
|
+
if (Object.keys(moduleMap).length > 0) {
|
|
93
|
+
treeNodes.push(
|
|
94
|
+
buildTreeNode(id, `module:${id}`, Object.keys(moduleMap), id),
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
routeTree.value = treeNodes;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 从扁平路径数组构建树节点
|
|
104
|
+
*/
|
|
105
|
+
function buildTreeNode(
|
|
106
|
+
label: string,
|
|
107
|
+
keyPrefix: string,
|
|
108
|
+
paths: string[],
|
|
109
|
+
scope?: string,
|
|
110
|
+
): RouteTreeNode {
|
|
111
|
+
const root: RouteTreeNode = {
|
|
112
|
+
title: label,
|
|
113
|
+
key: keyPrefix,
|
|
114
|
+
root: true,
|
|
115
|
+
module: keyPrefix !== 'local',
|
|
116
|
+
children: [],
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const findOrCreate = (parent: RouteTreeNode, title: string, key: string) => {
|
|
120
|
+
if (!parent.children) {
|
|
121
|
+
parent.children = [];
|
|
122
|
+
}
|
|
123
|
+
let node = parent.children.find(n => n.title === title && !n.isLeaf);
|
|
124
|
+
if (!node) {
|
|
125
|
+
node = { title, key, children: [] };
|
|
126
|
+
parent.children.push(node);
|
|
127
|
+
}
|
|
128
|
+
return node;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
for (const p of paths) {
|
|
132
|
+
const segs = p.split('/').filter(Boolean);
|
|
133
|
+
let current = root;
|
|
134
|
+
let acc = keyPrefix;
|
|
135
|
+
|
|
136
|
+
for (let i = 0; i < segs.length; i++) {
|
|
137
|
+
const seg = segs[i];
|
|
138
|
+
acc = acc ? `${acc}/${seg}` : seg;
|
|
139
|
+
const isLast = i === segs.length - 1;
|
|
140
|
+
|
|
141
|
+
if (isLast) {
|
|
142
|
+
// 叶子节点
|
|
143
|
+
current.children = current.children || [];
|
|
144
|
+
current.children.push({
|
|
145
|
+
title: seg,
|
|
146
|
+
key: acc,
|
|
147
|
+
isLeaf: true,
|
|
148
|
+
value: p,
|
|
149
|
+
scope,
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
current = findOrCreate(current, seg, acc);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
return root;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 处理 WebSocket 文件变化事件
|
|
163
|
+
*/
|
|
164
|
+
function handleFileChange(message: WebSocketMessage) {
|
|
165
|
+
const { action, file, timestamp } = message.data;
|
|
166
|
+
|
|
167
|
+
// 更新时间戳
|
|
168
|
+
lastUpdateTime.value = timestamp;
|
|
169
|
+
|
|
170
|
+
// 根据操作类型处理
|
|
171
|
+
if (action === 'add') {
|
|
172
|
+
handleFileAdd(file);
|
|
173
|
+
}
|
|
174
|
+
else if (action === 'unlink') {
|
|
175
|
+
handleFileRemove(file);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 重新构建路由树
|
|
179
|
+
buildRouteTree();
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 处理文件添加
|
|
184
|
+
*/
|
|
185
|
+
function handleFileAdd(filePath: string) {
|
|
186
|
+
// 检查是否是 views 目录下的 .vue 文件
|
|
187
|
+
const relativePath = filePath.replace(/^.*\/src\//, 'src/');
|
|
188
|
+
|
|
189
|
+
if (relativePath.startsWith('src/views/') && relativePath.endsWith('.vue')) {
|
|
190
|
+
// 添加到主项目页面数据
|
|
191
|
+
projectPages.value = {
|
|
192
|
+
...projectPages.value,
|
|
193
|
+
[relativePath]: relativePath,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 处理文件删除
|
|
200
|
+
*/
|
|
201
|
+
function handleFileRemove(filePath: string) {
|
|
202
|
+
// 检查是否是 views 目录下的 .vue 文件
|
|
203
|
+
const relativePath = filePath.replace(/^.*\/src\//, 'src/');
|
|
204
|
+
if (relativePath.startsWith('src/views/') && relativePath.endsWith('.vue')) {
|
|
205
|
+
// 从主项目页面数据中移除
|
|
206
|
+
const newProjectPages = { ...projectPages.value };
|
|
207
|
+
delete newProjectPages[relativePath];
|
|
208
|
+
projectPages.value = newProjectPages;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 设置 WebSocket 连接状态
|
|
214
|
+
*/
|
|
215
|
+
function setWebSocketConnected(connected: boolean) {
|
|
216
|
+
wsConnected.value = connected;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* 获取路由树数据(用于组件)
|
|
221
|
+
*/
|
|
222
|
+
function getRouteTreeData() {
|
|
223
|
+
return routeTree.value;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* 刷新路由树数据
|
|
228
|
+
*/
|
|
229
|
+
function refreshRouteTree() {
|
|
230
|
+
initializeRouteData();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* 根据搜索条件过滤树数据
|
|
235
|
+
*/
|
|
236
|
+
function filterRouteTree(searchQuery: string): RouteTreeNode[] {
|
|
237
|
+
if (!searchQuery.trim()) {
|
|
238
|
+
return routeTree.value;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const q = searchQuery.trim().toLowerCase();
|
|
242
|
+
|
|
243
|
+
const filterNodes = (nodes: RouteTreeNode[]): RouteTreeNode[] => {
|
|
244
|
+
const result: RouteTreeNode[] = [];
|
|
245
|
+
|
|
246
|
+
for (const node of nodes) {
|
|
247
|
+
const title = node.title.toLowerCase();
|
|
248
|
+
const value = (node.value || '').toLowerCase();
|
|
249
|
+
const key = node.key.toLowerCase();
|
|
250
|
+
const selfMatch = title.includes(q) || value.includes(q) || key.includes(q);
|
|
251
|
+
|
|
252
|
+
let filteredChildren: RouteTreeNode[] | undefined;
|
|
253
|
+
if (node.children && node.children.length > 0) {
|
|
254
|
+
filteredChildren = filterNodes(node.children);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (selfMatch || (filteredChildren && filteredChildren.length > 0)) {
|
|
258
|
+
const cloned = { ...node };
|
|
259
|
+
if (filteredChildren) {
|
|
260
|
+
cloned.children = filteredChildren;
|
|
261
|
+
}
|
|
262
|
+
result.push(cloned);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
return result;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
return filterNodes(routeTree.value);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
return {
|
|
273
|
+
// 状态
|
|
274
|
+
projectPages: readonly(projectPages),
|
|
275
|
+
modulePages: readonly(modulePages),
|
|
276
|
+
routeTree: readonly(routeTree),
|
|
277
|
+
lastUpdateTime: readonly(lastUpdateTime),
|
|
278
|
+
wsConnected: readonly(wsConnected),
|
|
279
|
+
|
|
280
|
+
// 方法
|
|
281
|
+
initializeRouteData,
|
|
282
|
+
handleFileChange,
|
|
283
|
+
setWebSocketConnected,
|
|
284
|
+
getRouteTreeData,
|
|
285
|
+
refreshRouteTree,
|
|
286
|
+
filterRouteTree,
|
|
287
|
+
};
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
if (import.meta.hot) {
|
|
291
|
+
import.meta.hot.accept(acceptHMRUpdate(useViewStore, import.meta.hot));
|
|
292
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { getDictItemListBatch } from '@/api/modules/configData';
|
|
2
|
+
|
|
3
|
+
function arraify<T>(data: T | T[]) {
|
|
4
|
+
return Array.isArray(data) ? data : [data];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 获取字典数据
|
|
9
|
+
*/
|
|
10
|
+
export async function getDictItem(params: { dictCode: string | string[] }) {
|
|
11
|
+
const dictCodes = arraify(params.dictCode);
|
|
12
|
+
const res = await getDictItemListBatch({ dictCode: dictCodes.join(',') });
|
|
13
|
+
|
|
14
|
+
if (res.success) {
|
|
15
|
+
if (dictCodes.length === 1) {
|
|
16
|
+
return res.data?.[0]?.dictItemList;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return res.data;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useWebSocketManager } from '@/composables/useWebSocketManager';
|
|
2
|
+
import { useViewStore } from '@/stores/view';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 应用启动时的路由数据初始化
|
|
6
|
+
*/
|
|
7
|
+
export function initializeRouteSystem() {
|
|
8
|
+
const viewStore = useViewStore();
|
|
9
|
+
const wsManager = useWebSocketManager();
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
// 初始化路由数据
|
|
13
|
+
viewStore.initializeRouteData();
|
|
14
|
+
|
|
15
|
+
// 初始化 WebSocket 管理器
|
|
16
|
+
wsManager.initializeWebSocket();
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
viewStore,
|
|
20
|
+
wsManager,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error('[RBAC] 路由系统初始化失败:', error);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 应用关闭时的清理逻辑
|
|
31
|
+
*/
|
|
32
|
+
export function cleanupRouteSystem() {
|
|
33
|
+
try {
|
|
34
|
+
const wsManager = useWebSocketManager();
|
|
35
|
+
wsManager.cleanupWebSocket();
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error('[RBAC] 路由系统清理失败:', error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 手动刷新路由数据
|
|
44
|
+
*/
|
|
45
|
+
export function refreshRouteSystem() {
|
|
46
|
+
try {
|
|
47
|
+
const viewStore = useViewStore();
|
|
48
|
+
viewStore.refreshRouteTree();
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
console.error('[RBAC] 路由系统数据刷新失败:', error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface ValidateOptions {
|
|
2
|
+
/** 允许的最大嵌套层级(含根层) */
|
|
3
|
+
maxDepth?: number
|
|
4
|
+
/** 每一层最多 key 数 */
|
|
5
|
+
maxKeysPerLevel?: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ValidateResult {
|
|
9
|
+
valid: boolean
|
|
10
|
+
errors: string[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function validateObjectStructure(
|
|
14
|
+
obj: any,
|
|
15
|
+
options: ValidateOptions = {},
|
|
16
|
+
): ValidateResult {
|
|
17
|
+
const { maxDepth = 3, maxKeysPerLevel = 10 } = options;
|
|
18
|
+
const errors: string[] = [];
|
|
19
|
+
|
|
20
|
+
function traverse(value: any, depth: number, path: string) {
|
|
21
|
+
if (depth > maxDepth) {
|
|
22
|
+
errors.push(`对象嵌套层级超过限制,最大允许 ${maxDepth} 层。问题位置: ${path}`);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (value && typeof value === 'object' && !Array.isArray(value)) {
|
|
27
|
+
const keys = Object.keys(value);
|
|
28
|
+
|
|
29
|
+
if (keys.length > maxKeysPerLevel) {
|
|
30
|
+
errors.push(
|
|
31
|
+
`对象包含过多字段(${keys.length} 个),最大允许 ${maxKeysPerLevel} 个。位置: ${path}`,
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
keys.forEach((key) => {
|
|
36
|
+
traverse(value[key], depth + 1, `${path}.${key}`);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
traverse(obj, 1, 'root');
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
valid: errors.length === 0,
|
|
45
|
+
errors,
|
|
46
|
+
};
|
|
47
|
+
}
|