From f2fbb3b07155274408d68084e2d607760c765ad6 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 14 三月 2025 11:09:51 +0800
Subject: [PATCH] 前端跳转路由修改

---
 src/views/CNAS/systemManagement/customerSatisfaction/index.vue |   37 +++++++++----------------------------
 1 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
index 3a898cd..59be536 100644
--- a/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
+++ b/src/views/CNAS/systemManagement/customerSatisfaction/index.vue
@@ -17,7 +17,7 @@
         <div class="btn">
           <el-button v-if="tabIndex === '0'" size="small" type="primary" @click="openFormDia('add')">鏂� 澧�</el-button>
           <el-upload v-if="tabIndex === '1'" ref='upload' :action="action" :before-upload="beforeUpload"
-            :headers="headers" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
+            :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
             accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
             <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button>
           </el-upload>
@@ -34,7 +34,8 @@
           <TableCard :showForm="false" :showTitle="false">
             <template v-slot:table>
               <limsTable :column="tableColumn" :height="'calc(100vh - 22em)'" :table-data="tableData"
-                :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination">
+                :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" @pagination="pagination"
+                :page="page">
               </limsTable>
             </template>
           </TableCard>
@@ -69,10 +70,9 @@
   delClientSatisfaction,
   delAnalyseFile,
 } from '@/api/cnas/systemManagement/customerSatisfaction.js'
-import { getToken } from "@/utils/auth";
 
 export default {
-  name: 'a8-customer-satisfaction',
+  name: 'CustomerSatisfaction',
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
   components: { filePreview, FormDialog, limsTable, TableCard },
   data() {
@@ -144,8 +144,8 @@
       page: {
         size: 20,
         current: 1,
+        total: 0,
       },
-      total: 0,
       tableColumn1: [
         {
           label: '闄勪欢鍚嶇О',
@@ -197,8 +197,8 @@
       page1: {
         size: 20,
         current: 1,
+        total: 0,
       },
-      total1: 0,
       formDialog: false,
       upLoading: false,
       currentInfo: {},
@@ -218,9 +218,8 @@
         this.tableLoading = true
         pageClientSatisfaction({ ...entity, ...page }).then(res => {
           this.tableLoading = false
-          if (res.code === 201) return
           this.tableData = res.data.records
-          this.total = res.data.total
+          this.page.total = res.data.total
         }).catch(err => {
           console.log('err---', err);
           this.tableLoading = false
@@ -229,9 +228,8 @@
         this.tableLoading1 = true
         pageAnalyseFile({ ...entity, ...page }).then(res => {
           this.tableLoading1 = false
-          if (res.code === 201) return
           this.tableData1 = res.data.records
-          this.total1 = res.data.total
+          this.page1.total = res.data.total
         }).catch(err => {
           console.log('err---', err);
           this.tableLoading1 = false
@@ -286,7 +284,6 @@
         this.tableLoading = true
         delClientSatisfaction({ clientSatisfactionId: row.clientSatisfactionId }).then(res => {
           this.tableLoading = false
-          if (res.code === 201) return
           this.$message.success('鍒犻櫎鎴愬姛')
           this.searchList()
         }).catch(err => {
@@ -307,17 +304,7 @@
     },
     // 涓嬭浇瀹㈡埛绂忓缓
     upload(row) {
-      let url = '';
-      if (row.type == 1) {
-        url = this.javaApi + '/img/' + row.fileUrl
-        file.downloadIamge(url, row.fileName)
-      } else {
-        url = this.javaApi + '/word/' + row.fileUrl
-        const link = document.createElement('a');
-        link.href = url;
-        link.download = row.fileName;
-        link.click();
-      }
+      this.$download.saveAs(row.fileUrl, row.fileName);
     },
     // 鍒犻櫎瀹㈡埛鍒嗘瀽闄勪欢
     delFile(row) {
@@ -329,7 +316,6 @@
         this.tableLoading = true
         delAnalyseFile({ analyseFileId: row.analyseFileId }).then(res => {
           this.tableLoading = false
-          if (res.code === 201) return
           this.$message.success('鍒犻櫎鎴愬姛')
           this.searchList()
         }).catch(err => {
@@ -358,11 +344,6 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
-    headers() {
-      return {
-        'Authorization': "Bearer " + getToken()
-      }
-    },
     action() {
       return this.javaApi + '/clientSatisfaction/uploadAnalyseFile'
     }

--
Gitblit v1.9.3