feat: 管理中心路由调整、选择公司逻辑调整

This commit is contained in:
renxiaodong
2025-06-23 05:58:04 -04:00
parent 7b79443980
commit 82dfa3faeb
11 changed files with 134 additions and 86 deletions

View File

@ -78,7 +78,7 @@ export default defineComponent({
};
const renderSubMenu = () => {
function travel(_route: RouteRecordRaw[], nodes = []) {
if (_route) {
if (Array.isArray(_route)) {
_route.forEach((element) => {
// This is demo, modify nodes as needed
const icon = element?.meta?.icon ? () => h(element?.meta?.icon as object) : null;
@ -103,7 +103,7 @@ export default defineComponent({
}
return nodes;
}
return travel(menuTree.value);
return travel(menuTree.value ?? []);
};
return () => (
<a-menu

View File

@ -1,3 +1,7 @@
/*
* @Author: RenXiaoDong
* @Date: 2025-06-19 01:45:53
*/
import type { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
import { useAppStore } from '@/stores';

View File

@ -24,14 +24,14 @@ onMounted(() => {
});
const appStore = useAppStore();
function setServerMenu() {
console.log('setServerMenu');
}
const setServerMenu = () => {
router.push('/management/person');
};
const handleSelect = (index: any) => {
if (index === 0) {
router.push('/workplace');
} else {
router.push('/dataEngine/dataEngine/hotTranslation');
router.push('/dataEngine/hotTranslation');
}
};
@ -39,17 +39,17 @@ const handleDopdownClick = (index: any, ind: any) => {
let children = lists.value[index].children;
let indPath = children[ind];
if (indPath.name == '行业热门话题洞察') {
router.push('/dataEngine/dataEngine/hotTranslation');
router.push('/dataEngine/hotTranslation');
} else if (indPath.name == '行业词云') {
router.push('/dataEngine/dataEngine/hotCloud');
router.push('/dataEngine/hotCloud');
} else if (indPath.name == '行业关键词动向') {
router.push('/dataEngine/dataEngine/keyWord');
router.push('/dataEngine/keyWord');
} else if (indPath.name == '用户痛点观察') {
router.push('/dataEngine/dataEngine/userPainPoints');
router.push('/dataEngine/userPainPoints');
} else if (indPath.name == '重点品牌动向') {
router.push('/dataEngine/dataEngine/keyBrandMovement');
router.push('/dataEngine/keyBrandMovement');
} else if (indPath.name == '用户画像') {
router.push('/dataEngine/dataEngine/userPersona');
router.push('/dataEngine/userPersona');
}
};
</script>