Merge branch 'master' of http://10.0.41.100:3000/lishenfeng/tsg-web
commit
9da19e6321
|
|
@ -175,25 +175,54 @@ export function loadRole(data:any) {
|
||||||
export async function loadMenu(): Promise<MenuItem[]> {
|
export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
|
|
||||||
|
|
||||||
await wait(200)
|
// await wait(200)
|
||||||
const { code, data } = await xyt_httpget2(apiurl.xytlogin.role)
|
// const { code, data } = await xyt_httpget2(apiurl.xytlogin.role)
|
||||||
if( code!== 200){
|
// if( code!== 200){
|
||||||
message.error('获取用户权限失败')
|
// message.error('获取用户权限失败')
|
||||||
return []
|
// return []
|
||||||
}
|
// }
|
||||||
//获取到菜单后遍历
|
// //获取到菜单后遍历
|
||||||
|
// const id = idgen()
|
||||||
|
// // handelTreeData(data,id)
|
||||||
|
// const tree = buildTree(data,0)
|
||||||
|
// const tree2 = tree?.filter((item:any) =>(item.menuId != "1" && item.menuId != "2" && item.menuId != "3"))
|
||||||
|
// handelTreeData(tree2,id)
|
||||||
|
// return tree2
|
||||||
|
|
||||||
|
|
||||||
const id = idgen()
|
const id = idgen()
|
||||||
// handelTreeData(data,id)
|
return [
|
||||||
|
{ id: id(), title: '水库一张图', path: '/mgr/home', icon: 'jbqk' },
|
||||||
|
|
||||||
|
{ id: id(), title: '四预', redirect: '/mgr/sy/fhxzfx', icon: 'fxzb',
|
||||||
|
children: [
|
||||||
|
{ id: id(), title: '防洪形势', path: '/mgr/sy/fhxzfx'},
|
||||||
|
// { id: id(), title: '天气预报', path: '/mgr/fxzb/tqyb'},
|
||||||
|
// {
|
||||||
|
// id: id(), title: '洪水预报', redirect: '/mgr/fxzb/hsyb/hyybjs',
|
||||||
|
// children: [
|
||||||
|
// { id: id(), title: '洪水预报计算', path: '/mgr/fxzb/hsyb/hyybjs' },
|
||||||
|
// { id: id(), title: '预报方案管理', path: '/mgr/fxzb/hsyb/ybfagl' },
|
||||||
|
// { id: id(), title: '参数管理', path: '/mgr/fxzb/hsyb/csgl' },
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// { id: id(), title: '调度规程', path: '/mgr/fxzb/ddgc'},
|
||||||
|
// { id: id(), title: '防汛预案', path: '/mgr/fxzb/fxya'},
|
||||||
|
// {
|
||||||
|
// id: id(),
|
||||||
|
// title: '抢险物料',
|
||||||
|
// path: '/mgr/fxzb/qxwl',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: id(),
|
||||||
|
// title: '抢险队伍',
|
||||||
|
// path: '/mgr/fxzb/qxdw',
|
||||||
|
// },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
const tree = buildTree(data,0)
|
// { id: id(), title: '基本2情况', path: '/mgr/home', icon: 'jbqk' },
|
||||||
const tree2 = tree?.filter((item:any) =>(item.menuId != "1" && item.menuId != "2" && item.menuId != "3"))
|
|
||||||
handelTreeData(tree2,id)
|
|
||||||
|
|
||||||
return tree2
|
|
||||||
|
|
||||||
// return [
|
|
||||||
// { id: id(), title: '基本情况', path: '/mgr/home', icon: 'jbqk' },
|
|
||||||
// {
|
// {
|
||||||
// id: id(),
|
// id: id(),
|
||||||
// title: '防汛调度',
|
// title: '防汛调度',
|
||||||
|
|
@ -344,7 +373,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
||||||
// path: '/',
|
// path: '/',
|
||||||
// icon: 'spjk'
|
// icon: 'spjk'
|
||||||
// },
|
// },
|
||||||
// ]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
export function defaultHomePage() {
|
export function defaultHomePage() {
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ const AppRouters: React.FC = () => {
|
||||||
{ path: 'home', element: <HomePage /> },
|
{ path: 'home', element: <HomePage /> },
|
||||||
|
|
||||||
// 防汛调度
|
// 防汛调度
|
||||||
{ path: 'fxzb/fhxs', element: <HomePage /> },
|
{ path: 'sy/fhxzfx', element: <HomePage /> },
|
||||||
{ path: 'fxzb/tqyb', element: <HomePage /> },
|
{ path: 'fxzb/tqyb', element: <HomePage /> },
|
||||||
//洪水预报
|
//洪水预报
|
||||||
{ path: 'fxzb/hsyb/hyybjs', element: <Hsybjs /> },
|
{ path: 'fxzb/hsyb/hyybjs', element: <Hsybjs /> },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue