diff --git a/src/AppConfig.js b/src/AppConfig.js index 66814afe..970cd620 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,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 || 'a' + window.location.search.indexOf('debug=a') !== -1 ? 'a' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/index.css b/src/index.css index 4c75d804..8e83c0a7 100644 --- a/src/index.css +++ b/src/index.css @@ -175,4 +175,9 @@ i.color-orange05:hover { .color-light-green { color: #29bd8b !important; +} + +.ant-message-notice .ant-message-notice-content{ + font-size: 16px; + padding: 15px 50px; } \ No newline at end of file diff --git a/src/military/qz2022.js b/src/military/qz2022.js index ff8a4fcf..c92f59d1 100644 --- a/src/military/qz2022.js +++ b/src/military/qz2022.js @@ -9,6 +9,7 @@ import Loading from "../Loading"; import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC"; import './qz2022/index.scss'; import { Menu, Popover, Spin } from "antd"; +import InfoModal from './qz2022/components/infoModal'; import banner from './qz2022/image/banner.jpg'; import banner_local from './qz2022/image/banner_local.jpg'; import logo from './qz2022/image/logo.png'; @@ -66,7 +67,7 @@ const Management = Loadable({ }) const Qz2022 = (props) => { - const { history, current_user,match } = props; + const { history, current_user, match } = props; const { location } = history; const { pathname } = location; const [active, setActive] = useState(); @@ -77,7 +78,7 @@ const Qz2022 = (props) => { const [fixedTop, setFixedTop] = useState(''); - const {competitionId}=match.params; + const { competitionId } = match.params; const menu = ( @@ -103,16 +104,6 @@ const Qz2022 = (props) => { } }, []); - // useEffect(()=>{ - // let footer=document.querySelector('.newFooter'); - // let loading=document.querySelector('..ant-spin-nested-loading'); - // if((footer.offsetTop +107) { {/* banner图+选项 */} + {pathname.indexOf("qz2022") && }
{paths.indexOf(active) !== -1 &&
  • -
  • +
  • 首页
  • diff --git a/src/military/qz2022/apply/index.jsx b/src/military/qz2022/apply/index.jsx index 0673cf39..efc86e39 100644 --- a/src/military/qz2022/apply/index.jsx +++ b/src/military/qz2022/apply/index.jsx @@ -37,6 +37,12 @@ export default Form.create()((props) => { setSourceBy(enrollStatus.enroll_info.subject_source_type); setFieldsValue(enrollStatus.enroll_info); } + enrollStatus&&enrollStatus.enroll_info&&enrollStatus.enroll_info.enroll_template&& + setFiles([{...enrollStatus.enroll_info.enroll_template, + uid:"rc-upload-"+enrollStatus.enroll_info.enroll_template.id, + name:enrollStatus.enroll_info.enroll_template.title, + response:{id:enrollStatus.enroll_info.enroll_template.id} + }]); },[current_user, enrollStatus]) // form表单公共处理函数 @@ -145,6 +151,7 @@ export default Form.create()((props) => { function handleChange(info) { if (info.file.status === 'uploading' || info.file.status === "done" || info.file.status === 'removed') { setLoading(true); + console.log(info.fileList); setFiles(appendFileSizeToUploadFileAll(info.fileList).slice(-1)); } if(info.file.status === "done" || info.file.status === 'removed'){ @@ -298,9 +305,11 @@ export default Form.create()((props) => {
报名表扫描件: - {enrollStatus && enrollStatus.enroll_info.enroll_template ? + {/* */} + {/* {enrollStatus && enrollStatus.enroll_info.enroll_template ? {enrollStatus.enroll_info.enroll_template.title} - :: */} + { >
- 1. 您可选择是否上传单位盖章后的报名表扫描件
- 2. 上传附件名称需更改为“单位名称+参赛团队负责人”
- 3. 支持上传单个zip、rar格式文件,文件大小限制10M
- 4. 密级必须为{qzDetail && qzDetail.is_local ? '秘密及以下' : '公开级'}
-
} +
1. 您已成功报名,此处报名表扫描件不是必填项!!!
+ 2. 您可选择是否上传单位盖章后的报名表扫描件
+ 3. 上传附件名称需更改为“单位名称+参赛团队负责人”
+ 4. 支持上传单个zip、rar格式文件,文件大小限制10M
+ 5. 密级必须为{qzDetail && qzDetail.is_local ? '秘密及以下' : '公开级'} + {enrollStatus && enrollStatus.enroll_info.enroll_template ?
您已成功提交报名表扫描件,若再次提交,将覆盖您上一次的提交记录
:""} +
+ + + {/* } */}
- {enrollStatus && !enrollStatus.enroll_info.enroll_template && } + {enrollStatus && } } {enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status === 0) &&
diff --git a/src/military/qz2022/apply/index.scss b/src/military/qz2022/apply/index.scss index 9435f942..a2e2ad45 100644 --- a/src/military/qz2022/apply/index.scss +++ b/src/military/qz2022/apply/index.scss @@ -111,6 +111,9 @@ font-size: 14px; color: gray; } + .text_red{ + color: red; + } .download{ color: #2e5bfe; &:hover{ diff --git a/src/military/qz2022/components/infoModal/index.jsx b/src/military/qz2022/components/infoModal/index.jsx new file mode 100644 index 00000000..0b762d05 --- /dev/null +++ b/src/military/qz2022/components/infoModal/index.jsx @@ -0,0 +1,48 @@ +import React, { memo, useEffect, useState } from 'react'; +import { Modal } from 'antd'; +import { Link } from 'react-router-dom'; + +import bg from '../../image/infoModal.jpg'; +import './index.scss'; + + + +function QzModal() { + + const [visible, setVisible] = useState(false); + + useEffect(() => { + let qzInfoTime = localStorage.qzInfoTime; + let nowTime = new Date().getTime(); + let lastTime=new Date("2022-05-26").getTime(); + if(nowTime>lastTime)return; + if (qzInfoTime) { + if (nowTime - qzInfoTime > 24 * 3600 * 1000) { + // 延时展示,保证渲染modal不会白屏 + setTimeout(()=>{setVisible(true);},800) + localStorage.setItem('qzInfoTime', nowTime); + } + } else { + setTimeout(()=>{setVisible(true);},800) + localStorage.setItem('qzInfoTime', nowTime); + } + }, []) + + return ( + { setVisible(false) }} + footer={null} + className='qzInfoModal' + width='728px' + maskClosable={false} + > + + + {/* 查看详情 */} + + ) +} + +export default memo(QzModal); \ No newline at end of file diff --git a/src/military/qz2022/components/infoModal/index.scss b/src/military/qz2022/components/infoModal/index.scss new file mode 100644 index 00000000..133e0034 --- /dev/null +++ b/src/military/qz2022/components/infoModal/index.scss @@ -0,0 +1,49 @@ +.qzInfoModal { + top:calc(50vh - 250px); + .ant-modal-body { + padding: 0; + background: #fff; + + img { + border-radius: 2px; + width: 100%; + } + } + + .ant-modal-header { + height: 0; + background: #fff; + display: none !important; + } + + .ant-modal-close { + top: -50px !important; + right: -50px; + } + .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; + } + } +} diff --git a/src/military/qz2022/image/infoModal.jpg b/src/military/qz2022/image/infoModal.jpg new file mode 100644 index 00000000..87d47a3f Binary files /dev/null and b/src/military/qz2022/image/infoModal.jpg differ