From 87af11288d6f250bee96187572d1635584fb9632 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 28 Jan 2026 08:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../terminal/FrontManagement/index.vue | 8 +- .../division/components/aListOfLoadData.vue | 2 +- .../reportForms/word/index.vue | 2 +- src/views/pqs/supervise/testRun/index.vue | 2 +- .../Region/components/Tableabove.vue | 20 ++++- .../Region/transientList/index.vue | 2 +- .../voltageSags/report/eventReports/index.vue | 3 +- .../pqs/voltageSags/report/weekly/index.vue | 76 +++++++++---------- src/views/system/icd/form.vue | 23 +++++- src/views/system/icd/index.vue | 2 +- 10 files changed, 87 insertions(+), 53 deletions(-) diff --git a/src/views/pqs/business/terminal/FrontManagement/index.vue b/src/views/pqs/business/terminal/FrontManagement/index.vue index 1746dcb0..1eebaa70 100644 --- a/src/views/pqs/business/terminal/FrontManagement/index.vue +++ b/src/views/pqs/business/terminal/FrontManagement/index.vue @@ -139,9 +139,9 @@ > - + @@ -92,6 +92,12 @@ const isValidFile = (file: UploadRawFile) => { return false } + // 检查文件名是否包含空格 + if (file.name.includes(' ')) { + ElMessage.error('文件名不能包含空格,请重命名文件后再上传') + return false + } + return true } // 上传报告 @@ -102,6 +108,14 @@ const handleExceed: UploadProps['onExceed'] = files => { uploadRef.value!.clearFiles() const file = files[0] as UploadRawFile file.uid = genFileId() + + // 检查文件名是否包含空格 + if (file.name.includes(' ')) { + ElMessage.error('文件名不能包含空格,请重命名文件后再上传') + return + } + + uploadRef.value!.handleStart(file) } @@ -116,6 +130,13 @@ const submit = async () => { return ElMessage.warning('请上传icd文件') } if (reportPath.value[0]?.raw != undefined) { + + // 检查文件名是否包含空格 + if (reportPath.value[0].raw.name.includes(' ')) { + ElMessage.error('文件名不能包含空格,请重命名文件后再上传') + return + } + await uploadFile(reportPath.value[0].raw, '/icd/').then(res => { //治理工程验收报告 form.fileName = res.data.fileName.split('.')[0] diff --git a/src/views/system/icd/index.vue b/src/views/system/icd/index.vue index 191c2f12..341453f3 100644 --- a/src/views/system/icd/index.vue +++ b/src/views/system/icd/index.vue @@ -9,7 +9,7 @@ maxlength="32" show-word-limit clearable - placeholder="请输入任务名称" + placeholder="请输入icd名称" />