导航修改
This commit is contained in:
parent
d503e448b6
commit
547c63f2bb
@ -36,6 +36,8 @@ export default function MenuWithTopButton(props: IMenuWithTopButton) {
|
||||
keyword: props.keywords,
|
||||
name: props.type,
|
||||
chargeAdditionals: props.chargeAdditionals,
|
||||
progress: props.progress,
|
||||
authorId: props.authorId
|
||||
}
|
||||
})
|
||||
}}>
|
||||
|
@ -22,4 +22,6 @@ export interface IMenuWithTopButton {
|
||||
keywords?:string;
|
||||
type?:string ;
|
||||
chargeAdditionals?:string;
|
||||
progress?:string;
|
||||
authorId?:string;
|
||||
}
|
@ -31,8 +31,10 @@ import { useLocation } from 'react-router-dom';
|
||||
import { get } from '../../util/AjaxUtils.ts'
|
||||
import gpsImg from '../../static/right/gps.png'
|
||||
import backImg from '../../static/right/back.png'
|
||||
import { Link } from "react-router-dom";
|
||||
import { Input, Breadcrumb, message } from 'antd';
|
||||
// import { Link } from "react-router-dom";
|
||||
import { Input,
|
||||
// Breadcrumb,
|
||||
message } from 'antd';
|
||||
const { Search } = Input;
|
||||
|
||||
|
||||
@ -287,7 +289,7 @@ export default function Index() {
|
||||
// 新建项目路由名字
|
||||
// const [newname,setNewname] = useState('')
|
||||
|
||||
const [pathArray, setPathArray] = useState<any>([])
|
||||
// const [pathArray, setPathArray] = useState<any>([])
|
||||
const [showSearchBox, setShowSearchBox] = useState(true)
|
||||
|
||||
|
||||
@ -295,114 +297,114 @@ export default function Index() {
|
||||
// const nowname = sessionStorage.getItem('now')
|
||||
if (location.pathname.includes('/home')) {
|
||||
setNow('首页')
|
||||
setPathArray([{ title: '首页' }])
|
||||
// setPathArray([{ title: '首页' }])
|
||||
setShowSearchBox(true)
|
||||
|
||||
} else if (location.pathname.includes('/proj-create')) {
|
||||
setShowSearchBox(false)
|
||||
setNow('创建项目')
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '创建项目' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '创建项目' }])
|
||||
// /config-mod-list /config-menu-list /config-mod-show
|
||||
} else if (location.pathname.includes('/proj-edit') && !location.pathname.includes('/config-mod-show') && !location.pathname.includes('/config-mod-edit') && !location.pathname.includes('/step') && !location.pathname.includes('/config-loginpage') && !location.pathname.includes('/config-mod-save') && !location.pathname.includes('/config-mod-list') && !location.pathname.includes('/config-menu-list')) {
|
||||
setNow('编辑项目')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setEditname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
|
||||
} else if (location.pathname.includes('/proj-new')) {
|
||||
setNow('新建项目')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: '新建项目' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: '新建项目' }])
|
||||
} else if (location.pathname.includes('/proj-efree')) {
|
||||
setNow('编辑项目')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: '编辑项目' }])
|
||||
} else if (location.pathname.includes('/proj-eall')) {
|
||||
setNow('编辑项目')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页 </Link> }, { title: '编辑项目' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页 </Link> }, { title: '编辑项目' }])
|
||||
} else if (location.pathname.includes('/proj-edit/step1')) {
|
||||
setNow('标题简介')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '标题简介' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '标题简介' }])
|
||||
} else if (location.pathname.includes('/proj-edit/step2')) {
|
||||
setNow('标题简介')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '基本信息' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '基本信息' }])
|
||||
} else if (location.pathname.includes('/proj-edit/config-loginpage')) {
|
||||
setNow('登录界面设置')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '登录界面设置' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '登录界面设置' }])
|
||||
} else if (location.pathname.includes('/proj-edit/config-mod-list')) {
|
||||
setNow('系统菜单管理')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单管理' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单管理' }])
|
||||
} else if (location.pathname.includes('/proj-edit/config-menu-list')) {
|
||||
setNow('系统菜单顺序')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单顺序' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '系统菜单顺序' }])
|
||||
} else if (location.pathname.includes('/step3')) {
|
||||
setNow('软件功能特点')
|
||||
setShowSearchBox(false)
|
||||
|
||||
// setNewname(location.pathname)
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '软件功能特点' }])
|
||||
} else if (location.pathname.includes('/proj-edit/config-mod-save')) {
|
||||
setNow('添加菜单')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '添加菜单' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-1) }}>编辑项目</a> }, { title: '添加菜单' }])
|
||||
} else if (location.pathname.includes('/proj-edit/config-mod-edit')) {
|
||||
setNow('编辑菜单')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '编辑菜单' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '编辑菜单' }])
|
||||
// /config-mod-edit /config-mod-show
|
||||
} else if (location.pathname.includes('/proj-edit/config-mod-show')) {
|
||||
setNow('查看菜单')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '查看菜单' }])
|
||||
// setPathArray([{ title: <Link to={'/home'}>首页</Link> }, { title: <Link to={'/proj-create'}>创建项目</Link> }, { title: <a onClick={() => { nav(-2) }}>编辑项目</a> }, { title: <a onClick={() => { nav(-1) }}>系统菜单管理</a> }, { title: '查看菜单' }])
|
||||
// /config-mod-edit
|
||||
} else if (location.pathname.includes('/product-release')) {
|
||||
setNow('首页')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: '首页' }])
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
} else if (location.pathname.includes(' /transaction-order')) {
|
||||
setNow('首页')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: '首页' }])
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
} else if (location.pathname.includes(' /copyright-goods')) {
|
||||
setNow('首页')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: '首页' }])
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
} else if (location.pathname.includes(' /trading-goods')) {
|
||||
setNow('首页')
|
||||
setShowSearchBox(false)
|
||||
|
||||
setPathArray([{ title: '首页' }])
|
||||
// setPathArray([{ title: '首页' }])
|
||||
// /config-mod-edit /product-release /transaction-order
|
||||
}
|
||||
}, [location.pathname])
|
||||
@ -428,9 +430,9 @@ export default function Index() {
|
||||
// if (location.pathname.includes('/home')) {
|
||||
if (!keywords && !type && !chargeAdditionals && !progress) {
|
||||
setKeywords('')
|
||||
setType('')
|
||||
setchargeAdditionals('')
|
||||
setprogress('')
|
||||
setType(null)
|
||||
setchargeAdditionals(null)
|
||||
setprogress(null)
|
||||
}
|
||||
if (location.pathname.includes('/home')) {
|
||||
nav('/home', {
|
||||
@ -498,6 +500,8 @@ export default function Index() {
|
||||
keywords={keywords}
|
||||
type={type ? type : ""}
|
||||
chargeAdditionals={chargeAdditionals ? chargeAdditionals : ""}
|
||||
progress={progress ? progress : ""}
|
||||
authorId={authorId ? authorId : ""}
|
||||
/>
|
||||
<div className='belongPeopleMenu'>
|
||||
<div className='belongPeopleMenu-title'>
|
||||
@ -534,7 +538,7 @@ export default function Index() {
|
||||
}
|
||||
}}
|
||||
style={{ background: authorId == item.projOwnerId ? '#FF9F08' : '', color: authorId == item.projOwnerId ? '#FFF' : '' }}
|
||||
title={ item.name} // 添加 title 属性以显示完整文本
|
||||
title={item.name} // 添加 title 属性以显示完整文本
|
||||
>
|
||||
名称:{item.name}
|
||||
</div>
|
||||
@ -572,7 +576,7 @@ export default function Index() {
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: belongArray.length > 0 ? 'none' : 'block', height: 230 }}>
|
||||
<div style={{width:230,height:230,display:'flex',alignItems:'center',justifyContent:'center'}}>
|
||||
<div style={{ width: 230, height: 230, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||
<Empty
|
||||
description="暂无数据"
|
||||
/>
|
||||
@ -631,7 +635,6 @@ export default function Index() {
|
||||
/>
|
||||
<Select
|
||||
value={type}
|
||||
|
||||
style={{ height: '31px', width: '183px', marginLeft: 20, display: showSearchBox ? 'block' : 'none' }}
|
||||
onChange={(value: string) => {
|
||||
// console.log(`selected ${value}`);
|
||||
@ -650,13 +653,13 @@ export default function Index() {
|
||||
|
||||
}}
|
||||
options={[
|
||||
// { value: '', label: '全部类型' },
|
||||
|
||||
{ value: 'FREE', label: '免费试用' },
|
||||
{ value: 'MATERIAL', label: '写材料' },
|
||||
{ value: 'ALL', label: '全托管' },
|
||||
]}
|
||||
// defaultValue=""
|
||||
placeholder={'选择类型'}
|
||||
|
||||
placeholder='选择类型'
|
||||
/>
|
||||
<Select
|
||||
value={chargeAdditionals}
|
||||
@ -730,14 +733,63 @@ export default function Index() {
|
||||
}}></div>
|
||||
<div className='nowPosition'>
|
||||
<img src={backImg} alt="" />
|
||||
<div>
|
||||
<Breadcrumb
|
||||
<div style={{ display: now == '首页' ? 'block' : 'none' }}>
|
||||
{/* <Breadcrumb
|
||||
separator="|"
|
||||
// items={[
|
||||
// { title: <Link to={'/home'}>首页</Link> },
|
||||
// ]}
|
||||
items={pathArray}
|
||||
/>
|
||||
/> */}
|
||||
<span>首页</span>
|
||||
</div>
|
||||
<div style={{ display: now == '创建项目' ? 'block' : 'none' }}>
|
||||
{/* <Breadcrumb
|
||||
separator="|"
|
||||
// items={[
|
||||
// { title: <Link to={'/home'}>首页</Link> },
|
||||
// ]}
|
||||
items={pathArray}
|
||||
/> */}
|
||||
<span style={{ cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
progress: progress,
|
||||
authorId: authorId
|
||||
}
|
||||
})
|
||||
}}
|
||||
>首页</span>
|
||||
<span style={{ marginLeft: 10, marginRight: 10 }}>|</span>
|
||||
<span>创建项目</span>
|
||||
</div>
|
||||
<div style={{ display: now == '编辑项目' ? 'block' : 'none' }}>
|
||||
{/* <Breadcrumb
|
||||
separator="|"
|
||||
// items={[
|
||||
// { title: <Link to={'/home'}>首页</Link> },
|
||||
// ]}
|
||||
items={pathArray}
|
||||
/> */}
|
||||
<span style={{ cursor: 'pointer' }}
|
||||
onClick={() => {
|
||||
nav('/home', {
|
||||
state: {
|
||||
keyword: keywords,
|
||||
name: type,
|
||||
chargeAdditionals: chargeAdditionals,
|
||||
progress: progress,
|
||||
authorId: authorId
|
||||
}
|
||||
})
|
||||
}}
|
||||
>首页</span>
|
||||
<span style={{ marginLeft: 10, marginRight: 10 }}>|</span>
|
||||
<span>编辑项目</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user