From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期二, 29 四月 2025 13:25:29 +0800
Subject: [PATCH] Merge branch 'dev' into dev_tides

---
 src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue |  234 ++++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 184 insertions(+), 50 deletions(-)

diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
index e5119d0..efd399a 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue
@@ -2,44 +2,50 @@
   <!--  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>
-            <el-button icon="el-icon-refresh" size="mini" @click="clearYear">閲� 缃�</el-button>
-            <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearPlanList">鏌� 璇�</el-button>
-          </el-form-item>
-        </el-form>
-        <div>
+                      @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>
+          </div>
+        </div>
+        <div style="line-height: 30px;">
           <el-button size="small" type="primary" @click="leadInto">瀵煎叆</el-button>
         </div>
       </div>
       <lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading"
-        height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table>
+                  :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>
-            <el-button icon="el-icon-refresh" size="mini" @click="clearDetail">閲� 缃�</el-button>
-            <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearDetailPlanList">鏌� 璇�</el-button>
-          </el-form-item>
-        </el-form>
-        <div>
+      <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>
+          </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>
       <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage"
-        :tableLoading="yearDetailLoading" height="40vh" @pagination="pagination1"
+        :tableLoading="yearDetailLoading" :height="'calc(100vh - 34em)'" @pagination="pagination1" ref="yearDetailTableData"
         key="yearDetailTableData"></lims-table>
     </div>
     <!--鏂板淇敼寮规-->
@@ -47,7 +53,7 @@
       @closeDia="closeDia"></detail-form-dialog>
     <!--瀹炴柦娴佺▼寮规-->
     <carry-out-dialog v-if="carryOutDia" ref="carryOutDia" :qualityMonitorId="qualityMonitorId"
-      @closeDia="closeCarryOutDia"></carry-out-dialog>
+      @closeCarryOutDia="closeCarryOutDia"></carry-out-dialog>
     <!--璇勪环娴佺▼寮规-->
     <evaluate-dialog v-if="evaluateDialog" ref="evaluateDialog" @closeEvaDia="closeEvaDia"></evaluate-dialog>
     <el-dialog :visible.sync="examineDialog" title="瀹℃牳" width="30%" @close="closeExamineDia">
@@ -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">
@@ -156,6 +164,7 @@
         <el-button :loading="uploading1" type="primary" @click="submitUpload1()">涓� 浼�</el-button>
       </span>
     </el-dialog>
+    <view-record v-if="ViewRecord" ref="ViewRecord"></view-record>
   </div>
 </template>
 
@@ -174,14 +183,16 @@
 } from "@/api/cnas/process/ensureResults/qualityMonitor";
 import { selectUserCondition } from "@/api/performance/class";
 import { mapGetters } from "vuex";
