fix: 심사 - 심사대상 이미지 view : 등록된 이미지만 보이도록 변경

mpower
minuk926 2 years ago
parent 0bc3fddbb7
commit c41c37f682

@ -22,7 +22,7 @@ const ProcessJudge = (props) => {
const getImgList = (row) => {
findJudgeImages(row).then((res) => {
const { arrFrecadImg, arrContadImg, arrPicadImg } = res;
// console.log(arrFrecadImg, arrContadImg, arrPicadImg);
console.log(arrFrecadImg, arrContadImg, arrPicadImg);
setFrecadImgs(arrFrecadImg);
setContadImgs(arrContadImg);
setPicadImgs(arrPicadImg);
@ -96,19 +96,25 @@ const ProcessJudge = (props) => {
<Grid container spacing={1}>
<Grid item xs={6}>
<ImageList cols={4}>
{frecadImgs?.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
{frecadImgs
?.filter((img) => img.imgName !== '')
.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
</ImageList>
<ImageList cols={4}>
{contadImgs?.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
{contadImgs
?.filter((img) => img.imgName !== '')
.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
</ImageList>
<ImageList cols={4}>
{picadImgs?.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
{picadImgs
?.filter((img) => img.imgName !== '')
.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
</ImageList>
</Grid>
<Grid item xs={5.9} ml={0.8} border={1}>

@ -96,19 +96,25 @@ const ProcessParkingJudge = (props) => {
<Grid container spacing={1}>
<Grid item xs={6}>
<ImageList cols={4}>
{frecadImgs?.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
{frecadImgs
?.filter((img) => img.imgName !== '')
.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`진술서${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
</ImageList>
<ImageList cols={4}>
{contadImgs?.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
{contadImgs
?.filter((img) => img.imgName !== '')
.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`첨부파일${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
</ImageList>
<ImageList cols={4}>
{picadImgs?.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
{picadImgs
?.filter((img) => img.imgName !== '')
.map((img, idx) => (
<ImgItem key={idx} idx={idx} title={`단속사진${idx + 1}`} imgInfo={img} onViewImage={viewImage} />
))}
</ImageList>
</Grid>
<Grid item xs={5.9} ml={0.8} border={1}>

Loading…
Cancel
Save