diff --git a/src/military/expert/expertUser/reviewTasks/index.scss b/src/military/expert/expertUser/reviewTasks/index.scss
index 4d2df119..62bb6bd8 100644
--- a/src/military/expert/expertUser/reviewTasks/index.scss
+++ b/src/military/expert/expertUser/reviewTasks/index.scss
@@ -29,5 +29,9 @@
}
.pagination-table{
margin:0 2rem;
+
+ .red{
+ color: #DE0000;
+ }
}
}
diff --git a/src/military/expert/expertUser/taskDetail/index.jsx b/src/military/expert/expertUser/taskDetail/index.jsx
index d3245b8d..f29dd04e 100644
--- a/src/military/expert/expertUser/taskDetail/index.jsx
+++ b/src/military/expert/expertUser/taskDetail/index.jsx
@@ -1,8 +1,9 @@
import React, { useState, useCallback, useMemo, useEffect } from "react";
-import { Tabs, Input, Select, Button, Form, DatePicker, Table, Pagination, Upload, Modal } from 'antd';
+import { Tabs, Input, Select, Button, Form, DatePicker, InputNumber, Table, Pagination, Upload, Modal } from 'antd';
import { Link } from "react-router-dom";
import Paginationtable from "../../../components/paginationTable";
-import { getExpertTasks } from "../../api";
+import { getScoringDetails, } from "../../api";
+import { readyCheckPapers } from "../../../task/api";
import { taskType } from "../../static";
import { httpUrl } from '../../fetch';
@@ -12,24 +13,29 @@ const Option = Select.Option;
const { TabPane } = Tabs;
-function ReviewTasks({ form, showNotification, match, history }) {
- const id = match.params.id;
+function ReviewTasks({ form, 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);
-
- //tab栏
- const [activeKey, setActiveKey] = useState(0);
-
const [searchObj, setSearchObj] = useState({
containerName: '',
containerType: 1
});
+ const [taskId, setTaskId] = useState(461);
+ const [competitionId, setCompetitionId] = useState(461);
+
+ //tab栏
+ const [activeKey, setActiveKey] = useState(0);
+
const columns = useMemo(() => {
return [
@@ -47,13 +53,21 @@ function ReviewTasks({ form, showNotification, match, history }) {
},
{
title: '附件下载',
- dataIndex: 'highestDegree',
- key: 'highestDegree',
+ dataIndex: 'opsFilesAttachments',
+ key: 'opsFilesAttachments',
+ render: (text, record) => {
+ return text && text.map(item => {
+ return { downFile(item.id) }}>{item.fileName}
+ })
+ }
},
{
title: '评分一',
dataIndex: 'gradesOne',
key: 'gradesOne',
+ render: (text, record, index) => {
+ return
+ }
},
{
title: '评分二',
@@ -88,19 +102,66 @@ function ReviewTasks({ form, showNotification, match, history }) {
];
}, []);
- // 获取列表
+ // 获取成果列表
+ useEffect(() => {
+ let params = {
+ taskId,
+ checkStatus: '1',
+ pageSize: 10000,
+ curPage,
+ status: '',
+ parentId: 0,
+ }
+ taskId && readyCheckPapers(params).then(data => {
+ let dataArr = [];
+ if (data && Array.isArray(data.rows)) {
+ for (const item of data.rows) {
+ dataArr.push({
+ comments: "",
+ expertId: current_user.expertId,
+ gradesAverage: '',
+ gradesFive: '',
+ gradesFour: '',
+ gradesOne: '',
+ gradesThree: '',
+ gradesTwo: '',
+ opsContent: item.paperDetail && item.paperDetail.content,
+ opsFiles: item.paperDetail && item.paperDetail.busiAttachments && item.paperDetail.busiAttachments[0].id,
+ opsFilesAttachments: item.paperDetail && item.paperDetail.busiAttachments,
+ opsId: item.id,
+ opsParentId: containerId,
+ opsType: containerType,
+ status: 2
+ });
+ // item.detail = item.paperDetail && item.paperDetail.content;
+ // item.busiAttachments = item.paperDetail && item.paperDetail.busiAttachments;
+ }
+ }
+ setDataList(dataArr);
+ setLoading(false);
+ });
+ }, [taskId]);
+
+ function downFile(id) {
+ let url = httpUrl + '/busiAttachments/download/' + id;
+ window.open(url);
+ }
+
+ // 获取评分列表
useEffect(() => {
setLoading(true);
let params = {
- ...searchObj,
- pageSize,
- curPage,
- statusString: '1,-1',
+ containerId,
+ containerType,
+ isDistinct: false,
};
- getExpertTasks(params).then(data => {
- setDataList(data.rows || []);
- setLoading(false);
- setTotal(data.total);
+ getScoringDetails(params).then(res => {
+ if (res.data && res.data.rows && res.data.rows.length) {
+ setDataList(res.data.rows);
+ setLoading(false);
+ } else {
+ containerType == 1 ? setTaskId(containerId) : setCompetitionId(containerId);
+ }
});
}, [curPage, reload, pageSize]);
@@ -160,9 +221,7 @@ function ReviewTasks({ form, showNotification, match, history }) {
loading={loading}
dataSource={dataList}
columns={columns}
- total={total}
- setCurPage={setCurPage}
- current={curPage}
+ pagination={false}
/>
diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js
index dfcefaae..5e1a4771 100644
--- a/src/modules/tpm/NewHeader.js
+++ b/src/modules/tpm/NewHeader.js
@@ -606,7 +606,7 @@ class NewHeader extends Component {
})
}
render() {
- const { match } = this.props;
+ const { match,current_user } = this.props;
let { Addcoursestypes,
tojoinitemtype,
@@ -701,6 +701,7 @@ class NewHeader extends Component {
}
})
}
+
return (