From e79907270604b30c9699e1c53987d25287ae29a7 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期二, 04 三月 2025 17:09:54 +0800 Subject: [PATCH] 文件管理bug修改 --- src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue | 34 ++++------------------------------ 1 files changed, 4 insertions(+), 30 deletions(-) diff --git a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue index 0548ea4..ae46af0 100644 --- a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue +++ b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue @@ -245,7 +245,7 @@ clickFun: (row) => { this.handleDelete(row); }, - disabFun: (row, index) => { + disabled: (row, index) => { return row.documentState == '閫氳繃' } }, @@ -255,7 +255,7 @@ clickFun: (row) => { this.handleLook(row); }, - disabFun: (row, index) => { + disabled: (row, index) => { return !row.url } }, @@ -265,7 +265,7 @@ clickFun: (row) => { this.handleCheck(row); }, - disabFun: (row, index) => { + disabled: (row, index) => { return row.receiveUser != this.userId || row.documentState == '閫氳繃' } }, @@ -394,33 +394,7 @@ exportManageDocumentIssueRecycle(this.queryParams).then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); - // this.$download.saveAs(blob, '鍙戞斁鍥炴敹璁板綍.xlsx') - //灏咮lob 瀵硅薄杞崲鎴愬瓧绗︿覆 - let reader = new FileReader(); - reader.readAsText(blob, 'utf-8'); - reader.onload = () => { - try { - let result = JSON.parse(reader.result); - if (result.message) { - this.$message.error(result.message); - } else { - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '鍙戞斁鍥炴敹璁板綍.xlsx'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } catch (err) { - console.log(err); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.download = '鍙戞斁鍥炴敹璁板綍.xlsx'; - link.click(); - this.$message.success('瀵煎嚭鎴愬姛') - } - } + this.$download.saveAs(blob, '鍙戞斁鍥炴敹璁板綍.xlsx'); }) }, changeFileList(e) { -- Gitblit v1.9.3