From 7eb190f13437b2e67788e9f4bdea725fdb165f01 Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期二, 20 五月 2025 10:41:01 +0800 Subject: [PATCH] 代码合并 --- src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue index 431f997..0ae1168 100644 --- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue @@ -40,6 +40,7 @@ </div> </div> <div style="line-height: 30px;"> + <el-button size="small" type="primary" @click="exportSignatureTemplate">瀵煎嚭绛惧悕妯℃澘</el-button> <el-button size="small" type="primary" @click="showDialog('add')">鏂板</el-button> </div> </div> @@ -84,7 +85,7 @@ </el-dialog> <!--棰勮鎶ュ憡--> <el-dialog :visible.sync="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px"> - <filePreview v-if="lookDialogVisible" :currentFile="{}" + <filePreview v-if="lookDialogVisible" :currentFile="{}" :option="option" :fileUrl="javaApi + '/word/' + currentInfo.finishReportUrl" style="height: 70vh;overflow-y: auto;" /> <div> 鎵瑰噯鐘舵�侊細 @@ -102,9 +103,11 @@ </el-dialog> <el-dialog :visible.sync="downloadDialog" title="瀵煎嚭" width="600px"> <span> - <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId" + <el-button plain type="primary" :disabled="download.detailsRatifyStatus !== 3" @click="controlDown">瀹炴柦璁″垝瀵煎嚭</el-button> - <el-button plain type="primary" :disabled="!download.qualityMonitorDetailsId" + <el-button plain type="primary" :disabled="!download.finishReportUrl" + @click="finishReportExport">瀹屾垚鎶ュ憡瀵煎嚭</el-button> + <el-button plain type="primary" :disabled="download.evaluateStatus !== 3" @click="processingDown">璇勪环瀵煎嚭</el-button> </span> <span slot="footer" class="dialog-footer"> @@ -150,7 +153,7 @@ <div style="margin: 0 auto;"> <el-upload ref="upload1" :action="action1" :auto-upload="false" :data="{ qualityMonitorDetailsId: qualityMonitorDetailsId }" :file-list="fileList1" :headers="uploadHeader" - :limit="1" :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx' drag + :limit="1" :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx,application/pdf,' drag name="file"> <i class="el-icon-upload"></i> <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> @@ -566,7 +569,8 @@ ratifyRemark: '', downloadDialog: false, download: {}, - planYear: '' + planYear: '', + option: {} }; }, mounted() { @@ -799,6 +803,23 @@ if (row.finishReportUrl) { this.currentInfo = row this.ratifyStatus = row.ratifyStatus + const userName = this.nickName + const isPdf = /\.pdf$/i.test(row.finishReportUrl) + if (isPdf) { + this.option = { + url: this.javaApi + "/word/" + row.finishReportUrl, + isEdit: false, + fileType: 'pdf', + title: '鎶ュ憡', + lang: 'zh-CN', + isPrint: false, + user_id: 1, + user_name: userName, + editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + row.finishReportUrl + } + } else { + this.option = {} + } this.lookDialogVisible = true } else { this.uploadDia1 = true @@ -881,6 +902,15 @@ this.$download.saveAs(blob, '璐ㄩ噺鐩戞帶瀹炴柦璁″垝.docx') }) }, + // 瀹屾垚鎶ュ憡瀵煎嚭 + finishReportExport() { + let url = this.download.finishReportUrl; + const link = document.createElement('a'); + link.href = this.javaApi +'/word/' + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); + }, // 澶勭悊鍗曞鍑� processingDown() { exportQualityMonitorEvaluate({ qualityMonitorDetailsId: this.download.qualityMonitorDetailsId }).then(res => { @@ -911,11 +941,19 @@ selectUserCondition().then((res) => { this.responsibleOptions = res.data; }) + }, + exportSignatureTemplate() { + let url = '璐ㄩ噺鐩戞帶璁板綍绛惧悕妯℃澘.docx'; + const link = document.createElement('a'); + link.href = this.javaApi +'/word/' + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); } }, // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� computed: { - ...mapGetters(["userId"]), + ...mapGetters(["userId", "nickName"]), action() { return this.javaApi + '/qualityMonitor/importQualityMonitor' }, -- Gitblit v1.9.3