|
|
@ -143,29 +143,29 @@ export async function removeJudge(params) {
|
|
|
|
return await axios.post(REMOVE_ADMIN_JUDGE, params);
|
|
|
|
return await axios.post(REMOVE_ADMIN_JUDGE, params);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export async function judgeFileDownload(params, alert) {
|
|
|
|
// export async function judgeFileDownload(params, alert) {
|
|
|
|
await axios
|
|
|
|
// await axios
|
|
|
|
.get(GET_JUDGE_FILE_DOWNLOAD, {
|
|
|
|
// .get(GET_JUDGE_FILE_DOWNLOAD, {
|
|
|
|
responseType: 'blob',
|
|
|
|
// responseType: 'blob',
|
|
|
|
params
|
|
|
|
// params
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
// eslint-disable-next-line consistent-return
|
|
|
|
// // eslint-disable-next-line consistent-return
|
|
|
|
.then((res) => {
|
|
|
|
// .then((res) => {
|
|
|
|
if (res?.isAxiosError || res?.status === 404 || res?.size <= 0) {
|
|
|
|
// if (res?.isAxiosError || res?.status === 404 || res?.size <= 0) {
|
|
|
|
alert.show('파일을 다운로드 할 수 없습니다 [파일정보 오류]');
|
|
|
|
// alert.show('파일을 다운로드 할 수 없습니다 [파일정보 오류]');
|
|
|
|
} else {
|
|
|
|
// } else {
|
|
|
|
// eslint-disable-next-line no-lonely-if
|
|
|
|
// // eslint-disable-next-line no-lonely-if
|
|
|
|
if (res?.type.includes('image')) {
|
|
|
|
// if (res?.type.includes('image')) {
|
|
|
|
// const url = window.URL.createObjectURL(res);
|
|
|
|
// // const url = window.URL.createObjectURL(res);
|
|
|
|
|
|
|
|
// alert.show('~~~~~');
|
|
|
|
alert.show(<img alt="~~~" src={URL.createObjectURL(res)} style={{ margin: 'auto' }} />);
|
|
|
|
// alert.show(<img alt="~~~" src={URL.createObjectURL(res)} style={{ margin: 'auto' }} />);
|
|
|
|
// URL.revokeObjectURL()
|
|
|
|
// // URL.revokeObjectURL()
|
|
|
|
} else {
|
|
|
|
// } else {
|
|
|
|
FileSaver.saveAs(res, 'filename');
|
|
|
|
// FileSaver.saveAs(res, 'filename');
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
export async function saveJudgeStds(params) {
|
|
|
|
export async function saveJudgeStds(params) {
|
|
|
|
// eslint-disable-next-line no-return-await
|
|
|
|
// eslint-disable-next-line no-return-await
|
|
|
@ -236,8 +236,8 @@ export async function findJudgeImages(row) {
|
|
|
|
return res;
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function parkingJudgeImgList(arrImgInfo, fieldName) {
|
|
|
|
async function parkingJudgeImgList(arrImgInfo) {
|
|
|
|
console.log(arrImgInfo);
|
|
|
|
// console.log(arrImgInfo);
|
|
|
|
const arrRtn = [];
|
|
|
|
const arrRtn = [];
|
|
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
|
|
// eslint-disable-next-line no-restricted-syntax
|
|
|
|
for (const idx of _.range(1, arrImgInfo.length + 1, 1)) {
|
|
|
|
for (const idx of _.range(1, arrImgInfo.length + 1, 1)) {
|
|
|
@ -276,9 +276,9 @@ export async function findParkingImages(rcMaincode) {
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
const [frecads, contads, picads] = await Promise.all([
|
|
|
|
const [frecads, contads, picads] = await Promise.all([
|
|
|
|
parkingJudgeImgList(frecadImgs?.data, 'frecad'),
|
|
|
|
parkingJudgeImgList(frecadImgs?.data),
|
|
|
|
parkingJudgeImgList(contadImgs?.data, 'contad'),
|
|
|
|
parkingJudgeImgList(contadImgs?.data),
|
|
|
|
parkingJudgeImgList(picadImgs?.data, 'picad')
|
|
|
|
parkingJudgeImgList(picadImgs?.data)
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|