合并竞赛代码
|
@ -1,8 +1,9 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2340181 */
|
||||
src: url('iconfont.woff2?t=1646896472168') format('woff2'),
|
||||
url('iconfont.woff?t=1646896472168') format('woff'),
|
||||
url('iconfont.ttf?t=1646896472168') format('truetype');
|
||||
src: url('iconfont.woff2?t=1648801178933') format('woff2'),
|
||||
url('iconfont.woff?t=1648801178933') format('woff'),
|
||||
url('iconfont.ttf?t=1648801178933') format('truetype');
|
||||
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
"unicode_decimal": 59669
|
||||
},
|
||||
{
|
||||
|
||||
"icon_id": "27299393",
|
||||
"name": "icon",
|
||||
"font_class": "icon2",
|
||||
|
|
|
@ -15,13 +15,45 @@
|
|||
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%css/editormd.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%css/merge.css">
|
||||
<%= htmlWebpackPlugin.tags.headTags %>
|
||||
<style>
|
||||
#ie_info{
|
||||
display: none;
|
||||
text-align: center;
|
||||
margin: 10vh;
|
||||
color: #4154f1;
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!--用于markdown转html -->
|
||||
<div id="ie_info">不支持当前浏览器,请更换浏览器!<br/>推荐使用谷歌浏览器、360浏览器极速模式、火狐浏览器或Edge浏览器!</div>
|
||||
<div id="md_div" style="display: none;"></div>
|
||||
<div id="root" class="page -layout-v -fit widthunit"></div>
|
||||
<div id="picture_display" style="display: none;"></div>
|
||||
<script src="%PUBLIC_URL%js/jquery-1.8.3.min.js"></script>
|
||||
<script>
|
||||
var getExplorer = (function () {
|
||||
var explorer = window.navigator.userAgent,
|
||||
compare = function (s) { return (explorer.indexOf(s) >= 0); },
|
||||
ie11 = (function () { return ("ActiveXObject" in window) })();
|
||||
if (compare("MSIE") || ie11) { return 'ie'; }
|
||||
else if (compare("Firefox") && !ie11) { return 'Firefox'; }
|
||||
else if (compare("Chrome") && !ie11) {
|
||||
if (explorer.indexOf("Edge") > -1) {
|
||||
return 'Edge';
|
||||
} else {
|
||||
return 'Chrome';
|
||||
}
|
||||
}
|
||||
else if (compare("Opera") && !ie11) { return 'Opera'; }
|
||||
else if (compare("Safari") && !ie11) { return 'Safari'; }
|
||||
})()
|
||||
if (getExplorer == 'ie') {
|
||||
$('#ie_info').css({display:'block'});
|
||||
$('#root').css({display:'none'});
|
||||
}
|
||||
</script>
|
||||
<script src="%PUBLIC_URL%js/js_min_all.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/codemirror.js"></script>
|
||||
<script src="%PUBLIC_URL%js/editormd/editormd.min.js"></script>
|
||||
|
|
13
src/App.js
|
@ -69,6 +69,11 @@ const Expert = Loadable({
|
|||
loader: () => import('./military/expert'),
|
||||
loading: Loading,
|
||||
})
|
||||
// 启智2022 (为此竞赛定制化页面以及内容)
|
||||
const Qz2022 = Loadable({
|
||||
loader: () => import('./military/qz2022'),
|
||||
loading: Loading,
|
||||
})
|
||||
//403页面
|
||||
const Shixunauthority = Loadable({
|
||||
loader: () => import('./modules/403/Shixunauthority'),
|
||||
|
@ -146,7 +151,7 @@ const Managements = Loadable({
|
|||
// })
|
||||
|
||||
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
|
||||
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder","task","notice","managements","expert","administration",];
|
||||
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder","task","notice","managements","expert","competition","administration"];
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
|
@ -288,7 +293,7 @@ class App extends Component {
|
|||
mygetHelmetapi: response.data.setting
|
||||
});
|
||||
//存储配置到游览器
|
||||
localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
||||
response.data.setting&&localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
||||
localStorage.setItem('chromesettingresponse', JSON.stringify(response));
|
||||
try {
|
||||
if (response.data.setting.tab_logo_url) {
|
||||
|
@ -375,7 +380,9 @@ class App extends Component {
|
|||
{/*任务*/}
|
||||
<Route path="/task" component={Task} />
|
||||
{/*专家评审*/}
|
||||
<Route path="/expert" component={Expert} />
|
||||
<Route path="/expert" component={Expert} />
|
||||
{/*启智2022*/}
|
||||
<Route path="/competition/qz2022" component={Qz2022} />
|
||||
|
||||
<Route exact path="/explore/all"
|
||||
render={
|
||||
|
|
|
@ -26,7 +26,7 @@ if (isDev) {
|
|||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||
window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || 'admin'
|
||||
}
|
||||
}
|
||||
window._debugType = debugType;
|
||||
export function initAxiosInterceptors(props) {
|
||||
// 判断网络是否连接
|
||||
|
@ -34,6 +34,8 @@ export function initAxiosInterceptors(props) {
|
|||
|
||||
// var proxy = "http://192.168.1.40:3000";
|
||||
var proxy = "http://111.8.36.180:8000";
|
||||
// var proxy = "http://117.50.100.12:49999";
|
||||
|
||||
//响应前的设置
|
||||
axios.interceptors.request.use(
|
||||
config => {
|
||||
|
|
|
@ -5,7 +5,7 @@ import './Component.scss';
|
|||
export default (()=>{
|
||||
return(
|
||||
<div className="handleBox">
|
||||
<a href="https://www.osredm.com/forums/594/detail" target="_blank" >
|
||||
<a href="https://help.osredm.com/" target="_blank" >
|
||||
<img src={Handbook} alt=""/>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -3,41 +3,46 @@ import { Modal , Button } from 'antd';
|
|||
import './Index.scss';
|
||||
import '../../css/index.scss';
|
||||
import RenderHtml from '../../../components/render-html';
|
||||
// import cookie from 'react-cookies';
|
||||
import axios from 'axios';
|
||||
import cookie from 'react-cookies';
|
||||
// import axios from 'axios';
|
||||
|
||||
function SystemNotice({showNotice,system_notification,history,login,hideSystemNotice}){
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
|
||||
if(system_notification && !system_notification.is_read && showNotice && login){
|
||||
if(system_notification && !cookie.load('notice_stage')){
|
||||
setVisible(true);
|
||||
}
|
||||
},[system_notification,login])
|
||||
},[system_notification,history.location])
|
||||
|
||||
// useEffect(()=>{
|
||||
|
||||
// if(system_notification && !system_notification.is_read && showNotice && login){
|
||||
// setVisible(true);
|
||||
// }
|
||||
// },[system_notification,login])
|
||||
|
||||
function sureContinue() {
|
||||
if(login && ( system_notification && system_notification.id )){
|
||||
const url = `/users/${login}/system_notification_histories.json`;
|
||||
axios.post(url,{
|
||||
system_notification_id:system_notification.id
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
setVisible(false);
|
||||
hideSystemNotice();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}else{
|
||||
setVisible(false);
|
||||
hideSystemNotice();
|
||||
}
|
||||
// cookie.remove('notice_stage');
|
||||
// if(login && ( system_notification && system_notification.id )){
|
||||
// const url = `/users/${login}/system_notification_histories.json`;
|
||||
// axios.post(url,{
|
||||
// system_notification_id:system_notification.id
|
||||
// }).then(result=>{
|
||||
// if(result){
|
||||
// setVisible(false);
|
||||
// hideSystemNotice();
|
||||
// }
|
||||
// }).catch(error=>{})
|
||||
// }else{
|
||||
// setVisible(false);
|
||||
// hideSystemNotice();
|
||||
// }
|
||||
cookie.remove('notice_stage');
|
||||
|
||||
// let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天
|
||||
// // let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟
|
||||
// cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
|
||||
let inFifteenMinutes = new Date(new Date().getTime() + 24 * 3600 * 1000);//一天
|
||||
// let inFifteenMinutes = new Date(new Date().getTime() + 60 * 1000);//一分钟
|
||||
cookie.save('notice_stage', true,{ expires: inFifteenMinutes,path:"/" });
|
||||
|
||||
// setVisible(false);
|
||||
setVisible(false);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -184,7 +184,7 @@ class NewHeader extends Component {
|
|||
axios.get(url).then((response) => {
|
||||
if (response && response.data && response.data.setting) {
|
||||
this.setState({ settings: response.data.setting });
|
||||
localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
||||
response.data.setting&&localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
||||
localStorage.setItem('chromesettingresponse', JSON.stringify(response));
|
||||
} else {
|
||||
this.gettablogourlnull();
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
}
|
||||
|
||||
.newFooter {
|
||||
position: absolute;
|
||||
// position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #323232;
|
||||
|
|
|
@ -41,7 +41,7 @@ class Index extends Component {
|
|||
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
<Handbook/>
|
||||
{window.location.href.indexOf('osredm.jk') < 0&&<Handbook/>}
|
||||
<Switch {...this.props}>
|
||||
<Route
|
||||
path="/projects/:projectsType/new/:OIdentifier"
|
||||
|
|
|
@ -50,10 +50,14 @@ class Attachment extends Component {
|
|||
if (result) {
|
||||
this.setState({
|
||||
show_video: status === "preview",
|
||||
// video_url:
|
||||
// status === "preview"
|
||||
// ? "https://forgeplus.trustie.net" + result.data.url
|
||||
// : undefined,
|
||||
video_url:
|
||||
status === "preview"
|
||||
? "https://forgeplus.trustie.net" + result.data.url
|
||||
: undefined,
|
||||
status === "preview"
|
||||
? result.data.url
|
||||
: undefined,
|
||||
move_spin: false,
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
import React, { memo, useEffect, useState } from 'react';
|
||||
import { Button, Modal } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import bg from '../img/modal.png';
|
||||
import bg_local from '../img/modal_local.png';
|
||||
import './index.scss';
|
||||
|
||||
|
||||
|
||||
function QzModal() {
|
||||
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
let qzModalTime = localStorage.qzModalTime;
|
||||
let nowTime = new Date().getTime();
|
||||
if (qzModalTime) {
|
||||
if (nowTime - qzModalTime > 24 * 3600 * 1000) {
|
||||
// 延时展示,保证渲染modal不会白屏
|
||||
setTimeout(()=>{setVisible(true);},500)
|
||||
localStorage.setItem('qzModalTime', nowTime);
|
||||
}
|
||||
} else {
|
||||
setTimeout(()=>{setVisible(true);},500)
|
||||
localStorage.setItem('qzModalTime', nowTime);
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title="Basic Modal"
|
||||
visible={visible}
|
||||
onCancel={() => { setVisible(false) }}
|
||||
footer={null}
|
||||
className='qzModal'
|
||||
width='728px'
|
||||
maskClosable={false}
|
||||
>
|
||||
<img src={window.location.href.indexOf('osredm.jk')>-1?bg_local: bg} />
|
||||
|
||||
<Link to="/competition/qz2022" className="qz-btn">查看详情</Link>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
||||
export default memo(QzModal);
|
|
@ -0,0 +1,46 @@
|
|||
.qzModal {
|
||||
.ant-modal-body {
|
||||
padding: 0;
|
||||
background: rgb(48,118,207);
|
||||
|
||||
img {
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-modal-header {
|
||||
height: 0;
|
||||
background: rgb(48,118,207);
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.ant-modal-close {
|
||||
top: 0 !important;
|
||||
}
|
||||
.ant-modal-close-icon {
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
border-radius: 50%;
|
||||
padding: 5%;
|
||||
}
|
||||
|
||||
.qz-btn {
|
||||
position: absolute;
|
||||
bottom: -70px;
|
||||
left: 295px;
|
||||
width: 137px;
|
||||
height: 49px;
|
||||
background-color: #e96d2a;
|
||||
border-color: #e96d2a;
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
font-size:16px;
|
||||
text-align: center;
|
||||
line-height: 49px;
|
||||
&:hover{
|
||||
color: #fff !important;
|
||||
background-color: #f96d2a;
|
||||
border-color: #f96d2a;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
import React, { memo, useEffect, useState } from 'react';
|
||||
import Slider from 'react-slick';
|
||||
import { Link } from "react-router-dom";
|
||||
// import notice from '../img/slider.gif';
|
||||
import notice from '../img/notice.png';
|
||||
import text from '../img/slider.png';
|
||||
import "slick-carousel/slick/slick.css";
|
||||
import "slick-carousel/slick/slick-theme.css";
|
||||
|
||||
import './index.scss';
|
||||
|
||||
|
||||
let setting = {
|
||||
infinite: true,
|
||||
speed: 21000,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
autoplaySpeed: 0,
|
||||
// autoplaySpeed: 10000000,
|
||||
centerMode: true,
|
||||
centerPadding: '0px',
|
||||
// pauseOnDotsHover: true,
|
||||
// pauseOnFocus: true,
|
||||
autoplay: true,
|
||||
arrows: false,
|
||||
vertical: false,
|
||||
easing: 'linear',
|
||||
useTransform: false,
|
||||
cssEase: 'linear',
|
||||
}
|
||||
|
||||
|
||||
function SecondSection() {
|
||||
|
||||
|
||||
return (
|
||||
<div className="home-competition-slide homepage-main">
|
||||
<Slider {...setting}>
|
||||
|
||||
<div>
|
||||
<Link to="/competition/qz2022" className="competition-slide-item" >
|
||||
<img className='competition-notice' src={notice} />
|
||||
<img className='competition-text' src={text} />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Link to="/competition/qz2022" className="competition-slide-item" >
|
||||
<img className='competition-notice' src={notice} />
|
||||
<img className='competition-text' src={text} />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
</Slider>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default memo(SecondSection);
|
|
@ -0,0 +1,37 @@
|
|||
.home-competition-slide {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
top: 4.375em;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
|
||||
.competition-slide-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
height: 2.6vw;
|
||||
}
|
||||
|
||||
.competition-notice {
|
||||
width: 2.6vw;
|
||||
animation: ballRotation 1s infinite alternate;
|
||||
}
|
||||
|
||||
.competition-text {
|
||||
width: 23.5vw;
|
||||
}
|
||||
|
||||
@keyframes ballRotation {
|
||||
0% {
|
||||
transform: scale(0.75);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.2);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(0.75);
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 295 KiB |
After Width: | Height: | Size: 306 KiB |
After Width: | Height: | Size: 457 KiB |
After Width: | Height: | Size: 170 KiB |
|
@ -3,6 +3,8 @@ import { TPMIndexHOC } from '../modules/tpm/TPMIndexHOC';
|
|||
import { isMobile } from 'educoder';
|
||||
import './index.scss';
|
||||
|
||||
import Slider from './Slider';
|
||||
import QzModal from './QzModal';
|
||||
import FirstSection from './FirstSection';
|
||||
import SecondSection from './SecondSection';
|
||||
import ThirdSection from './ThirdSection';
|
||||
|
@ -33,15 +35,15 @@ function HomePage({ history }) {
|
|||
|
||||
let settings = JSON.parse(localStorage.chromesetting);
|
||||
let main_web_site_url = settings.main_web_site_url;
|
||||
let forumUrl ="";
|
||||
let competitionUrl ="";
|
||||
if(settings.navbar){
|
||||
for (const item of settings.navbar){
|
||||
if(item.name.indexOf("论坛")>-1){
|
||||
forumUrl=item.link;
|
||||
let forumUrl = "";
|
||||
let competitionUrl = "";
|
||||
if (settings.navbar) {
|
||||
for (const item of settings.navbar) {
|
||||
if (item.name.indexOf("论坛") > -1) {
|
||||
forumUrl = item.link;
|
||||
}
|
||||
if(item.name.indexOf("竞赛")>-1){
|
||||
competitionUrl=item.link;
|
||||
if (item.name.indexOf("竞赛") > -1) {
|
||||
competitionUrl = item.link;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +118,7 @@ function HomePage({ history }) {
|
|||
setSixth(false);
|
||||
}
|
||||
|
||||
if(isHuawei){
|
||||
if (isHuawei) {
|
||||
setFourth(true);
|
||||
setSixth(true);
|
||||
}
|
||||
|
@ -126,13 +128,15 @@ function HomePage({ history }) {
|
|||
return (
|
||||
<div className="homePage">
|
||||
|
||||
<Slider />
|
||||
<QzModal />
|
||||
<div id="home-first-section" className="home-first-section">
|
||||
<FirstSection first={first} />
|
||||
</div>
|
||||
|
||||
|
||||
<div id="home-second-section" className="home-second-section">
|
||||
<SecondSection second={second} main_web_site_url={main_web_site_url} btnUrl={forumUrl}/>
|
||||
<SecondSection second={second} main_web_site_url={main_web_site_url} btnUrl={forumUrl} />
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -149,11 +153,11 @@ function HomePage({ history }) {
|
|||
</div>
|
||||
|
||||
<div id="home-sixth-section" className="home-sixth-section">
|
||||
<SixthSection sixth={sixth} main_web_site_url={main_web_site_url} btnUrl={competitionUrl}/>
|
||||
<SixthSection sixth={sixth} main_web_site_url={main_web_site_url} btnUrl={competitionUrl} />
|
||||
</div>
|
||||
|
||||
<div id="home-seventh-section" className="home-seventh-section">
|
||||
<SeventhSection main_web_site_url={main_web_site_url} btnUrl={forumUrl}/>
|
||||
<SeventhSection main_web_site_url={main_web_site_url} btnUrl={forumUrl} />
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import axios from 'axios';
|
||||
import { getImageUrl,getLogoImageUrl } from 'educoder';
|
||||
import { Link } from "react-router-dom";
|
||||
import './index.scss';
|
||||
|
||||
export default ({ current_user, showLoginDialog }) => {
|
||||
|
||||
const [mygetHelmetapi2, setMygetHelmetapi2] = useState();
|
||||
|
||||
useEffect(() => {
|
||||
let url = "/setting.json";
|
||||
axios.get(url).then((response) => {
|
||||
if (response && response.data) {
|
||||
setMygetHelmetapi2(response.data.setting);
|
||||
try {
|
||||
if (response.data.setting.tab_logo_url) {
|
||||
gettablogourldata(response);
|
||||
} else {
|
||||
gettablogourlnull();
|
||||
}
|
||||
} catch (e) {
|
||||
gettablogourlnull();
|
||||
}
|
||||
} else {
|
||||
gettablogourlnull();
|
||||
}
|
||||
}).catch((error) => {
|
||||
gettablogourlnull();
|
||||
});
|
||||
},[])
|
||||
|
||||
//获取数据为空的时候
|
||||
function gettablogourlnull() {
|
||||
let link = document.createElement('link'),
|
||||
oldLink = document.getElementById('dynamic-favicon');
|
||||
link.id = 'dynamic-favicon';
|
||||
link.rel = 'shortcut icon';
|
||||
link.href = "/react/build/./favicon.ico";
|
||||
if (oldLink) {
|
||||
document.head.removeChild(oldLink);
|
||||
}
|
||||
document.head.appendChild(link);
|
||||
};
|
||||
|
||||
//获取数据的时候
|
||||
function gettablogourldata(response) {
|
||||
document.title = response.data.setting.name;
|
||||
let link = document.createElement('link'),
|
||||
oldLink = document.getElementById('dynamic-favicon');
|
||||
link.id = 'dynamic-favicon';
|
||||
link.rel = 'shortcut icon';
|
||||
link.href = '/' + response.data.setting.tab_logo_url;
|
||||
if (oldLink) {
|
||||
document.head.removeChild(oldLink);
|
||||
}
|
||||
console.log("ac12111:", response.data.setting.tab_logo_url);
|
||||
document.head.appendChild(link);
|
||||
}
|
||||
|
||||
function educoderloginysl() {
|
||||
//退出账号
|
||||
let url = `/accounts/logout.json`;
|
||||
axios.get((url)).then((result) => {
|
||||
if (result !== undefined) {
|
||||
window.location.href = "/";
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
|
||||
const main_web_site_url =
|
||||
localStorage.chromesetting &&
|
||||
JSON.parse(localStorage.chromesetting).main_web_site_url;
|
||||
|
||||
return (
|
||||
<div className="qz-login">
|
||||
{current_user === undefined || current_user.login === "" ?
|
||||
<span className="login-box">
|
||||
<a onClick={()=>{showLoginDialog()}} className={`mr5`}>登录</a>
|
||||
{
|
||||
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.register_url && (
|
||||
<span><em className="vertical-line"></em><a className={`ml5`} href={`${mygetHelmetapi2.new_course.register_url}`} target="_blank">注册</a></span>
|
||||
)
|
||||
}
|
||||
</span>
|
||||
:
|
||||
<div className="ml30 edu-menu-panel" style={{ height: "70px", lineHeight: "70px" }}>
|
||||
{/* <a href={`/users/${current_user === undefined ? "" : current_user.login}/courses`}> */}
|
||||
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
|
||||
src={getImageUrl(current_user.image_url)} width="34">
|
||||
</img>
|
||||
{/* </a> */}
|
||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
||||
<li className="bor-bottom-greyE" style={{ cursor: "default", background: "#fff" }}>{current_user.username}</li>
|
||||
<li>
|
||||
<a target='_blank' href={`${main_web_site_url}/accounts/${current_user.login}`}>个人中心</a>
|
||||
</li>
|
||||
<li>
|
||||
<Link to={`/task/myTask`}>创客管理</Link>
|
||||
</li>
|
||||
{
|
||||
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_courses &&
|
||||
<li><a href={`${mygetHelmetapi2.new_course.my_courses}`} target="_blank">我的课程</a></li>
|
||||
}
|
||||
{
|
||||
mygetHelmetapi2 && mygetHelmetapi2.new_course && mygetHelmetapi2.new_course.my_organ &&
|
||||
<li><a href={`/users/${current_user.login}/organizes`} target="_blank">我的组织</a></li>
|
||||
}
|
||||
<li className="bor-top-greyE">
|
||||
<a onClick={educoderloginysl}>退出</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
.qz2022Container{
|
||||
padding-top:0 !important;
|
||||
background:#fff ;
|
||||
}
|
||||
|
||||
.qz-login{
|
||||
position: absolute;
|
||||
right: 70px;
|
||||
top: 0;
|
||||
color: #fff;
|
||||
.login-box{
|
||||
a{
|
||||
color: #fff !important;
|
||||
cursor: pointer;
|
||||
:hover{
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.newFooter{
|
||||
position: relative;
|
||||
}
|
|
@ -3,10 +3,10 @@ import { Table, Pagination } from 'antd';
|
|||
import './index.scss';
|
||||
|
||||
export default (props) => {
|
||||
const { loading, dataSource, columns, handleRow, total, setCurPage, current, rowSelection, expandedRowRender, expandIconColumnIndex, expandIconAsCell, onShowSizeChange, showSizeChanger, pagination, scroll } = props;
|
||||
|
||||
const {className, loading, dataSource, columns, handleRow, total, setCurPage, current, rowSelection, expandedRowRender, expandIconColumnIndex, expandIconAsCell, onShowSizeChange, showSizeChanger, pagination, scroll,pageSize } = props;
|
||||
|
||||
return (
|
||||
<div className='pagination-table'>
|
||||
<div className={`pagination-table ${className}`}>
|
||||
<Table
|
||||
{...props}
|
||||
loading={loading}
|
||||
|
@ -29,6 +29,7 @@ export default (props) => {
|
|||
current={current}
|
||||
total={total}
|
||||
showSizeChanger={showSizeChanger}
|
||||
pageSize={pageSize||10}
|
||||
/>}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -369,14 +369,16 @@ function Competition(props){
|
|||
|
||||
return(
|
||||
<div className="centerbox competitionList">
|
||||
<PaginationTable
|
||||
loading={loading}
|
||||
dataSource={competitionList}
|
||||
columns={columns}
|
||||
total={total}
|
||||
setCurPage={(page)=>{updateUrl(page)}}
|
||||
current={curPage}
|
||||
/>
|
||||
<PaginationTable
|
||||
loading={loading}
|
||||
dataSource={competitionList}
|
||||
columns={columns}
|
||||
total={total}
|
||||
setCurPage={(page)=>{updateUrl(page)}}
|
||||
current={curPage}
|
||||
pagination={false}
|
||||
pageSize={10}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,317 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { Link, Route, Switch } from "react-router-dom";
|
||||
import { withRouter } from "react-router";
|
||||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../Loading";
|
||||
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
|
||||
import './qz2022/index.scss';
|
||||
import { Menu, Popover, Spin } from "antd";
|
||||
import banner from './qz2022/image/banner.jpg';
|
||||
import banner_local from './qz2022/image/banner_local.jpg';
|
||||
import { getQz2022, userCompetitionStatus } from "./qz2022/api";
|
||||
import { paths } from "./qz2022/static";
|
||||
import Login from './components/login';
|
||||
|
||||
const Introduce = Loadable({
|
||||
loader: () => import('./qz2022/introduce'),
|
||||
loading: Loading,
|
||||
})
|
||||
const ManageEdit = Loadable({
|
||||
loader: () => import('./qz2022/components/manageEdit'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Fingerpost = Loadable({
|
||||
loader: () => import('./qz2022/fingerpost'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Notice = Loadable({
|
||||
loader: () => import('./qz2022/notice'),
|
||||
loading: Loading,
|
||||
})
|
||||
const NoticeDetail = Loadable({
|
||||
loader: () => import('./qz2022/notice/detail.jsx'),
|
||||
loading: Loading,
|
||||
})
|
||||
const NoticeEdit = Loadable({
|
||||
loader: () => import('./qz2022/notice/addNotice.jsx'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Apply = Loadable({
|
||||
loader: () => import('./qz2022/apply'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Refer = Loadable({
|
||||
loader: () => import('./qz2022/refer'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Chat = Loadable({
|
||||
loader: () => import('./qz2022/chat'),
|
||||
loading: Loading,
|
||||
});
|
||||
const Contact = Loadable({
|
||||
loader: () => import('./qz2022/contact'),
|
||||
loading: Loading,
|
||||
});
|
||||
const Statistics = Loadable({
|
||||
loader: () => import('./qz2022/statistics'),
|
||||
loading: Loading,
|
||||
})
|
||||
const Management = Loadable({
|
||||
loader: () => import('./qz2022/management'),
|
||||
loading: Loading,
|
||||
})
|
||||
|
||||
const Qz2022 = (props) => {
|
||||
const { history, current_user } = props;
|
||||
const { location } = history;
|
||||
const { pathname } = location;
|
||||
const [active, setActive] = useState();
|
||||
const [reload, setReload] = useState();
|
||||
const [reloadDetail, setReloadDetail] = useState();
|
||||
const [qzDetail, setQzDetail] = useState();
|
||||
const [enrollStatus, setEnrollStatus] = useState();
|
||||
|
||||
const [fixedTop, setFixedTop] = useState('');
|
||||
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<Link to={{ pathname: current_user && current_user.login ? `/competition/qz2022/management/applys` : '' }} onClick={() => { current_user && !current_user.login && props.showLoginDialog() }}>报名列表</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<Link to={{ pathname: current_user && current_user.login ? `/competition/qz2022/management/production` : '' }} onClick={() => { current_user && !current_user.login && props.showLoginDialog() }}>作品列表</Link>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
setActive(pathname.substring(pathname.lastIndexOf('/') + 1, pathname.lenght));
|
||||
// document.body.scrollTop = 0;
|
||||
// window.scrollTo(0,0);
|
||||
}, [pathname]);
|
||||
|
||||
useEffect(() => {
|
||||
window.addEventListener("scroll", scrollListener, false);
|
||||
return () => {
|
||||
window.removeEventListener("scroll", scrollListener, false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
// useEffect(()=>{
|
||||
// let footer=document.querySelector('.newFooter');
|
||||
// let loading=document.querySelector('..ant-spin-nested-loading');
|
||||
// if((footer.offsetTop +107)<window.screen.height){
|
||||
// footer.style.position="absolute";
|
||||
// loading.margin-b
|
||||
// }else{
|
||||
// footer.style.position="relative";
|
||||
// }
|
||||
// },[history])
|
||||
|
||||
function scrollListener() {
|
||||
let qz2022Top = document.querySelector('.qz2022').offsetTop;
|
||||
let top = document.documentElement.scrollTop;
|
||||
if (!fixedTop && top > qz2022Top - 20) {
|
||||
setFixedTop('fixed-top');
|
||||
} else if (top < qz2022Top - 19) {
|
||||
setFixedTop('');
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
// 获取启智2022详情
|
||||
getQz2022().then(response => {
|
||||
if (response && response.status === 200) {
|
||||
setQzDetail(response.data.data);
|
||||
}
|
||||
})
|
||||
}, [reloadDetail])
|
||||
|
||||
useEffect(() => {
|
||||
// 获取用户参与竞赛状态
|
||||
userCompetitionStatus('qz2022').then(response => {
|
||||
if (response && response.status === 200) {
|
||||
setEnrollStatus(response.data.data);
|
||||
}
|
||||
})
|
||||
}, [reload])
|
||||
|
||||
let applyStatus; // 是否处于报名阶段
|
||||
let referStatus; // 是否处于提交作品阶段
|
||||
let referEnd; // 是否处于提交作品阶段(提交已经结束)
|
||||
if (qzDetail) {
|
||||
applyStatus = Date.parse(new Date()) < Date.parse(new Date(qzDetail.enroll_date));
|
||||
referStatus = !applyStatus && Date.parse(new Date()) < Date.parse(new Date(qzDetail.upload_date));
|
||||
referEnd = Date.parse(new Date()) > Date.parse(new Date(qzDetail.upload_date));
|
||||
}
|
||||
|
||||
function goToRefer() {
|
||||
if (current_user && !current_user.login) {
|
||||
props.showLoginDialog();
|
||||
}else if(enrollStatus && !enrollStatus.enroll_status){
|
||||
props.showNotification("您还未报名竞赛!");
|
||||
}else if(enrollStatus && enrollStatus.status === 0){
|
||||
props.showNotification("报名信息被管理员驳回!");
|
||||
} else {
|
||||
!referStatus ? props.showNotification(!referEnd ? `竞赛尚未开始提交作品,提交作品开始时间为:${qzDetail && qzDetail.enroll_date.substring(0, 10)}` : "比赛已结束") : "";
|
||||
}
|
||||
}
|
||||
|
||||
const is_local= qzDetail &&qzDetail.is_local;
|
||||
const banner_url= qzDetail &&qzDetail.banner_url;
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Login {...props} />
|
||||
{/* banner图+选项 */}
|
||||
<img src={banner_url || (is_local?banner_local: banner)} className="qz_banner" alt=""/>
|
||||
<div className="qz2022">
|
||||
<div className={`qz2022-top ${fixedTop}`}>
|
||||
{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>
|
||||
<li className={active === "fingerpost" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/fingerpost` }}>赛事指南</Link>
|
||||
</li>
|
||||
<li className={active === "notice" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/notice` }}>通知公告</Link>
|
||||
</li>
|
||||
{/* 处于报名阶段正常跳转到报名页面,不处于右侧弹消息 */}
|
||||
<li className={active === "apply" ? "active" : ""}>
|
||||
<Link to={{ pathname: applyStatus && current_user && current_user.login ? '/competition/qz2022/apply' :'' }} onClick={()=>{current_user && current_user.login ? !applyStatus && props.showNotification("报名时间已截止") : props.showLoginDialog()}}>参赛报名</Link>
|
||||
</li>
|
||||
<li className={active === "refer" ? "active" : ""}>
|
||||
<Link to={{ pathname: referStatus && !referEnd && current_user && current_user.login && enrollStatus && enrollStatus.enroll_status ? `/competition/qz2022/refer` : '' }} onClick={goToRefer}>提案提交</Link>
|
||||
</li>
|
||||
{/* <li className={active === "apply" ? "active" : ""}>
|
||||
<Link to={{ pathname: '/competition/qz2022/apply'}}>参赛报名</Link>
|
||||
</li> */}
|
||||
{/* <li className={active === "refer" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/refer`}}>提案提交</Link>
|
||||
</li> */}
|
||||
<li className={active === "statistics" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/statistics` }}>数据统计</Link>
|
||||
</li>
|
||||
<li className={active === "chat" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/chat` }}>交流互动</Link>
|
||||
</li>
|
||||
<li className={active === "contact" ? "active" : ""}>
|
||||
<Link to={{ pathname: `/competition/qz2022/contact` }}>联系我们</Link>
|
||||
</li>
|
||||
{qzDetail && qzDetail.is_manager && <li className={(active === "applys" || active === "production") ? "active" : ""}>
|
||||
<Popover content={menu} placement="bottomRight" overlayClassName="qz_manage">
|
||||
<a>后台管理</a>
|
||||
</Popover>
|
||||
</li>}
|
||||
</ul>}
|
||||
{paths.indexOf(active) !== -1 && <div className="menu_border mt20 qz_main"></div>}
|
||||
</div>
|
||||
<Spin spinning={false} wrapperClassName="spinstyle qzCont" tip="正在同步镜像" size="large">
|
||||
<Switch {...props}>
|
||||
{/* 通知公告详情页 */}
|
||||
<Route path="/competition/qz2022/notice/detail/:noticeId"
|
||||
render={
|
||||
({ match, history }) => (<NoticeDetail match={match} history={history} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 通知公告编辑页 */}
|
||||
<Route path="/competition/qz2022/notice/:type/:noticeId"
|
||||
render={
|
||||
({ match }) => (<NoticeEdit {...props} match={match} qzDetail={qzDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 通知公告新增页 */}
|
||||
<Route path="/competition/qz2022/notice/:type"
|
||||
render={
|
||||
({ match }) => (<NoticeEdit {...props} match={match} qzDetail={qzDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 大赛介绍、大赛指南、关于我们 编辑页 */}
|
||||
<Route path="/competition/qz2022/:type/edit"
|
||||
render={
|
||||
({match}) => (<ManageEdit {...props} qzDetail={qzDetail} match={match} setReloadDetail={setReloadDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 通知公告 */}
|
||||
<Route path="/competition/qz2022/notice"
|
||||
render={
|
||||
() => (<Notice {...props} qzDetail={qzDetail} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 参赛报名 */}
|
||||
<Route path="/competition/qz2022/apply"
|
||||
render={
|
||||
() => (<Apply {...props} qzDetail={qzDetail} enrollStatus={enrollStatus} setReload={setReload}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 提案提交 */}
|
||||
<Route path="/competition/qz2022/refer"
|
||||
render={
|
||||
() => (<Refer {...props} enrollStatus={enrollStatus} qzDetail={qzDetail} setReload={setReload}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 交流互动 */}
|
||||
<Route path="/competition/qz2022/chat"
|
||||
render={
|
||||
() => (<Chat {...props} isLoacl={qzDetail && qzDetail.is_local}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 联系我们 */}
|
||||
<Route path="/competition/qz2022/contact"
|
||||
render={
|
||||
() => (<Contact {...props} aboutUs={qzDetail && qzDetail.about_us} qzDetail={qzDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 数据统计 */}
|
||||
<Route path="/competition/qz2022/statistics"
|
||||
render={
|
||||
() => (<Statistics {...props} qzDetail={qzDetail} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 后台管理-报名列表 */}
|
||||
<Route path="/competition/qz2022/management/applys"
|
||||
render={
|
||||
() => (<Management {...props} qzDetail={qzDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 后台管理-作品列表 */}
|
||||
<Route path="/competition/qz2022/management/production"
|
||||
render={
|
||||
() => (<Management {...props} qzDetail={qzDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 大赛介绍 */}
|
||||
<Route path="/competition/qz2022/introduce"
|
||||
render={
|
||||
() => (<Introduce {...props} qzDetail={qzDetail} />)
|
||||
}
|
||||
></Route>
|
||||
{/* 大赛指南 */}
|
||||
<Route path="/competition/qz2022/fingerpost"
|
||||
render={
|
||||
() => (<Fingerpost {...props} qzDetail={qzDetail}/>)
|
||||
}
|
||||
></Route>
|
||||
{/* 大赛介绍 */}
|
||||
<Route path="/competition/qz2022"
|
||||
render={
|
||||
() => (<Introduce {...props} qzDetail={qzDetail} />)
|
||||
}
|
||||
></Route>
|
||||
</Switch>
|
||||
</Spin>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
export default withRouter(
|
||||
ImageLayerOfCommentHOC({
|
||||
imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
|
||||
parentSelector: ".newMain",
|
||||
})(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Qz2022))))
|
||||
);
|
|
@ -0,0 +1,76 @@
|
|||
import axios from 'axios';
|
||||
|
||||
// 用户参与启智2022状态?debug=teacher
|
||||
export async function userCompetitionStatus(id) {
|
||||
return axios.get(`/competition_infos/${id}/enroll_status.json`);
|
||||
}
|
||||
|
||||
// 启智2022详情接口
|
||||
export function getQz2022() {
|
||||
return axios.get(`/competition_infos/qz2022.json`);
|
||||
}
|
||||
|
||||
// 报名启智2022 竞赛?debug=teacher
|
||||
export async function enrollCompetition(data){
|
||||
return axios.post(`/competition_infos/qz2022/enroll.json`,data);
|
||||
}
|
||||
|
||||
// 修改报名信息
|
||||
export async function enrollUpdate(data){
|
||||
return axios.post(`/competition_infos/qz2022/enroll_update.json`,data);
|
||||
}
|
||||
|
||||
// 统计启智2022 竞赛
|
||||
export async function stattistics(data){
|
||||
return axios.get( `/competition_infos/qz2022/statistics.json`);
|
||||
}
|
||||
|
||||
// 竞赛提交作品
|
||||
export async function uploadCompetition(data){
|
||||
return axios.post(`/competition_infos/qz2022/upload.json`,data);
|
||||
}
|
||||
|
||||
// 管理-竞赛报名列表?debug=admin
|
||||
export function getQzEnrollList(params) {
|
||||
return axios.get(`/competition_infos/qz2022/enroll_list.json`,params={params});
|
||||
}
|
||||
|
||||
// 管理-竞赛提交作品列表&debug=admin
|
||||
export function getQzProList(params) {
|
||||
return axios.get(`/competition_infos/qz2022/enroll_list.json?upload=true`,params={params});
|
||||
}
|
||||
|
||||
// 通知公告列表
|
||||
export function getNoticeList() {
|
||||
return axios.get(`/competition_infos/qz2022/competition_notices.json`);
|
||||
}
|
||||
|
||||
// 通知公告详情
|
||||
export function getNoticeDetail(id) {
|
||||
return axios.get(`/competition_infos/qz2022/competition_notices/${id}.json`);
|
||||
}
|
||||
|
||||
// 新增通知
|
||||
export async function addQz2022Notice(data){
|
||||
return axios.post(`/competition_infos/qz2022/competition_notices.json`,data);
|
||||
}
|
||||
|
||||
// 编辑通知
|
||||
export async function updateQz2022Notice(id,data){
|
||||
return axios.put(`/competition_infos/qz2022/competition_notices/${id}.json`,data);
|
||||
}
|
||||
|
||||
// 删除通知
|
||||
export async function deleteQz2022Notice(id){
|
||||
return axios.delete(`/competition_infos/qz2022/competition_notices/${id}.json`);
|
||||
}
|
||||
|
||||
// 编辑大赛介绍、大赛指南、关于我
|
||||
export async function updateQz2022(data){
|
||||
return axios.put(`/competition_infos/qz2022.json`,data);
|
||||
}
|
||||
|
||||
// 修改竞赛报名状态
|
||||
export async function updateEnroll(data){
|
||||
return axios.post(`/competition_infos/qz2022/enroll_status_update.json`,data);
|
||||
}
|
|
@ -0,0 +1,271 @@
|
|||
import React, {useState, useCallback} from "react";
|
||||
import { Input, Select, Button, Form, message, Radio, Modal } from 'antd';
|
||||
import { Base64 } from 'js-base64';
|
||||
import {enrollCompetition, enrollUpdate} from '../api';
|
||||
import {current_main_site_url} from '../fetch';
|
||||
import EditTable from "../editTable";
|
||||
import apply_top from "../image/apply_top.png";
|
||||
import apply_down from "../image/apply_down.png";
|
||||
import apply_one_active from "../image/apply_one_active.png";
|
||||
import apply_one from "../image/apply_one.png";
|
||||
import apply_two_active from "../image/apply_two_active.png";
|
||||
import apply_two from "../image/apply_two.png";
|
||||
import apply_notice from "../image/apply_notice.png";
|
||||
|
||||
import './index.scss';
|
||||
import { useEffect } from "react";
|
||||
const Option = Select.Option;
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const {form, qzDetail, enrollStatus, setReload, current_user, history} = props;
|
||||
const {getFieldDecorator, validateFields, setFieldsValue} = form;
|
||||
const [members, setMembers] = useState([]);
|
||||
const [errorMessage, setErrorMessage] = useState(undefined);
|
||||
const [sourceBy, setSourceBy] = useState(1);
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
useEffect(()=>{
|
||||
const applyStatus = qzDetail ? Date.parse(new Date()) < Date.parse(new Date(qzDetail.enroll_date)) : true;
|
||||
if((current_user && !current_user.login) || !applyStatus){
|
||||
history.push("/competition/qz2022");
|
||||
}
|
||||
if(enrollStatus && enrollStatus.enroll_status && enrollStatus.status === 0){
|
||||
setMembers(enrollStatus.enroll_info.members);
|
||||
setSourceBy(enrollStatus.enroll_info.subject_source_type);
|
||||
setFieldsValue(enrollStatus.enroll_info);
|
||||
}
|
||||
},[current_user, enrollStatus])
|
||||
|
||||
// form表单公共处理函数
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget) => (
|
||||
<Form.Item label={label}>
|
||||
{getFieldDecorator(name, { rules, validateFirst: true })(widget)}
|
||||
</Form.Item>
|
||||
),
|
||||
[]
|
||||
);
|
||||
|
||||
// 当用户输入结束时 检验用户输入是否符合规范
|
||||
function verify(dataIndex){
|
||||
validateFields([dataIndex],(error, values)=>{
|
||||
if(error && error[dataIndex]){
|
||||
return;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 检查用户填写信息
|
||||
function checkInfo(){
|
||||
setErrorMessage(undefined);
|
||||
// 检查用户输入的成员属性是否完全
|
||||
if(members.length > 0){
|
||||
let all = 0;
|
||||
const len = qzDetail && qzDetail.is_local ? 5:3;
|
||||
// 用户输入的长度是否满足要求
|
||||
let sizes = 0;
|
||||
members.map(item=>{
|
||||
const valuesLen = Object.values(item);
|
||||
const nullMap = valuesLen.filter(i=>{return i.length === 0}).length;
|
||||
if(nullMap === valuesLen.length-1 || (valuesLen.length === len && nullMap === 0)){
|
||||
// 通过的情况
|
||||
all+=1;
|
||||
}
|
||||
valuesLen.filter(i=>{return i.length > 32}).length > 0 && (sizes+=1);
|
||||
})
|
||||
if(members.length !== all){
|
||||
setErrorMessage("成员信息未填写完成");
|
||||
return;
|
||||
}
|
||||
if(sizes>0){
|
||||
setErrorMessage("成员信息填写不规范");
|
||||
return;
|
||||
}
|
||||
}
|
||||
validateFields((error, values)=>{
|
||||
if(error){
|
||||
return
|
||||
}else{
|
||||
setVisible(true);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//提交报名信息
|
||||
function applySubmit(){
|
||||
validateFields((error, values)=>{
|
||||
if(error){
|
||||
return
|
||||
}else{
|
||||
// 用户输入正确 报名该竞赛
|
||||
const params = {
|
||||
...values,
|
||||
members,
|
||||
subject_source_type: sourceBy,
|
||||
}
|
||||
// enrollStatus.enroll_status判断用户是首次提交资料还是修改资料
|
||||
if(enrollStatus && !enrollStatus.enroll_status){
|
||||
enrollCompetition(params).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
setReload(Math.random());
|
||||
message.success('报名成功')
|
||||
}else{
|
||||
message.error(response.message);
|
||||
}
|
||||
setVisible(false);
|
||||
})
|
||||
}else{
|
||||
enrollUpdate(params).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
setReload(Math.random());
|
||||
message.success('资料修改成功');
|
||||
}else{
|
||||
message.error(response.message);
|
||||
}
|
||||
setVisible(false);
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 计划支持 未输入课题来源报错
|
||||
function errorSource(rule, value, callback){
|
||||
if(sourceBy === 1 && !value){
|
||||
// 计划支持 必须输入课题名称
|
||||
callback('请正确输入课题来源');
|
||||
}else{
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="qz_main">
|
||||
<div className="step">
|
||||
<span className="left_tit"> 报名</span>
|
||||
<img src={apply_top} className="step_icon" alt=""/>
|
||||
<div className="border_dashed"></div>
|
||||
<div className="img_span">
|
||||
<img src={enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status === 0) ? apply_one_active : apply_one} className="step_icon" alt=""/>
|
||||
个人信息
|
||||
</div>
|
||||
<div className="border_dashed"></div>
|
||||
<div className="img_span">
|
||||
<img src={enrollStatus && enrollStatus.enroll_status && enrollStatus.status !== 0 ? apply_two_active : apply_two} className="step_icon" alt=""/>
|
||||
报名成功
|
||||
</div>
|
||||
<div className="border_dashed"></div>
|
||||
<img src={apply_down} className="step_icon" alt=""/>
|
||||
</div>
|
||||
{!(enrollStatus && enrollStatus.enroll_status) && <div className="apply_tip font-15">
|
||||
<img src={apply_notice} className="apply_notice" alt=""/>
|
||||
请认真核对报名信息,务必与线下报名表信息一致!
|
||||
</div>}
|
||||
<div className="apply_information mb60">
|
||||
<div className="info_head">{!(enrollStatus && enrollStatus.enroll_status) && '填写'}报名信息</div>
|
||||
{/* 报名表单 */}
|
||||
{
|
||||
enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status === 0) &&
|
||||
<Form className="info_form">
|
||||
{helper('参赛单位',
|
||||
'org_name',
|
||||
[{ required: true, message: "请正确输入参赛单位" },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入参赛单位" onBlur={()=>{verify("org_name")}}/>
|
||||
)}
|
||||
{helper('参赛团队负责人姓名',
|
||||
'leader',
|
||||
[{ required: true, message: "请正确输入负责人姓名" },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入参赛团队负责人姓名" onBlur={()=>{verify("leader")}}/>
|
||||
)}
|
||||
{qzDetail && qzDetail.is_local && helper('职务',
|
||||
'org_job',
|
||||
[{ required: true, message: "请正确输入职务" },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入职务" onBlur={()=>{verify("org_job")}}/>
|
||||
)}
|
||||
{qzDetail && qzDetail.is_local && helper(Base64.decode('5Yab6KGU'),
|
||||
'org_rank',
|
||||
[{ required: true, message: `请正确输入${Base64.decode('5Yab6KGU')}` },
|
||||
{ max: 32, message: '超出限制长度32位字符,请重新编辑' }],
|
||||
<Input placeholder="请输入JXJXJX" onBlur={()=>{verify("org_rank")}}/>
|
||||
)}
|
||||
{helper('赛区',
|
||||
'zone',
|
||||
[{ required: true, message: "请正确输入赛区" }],
|
||||
<Select placeholder="请选择赛区" onBlur={()=>{verify("zone")}}>
|
||||
{qzDetail && qzDetail.zones.map((item,i)=> {return <Option value={item} key={i}>{item}</Option>})}
|
||||
</Select>
|
||||
)}
|
||||
{helper('赛项',
|
||||
'sub_competition',
|
||||
[{ required: true, message: "请正确输入赛项" }],
|
||||
<Select placeholder="请选择赛项" onBlur={()=>{verify("sub_competition")}}>
|
||||
{qzDetail && qzDetail.sub_competitions.map((item,i)=> {return <Option value={item} key={i}>{item}</Option>})}
|
||||
</Select>
|
||||
)}
|
||||
{qzDetail && qzDetail.is_local && <div className="class_from">
|
||||
<span>课题来源</span>
|
||||
<Radio.Group onChange={(e)=>{setSourceBy(e.target.value)}} value={sourceBy} defaultValue={1}>
|
||||
<Radio value={1}>计划支持</Radio>
|
||||
<Radio value={0}>自主提报</Radio>
|
||||
</Radio.Group>
|
||||
{sourceBy === 1 && helper('',
|
||||
'subject_source_name',
|
||||
[{ max: 32, message: '超出限制长度32位字符,请重新编辑' },
|
||||
{ validator: (rule, value, callback)=>{errorSource(rule, value, callback)}}],
|
||||
<Input placeholder="请输入项目名称" onBlur={()=>{verify("subject_source_name")}}/>
|
||||
)}
|
||||
</div>}
|
||||
{helper('电话',
|
||||
'phone',
|
||||
[{ required: true, message: "请正确输入电话" },
|
||||
{pattern: /(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$/, message: "请输入正确的手机号"}],
|
||||
<Input placeholder="请输入电话" onBlur={()=>{verify("phone")}}/>
|
||||
)}
|
||||
<div className="edit_table">
|
||||
<p className="mt10">成员 : </p>
|
||||
<p className="error_message">{errorMessage}</p>
|
||||
{/* */}
|
||||
{qzDetail &&
|
||||
<EditTable members={enrollStatus && enrollStatus.enroll_status ? enrollStatus.enroll_info.members : [{key:"0"}]} setMembers={setMembers} isLocal = {qzDetail.is_local}/>}
|
||||
</div>
|
||||
</Form>}
|
||||
{/* 已报名,报名信息 */}
|
||||
{enrollStatus && enrollStatus.enroll_status && enrollStatus.status !== 0 &&
|
||||
<div className="info">
|
||||
<div><span>参赛单位 : </span>{enrollStatus && enrollStatus.enroll_info.org_name}</div>
|
||||
<div className="info-right"><span>参赛团队负责人姓名 : </span>{enrollStatus && enrollStatus.enroll_info.leader}</div>
|
||||
{qzDetail && qzDetail.is_local && <div><span>职务 : </span>{enrollStatus && enrollStatus.enroll_info.org_job}</div>}
|
||||
{qzDetail && qzDetail.is_local && <div className="info-right"><span>{Base64.decode('5Yab6KGU')} : </span>{enrollStatus && enrollStatus.enroll_info.org_rank}</div>}
|
||||
<div><span>赛区 : </span>{enrollStatus && enrollStatus.enroll_info.zone}</div>
|
||||
<div className="info-right"><span>赛项 : </span>{enrollStatus && enrollStatus.enroll_info.sub_competition}</div>
|
||||
{qzDetail && qzDetail.is_local && <div><span>课题来源 : </span>{enrollStatus && enrollStatus.enroll_info.subject_source_type === 0 ? "自主提报" : enrollStatus.enroll_info.subject_source_name}</div>}
|
||||
<div className={`${qzDetail && qzDetail.is_local ? '':'info_bottom'}`}><span>电话 : </span>{enrollStatus && enrollStatus.enroll_info.phone}</div>
|
||||
<div className={`info-right ${qzDetail && qzDetail.is_local ? 'ellipsis_div':''}`}><span>成员 : </span>{enrollStatus && enrollStatus.enroll_info.members && enrollStatus.enroll_info.members.map(item=>{return item.real_name + ','})}</div>
|
||||
</div>}
|
||||
</div>
|
||||
{enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status === 0) && <div className="apply_but">
|
||||
<Button type="primary" className="submit_info" onClick={checkInfo}>
|
||||
提交资料
|
||||
</Button>
|
||||
<a href={qzDetail && qzDetail.is_local ? 'http://osredm.jk:81/api/attachments/1963' : `${current_main_site_url}/api/attachments/${window.location.host.indexOf("osredm")!== -1 ? "4122" : current_main_site_url.indexOf("49999") === -1 ? "3715" : "1896"}`}>
|
||||
<Button className="add_member download ml20">下载报名表</Button>
|
||||
</a>
|
||||
</div>}
|
||||
<Modal
|
||||
title="提示"
|
||||
visible={visible}
|
||||
onOk={applySubmit}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
centered
|
||||
wrapClassName="applyInfoCon"
|
||||
cancelText=""
|
||||
>
|
||||
<div className="tips mb10"><i className="iconfont icon-shanchu_tc_icon1 font-24 mr10" style={{color: '#ffa13a'}}></i><span className="tipTitle font-16">确定提交报名信息</span></div>
|
||||
<span>提交后报名信息将无法修改!</span>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
})
|
|
@ -0,0 +1,184 @@
|
|||
.step{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 30px 0 40px;
|
||||
.left_tit{
|
||||
height: 20px;
|
||||
line-height: 19px;
|
||||
margin-right: 120px;
|
||||
border-left: 4px solid #2e5bfe;
|
||||
}
|
||||
.step_icon{
|
||||
width: 34px;
|
||||
}
|
||||
.border_dashed{
|
||||
width: 225px;
|
||||
margin: 0 12px;
|
||||
border-bottom: 1px dashed #bac1c9;
|
||||
}
|
||||
.img_span{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 25px;
|
||||
}
|
||||
}
|
||||
.apply_tip{
|
||||
background-color:#fff5eb;
|
||||
border:1px solid #ffa13a;
|
||||
padding: 10px 0 10px 20px;
|
||||
color:#ffa13a;
|
||||
margin-bottom: 20px;
|
||||
.apply_notice{
|
||||
width: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.apply_information{
|
||||
background-color:#ffffff;
|
||||
border-radius:4px;
|
||||
box-shadow:0px 3px 12px #ecf0ff;
|
||||
padding-bottom: 1px;
|
||||
.info_head{
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 12px 30px;
|
||||
}
|
||||
.info_form{
|
||||
padding: 8px 0 30px 30px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
.ant-form-item{
|
||||
display: inline-block;
|
||||
width: 33%;
|
||||
margin-right: 160px;
|
||||
margin-bottom: 0px;
|
||||
.ant-input:hover{border-color:#2e5bfe;}
|
||||
}
|
||||
.class_from{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 46.5%;
|
||||
}
|
||||
.class_from .ant-form-item{
|
||||
width: 71%;
|
||||
}
|
||||
.class_from>.ant-radio-group{
|
||||
position: absolute;
|
||||
left: 36%;
|
||||
top: 10px;
|
||||
}
|
||||
.class_from>span{
|
||||
position: absolute;
|
||||
left: 0%;
|
||||
top: 10px;
|
||||
}
|
||||
.class_from .ant-form-item-children{
|
||||
top: 38px;
|
||||
}
|
||||
.class_from .ant-form-explain{
|
||||
position: absolute;
|
||||
top: 78px;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
border: 0.5px solid rgba(153, 153, 153, 0.3);
|
||||
margin: 20px 70px 30px 25px;
|
||||
div{
|
||||
display: inline-block;
|
||||
width: 50%;
|
||||
border-right: 1px solid rgba(153, 153, 153, 0.3);
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.3);
|
||||
height: 44px;
|
||||
padding-left: 40px;
|
||||
line-height: 44px;
|
||||
}
|
||||
.ellipsis_div{width: 100%;}
|
||||
.info_bottom{border-bottom: none;}
|
||||
.info-right{border-right: none;}
|
||||
& div:last-child{
|
||||
border-right: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.edit_table{
|
||||
width: 100%;
|
||||
}
|
||||
.apply_team{
|
||||
color: red;
|
||||
.add_member{
|
||||
padding: 0 12px;
|
||||
margin: 10px 0 20px;
|
||||
border-radius:4px;
|
||||
}
|
||||
.member_info{
|
||||
padding-right: 160px;
|
||||
}
|
||||
.member_info .ant-table{
|
||||
margin-top: 20px;
|
||||
.ant-form-item{
|
||||
width: 76%;
|
||||
margin: 0 0 10px 0;
|
||||
position: relative;
|
||||
}
|
||||
.ant-form-item .has-error .ant-form-explain{
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
.ant-table-thead > tr > th, .ant-table-tbody > tr > td{
|
||||
padding: 12px 16px;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-table-thead > tr > th:first-child, .ant-table-tbody > tr > td:first-child{
|
||||
padding-left: 55px;
|
||||
}
|
||||
.apply_delete{
|
||||
width: 16px;
|
||||
margin-bottom: 12px;
|
||||
&:hover{cursor: pointer;}
|
||||
}
|
||||
}
|
||||
.error_message{
|
||||
color: #f5222d;
|
||||
}
|
||||
}
|
||||
.apply_but{
|
||||
padding-bottom: 60px;
|
||||
text-align: center;
|
||||
.download, .submit_info{
|
||||
padding: 0 18px;
|
||||
height: 36px;
|
||||
}
|
||||
.download{
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
.applyInfoCon .ant-modal-content{
|
||||
.ant-modal-header{
|
||||
padding: 10px 24px;
|
||||
background-color: #eef1ff;
|
||||
border-bottom:none;
|
||||
}
|
||||
.ant-modal-close{top: 1px !important;}
|
||||
.ant-modal-close-x{font-size: 20px;}
|
||||
.ant-modal-title{
|
||||
font-weight: normal !important;
|
||||
text-align: left;
|
||||
}
|
||||
.ant-modal-body{
|
||||
padding: 50px 50px 40px;;
|
||||
text-align: center;
|
||||
.tipTitle{color: #181818;}
|
||||
}
|
||||
.tips{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ant-modal-footer{
|
||||
border-top: none;
|
||||
text-align: center;
|
||||
padding-bottom: 40px;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import React from "react";
|
||||
// import chatSvg from "../image/chat.svg";
|
||||
import chatBanner from '../image/chat_banner.png';
|
||||
import btn from "../image/btn-right.png";
|
||||
import chat1 from '../image/chat1.png';
|
||||
import chat2 from '../image/chat2.png';
|
||||
import chat3 from '../image/chat3.png';
|
||||
import './index.scss';
|
||||
import '../../index.scss';
|
||||
|
||||
function Chat({ isLoacl }) {
|
||||
|
||||
return (
|
||||
<div className="chat-bg">
|
||||
<div className="chat qz_main clearfix">
|
||||
<img className="chat-left" src={chatBanner} ></img>
|
||||
<div className="chat-words">
|
||||
<div className="chat-tit">交流互动</div>
|
||||
<div className="chat-content">
|
||||
<p>集萃群智体会</p>
|
||||
<p>与论坛成员交流比赛经验,分享参赛心得</p>
|
||||
<p>汇聚赛事资讯</p>
|
||||
<p>助您第一时间解读竞赛动态,把握赛事脉搏</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="links qz_main">
|
||||
<div onClick={() => { window.open(isLoacl ? 'http://www.osredm.jk/forums/theme/76' : 'https://fc.osredm.com/forums/theme/107') }}>
|
||||
<img src={chat1}></img>
|
||||
<div>参赛咨询</div>
|
||||
</div>
|
||||
<div onClick={() => { window.open(isLoacl ? 'http://www.osredm.jk/forums/theme/77' : 'https://fc.osredm.com/forums/theme/108') }}>
|
||||
<img src={chat2}></img>
|
||||
<div>选手交流</div>
|
||||
</div>
|
||||
<div onClick={() => { window.open(isLoacl ? 'http://www.osredm.jk/forums/theme/78' : 'https://fc.osredm.com/forums/theme/109') }}>
|
||||
<img src={chat3}></img>
|
||||
<div>专家答疑</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Chat;
|
|
@ -0,0 +1,87 @@
|
|||
.chat-bg{
|
||||
padding:9rem 0 5rem 0;
|
||||
background-image: url('../image/chat-bg.png');
|
||||
background-size: 100% 100%;
|
||||
.links{
|
||||
display: flex;
|
||||
margin: 30px auto;
|
||||
justify-content: space-between;
|
||||
padding: 20px 120px;
|
||||
background-color: white;
|
||||
div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img{
|
||||
width: 54px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
&:hover{
|
||||
color:#2e5bfe;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.chat {
|
||||
margin: 0 auto;
|
||||
padding: 0 1.5rem;
|
||||
background: #fff;
|
||||
|
||||
.chat-left {
|
||||
float: left;
|
||||
position: relative;
|
||||
top: -5rem;
|
||||
width: 56.6%;
|
||||
box-shadow: 0px 3px 8px rgba(219, 227, 255, 0.7) inset;
|
||||
margin-bottom: -3.5rem;
|
||||
padding: 1.25rem;
|
||||
}
|
||||
|
||||
.chat-words {
|
||||
display: inline-block;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
.chat-tit {
|
||||
display: inline-block;
|
||||
font-weight: 700;
|
||||
color: #2e3341;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1rem;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #2e5bfe;
|
||||
}
|
||||
}
|
||||
.chat-conten {
|
||||
font-size: 1rem;
|
||||
line-height: 1.625rem;
|
||||
}
|
||||
|
||||
.chat-btn {
|
||||
margin-top:1.5rem;
|
||||
width: 9.5rem;
|
||||
height: 2.5rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border: 2px solid #2e5bfe;
|
||||
background-color: #2e5bfe;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.detail1 {
|
||||
white-space: nowrap;
|
||||
color: #ffffff;
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
margin-left:1em;
|
||||
}
|
||||
|
||||
.iconPlay1 {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import { Button, Form, message, Input } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import icon from '../image/notice_breadcrumb.svg';
|
||||
import MDEditor from '../../../modules/tpm/challengesnew/tpm-md-editor';
|
||||
import { updateQz2022 } from "../api";
|
||||
import '../index.scss';
|
||||
import '../notice/index.scss';
|
||||
import '../notice/detail.scss';
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const {form, history, match:{params:{type}}, qzDetail, setReloadDetail, current_user} = props;
|
||||
const {getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [description, setDescription] = useState(qzDetail && type === "introduce" ? (qzDetail && qzDetail.content) : type === "fingerpost" ? (qzDetail && qzDetail.guide) : (qzDetail && qzDetail.about_us));
|
||||
const [errorMessage, setErrorMessage] = useState(undefined);
|
||||
const manageEdit = (qzDetail && qzDetail.is_manager) || (current_user && current_user.admin);
|
||||
|
||||
useEffect(() =>{
|
||||
if(!manageEdit){
|
||||
window.location.href="/403";
|
||||
}
|
||||
}, [manageEdit])
|
||||
|
||||
useEffect(()=>{
|
||||
setDescription(qzDetail && type === "introduce" ? (qzDetail && qzDetail.content) : type === "fingerpost" ? (qzDetail && qzDetail.guide) : (qzDetail && qzDetail.about_us));
|
||||
setFieldsValue({video_url: qzDetail && qzDetail.video_url});
|
||||
}, [qzDetail])
|
||||
|
||||
function submit(){
|
||||
// 判断用户是否输入内容
|
||||
if(!description){
|
||||
setErrorMessage("内容不能为空");
|
||||
return;
|
||||
}
|
||||
validateFields((error, values)=>{
|
||||
if(error){
|
||||
return;
|
||||
}else{
|
||||
// 用户输入正确
|
||||
const info = new Object();
|
||||
info[type === "introduce" ? "content" : type === "fingerpost" ? "guide" : "about_us"] = description;
|
||||
type === "introduce" && (info["video_url"] = values.video_url);
|
||||
const params = {
|
||||
'competition_info': info,
|
||||
}
|
||||
updateQz2022(params).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
setReloadDetail(Math.random());
|
||||
message.success('更新成功');
|
||||
history.push(`/competition/qz2022/${type}`);
|
||||
}else{
|
||||
message.error(response.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
return (
|
||||
<div className="qz_notice">
|
||||
<div className="qz_main notice_detal qz2022_notice_edit">
|
||||
<div className="breadCrumb mb20">
|
||||
<img src={icon} className="mr12 icon_d" alt=""/>
|
||||
<Link to={`/competition/qz2022/${type}`}><span className="font-16 _999">{type === "introduce" ? "首页" : type === "fingerpost" ? "大赛指南" : "联系我们"}</span></Link>
|
||||
<span className="mr10 ml10 _999">/</span>
|
||||
<span className="font-16 _18">编辑</span>
|
||||
</div>
|
||||
<Form className="qz2022_notice_edit" size="small">
|
||||
{type === "introduce" && <Form.Item label="视频地址">
|
||||
{getFieldDecorator("video_url", {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写视频地址",
|
||||
},
|
||||
]
|
||||
})(<Input placeholder="标题" size="large" maxLength={200}/>)}
|
||||
</Form.Item>}
|
||||
<div className="qzContent">
|
||||
<p className="title mb10"><span>*</span>内容:</p>
|
||||
<p className={`errorMessage mb10 ${errorMessage && 'not'}`}>{errorMessage}</p>
|
||||
<MDEditor
|
||||
placeholder={"请输入描述信息"}
|
||||
height={500}
|
||||
mdID={"order-new-description"}
|
||||
initValue={description}
|
||||
onChange={(value)=>{setDescription(value)}}
|
||||
></MDEditor>
|
||||
</div>
|
||||
</Form>
|
||||
<div className="qz2022_notice_but">
|
||||
<Button className="mr30" type="primary" onClick={submit}>提交</Button>
|
||||
<Button onClick={()=>{history.push(`/competition/qz2022/${type}`);}}>取消</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
|
@ -0,0 +1,28 @@
|
|||
import React from "react";
|
||||
import contactPng from "../image/qz-logo.jpg";
|
||||
import RenderHtml from "src/components/render-html";
|
||||
import Link from "react-router-dom/Link";
|
||||
import { Button } from "antd";
|
||||
import './index.scss';
|
||||
import '../../index.scss';
|
||||
|
||||
function Contact({ aboutUs, qzDetail, current_user }) {
|
||||
const manageEdit = (qzDetail && qzDetail.is_manager) || (current_user && current_user.admin);
|
||||
const is_local= qzDetail &&qzDetail.is_local;
|
||||
console.log(is_local);
|
||||
return (
|
||||
<div className="contact-bg">
|
||||
{manageEdit && <div className="qz_main manageEdit mb20">
|
||||
<Link to={"/competition/qz2022/contact/edit"}><Button><i className="iconfont icon-a-bianji11 font-13 mr5"></i>编辑</Button></Link>
|
||||
</div>}
|
||||
<div className="contact qz_main">
|
||||
{ !is_local&&<img className="contact-png" src={contactPng} ></img>}
|
||||
<div className="contact-words">
|
||||
<RenderHtml value={aboutUs} className="contact-content" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
export default Contact;
|
|
@ -0,0 +1,44 @@
|
|||
.contact-bg{
|
||||
padding:2rem 0;
|
||||
background-image: url('../image/chat-bg.png');
|
||||
background-size:100% 100%;
|
||||
}
|
||||
.contact {
|
||||
margin: 0 auto;
|
||||
padding:1rem 3rem;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
.contact-png{
|
||||
max-width: 50%;
|
||||
margin-right:1rem;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.contact-tit{
|
||||
position: absolute;
|
||||
top:40%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
.contact-words {
|
||||
position: relative;
|
||||
.manageEdit{
|
||||
position: absolute;
|
||||
bottom: -20px;
|
||||
}
|
||||
}
|
||||
|
||||
.contact-content {
|
||||
font-size: 1rem;
|
||||
line-height: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
// height: 16rem;
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
||||
import { Table, Input, Button, Popconfirm, Form } from 'antd';
|
||||
import { Base64 } from 'js-base64';
|
||||
|
||||
import './index.scss';
|
||||
import apply_delete from "../image/apply_delete.png";
|
||||
|
||||
const EditableContext = React.createContext();
|
||||
|
||||
const EditableRow = ({ form, index, ...props }) => (
|
||||
<EditableContext.Provider value={form}>
|
||||
<tr {...props} />
|
||||
</EditableContext.Provider>
|
||||
);
|
||||
|
||||
const EditableFormRow = Form.create()(EditableRow);
|
||||
|
||||
class EditableCell extends React.Component {
|
||||
|
||||
save = (dataIndex, e) => {
|
||||
const { record, handleSave } = this.props;
|
||||
this.form.validateFields([dataIndex],(error, values) => {
|
||||
handleSave({ ...record, ...values });
|
||||
if (error && error[e.currentTarget.id]) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
renderCell = form => {
|
||||
this.form = form;
|
||||
const {record, dataIndex, title } = this.props;
|
||||
return <Form.Item >
|
||||
{form.getFieldDecorator(dataIndex, {
|
||||
rules: [
|
||||
{required: true,message: `${title}不能为空.`,},
|
||||
{max: 32, message: '超出限制长度32位字符,请重新编辑' }
|
||||
],
|
||||
validateFirst: true,
|
||||
initialValue: record[dataIndex],
|
||||
})(<Input onPressEnter={(e)=>{this.save(dataIndex,e)}} onBlur={(e)=>{this.save(dataIndex,e)}} placeholder="请输入"/>)}
|
||||
</Form.Item>
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
editable,
|
||||
dataIndex,
|
||||
title,
|
||||
record,
|
||||
index,
|
||||
handleSave,
|
||||
children,
|
||||
...restProps
|
||||
} = this.props;
|
||||
return (
|
||||
<td {...restProps}>
|
||||
{editable ? (
|
||||
<EditableContext.Consumer>{this.renderCell}</EditableContext.Consumer>
|
||||
) : (
|
||||
children
|
||||
)}
|
||||
</td>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class EditableTable extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.columns = [
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'real_name',
|
||||
editable: true,
|
||||
width: "40%"
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'org_name',
|
||||
editable: true,
|
||||
width: '50%',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: '10%',
|
||||
render: (text, record) =>
|
||||
this.state.dataSource.length >= 1 ? (
|
||||
<Popconfirm title="确定删除此成员?" onConfirm={() => this.handleDelete(record.key)}>
|
||||
<img src={apply_delete} className="apply_delete" alt=""/>
|
||||
</Popconfirm>
|
||||
) : null,
|
||||
},
|
||||
];
|
||||
if(props.isLocal){
|
||||
this.columns = [{
|
||||
title: '姓名',
|
||||
dataIndex: 'real_name',
|
||||
editable: true,
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
dataIndex: 'org_name',
|
||||
editable: true,
|
||||
width: '30%',
|
||||
},{
|
||||
title: '职务',
|
||||
dataIndex: 'org_job',
|
||||
editable: true,
|
||||
},
|
||||
{
|
||||
title: Base64.decode('5Yab6KGU'),
|
||||
dataIndex: 'org_rank',
|
||||
editable: true,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'operation',
|
||||
width: '10%',
|
||||
render: (text, record) =>
|
||||
this.state.dataSource.length >= 1 ? (
|
||||
<Popconfirm title="确定删除此成员?" onConfirm={() => this.handleDelete(record.key)}>
|
||||
<img src={apply_delete} className="apply_delete" alt=""/>
|
||||
</Popconfirm>
|
||||
) : null,
|
||||
},];
|
||||
}
|
||||
this.state = {
|
||||
dataSource: this.props.members,
|
||||
count: this.props.members.length,
|
||||
};
|
||||
}
|
||||
|
||||
handleDelete = key => {
|
||||
const dataSource = [...this.state.dataSource];
|
||||
const newData = dataSource.filter(item => item.key !== key);
|
||||
this.setState({ dataSource: newData });
|
||||
this.props.setMembers(newData);
|
||||
};
|
||||
|
||||
handleAdd = () => {
|
||||
const { count, dataSource } = this.state;
|
||||
const newData = {
|
||||
key: count,
|
||||
};
|
||||
this.setState({
|
||||
dataSource: [...dataSource, newData],
|
||||
count: count + 1,
|
||||
});
|
||||
};
|
||||
|
||||
handleSave = row => {
|
||||
const newData = [...this.state.dataSource];
|
||||
const index = newData.findIndex(item => row.key === item.key);
|
||||
const item = newData[index];
|
||||
newData.splice(index, 1, {
|
||||
...item,
|
||||
...row,
|
||||
});
|
||||
this.setState({ dataSource: newData });
|
||||
this.props.setMembers(newData);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource } = this.state;
|
||||
const components = {
|
||||
body: {
|
||||
row: EditableFormRow,
|
||||
cell: EditableCell,
|
||||
},
|
||||
};
|
||||
const columns = this.columns.map(col => {
|
||||
if (!col.editable) {
|
||||
return col;
|
||||
}
|
||||
return {
|
||||
...col,
|
||||
onCell: record => ({
|
||||
record,
|
||||
editable: col.editable,
|
||||
dataIndex: col.dataIndex,
|
||||
title: col.title,
|
||||
handleSave: this.handleSave,
|
||||
}),
|
||||
};
|
||||
});
|
||||
return (
|
||||
<div className="apply_team">
|
||||
<Button onClick={this.handleAdd} type="primary" className="add_member">
|
||||
添加成员
|
||||
</Button>
|
||||
<div className="member_info">
|
||||
<Table
|
||||
components={components}
|
||||
rowClassName={() => 'editable-row'}
|
||||
dataSource={dataSource}
|
||||
columns={columns}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EditableTable;
|
|
@ -0,0 +1,15 @@
|
|||
.editable-cell {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.editable-cell-value-wrap {
|
||||
padding: 5px 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.editable-row .editable-cell-value-wrap {
|
||||
height: 30px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 4px;
|
||||
padding: 4px 11px;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
import javaFetch from '../javaFetch';
|
||||
|
||||
|
||||
let settings = localStorage.chromesetting && JSON.parse(localStorage.chromesetting);
|
||||
let actionUrl = settings && settings.api_urls && settings.api_urls.task ? settings.api_urls.task : 'https://task.osredm.com';
|
||||
const service = javaFetch(actionUrl);
|
||||
export const httpUrl = actionUrl;
|
||||
export const main_web_site_url = settings && settings.main_web_site_url;
|
||||
export const current_main_site_url = settings && settings.current_main_site_url;
|
||||
export default service;
|
|
@ -0,0 +1,20 @@
|
|||
import React from "react";
|
||||
import RenderHtml from "src/components/render-html";
|
||||
import Link from "react-router-dom/Link";
|
||||
import { Button } from "antd";
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
|
||||
function Introduce({ qzDetail, current_user}) {
|
||||
const manageEdit = (qzDetail && qzDetail.is_manager) || (current_user && current_user.admin);
|
||||
return (
|
||||
<div className="fingerpost">
|
||||
{manageEdit && <div className="qz_main manageEdit mb15">
|
||||
<Link to={"/competition/qz2022/fingerpost/edit"}><Button><i className="iconfont icon-a-bianji11 font-13 mr5"></i>编辑</Button></Link>
|
||||
</div>}
|
||||
<RenderHtml value={qzDetail && qzDetail.guide} className="fingerpost_cont qz_main"/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Introduce;
|
|
@ -0,0 +1,16 @@
|
|||
.fingerpost{
|
||||
padding-top: 30px;
|
||||
min-height: 35vh;
|
||||
background-image: url('../image/f_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
.fingerpost_head{
|
||||
padding: 30px 0 30px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.fingerpost_cont{
|
||||
padding-bottom: 50px;
|
||||
font-family: 'fangsongGB2312';
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 540 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 760 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 497 KiB |
After Width: | Height: | Size: 741 KiB |
After Width: | Height: | Size: 542 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 473 KiB |
|
@ -0,0 +1,356 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="642" height="310" viewBox="0 0 642 310">
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" x1="0.157" x2="1.061" y2="1.231" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#f0f7ff"/>
|
||||
<stop offset="1" stop-color="#c4d1ff"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linear-gradient-2" x1="0.259" y1="0.024" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#b3c5ff"/>
|
||||
<stop offset="0.444" stop-color="#cddcff"/>
|
||||
<stop offset="1" stop-color="#b2c4ff"/>
|
||||
</linearGradient>
|
||||
<clipPath id="clip-path">
|
||||
<rect id="矩形_100" data-name="矩形 100" width="144" height="120" transform="translate(512 635)" fill="#fff" stroke="#707070" stroke-width="1"/>
|
||||
</clipPath>
|
||||
<linearGradient id="linear-gradient-3" x1="0.259" y1="0.024" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#d0dfff"/>
|
||||
<stop offset="0.407" stop-color="#cddcff"/>
|
||||
<stop offset="1" stop-color="#cad7ff"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linear-gradient-5" x2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#d8e1ff" stop-opacity="0.349"/>
|
||||
<stop offset="0.523" stop-color="#d8e1ff"/>
|
||||
<stop offset="1" stop-color="#d8e1ff" stop-opacity="0.31"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linear-gradient-14" x1="1.143" y1="3.609" x2="0.02" y2="4.216" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#d8e1ff" stop-opacity="0.071"/>
|
||||
<stop offset="0.49" stop-color="#e2e8ff"/>
|
||||
<stop offset="1" stop-color="#d8e1ff" stop-opacity="0.11"/>
|
||||
</linearGradient>
|
||||
<filter id="椭圆_20" x="384.242" y="38" width="240" height="240" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="6" result="blur"/>
|
||||
<feFlood flood-color="#2e5bfe" flood-opacity="0.22"/>
|
||||
<feComposite operator="in" in2="blur"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="路径_113" x="492.932" y="151.501" width="85.514" height="75.414" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-2"/>
|
||||
<feFlood flood-color="#75a3fd" flood-opacity="0.51"/>
|
||||
<feComposite operator="in" in2="blur-2"/>
|
||||
</filter>
|
||||
<filter id="路径_112" x="428.501" y="108.276" width="116.535" height="98.442" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-3"/>
|
||||
<feFlood flood-color="#75a3fd" flood-opacity="0.51"/>
|
||||
<feComposite operator="in" in2="blur-3"/>
|
||||
</filter>
|
||||
<filter id="路径_107">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-4"/>
|
||||
<feFlood flood-color="#2e5bfe" flood-opacity="0.51" result="color"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-4"/>
|
||||
<feComposite operator="in" in="color"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="路径_108" x="434.558" y="129.225" width="75.067" height="45.931" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-5"/>
|
||||
<feFlood flood-color="#2578f1"/>
|
||||
<feComposite operator="in" in2="blur-5"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<linearGradient id="linear-gradient-36" x1="0.108" x2="0.893" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#97dcfd"/>
|
||||
<stop offset="1" stop-color="#72a0fd"/>
|
||||
</linearGradient>
|
||||
<filter id="矩形_101" x="542.242" y="59" width="61" height="73" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-6"/>
|
||||
<feFlood flood-color="#75a3fd" flood-opacity="0.51"/>
|
||||
<feComposite operator="in" in2="blur-6"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_101-2" x="542.242" y="59" width="61" height="73" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-7"/>
|
||||
<feFlood flood-color="#e7fdfe" result="color-2"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-7"/>
|
||||
<feComposite operator="in" in="color-2"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_102" x="550.742" y="70.5" width="30" height="28" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="1.5" result="blur-8"/>
|
||||
<feFlood flood-color="#75a6fd" flood-opacity="0.639"/>
|
||||
<feComposite operator="in" in2="blur-8"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_102-2" x="550.742" y="70.5" width="30" height="28" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-9"/>
|
||||
<feFlood flood-color="#fff" flood-opacity="0.588" result="color-3"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-9"/>
|
||||
<feComposite operator="in" in="color-3"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_103" x="546.242" y="91" width="53" height="22" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-10"/>
|
||||
<feFlood flood-color="#75a6fd" flood-opacity="0.161"/>
|
||||
<feComposite operator="in" in2="blur-10"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_103-2" x="546.242" y="91" width="53" height="22" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-11"/>
|
||||
<feFlood flood-color="#d6ffff" result="color-4"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-11"/>
|
||||
<feComposite operator="in" in="color-4"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_104" x="546.242" y="99" width="43" height="22" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-12"/>
|
||||
<feFlood flood-color="#75a6fd" flood-opacity="0.161"/>
|
||||
<feComposite operator="in" in2="blur-12"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="矩形_104-2" x="546.242" y="99" width="43" height="22" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-13"/>
|
||||
<feFlood flood-color="#d6ffff" result="color-5"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-13"/>
|
||||
<feComposite operator="in" in="color-5"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<linearGradient id="linear-gradient-37" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#6d91fc"/>
|
||||
<stop offset="0.059" stop-color="#6e94fc"/>
|
||||
<stop offset="1" stop-color="#81c2fd"/>
|
||||
</linearGradient>
|
||||
<filter id="路径_83" x="397.601" y="182.115" width="73.281" height="74.885" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-14"/>
|
||||
<feFlood flood-color="#75a3fd" flood-opacity="0.51"/>
|
||||
<feComposite operator="in" in2="blur-14"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="路径_83-2" x="397.601" y="182.115" width="73.281" height="74.885" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="1.5" result="blur-15"/>
|
||||
<feFlood flood-color="#c9f5fe" result="color-6"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-15"/>
|
||||
<feComposite operator="in" in="color-6"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<linearGradient id="linear-gradient-38" x1="0.285" y1="0.136" x2="0.851" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#ccfafe"/>
|
||||
<stop offset="1" stop-color="#80d5fd"/>
|
||||
</linearGradient>
|
||||
<filter id="路径_84" x="425.242" y="205.889" width="49.222" height="37.111" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-16"/>
|
||||
<feFlood flood-color="#5a92ff"/>
|
||||
<feComposite operator="in" in2="blur-16"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="路径_84-2" x="425.242" y="205.889" width="49.222" height="37.111" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="1" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-17"/>
|
||||
<feFlood flood-color="#fff" flood-opacity="0.961" result="color-7"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-17"/>
|
||||
<feComposite operator="in" in="color-7"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<linearGradient id="linear-gradient-39" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#6d91fc"/>
|
||||
<stop offset="1" stop-color="#81c2fd"/>
|
||||
</linearGradient>
|
||||
<filter id="路径_85" x="421.32" y="188.807" width="54.096" height="51.89" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-18"/>
|
||||
<feFlood flood-color="#75a3fd" flood-opacity="0.51"/>
|
||||
<feComposite operator="in" in2="blur-18"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="路径_85-2" x="421.32" y="188.807" width="54.096" height="51.89" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="1.5" result="blur-19"/>
|
||||
<feFlood flood-color="#c9f5fe" result="color-8"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-19"/>
|
||||
<feComposite operator="in" in="color-8"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
<linearGradient id="linear-gradient-40" x1="0.285" y1="0.136" x2="0.851" y2="1" gradientUnits="objectBoundingBox">
|
||||
<stop offset="0" stop-color="#feffc9"/>
|
||||
<stop offset="1" stop-color="#fffccb"/>
|
||||
</linearGradient>
|
||||
<filter id="路径_86" x="417.152" y="179.277" width="45.404" height="53.446" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="3" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="3" result="blur-20"/>
|
||||
<feFlood flood-color="#5a92ff"/>
|
||||
<feComposite operator="in" in2="blur-20"/>
|
||||
<feComposite in="SourceGraphic"/>
|
||||
</filter>
|
||||
<filter id="路径_86-2" x="417.152" y="179.277" width="45.404" height="53.446" filterUnits="userSpaceOnUse">
|
||||
<feOffset dy="1" input="SourceAlpha"/>
|
||||
<feGaussianBlur stdDeviation="1.5" result="blur-21"/>
|
||||
<feFlood flood-color="#fff" flood-opacity="0.961" result="color-9"/>
|
||||
<feComposite operator="out" in="SourceGraphic" in2="blur-21"/>
|
||||
<feComposite operator="in" in="color-9"/>
|
||||
<feComposite operator="in" in2="SourceGraphic"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<g id="banner" transform="translate(-408.758 -635)">
|
||||
<rect id="矩形_95" data-name="矩形 95" width="642" height="310" transform="translate(408.758 635)" fill="url(#linear-gradient)"/>
|
||||
<circle id="椭圆_18" data-name="椭圆 18" cx="37.5" cy="37.5" r="37.5" transform="translate(525 862)" fill="url(#linear-gradient-2)"/>
|
||||
<g id="蒙版组_46" data-name="蒙版组 46" clip-path="url(#clip-path)">
|
||||
<circle id="椭圆_17" data-name="椭圆 17" cx="68" cy="68" r="68" transform="translate(517 610)" fill="url(#linear-gradient-3)"/>
|
||||
</g>
|
||||
<circle id="椭圆_19" data-name="椭圆 19" cx="27.5" cy="27.5" r="27.5" transform="translate(811 868)" fill="url(#linear-gradient-2)"/>
|
||||
<path id="路径_81" data-name="路径 81" d="M0,0H642V248H0Z" transform="translate(408.758 663)" fill="#fff"/>
|
||||
<g id="组_330" data-name="组 330">
|
||||
<path id="直线_13" data-name="直线 13" d="M640.053.5H0v-1H640.053Z" transform="translate(408.758 709.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_23" data-name="直线 23" d="M640.053.5H0v-1H640.053Z" transform="translate(408.758 680.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_20" data-name="直线 20" d="M640.053.5H0v-1H640.053Z" transform="translate(409.758 824.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_15" data-name="直线 15" d="M640.053.5H0v-1H640.053Z" transform="translate(408.758 767.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_17" data-name="直线 17" d="M640.053.5H0v-1H640.053Z" transform="translate(409.758 882.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_14" data-name="直线 14" d="M640.053.5H0v-1H640.053Z" transform="translate(408.758 737.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_19" data-name="直线 19" d="M640.053.5H0v-1H640.053Z" transform="translate(409.758 852.5)" fill="url(#linear-gradient-5)"/>
|
||||
<path id="直线_16" data-name="直线 16" d="M640.053.5H0v-1H640.053Z" transform="translate(408.758 795.5)" fill="url(#linear-gradient-5)"/>
|
||||
</g>
|
||||
<path id="直线_18" data-name="直线 18" d="M640.053.5H0v-1H640.053Z" transform="translate(409.758 910.5)" fill="url(#linear-gradient-5)"/>
|
||||
<g id="组_331" data-name="组 331">
|
||||
<path id="直线_13-2" data-name="直线 13" d="M243.576.5H0v-1H243.576Z" transform="translate(696.258 664.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_23-2" data-name="直线 23" d="M243.576.5H0v-1H243.576Z" transform="translate(725.258 664.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_20-2" data-name="直线 20" d="M243.576.5H0v-1H243.576Z" transform="translate(581.258 665.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_15-2" data-name="直线 15" d="M243.576.5H0v-1H243.576Z" transform="translate(638.258 664.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_17-2" data-name="直线 17" d="M243.576.5H0v-1H243.576Z" transform="translate(523.258 665.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_14-2" data-name="直线 14" d="M243.576.5H0v-1H243.576Z" transform="translate(668.258 664.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_19-2" data-name="直线 19" d="M243.576.5H0v-1H243.576Z" transform="translate(553.258 665.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_16-2" data-name="直线 16" d="M243.576.5H0v-1H243.576Z" transform="translate(610.258 664.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_18-2" data-name="直线 18" d="M243.576.5H0v-1H243.576Z" transform="translate(495.258 665.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_21" data-name="直线 21" d="M243.576.5H0v-1H243.576Z" transform="translate(467.258 664.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_22" data-name="直线 22" d="M243.576.5H0v-1H243.576Z" transform="translate(437.258 665.742) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_13-3" data-name="直线 13" d="M244.711.5H0v-1H244.711Z" transform="translate(1012.258 663) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_24" data-name="直线 24" d="M244.711.5H0v-1H244.711Z" transform="translate(1038.258 664) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_20-3" data-name="直线 20" d="M244.711.5H0v-1H244.711Z" transform="translate(897.258 664) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_15-3" data-name="直线 15" d="M244.711.5H0v-1H244.711Z" transform="translate(954.258 663) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_17-3" data-name="直线 17" d="M244.711.5H0v-1H244.711Z" transform="translate(839.258 664) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_14-3" data-name="直线 14" d="M244.711.5H0v-1H244.711Z" transform="translate(984.258 663) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_19-3" data-name="直线 19" d="M244.711.5H0v-1H244.711Z" transform="translate(869.258 664) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_16-3" data-name="直线 16" d="M244.711.5H0v-1H244.711Z" transform="translate(926.258 663) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_18-3" data-name="直线 18" d="M244.711.5H0v-1H244.711Z" transform="translate(811.258 664) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_21-2" data-name="直线 21" d="M244.711.5H0v-1H244.711Z" transform="translate(783.258 663) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
<path id="直线_22-2" data-name="直线 22" d="M244.711.5H0v-1H244.711Z" transform="translate(753.258 664) rotate(90)" fill="url(#linear-gradient-14)"/>
|
||||
</g>
|
||||
<text id="了解详情" transform="translate(448 760)" fill="#3d7dd2" font-size="42" font-family="PingFang SC Heavy, PingFang SC"><tspan x="0" y="0">论坛交流</tspan></text>
|
||||
<text id="了解详情-2" data-name="了解详情" transform="translate(479 875)" fill="#3d7dd2" font-size="16" font-family="PingFang SC Bold, PingFang SC"><tspan x="0" y="0">第一时间:掌握竞赛资讯</tspan></text>
|
||||
<text id="了解详情-3" data-name="了解详情" transform="translate(448 819)" fill="#3d7dd2" font-size="42" font-family="PingFang SC Heavy, PingFang SC"><tspan x="0" y="0">助您解读赛事动态</tspan></text>
|
||||
<path id="路径_82" data-name="路径 82" d="M0,0H91.631" transform="translate(453.758 839)" fill="none" stroke="#2e5bfe" stroke-width="1"/>
|
||||
<g id="组_332" data-name="组 332" transform="translate(-44 479)">
|
||||
<path id="多边形_7" data-name="多边形 7" d="M8,0l8,13H0Z" transform="translate(514 383) rotate(90)" fill="#bad5fe"/>
|
||||
<path id="多边形_6" data-name="多边形 6" d="M6.5,0,13,11H0Z" transform="translate(505 384) rotate(90)" fill="#89b6fe"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#椭圆_20)">
|
||||
<g id="椭圆_20-2" data-name="椭圆 20" transform="translate(402.24 53)" fill="#c9defe" stroke="#fff" stroke-width="8">
|
||||
<circle cx="102" cy="102" r="102" stroke="none"/>
|
||||
<circle cx="102" cy="102" r="98" fill="none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="论坛资讯" transform="translate(787.3 633.945)">
|
||||
<path id="路径_103" data-name="路径 103" d="M238.166,413.013h-55.6a2.885,2.885,0,1,0,0,5.69h55.6a2.885,2.885,0,1,0,0-5.69Z" transform="translate(-108.604 -263.544)"/>
|
||||
<g transform="matrix(1, 0, 0, 1, -378.54, 1.05)" filter="url(#路径_113)">
|
||||
<path id="路径_113-2" data-name="路径 113" d="M594.962,479.573l-54.569,1.552a6.293,6.293,0,0,0-6.207,6.207v36.207a6.293,6.293,0,0,0,6.207,6.207h20.431l.517,4.655,5.172,2.328a3.2,3.2,0,0,0,3.621-.776l6.207-6.207h17.586c3.362,0,7.759-2.845,7.759-6.207V487.332c.259-3.362-3.362-7.759-6.724-7.759Z" transform="translate(-32.25 -322.07)" fill="#fff"/>
|
||||
</g>
|
||||
<path id="路径_104" data-name="路径 104" d="M594.962,479.573l-54.569,1.552a6.293,6.293,0,0,0-6.207,6.207v36.207a6.293,6.293,0,0,0,6.207,6.207h20.431l.517,4.655,5.172,2.328a3.2,3.2,0,0,0,3.621-.776l6.207-6.207h17.586c3.362,0,7.759-2.845,7.759-6.207V487.332c.259-3.362-3.362-7.759-6.724-7.759Z" transform="translate(-409.796 -320.017)" fill="#fff"/>
|
||||
<path id="路径_105" data-name="路径 105" d="M552.658,479.573H496.02a6.293,6.293,0,0,0-6.207,6.207v35.69a6.293,6.293,0,0,0,6.207,6.207h20.431l6.207,6.207a2.36,2.36,0,0,0,3.1,0l6.207-6.207h20.69a6.293,6.293,0,0,0,6.207-6.207V485.78A6.474,6.474,0,0,0,552.658,479.573Z" transform="translate(-372.147 -320.017)" fill="#ffa13a"/>
|
||||
<g transform="matrix(1, 0, 0, 1, -378.54, 1.05)" filter="url(#路径_112)">
|
||||
<path id="路径_112-2" data-name="路径 112" d="M189.3,187.733l-78.1,2.069A8.721,8.721,0,0,0,102.4,198.6V249.8a8.721,8.721,0,0,0,8.793,8.793h29.483l2.845,6.983,4.138,2.069a6.78,6.78,0,0,0,7.241-1.293l7.759-8.017h29.483a8.721,8.721,0,0,0,8.793-8.793V198.6c0-4.914-6.724-10.862-11.638-10.862Z" transform="translate(335.1 -73.46)" fill="#fff"/>
|
||||
</g>
|
||||
<path id="路径_106" data-name="路径 106" d="M189.3,187.733l-78.1,2.069A8.721,8.721,0,0,0,102.4,198.6V249.8a8.721,8.721,0,0,0,8.793,8.793h29.483l2.845,6.983,4.138,2.069a6.78,6.78,0,0,0,7.241-1.293l7.759-8.017h29.483a8.721,8.721,0,0,0,8.793-8.793V198.6c0-4.914-6.724-10.862-11.638-10.862Z" transform="translate(-43.442 -72.402)" fill="#fff" stroke="rgba(255,255,255,0.48)" stroke-width="0.5"/>
|
||||
<g data-type="innerShadowGroup">
|
||||
<path id="路径_107-2" data-name="路径 107" d="M140.942,187.733H59.993a8.721,8.721,0,0,0-8.793,8.793v51.207a8.721,8.721,0,0,0,8.793,8.793H89.476l7.759,8.017a4.527,4.527,0,0,0,6.466,0l7.759-8.017h29.483a8.721,8.721,0,0,0,8.793-8.793V196.526a8.721,8.721,0,0,0-8.793-8.793Z" transform="translate(0 -72.402)" fill="#3889ff"/>
|
||||
<g transform="matrix(1, 0, 0, 1, -378.54, 1.05)" filter="url(#路径_107)">
|
||||
<path id="路径_107-3" data-name="路径 107" d="M140.942,187.733H59.993a8.721,8.721,0,0,0-8.793,8.793v51.207a8.721,8.721,0,0,0,8.793,8.793H89.476l7.759,8.017a4.527,4.527,0,0,0,6.466,0l7.759-8.017h29.483a8.721,8.721,0,0,0,8.793-8.793V196.526a8.721,8.721,0,0,0-8.793-8.793Z" transform="translate(378.54 -73.46)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, -378.54, 1.05)" filter="url(#路径_108)">
|
||||
<path id="路径_108-2" data-name="路径 108" d="M142.518,331.663a7.221,7.221,0,0,1,6.983-5.69h26.121a5.97,5.97,0,0,1,5.948,5.69,5.74,5.74,0,0,1-5.69,5.69H147.432a4.457,4.457,0,0,1-4.914-5.69Zm0,15.259a5.773,5.773,0,0,1,5.431-4.655h46.293a5.292,5.292,0,0,1,5.172,4.655v1.293a5.165,5.165,0,0,1-5.172,5.69H147.173a4.558,4.558,0,0,1-4.655-5.69Z" transform="translate(301.19 -190.75)" fill="#dae9ff"/>
|
||||
</g>
|
||||
<path id="路径_109" data-name="路径 109" d="M115.588,325.973H143a4.655,4.655,0,1,1,0,9.31H115.588a4.636,4.636,0,0,1-4.655-4.655A4.808,4.808,0,0,1,115.588,325.973Zm0,16.293h45.776a4.655,4.655,0,1,1,0,9.31H115.588a4.636,4.636,0,0,1-4.655-4.655A4.808,4.808,0,0,1,115.588,342.266Z" transform="translate(-50.681 -189.693)" fill="#fff"/>
|
||||
<path id="路径_110" data-name="路径 110" d="M819.2,114.038A11.638,11.638,0,1,0,830.838,102.4,11.638,11.638,0,0,0,819.2,114.038Z" transform="translate(-651.62)" fill="#ffd6c2"/>
|
||||
<path id="路径_111" data-name="路径 111" d="M785.067,114.038A11.638,11.638,0,1,0,796.705,102.4,11.638,11.638,0,0,0,785.067,114.038Z" transform="translate(-622.659)" fill="#ffa13a"/>
|
||||
</g>
|
||||
<g id="组_333" data-name="组 333" transform="translate(2 352)">
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_101)">
|
||||
<rect id="矩形_101-3" data-name="矩形 101" width="43" height="55" rx="4" transform="translate(551.24 65)" fill="url(#linear-gradient-36)"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_101-2)">
|
||||
<rect id="矩形_101-4" data-name="矩形 101" width="43" height="55" rx="4" transform="translate(551.24 65)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_102)">
|
||||
<rect id="矩形_102-3" data-name="矩形 102" width="21" height="19" rx="4" transform="translate(555.24 72)" fill="#fffccb"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_102-2)">
|
||||
<rect id="矩形_102-4" data-name="矩形 102" width="21" height="19" rx="4" transform="translate(555.24 72)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_103)">
|
||||
<rect id="矩形_103-3" data-name="矩形 103" width="35" height="4" rx="2" transform="translate(555.24 97)" fill="#fff"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_103-2)">
|
||||
<rect id="矩形_103-4" data-name="矩形 103" width="35" height="4" rx="2" transform="translate(555.24 97)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_104)">
|
||||
<rect id="矩形_104-3" data-name="矩形 104" width="25" height="4" rx="2" transform="translate(555.24 105)" fill="#fff"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 406.76, 283)" filter="url(#矩形_104-2)">
|
||||
<rect id="矩形_104-4" data-name="矩形 104" width="25" height="4" rx="2" transform="translate(555.24 105)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="组_334" data-name="组 334">
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_83)">
|
||||
<path id="路径_83-3" data-name="路径 83" d="M-2601.7,18462.221l2.125-27.836s-30.173,2.762-29.961,27.836c.212.213-3.187,22.734,24.436,28.686.213.213,18.062,3.611,30.811-15.512Z" transform="translate(3036.17 -18246.27)" fill="url(#linear-gradient-37)"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_83-2)">
|
||||
<path id="路径_83-4" data-name="路径 83" d="M-2601.7,18462.221l2.125-27.836s-30.173,2.762-29.961,27.836c.212.213-3.187,22.734,24.436,28.686.213.213,18.062,3.611,30.811-15.512Z" transform="translate(3036.17 -18246.27)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_84)">
|
||||
<path id="路径_84-3" data-name="路径 84" d="M-2599.014,18464.551l28.038,12.322s5.532-10.436,2.012-19.111C-2569.215,18457.887-2599.014,18464.551-2599.014,18464.551Z" transform="translate(3033.26 -18245.87)" fill="url(#linear-gradient-38)"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_84-2)">
|
||||
<path id="路径_84-4" data-name="路径 84" d="M-2599.014,18464.551l28.038,12.322s5.532-10.436,2.012-19.111C-2569.215,18457.887-2599.014,18464.551-2599.014,18464.551Z" transform="translate(3033.26 -18245.87)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_85)">
|
||||
<path id="路径_85-3" data-name="路径 85" d="M-2598.29,18464.58l27.9,12.564s4.947-10.707,1.426-19.383C-2569.215,18457.887-2598.29,18464.58-2598.29,18464.58Z" transform="matrix(0.8, -0.6, 0.6, 0.8, -8602.75, -16091.5)" fill="url(#linear-gradient-39)"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_85-2)">
|
||||
<path id="路径_85-4" data-name="路径 85" d="M-2598.29,18464.58l27.9,12.564s4.947-10.707,1.426-19.383C-2569.215,18457.887-2598.29,18464.58-2598.29,18464.58Z" transform="matrix(0.8, -0.6, 0.6, 0.8, -8602.75, -16091.5)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<g data-type="innerShadowGroup">
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_86)">
|
||||
<path id="路径_86-3" data-name="路径 86" d="M-2599.014,18464.551l28.038,12.322s5.532-10.436,2.012-19.111C-2569.215,18457.887-2599.014,18464.551-2599.014,18464.551Z" transform="translate(-16465.21 -7666.84) rotate(-73)" fill="url(#linear-gradient-40)"/>
|
||||
</g>
|
||||
<g transform="matrix(1, 0, 0, 1, 408.76, 635)" filter="url(#路径_86-2)">
|
||||
<path id="路径_86-4" data-name="路径 86" d="M-2599.014,18464.551l28.038,12.322s5.532-10.436,2.012-19.111C-2569.215,18457.887-2599.014,18464.551-2599.014,18464.551Z" transform="translate(-16465.21 -7666.84) rotate(-73)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 238 KiB |
After Width: | Height: | Size: 607 KiB |
After Width: | Height: | Size: 688 KiB |
After Width: | Height: | Size: 2.2 MiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 488 KiB |
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="15" viewBox="0 0 18 15">
|
||||
<path id="首页" d="M198.845,235.719h-15.6a1.2,1.2,0,0,1-1.2-1.237,1.121,1.121,0,0,1,1.2-1.237h15.6a1.238,1.238,0,0,1,0,2.474Zm0,6.186h-15.6a1.2,1.2,0,0,1-1.2-1.237c0-.773.45-1.082,1.2-1.082h15.6a1.172,1.172,0,0,1,1.2,1.082A1.311,1.311,0,0,1,198.845,241.9Zm0,6.34h-15.6a1.2,1.2,0,0,1-1.2-1.237,1.121,1.121,0,0,1,1.2-1.237h15.6a1.238,1.238,0,0,1,0,2.474Z" transform="translate(-182.045 -233.245)" fill="#181818"/>
|
||||
</svg>
|
After Width: | Height: | Size: 507 B |
After Width: | Height: | Size: 125 KiB |
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="54.518" height="50.973" viewBox="0 0 54.518 50.973">
|
||||
<g id="提交订单" transform="translate(0 -33.3)">
|
||||
<path id="路径_71" data-name="路径 71" d="M31.008,84.273H8.093A8.1,8.1,0,0,1,0,76.181V41.393A8.1,8.1,0,0,1,8.093,33.3h32a8.1,8.1,0,0,1,8.093,8.093v7.145a1.7,1.7,0,1,1-3.407,0V41.393a4.692,4.692,0,0,0-4.685-4.685h-32a4.692,4.692,0,0,0-4.685,4.685V76.186a4.692,4.692,0,0,0,4.685,4.685H31.008a1.7,1.7,0,1,1,0,3.4Z" fill="#2e3341"/>
|
||||
<path id="路径_72" data-name="路径 72" d="M188.9,258.007H163.341a1.7,1.7,0,1,1,0-3.407H188.9a1.7,1.7,0,1,1,0,3.407Zm-8.865,11.9H163.314a1.7,1.7,0,1,1,0-3.407h16.718a1.7,1.7,0,1,1,0,3.407Zm-5.441,11.942H163.3a1.7,1.7,0,1,1,0-3.407h11.287a1.7,1.7,0,1,1,0,3.407Zm8.838-1.922,3.509,3.86a.263.263,0,0,1-.138.431l-5.1,1.1a.257.257,0,0,1-.3-.33l1.6-4.962a.252.252,0,0,1,.431-.1Zm17.8-8.449-12.246,11.08a.843.843,0,0,1-1.15-.186l-2.9-3.184a.834.834,0,0,1-.075-1.161l12.246-11.08a.843.843,0,0,1,1.15.186l2.9,3.184A.839.839,0,0,1,201.233,271.478Zm5.819-5.2-3.205,2.912a1.081,1.081,0,0,1-1.5.122l-2.891-3.178a1.084,1.084,0,0,1,.266-1.475l3.21-2.907a1.081,1.081,0,0,1,1.5-.122l2.891,3.179A1.074,1.074,0,0,1,207.052,266.276Zm0,0" transform="translate(-152.996 -209.518)" fill="#2e3341"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="31.5" height="31.5" viewBox="0 0 31.5 31.5">
|
||||
<g id="shanchu_tc_icon" transform="translate(0.75 0.75)">
|
||||
<path id="路径" d="M15,0A15,15,0,1,0,30,15,15,15,0,0,0,15,0Z" fill="#ffa13a" stroke="#ffa13a" stroke-miterlimit="10" stroke-width="1.5"/>
|
||||
<path id="路径-2" data-name="路径" d="M2,1.5a1,1,0,0,1-2,0V1A1,1,0,0,1,2,1Z" transform="translate(14 19.344)" fill="#fff"/>
|
||||
<path id="路径-3" data-name="路径" d="M2,8.5a1,1,0,0,1-2,0V1A1,1,0,0,1,2,1Z" transform="translate(14 8.156)" fill="#fff"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 573 B |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 117 KiB |
|
@ -0,0 +1,152 @@
|
|||
@font-face {
|
||||
font-family: fangsongGB2312;
|
||||
src: url('./public/fonts/fangsongGB2312.ttf');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: fzxbs;
|
||||
src: url('./public/fonts/FZXBSJW.TTF');
|
||||
}
|
||||
@font-face {
|
||||
font-family: kaitiGB2312;
|
||||
src: url('./public/fonts/kaitiGB2312.ttf');
|
||||
}
|
||||
// 启智2022主页样式
|
||||
.qz_banner {
|
||||
width: 100%;
|
||||
}
|
||||
.qz2022 {
|
||||
font-size: 1rem;
|
||||
.qz2022-top {
|
||||
width: 100%;
|
||||
|
||||
&.fixed-top {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
background: #fff;
|
||||
top:0;
|
||||
& + div{
|
||||
padding-top:3.75rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.qz2022Menu {
|
||||
height: 2.25rem;
|
||||
// line-height: 2.25rem;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
a {
|
||||
color: #2e3341;
|
||||
font-size: 1.1rem;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
li.active {
|
||||
background-color: #fafafa;
|
||||
a {
|
||||
font-weight: 700;
|
||||
color: #2e5bfe;
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
}
|
||||
li.active::before {
|
||||
position: absolute;
|
||||
top: calc(2.25rem + 20px);
|
||||
width: 4.375rem;
|
||||
content: "";
|
||||
height: 2px;
|
||||
background: #4154f1;
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
.menu_border {
|
||||
height: 1px;
|
||||
background-image: linear-gradient(
|
||||
90deg,
|
||||
#ffffff 0%,
|
||||
#373f5e 43.51%,
|
||||
#373f5e 54.81%,
|
||||
#ffffff 100%
|
||||
);
|
||||
}
|
||||
.qzCont {
|
||||
min-height: 40vh;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
.qz_manage {
|
||||
.ant-popover-inner-content {
|
||||
padding: 0;
|
||||
}
|
||||
.ant-dropdown-menu-item > a {
|
||||
color: #333;
|
||||
&:hover {
|
||||
color: #4154f1 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.qz_manage:after,
|
||||
.qz_manage .after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
border: 9px;
|
||||
border-style: dashed dashed solid dashed;
|
||||
border-color: transparent transparent #fff transparent;
|
||||
position: absolute;
|
||||
left: 51px;
|
||||
top: -16px;
|
||||
}
|
||||
// 公共样式
|
||||
.qz_main {
|
||||
width: 1200px;
|
||||
min-width: 62.5vw;
|
||||
max-width: 98vw;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.manageEdit{
|
||||
text-align: right;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
// 按钮样式
|
||||
.but_2e5 {
|
||||
border: none;
|
||||
background-color: #4154f1;
|
||||
padding: 0 14px;
|
||||
height: 36px;
|
||||
border-radius: 4px;
|
||||
span {
|
||||
color: #fff;
|
||||
}
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: #4154f1;
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
.qz_main {
|
||||
width: 98vw;
|
||||
}
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1921px) {
|
||||
html {
|
||||
font-size: calc(100% + (100vw - 1921px) / 250);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 2880px) {
|
||||
html {
|
||||
font-size: calc(125% + (100vw - 2880px) / 400);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import Link from "react-router-dom/Link";
|
||||
import { Button } from "antd";
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import RenderHtml from "src/components/render-html";
|
||||
|
||||
function Introduce({ qzDetail, current_user }) {
|
||||
const manageEdit = (qzDetail && qzDetail.is_manager) || (current_user && current_user.admin);
|
||||
let content= qzDetail&&qzDetail.content;
|
||||
let video_url= qzDetail&&qzDetail.video_url;
|
||||
|
||||
return (
|
||||
<div className="introduce_bg">
|
||||
{manageEdit && <div className="qz_main manageEdit">
|
||||
<Link to={"/competition/qz2022/introduce/edit"}><Button><i className="iconfont icon-a-bianji11 font-13 mr5"></i>编辑</Button></Link>
|
||||
</div>}
|
||||
<div className="introduce">
|
||||
<div className="introduce-content clearfix">
|
||||
{/* <div className="introduce-video"> */}
|
||||
<video className="introduce-video" src={video_url} autoPlay controls muted></video>
|
||||
{/* </div> */}
|
||||
{/* <div className="introduce-info"> className="info-content"*/}
|
||||
<RenderHtml value={content} />
|
||||
{/* </div> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Introduce;
|
|
@ -0,0 +1,129 @@
|
|||
.introduce_bg{
|
||||
background: #f1f7fc;
|
||||
padding-top: 30px;
|
||||
}
|
||||
.introduce {
|
||||
width: 100%;
|
||||
background-image: url("../image/introduce.png");
|
||||
background-size: 100% 100%;
|
||||
background-color:#f1f7fc;
|
||||
padding-bottom: 4%;
|
||||
|
||||
.introduce-content {
|
||||
width: 62.5%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
// padding: 2.75% 2% 5% 2.5%;
|
||||
padding: 2%;
|
||||
box-sizing: border-box;
|
||||
background: #fff;
|
||||
}
|
||||
.introduce-video {
|
||||
margin-right: 2.2%;
|
||||
min-width: 30%;
|
||||
max-width: 62.5%;
|
||||
float: left;
|
||||
// video {
|
||||
// width: 100%;
|
||||
// max-width: 100%;
|
||||
// max-height: 100%;
|
||||
// }
|
||||
}
|
||||
|
||||
// .introduce-info {
|
||||
// // display: flex;
|
||||
// // flex-direction: column;
|
||||
// // justify-content: center;
|
||||
// // min-width: 35%;
|
||||
// // min-height: 75%;
|
||||
// // position: relative;
|
||||
|
||||
|
||||
// .manageEdit{
|
||||
// text-align: left;
|
||||
// position: absolute;
|
||||
// bottom: -36px;
|
||||
// }
|
||||
// // .info-content{
|
||||
// // height: 25rem;
|
||||
// // overflow: auto;
|
||||
// // // overflow-y: auto;
|
||||
// // }
|
||||
|
||||
|
||||
// p{
|
||||
// text-overflow: -o-ellipsis-lastline;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// display: -webkit-box;
|
||||
// -webkit-line-clamp: 14;
|
||||
// line-clamp: 14;
|
||||
// -webkit-box-orient: vertical;
|
||||
// }
|
||||
// }
|
||||
|
||||
.markdown-body{
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.info-tit {
|
||||
font-weight: 700;
|
||||
color: #2e3341;
|
||||
font-size: 1.25rem;
|
||||
letter-spacing: 0.1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.content-item {
|
||||
font-size: 1rem;
|
||||
line-height: 2em;
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 1800px) {
|
||||
.introduce-video{
|
||||
width: 62.5%;
|
||||
}
|
||||
.introduce-info .markdown-body p{
|
||||
font-size: 18px !important;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 2500px) {
|
||||
.introduce-info .markdown-body p{
|
||||
font-size: 20px !important;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 1700px) {
|
||||
.info-tit {
|
||||
line-height: 1.5;
|
||||
}
|
||||
.content-item {
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1400px) {
|
||||
.info-tit {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.content-item {
|
||||
font-size: .9rem;
|
||||
}
|
||||
.introduce-info p{
|
||||
font-size: 14px !important;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 1300px) {
|
||||
.introduce-info .markdown-body p{
|
||||
font-size: 13px !important;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,285 @@
|
|||
import React, { useState, useMemo, useEffect } from "react";
|
||||
import { Base64 } from 'js-base64';
|
||||
import {Select, Button, Tooltip, Input, Popconfirm, message } from 'antd';
|
||||
import {current_main_site_url} from '../fetch';
|
||||
import PaginationTable from "../../components/paginationTable";
|
||||
|
||||
import './index.scss';
|
||||
import '../index.scss';
|
||||
import { getQzEnrollList, getQzProList, updateEnroll } from "../api.js";
|
||||
const Option = Select.Option;
|
||||
const {Search} = Input;
|
||||
|
||||
function Introduce({history:{location:{pathname}},qzDetail }) {
|
||||
// 报名列表和作品列表到指向此处,type做区分,0报名,1作品
|
||||
const [type, setType] = useState(pathname.substring(pathname.lastIndexOf('/')+1, pathname.lenght));
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [dataList, setDataList] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
// 赛区 赛项
|
||||
const [zone, setZone] = useState(undefined);
|
||||
const [subCompetition, setSubCompetition] = useState(undefined);
|
||||
const [keyword, setKeyword] = useState(undefined);
|
||||
const [reload, setReload] = useState(undefined);
|
||||
const [searchValue, setSearchValue] = useState(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
setKeyword(undefined);
|
||||
setSearchValue(undefined);
|
||||
setZone('-1');
|
||||
setSubCompetition('-1');
|
||||
setCurPage(1);
|
||||
setType(pathname.substring(pathname.lastIndexOf('/')+1, pathname.lenght));
|
||||
}, [pathname]);
|
||||
|
||||
useEffect(()=>{
|
||||
setLoading(true);
|
||||
const params = {
|
||||
zone: zone === '-1' ? undefined : zone,
|
||||
sub_competition: subCompetition === '-1' ? undefined : subCompetition,
|
||||
page: curPage,
|
||||
limit: 10,
|
||||
keyword
|
||||
}
|
||||
if(type === "applys"){
|
||||
// 报名列表
|
||||
getQzEnrollList(params).then(response=>{
|
||||
if(response && response.status === 200){
|
||||
setTotal(response.data.count);
|
||||
setDataList(response.data.data);
|
||||
}
|
||||
}).finally(()=>{
|
||||
setLoading(false);
|
||||
})
|
||||
}else{
|
||||
// 提交作品列表
|
||||
getQzProList(params).then(response=>{
|
||||
if(response && response.status === 200){
|
||||
setTotal(response.data.count);
|
||||
setDataList(response.data.data);
|
||||
}
|
||||
}).finally(()=>{
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
}, [type, zone, subCompetition, curPage, keyword, reload])
|
||||
|
||||
// 驳回用户的报名信息
|
||||
function reject(userId, index){
|
||||
const params = {
|
||||
user_id: userId,
|
||||
status: index
|
||||
}
|
||||
updateEnroll(params).then(response=>{
|
||||
if(response && response.status === 200){
|
||||
setReload(Math.random());
|
||||
message.success("操作成功");
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
let columns_apply = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '参赛单位',
|
||||
dataIndex: 'org_name',
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
title: '参赛负责人',
|
||||
dataIndex: 'leader',
|
||||
key: 'leader',
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
dataIndex: 'phone',
|
||||
key: 'phone',
|
||||
},
|
||||
{
|
||||
title: '赛区',
|
||||
dataIndex: 'zone',
|
||||
},
|
||||
{
|
||||
title: '赛项',
|
||||
dataIndex: 'sub_competition'
|
||||
},
|
||||
{
|
||||
title: '成员',
|
||||
dataIndex: 'members',
|
||||
render:(text, record)=>{
|
||||
return '';
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: "status",
|
||||
align: "center",
|
||||
render:(text, record)=>{
|
||||
// status : 0 已驳回
|
||||
return text === 0 ? <Button size="small" disabled>已驳回</Button> : <Popconfirm
|
||||
title="您确定驳回此用户的报名信息?"
|
||||
icon={<i className="iconfont icon-shanchu_tc_icon mr3 font-15" style={{float: 'left', color: "red"}}></i>}
|
||||
onConfirm={()=>{reject(record.user_id, 0)}}
|
||||
><Button size="small">驳回</Button></Popconfirm>
|
||||
}
|
||||
}
|
||||
];
|
||||
}, [qzDetail]);
|
||||
|
||||
const columns_production = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '参赛单位',
|
||||
dataIndex: 'org_name'
|
||||
},
|
||||
{
|
||||
title: '参赛负责人',
|
||||
dataIndex: 'leader',
|
||||
},
|
||||
{
|
||||
title: '赛区',
|
||||
dataIndex: 'zone'
|
||||
},
|
||||
{
|
||||
title: '赛项',
|
||||
dataIndex: 'sub_competition'
|
||||
},
|
||||
{
|
||||
title: '作品',
|
||||
dataIndex: 'attachments',
|
||||
render:(text, record)=>{
|
||||
return <Tooltip title={text[0] && text[0].title} placement="topLeft"><a href={current_main_site_url+(text[0] && text[0].url)} className="attachments_a">{text[0] && text[0].title}</a></Tooltip>;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: "status",
|
||||
align: "center",
|
||||
render:(text, record)=>{
|
||||
return text === 1 ? <Button size="small" disabled>已驳回</Button> : <Popconfirm
|
||||
title="您确定驳回此用户的作品信息?"
|
||||
icon={<i className="iconfont icon-shanchu_tc_icon mr3 font-15" style={{float: 'left', color: "red"}}></i>}
|
||||
onConfirm={()=>{reject(record.user_id, 1)}}
|
||||
><Button size="small">驳回</Button></Popconfirm>
|
||||
}
|
||||
}
|
||||
];
|
||||
}, [qzDetail]);
|
||||
|
||||
// 如果是内网环境,则增加部分字段
|
||||
if(qzDetail && qzDetail.is_local && columns_apply[2].title !== "职务"){
|
||||
// 职务、JXJXJX、课题来源
|
||||
columns_apply.splice(2,0,{
|
||||
title: '职务',
|
||||
dataIndex: 'org_job',
|
||||
key: 'org_job',
|
||||
},
|
||||
{
|
||||
title: Base64.decode('5Yab6KGU'),
|
||||
dataIndex: 'org_rank',
|
||||
key: 'org_rank',
|
||||
},);
|
||||
columns_apply.splice(7,0,
|
||||
{
|
||||
title: '课题来源',
|
||||
dataIndex: 'subject_source_type',
|
||||
render:(text, record)=>{
|
||||
return text === 0 ? "自主提报" : record.subject_source_name || '--';
|
||||
}
|
||||
},)
|
||||
}
|
||||
|
||||
const expandRow = (record) =>{
|
||||
return <div className="expandRowManage">
|
||||
<div className="row">
|
||||
<div className="index">序号</div>
|
||||
<div>姓名</div>
|
||||
<div>单位</div>
|
||||
<div>职务</div>
|
||||
<div>军衔</div>
|
||||
</div>
|
||||
{record.members && record.members.map((item, index)=>{
|
||||
return <div className="row">
|
||||
<div className="index">{index+1}</div>
|
||||
<div>{item.real_name}</div>
|
||||
<div>{item.org_name}</div>
|
||||
<div>{item.org_job}</div>
|
||||
<div>{item.org_rank}</div>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
}
|
||||
// 外网环境下 赛队成员无职务、JXJXJX属性
|
||||
const expandRowWai = (record) =>{
|
||||
return <div className="expandRowManage">
|
||||
<div className="row">
|
||||
<div className="index">序号</div>
|
||||
<div>姓名</div>
|
||||
<div>单位</div>
|
||||
</div>
|
||||
{record.members && record.members.map((item, index)=>{
|
||||
return <div className="row">
|
||||
<div className="index">{index+1}</div>
|
||||
<div>{item.real_name}</div>
|
||||
<div>{item.org_name}</div>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
}
|
||||
|
||||
const customExpandIcon = (props) => {
|
||||
if(props.record.members && props.record.members.length > 0){
|
||||
if (props.expanded) {
|
||||
return <a style={{ color: 'black',marginRight:8 }} onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}>查看成员<i className="iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-12 ml5"></i></a>
|
||||
} else {
|
||||
return <a style={{ color: 'black' ,marginRight:8 }} onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}>查看成员<i className="iconfont icon-jiantou9 font-12 ml5"></i></a>
|
||||
}
|
||||
}else{
|
||||
return <span style={{color:'gray' }}>查看成员</span>
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="qz_management">
|
||||
|
||||
<div className="qz_manage_head">启智2022{type === "applys" ? "报名" : "作品"}列表</div>
|
||||
|
||||
<div className="search">
|
||||
<div className="font-14">
|
||||
<Search placeholder={`输入单位/负责人${type === "applys" ? "/电话" : ""}进行搜索`} value={searchValue} onChange={(e)=>{setSearchValue(e.target.value)}} onSearch={value => {setCurPage(1);setKeyword(value)}} allowClear enterButton style={{width: 300, marginRight: "30px"}}/>
|
||||
<span>赛区: </span>
|
||||
<Select value={zone} style={{ width: 150 }} onChange={(value)=>{setCurPage(1);setZone(value)}}>
|
||||
<Option value='-1'>所有赛区</Option>
|
||||
{qzDetail && qzDetail.manager_zones.map((item,i)=> {return <Option value={item} key={i}>{item}</Option>})}
|
||||
</Select>
|
||||
<span className="ml30">赛项: </span>
|
||||
<Select value={subCompetition} style={{ width: 150 }} onChange={(value)=>{setCurPage(1);setSubCompetition(value)}}>
|
||||
<Option value='-1'>所有赛项</Option>
|
||||
{qzDetail && qzDetail.sub_competitions.map((item,i)=> {return <Option value={item} key={i}>{item}</Option>})}
|
||||
</Select>
|
||||
</div>
|
||||
<a href={current_main_site_url+`/api/competition_infos/qz2022/enroll_list.xlsx${type === "applys"? '':"?upload=true"}`}><Button className="but_2e5">导出</Button></a>
|
||||
</div>
|
||||
|
||||
<PaginationTable
|
||||
className="qzManageTable"
|
||||
loading={loading}
|
||||
dataSource={dataList}
|
||||
columns={type==="applys" ? columns_apply : columns_production}
|
||||
total={total}
|
||||
setCurPage={(page)=>setCurPage(page)}
|
||||
current={curPage}
|
||||
expandedRowRender={qzDetail && qzDetail.is_local ? expandRow : expandRowWai}
|
||||
expandIconColumnIndex={type === "applys" ? qzDetail && qzDetail.is_local ? 8 : 5 : 20}
|
||||
expandIconAsCell={false}
|
||||
expandIcon={customExpandIcon}
|
||||
pageSize={10}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Introduce;
|
|
@ -0,0 +1,50 @@
|
|||
.qz_management{
|
||||
width: 1200px;
|
||||
margin: 35px auto 0;
|
||||
background: #fff;
|
||||
padding-bottom: 20px;
|
||||
.qz_manage_head{
|
||||
color: #181818;
|
||||
padding: 12px 0 13px 30px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.search {
|
||||
color: #000;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px 30px;
|
||||
.ant-input:hover{
|
||||
border-color: #4154f1;
|
||||
}
|
||||
}
|
||||
.pagination-table.qzManageTable {
|
||||
padding: 0 30px;
|
||||
}
|
||||
.expandRowManage .row div{
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
padding-top: 15px;
|
||||
width: 20%;
|
||||
margin-right: 20px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
&.index{width: 10%;}
|
||||
}
|
||||
.expandRowManage .row{
|
||||
border-bottom: 1px solid #ececec;
|
||||
margin: 0 -8px;
|
||||
}
|
||||
.expandRowManage .row:last-child{
|
||||
border-bottom: none;
|
||||
}
|
||||
.attachments_a{
|
||||
color: #2e5bfe;
|
||||
}
|
||||
.qzManageTable .ant-table-tbody > tr > td{
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100px;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
||||
import { Input, Select, Button, Form, message } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import { formatDuring } from 'educoder';
|
||||
import icon from '../image/notice_breadcrumb.svg';
|
||||
import MDEditor from '../../../modules/tpm/challengesnew/tpm-md-editor';
|
||||
import './index.scss';
|
||||
import './detail.scss';
|
||||
import { getNoticeDetail, addQz2022Notice, updateQz2022Notice } from "../api";
|
||||
import RenderHtml from "src/components/render-html";
|
||||
const Option = Select.Option;
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const {form, history, match:{params:{noticeId,type}}, current_user, qzDetail} = props;
|
||||
const {getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [description, setDescription] = useState(undefined);
|
||||
const [errorMessage, setErrorMessage] = useState(undefined);
|
||||
const manageEdit = (qzDetail && qzDetail.is_manager) || (current_user && current_user.admin);
|
||||
|
||||
useEffect(() =>{
|
||||
if(!manageEdit){
|
||||
window.location.href="/403";
|
||||
}
|
||||
}, [manageEdit])
|
||||
|
||||
useEffect(() => {
|
||||
if(noticeId && type === "edit"){
|
||||
getNoticeDetail(noticeId).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
setDescription(response.data.data.content);
|
||||
setFieldsValue({title: response.data.data.title});
|
||||
}else{
|
||||
history.push("/404");
|
||||
}
|
||||
})
|
||||
}
|
||||
}, [type, noticeId]);
|
||||
|
||||
function submit(){
|
||||
// 判断用户是否输入通知内容
|
||||
if(!description){
|
||||
setErrorMessage("通知内容不能为空");
|
||||
}
|
||||
validateFields((error, values)=>{
|
||||
if(error){
|
||||
return
|
||||
}else{
|
||||
// 用户输入正确
|
||||
const params = {
|
||||
...values,
|
||||
content: description
|
||||
}
|
||||
type === "add" && addQz2022Notice(params).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
message.success('新增成功');
|
||||
history.push('/competition/qz2022/notice');
|
||||
}else{
|
||||
message.error(response.message);
|
||||
}
|
||||
})
|
||||
type === "edit" && updateQz2022Notice(noticeId,params).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
message.success('修改成功');
|
||||
history.push('/competition/qz2022/notice');
|
||||
}else{
|
||||
message.error(response.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
return (
|
||||
<div className="qz_notice">
|
||||
<div className="qz_main notice_detal pt30">
|
||||
<div className="breadCrumb">
|
||||
<img src={icon} className="mr12 icon_d"/>
|
||||
<Link to={"/competition/qz2022/notice"}><span className="font-16 _999">通知公告</span></Link>
|
||||
<span className="mr10 ml10 _999">/</span>
|
||||
<span className="font-16 _18">{type === 'add' ? '新增' : '编辑'}</span>
|
||||
</div>
|
||||
<Form className="qz2022_notice_edit" size="small">
|
||||
<Form.Item label="标题">
|
||||
{getFieldDecorator("title", {
|
||||
rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "请填写通知标题",
|
||||
},
|
||||
]
|
||||
})(<Input placeholder="标题" size="large" maxLength={200}/>)}
|
||||
</Form.Item>
|
||||
<div className="qzContent">
|
||||
<p className="title mb10"><span>*</span>内容:</p>
|
||||
<p className={`errorMessage mb10 ${errorMessage && 'not'}`}>{errorMessage}</p>
|
||||
<MDEditor
|
||||
placeholder={"请输入描述信息"}
|
||||
height={500}
|
||||
mdID={"order-new-description"}
|
||||
initValue={description}
|
||||
onChange={(value)=>{setDescription(value)}}
|
||||
></MDEditor>
|
||||
</div>
|
||||
</Form>
|
||||
<div className="qz2022_notice_but">
|
||||
<Button className="mr30" type="primary" onClick={submit}>提交</Button>
|
||||
<Button onClick={()=>{history.push('/competition/qz2022/notice');}}>取消</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
|
@ -0,0 +1,42 @@
|
|||
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
||||
import { Input, Select, Button, Form, DatePicker, Table, Pagination, Upload, Modal, Breadcrumb } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import { formatDuring } from 'educoder';
|
||||
import icon from '../image/notice_breadcrumb.svg';
|
||||
|
||||
import './index.scss';
|
||||
import './detail.scss';
|
||||
import { getNoticeDetail } from "../api";
|
||||
import RenderHtml from "src/components/render-html";
|
||||
const Option = Select.Option;
|
||||
|
||||
function NoticeDetail({match:{params:{noticeId}}, history}) {
|
||||
const [detail, setDetail] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
noticeId && getNoticeDetail(noticeId).then(response=>{
|
||||
if(response && response.data.message === "success"){
|
||||
setDetail(response.data.data);
|
||||
}else{
|
||||
history.push("/404");
|
||||
}
|
||||
})
|
||||
},[])
|
||||
|
||||
return (
|
||||
<div className="qz_notice">
|
||||
<div className="qz_main notice_detal pt30">
|
||||
<div className="breadCrumb">
|
||||
<img src={icon} className="mr12 icon_d"/>
|
||||
<Link to={"/competition/qz2022/notice"}><span className="font-16 _999">通知公告</span></Link>
|
||||
<span className="mr10 ml10 _999">/</span>
|
||||
<span className="font-16 _18">公告详情</span>
|
||||
</div>
|
||||
<div className="notice_title _1818 font-18">{detail && detail.title}</div>
|
||||
<div className="notice_time">发布时间: {detail && detail.created_at.substring(0,10)}</div>
|
||||
<RenderHtml className="_1818" value={detail && detail.content}/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default NoticeDetail;
|
|
@ -0,0 +1,24 @@
|
|||
.menu_border+.qz2022Menu{
|
||||
display: none;
|
||||
}
|
||||
|
||||
// 新增、编辑通知公告
|
||||
.qz2022_notice_edit{
|
||||
margin-top: 30px;
|
||||
.qzContent .title{
|
||||
span{
|
||||
color: #f5222d;
|
||||
margin-right: 2px;
|
||||
}
|
||||
}
|
||||
.errorMessage{
|
||||
color: #f5222d;
|
||||
&.not{
|
||||
margin-top: -15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.qz2022_notice_but{
|
||||
text-align: center;
|
||||
margin: 30px;
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import { Button, Modal, Popover, Menu, message } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import notice from '../image/notice.gif';
|
||||
import './index.scss';
|
||||
import '../../index.scss';
|
||||
import { getNoticeList, deleteQz2022Notice } from "../api";
|
||||
import RenderHtml from "src/components/render-html";
|
||||
|
||||
function Notice({ current_user, qzDetail }) {
|
||||
const manageEdit = (qzDetail && qzDetail.is_manager) || (current_user && current_user.admin);
|
||||
const [noticeList, setNoticeList] = useState([]);
|
||||
const [reload, setReload] = useState(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
getNoticeList().then(response => {
|
||||
if (response.status === 200 && response.data.message === "success") {
|
||||
setNoticeList(response.data.data);
|
||||
}
|
||||
})
|
||||
}, [reload]);
|
||||
|
||||
function deleteNotice(id) {
|
||||
Modal.confirm({
|
||||
title: "是否删除",
|
||||
content: "确定删除此通知公告?",
|
||||
onOk() {
|
||||
deleteQz2022Notice(id).then(response => {
|
||||
if (response.status === 200 && response.data.message === "success") {
|
||||
setReload(Math.random());
|
||||
message.success("删除成功");
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="qz_notice bg">
|
||||
{manageEdit && <div className="qz_main manageEdit mt30">
|
||||
<Link to={"/competition/qz2022/notice/add"}><Button>新增公告</Button></Link>
|
||||
</div>}
|
||||
<div className="qz_main not">
|
||||
{noticeList && noticeList.map(item => {
|
||||
return <div className="qz_notice_cont" key={item.id}>
|
||||
<div className="head">
|
||||
<Link to={`/competition/qz2022/notice/detail/${item.id}`} className="notCont_head"><img className="notice-new" src={notice} alt=""/>{item.title}</Link>
|
||||
{manageEdit && <Popover content={<Menu>
|
||||
<Menu.Item>
|
||||
<Link to={`/competition/qz2022/notice/edit/${item.id}`}>编辑</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<a onClick={() => { deleteNotice(item.id) }}>删除</a>
|
||||
</Menu.Item>
|
||||
</Menu>} placement="bottom" overlayClassName="edit">...</Popover>}
|
||||
</div>
|
||||
<div className="cont font-15">
|
||||
<RenderHtml className="_1818" value={item.content} />
|
||||
</div>
|
||||
{/* </Link> */}
|
||||
<p>{item.updated_at.substring(0, 10)}</p>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Notice;
|
|
@ -0,0 +1,87 @@
|
|||
.qz_notice{
|
||||
min-height: 445px;
|
||||
&.bg{
|
||||
background-image: url('../image/notice_bj.png');
|
||||
background-position: center center;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.qz_main.not {
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
>.qz_main.notice_detal{
|
||||
min-height: 65vh;
|
||||
>.breadCrumb .icon_d{margin-top: -4px;}
|
||||
}
|
||||
.qz_notice_cont{
|
||||
background-color:#ffffff;
|
||||
border-radius:4px;
|
||||
box-shadow:0px 3px 12px #ecf0ff;
|
||||
padding: 18px 30px 25px 20px;
|
||||
color:#2e3341;
|
||||
margin-top: 30px;
|
||||
.head{
|
||||
display: flex;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
|
||||
justify-content: space-between;
|
||||
>span{cursor: pointer;}
|
||||
|
||||
.notice-new{
|
||||
position: relative;
|
||||
top:8px;
|
||||
}
|
||||
}
|
||||
.notCont_head{
|
||||
font-weight:bold;
|
||||
color:#2e5bfe;
|
||||
cursor: pointer;
|
||||
&.border{
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
>p{
|
||||
text-align: right;
|
||||
color:#666666;
|
||||
}
|
||||
>.font-15{
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
.cont{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
._999{
|
||||
color: #999;
|
||||
&:hover{color: #2e5bfe;}
|
||||
}
|
||||
._1818{color: #181818;}
|
||||
// 详情页样式
|
||||
.notice_title{
|
||||
text-align: center;
|
||||
font-weight:bold;
|
||||
margin: 60px 0 30px;
|
||||
}
|
||||
.notice_time{
|
||||
color:#2e3341;
|
||||
text-align: right;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px dashed #979797;
|
||||
}
|
||||
.notice_small_title{
|
||||
font-weight:bold;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.last_de{
|
||||
padding-bottom: 40px;
|
||||
margin-bottom: 50px;
|
||||
border-bottom: 1px dashed #979797;
|
||||
}
|
||||
}
|
||||
.edit .ant-popover-inner-content{
|
||||
padding: 0;
|
||||
}
|
|
@ -0,0 +1,145 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import {Prompt} from 'react-router-dom'
|
||||
import {Select, Button, Upload, Modal, Icon, message } from 'antd';
|
||||
import { appendFileSizeToUploadFileAll } from 'educoder';
|
||||
import {current_main_site_url} from '../fetch.js';
|
||||
import {uploadCompetition} from '../api';
|
||||
import refer from "../image/refer.svg";
|
||||
|
||||
import './index.scss';
|
||||
import '../../index.scss';
|
||||
import '../apply/index.scss';
|
||||
|
||||
function Introduce({ form, showNotification, match, history, enrollStatus, current_user, qzDetail, setReload}) {
|
||||
// 上传文件时 按钮loading效果
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [files, setFiles] = useState();
|
||||
// 用户是否更改上传的作品列表
|
||||
const [changeFiles, setChangeFiles] = useState(false);
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
window.onbeforeunload = function (e) {
|
||||
if(changeFiles){
|
||||
e.returnValue = "离开此页面将不保留已上传的作品文件,确定离开?";
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
// referStatus : 当前时间不处于提案提交时间
|
||||
const referStatus = qzDetail && !(Date.parse(new Date()) > Date.parse(new Date(qzDetail.enroll_date)) && Date.parse(new Date()) < Date.parse(new Date(qzDetail.upload_date)));
|
||||
// 当前时间不处于提案提交时间 或者用户未登录情况下 或者用户未报名 通过URL访问此页面,跳转到大赛介绍页面 或者用户报名信息被驳回未处理(enrollStatus.status = 0)
|
||||
if(referStatus || (current_user && !current_user.login) || (enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status === 0))){
|
||||
history.push("/competition/qz2022");
|
||||
}
|
||||
},[qzDetail, current_user, enrollStatus])
|
||||
|
||||
useEffect(() => {
|
||||
if(enrollStatus && enrollStatus.upload_status){
|
||||
enrollStatus.attachments.map(item=>{
|
||||
item.uid = 'rc-upload'+item.id;
|
||||
item.name = item.title;
|
||||
item.status = "done";
|
||||
});
|
||||
setFiles(enrollStatus.attachments);
|
||||
}
|
||||
}, [enrollStatus]);
|
||||
|
||||
function handleChange(info) {
|
||||
if (info.file.status === 'uploading' || info.file.status === "done" || info.file.status === 'removed') {
|
||||
setLoading(true);
|
||||
setFiles(appendFileSizeToUploadFileAll(info.fileList).slice(-1))
|
||||
}
|
||||
if(info.file.status === "done" || info.file.status === 'removed'){
|
||||
setLoading(false);
|
||||
setChangeFiles(true);
|
||||
}
|
||||
}
|
||||
|
||||
// 支持文件下载
|
||||
function download(file){
|
||||
const fileId = file.id || file.response.id;
|
||||
window.open(`${current_main_site_url}/api/attachments/${fileId}`);
|
||||
}
|
||||
|
||||
// 进行文件大小检查
|
||||
function beforeUpload(file){
|
||||
const isZip = file.name.endsWith(".zip") || file.name.endsWith(".tar") || file.name.endsWith(".rar");
|
||||
if(!isZip){
|
||||
showNotification(`只能上传压缩包文件`);
|
||||
}
|
||||
const isLt100M = file.size / 1024 / 1024 < 1024;
|
||||
if (!isLt100M) {
|
||||
showNotification(`文件大小必须小于${1024}MB!`);
|
||||
}
|
||||
return isLt100M && isZip;
|
||||
}
|
||||
|
||||
// 作品提交
|
||||
function referProduction(){
|
||||
if(files && files.length === 1){
|
||||
const params = {
|
||||
"attachment_ids": [files[0].response.id]
|
||||
}
|
||||
uploadCompetition(params).then(response=>{
|
||||
if(response && response.status === 200){
|
||||
setChangeFiles(false);
|
||||
setReload(Math.random());
|
||||
setVisible(false);
|
||||
message.success('提交作品成功');
|
||||
}else{
|
||||
message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// 是否允许用户上传作品
|
||||
const upload = enrollStatus && (!enrollStatus.upload_status || enrollStatus.status === 1);
|
||||
return (
|
||||
<div className="refer_bg">
|
||||
{
|
||||
changeFiles &&
|
||||
<Prompt
|
||||
when={true}
|
||||
message={() => '离开此页面将不保留已上传的作品文件,确定离开?'}
|
||||
/>
|
||||
}
|
||||
<div className="qz_main refer">
|
||||
<img src={refer} className="refer_img mb20" alt=""/>
|
||||
<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" disabled={!upload}><Icon type="upload"/>{!upload ? '已' : ''}上传</Button>
|
||||
</Upload>
|
||||
<Modal/>
|
||||
{enrollStatus && enrollStatus.upload_status && enrollStatus.status === 1 && <div className="refer_tip mt15 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={()=>{changeFiles ? setVisible(true) : message.error("您暂未上传作品文件")}} loading={loading} disabled={!upload}>{!upload ? '已' : ''}提交作品</Button>
|
||||
</div>
|
||||
<Modal
|
||||
title="提示"
|
||||
visible={visible}
|
||||
onOk={referProduction}
|
||||
onCancel={()=>{setVisible(false)}}
|
||||
centered
|
||||
wrapClassName="applyInfoCon"
|
||||
cancelText=""
|
||||
>
|
||||
<div className="tips mb10"><i className="iconfont icon-shanchu_tc_icon1 font-24 mr10" style={{color: '#ffa13a'}}></i><span className="tipTitle font-16">确定提交作品</span></div>
|
||||
<span>提交后作品文件将无法修改!</span>
|
||||
</Modal>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Introduce;
|
|
@ -0,0 +1,53 @@
|
|||
.refer_bg{
|
||||
padding: 40px 0 60px;
|
||||
}
|
||||
.refer{
|
||||
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;
|
||||
.refer_img{
|
||||
width: 48px;
|
||||
}
|
||||
.upload{
|
||||
padding: 0 28px;
|
||||
}
|
||||
.refer_tip{
|
||||
color:#595959;
|
||||
font-size:15px;
|
||||
&.cover{
|
||||
color: red;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
&.cover .icon-erciqueren_icon{
|
||||
color: #FA2D2D;
|
||||
}
|
||||
}
|
||||
.refer_bor{
|
||||
width: 40vw;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
margin: 25px 0 35px;
|
||||
}
|
||||
>span{
|
||||
text-align: center;
|
||||
}
|
||||
.ant-upload-list-item-info{
|
||||
color: #2e5bfe;
|
||||
:hover{color: #2e5bfe;}
|
||||
.ant-upload-list-item-card-actions{
|
||||
right: -55px;
|
||||
.anticon{padding-right: 10px;}
|
||||
}
|
||||
& a:link{
|
||||
color: #2e5bfe;
|
||||
}
|
||||
}
|
||||
.ant-upload-list-item:hover .ant-upload-list-item-info{background: none;}
|
||||
.ant-upload-list-item{
|
||||
text-overflow: ellipsis;
|
||||
max-width: 46vw;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
// 启智2022所有的路由后缀
|
||||
export const paths = ["qz2022","introduce", "fingerpost", "notice", "apply", "refer", "statistics", "chat", "contact", "applys", "production",""]
|
|
@ -0,0 +1,262 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
let fontSizeText = 16;
|
||||
let clientWidth = document.body.clientWidth;
|
||||
if (clientWidth < 1000) {
|
||||
fontSizeText = 16
|
||||
} else if (clientWidth >= 1000 && clientWidth <= 2000) {
|
||||
fontSizeText = 14 + (clientWidth - 1000) / 500;
|
||||
} else if (clientWidth > 2000) {
|
||||
fontSizeText = 16 + (clientWidth - 2000) / 500;
|
||||
} else if (clientWidth > 3000) {
|
||||
fontSizeText = 18 + (clientWidth - 3000) / 2000;
|
||||
}
|
||||
let fontSizeTitle = 1.25 * fontSizeText;
|
||||
|
||||
const colorArr0 = ['rgba(226, 217, 255, 1)', 'rgba(254, 230, 147, 1)', 'rgba(187, 217, 255, 1)'];
|
||||
const colorArr1 = ['rgba(189, 170, 255, 1)', 'rgba(251, 184, 103, 1)', 'rgba(112, 159, 255, 1)'];
|
||||
|
||||
export default ({ id, className, title, legendArr, xData, yData }) => {
|
||||
|
||||
useEffect(() => {
|
||||
let newEchartBar = document.getElementById(id) && echarts.init(document.getElementById(id));
|
||||
let textColor = "#7988a5";
|
||||
let normalColor = "#e8e8ed";
|
||||
|
||||
let colors = [
|
||||
{
|
||||
type: 'linear',
|
||||
x: 0, x2: 1, y: 0, y2: 0,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: colorArr0[0]//'#218bd1'
|
||||
}, {
|
||||
offset: 0.5,
|
||||
color: colorArr0[0]//'#7EC3F0'
|
||||
}, {
|
||||
offset: 0.5,
|
||||
color: colorArr1[0]// '#1985cd'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: colorArr0[0]//'#1985cd'
|
||||
}]
|
||||
},
|
||||
{
|
||||
type: 'linear',
|
||||
x: 0, x2: 1, y: 0, y2: 0,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: colorArr0[1]//'#6DD4E5'
|
||||
}, {
|
||||
offset: 0.5,
|
||||
color: colorArr0[1]//'#6DD4E5'
|
||||
}, {
|
||||
offset: 0.5,
|
||||
color: colorArr1[1]//'#0EADC9'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: colorArr0[1]//'#218bd1'
|
||||
}]
|
||||
},
|
||||
{
|
||||
type: 'linear',
|
||||
x: 0, x2: 1, y: 0, y2: 0,
|
||||
colorStops: [{
|
||||
offset: 0,
|
||||
color: colorArr0[2]//'#acace6'
|
||||
}, {
|
||||
offset: 0.5,
|
||||
color: colorArr0[2]//'#acace6'
|
||||
}, {
|
||||
offset: 0.5,
|
||||
color: colorArr1[2]//'#6161bd'
|
||||
}, {
|
||||
offset: 1,
|
||||
color: colorArr0[2]//'#6161bd'
|
||||
}]
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
let barWidth = 25;
|
||||
|
||||
let option = {
|
||||
grid: {
|
||||
left: "3%",
|
||||
top: "12%",
|
||||
right: "8%",
|
||||
bottom: '5%',
|
||||
containLabel: true
|
||||
},
|
||||
title: {
|
||||
text: title,
|
||||
fontSize: fontSizeTitle,
|
||||
position: 'inside',
|
||||
textStyle: {
|
||||
color: textColor
|
||||
}
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
// type: "shadow",
|
||||
// textStyle: {
|
||||
// color: "#fff"
|
||||
// }
|
||||
type: 'line',
|
||||
lineStyle: {
|
||||
type: 'dotted'
|
||||
},
|
||||
},
|
||||
backgroundColor: 'rgba(255,255,255,0.8)',
|
||||
textStyle: {
|
||||
color: "#333"
|
||||
},
|
||||
formatter: function (params) {
|
||||
let paramsData = params.filter(i => { return i.seriesType === 'bar' });
|
||||
// console.log(params);
|
||||
return (
|
||||
paramsData[0].name +
|
||||
'<br/>' +
|
||||
paramsData[0].marker +
|
||||
paramsData[0].seriesName +
|
||||
':' +
|
||||
paramsData[0].value +
|
||||
'<br/>' +
|
||||
paramsData[1].marker +
|
||||
paramsData[1].seriesName +
|
||||
':' +
|
||||
paramsData[1].value +
|
||||
'<br/>' +
|
||||
paramsData[2].marker +
|
||||
paramsData[2].seriesName +
|
||||
':' +
|
||||
paramsData[2].value
|
||||
)
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: legendArr,
|
||||
top: '2%',
|
||||
right: "8%",
|
||||
fontSize: fontSizeText,
|
||||
},
|
||||
xAxis: [{
|
||||
type: "category",
|
||||
name: '分赛区',
|
||||
data: xData,
|
||||
// axisPointer: {
|
||||
// type: "shadow"
|
||||
// },
|
||||
axisLabel: {
|
||||
textStyle: {
|
||||
color: textColor,
|
||||
fontSize: .75 * fontSizeText
|
||||
},
|
||||
interval: 0,
|
||||
// rotate: 40
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: textColor
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
type: "value",
|
||||
name: '报名数',
|
||||
minInterval: 1,
|
||||
nameTextStyle: {
|
||||
color: textColor,
|
||||
fontSize: fontSizeText
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: "{value}",
|
||||
textStyle: {
|
||||
color: textColor,
|
||||
fontSize: fontSizeText
|
||||
}
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: normalColor
|
||||
}
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
splitLine: {
|
||||
// show: false,
|
||||
lineStyle: {
|
||||
color: normalColor,
|
||||
type: 'dotted',
|
||||
}
|
||||
},
|
||||
}],
|
||||
series: []
|
||||
};
|
||||
yData.forEach((data, i) => {
|
||||
option.series.push({
|
||||
z: 1,
|
||||
name: legendArr[i],
|
||||
type: "bar",
|
||||
index: i,
|
||||
data,
|
||||
barWidth: barWidth,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: colors[i]
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// option.series.push({
|
||||
// z: 2,
|
||||
// name: legendArr[i] + '下',
|
||||
// type: 'pictorialBar',
|
||||
// data,
|
||||
// symbol: 'diamond',
|
||||
// symbolOffset: [(i - 1) * 150 + '%', '50%'],
|
||||
// symbolSize: [barWidth - 4, 10 * (barWidth - 4) / barWidth],
|
||||
// itemStyle: {
|
||||
// normal: {
|
||||
// borderWidth: 0,
|
||||
// color: colorArr1[i]
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
|
||||
option.series.push({
|
||||
z: 100,
|
||||
name: legendArr[i] + '上',
|
||||
type: 'pictorialBar',
|
||||
symbolPosition: 'end',
|
||||
data,
|
||||
symbol: 'diamond',
|
||||
symbolOffset: [(i - 1) * 130 + '%', '-50%'],
|
||||
symbolSize: [barWidth, 10 * (barWidth - 3) / barWidth],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
borderWidth: 0,
|
||||
color: colorArr0[i]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
newEchartBar && newEchartBar.setOption(option);
|
||||
}, [id, title, xData, yData])
|
||||
|
||||
return (
|
||||
<div id={id} key={id} className={className} style={{ minHeight: "20vh" }}>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
let fontSizeText = 16;
|
||||
let clientWidth = document.body.clientWidth;
|
||||
if (clientWidth < 1000) {
|
||||
fontSizeText = 16
|
||||
} else if (clientWidth >= 1000 && clientWidth <= 2000) {
|
||||
fontSizeText = 14 + (clientWidth - 1000) / 500;
|
||||
} else if (clientWidth > 2000) {
|
||||
fontSizeText = 16 + (clientWidth - 2000) / 500;
|
||||
} else if (clientWidth > 3000) {
|
||||
fontSizeText = 18 + (clientWidth - 3000) / 2000;
|
||||
}
|
||||
|
||||
export default ({ id, className, title, dataList }) => {
|
||||
useEffect(() => {
|
||||
let newEchartBar = document.getElementById(id) && echarts.init(document.getElementById(id));
|
||||
|
||||
let option = {
|
||||
color: ["#fccb42", "#3b7afe", "#9b80f5"],
|
||||
title: {
|
||||
text: "",
|
||||
},
|
||||
tooltip: {
|
||||
trigger: "item",
|
||||
},
|
||||
grid:{
|
||||
bottom:.25*fontSizeText
|
||||
},
|
||||
legend: {
|
||||
icon: 'circle',
|
||||
data: dataList.map((item) => item.name),
|
||||
bottom: .5* fontSizeText,
|
||||
fontSize: fontSizeText,
|
||||
itemGap: 20,
|
||||
itemWidth: 8,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: "pie",
|
||||
roseType: "radius",
|
||||
radius: ["30%", "60%"],
|
||||
data: dataList,
|
||||
label: {
|
||||
formatter: function (params) {
|
||||
return params.name + '\n\n' + `${params.value} ${params.percent}%`;
|
||||
},
|
||||
color:'#000'
|
||||
},
|
||||
labelLine: {
|
||||
length: 10,
|
||||
length2: 60,
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: "rgba(0,0,0,0.5)",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
newEchartBar && newEchartBar.setOption(option);
|
||||
}, [id, title, dataList])
|
||||
|
||||
return (
|
||||
<div id={id} key={id} className={className} style={{ minHeight: "20vh" }}>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { stattistics } from '../api';
|
||||
import './index.scss';
|
||||
import '../../index.scss';
|
||||
import statisticsSum from '../image/statistics-sum.png';
|
||||
import statisticsWork from '../image/statistics-work.png';
|
||||
import EchartPie from './EchartPie';
|
||||
import EchartBar from './EchartBar';
|
||||
|
||||
|
||||
|
||||
const initBarYData = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]];
|
||||
|
||||
|
||||
function Statistics({ showNotification, qzDetail }) {
|
||||
const is_local= qzDetail &&qzDetail.is_local;
|
||||
const [pieArr, setPieArr] = useState([]);
|
||||
|
||||
const [barXData, setBarXData] = useState([]);
|
||||
const [legendArr, setLegendArr] = useState([]);
|
||||
const [barYData, setBarYData] = useState(initBarYData);
|
||||
const [uploadCount, setUploadCount] = useState(0);
|
||||
const [enrollCount, setEnrollCount] = useState(0);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
stattistics().then(res => {
|
||||
if (res && res.data && Array.isArray(res.data.data)) {
|
||||
let pieArrList = [];
|
||||
let xData = [];
|
||||
let yData1 = [], yData2 = [], yData3 = [];
|
||||
let barYDataArr = [];
|
||||
res.data.data.forEach(i => {
|
||||
i[0] && xData.push(i[0].split('分赛区')[0]);
|
||||
yData1.push(i[1]);
|
||||
yData2.push(i[2]);
|
||||
yData3.push(i[3]);
|
||||
});
|
||||
|
||||
setLegendArr(res.data.competition_subs);
|
||||
setUploadCount(res.data.upload_count);
|
||||
setEnrollCount(res.data.enroll_count);
|
||||
setBarXData(xData);
|
||||
|
||||
barYDataArr[0] = yData1;
|
||||
barYDataArr[1] = yData2;
|
||||
barYDataArr[2] = yData3;
|
||||
setBarYData(barYDataArr);
|
||||
|
||||
let yData = [];
|
||||
yData.push(yData1.reduce((pre, current) => { return pre + current }, 0));
|
||||
yData.push(yData2.reduce((pre, current) => { return pre + current }, 0));
|
||||
yData.push(yData3.reduce((pre, current) => { return pre + current }, 0));
|
||||
res.data.competition_subs.forEach((item, index) => {
|
||||
pieArrList.push({
|
||||
name: item,
|
||||
value: yData[index],
|
||||
})
|
||||
});
|
||||
setPieArr(pieArrList);
|
||||
}else{
|
||||
showNotification((res&&res.message) || '请求数据失败!');
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
|
||||
return (
|
||||
<div className="statistics-bg">
|
||||
<div className="statistics qz_main ">
|
||||
|
||||
<div className="statistics-words">
|
||||
<div className="num-item sum">
|
||||
<img src={statisticsSum} ></img>
|
||||
<div className="item-content">
|
||||
<div className="num-data">{enrollCount}+</div>
|
||||
<div className="num-tit">竞赛总报名数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="num-item work">
|
||||
<img src={statisticsWork} ></img>
|
||||
<div className="item-content">
|
||||
<div className="num-data">{uploadCount}+</div>
|
||||
<div className="num-tit">竞赛总作品提交数</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 外网 */}
|
||||
{!is_local && <div className="right-echart outside">
|
||||
<h3 className="type-name">综合赛区报名数</h3>
|
||||
<EchartPie
|
||||
id="network"
|
||||
className="echart-box"
|
||||
dataList={pieArr}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
{/* 内网 */}
|
||||
{
|
||||
is_local &&
|
||||
<div className="right-echart">
|
||||
<EchartBar
|
||||
id="newAddedProjects"
|
||||
className="echart-box"
|
||||
title=""
|
||||
legendArr={legendArr}
|
||||
xData={barXData}
|
||||
yData={barYData}
|
||||
/>
|
||||
</div>}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default Statistics;
|
|
@ -0,0 +1,78 @@
|
|||
.statistics-bg{
|
||||
background-image: url('../image/statistics.png');
|
||||
background-size: 100% 100%;
|
||||
padding:3rem 0;
|
||||
}
|
||||
.statistics {
|
||||
display: flex;
|
||||
margin: 0 auto;
|
||||
|
||||
|
||||
.statistics-words {
|
||||
width: 30%;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
.num-item {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 12.25rem;
|
||||
background-color: #ffffff;
|
||||
|
||||
&:first-child{
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: 2px solid #2e5bfe;
|
||||
box-shadow: 0px 3px 12px #ecf0ff;
|
||||
|
||||
.num-data {
|
||||
color: #2e5bfe;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 5.125rem;
|
||||
margin-right: 1.75rem;
|
||||
}
|
||||
|
||||
.num-data {
|
||||
font-weight: 700;
|
||||
font-size: 3rem;
|
||||
line-height: 1.4em;
|
||||
border-bottom: 1px solid #d7dbe1;
|
||||
}
|
||||
|
||||
.num-tit {
|
||||
color: #090909;
|
||||
}
|
||||
}
|
||||
|
||||
.right-echart {
|
||||
flex: auto;
|
||||
background: #fff;
|
||||
|
||||
.echart-box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&.outside {
|
||||
padding: 0 1.75rem 0 1.25rem;
|
||||
|
||||
.echart-box {
|
||||
height: calc(100% - 3.5rem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type-name {
|
||||
color: #333333;
|
||||
font-size: 1rem;
|
||||
line-height: 3.5rem;
|
||||
border-bottom: 1px solid rgba(153, 153, 153, 0.2);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
|
@ -580,7 +580,7 @@ span.CodeMirror-selectedtext {
|
|||
|
||||
|
||||
body #root {
|
||||
background: #f5f5f5;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.newedu-class-leftnav {
|
||||
|
|
|
@ -50,8 +50,15 @@ body>.-task-title {
|
|||
max-height: 700px !important;
|
||||
}
|
||||
.indexHOC > .ant-spin-nested-loading {
|
||||
background: #000;
|
||||
/* background: #000; */
|
||||
height: 100%;
|
||||
margin-bottom: 107px;
|
||||
}
|
||||
.indexHOC .homePage+.ant-spin-nested-loading {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.newFooter{
|
||||
position:absolute !important;
|
||||
}
|
||||
.indexHOC > .ant-spin-nested-loading > div > .ant-spin .ant-spin-dot {
|
||||
top: 50% !important;
|
||||
|
|
|
@ -134,7 +134,7 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
|||
this.setState({
|
||||
mygetHelmetapi: response.data.setting
|
||||
});
|
||||
localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
||||
response.data.setting&&localStorage.setItem('chromesetting', JSON.stringify(response.data.setting));
|
||||
localStorage.setItem('chromesettingresponse', JSON.stringify(response));
|
||||
try {
|
||||
if (response.data.setting.tab_logo_url) {
|
||||
|
@ -293,6 +293,7 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
|||
resetUserInfo: this.fetchUsers,
|
||||
showCompeleteDialog: this.showCompeleteDialog
|
||||
};
|
||||
let qz2022 = this.props.match.path.includes('/competition/qz2022');
|
||||
return (
|
||||
<div className="indexHOC">
|
||||
<SystemNotice
|
||||
|
@ -314,12 +315,13 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
|||
{...this.state}
|
||||
/> : ""}
|
||||
{/* <Header {...this.state} {...this.props} {...common} publicNav={publicNav}></Header> */}
|
||||
<NewHeader {...this.state} {...this.props} {...common}></NewHeader>
|
||||
{/* <NewHeader {...this.state} {...this.props} {...common}></NewHeader> */}
|
||||
{!qz2022&&<NewHeader {...this.state} {...this.props} {...common}></NewHeader>}
|
||||
<Spin spinning={this.state.globalLoading} delay={0} className="globalSpin"
|
||||
size="large" tip={this._gLoadingTip || "加载中..."}
|
||||
>
|
||||
<div className="newContainer newContainers">
|
||||
{!publicNav && <div style={{ height: "70px" }}></div>}
|
||||
{!publicNav && !qz2022&&<div style={{height:"70px"}}></div> }
|
||||
{
|
||||
current_user &&
|
||||
<WrappedComponent initCommonState={(user) => this.initCommonState(user)}
|
||||
|
|