Merge branch 'expert_review' of https://code.gitlink.org.cn/durian/forgeplus-react into dev_military_osredm

This commit is contained in:
何童崇 2022-01-19 10:17:38 +08:00
commit 2cec3f6ab4
7 changed files with 50 additions and 33 deletions

View File

@ -1,5 +1,5 @@
import React, { useState, useMemo, useEffect } from "react";
import { Input, Select, Button, Form, DatePicker, Table, Pagination, Upload, Modal } from 'antd';
import { Input, Select, Button, Form, Table, Upload, Modal } from 'antd';
import cookie from 'react-cookies';
import { exportExcel } from '../components/exportExcel.js';
import Paginationtable from "../../components/paginationTable";
@ -24,8 +24,6 @@ function RegisterList({ showNotification }) {
const [searchInput, setSearchInput] = useState('');
const [searchReviewArea, setSearchReviewArea] = useState('');
const [expertType, setExpertType] = useState('')
const [uploadExpertList, setUploadExpertList] = useState([]);
const [uploadExpertIds, setUploadExpertIds] = useState([]);
const [dataAll, setDataAll] = useState([]);
const [download, setDownload] = useState();
const [downloading, setDownloading] = useState(false);
@ -36,7 +34,6 @@ function RegisterList({ showNotification }) {
setPageSize(pageSize);
}
console.log(pageSize);
const columns = useMemo(() => {
return [{
title: '姓名',
@ -199,7 +196,6 @@ function RegisterList({ showNotification }) {
//
useEffect(() => {
console.log('searchReviewArea', searchReviewArea);
setLoading(true);
let params = {
searchInput,
@ -282,7 +278,7 @@ function RegisterList({ showNotification }) {
onChange: handleChange,
beforeUpload: beforeUpload,
accept: ".xlsx,.xls",
showUploadList: false,
showUploadList: true,
withCredentials: true,
headers: {
Authorization: cookie.load('autologin_forge_military') || sessionStorage.osredmToken,
@ -362,6 +358,7 @@ function RegisterList({ showNotification }) {
onCancel={() => { setVisible(false) }}
className="upload-modal"
footer={<Button onClick={() => { setVisible(false) }}>取消</Button>}
key={Math.random()}
>
<Upload
{...upload}

View File

@ -43,4 +43,10 @@
.hint{
color: #df0002;
}
.link{
color: #4154f1;
&:hover{
opacity: 0.8;
}
}
}

View File

@ -68,25 +68,25 @@
.expert_modal .ant-modal-content {
width: 550px;
height: 318px;
& .ant-modal-header {
.ant-modal-header {
padding: 0.6em 2.1em;
background: #f2f2ff;
& .ant-modal-title {
.ant-modal-title {
text-align: left;
}
}
& .ant-modal-body {
.ant-modal-body {
padding-left: 120px;
& p {
p {
font-size: 16px;
color: #666666;
font-family: PingFangSC-Regular, PingFang SC;
line-height: 2.9em;
}
& .weight_bold {
.weight_bold {
font-weight: bold;
}
& .warning::before {
.warning::before {
content: url("./image/warning.svg");
width: 32px;
position: relative;
@ -94,7 +94,7 @@
left: -15px;
}
}
& .ant-btn {
.ant-btn {
padding: 0 1.3em;
height: 2.55em;
border-radius: 4px;
@ -111,7 +111,7 @@
border: 1px solid #e3e7ed;
}
}
& .ant-btn.ant-btn-primary {
.ant-btn.ant-btn-primary {
color: white;
background-color: #4154f1;
margin-left: 2.5em;
@ -122,7 +122,7 @@
background-color: #374bf2;
}
}
& .ant-modal-footer {
.ant-modal-footer {
margin-top: 15px;
}
}

View File

@ -1,16 +1,16 @@
.expert_review_system{
height: 500px;
font-size: 20px;
& .center_flex{
.center_flex{
display: flex;
align-items: center;
justify-content: center;
}
& .navigation{
.navigation{
font-size: 0.6em;
margin: -35px 0 15px;
}
& .notExpert{
.notExpert{
height: 80%;
flex-direction: column;
background: #FAFCFF;
@ -19,21 +19,21 @@
&>img{
width: 5.5vw;
}
& .ne_title{
.ne_title{
font-size: 1em;
font-weight: bold;
color: #181818;
}
& .ne_tips{
.ne_tips{
font-size: 0.75em;
color: #595959;
}
& .ne_bar{
.ne_bar{
width: 30vw;
border-top: 1px solid #EEEEEE;
margin: 50px 0 30px !important;
}
& .but41_fill{
.but41_fill{
font-size: 0.7em;
}
}

View File

@ -2,11 +2,12 @@ import React, { useState, useEffect } from "react";
import { Modal } from 'antd';
import Paginationtable from "../../../components/paginationTable";
import { getOpsScoringDetails, getRules } from "../../api";
import sucess from '../image/sucess.svg';
import './index.scss';
import '../../index.scss';
function GradesModal({ setVisible, visible, opsId, opsType, taskId }) {
function GradesModal({ setVisible, visible, taskId, opsDetail }) {
// table
const [loading, setLoading] = useState(false);
const [dataList, setDataList] = useState([]);
@ -106,8 +107,8 @@ function GradesModal({ setVisible, visible, opsId, opsType, taskId }) {
useEffect(() => {
setLoading(true);
let params = {
opsId,
opsType,
opsId: opsDetail && opsDetail.opsId,
opsType: opsDetail && opsDetail.opsType,
orderBy: '',
containerId: taskId,
containerType: 1,
@ -123,13 +124,13 @@ function GradesModal({ setVisible, visible, opsId, opsType, taskId }) {
setRules(response.data);
}
});
opsId && getOpsScoringDetails(params).then(res => {
opsDetail && opsDetail.opsId && getOpsScoringDetails(params).then(res => {
if (res.data && res.data.length) {
setDataList(res.data);
setLoading(false);
}
});
}, [opsId, opsType]);
}, [opsDetail]);
return (
@ -142,6 +143,12 @@ function GradesModal({ setVisible, visible, opsId, opsType, taskId }) {
width={1050}
wrapClassName="task_review_detail"
>
<div className="opsDetail">
综合排名: {opsDetail && opsDetail.id}
<span className="ml20">应征者: </span> {opsDetail && (opsDetail.applicantInfo.nickname == null ? opsDetail.applicantInfo.login : opsDetail.applicantInfo.nickname)}
<span className="ml20">平均得分: </span> {opsDetail && opsDetail.finalGrades}
<span className="ml20">是否胜出: </span> {opsDetail && opsDetail.isWin ? <div className="sucess df"><img src={sucess}/>胜出</div> : '未胜出'}
</div>
<Paginationtable
loading={loading}
dataSource={dataList}

View File

@ -84,4 +84,14 @@
}
.task_review_detail .pagination-table .ant-table-thead tr th div {
font-weight: bold;
}
.opsDetail{
display: flex;
margin-bottom: 15px;
color: #333;
.sucess{
color: #fd7700;
justify-content: center;
img{width: 20px;}
}
}

View File

@ -21,8 +21,7 @@ function ReviewResult({ history, match }) {
const [goNum, setGoNum] = useState(-1);
//
const [opsId, setOpsId] = useState();
const [opsType, setOpsType] = useState();
const [opsDetail, setOpsDetail] = useState(undefined);
const [visible, setVisible] = useState(false);
const columns = [
@ -89,8 +88,7 @@ function ReviewResult({ history, match }) {
},[status])
function detail(item){
setOpsId(item.opsId);
setOpsType(item.opsType);
setOpsDetail(item);
setVisible(true);
}
@ -181,9 +179,8 @@ function ReviewResult({ history, match }) {
<GradesModal
visible={visible}
setVisible={setVisible}
opsId={opsId}
opsType={opsType}
taskId={taskId}
opsDetail={opsDetail}
/>
</div>
)