From 5c5465e7718a84d5b2a39f4e5fae7d220bd4d8ed Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 05 三月 2025 10:13:14 +0800
Subject: [PATCH] 检验任务复核检验任务下载报告,下载的内容以后缀.htm形式出现
---
src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue | 41 ++++++++---------------------------------
1 files changed, 8 insertions(+), 33 deletions(-)
diff --git a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
index 08be833..3c08b0d 100644
--- a/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
+++ b/src/views/CNAS/systemManagement/documentControl/components/DistributionCollectionRecord.vue
@@ -18,7 +18,7 @@
</div>
<div class="btns" style="padding-left: 30px;">
<el-button v-if="addPower" size="small" type="primary"
- @click="addDialogVisible = true, addInfo = {}, radio = '鍙戞斁'">娣诲姞鍙戞斁璁板綍</el-button>
+ @click="addDialogVisible = true, addInfo = {}, radio = '鍙戞斁', file = null">娣诲姞鍙戞斁璁板綍</el-button>
<el-button v-if="outPower" :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
@@ -27,7 +27,7 @@
:height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
</div>
<el-dialog :title="'娣诲姞' + radio + '璁板綍'" :visible.sync="addDialogVisible" top="10vh" width="800px">
- <el-row>
+ <el-row v-if="addDialogVisible">
<el-col :span="12" style="margin-bottom: 16px;">
<div class="search_thing">
<div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鐢宠缂栧彿锛�</div>
@@ -152,7 +152,7 @@
<div class="search_thing">
<div class="search_label">涓婁紶闄勪欢锛�</div>
<div class="search_input"><el-upload :auto-upload="false" :multiple="false" :on-change="handleChangeUpload"
- accept='.pdf,.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
+ accept='.pdf,.doc,.docx,.xls,.xlsx' action="#" style="margin: 8px 0 0px 50px;">
<el-button size="small" type="primary">涓婁紶闄勪欢</el-button>
</el-upload></div>
</div>
@@ -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) {
@@ -505,6 +479,7 @@
handleUpdate(row) {
this.addInfo = this.HaveJson(row)
this.radio = '鍥炴敹'
+ this.file = null
this.addDialogVisible = true
},
// 瀹℃牳
--
Gitblit v1.9.3