From cb2a01ee7dea28a2661720060b03c41dc372acb5 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期五, 01 八月 2025 11:53:16 +0800
Subject: [PATCH] 完善串口处理数据,数据选择
---
src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 105 ++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 76 insertions(+), 29 deletions(-)
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
index 25b9c4d..0ae1168 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
@@ -2,18 +2,19 @@
<!-- 7.7璐ㄩ噺鐩戞帶璁″垝-->
<div class="app-container">
<div class="table-card">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="yearForm" ref="yearForm" size="small" :inline="true">
- <el-form-item label="璁″垝鍚嶇О" prop="monitorName">
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">璁″垝鍚嶇О</span>
<el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="yearForm.monitorName"
- @keyup.enter.native="getYearPlanList"></el-input>
- </el-form-item>
- <el-form-item>
+ @keyup.enter.native="getYearPlanList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
<el-button type="primary" size="mini" @click="getYearPlanList">鏌ヨ</el-button>
<el-button size="mini" @click="clearYear">閲嶇疆</el-button>
- </el-form-item>
- </el-form>
- <div>
+ </div>
+ </div>
+ <div style="line-height: 30px;">
<el-button size="small" type="primary" @click="leadInto">瀵煎叆</el-button>
</div>
</div>
@@ -21,20 +22,25 @@
:height="'calc(100vh - 34em)'" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table>
</div>
<div style="margin-top: 20px">
- <div style="display: flex;justify-content: space-between;">
- <el-form :model="yearDetailForm" ref="yearDetailForm" size="small" :inline="true">
- <el-form-item label="鐩戞帶鐩殑" prop="monitorPurpose">
- <el-input v-model="yearDetailForm.monitorPurpose" placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item label="鐩戞帶椤圭洰" prop="monitorProject">
- <el-input v-model="yearDetailForm.monitorProject" placeholder="璇疯緭鍏�" size="small"></el-input>
- </el-form-item>
- <el-form-item>
+ <div style="display: flex;justify-content: space-between">
+ <div style="display: flex;">
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐩戞帶鐩殑</span>
+ <el-input v-model="yearDetailForm.monitorPurpose" placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getYearDetailPlanList"></el-input>
+ </div>
+ <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
+ <span style="width: 88px;font-size: 14px;font-weight: 700;color: #606266;">鐩戞帶椤圭洰</span>
+ <el-input v-model="yearDetailForm.monitorProject" placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="getYearDetailPlanList"></el-input>
+ </div>
+ <div style="line-height: 30px;">
<el-button type="primary" size="mini" @click="getYearDetailPlanList">鏌ヨ</el-button>
<el-button size="mini" @click="clearDetail">閲嶇疆</el-button>
- </el-form-item>
- </el-form>
- <div>
+ </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>
@@ -79,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>
鎵瑰噯鐘舵�侊細
@@ -97,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">
@@ -145,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>
@@ -387,8 +395,10 @@
if (params === 0) {
return '鏈紑濮�';
} else if (params === 1) {
- return '寰呮壒鍑�';
- } else if (params === 2) {
+ return '寰呰瘎浠�';
+ } else if (params === 2) {
+ return '涓嶆壒鍑�';
+ } else if (params === 3) {
return '宸叉壒鍑�';
} else {
return null;
@@ -400,6 +410,8 @@
} else if (params === 1) {
return 'warning';
} else if (params === 2) {
+ return 'danger';
+ } else if (params === 3) {
return 'success';
} else {
return null;
@@ -557,7 +569,8 @@
ratifyRemark: '',
downloadDialog: false,
download: {},
- planYear: ''
+ planYear: '',
+ option: {}
};
},
mounted() {
@@ -790,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
@@ -872,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 => {
@@ -902,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