From 7a8c85b405820490b6653be923a4b351f437426e Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期二, 25 二月 2025 16:39:39 +0800 Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev --- src/views/business/reportPreparation/index.vue | 39 +++++++++++---------------------------- 1 files changed, 11 insertions(+), 28 deletions(-) diff --git a/src/views/business/reportPreparation/index.vue b/src/views/business/reportPreparation/index.vue index 60a78b9..640fd87 100644 --- a/src/views/business/reportPreparation/index.vue +++ b/src/views/business/reportPreparation/index.vue @@ -43,13 +43,13 @@ :on-success="handleSuccessUp1" :show-file-list="false" accept='.doc,.docx'> - <el-button size="small" type="text" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName">涓婁紶</el-button> + <el-button size="small" type="text" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName">涓婁紶</el-button> </el-upload> - <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handleRestore(scope.row)">杩樺師</el-button> - <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">閫�鍥炰换鍔�</el-button> - <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handle(scope.row)">鎻愪氦</el-button> - <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || userName !== scope.row.examineUser" @click="handleIssued(scope.row)">瀹℃牳</el-button> - <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || userName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">鎵瑰噯</el-button> + <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handleRestore(scope.row)">杩樺師</el-button> + <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">閫�鍥炰换鍔�</el-button> + <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handle(scope.row)">鎻愪氦</el-button> + <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || nickName !== scope.row.examineUser" @click="handleIssued(scope.row)">瀹℃牳</el-button> + <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || nickName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">鎵瑰噯</el-button> <el-popover placement="bottom" trigger="hover" style="margin-left: 6px"> <template #reference> <el-button link type="text" size="small">鏇村</el-button> @@ -555,13 +555,10 @@ let url = ''; if(res.data.type==1){ url = this.javaApi+'/img/'+res.data.fileUrl - file.downloadIamge(url,row.fileName) + this.$download.saveAs(url, row.fileName); }else{ url = this.javaApi+'/word/'+res.data.fileUrl - const link = document.createElement('a'); - link.href = url; - link.download = row.fileName; - link.click(); + this.$download.saveAs(url, row.fileName); } } }).catch(error => { @@ -603,17 +600,7 @@ downAll({ids: str}).then(res => { this.outLoading = false this.$message.success('瀵煎嚭鎴愬姛') - // const blob = new Blob([res],{ type: 'application/octet-stream' }); - // const url = URL.createObjectURL(blob); - // const link = document.createElement('a'); - // link.href = url; - // link.download = '鎶ュ憡.zip'; - // link.click(); - const link = document.createElement('a'); - link.href = this.javaApi + res.message; - link.target = '_blank'; - document.body.appendChild(link); - link.click(); + this.$download.saveAs(this.javaApi + res.message, row.fileName); }) }, beforeUpload(file){ @@ -709,12 +696,8 @@ } }, download(row) { - let url = row.urlS ? row.urlS : row.url; - const link = document.createElement('a'); - link.href = this.javaApi + url; - link.target = '_blank'; - document.body.appendChild(link); - link.click(); + let url = this.javaApi+'/word/' + row.urlS ? row.urlS : row.url; + this.$download.saveAs(url, row.fileName); }, // 杩樺師鎿嶄綔 handleRestore(row) { -- Gitblit v1.9.3