diff --git a/src/glcc/project/component/projectDetail.jsx b/src/glcc/project/component/projectDetail.jsx index 70be8b80..fe4b9ad9 100644 --- a/src/glcc/project/component/projectDetail.jsx +++ b/src/glcc/project/component/projectDetail.jsx @@ -34,23 +34,6 @@ export default ({ detail, projectId, applyTaskId, current_user, showLoginDialog, } },[detail]) - // detail && (detail.registrationTaskList = [{ - // id: 1, - // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', - // tutorName: 'daoshi', - // tutorMail: 'email', - // taskDesc: 'sfdjhdf,hsldf', - // taskUrl: 'url', - // taskReward: '9000' - // },{ - // id: 2, - // taskName: 'aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', - // tutorName: 'daoshi', - // tutorMail: 'email', - // taskDesc: 'sfdjhdf,hsldfaaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊aaaa啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊啊啊', - // taskUrl: 'url', - // taskReward: '9000' - // }]) return ( info ?
diff --git a/src/glcc/project/index.jsx b/src/glcc/project/index.jsx index a5d558ec..88dc555b 100644 --- a/src/glcc/project/index.jsx +++ b/src/glcc/project/index.jsx @@ -49,7 +49,7 @@ function Project(propsF) {
- 课题列表 + 课题列表 项目列表
diff --git a/src/glcc/project/index.scss b/src/glcc/project/index.scss index 9da1a995..4bf7bd27 100644 --- a/src/glcc/project/index.scss +++ b/src/glcc/project/index.scss @@ -176,7 +176,15 @@ padding: 30px 30px 50px; } } -.lookDetail:hover, .lookDetail:focus{ +.lookDetail{ border-color: #466aff; color: #466aff; + &:hover{ + border-color: #5d7cff; + color: #5d7cff; + } + &:focus{ + border-color: #1140ff; + color: #1140ff; + } } \ No newline at end of file diff --git a/src/glcc/project/taskList/index.jsx b/src/glcc/project/taskList/index.jsx index df178029..999f00be 100644 --- a/src/glcc/project/taskList/index.jsx +++ b/src/glcc/project/taskList/index.jsx @@ -17,9 +17,10 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial const [total, setTotal] = useState(0); const [pageSize, setPageSize] = useState(20); const [loading, setLoading] = useState(false); + const [expandedRowKeys, setExpandedRowKeys] = useState([]); const columns = [ - { title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => index + 1 }, + { title: '序号', dataIndex: 'index', align: 'center', className:"taskTableColumns", width: '6%', render: (text, item, index) => {(current-1)*pageSize+index + 1} }, { title: '课题名称', dataIndex: 'taskName', className:"taskTableColumns taskName", width: '28%', ellipsis: true, render: (text, item) => {window.location.href=item.taskUrl}}>{text} }, { title: '项目名称', dataIndex: 'projectName', className:"taskTableColumns", width: '28%', ellipsis: true, render: (text) => {text} }, { title: '课题奖金', dataIndex: 'taskReward', className:"taskTableColumns", width: `${isStudentApplyDate || studentApplyEnd ? '15%' : ''}`, render: (text) => ¥ {text} }, @@ -54,6 +55,17 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial return } + // 展开收起行回调 + function onExpand(expanded, record){ + const keys = new Set(expandedRowKeys); + if(expanded){ + keys.add(record.id); + }else{ + keys.delete(record.id); + } + setExpandedRowKeys(Array.from(keys)); + } + // 申请课题按钮点击函数 function applyTask(id){ // 判断用户是否已经登录 @@ -88,6 +100,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial // 改变pagesize function onShowSizeChange(current, pageSize){ + setCurrent(1); setPageSize(pageSize); } @@ -104,6 +117,7 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial } useEffect(() => { + setExpandedRowKeys([]); setLoading(true); const params = { curPage: current, @@ -137,7 +151,10 @@ function TaskList({applyTaskId, setStudentInfoReset, current_user, showLoginDial expandIconColumnIndex={4} expandIconAsCell={false} expandIcon={customExpandIcon} - pagination={{pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} + rowKey={'id'} + expandedRowKeys={expandedRowKeys} + onExpand={onExpand} + pagination={{current: current, pageSize: pageSize, total: total, showSizeChanger: true, onShowSizeChange:onShowSizeChange, showQuickJumper: true, onChange: changePage}} />