feat: 初始化素材中心页面路由结构
This commit is contained in:
@ -83,6 +83,7 @@ import router from '@/router';
|
||||
import { useEnterpriseStore } from '@/stores/modules/enterprise';
|
||||
import { useSidebarStore } from '@/stores/modules/side-bar';
|
||||
import { useUserStore } from '@/stores';
|
||||
import { handleUserHome } from '@/utils/user';
|
||||
|
||||
import ExitAccountModal from '../exit-account-modal';
|
||||
import DownloadCenterModal from '../task-center-modal';
|
||||
@ -134,7 +135,7 @@ const setUnread = () => {
|
||||
}
|
||||
};
|
||||
const handleAgentClick = () => {
|
||||
router.push({ name: props.isAgentRoute ? 'Home' : 'AgentIndex' });
|
||||
props.isAgentRoute ? handleUserHome() : router.push({ name: 'AgentIndex' });
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@ import { useAppStore } from '@/stores';
|
||||
import { useSidebarStore } from '@/stores/modules/side-bar';
|
||||
import { MENU_LIST } from './menu-list';
|
||||
import type { typeMenuItem } from './menu-list';
|
||||
import { handleUserHome } from '@/utils/user';
|
||||
|
||||
import icon1 from '@/assets/img/agent/icon1.png';
|
||||
|
||||
@ -124,7 +125,7 @@ export default defineComponent({
|
||||
<Menu class={`siderBar-wrap p-16px w-full h-full flex flex-col ${sidebarStore.menuCollapse ? 'menu-fold' : ''}`}>
|
||||
<Menu.Item
|
||||
class={`menu-item !mb-0 ${currentRouteName.value === 'Home' ? 'active' : ''}`}
|
||||
onClick={() => onClickItem('Home')}
|
||||
onClick={handleUserHome}
|
||||
>
|
||||
<img src={icon1} width={18} height={18} />
|
||||
{!sidebarStore.menuCollapse && <span class="cts label">智能搜索</span>}
|
||||
|
||||
@ -43,7 +43,7 @@ export const MENU_LIST = <Record<string, typeMenuItem[]>>{
|
||||
{
|
||||
key: 'ModPutAccountData',
|
||||
icon: 'svg-putAccountData',
|
||||
label: '账户数据',
|
||||
label: '账户数据',
|
||||
routeName: 'PutAccountAccountData',
|
||||
requireLogin: true,
|
||||
activeMatch: ['PutAccountAccountData'],
|
||||
@ -72,20 +72,20 @@ export const MENU_LIST = <Record<string, typeMenuItem[]>>{
|
||||
icon: 'svg-materialCenter',
|
||||
children: [
|
||||
{
|
||||
key: 'ModMediaFinishProductsWareHouse',
|
||||
key: 'ModMaterialCenterFinishedProductsWareHouse',
|
||||
icon: 'svg-finishProductsWareHouse',
|
||||
label: '成品库',
|
||||
routeName: 'FinishProductsWareHouse',
|
||||
routeName: 'MaterialCenterFinishedProducts',
|
||||
requireLogin: true,
|
||||
activeMatch: ['FinishProductsWareHouse', 'FinishProductsWareHouseWriter'],
|
||||
activeMatch: ['MaterialCenterFinishedProducts'],
|
||||
},
|
||||
{
|
||||
key: 'ModMediaRawMaterialStorage',
|
||||
key: 'ModMaterialCenterRawMaterialStorage',
|
||||
icon: 'svg-rawMaterialStorage',
|
||||
label: '原料库',
|
||||
routeName: 'RawMaterialStorage',
|
||||
routeName: 'MaterialCenterRawMaterial',
|
||||
requireLogin: true,
|
||||
activeMatch: ['RawMaterialStorage', 'RawMaterialStorageWriter'],
|
||||
activeMatch: ['MaterialCenterRawMaterial'],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -122,4 +122,3 @@ export const MENU_LIST = <Record<string, typeMenuItem[]>>{
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user