From 2b2fa317c30ee2de7a8b6f5fc964532031adea66 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期日, 20 九月 2026 13:48:54 +0800
Subject: [PATCH] fix: 优化报告功能

---
 src/views/business/inspectionReview/index.vue |  101 ++++++++++++++++++++++++++------------------------
 1 files changed, 52 insertions(+), 49 deletions(-)

diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index 787b497..a054dbc 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -4,20 +4,20 @@
       <el-form :model="entity" ref="entity" size="small" :inline="true">
         <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
           <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.entrustCode"
-            @keyup.enter.native="refreshTable()"></el-input>
+                    @keyup.enter.native="refreshTable()"></el-input>
         </el-form-item>
-<!--        <el-form-item label="涓嬪崟绫诲埆" prop="entrustCode">-->
-<!--          <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()">-->
-<!--            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="鐗╂枡灞炴��" prop="materialProp">-->
-<!--          <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%">-->
-<!--            <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"-->
-<!--                       :value="dict.value">-->
-<!--            </el-option>-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
+        <!--        <el-form-item label="涓嬪崟绫诲埆" prop="entrustCode">-->
+        <!--          <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()">-->
+        <!--            <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>-->
+        <!--          </el-select>-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="鐗╂枡灞炴��" prop="materialProp">-->
+        <!--          <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%">-->
+        <!--            <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label"-->
+        <!--                       :value="dict.value">-->
+        <!--            </el-option>-->
+        <!--          </el-select>-->
+        <!--        </el-form-item>-->
         <el-form-item>
           <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
           <el-button size="mini" @click="refresh">閲嶇疆</el-button>
@@ -35,30 +35,30 @@
     </div>
     <!--鎶ュ憡鏌ョ湅-->
     <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
-      :fullscreen="fullscreen">
+               :fullscreen="fullscreen">
       <div class="full-screen">
         <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
-          v-if="!fullscreen"></i>
+           v-if="!fullscreen"></i>
         <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
       </div>
       <div style="height: 80vh;" v-if="issuedVisible">
-        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
+        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;"/>
       </div>
     </el-dialog>
     <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen>
       <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}"
-        style="max-height: 90vh;overflow-y: auto;" />
+                   style="max-height: 90vh;overflow-y: auto;"/>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { getYearAndMonthAndDays } from "@/utils/date";
+import {getYearAndMonthAndDays} from "@/utils/date";
 import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
 import limsTable from "@/components/Table/lims-table.vue";
-import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask";
-import { mapGetters } from "vuex";
-import { upReportUrl } from "@/api/business/insReport";
+import {selectInsOrderPlanList, selectUserCondition} from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
+import {upReportUrl} from "@/api/business/insReport";
 import filePreview from "@/components/Preview/filePreview.vue";
 
 export default {
@@ -68,9 +68,9 @@
     onlyoffice,
     limsTable,
   },
-  dicts: ["urgency_level", "inspection_task_state","material_prop_type"],
+  dicts: ["urgency_level", "inspection_task_state", "material_prop_type"],
   computed: {
-    ...mapGetters(["nickName", "userId"]),
+    ...mapGetters(["nickName", "userId", "roles"]),
   },
   data() {
     return {
@@ -95,7 +95,7 @@
           dataType: "link",
           linkMethod: "selectAllByOne",
         },
-        { label: "鏍峰搧鍚嶇О", prop: "sample", width: "160px" },
+        {label: "鏍峰搧鍚嶇О", prop: "sample", width: "160px"},
         // {
         //   label: '鐗╂枡灞炴��',
         //   prop: 'materialProp',
@@ -119,14 +119,14 @@
           formatData: (params) => {
             if (params == 0) {
               return "澶栬喘涓嬪崟";
-            } else if(params==1) {
+            } else if (params == 1) {
               return "鍘熸潗鏂欎笅鍗�";
-            }else{
+            } else {
               return "濮旀墭涓嬪崟";
             }
           },
         },
-        { label: "鏍峰搧鍨嬪彿", prop: "sampleModel", width: "120px" },
+        {label: "鏍峰搧鍨嬪彿", prop: "sampleModel", width: "120px"},
         // {
         //   label: "绱ф�ョ▼搴�",
         //   prop: "type",
@@ -177,12 +177,12 @@
             }
           },
         },
