From 507fe8788f7a6eae3c7cc4ac2117ed1f043c1ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Tue, 29 Mar 2022 17:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E7=AB=9E=E8=B5=9Bissue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/military/qz2022.js | 6 +- src/military/qz2022/apply/index.jsx | 2 +- src/military/qz2022/chat/index.jsx | 33 ++++++++ src/military/qz2022/chat/index.scss | 62 +++++++++++++++ src/military/qz2022/management/index.jsx | 6 +- src/military/qz2022/management/index.scss | 6 ++ src/military/qz2022/refer/Upload.jsx | 94 ----------------------- src/military/qz2022/refer/index.jsx | 13 +++- src/military/qz2022/refer/index.scss | 5 ++ 9 files changed, 123 insertions(+), 104 deletions(-) create mode 100644 src/military/qz2022/chat/index.jsx create mode 100644 src/military/qz2022/chat/index.scss delete mode 100644 src/military/qz2022/refer/Upload.jsx diff --git a/src/military/qz2022.js b/src/military/qz2022.js index 2b0d4ca0a..4feeb44e4 100644 --- a/src/military/qz2022.js +++ b/src/military/qz2022.js @@ -100,7 +100,6 @@ const Qz2022 = (props) => { 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)); } - return ( {/* banner图+选项 */} @@ -120,8 +119,11 @@ const Qz2022 = (props) => {
  • {current_user && current_user.login ? !applyStatus && props.showNotification("当前不处于报名时间") : props.showLoginDialog()}}>参赛报名
  • -
  • + {/*
  • {current_user && current_user.login ? !referStatus && props.showNotification("未到作品提交时间,请耐心等待") : props.showLoginDialog()}}>提案提交 +
  • */} +
  • + 提案提交
  • 数据统计 diff --git a/src/military/qz2022/apply/index.jsx b/src/military/qz2022/apply/index.jsx index c35824103..c05aab273 100644 --- a/src/military/qz2022/apply/index.jsx +++ b/src/military/qz2022/apply/index.jsx @@ -162,7 +162,7 @@ export default Form.create()((props) => {

    成员 :

    {errorMessage}

    {/* */} - + } {/* 已报名,报名信息 */} diff --git a/src/military/qz2022/chat/index.jsx b/src/military/qz2022/chat/index.jsx new file mode 100644 index 000000000..faa509897 --- /dev/null +++ b/src/military/qz2022/chat/index.jsx @@ -0,0 +1,33 @@ +import React from "react"; +import chatSvg from "../image/chat.svg"; +import btn from "../image/btn-right.png"; +import './index.scss'; +import '../../index.scss'; + +function Chat({ form, showNotification, match, history }) { + + + return ( +
    + +
    +
    交流互动
    +
    +

    集萃群智体会

    +

    与论坛成员交流比赛经验,分享参赛心得

    +

    汇聚赛事资讯

    +

    助您第一时间解读竞赛动态,把握赛事脉搏

    +
    +
    {window.open('https://fc.osredm.com/forums/theme/105')}}> + 了解详情 + +
    +
    + +
    + ) +} +export default Chat; \ No newline at end of file diff --git a/src/military/qz2022/chat/index.scss b/src/military/qz2022/chat/index.scss new file mode 100644 index 000000000..4a5c75b16 --- /dev/null +++ b/src/military/qz2022/chat/index.scss @@ -0,0 +1,62 @@ +.chat { + margin: 9rem 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%; + } +} diff --git a/src/military/qz2022/management/index.jsx b/src/military/qz2022/management/index.jsx index b5fb405d8..7743250ae 100644 --- a/src/military/qz2022/management/index.jsx +++ b/src/military/qz2022/management/index.jsx @@ -107,7 +107,7 @@ function Introduce({history:{location:{pathname}},qzDetail }) { title: '作品', dataIndex: 'attachments', render:(text, record)=>{ - return {text[0].title}; + return {text && text[0].title}; } }, ]; @@ -200,12 +200,12 @@ function Introduce({history:{location:{pathname}},qzDetail }) { 赛区: 赛项: diff --git a/src/military/qz2022/management/index.scss b/src/military/qz2022/management/index.scss index 7a6f604ed..d0f8e119a 100644 --- a/src/military/qz2022/management/index.scss +++ b/src/military/qz2022/management/index.scss @@ -38,4 +38,10 @@ .attachments_a{ color: #2e5bfe; } + .qzManageTable .ant-table-tbody > tr > td{ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100px; + } } diff --git a/src/military/qz2022/refer/Upload.jsx b/src/military/qz2022/refer/Upload.jsx deleted file mode 100644 index 8722e0544..000000000 --- a/src/military/qz2022/refer/Upload.jsx +++ /dev/null @@ -1,94 +0,0 @@ -import React, { useEffect, useState } from "react"; -import { Upload, Button } from 'antd'; -import { appendFileSizeToUploadFileAll } from 'educoder'; -import { httpUrl } from '../fetch'; - -function Uploads({ className, size, actionUrl, fileList, showNotification, load, accept, disabled,count }) { - const [files, setFiles] = useState(undefined); - - useEffect(() => { - if (fileList) { - init(); - } - }, [fileList]); - - function init() { - let f = appendFileSizeToUploadFileAll(fileList); - setFiles(f); - } - function onAttachmentRemove(file) { - if (!file.percent || file.percent === 100) { - deleteAttachment(file); - return false; - } - } - function deleteAttachment(file) { - let id = (file.response && file.response.data && file.response.data.id) || file.id; - - // 暂时不直接删除上传的文件,只在最后保存的时候进行修改 - let nf = files.filter(item => { - let itemId = (item.response && item.response.data && item.response.data.id) || item.id; - return itemId !== id; - }); - setFiles(nf); - backFiles(nf); - } - - function backFiles(fileList) { - let filesId = []; - for (const item of fileList) { - if (item) { - let itemId = (item.response && item.response.data && item.response.data.id) || item.id; - itemId && filesId.push(itemId); - } - } - load && load(fileList, filesId.join()); - } - - - function handleChange(info) { - if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - let fileList = info.fileList; - if(count){ - fileList = fileList.slice(-count); - } - setFiles(appendFileSizeToUploadFileAll(fileList)); - if (info.file.response) { - for (let i = 0; i < fileList.length; i++) { - if (fileList[i].response && !fileList[i].response.data) { - fileList.splice(i, 1); - } - } - backFiles(fileList); - if (!info.file.response.data) { - info.file.response && showNotification(info.file.response.message) - } - } - } - } - - function beforeUpload(file) { - const isLt100M = file.size / 1024 / 1024 < size; - if (!isLt100M) { - showNotification(`文件大小必须小于${size}MB!`); - } - return isLt100M; - } - - const upload = { - name: 'file', - fileList: files, - disabled: disabled, - action: (httpUrl || actionUrl) + `/busiAttachments/upload`, - onChange: handleChange, - onRemove: onAttachmentRemove, - beforeUpload: beforeUpload, - }; - return ( - - - (你可以上传小于{size}MB的文件) - - ) -} -export default Uploads; \ No newline at end of file diff --git a/src/military/qz2022/refer/index.jsx b/src/military/qz2022/refer/index.jsx index 3c107b502..b16812589 100644 --- a/src/military/qz2022/refer/index.jsx +++ b/src/military/qz2022/refer/index.jsx @@ -49,11 +49,15 @@ function Introduce({ form, showNotification, match, history, enrollStatus }) { // 进行文件大小检查 function beforeUpload(file){ - const isLt100M = file.size / 1024 / 1024 < 256; + 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(`文件大小必须小于${256}MB!`); } - return isLt100M; + return isLt100M && isZip; } // 作品提交 @@ -72,7 +76,7 @@ function Introduce({ form, showNotification, match, history, enrollStatus }) { } } return ( -
    +
    + downloadIcon: , + showRemoveIcon: false }} > diff --git a/src/military/qz2022/refer/index.scss b/src/military/qz2022/refer/index.scss index b413e0855..889743e1a 100644 --- a/src/military/qz2022/refer/index.scss +++ b/src/military/qz2022/refer/index.scss @@ -6,6 +6,7 @@ align-items: center; flex-direction: column; padding: 66px 0 86px; + margin-top: 50px; .refer_img{ width: 48px; } @@ -43,4 +44,8 @@ } } .ant-upload-list-item:hover .ant-upload-list-item-info{background: none;} + .ant-upload-list-item{ + text-overflow: ellipsis; + max-width: 46vw; + } } \ No newline at end of file