forked from Gitlink/forgeplus-react
完整流程联调
This commit is contained in:
parent
85d81c2553
commit
ed18f7afcf
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 2340181 */
|
||||
src: url('iconfont.woff2?t=1652687271594') format('woff2'),
|
||||
url('iconfont.woff?t=1652687271594') format('woff'),
|
||||
url('iconfont.ttf?t=1652687271594') format('truetype');
|
||||
src: url('iconfont.woff2?t=1652870557319') format('woff2'),
|
||||
url('iconfont.woff?t=1652870557319') format('woff'),
|
||||
url('iconfont.ttf?t=1652870557319') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
@ -13,6 +13,10 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-bangzhuzhongxinicon1:before {
|
||||
content: "\e935";
|
||||
}
|
||||
|
||||
.icon-ketixiangqingicon:before {
|
||||
content: "\e92b";
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,13 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "29811507",
|
||||
"name": "帮助中心icon",
|
||||
"font_class": "bangzhuzhongxinicon1",
|
||||
"unicode": "e935",
|
||||
"unicode_decimal": 59701
|
||||
},
|
||||
{
|
||||
"icon_id": "29701613",
|
||||
"name": "课题详情icon",
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -130,7 +130,7 @@
|
|||
min-width: 62.5vw;
|
||||
max-width: 98vw;
|
||||
margin: 0 auto;
|
||||
padding-top: 45px;
|
||||
padding-top: 65px;
|
||||
}
|
||||
|
||||
// 1行省略号
|
||||
|
|
|
@ -25,6 +25,8 @@ import log65 from '../../img/65@2x.png';
|
|||
import log67 from '../../img/67@2x.png';
|
||||
import log69 from '../../img/69@2x.png';
|
||||
import log70 from '../../img/浙江大学.png';
|
||||
import logo1 from '../../img/logo1.png';
|
||||
import logo2 from '../../img/logo2.png';
|
||||
function Partner() {
|
||||
|
||||
return (
|
||||
|
@ -149,6 +151,8 @@ function Partner() {
|
|||
<div onClick={()=>{window.open("https://www.ecnu.edu.cn/")}}><img src={log65} className='gitlink' alt='华东师范大学'/></div>
|
||||
<div onClick={()=>{window.open("http://www.csust.edu.cn/")}}><img src={log67} className='gitlink' alt='长沙理工大学'/></div>
|
||||
<div onClick={()=>{window.open("https://www.jnu.edu.cn/")}}><img src={log50} className='gitlink' alt='暨南大学'/></div>
|
||||
<div onClick={()=>{window.open("https://www.shu.edu.cn/")}}><img src={logo2} className='gitlink' alt='上海大学'/></div>
|
||||
<div onClick={()=>{window.open("https://www.bnu.edu.cn/")}}><img src={logo1} className='gitlink' alt='北京师范大学'/></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 129 KiB |
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
After Width: | Height: | Size: 410 KiB |
|
@ -1,4 +1,5 @@
|
|||
.glccHelp{
|
||||
.-task-sidebar .glccHelp{
|
||||
height: auto;
|
||||
width: 48px;
|
||||
padding: 6px 16px;
|
||||
text-align: center;
|
||||
|
@ -7,13 +8,39 @@
|
|||
border-radius:2px;
|
||||
box-shadow:0px 0px 8px rgba(55, 148, 255, 0.16);
|
||||
color:#1e1e1e;
|
||||
font-size: 14px;
|
||||
line-height: 35px;
|
||||
word-break: break-word;
|
||||
cursor: pointer;
|
||||
.icon-bangzhuzhongxinicon{
|
||||
.icon-bangzhuzhongxinicon, .icon-bangzhuzhongxinicon1{
|
||||
color: #0654D6;
|
||||
margin-left: -3px;}
|
||||
&:hover{
|
||||
color:#ffffff;
|
||||
background-color:#466aff;
|
||||
.icon-bangzhuzhongxinicon{color:#ffffff}
|
||||
.icon-bangzhuzhongxinicon, .icon-bangzhuzhongxinicon1{color:#ffffff}
|
||||
}
|
||||
}
|
||||
.qqChatBox .ant-popover-arrow{display: none;}
|
||||
.qqChat{
|
||||
margin: -12px -16px;
|
||||
background-image:linear-gradient(180deg,#f8faff 0%,#dee7ff 100%);
|
||||
border:1px solid #ffffff;
|
||||
border-radius:4px;
|
||||
box-shadow:0px 0px 6px rgba(121, 154, 245, 0.27);
|
||||
padding: 25px 40px;
|
||||
text-align: center;
|
||||
.qqMa{
|
||||
padding: 8px;
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
background-image:radial-gradient(ellipse 50% 50% at 50% 50% ,rgba(255, 255, 255, 0) 0%,rgba(239, 243, 251, 0) 100%);
|
||||
box-shadow:0px 0px 6px #aecaff inset;
|
||||
img{width: 120px;}
|
||||
}
|
||||
.qqTip{
|
||||
color:#5769a5;
|
||||
font-size:14px;
|
||||
line-height:24px;
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@ export default ({ detail, projectId, applyTaskId }) => {
|
|||
},[detail])
|
||||
|
||||
// detail && (detail.registrationTaskList = [{
|
||||
// id: 1,
|
||||
// taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊',
|
||||
// tutorName: 'daoshi',
|
||||
// tutorMail: 'email',
|
||||
|
@ -26,6 +27,7 @@ export default ({ detail, projectId, applyTaskId }) => {
|
|||
// taskUrl: 'url',
|
||||
// taskReward: '9000'
|
||||
// },{
|
||||
// id: 2,
|
||||
// taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊',
|
||||
// tutorName: 'daoshi',
|
||||
// tutorMail: 'email',
|
||||
|
@ -51,7 +53,7 @@ export default ({ detail, projectId, applyTaskId }) => {
|
|||
<div className="center">
|
||||
<div className="taskDesc">{item.taskDesc}</div>
|
||||
<div className="taskUrl">课题链接: <span>{item.taskUrl}</span></div>
|
||||
<div>{applyTaskId && applyTaskId.includes(item.id) ? <Button onClick={()=>{window.location.href="/glcc/student/apply"}}>报名详情</Button> : <Button type='primary' className='applyBut' onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}>申请课题</Button>}</div>
|
||||
<div>{applyTaskId && item.id && Object.keys(applyTaskId).includes(item.id.toString()) ? <Button onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}>报名详情</Button> : <Button type='primary' className='applyBut' onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}>申请课题</Button>}</div>
|
||||
</div>
|
||||
<div className="right">¥ {item.taskReward}</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import { Spin } from 'antd';
|
||||
import { Route, Switch } from "react-router-dom";
|
||||
import banner from "../img/banner.png";
|
||||
import banner from "../img/studentProject.png";
|
||||
import './index.scss';
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../../Loading";
|
||||
|
@ -24,7 +24,7 @@ function Project(propsF) {
|
|||
const {pathname} = location;
|
||||
|
||||
// 用户已报名课题id数组
|
||||
const [applyTaskId, setApplyTaskId] = useState([]);
|
||||
const [applyTaskId, setApplyTaskId] = useState({});
|
||||
// 刷新用户课题报名信息
|
||||
const [studentInfoReset, setStudentInfoReset] = useState(undefined);
|
||||
|
||||
|
@ -33,15 +33,14 @@ function Project(propsF) {
|
|||
getStudentApplyInfo({userId: current_user && current_user.user_id}).then(response=>{
|
||||
if(response && response.message === "success"){
|
||||
// setData(response.data.rows);
|
||||
const data = new Set();
|
||||
const data = {};
|
||||
response.data && response.data.registrationStudentTaskList.map(item=>{
|
||||
data.add(item.taskId);
|
||||
data[item.taskId] = item.id;
|
||||
})
|
||||
setApplyTaskId(Array.from(data));
|
||||
setApplyTaskId(data);
|
||||
}
|
||||
})
|
||||
},[studentInfoReset])
|
||||
|
||||
return(
|
||||
<div className="glcc_project">
|
||||
<img className="glcc-banner" src={banner} alt=''></img>
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
.center{
|
||||
width: 60%;
|
||||
}
|
||||
.right{padding-right: 0px;}
|
||||
.right{padding-right: 10px;}
|
||||
}
|
||||
}
|
||||
&.nodata{width: 200px;}
|
||||
|
|
|
@ -32,7 +32,7 @@ function ProjectList({applyTaskId}) {
|
|||
<div className='projectListBox'>
|
||||
{data && data.map((item, index)=>{
|
||||
return <Popover placement= {(index+1)%3 === 0 ? 'bottomRight' : (index+1)%3%2 === 0 ? 'bottom' : 'bottomLeft'} content={<ProjectDetail detail={item} applyTaskId={applyTaskId}/>} trigger='click' overlayClassName='projectItemPopover'>
|
||||
<div className='projectItem'>
|
||||
<div className={`projectItem ${(index+1)%3 === 0 || (index+1)%3%2 === 0 ? '' : 'firstBox'}`}>
|
||||
<div className="border"></div>
|
||||
<div className="projectLogo"><img src={`${main_site_url}/api/attachments/${item.projectLogoId}`} alt=''/></div>
|
||||
<div className="title">{item.projectName}</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
.projectListBox{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
// justify-content: space-between;
|
||||
.projectItem{
|
||||
width: 30%;
|
||||
background-image: linear-gradient(180deg,rgba(232, 237, 255, 0.85) 0%,rgba(255, 255, 255, 0.85) 100%);
|
||||
|
@ -25,6 +25,10 @@
|
|||
margin-bottom: 50px;
|
||||
background-image: url('../../img/projectBg.png');
|
||||
background-size: 100% 100%;
|
||||
margin-left: 5%;
|
||||
&.firstBox{
|
||||
margin-left: 0;
|
||||
}
|
||||
&:hover{
|
||||
cursor: pointer;
|
||||
background-image: none;
|
||||
|
|
|
@ -12,21 +12,25 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
|
|||
// 输入搜索框
|
||||
const [keyword, setKeyword] = useState(undefined);
|
||||
const [data, setData] = useState([]);
|
||||
// table
|
||||
const [current, setCurrent] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [pageSize, setPageSize] = useState(20);
|
||||
|
||||
const columns = [
|
||||
{ title: '序号', dataIndex: 'index', align: 'center', render: (text, item, index) => index + 1 },
|
||||
{ title: '课题名称', dataIndex: 'taskName', width: '28%', render: (text) => <Tooltip title={text}>{text}</Tooltip> },
|
||||
{ title: '项目名称', dataIndex: 'tutorName', width: '28%', render: (text) => <Tooltip title={text}>{text}</Tooltip> },
|
||||
{ title: '课题奖金', dataIndex: 'taskReward', render: (text) => <span>¥ {text}</span> },
|
||||
{ title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", render: (text, item, index) => index + 1 },
|
||||
{ title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns", width: '28%', render: (text) => <Tooltip title={text}>{text}</Tooltip> },
|
||||
{ title: '项目名称', dataIndex: 'tutorName', className:"taskTableColumns", width: '28%', render: (text) => <Tooltip title={text}>{text}</Tooltip> },
|
||||
{ title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", render: (text) => <span>¥ {text}</span> },
|
||||
{
|
||||
title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns", render: ((text, item, index) => {
|
||||
title: '操作', dataIndex: 'action', align: 'center', className:"actionColumns taskTableColumns", render: ((text, item, index) => {
|
||||
return (
|
||||
<div className='actionBox'>
|
||||
{applyTaskId && applyTaskId.includes(item.id) ? <Fragment>
|
||||
<span onClick={()=>{window.location.href=`/glcc/student/apply`}}><i className='iconfont icon-baomingxiangqingicon mr10'></i>报名详情</span>
|
||||
<Tooltip title={"取消申请"}><i className='iconfont icon-shanchuicon3 ml10 cancelApply' onClick={()=>{setDeleteTaskId(item.id);setVisible(true)}}></i></Tooltip>
|
||||
{applyTaskId && Object.keys(applyTaskId).includes(item.id.toString()) ? <Fragment>
|
||||
<span onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}><i className='iconfont icon-baomingxiangqingicon mr5'></i>报名详情</span>
|
||||
<Tooltip title={"取消申请"}><i className='iconfont icon-shanchuicon3 ml20 cancelApply' onClick={()=>{setDeleteTaskId(item.id);setVisible(true)}}></i></Tooltip>
|
||||
</Fragment>:<Fragment>
|
||||
<span onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}><i className='iconfont icon-shenqingketiicon applyTask'></i><span className='applyTask' onClick={()=>{applyTask(item.id)}}>申请课题</span></span></Fragment>}
|
||||
<span onClick={()=>{window.location.href=`/glcc/student/apply/${item.id}`}}><i className='iconfont icon-shenqingketiicon applyTask mr5'></i><span className='applyTask' onClick={()=>{applyTask(item.id)}}>申请课题</span></span></Fragment>}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
|
@ -37,29 +41,16 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
|
|||
if (props.expanded) {
|
||||
return <a className='actionBox' style={{marginRight: 8 }} onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}><i className='iconfont icon-ketixiangqingicon mr5'></i>课题详情<i className="iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-12 ml5"></i></a>
|
||||
}}><i className='iconfont icon-ketixiangqingicon mr5'></i>项目详情<i className="iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-12 ml5 down"></i></a>
|
||||
} else {
|
||||
return <a className='actionBox' style={{marginRight: 8 }} onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}><i className='iconfont icon-ketixiangqingicon mr5'></i>课题详情<i className="iconfont icon-jiantou9 font-12 ml5"></i></a>
|
||||
}}><i className='iconfont icon-ketixiangqingicon mr5'></i>项目详情<i className="iconfont icon-jiantou9 font-12 ml5 down"></i></a>
|
||||
}
|
||||
// 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>
|
||||
// }
|
||||
}
|
||||
|
||||
const expandRow = (record) => {
|
||||
return <ProjectDetail detail={null} projectId={record.regId}/>
|
||||
return <ProjectDetail detail={null} projectId={record.regId} applyTaskId={applyTaskId}/>
|
||||
}
|
||||
|
||||
// 申请课题按钮点击函数
|
||||
|
@ -75,7 +66,12 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
|
|||
|
||||
// 取消课题按钮点击函数
|
||||
function cancelApply(){
|
||||
cancelTaskApply({ids: Array.from(deleteTaskId.toString())}).then(response=>{
|
||||
const id = [];
|
||||
id.push(applyTaskId[deleteTaskId]);
|
||||
const params = {
|
||||
ids: id
|
||||
}
|
||||
cancelTaskApply(params).then(response=>{
|
||||
if(response && response.message === "success"){
|
||||
setVisible(false);
|
||||
setStudentInfoReset(Math.random());
|
||||
|
@ -84,18 +80,29 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
|
|||
})
|
||||
}
|
||||
|
||||
// 改变pagesize
|
||||
function onShowSizeChange(current, pageSize){
|
||||
setPageSize(pageSize);
|
||||
}
|
||||
|
||||
// 切换页数
|
||||
function changePage(page, pageSize){
|
||||
setCurrent(page);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
curPage: 1,
|
||||
curPage: current,
|
||||
keyword,
|
||||
pageSize: 20
|
||||
pageSize
|
||||
}
|
||||
taskList(params).then(response => {
|
||||
if (response && response.message === "success") {
|
||||
setData(response.data.rows);
|
||||
setTotal(response.data.total)
|
||||
}
|
||||
})
|
||||
}, [keyword])
|
||||
}, [keyword, current, pageSize])
|
||||
|
||||
return (
|
||||
<div className="taskList listBox">
|
||||
|
@ -108,6 +115,7 @@ function TaskList({applyTaskId, setStudentInfoReset}) {
|
|||
expandIconColumnIndex={4}
|
||||
expandIconAsCell={false}
|
||||
expandIcon={customExpandIcon}
|
||||
pagination={{pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}}
|
||||
/>
|
||||
</div>
|
||||
<Modal
|
||||
|
|
|
@ -1,9 +1,17 @@
|
|||
.taskList{
|
||||
padding-bottom: 50px;
|
||||
.ant-table{
|
||||
border: 1px solid white;
|
||||
}
|
||||
}
|
||||
.actionBox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #466aff;
|
||||
cursor: pointer;
|
||||
.iconfont{margin: 0 10px 0 14px;}
|
||||
&:hover{color:#5d7cff !important;}
|
||||
&:active{color:#1140ff !important;}
|
||||
.iconfont:not(.down):not(.cancelApply){margin-left: 8px;}
|
||||
.applyTask{color:#eb9350;}
|
||||
.cancelApply{visibility: hidden;}
|
||||
}
|
||||
|
@ -11,6 +19,12 @@ tr:hover .actionBox .cancelApply{
|
|||
visibility: visible;
|
||||
color: #E31E1E;
|
||||
}
|
||||
.ant-table-thead > tr > .taskTableColumns, .ant-table-tbody > tr > .taskTableColumns{
|
||||
background-color:#F1F6FF;
|
||||
}
|
||||
.ant-table-tbody > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected) > .taskTableColumns{
|
||||
background-color:#fbfbfc;
|
||||
}
|
||||
.ant-table-tbody .actionColumns{
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
@ -1,12 +1,30 @@
|
|||
import React from 'react';
|
||||
import { Popover } from 'antd';
|
||||
import qqChat from "./img/qqChat.png";
|
||||
import './index.scss';
|
||||
|
||||
function SiderBar() {
|
||||
const content = (
|
||||
<div className='qqChat'>
|
||||
<div className='qqMa'><img src={qqChat} alt=''/></div>
|
||||
<p className='qqTip'>扫码进入QQ交流群</p>
|
||||
<p className='qqTip'>把握最新活动资讯</p>
|
||||
</div>
|
||||
)
|
||||
|
||||
return (
|
||||
// 开源夏令营定制帮助中心调整按钮
|
||||
<div className={"glccHelp -task-sidebar"} onClick={()=>window.open("/glcc/help")}>
|
||||
<i className='iconfont icon-bangzhuzhongxinicon font-20'></i>
|
||||
帮助中心
|
||||
<div className={"-task-sidebar"}>
|
||||
<Popover placement='leftBottom' content={content} title={null} forceRender={true} overlayClassName='qqChatBox'>
|
||||
<div className={"glccHelp"}>
|
||||
<i className='iconfont icon-bangzhuzhongxinicon1 font-20'></i>
|
||||
QQ交流
|
||||
</div>
|
||||
</Popover>
|
||||
<div className={"glccHelp"} onClick={()=>window.open("/glcc/help")}>
|
||||
<i className='iconfont icon-bangzhuzhongxinicon font-20'></i>
|
||||
帮助中心
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ function Apply(props) {
|
|||
resove();
|
||||
return taskListNew
|
||||
});
|
||||
}).then(res => setFieldsValue({ 'taskId0': taskId }))
|
||||
}).then(res => setFieldsValue({ 'taskId1': taskId }))
|
||||
} else {
|
||||
taskListNew.push({ ...initTask, taskId: '' });
|
||||
setMyTaskList(taskListNew);
|
||||
|
|
Loading…
Reference in New Issue