diff --git a/src/components/menu/MenuWithTopButton.tsx b/src/components/menu/MenuWithTopButton.tsx index 7aec1a3..493a0f1 100644 --- a/src/components/menu/MenuWithTopButton.tsx +++ b/src/components/menu/MenuWithTopButton.tsx @@ -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 } }) }}> diff --git a/src/interfaces/menu/IMenuWithTopButton.ts b/src/interfaces/menu/IMenuWithTopButton.ts index 52cb310..803104f 100644 --- a/src/interfaces/menu/IMenuWithTopButton.ts +++ b/src/interfaces/menu/IMenuWithTopButton.ts @@ -22,4 +22,6 @@ export interface IMenuWithTopButton { keywords?:string; type?:string ; chargeAdditionals?:string; + progress?:string; + authorId?:string; } \ No newline at end of file diff --git a/src/route/index/Index.tsx b/src/route/index/Index.tsx index 0a04aa0..eb6feaa 100644 --- a/src/route/index/Index.tsx +++ b/src/route/index/Index.tsx @@ -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([]) + // const [pathArray, setPathArray] = useState([]) 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: 首页 }, { title: '创建项目' }]) + // setPathArray([{ title: 首页 }, { 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: 首页 }, { title: '编辑项目' }]) + // setPathArray([{ title: 首页 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-new')) { setNow('新建项目') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: '新建项目' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: '新建项目' }]) } else if (location.pathname.includes('/proj-efree')) { setNow('编辑项目') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: '编辑项目' }]) + // setPathArray([{ title: 首页 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-eall')) { setNow('编辑项目') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: '编辑项目' }]) + // setPathArray([{ title: 首页 }, { title: '编辑项目' }]) } else if (location.pathname.includes('/proj-edit/step1')) { setNow('标题简介') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '标题简介' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '标题简介' }]) } else if (location.pathname.includes('/proj-edit/step2')) { setNow('标题简介') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '基本信息' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '基本信息' }]) } else if (location.pathname.includes('/proj-edit/config-loginpage')) { setNow('登录界面设置') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '登录界面设置' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '登录界面设置' }]) } else if (location.pathname.includes('/proj-edit/config-mod-list')) { setNow('系统菜单管理') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '系统菜单管理' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '系统菜单管理' }]) } else if (location.pathname.includes('/proj-edit/config-menu-list')) { setNow('系统菜单顺序') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '系统菜单顺序' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '系统菜单顺序' }]) } else if (location.pathname.includes('/step3')) { setNow('软件功能特点') setShowSearchBox(false) // setNewname(location.pathname) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '软件功能特点' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '软件功能特点' }]) } else if (location.pathname.includes('/proj-edit/config-mod-save')) { setNow('添加菜单') setShowSearchBox(false) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '添加菜单' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-1) }}>编辑项目 }, { title: '添加菜单' }]) } else if (location.pathname.includes('/proj-edit/config-mod-edit')) { setNow('编辑菜单') setShowSearchBox(false) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-2) }}>编辑项目 }, { title: { nav(-1) }}>系统菜单管理 }, { title: '编辑菜单' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-2) }}>编辑项目 }, { title: { nav(-1) }}>系统菜单管理 }, { title: '编辑菜单' }]) // /config-mod-edit /config-mod-show } else if (location.pathname.includes('/proj-edit/config-mod-show')) { setNow('查看菜单') setShowSearchBox(false) - setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-2) }}>编辑项目 }, { title: { nav(-1) }}>系统菜单管理 }, { title: '查看菜单' }]) + // setPathArray([{ title: 首页 }, { title: 创建项目 }, { title: { nav(-2) }}>编辑项目 }, { title: { nav(-1) }}>系统菜单管理 }, { 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 : ""} />
@@ -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}
@@ -572,7 +576,7 @@ export default function Index() {
0 ? 'none' : 'block', height: 230 }}> -
+
@@ -594,7 +598,7 @@ export default function Index() { button={buyMenu.button} list={buyMenu.list} handleListItem={buyMenu.handleListItem} - /> */} + /> */}
@@ -631,7 +635,6 @@ export default function Index() { />
-
- + {/* 首页 }, // ]} items={pathArray} - /> + /> */} + 首页 +
+
+ {/* 首页 }, + // ]} + items={pathArray} + /> */} + { + nav('/home', { + state: { + keyword: keywords, + name: type, + chargeAdditionals: chargeAdditionals, + progress: progress, + authorId: authorId + } + }) + }} + >首页 + | + 创建项目 +
+
+ {/* 首页 }, + // ]} + items={pathArray} + /> */} + { + nav('/home', { + state: { + keyword: keywords, + name: type, + chargeAdditionals: chargeAdditionals, + progress: progress, + authorId: authorId + } + }) + }} + >首页 + | + 编辑项目