From 34bad5ccb3c66d2a23e2fe216a67af152a900972 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Tue, 24 Sep 2024 14:07:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/src/views/userManage/personnel/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index 31328a9..19c5b20 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -46,7 +46,7 @@ - + {{ cmdEnum.UnderpantsUnBinding }} From 07cf61b7d4c05bfdbbba45cf137551d186430078 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Tue, 24 Sep 2024 15:19:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/userManage/personnel/components/form/index.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue index a9f94ec..1c50e15 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue @@ -68,6 +68,8 @@ function onOpen(props: FormProps.Base) { if (props.record.personId) { //如果传了id,就去请求api获取record userManagePersonnelApi.detail({ id: props.record.personId }).then((res: any) => { + if (!res.data.majorId) res.data.majorId = ""; + if (!res.data.depId) res.data.depId = ""; sysUserProps.record = res.data; }); } From a498da7206d1c23c7cdb070114e373514799f76d Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Tue, 24 Sep 2024 17:31:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8B=A6=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/violation/analysis/index.vue | 48 +++++++++++-------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/SafeCampus.WEB/src/views/violation/analysis/index.vue b/SafeCampus.WEB/src/views/violation/analysis/index.vue index 62dbbb7..0cd8a5a 100644 --- a/SafeCampus.WEB/src/views/violation/analysis/index.vue +++ b/SafeCampus.WEB/src/views/violation/analysis/index.vue @@ -93,25 +93,35 @@ const onTimeSubmit = ()=>{ startTime: timeForm.dateArr[0], endTime: timeForm.dateArr[1], }).then((res:any) => { - console.log(res,"....UTF-8''"); - const filename:any = ref() - filename.value = window.decodeURI(res.headers["content-disposition"].split("=")[2]); - - filename.value = filename.value.slice(7,-1) - let blobUrl = window.URL.createObjectURL(res.data); - const a = document.createElement('a'); - a.style.display = 'none'; - a.setAttribute("target", "_blank"); - a.download = filename.value - a.href = blobUrl; - a.click(); - a.remove(); - ElMessage({ - message: '导出成功', - type: 'success' - }); - closeTime(); - }); + if(res.headers['content-disposition']){ + const filename:any = ref() + filename.value = window.decodeURI(res.headers["content-disposition"].split("=")[2]); + filename.value = filename.value.slice(7,-1) + let blobUrl = window.URL.createObjectURL(res.data); + const a = document.createElement('a'); + a.style.display = 'none'; + a.setAttribute("target", "_blank"); + a.download = filename.value + a.href = blobUrl; + a.click(); + a.remove(); + ElMessage({ + message: '导出成功', + type: 'success' + }); + closeTime(); + }else{ + const fileReader:any = new FileReader() + fileReader.readAsText(new Blob([res.data], { type: 'application/octet-stream' }), 'utf-8') + fileReader.onload = () => { + const result = JSON.parse(fileReader.result) + ElMessage({ + message: result.msg, + type: 'error' + }); + } + } + }) } else { return false;