新增装备成果相关

This commit is contained in:
zhangxiaozhuozhuo 2023-11-20 16:16:16 +08:00
parent c2e9249fd8
commit 24f8f631a5
2 changed files with 18 additions and 4 deletions

View File

@ -25,13 +25,15 @@ export default (props) => {
const [callList, setCallList] = useState([]);
const [changeList, setChangeList] = useState([]);
const [checkList, setCheckList] = useState([]);
const [abandonList, setAbandonList] = useState([]);
const [equipList, setEquipList] = useState([]); // @@@
const [abandonList, setAbandonList] = useState([]);
const [competitionList, setCompetitionList] = useState([]);
const [dealList, setDealList] = useState([]);
useEffect(() => {
setLoading(true);
if (tab === '0' || tab === '7') {
// @@@
const params = {
orderBy,
curPage: 1,
@ -55,11 +57,17 @@ export default (props) => {
getNoticeList({ ...params,achievementSource:'科研成果' }).then(data => {
setCheckList(data.rows);
});
// @@@ add
getNoticeList({ ...params,achievementSource:'装备成果' }).then(data => {
setEquipList(data.rows);
setLoading(false);
});
getNoticeList({ ...params,achievementSource:'其他' }).then(data => {
setAbandonList(data.rows);
setLoading(false);
});
} else {
// @@@
const params = {
orderBy,
curPage,
@ -91,7 +99,7 @@ export default (props) => {
props.history.push(`/achievement/noticeDetail/${id}`);
}
// @@@ DOM
// @@@ DOM
function sortNav() {
return <div className="notice-sort-nav">
<Search
@ -141,12 +149,12 @@ export default (props) => {
)
}
// jsx
// @@@
function content() {
// jsx
if (tab === '0') {
// @@@
if(callList.length === 0 && changeList.length === 0 && competitionList.length === 0 && checkList.length === 0 && abandonList.length === 0){
if(callList.length === 0 && changeList.length === 0 && competitionList.length === 0 && checkList.length === 0 && equipList.length === 0 && abandonList.length === 0){
return <React.Fragment><Nodata _html="暂无数据" /></React.Fragment>
}else{
return <React.Fragment>
@ -154,6 +162,7 @@ export default (props) => {
{cont(changeList, "创客任务", '创客任务', "iconfont icon-gengzhenggonggao")}
{cont(competitionList, "开放竞赛", '开放竞赛', "iconfont icon-chengjiaogonggao")}
{cont(checkList, "科研成果", '科研成果', "iconfont icon-zhongbiaogonggao")}
{cont(equipList, "装备成果", '装备成果', "iconfont icon-ruanjiangongcheng1")}
{cont(abandonList, "其他", '其他', "iconfont icon-feibiaogonggao")}
</React.Fragment>
}
@ -178,6 +187,10 @@ export default (props) => {
titleStr = "科研成果";
svgStr = "iconfont icon-feibiaogonggao"
break;
case '装备成果':
titleStr = "装备成果";
svgStr = "iconfont icon-ruanjiangongcheng1"
break;
case '其他':
titleStr = "其他";
svgStr = "iconfont icon-zhaobiaogonggao"

View File

@ -14,6 +14,7 @@ export const achieveSource = [
{ code: "创客任务", name: "创客任务" },
{ code: "开放竞赛", name: "开放竞赛" },
{ code: "科研成果", name: "科研成果" },
{ code: "装备成果", name: "装备成果" },
{ code: "其他", name: "其他" },
];