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/reportResults/index.vue |  125 ++++++++++-------------------------------
 1 files changed, 31 insertions(+), 94 deletions(-)

diff --git a/src/views/CNAS/process/reportResults/index.vue b/src/views/CNAS/process/reportResults/index.vue
index a34f9fa..88b1c7c 100644
--- a/src/views/CNAS/process/reportResults/index.vue
+++ b/src/views/CNAS/process/reportResults/index.vue
@@ -1,24 +1,25 @@
 <template>
-  <div class="report-results">
-    <div class="search">
-      <div class="search_thing">
-        <div class="search_label">妫�楠屾姤鍛婄紪鍙凤細</div>
-        <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.insReportCode"
-            @keyup.enter.native="refreshTable()"></el-input></div>
+  <div class="capacity-scope">
+    <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: 128px;font-size: 14px;font-weight: 700;color: #606266;">妫�楠屾姤鍛婄紪鍙�</span>
+          <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="queryParams.insReportCode"
+                    @keyup.enter.native="refreshTable()"></el-input>
+        </div>
+        <div style="line-height: 30px;">
+          <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+          <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+        </div>
       </div>
-      <div class="search_thing" style="padding-left: 30px;">
-        <el-button size="small" @click="refresh()">閲� 缃�</el-button>
-        <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-      </div>
-      <div class="btn">
+      <div style="line-height: 30px;">
         <el-button size="small" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower">瀵煎嚭</el-button>
         <el-button size="small" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
       </div>
     </div>
     <div class="table">
       <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'"
-        :page="page" @pagination="pagination" :isSelection="true"
-        :handleSelectionChange="handleSelectionChange"></lims-table>
+        :page="page" @pagination="pagination"></lims-table>
     </div>
     <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh">
       <el-row>
@@ -81,12 +82,8 @@
         <el-col :span="24" style="margin-bottom: 16px;">
           <div class="search_thing">
             <div class="search_label">绛炬敹浜猴細</div>
-            <div class="search_input">
-              <el-select v-model="addInfo.signatory" placeholder="璇烽�夋嫨" size="small" style="width: 100%;" multiple>
-                <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
-                </el-option>
-              </el-select>
-            </div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
+                                                v-model="addInfo.signatory"></el-input></div>
           </div>
         </el-col>
         <el-col :span="24" style="margin-bottom: 16px;">
@@ -118,6 +115,7 @@
   selectUserCondition,
 } from "@/api/business/inspectionTask.js";
 export default {
+  name: 'ReportResults',
   components: {
     limsTable
   },
@@ -129,12 +127,11 @@
       personList: [],
       title: '鏂板',
       addDialogVisible: false,
-      addInfo: {
-        signatory: []
-      },
+      addInfo: {},
       addLoading: false,
-      mutilSelect: [],
-      queryParams: {},
+      queryParams: {
+        insReportCode: ''
+      },
       tableData: [],
       column: [
         { label: "妫�楠屾姤鍛婄紪鍙�", prop: "insReportCode" },
@@ -147,7 +144,7 @@
         { label: "鍙戦�佹柟寮�", prop: "method" },
         { label: "鍙戦�佹棩鏈�", prop: "sendTime" },
         { label: "鍙戦�佷汉", prop: "sendUserName" },
-        { label: "绛炬敹浜�", prop: "signatoryName" },
+        { label: "绛炬敹浜�", prop: "signatory" },
         { label: "澶囨敞", prop: "remark" },
         {
           dataType: "action",
@@ -173,7 +170,7 @@
       ],
       page: {
         total: 0,
-        size: 10,
+        size: 20,
         current: 0,
       },
       tableLoading: false,
@@ -186,21 +183,16 @@
   },
   methods: {
     handleDown() {
-      if (this.mutilSelect.length == 0) {
-        this.$message.warning('璇烽�夋嫨瑕佸鍑虹殑鏁版嵁')
-        return
-      }
       this.outLoading = true
-      exportProcessReport({ ids: this.mutilSelect.map(m => m.id) }).then(res => {
+      exportProcessReport(this.queryParams).then(res => {
         this.outLoading = false
-        this.$download.saveAs(res.data, "鎶ュ憡缁撴灉");
+        const blob = new Blob([res], { type: 'application/msword' });
+        this.$download.saveAs(blob, '鎶ュ憡缁撴灉' + '.docx');
       })
     },
     openAdd() {
       this.title = '鏂板'
-      this.addInfo = {
-        signatory: []
-      }
+      this.addInfo = {}
       this.addDialogVisible = true;
     },
     getList() {
@@ -233,9 +225,6 @@
       this.page.current = 1;
       this.getList();
     },
-    handleSelectionChange(val) {
-      this.mutilSelect = val
-    },
     getAuthorizedPerson() {
       selectUserCondition().then(res => {
         let data = []
@@ -253,17 +242,11 @@
       delete this.addInfo.createTime
       delete this.addInfo.createUser
       delete this.addInfo.updateTime
-      delete this.addInfo.signatoryUrl
       delete this.addInfo.updateUserer
       delete this.addInfo.sendUserName
-      let addInfo = this.HaveJson(this.addInfo)
-      addInfo.signatory = addInfo.signatory.join(',')
       if (this.title == '鏂板') {
-        addProcessReport(addInfo).then(res => {
+        addProcessReport(this.addInfo).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -272,11 +255,8 @@
           this.refreshTable()
         }).catch(err => { })
       } else {
-        doProcessReport(addInfo).then(res => {
+        doProcessReport(this.addInfo).then(res => {
           this.addLoading = false
-          if (res.code == 201) {
-            return
-          }
           this.addDialogVisible = false
           this.$message({
             type: 'success',
@@ -290,11 +270,7 @@
       this.title = '淇敼'
       this.addInfo = row
       console.log(this.addInfo)
-      this.addInfo.signatory = this.addInfo.signatory ? this.addInfo.signatory.split(',').map(m => Number(m)) : []
       this.addDialogVisible = true;
-    },
-    handleChangeTask(list) {
-      this.mutilSelect = list
     },
     handleDelete(row) {
       this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
@@ -304,7 +280,6 @@
       })
         .then(() => {
           delProcessReport({ id: row.id }).then((res) => {
-            if (res.code == 201) return;
             this.$message.success("鍒犻櫎鎴愬姛");
             this.refresh();
           });
@@ -317,11 +292,9 @@
 
 <style scoped>
 .search {
-  background-color: #fff;
-  height: 80px;
+  height: 46px;
   display: flex;
-  align-items: center;
-  position: relative;
+  justify-content: space-between;
 }
 
 .search_thing {
@@ -338,41 +311,5 @@
 
 .search_input {
   width: calc(100% - 110px);
-}
-
-.table {
-  background-color: #fff;
-  height: calc(100% - 60px - 80px - 10px - 40px);
-  padding: 20px;
-}
-
-.tables {
-  table-layout: fixed;
-  width: 100%;
-}
-
-.tables td {
-  height: 40px;
-  width: 100px;
-  text-align: center;
-  font-size: 14px;
-  word-wrap: break-word;
-  white-space: normal;
-}
-
-.en {
-  font-size: 12px;
-  word-break: break-word;
-  /* 鑷姩鏂 */
-  overflow-wrap: break-word;
-  /* 闃叉婧㈠嚭 */
-  white-space: normal;
-  /* 榛樿鎹㈣ */
-}
-
-.btn {
-  position: absolute;
-  top: 16px;
-  right: 20px;
 }
 </style>

--
Gitblit v1.9.3