From 2bddfa78e65f351d6cb81f670775e79620f684a6 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 24 五月 2024 10:43:51 +0800
Subject: [PATCH] feat:分数统计

---
 src/views/feedback/list.vue |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/src/views/feedback/list.vue b/src/views/feedback/list.vue
index 7d7f9a9..4455709 100644
--- a/src/views/feedback/list.vue
+++ b/src/views/feedback/list.vue
@@ -4,17 +4,21 @@
       <el-table-column prop="questionTitle" label="鍙嶉棰樼洰" />
       <el-table-column prop="describe" label="鍙嶉鎻忚堪" />
       <el-table-column prop="userName" label="鍙嶉鐢ㄦ埛" />
-      <el-table-column prop="fix" label="鏄惁澶勭悊" width="100px">
+      <el-table-column prop="fix" label="鏄惁澶勭悊" width="100px" align="center">
         <template slot-scope="{row}">
           <el-tag :type="row.fix ? 'success' : 'warning'">{{ row.fix ? '宸插鐞�' : '鏈鐞�' }}</el-tag>
         </template>
       </el-table-column>
-      <el-table-column prop="fixTime" label="澶勭悊鏃堕棿" width="120px"/>
-      <el-table-column label="鎿嶄綔" align="center" width="260px">
+      <el-table-column prop="fixTime" label="澶勭悊鏃堕棿" width="160px"/>
+      <el-table-column label="鎿嶄綔" align="center" width="300px">
         <template slot-scope="{row}">
-          <el-button size="mini" @click="showQuestion(row)" class="link-left">鏌ョ湅</el-button>
-          <el-button size="mini" @click="hanldSettleFeedback(row)" type="info" class="link-left">纭澶勭悊</el-button>
-          <el-button size="mini" @click="hanldDeleteFeedback(row)" type="danger" class="link-left">鍒犻櫎</el-button>
+          <el-button size="mini" @click="showQuestion(row)" class="link-left">棰樼洰棰勮</el-button>
+          <el-popconfirm title="纭澶勭悊" @confirm="hanldSettleFeedback(row)">
+            <el-button slot="reference" v-if="!row.fix" size="mini" type="primary" class="link-left">纭澶勭悊</el-button>
+          </el-popconfirm>
+          <el-popconfirm title="纭鍒犻櫎" @confirm="hanldDeleteFeedback(row)">
+            <el-button slot="reference" size="mini" type="danger" class="link-left">鍒犻櫎</el-button>
+          </el-popconfirm>
         </template>
       </el-table-column>
     </el-table>
@@ -51,7 +55,7 @@
         dialog: false,
         question: null,
         loading: false
-      }
+      },
     }
   },
   created() {
@@ -79,10 +83,22 @@
       })
     },
     hanldSettleFeedback(row) {
-      
+      feedbackApi.settleFeedback(row.id).then(res => {
+        this.$message({
+          message: '鎿嶄綔鎴愬姛',
+          type: 'success'
+        })
+        this.search()
+      })
     },
     hanldDeleteFeedback(row) {
-      
+      feedbackApi.deleteFeedback(row.id).then(res => {
+        this.$message({
+          message: '鎿嶄綔鎴愬姛',
+          type: 'success'
+        })
+        this.search()
+      })
     }
   }
 }

--
Gitblit v1.8.0