fix: 주정차 심사 반영중

mpower
minuk926 2 years ago
parent afe55a91ac
commit d9bc8c2abb

@ -227,9 +227,9 @@ export async function findJudgeImages(row) {
]); ]);
return { return {
arrFrecadImg: frecadImgs.data, arrFrecadImg: frecadImgs,
arrContadImg: contadImgs.data, arrContadImg: contadImgs,
arrPicadImg: picadImgs.data arrPicadImg: picadImgs
}; };
} }
return res; return res;
@ -240,61 +240,11 @@ export async function saveJudgeResult(params) {
return await axios.post(SAVE_JUDGE_RESULT, params); return await axios.post(SAVE_JUDGE_RESULT, params);
} }
export async function findParkingImages2(row) { export async function findParkingImages(rcMaincode) {
const dataGb = row?.msDatagb;
const scCode = row?.msMaincode;
// const res = await findJudge(scCode);
// if (res.success) {
// const [frecadImgs, contadImgs, picadImgs] = await Promise.all([
// judgeImgList(res, scCode, 5, 'scFrecad', dataGb, 'getScFrecad'),
// judgeImgList(res, scCode, 9, 'scContad', dataGb, 'getScContad'),
// judgeImgList(res, scCode, 5, 'scPicad', dataGb, 'getScPicad')
// ]);
//
// return {
// arrFrecadImg: frecadImgs,
// arrContadImg: contadImgs,
// arrPicadImg: picadImgs
// };
//
// }
// return res;
const res = await axios.get(GET_PARKING_IMAGE2 + row?.rcMaincode);
return {
arrFrecadImg: [],
arrContadImg: [],
arrPicadImg: []
};
}
export async function findParkingImages(row) {
const dataGb = row?.msDatagb;
const scCode = row?.msMaincode;
// const res = await findJudge(scCode);
// if (res.success) {
// const [frecadImgs, contadImgs, picadImgs] = await Promise.all([
// judgeImgList(res, scCode, 5, 'scFrecad', dataGb, 'getScFrecad'),
// judgeImgList(res, scCode, 9, 'scContad', dataGb, 'getScContad'),
// judgeImgList(res, scCode, 5, 'scPicad', dataGb, 'getScPicad')
// ]);
//
// return {
// arrFrecadImg: frecadImgs,
// arrContadImg: contadImgs,
// arrPicadImg: picadImgs
// };
//
// }
// return res;
const [frecadImgs, contadImgs, picadImgs] = await Promise.all([ const [frecadImgs, contadImgs, picadImgs] = await Promise.all([
await axios.get(GET_PARKING_FRECAD_IMAGE + row?.rcMaincode), await axios.get(GET_PARKING_FRECAD_IMAGE + rcMaincode),
await axios.get(GET_PARKING_CONTAD_IMAGE + row?.rcMaincode), await axios.get(GET_PARKING_CONTAD_IMAGE + rcMaincode),
await axios.get(GET_PARKING_PICAD_IMAGE + row?.rcMaincode) await axios.get(GET_PARKING_PICAD_IMAGE + rcMaincode)
]); ]);
return { return {

@ -22,6 +22,7 @@ const ProcessJudge = (props) => {
const getImgList = (row) => { const getImgList = (row) => {
findJudgeImages(row).then((res) => { findJudgeImages(row).then((res) => {
const { arrFrecadImg, arrContadImg, arrPicadImg } = res; const { arrFrecadImg, arrContadImg, arrPicadImg } = res;
console.log(arrFrecadImg, arrContadImg, arrPicadImg);
setFrecadImgs(arrFrecadImg); setFrecadImgs(arrFrecadImg);
setContadImgs(arrContadImg); setContadImgs(arrContadImg);
setPicadImgs(arrPicadImg); setPicadImgs(arrPicadImg);
@ -142,11 +143,11 @@ const ProcessJudge = (props) => {
label="위반일자" label="위반일자"
format="####-##-##" format="####-##-##"
fullWidth fullWidth
value={rowDatas[pageRef.current].msWdate} value={rowDatas[pageRef.current]?.msWdate || ''}
/> />
</Grid> </Grid>
<Grid item xs={6}> <Grid item xs={6}>
<TextField size="small" required disabled label="위반장소" fullWidth value={rowDatas[pageRef.current].msPos} /> <TextField size="small" required disabled label="위반장소" fullWidth value={rowDatas[pageRef.current]?.msPos || ''} />
</Grid> </Grid>
<Grid item xs={2}> <Grid item xs={2}>
<FormControl fullWidth> <FormControl fullWidth>

@ -20,7 +20,7 @@ const ProcessParkingJudge = (props) => {
const [selectedImg, setSelectedImg] = useState({}); const [selectedImg, setSelectedImg] = useState({});
const getImgList = (row) => { const getImgList = (row) => {
findParkingImages(row).then((res) => { findParkingImages(row?.rcMaincode).then((res) => {
const { arrFrecadImg, arrContadImg, arrPicadImg } = res; const { arrFrecadImg, arrContadImg, arrPicadImg } = res;
console.log(arrFrecadImg, arrContadImg, arrPicadImg); console.log(arrFrecadImg, arrContadImg, arrPicadImg);
setFrecadImgs(arrFrecadImg); setFrecadImgs(arrFrecadImg);
@ -97,17 +97,17 @@ const ProcessParkingJudge = (props) => {
<Grid item xs={6.5}> <Grid item xs={6.5}>
<ImageList cols={4}> <ImageList cols={4}>
{frecadImgs?.map((img, idx) => ( {frecadImgs?.map((img, idx) => (
<ImgItem idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} /> <ImgItem key={idx} idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))} ))}
</ImageList> </ImageList>
<ImageList cols={4}> <ImageList cols={4}>
{contadImgs?.map((img, idx) => ( {contadImgs?.map((img, idx) => (
<ImgItem idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} /> <ImgItem key={idx} idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))} ))}
</ImageList> </ImageList>
<ImageList cols={4}> <ImageList cols={4}>
{picadImgs?.map((img, idx) => ( {picadImgs?.map((img, idx) => (
<ImgItem idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} /> <ImgItem key={idx} idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))} ))}
</ImageList> </ImageList>
</Grid> </Grid>
@ -143,11 +143,11 @@ const ProcessParkingJudge = (props) => {
label="위반일자" label="위반일자"
format="####-##-##" format="####-##-##"
fullWidth fullWidth
value={rowDatas[pageRef.current].msWdate} value={rowDatas[pageRef.current]?.msWdate || ''}
/> />
</Grid> </Grid>
<Grid item xs={6}> <Grid item xs={6}>
<TextField size="small" required disabled label="위반장소" fullWidth value={rowDatas[pageRef.current].msPos} /> <TextField size="small" required disabled label="위반장소" fullWidth value={rowDatas[pageRef.current]?.msPos || ''} />
</Grid> </Grid>
<Grid item xs={2}> <Grid item xs={2}>
<FormControl fullWidth> <FormControl fullWidth>

Loading…
Cancel
Save