forked from Gitlink/forgeplus-react
This commit is contained in:
parent
26d81ab2bf
commit
034d2ee599
|
@ -42,8 +42,7 @@ const Expert = (propsTransmit) => {
|
|||
})
|
||||
}, []);
|
||||
let propsF = { ...propsTransmit };
|
||||
propsF.current_user = currentUser;
|
||||
console.log(currentUser);
|
||||
propsF.current_user = {...propsF.current_user,...currentUser};
|
||||
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
|
|
|
@ -3,12 +3,12 @@ import { Input } from 'antd';
|
|||
|
||||
const { TextArea } = Input;
|
||||
|
||||
//右下角 实时动态 显示用户输入字数
|
||||
//右下角 实时动态 显示用户输入字数
|
||||
const WordsInput = forwardRef((props, _ref) => {
|
||||
const [wordCount, setWordCount] = useState(0);
|
||||
return(
|
||||
<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>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -25,8 +25,6 @@ const TaskDetail = Loadable({
|
|||
|
||||
const ExpertUser = (propsF) => {
|
||||
const functional = propsF.match.params.functional;
|
||||
console.log('propsF.current_user');
|
||||
console.log(propsF.current_user);
|
||||
return (
|
||||
<div className="centerbox detail">
|
||||
<div className="navigation">
|
||||
|
|
|
@ -42,7 +42,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
|
|||
dataIndex: 'containerName',
|
||||
key: 'containerName',
|
||||
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>
|
||||
), []);
|
||||
|
||||
console.log(dataList)
|
||||
return (
|
||||
<div className='register_right task_right'>
|
||||
<p className="task-head">
|
||||
|
|
|
@ -1,120 +1,163 @@
|
|||
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 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 { taskType } from "../../static";
|
||||
import { httpUrl } from '../../fetch';
|
||||
|
||||
import './index.scss';
|
||||
import '../../index.scss';
|
||||
const Option = Select.Option;
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
|
||||
function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
||||
function ReviewTasks({ showNotification, match, history, current_user }) {
|
||||
const containerId = match.params.containerId;
|
||||
const containerType = match.params.containerType;
|
||||
|
||||
const { getFieldDecorator, setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
// 主table参数
|
||||
const [reload, setReload] = useState();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
const [dataList, setDataList] = useState([]);
|
||||
const [total, setTotal] = useState(0);
|
||||
|
||||
const [taskId, setTaskId] = useState(461);
|
||||
const [taskId, setTaskId] = useState();
|
||||
const [competitionId, setCompetitionId] = useState(461);
|
||||
|
||||
// 评分规则
|
||||
const [rules, setRules] = useState({});
|
||||
|
||||
//tab栏
|
||||
const [activeKey, setActiveKey] = useState(0);
|
||||
|
||||
// 模态框
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [activeIndex, setActiveIndex] = useState(false);
|
||||
const [comments, setComments] = useState();
|
||||
|
||||
const columns = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
render: (text, record, index) => {
|
||||
return index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '投稿详情',
|
||||
dataIndex: 'opsContent',
|
||||
key: 'opsContent',
|
||||
},
|
||||
{
|
||||
title: '附件下载',
|
||||
dataIndex: 'opsFilesAttachments',
|
||||
key: 'opsFilesAttachments',
|
||||
render: (text, record) => {
|
||||
return text && text.map(item => {
|
||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
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: '平均分',
|
||||
dataIndex: 'gradesAverage',
|
||||
key: 'gradesAverage',
|
||||
},
|
||||
{
|
||||
title: '评审意见',
|
||||
dataIndex: 'comments',
|
||||
key: 'comments',
|
||||
},
|
||||
];
|
||||
}, []);
|
||||
// 按钮禁止提交
|
||||
const [disabled, setDisabled] = useState(false);
|
||||
|
||||
// 通用列
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'index',
|
||||
render: (text, record, index) => {
|
||||
return index + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '投稿详情',
|
||||
dataIndex: 'opsContent',
|
||||
key: 'opsContent',
|
||||
},
|
||||
{
|
||||
title: '附件下载',
|
||||
dataIndex: 'opsFilesAttachments',
|
||||
key: 'opsFilesAttachments',
|
||||
render: (text, record) => {
|
||||
return text && text.map(item => {
|
||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '平均分',
|
||||
dataIndex: 'gradesAverage',
|
||||
key: 'gradesAverage',
|
||||
},
|
||||
{
|
||||
title: '评审意见',
|
||||
dataIndex: '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(() => {
|
||||
console.log('current_user.expertId');
|
||||
console.log(current_user);
|
||||
let params = {
|
||||
taskId,
|
||||
checkStatus: '1',
|
||||
|
@ -141,6 +184,7 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
|||
opsFilesAttachments: item.paperDetail && item.paperDetail.busiAttachments,
|
||||
opsId: item.id,
|
||||
opsParentId: containerId,
|
||||
opsParentType: containerType,
|
||||
opsType: containerType,
|
||||
status: 2
|
||||
});
|
||||
|
@ -150,17 +194,39 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
|||
}
|
||||
setDataList(dataArr);
|
||||
setLoading(false);
|
||||
initScoringDetails(dataArr).then(res => {
|
||||
dataArr.length && initScoringDetails(dataArr).then(res => {
|
||||
console.log(res);
|
||||
});
|
||||
});
|
||||
}, [taskId,current_user.expertId]);
|
||||
}, [taskId, current_user.expertId]);
|
||||
|
||||
function downFile(id) {
|
||||
let url = httpUrl + '/busiAttachments/download/' + id;
|
||||
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(() => {
|
||||
setLoading(true);
|
||||
|
@ -168,52 +234,160 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
|||
containerId,
|
||||
containerType,
|
||||
isDistinct: false,
|
||||
expertId: current_user.expertId,
|
||||
};
|
||||
getScoringDetails(params).then(res => {
|
||||
if (res.data && res.data.rows && res.data.rows.length) {
|
||||
setDataList(res.data.rows);
|
||||
current_user.expertId && getScoringDetails(params).then(res => {
|
||||
if (res.data && res.data.length) {
|
||||
setDataList(res.data);
|
||||
setLoading(false);
|
||||
if (res.data[0].status === 1) {
|
||||
setDisabled(true);
|
||||
}
|
||||
} else {
|
||||
containerType == 1 ? setTaskId(containerId) : setCompetitionId(containerId);
|
||||
}
|
||||
});
|
||||
}, [curPage, reload, pageSize]);
|
||||
|
||||
|
||||
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget, initialValue) => (
|
||||
<Form.Item label={label}>
|
||||
{getFieldDecorator(name, { rules, initialValue, validateFirst: true, })(widget)}
|
||||
</Form.Item>
|
||||
), []);
|
||||
}, [curPage, reload, pageSize, current_user.expertId, reload]);
|
||||
|
||||
|
||||
function cancel() {
|
||||
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 (
|
||||
<div className='register_right task_detail'>
|
||||
<p className="task-head">
|
||||
创客成果评审
|
||||
<button className="back-button but41_border" onClick={()=>{history.goBack()}}>返回上一页</button>
|
||||
</p>
|
||||
|
||||
<Tabs defaultActiveKey="1" animated={false} onChange={(activeKey) => { setActiveKey(activeKey) }}>
|
||||
<Tabs defaultActiveKey="0" animated={false} onChange={(activeKey) => { setActiveKey(activeKey) }}>
|
||||
|
||||
<TabPane tab="评选信息" key="0">
|
||||
<div>
|
||||
<div className="box"></div>
|
||||
<p className="font-16 pt15">任务信息</p>
|
||||
{/* <p className="font-16 pt15">任务信息</p> */}
|
||||
{/* <p className="mt10">任务名称<span className="ml10">{taskRecord.name}</span></p> */}
|
||||
{/* <p className="mt10 pb20">任务链接<Link className="taskLink ml10" target="_blank" to={`/task/taskDetail/${taskRecord.id}`} >{`/task/taskDetail/${taskRecord.id}`}</Link></p> */}
|
||||
<div className="task-rules">
|
||||
<div className="rules-box">
|
||||
<p className="rules-head">任务信息</p>
|
||||
<div className="rules-content">
|
||||
<div className="rules-content-item">任务名称<span className="ml10">{rules.containerName}</span></div>
|
||||
<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>
|
||||
|
||||
</TabPane>
|
||||
<TabPane tab="专家评分" key="1">
|
||||
<div>
|
||||
<div className="box"></div>
|
||||
<div className="warning">对单个作品评分时,需填写完整每个评分项,请勿少填、漏填</div>
|
||||
<Paginationtable
|
||||
loading={loading}
|
||||
dataSource={dataList}
|
||||
|
@ -221,10 +395,9 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
|||
pagination={false}
|
||||
/>
|
||||
|
||||
|
||||
<div className="button-div">
|
||||
<Button className="mr10" type="primary" onClick={() => { }}>提交评审结果</Button>
|
||||
<Button className="mr10" onClick={() => { }}>保存评审结果</Button>
|
||||
<div className="text-center">
|
||||
<Button className="mr10" type="primary" disabled={disabled} onClick={commitGrades}>提交评审结果</Button>
|
||||
<Button className="mr10" disabled={disabled} onClick={draft}>保存评审结果</Button>
|
||||
<Button className="butE3_border" onClick={cancel}>取消</Button>
|
||||
|
||||
</div>
|
||||
|
@ -233,7 +406,26 @@ function ReviewTasks({ form, showNotification, match, history, current_user }) {
|
|||
</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>
|
||||
)
|
||||
}
|
||||
export default Form.create()(ReviewTasks);
|
||||
export default ReviewTasks;
|
|
@ -1,48 +1,86 @@
|
|||
.register_right.task_detail {
|
||||
background: #fff;
|
||||
padding-bottom: 1rem;
|
||||
|
||||
.ant-tabs{
|
||||
|
||||
.ant-tabs {
|
||||
background: #f5f5f5;
|
||||
.ant-tabs-content{
|
||||
.ant-tabs-content {
|
||||
background: #fff;
|
||||
}
|
||||
.ant-tabs-bar{
|
||||
.ant-tabs-bar {
|
||||
background: #fff;
|
||||
margin-bottom: 1.25rem;
|
||||
}
|
||||
|
||||
.ant-tabs-tab{
|
||||
&:hover{
|
||||
.ant-tabs-tab {
|
||||
margin: 0;
|
||||
padding: 19px 32px;
|
||||
font-size: 1rem;
|
||||
&:hover {
|
||||
color: #4154f1;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-tabs-ink-bar{
|
||||
.ant-tabs-ink-bar {
|
||||
background-color: #4154f1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.ant-tabs-nav .ant-tabs-tab-active{
|
||||
.ant-tabs-nav .ant-tabs-tab-active {
|
||||
color: #4154f1;
|
||||
}
|
||||
|
||||
|
||||
.task-head {
|
||||
position: relative;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
padding: 0.5em 2em;
|
||||
color: #181818;
|
||||
background: #fff;
|
||||
font-size: 0.8em;
|
||||
font-weight: bold;
|
||||
.back-button{
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 1rem;
|
||||
bottom: -108%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.button-div {
|
||||
line-height: 1.5;
|
||||
}
|
||||
.pagination-table{
|
||||
margin:1.25rem 1.75rem;
|
||||
.pagination-table {
|
||||
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 {
|
||||
color: #404660;
|
||||
border: 1px solid #E3E7ED;
|
||||
&:hover{
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #E3E7ED;
|
||||
border: 1px solid #e3e7ed;
|
||||
&:hover {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #e3e7ed;
|
||||
}
|
||||
&:active {
|
||||
background-color: #f3f3f3;
|
||||
|
@ -45,80 +45,108 @@
|
|||
.ant-btn-primary {
|
||||
background-color: #4154f1;
|
||||
border-color: #4154f1;
|
||||
&:hover,&:active,&:focus {
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
background-color: #5d6eff;
|
||||
border-color: #5d6eff;
|
||||
}
|
||||
}
|
||||
|
||||
//弹出确认框样式
|
||||
.expert_modal .ant-modal-content{
|
||||
.expert_modal .ant-modal-content {
|
||||
width: 550px;
|
||||
height: 318px;
|
||||
& .ant-modal-header{
|
||||
& .ant-modal-header {
|
||||
padding: 0.6em 2.1em;
|
||||
background: #F2F2FF;
|
||||
background: #f2f2ff;
|
||||
& .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{
|
||||
content: url('./image/warning.svg');
|
||||
& .warning::before {
|
||||
content: url("./image/warning.svg");
|
||||
width: 32px;
|
||||
position: relative;
|
||||
top: 11px;
|
||||
left: -15px;
|
||||
}
|
||||
}
|
||||
& .ant-btn{
|
||||
& .ant-btn {
|
||||
padding: 0 1.3em;
|
||||
height: 2.55em;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
color: #404660;
|
||||
border: 1px solid #E3E7ED;
|
||||
border: 1px solid #e3e7ed;
|
||||
width: 7em;
|
||||
&:hover{
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #E3E7ED;
|
||||
&:hover {
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #e3e7ed;
|
||||
}
|
||||
&:active{
|
||||
background-color: #F3F3F3;
|
||||
border: 1px solid #E3E7ED;
|
||||
&:active {
|
||||
background-color: #f3f3f3;
|
||||
border: 1px solid #e3e7ed;
|
||||
}
|
||||
}
|
||||
& .ant-btn.ant-btn-primary{
|
||||
& .ant-btn.ant-btn-primary {
|
||||
color: white;
|
||||
background-color: #4154F1;
|
||||
background-color: #4154f1;
|
||||
margin-left: 2.5em;
|
||||
&:hover{
|
||||
background-color: #5D6EFF;
|
||||
&:hover {
|
||||
background-color: #5d6eff;
|
||||
}
|
||||
&:active{
|
||||
background-color: #374BF2;
|
||||
&:active {
|
||||
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;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ant-form-explain, .ant-form-split {
|
||||
.ant-form-explain,
|
||||
.ant-form-split {
|
||||
position: absolute;
|
||||
margin-top: -5px;
|
||||
font-size: 12px;
|
||||
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: "提示",
|
||||
description: res.data.message || '无权限!',
|
||||
});
|
||||
window.location.href="/403";
|
||||
return Promise.reject('error');
|
||||
}
|
||||
if (res.status === 500) {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.data.message,
|
||||
});
|
||||
if(window.location.port !== "3007"){
|
||||
window.location.href="/403";
|
||||
}
|
||||
return Promise.reject('error');
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ const Index = (propsTransmit) => {
|
|||
})
|
||||
}, [])
|
||||
let propsF = { ...propsTransmit };
|
||||
propsF.current_user = currentUser;
|
||||
propsF.current_user = {...propsF.current_user,...currentUser};
|
||||
|
||||
return (
|
||||
<div className="newMain clearfix">
|
||||
|
|
|
@ -169,24 +169,28 @@ export function TPMIndexHOC(WrappedComponent, headFoot) {
|
|||
|
||||
// 考虑到以后部分系统不会用到专家评审系统,所以这里没有使用Promise.All
|
||||
getCurrentExpert().then(res => {
|
||||
let isExpert = false;
|
||||
let expertId = '';
|
||||
let expertDraft = false;
|
||||
if (res && res.data && res.data.length) {
|
||||
for (const item of res.data) {
|
||||
if (item.status === 1) {
|
||||
isExpert = true;
|
||||
expertId = item.id;
|
||||
} else {
|
||||
expertDraft = true;
|
||||
if(res){
|
||||
let isExpert = false;
|
||||
let expertId = '';
|
||||
let expertDraft = false;
|
||||
if (res && res.data && res.data.length) {
|
||||
for (const item of res.data) {
|
||||
if (item.status === 1) {
|
||||
isExpert = true;
|
||||
expertId = item.id;
|
||||
} else {
|
||||
expertDraft = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
const newUser = { ...this.state.current_user, isExpert, expertId, expertDraft };
|
||||
this.setState({
|
||||
user: newUser,
|
||||
current_user: newUser
|
||||
});
|
||||
}
|
||||
const newUser = { ...this.state.current_user, isExpert, expertId, expertDraft };
|
||||
this.setState({
|
||||
user: newUser,
|
||||
current_user: newUser
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.log(error)
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
|
|
Loading…
Reference in New Issue