forked from Gitlink/forgeplus-react
Merge branch 'dev_military_qz2022' of http://106.75.45.236:3000/durian/forgeplus-react into dev_military_qz2022
This commit is contained in:
commit
baa24c665a
|
@ -4,7 +4,7 @@ import './index.scss';
|
|||
|
||||
export default (props) => {
|
||||
const {className, loading, dataSource, columns, handleRow, total, setCurPage, current, rowSelection, expandedRowRender, expandIconColumnIndex, expandIconAsCell, onShowSizeChange, showSizeChanger, pagination, scroll,pageSize } = props;
|
||||
|
||||
console.log(total);
|
||||
return (
|
||||
<div className={`pagination-table ${className}`}>
|
||||
<Table
|
||||
|
|
|
@ -11,6 +11,7 @@ import './qz2022/index.scss';
|
|||
import { Menu, Popover, Spin } from "antd";
|
||||
import banner from './qz2022/image/banner.png'
|
||||
import { getQz2022, userCompetitionStatus } from "./qz2022/api";
|
||||
import { paths } from "./qz2022/static";
|
||||
|
||||
const Introduce = Loadable({
|
||||
loader: () => import('./qz2022/introduce'),
|
||||
|
@ -109,7 +110,7 @@ const Qz2022 = (props) => {
|
|||
{/* banner图+选项 */}
|
||||
<img src={banner} className="qz_banner"/>
|
||||
<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" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/introduce` }}>大赛介绍</Link>
|
||||
</li>
|
||||
|
@ -146,8 +147,8 @@ const Qz2022 = (props) => {
|
|||
<a>后台管理</a>
|
||||
</Popover>
|
||||
</li>}
|
||||
</ul>
|
||||
<div className="menu_border mt20 qz_main"></div>
|
||||
</ul>}
|
||||
{paths.indexOf(active) !== -1 && <div className="menu_border mt20 qz_main"></div>}
|
||||
<Spin spinning={false} wrapperClassName="spinstyle qzCont" tip="正在同步镜像" size="large">
|
||||
<Switch {...props}>
|
||||
{/* 大赛介绍 */}
|
||||
|
|
|
@ -5,9 +5,9 @@ import '../../index.scss';
|
|||
|
||||
function Introduce({qzDetail }) {
|
||||
return (
|
||||
<div className="qz_main fingerpost">
|
||||
<div className="fingerpost_head font-18 mb20">2022年赛程说明</div>
|
||||
<div className="fingerpost_cont" dangerouslySetInnerHTML={{ __html: qzDetail && qzDetail.guide }}></div>
|
||||
<div className="fingerpost">
|
||||
<div className="fingerpost_head font-18 mb20 qz_main">2022年赛程说明</div>
|
||||
<div className="fingerpost_cont qz_main" dangerouslySetInnerHTML={{ __html: qzDetail && qzDetail.guide }}></div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
.fingerpost{
|
||||
min-height: 35vh;
|
||||
background-image: url('../image/f_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
.fingerpost_head{
|
||||
padding: 60px 0 30px;
|
||||
text-align: center;
|
||||
border-bottom: 1px dashed #979797;
|
||||
font-weight: bold;
|
||||
}
|
||||
.fingerpost_cont{
|
||||
padding-bottom: 50px;
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 607 KiB |
|
@ -24,19 +24,22 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
|
|||
setType(pathname.substring(pathname.lastIndexOf('/')+1, pathname.lenght));
|
||||
setZone('-1');
|
||||
setSubCompetition('-1');
|
||||
setCurPage(1);
|
||||
}, [pathname]);
|
||||
|
||||
useEffect(()=>{
|
||||
setLoading(true);
|
||||
const params = {
|
||||
zone: zone === '-1' ? undefined : zone,
|
||||
sub_competition: subCompetition === '-1' ? undefined : subCompetition
|
||||
sub_competition: subCompetition === '-1' ? undefined : subCompetition,
|
||||
page: curPage,
|
||||
limit: 10
|
||||
}
|
||||
if(type === "applys"){
|
||||
// 报名列表
|
||||
getQzEnrollList(params).then(response=>{
|
||||
if(response && response.status === 200){
|
||||
setTotal(response.count);
|
||||
setTotal(response.data.count);
|
||||
setDataList(response.data.data);
|
||||
}
|
||||
}).finally(()=>{
|
||||
|
@ -46,14 +49,14 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
|
|||
// 提交作品列表
|
||||
getQzProList(params).then(response=>{
|
||||
if(response && response.status === 200){
|
||||
setTotal(response.count);
|
||||
setTotal(response.data.count);
|
||||
setDataList(response.data.data);
|
||||
}
|
||||
}).finally(()=>{
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
}, [type, zone, subCompetition])
|
||||
}, [type, zone, subCompetition, curPage])
|
||||
|
||||
let columns_apply = useMemo(() => {
|
||||
return [
|
||||
|
@ -196,7 +199,7 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
|
|||
return <span style={{color:'gray' }}>查看成员</span>
|
||||
}
|
||||
}
|
||||
|
||||
console.log('管理', total);
|
||||
return (
|
||||
<div className="qz_management">
|
||||
|
||||
|
@ -224,7 +227,7 @@ function Introduce({history:{location:{pathname}},qzDetail }) {
|
|||
dataSource={dataList}
|
||||
columns={type==="applys" ? columns_apply : columns_production}
|
||||
total={total}
|
||||
setCurPage={setCurPage}
|
||||
setCurPage={(page)=>setCurPage(page)}
|
||||
current={curPage}
|
||||
expandedRowRender={qzDetail && qzDetail.is_local ? expandRow : expandRowWai}
|
||||
expandIconColumnIndex={8}
|
||||
|
|
|
@ -14,7 +14,7 @@ function Notice({ form, showNotification, match, history }) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div className="qz_notice">
|
||||
<div className="qz_notice bg">
|
||||
<div className="qz_main not">
|
||||
<Link to={"/competition/qz2022/notice/1"}>
|
||||
<div className="qz_notice_cont">
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
.qz_notice{
|
||||
min-height: 445px;
|
||||
>.qz_main.not{
|
||||
margin-top: 48px;
|
||||
&.bg{
|
||||
background-image: url('../image/notice_bj.png');
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
>.qz_main.not{
|
||||
margin-top: 48px;
|
||||
}
|
||||
>.qz_main.notice_detal{
|
||||
min-height: 65vh;
|
||||
>.breadCrumb .icon_d{margin-top: -4px;}
|
||||
|
|
|
@ -76,29 +76,31 @@ function Introduce({ form, showNotification, match, history, enrollStatus }) {
|
|||
}
|
||||
}
|
||||
return (
|
||||
<div className="qz_main refer mt40 mb60">
|
||||
<img src={refer} className="refer_img mb20"/>
|
||||
<Upload
|
||||
accept=".zip,.rar,.tar"
|
||||
// 开发时 action需要添加?debug=admin
|
||||
action={`${current_main_site_url}/api/attachments.json?debug=admin`}
|
||||
fileList={files}
|
||||
onChange={handleChange}
|
||||
onDownload={download}
|
||||
beforeUpload={beforeUpload}
|
||||
showUploadList={{
|
||||
showDownloadIcon: true,
|
||||
downloadIcon: <i className="iconfont icon-xiazai-icon"></i>,
|
||||
showRemoveIcon: false
|
||||
}}
|
||||
>
|
||||
<Button className="upload"><Icon type="upload" />上传</Button>
|
||||
</Upload>
|
||||
<Modal/>
|
||||
{enrollStatus && enrollStatus.upload_status && <div className="refer_tip mt20 cover"><i className="iconfont icon-erciqueren_icon mr10"></i>您已上传作品压缩包,再次上传将会覆盖您上一次的提交。</div>}
|
||||
<div className="refer_tip mt20">上传单个作品压缩包(仅限上传一个压缩包)</div>
|
||||
<div className="refer_bor"></div>
|
||||
<Button type="primary" onClick={referProduction} loading={loading}>提交作品</Button>
|
||||
<div className="refer_bg">
|
||||
<div className="qz_main refer">
|
||||
<img src={refer} className="refer_img mb20"/>
|
||||
<Upload
|
||||
accept=".zip,.rar,.tar"
|
||||
// 开发时 action需要添加?debug=admin
|
||||
action={`${current_main_site_url}/api/attachments.json?debug=admin`}
|
||||
fileList={files}
|
||||
onChange={handleChange}
|
||||
onDownload={download}
|
||||
beforeUpload={beforeUpload}
|
||||
showUploadList={{
|
||||
showDownloadIcon: true,
|
||||
downloadIcon: <i className="iconfont icon-xiazai-icon"></i>,
|
||||
showRemoveIcon: false
|
||||
}}
|
||||
>
|
||||
<Button className="upload"><Icon type="upload" />上传</Button>
|
||||
</Upload>
|
||||
<Modal/>
|
||||
{enrollStatus && enrollStatus.upload_status && <div className="refer_tip mt20 cover"><i className="iconfont icon-erciqueren_icon mr10"></i>您已上传作品压缩包,再次上传将会覆盖您上一次的提交。</div>}
|
||||
<div className="refer_tip mt20">上传单个作品压缩包(仅限上传一个压缩包)</div>
|
||||
<div className="refer_bor"></div>
|
||||
<Button type="primary" onClick={referProduction} loading={loading}>提交作品</Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
.refer_bg{
|
||||
padding: 40px 0 60px;
|
||||
}
|
||||
.refer{
|
||||
background-color:#f8f9ff;
|
||||
border:1px solid rgba(46, 91, 254, 0.37);
|
||||
background-color:white;
|
||||
// border:1px solid rgba(46, 91, 254, 0.37);
|
||||
border-radius:4px 4px 0px 0px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
padding: 66px 0 86px;
|
||||
margin-top: 50px;
|
||||
.refer_img{
|
||||
width: 48px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue