diff --git a/src/military/competition/api.js b/src/military/competition/api.js index 370add8c0..aba1b2d57 100644 --- a/src/military/competition/api.js +++ b/src/military/competition/api.js @@ -170,3 +170,12 @@ export function matchReplay(data) { data: data }); } + +// 报名列表-获取用户模拟成绩 +export function getScoreList(data) { + return fetch({ + url: '/api/match/simulated_match_team_list', + method: 'post', + data: data + }); +} \ No newline at end of file diff --git a/src/military/competition/management/index.scss b/src/military/competition/management/index.scss index 7d27ed926..81e203a35 100644 --- a/src/military/competition/management/index.scss +++ b/src/military/competition/management/index.scss @@ -2,7 +2,7 @@ width: 1200px; margin: 35px auto 0; background: #fff; - padding-bottom: 20px; + padding-bottom: 100px; .qz_manage_head{ color: #181818; padding: 12px 0 13px 30px; diff --git a/src/military/competition/management/jqtj.jsx b/src/military/competition/management/jqtj.jsx index b83452951..5a650a355 100644 --- a/src/military/competition/management/jqtj.jsx +++ b/src/military/competition/management/jqtj.jsx @@ -4,7 +4,9 @@ import { Select, Button, Tooltip, Input, Popconfirm, message } from 'antd'; import { current_main_site_url } from '../fetch'; import PaginationTable from "../../components/paginationTable"; -import { getEnrollList, getProList, updateEnroll, createUser, encryptionuserId } from "../api.js"; +import { getEnrollList, updateEnroll, createUser, encryptionuserId, getScoreList } from "../api.js"; +import moment from "moment"; +import Nodata from "src/forge/Nodata"; const Option = Select.Option; const { Search } = Input; @@ -20,6 +22,8 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { const [keyword, setKeyword] = useState(undefined); const [reload, setReload] = useState(undefined); const [searchValue, setSearchValue] = useState(undefined); + const [scoreList, setScoreList] = useState({}); + const [loadingBut, setLoadingBut] = useState(false); useEffect(() => { setKeyword(undefined); @@ -34,30 +38,17 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { page: curPage, limit: 10, keyword, - status - } - if (type === "applys") { - // 报名列表 - getEnrollList(params, competitionId).then(response => { - if (response && response.status === 200) { - setTotal(response.data.count); - setDataList(response.data.data); - } - }).finally(() => { - setLoading(false); - }) - } else { - // 提交作品列表 - delete params.status; - getProList(params, competitionId).then(response => { - if (response && response.status === 200) { - setTotal(response.data.count); - setDataList(response.data.data); - } - }).finally(() => { - setLoading(false); - }) + status: type === "applys" ? status : '2' } + // 获取报名信息 + getEnrollList(params, competitionId).then(response => { + if (response && response.status === 200) { + setTotal(response.data.count); + setDataList(response.data.data); + } + }).finally(() => { + setLoading(false); + }) }, [type, curPage, keyword, status, reload]) // 改变用户的报名信息 @@ -169,24 +160,9 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { return {text}; } }, - { - title: '作品', - dataIndex: 'attachments', - render: (text, record) => { - return {text[0] && text[0].title}; - } - }, { title: '操作', - dataIndex: "status", - align: "center", - render: (text, record) => { - return text === 2 ? : } - onConfirm={() => { reject(record.user_id, 2) }} - > - } + align: "center" } ]; }, [qzDetail]); @@ -252,6 +228,26 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { } + const expandRow1 = (record) => { + const score = scoreList[record.user_id]; + return score && score.length ?
+
+
序号
+
模拟项目
+
模拟时间
+
模拟分数
+
+ {score.map((item, index) => { + return
+
{index + 1}
+
{item.subject_name}
+
{moment(item.submit_time).format('YYYY-MM-DD HH:mm:ss')}
+
{item.score}
+
+ })} +
: + } + const customExpandIcon = (props) => { if (props.record.members && props.record.members.length > 0) { if (props.expanded) { @@ -264,7 +260,40 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { }}>查看成员 } } else { - return 查看成员 + return 查看成员 + } + } + + const customExpandIcon1 = (props) => { + if (props.expanded) { + return + } else { + return } } @@ -286,8 +315,9 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) {
{type === "applys" && } - {type === "production" && } - + {type === "applys" && } + {/* {type === "production" && } */} + {/* */}
@@ -299,10 +329,10 @@ function Introduce({ history: { location: { pathname } }, qzDetail, match }) { total={total} setCurPage={(page) => setCurPage(page)} current={curPage} - expandedRowRender={qzDetail && qzDetail.is_local ? expandRow : expandRowWai} - expandIconColumnIndex={type === "applys" ? qzDetail && qzDetail.is_local ? 7 : 4 : 20} + expandedRowRender={type === "applys" ? qzDetail && qzDetail.is_local ? expandRow : expandRowWai : expandRow1} + expandIconColumnIndex={type === "applys" ? qzDetail && qzDetail.is_local ? 7 : 4 : 4} expandIconAsCell={false} - expandIcon={customExpandIcon} + expandIcon={type === "applys" ? customExpandIcon : customExpandIcon1} pageSize={10} /> )