-        { label: "妫�楠屼汉", prop: "userName" },
-        { label: "澶嶆牳浜�", prop: "checkName" },
-        { label: "绾﹀畾鏃堕棿", prop: "appointed" },
-        { label: "涓嬪彂鏃堕棿", prop: "sendTime", width: "140px" },
-        { label: "妫�楠屽紑濮嬫椂闂�", prop: "insTime", width: "140px" },
-        { label: "鐞嗙敱", prop: "verifyTell", width: "140px" },
+        {label: "妫�楠屼汉", prop: "userName"},
+        {label: "澶嶆牳浜�", prop: "checkName"},
+        {label: "绾﹀畾鏃堕棿", prop: "appointed"},
+        {label: "涓嬪彂鏃堕棿", prop: "sendTime", width: "140px"},
+        {label: "妫�楠屽紑濮嬫椂闂�", prop: "insTime", width: "140px"},
+        {label: "鐞嗙敱", prop: "verifyTell", width: "140px"},
         {
           dataType: "action",
           fixed: "right",
@@ -195,6 +195,7 @@
                 this.handleReview(row);
               },
               disabled: (row) => {
+                if (this.roles.includes("admin")) return false
                 return row.checkName == null || (row.checkName && !row.checkName.includes(this.nickName))
               }
             },
@@ -260,9 +261,9 @@
       currentTime: null,
       sonLaboratoryList: [],
       typeSourceList: [
-        { label: '濮旀墭涓嬪崟', value: -1 },
-        { label: '澶栬喘涓嬪崟', value: 0 },
-        { label: '鍘熸潗鏂欎笅鍗�', value: 1 },
+        {label: '濮旀墭涓嬪崟', value: -1},
+        {label: '澶栬喘涓嬪崟', value: 0},
+        {label: '鍘熸潗鏂欎笅鍗�', value: 1},
       ],
       isCopper: null,
       customsInspection: {},
@@ -272,10 +273,10 @@
       fullscreen: false,
       option: null,
       orderTypeList: [
-        { label: '濮旀墭璇曢獙', value: 'Customer-ordered test', type: 'success' },
-        { label: '鎶芥', value: '鎶芥', type: 'danger' },
-        { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�', type: 'info' },
-        { label: '瀛e害妫�楠�', value: 'Quarterly inspection', type: '' },
+        {label: '濮旀墭璇曢獙', value: 'Customer-ordered test', type: 'success'},
+        {label: '鎶芥', value: '鎶芥', type: 'danger'},
+        {label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�', type: 'info'},
+        {label: '瀛e害妫�楠�', value: 'Quarterly inspection', type: ''},
       ],
       urgencyLevel: [],
       inspectionTaskState: [],
@@ -300,9 +301,9 @@
   methods: {
     refreshTable() {
       this.tableLoading = true;
-      let param = { ...this.entity, ...this.page };
+      let param = {...this.entity, ...this.page};
       delete param.total;
-      selectInsOrderPlanList({ ...param }).then((res) => {
+      selectInsOrderPlanList({...param}).then((res) => {
         this.tableLoading = false;
         if (res.code === 200) {
           this.tableData = res.data.records;
@@ -312,7 +313,7 @@
         this.tableLoading = false;
       });
     },
-    pagination({ page, limit }) {
+    pagination({page, limit}) {
       this.page.current = page;
       this.page.size = limit;
       this.refreshTable();
@@ -321,7 +322,7 @@
       this.resetForm('entity')
       this.refreshTable()
     },
-    rowClassName({ row, rowIndex }) {
+    rowClassName({row, rowIndex}) {
       if (this.currentTime == row.appointed) {
         return "highlight-warning-row-border";
       } else if (this.currentTime > row.appointed) {
@@ -383,7 +384,7 @@
     },
     // 涓嬭浇鎶ュ憡
     download(row) {
-      let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS
+      let url = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
       const link = document.createElement('a');
       link.href = this.javaApi + url;
       link.target = '_blank';
@@ -397,13 +398,14 @@
         cancelButtonText: "鍙栨秷",
         type: "warning"
       }).then(() => {
-        upReportUrl({ id: row.insReportId }).then(res => {
+        upReportUrl({id: row.insReportId}).then(res => {
           if (res.code === 200) {
             this.$message.success('杩樺師鎴愬姛')
             this.refreshTable()
           }
         })
-      }).catch(() => { })
+      }).catch(() => {
+      })
 
     },
     // 鏌ョ湅鎶ュ憡
@@ -416,7 +418,7 @@
         fileName = row.tempUrlPdf
         fileType = "pdf"
       }
-      fileName = fileName.replace('/word/','')
+      fileName = fileName.replace('/word/', '')
       const userName = this.nickName
       this.option = {
         url: this.javaApi + "/word/" + fileName,
@@ -432,7 +434,7 @@
       this.issuedVisible = true;
     },
     getAuthorizedPerson() {
-      selectUserCondition({ type: 1 }).then((res) => {
+      selectUserCondition({type: 1}).then((res) => {
         let data = [];
         res.data.forEach((a) => {
           data.push({
@@ -451,6 +453,7 @@
   margin-bottom: 10px;
   display: flex;
 }
+
 .page_total span:last-child {
   color: #3a7bfa;
   font-size: 23px;

--
Gitblit v1.9.3