forked from Gitlink/forgeplus-react
This commit is contained in:
parent
26d81ab2bf
commit
034d2ee599
|
@ -42,8 +42,7 @@ const Expert = (propsTransmit) => {
|
||||||
})
|
})
|
||||||
}, []);
|
}, []);
|
||||||
let propsF = { ...propsTransmit };
|
let propsF = { ...propsTransmit };
|
||||||
propsF.current_user = currentUser;
|
propsF.current_user = {...propsF.current_user,...currentUser};
|
||||||
console.log(currentUser);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="newMain clearfix">
|
<div className="newMain clearfix">
|
||||||
|
|
|
@ -8,7 +8,7 @@ const WordsInput = forwardRef((props, _ref) => {
|
||||||
const [wordCount, setWordCount] = useState(0);
|
const [wordCount, setWordCount] = useState(0);
|
||||||
return(
|
return(
|
||||||
<div style={{position:'relative'}}>
|
<div style={{position:'relative'}}>
|
||||||
<TextArea placeholder={props.placeholder} rows={props.rows} maxLength={props.maxLength} value={props.value} onChange={(e)=>{setWordCount(e.target.value.length);props.onChange(e.target.value)}}/>
|
<TextArea {...props} onChange={(e)=>{setWordCount(e.target.value.length);props.onChange(e.target.value)}}/>
|
||||||
<span style={{ position: 'absolute', bottom: '-4px', right: '12px', fontSize: '12px' }}>{wordCount}/{props.maxLength}</span>
|
<span style={{ position: 'absolute', bottom: '-4px', right: '12px', fontSize: '12px' }}>{wordCount}/{props.maxLength}</span>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -25,8 +25,6 @@ const TaskDetail = Loadable({
|
||||||
|
|
||||||
const ExpertUser = (propsF) => {
|
const ExpertUser = (propsF) => {
|
||||||
const functional = propsF.match.params.functional;
|
const functional = propsF.match.params.functional;
|
||||||
console.log('propsF.current_user');
|
|
||||||
console.log(propsF.current_user);
|
|
||||||
return (
|
return (
|
||||||
<div className="centerbox detail">
|
<div className="centerbox detail">
|
||||||
<div className="navigation">
|
<div className="navigation">
|
||||||
|
|
|
@ -42,7 +42,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
||||||
dataIndex: 'containerName',
|
dataIndex: 'containerName',
|
||||||
key: 'containerName',
|
key: 'containerName',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return <Link to={`/expert/user/tasks/${record.containerType}/${record.id}`}>{text}</Link>
|
return <Link to={`/expert/user/tasks/${record.containerType}/${record.containerId}`}>{text}</Link>
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -115,7 +115,6 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
), []);
|
), []);
|
||||||
|
|
||||||
console.log(dataList)
|
|
||||||
return (
|
return (
|
||||||
<div className='register_right task_right'>
|
<div className='register_right task_right'>
|
||||||
<p className="task-head">
|
<p className="task-head">
|
||||||
|
|
|
@ -1,41 +1,47 @@
|
||||||
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
import React, { useState, useCallback, useMemo, useEffect } from "react";
|
||||||
import { Tabs, Input, Select, Button, Form, DatePicker, InputNumber, Table, Pagination, Upload, Modal } from 'antd';
|
import { Tabs, Button, Form, InputNumber, Modal } from 'antd';
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import Paginationtable from "../../../components/paginationTable";
|
import Paginationtable from "../../../components/paginationTable";
|
||||||
import { getScoringDetails, initScoringDetails } from "../../api";
|
import { Info, Confirm } from '../../../components/ModalFun';
|
||||||
|
import WordsInput from 'military/expert/components/wordsInput';
|
||||||
|
import { getScoringDetails, initScoringDetails, getRules, updateScoringDetails } from "../../api";
|
||||||
import { readyCheckPapers } from "../../../task/api";
|
import { readyCheckPapers } from "../../../task/api";
|
||||||
import { taskType } from "../../static";
|
|
||||||
import { httpUrl } from '../../fetch';
|
import { httpUrl } from '../../fetch';
|
||||||
|
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
import '../../index.scss';
|
import '../../index.scss';
|
||||||
const Option = Select.Option;
|
|
||||||
const { TabPane } = Tabs;
|
const { TabPane } = Tabs;
|
||||||
|
|
||||||
|
function ReviewTasks({ showNotification, match, history, current_user }) {
|
||||||
function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
|
||||||
const containerId = match.params.containerId;
|
const containerId = match.params.containerId;
|
||||||
const containerType = match.params.containerType;
|
const containerType = match.params.containerType;
|
||||||
|
|
||||||
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
|
|
||||||
|
|
||||||
// 主table参数
|
// 主table参数
|
||||||
const [reload, setReload] = useState();
|
const [reload, setReload] = useState();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [curPage, setCurPage] = useState(1);
|
const [curPage, setCurPage] = useState(1);
|
||||||
const [pageSize, setPageSize] = useState(10);
|
const [pageSize, setPageSize] = useState(10);
|
||||||
const [dataList, setDataList] = useState([]);
|
const [dataList, setDataList] = useState([]);
|
||||||
const [total, setTotal] = useState(0);
|
|
||||||
|
|
||||||
const [taskId, setTaskId] = useState(461);
|
const [taskId, setTaskId] = useState();
|
||||||
const [competitionId, setCompetitionId] = useState(461);
|
const [competitionId, setCompetitionId] = useState(461);
|
||||||
|
|
||||||
|
// 评分规则
|
||||||
|
const [rules, setRules] = useState({});
|
||||||
|
|
||||||
//tab栏
|
//tab栏
|
||||||
const [activeKey, setActiveKey] = useState(0);
|
const [activeKey, setActiveKey] = useState(0);
|
||||||
|
|
||||||
|
// 模态框
|
||||||
|
const [visible, setVisible] = useState(false);
|
||||||
|
const [activeIndex, setActiveIndex] = useState(false);
|
||||||
|
const [comments, setComments] = useState();
|
||||||
|
|
||||||
const columns = useMemo(() => {
|
// 按钮禁止提交
|
||||||
return [
|
const [disabled, setDisabled] = useState(false);
|
||||||
|
|
||||||
|
// 通用列
|
||||||
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '序号',
|
title: '序号',
|
||||||
dataIndex: 'index',
|
dataIndex: 'index',
|
||||||
|
@ -58,46 +64,7 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '评分一',
|
|
||||||
dataIndex: 'gradesOne',
|
|
||||||
key: 'gradesOne',
|
|
||||||
render: (text, record, index) => {
|
|
||||||
return <InputNumber min={0} max={100} defaultValue={text} precision={0} />
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '评分二',
|
|
||||||
dataIndex: 'gradesTwo',
|
|
||||||
key: 'gradesTwo',
|
|
||||||
render: (text, record, index) => {
|
|
||||||
return <InputNumber min={0} max={100} defaultValue={text} precision={0} />
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '评分三',
|
|
||||||
dataIndex: 'gradesThree',
|
|
||||||
key: 'gradesThree',
|
|
||||||
render: (text, record, index) => {
|
|
||||||
return <InputNumber min={0} max={100} defaultValue={text} precision={0} />
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '评分四',
|
|
||||||
dataIndex: 'gradesFour',
|
|
||||||
key: 'gradesFour',
|
|
||||||
render: (text, record, index) => {
|
|
||||||
return <InputNumber min={0} max={100} defaultValue={text} precision={0} />
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '评分五',
|
|
||||||
dataIndex: 'gradesFive',
|
|
||||||
key: 'gradesFive',
|
|
||||||
render: (text, record, index) => {
|
|
||||||
return <InputNumber min={0} max={100} defaultValue={text} precision={0} />
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '平均分',
|
title: '平均分',
|
||||||
dataIndex: 'gradesAverage',
|
dataIndex: 'gradesAverage',
|
||||||
|
@ -107,14 +74,90 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
title: '评审意见',
|
title: '评审意见',
|
||||||
dataIndex: 'comments',
|
dataIndex: 'comments',
|
||||||
key: 'comments',
|
key: 'comments',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <a className="link" onClick={() => { writeComments(text, index, 'comments') }}>{record.status === 2 ? '填写' : '查看'}意见</a>
|
||||||
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}, []);
|
|
||||||
|
// 评分列
|
||||||
|
const gradesColumns = [{
|
||||||
|
title: '评分一',
|
||||||
|
dataIndex: 'gradesOne',
|
||||||
|
key: 'gradesOne',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <InputNumber min={0} max={100} defaultValue={text} precision={0} disabled={disabled}
|
||||||
|
onChange={(value) => { editGrade(value, index, 'gradesOne') }}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评分二',
|
||||||
|
dataIndex: 'gradesTwo',
|
||||||
|
key: 'gradesTwo',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <InputNumber min={0} max={100} defaultValue={text} precision={0} disabled={disabled}
|
||||||
|
onChange={(value) => { editGrade(value, index, 'gradesTwo') }}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评分三',
|
||||||
|
dataIndex: 'gradesThree',
|
||||||
|
key: 'gradesThree',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <InputNumber min={0} max={100} defaultValue={text} precision={0} disabled={disabled}
|
||||||
|
onChange={(value) => { editGrade(value, index, 'gradesThree') }}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评分四',
|
||||||
|
dataIndex: 'gradesFour',
|
||||||
|
key: 'gradesFour',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <InputNumber min={0} max={100} defaultValue={text} precision={0} disabled={disabled}
|
||||||
|
onChange={(value) => { editGrade(value, index, 'gradesFour') }}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '评分五',
|
||||||
|
dataIndex: 'gradesFive',
|
||||||
|
key: 'gradesFive',
|
||||||
|
render: (text, record, index) => {
|
||||||
|
return <InputNumber min={0} max={100} defaultValue={text} precision={0} disabled={disabled}
|
||||||
|
onChange={(value) => { editGrade(value, index, 'gradesFive') }}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
let gradesNum = rules.criterias && rules.criterias.length;
|
||||||
|
|
||||||
|
if (gradesNum) {
|
||||||
|
let thisGradesColumns = gradesColumns.slice(0, gradesNum);
|
||||||
|
columns.splice(3, 0, ...thisGradesColumns);
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
let rules = undefined;
|
||||||
|
getRules({ containerId, containerType, statusString: -1 }).then(response => {
|
||||||
|
if (response && response.message === "success") {
|
||||||
|
let criterias = [];
|
||||||
|
response.data.criteriaOne && (criterias[criterias.length] = (criterias.length + 1) + "、" + response.data.criteriaOne);
|
||||||
|
response.data.criteriaTwo && (criterias[criterias.length] = (criterias.length + 1) + "、" + response.data.criteriaTwo);
|
||||||
|
response.data.criteriaThree && (criterias[criterias.length] = (criterias.length + 1) + "、" + response.data.criteriaThree);
|
||||||
|
response.data.criteriaFour && (criterias[criterias.length] = (criterias.length + 1) + "、" + response.data.criteriaFour);
|
||||||
|
response.data.criteriaFive && (criterias[criterias.length] = (criterias.length + 1) + "、" + response.data.criteriaFive);
|
||||||
|
response.data.criterias = criterias;
|
||||||
|
rules = response.data;
|
||||||
|
setRules(rules);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, [])
|
||||||
|
|
||||||
// 获取成果列表
|
// 获取成果列表
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('current_user.expertId');
|
|
||||||
console.log(current_user);
|
|
||||||
let params = {
|
let params = {
|
||||||
taskId,
|
taskId,
|
||||||
checkStatus: '1',
|
checkStatus: '1',
|
||||||
|
@ -141,6 +184,7 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
opsFilesAttachments: item.paperDetail && item.paperDetail.busiAttachments,
|
opsFilesAttachments: item.paperDetail && item.paperDetail.busiAttachments,
|
||||||
opsId: item.id,
|
opsId: item.id,
|
||||||
opsParentId: containerId,
|
opsParentId: containerId,
|
||||||
|
opsParentType: containerType,
|
||||||
opsType: containerType,
|
opsType: containerType,
|
||||||
status: 2
|
status: 2
|
||||||
});
|
});
|
||||||
|
@ -150,7 +194,7 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
}
|
}
|
||||||
setDataList(dataArr);
|
setDataList(dataArr);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
initScoringDetails(dataArr).then(res => {
|
dataArr.length && initScoringDetails(dataArr).then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -161,6 +205,28 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
window.open(url);
|
window.open(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function editGrade(value, index, dataIndex) {
|
||||||
|
let dataListNew = dataList.slice();
|
||||||
|
|
||||||
|
// 计算平均分
|
||||||
|
if (gradesNum) {
|
||||||
|
let gradesArr = [];
|
||||||
|
let item = dataListNew[index];
|
||||||
|
typeof item.gradesOne === 'number' && gradesArr.push(item.gradesOne);
|
||||||
|
typeof item.gradesTwo === 'number' && gradesArr.push(item.gradesTwo);
|
||||||
|
typeof item.gradesThree === 'number' && gradesArr.push(item.gradesThree);
|
||||||
|
typeof item.gradesFour === 'number' && gradesArr.push(item.gradesFour);
|
||||||
|
typeof item.gradesFive === 'number' && gradesArr.push(item.gradesFive);
|
||||||
|
if (gradesArr.length === gradesNum) {
|
||||||
|
let sum = gradesArr.reduce((previousValue, currentValue) => { return previousValue + currentValue }, 0);
|
||||||
|
dataListNew[index].gradesAverage = (sum / gradesNum).toFixed(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dataListNew[index][dataIndex] = value;
|
||||||
|
setDataList(dataListNew);
|
||||||
|
}
|
||||||
|
|
||||||
// 获取评分列表
|
// 获取评分列表
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
|
@ -168,52 +234,160 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
containerId,
|
containerId,
|
||||||
containerType,
|
containerType,
|
||||||
isDistinct: false,
|
isDistinct: false,
|
||||||
|
expertId: current_user.expertId,
|
||||||
};
|
};
|
||||||
getScoringDetails(params).then(res => {
|
current_user.expertId && getScoringDetails(params).then(res => {
|
||||||
if (res.data && res.data.rows && res.data.rows.length) {
|
if (res.data && res.data.length) {
|
||||||
setDataList(res.data.rows);
|
setDataList(res.data);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
if (res.data[0].status === 1) {
|
||||||
|
setDisabled(true);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
containerType == 1 ? setTaskId(containerId) : setCompetitionId(containerId);
|
containerType == 1 ? setTaskId(containerId) : setCompetitionId(containerId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, [curPage, reload, pageSize]);
|
}, [curPage, reload, pageSize, current_user.expertId, reload]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const helper = useCallback(
|
|
||||||
(label, name, rules, widget, initialValue) => (
|
|
||||||
<Form.Item label={label}>
|
|
||||||
{getFieldDecorator(name, { rules, initialValue, validateFirst: true, })(widget)}
|
|
||||||
</Form.Item>
|
|
||||||
), []);
|
|
||||||
|
|
||||||
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
history.go(-1);
|
history.go(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function writeComments(text, index) {
|
||||||
|
setVisible(true);
|
||||||
|
setActiveIndex(index);
|
||||||
|
setComments(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改意见
|
||||||
|
function commit() {
|
||||||
|
if (comments) {
|
||||||
|
let data = dataList[activeIndex];
|
||||||
|
data.comments = comments;
|
||||||
|
updateScoringDetails([data]).then(res => dealCommitRes(res))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交草稿
|
||||||
|
function draft() {
|
||||||
|
updateScoringDetails(dataList).then(res => dealCommitRes(res));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交评审结果
|
||||||
|
function commitGrades() {
|
||||||
|
if (verify()) {
|
||||||
|
Confirm({
|
||||||
|
title: '提醒',
|
||||||
|
okText: '确定提交',
|
||||||
|
content: <div>
|
||||||
|
<p>提交后将完成此次评审,无法继续修改评分与评审意见</p>
|
||||||
|
<p>确定提交此次评审结果?</p>
|
||||||
|
</div>,
|
||||||
|
onOk: () => {
|
||||||
|
let dataArr = dataList.slice();
|
||||||
|
for (const item of dataArr) {
|
||||||
|
item.status = 1;
|
||||||
|
}
|
||||||
|
updateScoringDetails(dataArr).then(res => dealCommitRes(res));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交前校验
|
||||||
|
function verify() {
|
||||||
|
let errorArr = [];
|
||||||
|
let scoringArr = [];
|
||||||
|
for (const [index, item] of dataList.entries()) {
|
||||||
|
let gradesArr = [];
|
||||||
|
typeof item.gradesOne === 'number' && gradesArr.push(item.gradesOne);
|
||||||
|
typeof item.gradesTwo === 'number' && gradesArr.push(item.gradesTwo);
|
||||||
|
typeof item.gradesThree === 'number' && gradesArr.push(item.gradesThree);
|
||||||
|
typeof item.gradesFour === 'number' && gradesArr.push(item.gradesFour);
|
||||||
|
typeof item.gradesFive === 'number' && gradesArr.push(item.gradesFive);
|
||||||
|
if (gradesArr.length < gradesNum && gradesArr.length) {
|
||||||
|
errorArr.push(index);
|
||||||
|
} else if (gradesArr.length) {
|
||||||
|
scoringArr.push(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (errorArr.length) {
|
||||||
|
let content = '';
|
||||||
|
for (const item of errorArr) {
|
||||||
|
content += `第${item + 1}行数据请填写完整 `;
|
||||||
|
}
|
||||||
|
Info({
|
||||||
|
title: '提醒',
|
||||||
|
content: content,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!scoringArr.length) {
|
||||||
|
Info({
|
||||||
|
title: '提醒',
|
||||||
|
content: '请至少填写一行分数',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return !errorArr.length
|
||||||
|
}
|
||||||
|
|
||||||
|
function dealCommitRes(res) {
|
||||||
|
if (res && res.message) {
|
||||||
|
if (res.message.indexOf("成功")) {
|
||||||
|
showNotification("保存成功");
|
||||||
|
setReload(Math.random());
|
||||||
|
} else {
|
||||||
|
showNotification(res.message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='register_right task_detail'>
|
<div className='register_right task_detail'>
|
||||||
<p className="task-head">
|
<p className="task-head">
|
||||||
创客成果评审
|
创客成果评审
|
||||||
|
<button className="back-button but41_border" onClick={()=>{history.goBack()}}>返回上一页</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Tabs defaultActiveKey="1" animated={false} onChange={(activeKey) => { setActiveKey(activeKey) }}>
|
<Tabs defaultActiveKey="0" animated={false} onChange={(activeKey) => { setActiveKey(activeKey) }}>
|
||||||
|
|
||||||
<TabPane tab="评选信息" key="0">
|
<TabPane tab="评选信息" key="0">
|
||||||
<div>
|
<div className="task-rules">
|
||||||
<div className="box"></div>
|
<div className="rules-box">
|
||||||
<p className="font-16 pt15">任务信息</p>
|
<p className="rules-head">任务信息</p>
|
||||||
{/* <p className="font-16 pt15">任务信息</p> */}
|
<div className="rules-content">
|
||||||
{/* <p className="mt10">任务名称<span className="ml10">{taskRecord.name}</span></p> */}
|
<div className="rules-content-item">任务名称<span className="ml10">{rules.containerName}</span></div>
|
||||||
{/* <p className="mt10 pb20">任务链接<Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskRecord.id}`} >{`/task/taskDetail/${taskRecord.id}`}</Link></p> */}
|
<div className="rules-content-item">任务链接<Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${rules.containerId}`} >{`/task/taskDetail/${rules.containerId}`}</Link></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div className="rules-box">
|
||||||
|
<p className="rules-head">评审规则</p>
|
||||||
|
<div className="rules-content">{rules.rule}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="rules-box">
|
||||||
|
<p className="rules-head">评分标准</p>
|
||||||
|
<div className="rules-content">
|
||||||
|
{rules.criterias && rules.criterias.map((item, index) => { return <p className="rules-content-item" key={index}>{item}</p> })}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="rules-box">
|
||||||
|
<p className="rules-head">评审时间</p>
|
||||||
|
<div className="rules-content-last">{rules.reviewStartOn}~{rules.reviewEndOn}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</TabPane>
|
</TabPane>
|
||||||
<TabPane tab="专家评分" key="1">
|
<TabPane tab="专家评分" key="1">
|
||||||
<div>
|
<div>
|
||||||
<div className="box"></div>
|
<div className="box"></div>
|
||||||
|
<div className="warning">对单个作品评分时,需填写完整每个评分项,请勿少填、漏填</div>
|
||||||
<Paginationtable
|
<Paginationtable
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={dataList}
|
dataSource={dataList}
|
||||||
|
@ -221,10 +395,9 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
pagination={false}
|
pagination={false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div className="text-center">
|
||||||
<div className="button-div">
|
<Button className="mr10" type="primary" disabled={disabled} onClick={commitGrades}>提交评审结果</Button>
|
||||||
<Button className="mr10" type="primary" onClick={() => { }}>提交评审结果</Button>
|
<Button className="mr10" disabled={disabled} onClick={draft}>保存评审结果</Button>
|
||||||
<Button className="mr10" onClick={() => { }}>保存评审结果</Button>
|
|
||||||
<Button className="butE3_border" onClick={cancel}>取消</Button>
|
<Button className="butE3_border" onClick={cancel}>取消</Button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -233,7 +406,26 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<Modal
|
||||||
|
title="填写意见"
|
||||||
|
visible={visible}
|
||||||
|
onOk={commit}
|
||||||
|
onCancel={() => { setVisible(false) }}
|
||||||
|
className="form-edit-modal"
|
||||||
|
>
|
||||||
|
<Form.Item >
|
||||||
|
<WordsInput
|
||||||
|
value={comments}
|
||||||
|
placeholder="请填写"
|
||||||
|
autoSize={{ minRows: 6 }}
|
||||||
|
className="applyText"
|
||||||
|
maxLength={250}
|
||||||
|
onChange={setComments}
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
export default Form.create()(ReviewTasks);
|
export default ReviewTasks;
|
|
@ -9,9 +9,13 @@
|
||||||
}
|
}
|
||||||
.ant-tabs-bar {
|
.ant-tabs-bar {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-tabs-tab {
|
.ant-tabs-tab {
|
||||||
|
margin: 0;
|
||||||
|
padding: 19px 32px;
|
||||||
|
font-size: 1rem;
|
||||||
&:hover {
|
&:hover {
|
||||||
color: #4154f1;
|
color: #4154f1;
|
||||||
}
|
}
|
||||||
|
@ -22,27 +26,61 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ant-tabs-nav .ant-tabs-tab-active {
|
.ant-tabs-nav .ant-tabs-tab-active {
|
||||||
color: #4154f1;
|
color: #4154f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.task-head {
|
.task-head {
|
||||||
|
position: relative;
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
padding: 0.5em 2em;
|
padding: 0.5em 2em;
|
||||||
color: #181818;
|
color: #181818;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
.back-button{
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
right: 1rem;
|
||||||
|
bottom: -108%;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.button-div {
|
.button-div {
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
.pagination-table {
|
.pagination-table {
|
||||||
margin:1.25rem 1.75rem;
|
margin: .75rem 1.75rem 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-rules {
|
||||||
|
background: #f5f5f5;
|
||||||
|
.rules-box{
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
.rules-head {
|
||||||
|
font-size: 16px;
|
||||||
|
color: rgba(51, 51, 51, 1);
|
||||||
|
border-bottom: 1px solid #eeeeee;
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
.rules-content{
|
||||||
|
padding: 10px 20px 30px;
|
||||||
|
}
|
||||||
|
.rules-content-last{
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
.rules-content-item{
|
||||||
|
line-height: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning{
|
||||||
|
color: #DE0000;
|
||||||
|
font-size: .7rem;
|
||||||
|
margin: .75rem 1.75rem;
|
||||||
}
|
}
|
||||||
// .ant-input-number{
|
|
||||||
// width: 60px;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
}
|
}
|
||||||
.butE3_border {
|
.butE3_border {
|
||||||
color: #404660;
|
color: #404660;
|
||||||
border: 1px solid #E3E7ED;
|
border: 1px solid #e3e7ed;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #F8F8F8;
|
background-color: #f8f8f8;
|
||||||
border: 1px solid #E3E7ED;
|
border: 1px solid #e3e7ed;
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
background-color: #f3f3f3;
|
background-color: #f3f3f3;
|
||||||
|
@ -45,7 +45,9 @@
|
||||||
.ant-btn-primary {
|
.ant-btn-primary {
|
||||||
background-color: #4154f1;
|
background-color: #4154f1;
|
||||||
border-color: #4154f1;
|
border-color: #4154f1;
|
||||||
&:hover,&:active,&:focus {
|
&:hover,
|
||||||
|
&:active,
|
||||||
|
&:focus {
|
||||||
background-color: #5d6eff;
|
background-color: #5d6eff;
|
||||||
border-color: #5d6eff;
|
border-color: #5d6eff;
|
||||||
}
|
}
|
||||||
|
@ -57,7 +59,7 @@
|
||||||
height: 318px;
|
height: 318px;
|
||||||
& .ant-modal-header {
|
& .ant-modal-header {
|
||||||
padding: 0.6em 2.1em;
|
padding: 0.6em 2.1em;
|
||||||
background: #F2F2FF;
|
background: #f2f2ff;
|
||||||
& .ant-modal-title {
|
& .ant-modal-title {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +76,7 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
& .warning::before {
|
& .warning::before {
|
||||||
content: url('./image/warning.svg');
|
content: url("./image/warning.svg");
|
||||||
width: 32px;
|
width: 32px;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 11px;
|
top: 11px;
|
||||||
|
@ -87,38 +89,64 @@
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #404660;
|
color: #404660;
|
||||||
border: 1px solid #E3E7ED;
|
border: 1px solid #e3e7ed;
|
||||||
width: 7em;
|
width: 7em;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #F8F8F8;
|
background-color: #f8f8f8;
|
||||||
border: 1px solid #E3E7ED;
|
border: 1px solid #e3e7ed;
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
background-color: #F3F3F3;
|
background-color: #f3f3f3;
|
||||||
border: 1px solid #E3E7ED;
|
border: 1px solid #e3e7ed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
& .ant-btn.ant-btn-primary {
|
& .ant-btn.ant-btn-primary {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #4154F1;
|
background-color: #4154f1;
|
||||||
margin-left: 2.5em;
|
margin-left: 2.5em;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #5D6EFF;
|
background-color: #5d6eff;
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
background-color: #374BF2;
|
background-color: #374bf2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
& .ant-modal-footer {margin-top: 15px; }
|
& .ant-modal-footer {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.expert_modal.submit .ant-modal-body {
|
.expert_modal.submit .ant-modal-body {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-form-explain, .ant-form-split {
|
.ant-form-explain,
|
||||||
|
.ant-form-split {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #f5222d;
|
color: #f5222d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-edit-modal {
|
||||||
|
.ant-modal-header {
|
||||||
|
background: #f2f2ff;
|
||||||
|
padding: 9px 24px;
|
||||||
|
.ant-modal-title {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal-close {
|
||||||
|
top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-modal-body{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
.ant-modal-footer{
|
||||||
|
padding-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -97,14 +97,9 @@ service.interceptors.response.use(
|
||||||
message: "提示",
|
message: "提示",
|
||||||
description: res.data.message || '无权限!',
|
description: res.data.message || '无权限!',
|
||||||
});
|
});
|
||||||
|
if(window.location.port !== "3007"){
|
||||||
window.location.href="/403";
|
window.location.href="/403";
|
||||||
return Promise.reject('error');
|
|
||||||
}
|
}
|
||||||
if (res.status === 500) {
|
|
||||||
notification.open({
|
|
||||||
message: "提示",
|
|
||||||
description: res.data.message,
|
|
||||||
});
|
|
||||||
return Promise.reject('error');
|
return Promise.reject('error');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ const Index = (propsTransmit) => {
|
||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
let propsF = { ...propsTransmit };
|
let propsF = { ...propsTransmit };
|
||||||
propsF.current_user = currentUser;
|
propsF.current_user = {...propsF.current_user,...currentUser};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="newMain clearfix">
|
<div className="newMain clearfix">
|
||||||
|
|
|
@ -169,6 +169,7 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
||||||
|
|
||||||
// 考虑到以后部分系统不会用到专家评审系统,所以这里没有使用Promise.All
|
// 考虑到以后部分系统不会用到专家评审系统,所以这里没有使用Promise.All
|
||||||
getCurrentExpert().then(res => {
|
getCurrentExpert().then(res => {
|
||||||
|
if(res){
|
||||||
let isExpert = false;
|
let isExpert = false;
|
||||||
let expertId = '';
|
let expertId = '';
|
||||||
let expertDraft = false;
|
let expertDraft = false;
|
||||||
|
@ -187,6 +188,9 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
||||||
user: newUser,
|
user: newUser,
|
||||||
current_user: newUser
|
current_user: newUser
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.log(error)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
|
|
Loading…
Reference in New Issue