diff --git a/src/military/competition/components/recordByJQTJModal.jsx b/src/military/competition/components/recordByJQTJModal.jsx
new file mode 100644
index 000000000..5d1e6d88b
--- /dev/null
+++ b/src/military/competition/components/recordByJQTJModal.jsx
@@ -0,0 +1,227 @@
+import React, { memo, useEffect, useState } from 'react';
+import { Modal, Table } from 'antd';
+import ColumnGroup from "antd/lib/table/ColumnGroup.js";
+import Column from "antd/lib/table/Column.js";
+import { encryptionuserId, gradeDetailSimulate } from '../api';
+import '../refer/index.scss';
+
+function RecordByJQTJModal(props) {
+ const {repoId, user_id, id} = props;
+ const [dataSource1, setDataSource1] = useState(undefined);
+ const [dataSource2, setDataSource2] = useState(undefined);
+ const [dataSource3, setDataSource3] = useState(undefined);
+ const [visible, setVisible] = useState(false);
+
+ useEffect(()=>{
+ id && gradeDetailSimulate({
+ index: repoId,
+ user_id: user_id+"",
+ match_id: id,
+ sign: encryptionuserId(user_id)
+ }).then(async res=>{
+ if(res && res.code === "000"){
+ await gradeDetail(res.result.grade1_info);
+ setVisible(true);
+ }
+ })
+ }, [id])
+
+ async function gradeDetail(info){
+ const {score, score_info:{add, minus}, score_info, basic, extra} = info;
+ // 综合得分数据
+ setDataSource1([{
+ score, add, basic: score_info.basic, minus
+ }]);
+
+ // 基础得分数据
+ const detail2 = [];
+ basic && basic.map((item, index)=>{
+ item.content.map((content1, index1)=>{
+ content1.content.map((content2, index2)=>{
+ detail2.push({
+ item1: item.item,
+ item1_score: item.item_score,
+ item1_rowSpan: item.content.length > 1 ? index1 > 0 ? 0 : item.content.length : 1,
+ item2: content1.sub_item,
+ item2_score: content1.sub_item_score,
+ item2_rowSpan: content1.content.length > 1 ? index2 > 0 ? 0 : content1.content.length : 1,
+ item3: content2.indicator,
+ item3_score: typeof(content2.indicator_score) === "object" ? content2.indicator_score.join(' | ') : content2.indicator_score,
+ score: score_info.basic,
+ score_rowSpan: 0
+ })
+ })
+ })
+ })
+ detail2[0].score_rowSpan = detail2.length;
+ setDataSource2(detail2);
+
+ // 加减得分数据
+ const detail3 = [];
+ extra && extra.map(item=>{
+ let count = 0;
+ item.content.map((content1, index1)=>{
+ content1.content.map((content2, index2)=>{
+ count++;
+ detail3.push({
+ type: item.item,
+ type_rowSpan: 0,
+ // 加减分项
+ repo: content1.item,
+ repo_rowSpan: content1.content.length > 1 ? index2 > 0 ? 0 : content1.content.length : 1,
+ // 加减分子项
+ repoDetail: content2.sub_item,
+ // 分值
+ repoDetailScore: content2.sub_item_score,
+ // 数量(死值 --)
+ repoDetailNum: '--',
+ // 汇总分
+ tpyeScore: item.item === '加分' ? add : minus,
+ tpyeScore_rowSpan: 0
+ })
+ })
+ })
+ item.count = count;
+ })
+ let index = 0
+ extra && extra.map(item => {
+ detail3[index].type_rowSpan = item.count;
+ detail3[index].tpyeScore_rowSpan = item.count;
+ index += item.count
+ })
+ setDataSource3(detail3);
+ }
+
+ // 模拟记录详情 综合评分table
+ const columns1 = [
+ {
+ title: '基础评分',
+ dataIndex: 'basic',
+ key: 0
+ },
+ {
+ title: '加分评分',
+ dataIndex: 'add',
+ key: 1
+ },
+ {
+ title: '减分评分',
+ dataIndex: 'minus',
+ key: 2
+ },
+ {
+ title: '综合评分',
+ dataIndex: 'score',
+ key: 3
+ }
+ ]
+
+ // 模拟记录详情 加减评分table
+ const columns3 = [
+ {
+ title: '类型',
+ dataIndex: 'type',
+ key: 0,
+ render: (value, row)=>{
+ return {
+ children: value,
+ props:{rowSpan: row.type_rowSpan}
+ }
+ }
+ },
+ {
+ title: '加减分项',
+ dataIndex: 'repo',
+ key: 1,
+ render: (value, row)=>{
+ return {
+ children: value,
+ props:{rowSpan: row.repo_rowSpan}
+ }
+ }
+ },
+ {
+ title: '加减分子项',
+ dataIndex: 'repoDetail',
+ key: 2
+ },
+ {
+ title: '分值',
+ dataIndex: 'repoDetailScore',
+ key: 3
+ },
+ {
+ title: '数量',
+ dataIndex: 'repoDetailNum',
+ key: 4
+ },
+ {
+ title: '汇总分',
+ dataIndex: 'tpyeScore',
+ key: 5,
+ render: (value, row)=>{
+ return {
+ children: value,
+ props:{rowSpan: row.tpyeScore_rowSpan}
+ }
+ }
+ }
+ ]
+
+ return (
+ {setVisible(false)}}
+ footer={null}
+ width={900}
+ className="jqtjModal recordDetailModal"
+ >
+ 综合评分
+
+ 基础评分
+
+
+ {
+ return {
+ children: value,
+ props:{rowSpan: row.item1_rowSpan}
+ }
+ }}>
+ {
+ return {
+ children: value,
+ props:{rowSpan: row.item1_rowSpan}
+ }
+ }}>
+
+
+ {
+ return {
+ children: value,
+ props:{rowSpan: row.item2_rowSpan}
+ }
+ }}>
+ {
+ return {
+ children: value,
+ props:{rowSpan: row.item2_rowSpan}
+ }
+ }}>
+
+
+
+ {
+ return {
+ children: value,
+ props:{rowSpan: row.score_rowSpan}
+ }
+ }}>
+
+ 加减分
+
+
+ )
+}
+
+export default memo(RecordByJQTJModal);
\ No newline at end of file
diff --git a/src/military/competition/management/jqtj.jsx b/src/military/competition/management/jqtj.jsx
index 5a650a355..7d4b55179 100644
--- a/src/military/competition/management/jqtj.jsx
+++ b/src/military/competition/management/jqtj.jsx
@@ -3,8 +3,8 @@ import { Base64 } from 'js-base64';
import { Select, Button, Tooltip, Input, Popconfirm, message } from 'antd';
import { current_main_site_url } from '../fetch';
import PaginationTable from "../../components/paginationTable";
-
-import { getEnrollList, updateEnroll, createUser, encryptionuserId, getScoreList } from "../api.js";
+import RecordModal from '../components/recordByJQTJModal';
+import { getEnrollList, updateEnroll, createUser, encryptionuserId, getScoreList, gradeDetailSimulate } from "../api.js";
import moment from "moment";
import Nodata from "src/forge/Nodata";
const Option = Select.Option;
@@ -24,6 +24,7 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
const [searchValue, setSearchValue] = useState(undefined);
const [scoreList, setScoreList] = useState({});
const [loadingBut, setLoadingBut] = useState(false);
+ const [params, setParams] = useState(undefined);
useEffect(() => {
setKeyword(undefined);
@@ -72,6 +73,13 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
})
}
+ // 查看用户模拟成绩详情
+ function seeDeatil(repoId, user_id, id){
+ setParams({
+ repoId, user_id, id
+ });
+ }
+
let columns_apply = useMemo(() => {
return [
{
@@ -236,6 +244,7 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
模拟项目
模拟时间
模拟分数
+ 操作
{score.map((item, index) => {
return
@@ -243,6 +252,9 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
{item.subject_name}
{moment(item.submit_time).format('YYYY-MM-DD HH:mm:ss')}
{item.score}
+
+
+
})}
:
@@ -334,6 +346,10 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
expandIconAsCell={false}
expandIcon={type === "applys" ? customExpandIcon : customExpandIcon1}
pageSize={10} />
+ {/* 模拟成绩详情 */}
+
)
}