From db1752d3977c0e9421a3651043412db6aa120927 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Mon, 11 Apr 2022 20:17:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B1=B0=EC=A3=BC=EC=9E=90/=EC=9E=A5?= =?UTF-8?q?=EC=95=A0=EC=9D=B8=20=EC=8B=AC=EC=9D=98=EB=8C=80=EC=83=81=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=EC=A1=B0=ED=9A=8C=20=EC=A7=84=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/judge.js | 2 +- src/views/biz/judge/ModalJudgeDetail.jsx | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/apis/judge.js b/src/apis/judge.js index 422f46a..9d6616e 100644 --- a/src/apis/judge.js +++ b/src/apis/judge.js @@ -53,7 +53,7 @@ export async function findJudges(params) { export async function findJudgeDetails(params) { const res = await axios.get(GET_JUDGE_DETAIL_LIST, { params }); if (res.success) { - res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) })); + // res.data = res.data.map((d, idx) => ({ ...d, rowId: setRowId(params, idx) })); return res; } return res; diff --git a/src/views/biz/judge/ModalJudgeDetail.jsx b/src/views/biz/judge/ModalJudgeDetail.jsx index cdfb38e..65f98c4 100644 --- a/src/views/biz/judge/ModalJudgeDetail.jsx +++ b/src/views/biz/judge/ModalJudgeDetail.jsx @@ -24,7 +24,29 @@ const ModalDetails = ({ msDatagb, msSdate, msEdate, msChasu, msuTeam }) => { findJudgeDetails(params).then((response) => { if (response && response.data) { - setTotalCount(response.count); + console.log(response.data); + const totUserList = response.data?.totUserList; + const resultList = response.data?.resultList; + const gridRows = []; + const aaa = resultList.map((m) => { + // const users = m.simsa.map((u) => ({ ...m, name: u.NAME, msResult: u.msResult, msuResult: u.msuResult })); + m.simsa.reduce((pre, cur) => { + console.log(pre, cur); + // return pre.concat(cur); + return { pre, ...cur }; + }); + return m; + }); + /* + gridRows.push({ + msMainCode: m.msMainCode, + msSeq: m.msSeq, + msCarnum: m.msCarnum, + + }) + */ + + setTotalCount(totUserList.length); setRowsState((prevState) => ({ ...prevState, rows: response.data })); // apiRef.current.forceUpdate(); // .updateRowData([]); // apiRef.current.updateRowData([]);