定制竞赛-issue

This commit is contained in:
谢思 2022-03-30 11:39:07 +08:00
parent b4940b75d5
commit cbbf17c27a
11 changed files with 60 additions and 44 deletions

View File

@ -4,7 +4,7 @@ import './index.scss';
export default (props) => { export default (props) => {
const {className, loading, dataSource, columns, handleRow, total, setCurPage, current, rowSelection, expandedRowRender, expandIconColumnIndex, expandIconAsCell, onShowSizeChange, showSizeChanger, pagination, scroll,pageSize } = props; const {className, loading, dataSource, columns, handleRow, total, setCurPage, current, rowSelection, expandedRowRender, expandIconColumnIndex, expandIconAsCell, onShowSizeChange, showSizeChanger, pagination, scroll,pageSize } = props;
console.log(total);
return ( return (
<div className={`pagination-table ${className}`}> <div className={`pagination-table ${className}`}>
<Table <Table

View File

@ -11,6 +11,7 @@ import './qz2022/index.scss';
import { Menu, Popover, Spin } from "antd"; import { Menu, Popover, Spin } from "antd";
import banner from './qz2022/image/banner.png' import banner from './qz2022/image/banner.png'
import { getQz2022, userCompetitionStatus } from "./qz2022/api"; import { getQz2022, userCompetitionStatus } from "./qz2022/api";
import { paths } from "./qz2022/static";
const Introduce = Loadable({ const Introduce = Loadable({
loader: () => import('./qz2022/introduce'), loader: () => import('./qz2022/introduce'),
@ -108,7 +109,7 @@ const Qz2022 = (props) => {
{/* banner图+选项 */} {/* banner图+选项 */}
<img src={banner} className="qz_banner"/> <img src={banner} className="qz_banner"/>
<div className="qz2022"> <div className="qz2022">
<ul className="qz2022Menu mt20 qz_main"> {paths.indexOf(active) !== -1 && <ul className="qz2022Menu mt20 qz_main">
<li className={ active==='qz2022' ||active === "introduce"? "active" : ""}> <li className={ active==='qz2022' ||active === "introduce"? "active" : ""}>
<Link to={{ pathname: `/competition/qz2022/introduce` }}>大赛介绍</Link> <Link to={{ pathname: `/competition/qz2022/introduce` }}>大赛介绍</Link>
</li> </li>
@ -145,8 +146,8 @@ const Qz2022 = (props) => {
<a>后台管理</a> <a>后台管理</a>
</Popover> </Popover>
</li>} </li>}
</ul> </ul>}
<div className="menu_border mt20 qz_main"></div> {paths.indexOf(active) !== -1 && <div className="menu_border mt20 qz_main"></div>}
<Spin spinning={false} wrapperClassName="spinstyle qzCont" tip="正在同步镜像" size="large"> <Spin spinning={false} wrapperClassName="spinstyle qzCont" tip="正在同步镜像" size="large">
<Switch {...props}> <Switch {...props}>
{/* 大赛介绍 */} {/* 大赛介绍 */}

View File

@ -5,9 +5,9 @@ import '../../index.scss';
function Introduce({qzDetail }) { function Introduce({qzDetail }) {
return ( return (
<div className="qz_main fingerpost"> <div className="fingerpost">
<div className="fingerpost_head font-18 mb20">2022年赛程说明</div> <div className="fingerpost_head font-18 mb20 qz_main">2022年赛程说明</div>
<div className="fingerpost_cont" dangerouslySetInnerHTML={{ __html: qzDetail && qzDetail.guide }}></div> <div className="fingerpost_cont qz_main" dangerouslySetInnerHTML={{ __html: qzDetail && qzDetail.guide }}></div>
</div> </div>
) )
} }

View File

@ -1,8 +1,14 @@
.fingerpost{ .fingerpost{
min-height: 35vh;
background-image: url('../image/f_bg.png');
background-repeat: no-repeat;
background-size: cover;
.fingerpost_head{ .fingerpost_head{
padding: 60px 0 30px; padding: 60px 0 30px;
text-align: center; text-align: center;
border-bottom: 1px dashed #979797;
font-weight: bold; font-weight: bold;
} }
.fingerpost_cont{
padding-bottom: 50px;
}
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 KiB

View File

@ -18,7 +18,7 @@ function Introduce({ form, showNotification, match, history }) {
<div className="introduce-video"><video src="http://111.8.36.180:8000/preview/93579e3f4bc0ba33075a905c08c79322_1648197024501.mp4" autoPlay controls muted></video></div> <div className="introduce-video"><video src="http://111.8.36.180:8000/preview/93579e3f4bc0ba33075a905c08c79322_1648197024501.mp4" autoPlay controls muted></video></div>
<div className="introduce-info"> <div className="introduce-info">
<h3 className="info-tit">启智2022作战概念·事需求创新大赛</h3> <h3 className="info-tit">启智-2022作战概念·事需求创新大赛</h3>
{/* <div className="info-content"> */} {/* <div className="info-content"> */}
<p className="content-item">创客以用户创新为核心理念是面向知识社会 <p className="content-item">创客以用户创新为核心理念是面向知识社会
的创新2.0模式在设计与制造领域的典型体现 的创新2.0模式在设计与制造领域的典型体现

View File

@ -24,19 +24,22 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
setType(pathname.substring(pathname.lastIndexOf('/')+1, pathname.lenght)); setType(pathname.substring(pathname.lastIndexOf('/')+1, pathname.lenght));
setZone('-1'); setZone('-1');
setSubCompetition('-1'); setSubCompetition('-1');
setCurPage(1);
}, [pathname]); }, [pathname]);
useEffect(()=>{ useEffect(()=>{
setLoading(true); setLoading(true);
const params = { const params = {
zone: zone === '-1' ? undefined : zone, zone: zone === '-1' ? undefined : zone,
sub_competition: subCompetition === '-1' ? undefined : subCompetition sub_competition: subCompetition === '-1' ? undefined : subCompetition,
page: curPage,
limit: 10
} }
if(type === "applys"){ if(type === "applys"){
// //
getQzEnrollList(params).then(response=>{ getQzEnrollList(params).then(response=>{
if(response && response.status === 200){ if(response && response.status === 200){
setTotal(response.count); setTotal(response.data.count);
setDataList(response.data.data); setDataList(response.data.data);
} }
}).finally(()=>{ }).finally(()=>{
@ -46,14 +49,14 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
// //
getQzProList(params).then(response=>{ getQzProList(params).then(response=>{
if(response && response.status === 200){ if(response && response.status === 200){
setTotal(response.count); setTotal(response.data.count);
setDataList(response.data.data); setDataList(response.data.data);
} }
}).finally(()=>{ }).finally(()=>{
setLoading(false); setLoading(false);
}) })
} }
}, [type, zone, subCompetition]) }, [type, zone, subCompetition, curPage])
let columns_apply = useMemo(() => { let columns_apply = useMemo(() => {
return [ return [
@ -196,7 +199,7 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
return <span style={{color:'gray' }}>查看成员</span> return <span style={{color:'gray' }}>查看成员</span>
} }
} }
console.log('管理', total);
return ( return (
<div className="qz_management"> <div className="qz_management">
@ -224,7 +227,7 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
dataSource={dataList} dataSource={dataList}
columns={type==="applys" ? columns_apply : columns_production} columns={type==="applys" ? columns_apply : columns_production}
total={total} total={total}
setCurPage={setCurPage} setCurPage={(page)=>setCurPage(page)}
current={curPage} current={curPage}
expandedRowRender={qzDetail && qzDetail.is_local ? expandRow : expandRowWai} expandedRowRender={qzDetail && qzDetail.is_local ? expandRow : expandRowWai}
expandIconColumnIndex={8} expandIconColumnIndex={8}

View File

@ -14,7 +14,7 @@ function Notice({ form, showNotification, match, history }) {
}, []); }, []);
return ( return (
<div className="qz_notice"> <div className="qz_notice bg">
<div className="qz_main not"> <div className="qz_main not">
<Link to={"/competition/qz2022/notice/1"}> <Link to={"/competition/qz2022/notice/1"}>
<div className="qz_notice_cont"> <div className="qz_notice_cont">

View File

@ -1,12 +1,14 @@
.qz_notice{ .qz_notice{
min-height: 445px; min-height: 445px;
>.qz_main.not{ &.bg{
margin-top: 48px;
background-image: url('../image/notice_bj.png'); background-image: url('../image/notice_bj.png');
background-position: center center; background-position: center center;
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
>.qz_main.not{
margin-top: 48px;
}
>.qz_main.notice_detal{ >.qz_main.notice_detal{
min-height: 65vh; min-height: 65vh;
>.breadCrumb .icon_d{margin-top: -4px;} >.breadCrumb .icon_d{margin-top: -4px;}

View File

@ -76,7 +76,8 @@ function Introduce({ form, showNotification, match, history, enrollStatus }) {
} }
} }
return ( return (
<div className="qz_main refer mt40 mb60"> <div className="refer_bg">
<div className="qz_main refer">
<img src={refer} className="refer_img mb20"/> <img src={refer} className="refer_img mb20"/>
<Upload <Upload
accept=".zip,.rar,.tar" accept=".zip,.rar,.tar"
@ -100,6 +101,7 @@ function Introduce({ form, showNotification, match, history, enrollStatus }) {
<div className="refer_bor"></div> <div className="refer_bor"></div>
<Button type="primary" onClick={referProduction} loading={loading}>提交作品</Button> <Button type="primary" onClick={referProduction} loading={loading}>提交作品</Button>
</div> </div>
</div>
) )
} }
export default Introduce; export default Introduce;

View File

@ -1,12 +1,14 @@
.refer_bg{
padding: 40px 0 60px;
}
.refer{ .refer{
background-color:#f8f9ff; background-color:white;
border:1px solid rgba(46, 91, 254, 0.37); // border:1px solid rgba(46, 91, 254, 0.37);
border-radius:4px 4px 0px 0px; border-radius:4px 4px 0px 0px;
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
padding: 66px 0 86px; padding: 66px 0 86px;
margin-top: 50px;
.refer_img{ .refer_img{
width: 48px; width: 48px;
} }