From af3ff155b9e82a4b21697b8cd0560bb169147573 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 02 七月 2025 14:47:11 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/discharge/index.vue |   95 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 64 insertions(+), 31 deletions(-)

diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index 296305f..001e5a1 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -260,12 +260,22 @@
         <el-col :span="1.5">
           <div class="documentf">
             <div class="document">
-              <el-button
-                :disabled="multiple"
-                style="background: #983680; color: azure"
-                @click="scoreDialogVisible = true"
-                >婊℃剰搴﹁皟鏌�</el-button
+              <el-tooltip
+                content="璇峰厛閫変腑鏈嶅姟"
+                placement="top"
+                :disabled="!multiple"
               >
+                <div class="tooltip-wrapper">
+                  <el-button
+                    type="primary"
+                    :disabled="multiple"
+                    class="purple-button"
+                    @click="scoreDialogVisible = true"
+                  >
+                    婊℃剰搴﹁皟鏌�
+                  </el-button>
+                </div>
+              </el-tooltip>
             </div>
           </div>
         </el-col>
@@ -617,7 +627,7 @@
     </el-row>
     <!-- 婊℃剰搴﹀脊妗� -->
     <el-dialog
-      title="闅忚璇勫垎"
+      title="闅忚婊℃剰搴﹁瘎鍒�"
       :visible.sync="scoreDialogVisible"
       width="80%"
       :close-on-click-modal="false"
@@ -631,7 +641,7 @@
         />
         <el-table-column
           label="浠诲姟鍚嶇О"
-          width="150"
+          width="180"
           align="center"
           prop="taskName"
         />
@@ -641,8 +651,7 @@
           align="center"
           key="authenticity"
           prop="authenticity"
-          sortable
-          width="120"
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -659,8 +668,7 @@
           align="center"
           key="weekFinish"
           prop="weekFinish"
-          sortable
-          width="120"
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -677,7 +685,7 @@
           align="center"
           key="standard"
           prop="standard"
-          sortable
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -694,8 +702,7 @@
           align="center"
           key="timeliness"
           prop="timeliness"
-          sortable
-          width="120"
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -712,8 +719,7 @@
           align="center"
           key="library"
           prop="library"
-          sortable
-          width="120"
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -730,8 +736,7 @@
           align="center"
           key="environment"
           prop="environment"
-          sortable
-          width="120"
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -748,8 +753,7 @@
           align="center"
           key="doctorSatisfaction"
           prop="doctorSatisfaction"
-          width="120"
-          sortable
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -766,8 +770,7 @@
           align="center"
           key="nurseSatisfaction"
           prop="nurseSatisfaction"
-          width="120"
-          sortable
+          width="150"
         >
           <template slot-scope="scope">
             <el-input-number
@@ -784,7 +787,7 @@
           align="center"
           key="total"
           prop="total"
-          sortable
+          fixed="right"
         >
           <template slot-scope="scope">
             <span>{{ calculateTotal(scope.row) }}</span>
@@ -1017,6 +1020,7 @@
   buidegetTasklist,
   addserviceSubtask,
   query360PatInfo,
+  addsatisfaction,
 } from "@/api/AiCentre/index";
 import { alterpatient, particularpatient } from "@/api/patient/homepage";
 import Treeselect from "@riophae/vue-treeselect";
@@ -1570,6 +1574,8 @@
       });
 
       if (this.selectedRows.length > 0) {
+        this.multiple = false;
+      } else {
         this.multiple = true;
       }
     },
@@ -1590,15 +1596,21 @@
 
     // 淇濆瓨璇勫垎
     saveScores() {
-      // 杩欓噷鍙互娣诲姞淇濆瓨閫昏緫锛屽璋冪敤API淇濆瓨璇勫垎
-      this.$message.success("璇勫垎淇濆瓨鎴愬姛");
-      this.scoreDialogVisible = false;
-
-      // 鏇存柊涓昏〃鏍兼暟鎹�
-      this.userList = this.userList.map((user) => {
-        const updatedUser = this.selectedRows.find((row) => row.id === user.id);
-        return updatedUser ? updatedUser : user;
+      this.selectedRows.forEach((item) => {
+        item.createBy = null;
+        item.patName = item.sendname;
+        item.hospitaldistrictname = item.leavehospitaldistrictname;
       });
+      addsatisfaction(this.selectedRows).then((res) => {
+        if (res.code == 200) {
+          this.$message.success("璇勫垎淇濆瓨鎴愬姛");
+          this.scoreDialogVisible = false;
+        } else {
+          this.$modal.msgWarning("璇勫垎淇濆瓨澶辫触");
+          this.scoreDialogVisible = false;
+        }
+      });
+      // 杩欓噷鍙互娣诲姞淇濆瓨閫昏緫锛屽璋冪敤API淇濆瓨璇勫垎
     },
     //鍒犻櫎閫夐」
     handleClose(tag) {
@@ -2032,7 +2044,28 @@
     font-size: 24px;
   }
 }
+.purple-button {
+  background-color: #7e22ce;
+  border-color: #7e22ce;
+  color: #fff;
+}
 
+.purple-button:hover,
+.purple-button:focus {
+  background-color: #9333ea;
+  border-color: #9333ea;
+}
+
+.purple-button:active {
+  background-color: #6b21a8;
+  border-color: #6b21a8;
+}
+
+.purple-button.is-disabled {
+  background-color: #d8b4fe;
+  border-color: #d8b4fe;
+  opacity: 1; /* 淇濇寔绂佺敤鐘舵�侀�忔槑搴� */
+}
 // 閫夐」瀛椾綋鏀惧ぇ
 // ::v-deep.el-checkbox-group {
 //   span {

--
Gitblit v1.9.3