fix: 주정차 심사 반영중

mpower
minuk926 2 years ago
parent afe55a91ac
commit d9bc8c2abb

@ -227,9 +227,9 @@ export async function findJudgeImages(row) {
]);
return {
arrFrecadImg: frecadImgs.data,
arrContadImg: contadImgs.data,
arrPicadImg: picadImgs.data
arrFrecadImg: frecadImgs,
arrContadImg: contadImgs,
arrPicadImg: picadImgs
};
}
return res;
@ -240,61 +240,11 @@ export async function saveJudgeResult(params) {
return await axios.post(SAVE_JUDGE_RESULT, params);
}
export async function findParkingImages2(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 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;
export async function findParkingImages(rcMaincode) {
const [frecadImgs, contadImgs, picadImgs] = await Promise.all([
await axios.get(GET_PARKING_FRECAD_IMAGE + row?.rcMaincode),
await axios.get(GET_PARKING_CONTAD_IMAGE + row?.rcMaincode),
await axios.get(GET_PARKING_PICAD_IMAGE + row?.rcMaincode)
await axios.get(GET_PARKING_FRECAD_IMAGE + rcMaincode),
await axios.get(GET_PARKING_CONTAD_IMAGE + rcMaincode),
await axios.get(GET_PARKING_PICAD_IMAGE + rcMaincode)
]);
return {

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

@ -20,7 +20,7 @@ const ProcessParkingJudge = (props) => {
const [selectedImg, setSelectedImg] = useState({});
const getImgList = (row) => {
findParkingImages(row).then((res) => {
findParkingImages(row?.rcMaincode).then((res) => {
const { arrFrecadImg, arrContadImg, arrPicadImg } = res;
console.log(arrFrecadImg, arrContadImg, arrPicadImg);
setFrecadImgs(arrFrecadImg);
@ -97,17 +97,17 @@ const ProcessParkingJudge = (props) => {
<Grid item xs={6.5}>
<ImageList cols={4}>
{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 cols={4}>
{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 cols={4}>
{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>
</Grid>
@ -143,11 +143,11 @@ const ProcessParkingJudge = (props) => {
label="위반일자"
format="####-##-##"
fullWidth
value={rowDatas[pageRef.current].msWdate}
value={rowDatas[pageRef.current]?.msWdate || ''}
/>
</Grid>
<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 item xs={2}>
<FormControl fullWidth>

Loading…
Cancel
Save