+import ViewRecord from "./components/ViewRecord.vue";
 
 export default {
   name: 'EnsureResultsValidity',
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
-  components: { limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog },
+  components: {ViewRecord, limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog },
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
     return {
+      ViewRecord: false,
       examineUserId: '',
       responsibleOptions: [],
       yearForm: {
@@ -196,20 +207,20 @@
         {
           label: '璁″垝鍚嶇О',
           prop: 'monitorName',
-          minWidth: '150px'
+          width: '150px'
         }, {
           label: '缂栧埗浜�',
           prop: 'writeName',
-          minWidth: '100'
+          width: '100'
         }, {
           label: '缂栧埗鏃ユ湡',
           prop: 'writeTime',
-          minWidth: '160'
+          width: '160'
         }, {
           dataType: 'tag',
           label: '瀹℃牳鐘舵��',
           prop: 'examineStatus',
-          minWidth: '100',
+          width: '100',
           formatData: (params) => {
             if (params === 0) {
               return '涓嶉�氳繃';
@@ -231,20 +242,20 @@
         }, {
           label: '瀹℃牳鍐呭',
           prop: 'examineRemark',
-          minWidth: '100'
+          width: '100'
         }, {
           label: '瀹℃牳浜�',
           prop: 'examineName',
-          minWidth: '100'
+          width: '100'
         }, {
           label: '瀹℃牳鏃ユ湡',
           prop: 'examineTime',
-          minWidth: '160'
+          width: '160'
         }, {
           dataType: 'tag',
           label: '鎵瑰噯鐘舵��',
           prop: 'ratifyStatus',
-          minWidth: '100',
+          width: '100',
           formatData: (params) => {
             if (params === 0) {
               return '涓嶆壒鍑�';
@@ -266,18 +277,17 @@
         }, {
           label: '鎵瑰噯鍐呭',
           prop: 'ratifyRemark',
-          minWidth: '100'
+          width: '100'
         }, {
           label: '鎵瑰噯浜�',
           prop: 'ratifyName',
-          minWidth: '100'
+          width: '100'
         }, {
           label: '鎵瑰噯鏃ユ湡',
           prop: 'ratifyTime',
-          minWidth: '160'
+          width: '160'
         }, {
           dataType: 'action',
-          minWidth: '190',
           label: '鎿嶄綔',
           fixed: 'right',
           operation: [
@@ -355,30 +365,122 @@
         }, {
           label: '璁″垝寮�灞曟椂闂�',
           prop: 'plannedTime',
-          minWidth: '150px'
+          width: '150px'
         }, {
           label: '鐩戞帶椤圭洰',
           prop: 'monitorProject',
-          minWidth: '150px'
+          width: '150px'
         }, {
           label: '鍙傚姞鍗曚綅锛堜汉鍛橈級',
           prop: 'participant',
-          minWidth: '150px'
+          width: '190px'
         }, {
           label: '棰勭畻锛堝厓锛�',
           prop: 'budget',
-          minWidth: '150px'
+          width: '150px'
         }, {
           label: '缁勭粐浜哄憳',
           prop: 'organization',
-          minWidth: '150px'
+          width: '150px'
         }, {
           label: '鐩戞帶鏂瑰紡',
           prop: 'monitorWay',
-          minWidth: '150px'
+          width: '150px'
+        },{
+          dataType: 'tag',
+          label: '瀹炴柦鐘舵��',
+          prop: 'detailsRatifyStatus',
+          width: '100',
+          formatData: (params) => {
+            if (params === 0) {
+              return '鏈紑濮�';
+            } else if (params === 1) {
+              return '寰呰瘎浠�';
+            }  else if (params === 2) {
+              return '涓嶆壒鍑�';
+            } else if (params === 3) {
+              return '宸叉壒鍑�';
+            } else {
+              return null;
+            }
+          },
+          formatType: (params) => {
+            if (params === 0) {
+              return '';
+            } else if (params === 1) {
+              return 'warning';
+            } else if (params === 2) {
+              return 'danger';
+            }  else if (params === 3) {
+              return 'success';
+            } else {
+              return null;
+            }
+          }
+        },{
+          dataType: 'tag',
+          label: '鎶ュ憡鐘舵��',
+          prop: 'reportStatus',
+          width: '100',
+          formatData: (params) => {
+            if (params === 0) {
+              return '鏈紑濮�';
+            } else if (params === 1) {
+              return '寰呰瘎浠�';
+            }  else if (params === 2) {
+              return '涓嶆壒鍑�';
+            } else if (params === 3) {
+              return '宸叉壒鍑�';
+            } else {
+              return null;
+            }
+          },
+          formatType: (params) => {
+            if (params === 0) {
+              return '';
+            } else if (params === 1) {
+              return 'warning';
+            } else if (params === 2) {
+              return 'danger';
+            }  else if (params === 3) {
+              return 'success';
+            } else {
+              return null;
+            }
+          }
+        },{
+          dataType: 'tag',
+          label: '璇勪环鐘舵��',
+          prop: 'evaluateStatus',
+          width: '100',
+          formatData: (params) => {
+            if (params === 0) {
+              return '鏈紑濮�';
+            } else if (params === 1) {
+              return '寰呰瘎浠�';
+            }  else if (params === 2) {
+              return '寰呮壒鍑�';
+            } else if (params === 3) {
+              return '宸叉壒鍑�';
+            } else {
+              return null;
+            }
+          },
+          formatType: (params) => {
+            if (params === 0) {
+              return '';
+            } else if (params === 1) {
+              return 'warning';
+            } else if (params === 2) {
+              return 'info';
+            }  else if (params === 3) {
+              return 'success';
+            } else {
+              return null;
+            }
+          }
         }, {
           dataType: 'action',
-          width: '280',
           label: '鎿嶄綔',
           fixed: 'right',
           operation: [
@@ -408,6 +510,13 @@
               type: 'text',
               clickFun: (row) => {
                 this.evaluate(row)
+              }
+            },
+            {
+              name: '闄勪欢涓婁紶',
+              type: 'text',
+              clickFun: (row) => {
+                this.viewTestRecord(row)
               }
             },
             {
@@ -661,6 +770,7 @@
         this.yearDetailLoading = false
         this.yearDetailTableData = res.data.records
         this.yearDetailPage.total = res.data.total
+        this.$refs.yearDetailTableData.$refs.multipleTable.doLayout()
       }).catch(err => {
         console.log('err---', err);
         this.yearDetailLoading = false
@@ -743,6 +853,13 @@
       this.evaluateDialog = false
       this.getYearDetailPlanList()
     },
+    // 闄勪欢涓婁紶
+    viewTestRecord (row) {
+      this.ViewRecord = true
+      this.$nextTick(() => {
+        this.$refs.ViewRecord.openDia(row)
+      })
+    },
     // 鎵撳紑瀵煎嚭寮规
     downLoadPost(row) {
       this.downloadDialog = true
@@ -766,6 +883,15 @@
         const blob = new Blob([res], { type: 'application/msword' });
         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() {
@@ -797,6 +923,14 @@
       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();
     }
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�

--
Gitblit v1.9.3