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}}
/>