From d21c1a3d23db5fe3a24977a67ac12039b0ff1613 Mon Sep 17 00:00:00 2001 From: hanshaozhuang Date: Thu, 30 Jun 2022 09:16:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=94=B9=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomFormComponents/File.vue | 11 ++++++++--- .../components/EnterpriseStandardDatabase.vue | 1 + .../foreignStandardsAndRegulations/index.vue | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/CustomFormComponents/File.vue b/src/components/CustomFormComponents/File.vue index 8c53d94bb..278d37d52 100644 --- a/src/components/CustomFormComponents/File.vue +++ b/src/components/CustomFormComponents/File.vue @@ -251,18 +251,19 @@ export default { } }, methods: { + // 删除 handleRemoveFile(file){ - console.log('file = ', file) const index = this.$refs.importFileAboutStand.uploadFiles.findIndex(e => e.response.data.id === file.response.data.id); - console.log('index = ', index) this.$refs.importFileAboutStand.uploadFiles.splice(index, 1); this.showFileList.splice(index, 1) }, + // 修改 handleModifyName(file) { this.modifyFile.fileName = file.name this.modifyFile.fileId = file.response.data.id this.openModifyFileNameDialog = true }, + // 修改dialog-确认 handleModifyNameSubmite(){ this.modifyFileNameLoading = true this.$http.get('att/attFile/updateFileName', this.modifyFile, { @@ -271,7 +272,11 @@ export default { if(res.ok){ this.modifyFileNameLoading = false this.openModifyFileNameDialog = false - // TODO 查修改成功后 回显新的 名称 + this.showFileList.forEach(item=>{ + if(item.response.data.id === this.modifyFile.fileId){ + item.name = this.modifyFile.fileName + } + }) } }, e => { this.modifyFileNameLoading = false diff --git a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue index b0a2dec3e..ee5d345af 100644 --- a/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue +++ b/src/pages/regulatoryRepository/enterpriseStandardDatabase/components/EnterpriseStandardDatabase.vue @@ -823,6 +823,7 @@ :config="field" v-model="sarBussionessStandEO[field.attrField]" :disabled="formdisableflag" + :show-modify-name="true" >