From 70e3b2287347a7be52738ae8de70412f5529df9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com>
Date: Mon, 27 Jun 2022 20:25:12 +0800
Subject: [PATCH] issue
---
src/glcc/check/index.jsx | 23 ++++++++++++++++++-----
src/glcc/check/index.scss | 8 ++++++++
src/glcc/home/index.jsx | 4 ++--
src/glcc/home/index.scss | 1 +
4 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/src/glcc/check/index.jsx b/src/glcc/check/index.jsx
index c62891dd..cf5388ab 100644
--- a/src/glcc/check/index.jsx
+++ b/src/glcc/check/index.jsx
@@ -1,5 +1,5 @@
-import React, { Fragment, useEffect, useState } from 'react';
-import { Checkbox, Input, message, Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd';
+import React, { useEffect, useState } from 'react';
+import { Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd';
import { Link } from 'react-router-dom';
import moment from 'moment';
import './index.scss';
@@ -130,9 +130,9 @@ function Check({ current_user, showNotification, history }) {
return (
{/* 学生已入选并且锁定 */}
- {text && record.locked && }
+ {text && record.locked && }
{/* 学生已经被其他导师锁定 */}
- {!text && record.locked && }
+ {!text && record.locked && }
{/* 学生未被锁定 */}
{!record.locked && (text ? :
)}
@@ -182,6 +182,12 @@ function Check({ current_user, showNotification, history }) {
})
}
+ // 数组元素置顶方法
+ function toFirst(data, index){
+ if(index != 0){
+ data.unshift(data.splice(index,1)[0]);
+ }
+ }
const customExpandIcon = (props) => {
if (props.expanded) {
@@ -264,7 +270,14 @@ function Check({ current_user, showNotification, history }) {
}
taskId && getStudentList(params).then(res => {
if (res.data && Array.isArray(res.data.rows)) {
- setData(res.data.rows);
+ const data = res.data.rows;
+ // 已入选数据置顶
+ data.map((item, index)=>{
+ if(item.passStatus && item.locked){
+ toFirst(data, index);
+ }
+ })
+ setData(data);
let isPass = res.data.rows.some((item) => { return item.passStatus });
setHavePass(isPass);
}
diff --git a/src/glcc/check/index.scss b/src/glcc/check/index.scss
index e3dfee7f..8f12dc29 100644
--- a/src/glcc/check/index.scss
+++ b/src/glcc/check/index.scss
@@ -178,6 +178,14 @@
}
}
}
+ .redColBor .ant-btn-primary[disabled]{
+ border-color: #e44141;
+ span{color: #e44141;}
+ }
+ .greenColBor .ant-btn-primary[disabled]{
+ border-color: rgb(40, 190, 108);
+ span{color: rgb(40, 190, 108);}
+ }
}
tr:hover .actionColumns .cancelApply {
visibility: visible;
diff --git a/src/glcc/home/index.jsx b/src/glcc/home/index.jsx
index 8f9972a8..a8b3e831 100644
--- a/src/glcc/home/index.jsx
+++ b/src/glcc/home/index.jsx
@@ -84,7 +84,7 @@ export default (props) => {
查看项目
{/* 项目报名已截止 */}
- 查看夏令营各项目,掌握项目课题详细信息
+ 掌握项目课题详细信息
{/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */}
@@ -92,7 +92,7 @@ export default (props) => {
学生报名
- 选择感兴趣的课题,开启您的开源之旅
+ 选择课题,开启您的开源之旅
{/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
{((resultTime1 && hasRole) || resultTime2) &&
diff --git a/src/glcc/home/index.scss b/src/glcc/home/index.scss
index a23775ab..2734a0f7 100644
--- a/src/glcc/home/index.scss
+++ b/src/glcc/home/index.scss
@@ -24,6 +24,7 @@
}
.applyBox {
+ width: 1200px;
position: absolute;
top: 21vw;
left: 17.5vw;