From 58cd24c6664429e2a28eef6f7ee2e76c0e9c2d90 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5968728@163.com>
Date: 星期一, 18 八月 2025 16:28:36 +0800
Subject: [PATCH] 测试完成

---
 src/utils/request.js                        |    2 
 src/views/index.vue                         |   24 ++--
 src/views/sfstatistics/percentage/index.vue |  297 ++++++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 303 insertions(+), 20 deletions(-)

diff --git a/src/utils/request.js b/src/utils/request.js
index 57969d4..71723d0 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -17,7 +17,7 @@
   // axios涓姹傞厤缃湁baseURL閫夐」锛岃〃绀鸿姹俇RL鍏叡閮ㄥ垎
   baseURL: process.env.VUE_APP_BASE_API,
   // 瓒呮椂
-  timeout: 10000,
+  timeout: 100000,
 });
 
 // request鎷︽埅鍣�
diff --git a/src/views/index.vue b/src/views/index.vue
index f589df9..90b71a1 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -20,7 +20,7 @@
             <el-row :gutter="20">
               <el-col :span="10">
                 <div class="home-user-task-stats">
-                  <p>{{ OutpatientData.rs }}</p>
+                  <p>{{ OutpatientData.rc }}</p>
                   <div class="text-color2">
                     <p>闂ㄨ瘖灏辫瘖閲忥紙浜烘锛�</p>
                   </div>
@@ -28,7 +28,7 @@
               </el-col>
               <el-col :span="10">
                 <div class="home-user-task-stats">
-                  <p>{{ OutpatientData.rc }}</p>
+                  <p>{{ OutpatientData.rs }}</p>
                   <div class="text-color2">
                     <p>闂ㄨ瘖鏈嶅姟閲忥紙浜烘锛�</p>
                   </div>
@@ -62,7 +62,7 @@
             <el-row :gutter="20">
               <el-col :span="10">
                 <div class="home-user-task-stats">
-                  <p style="color: red">{{ DischargeData.rs }}</p>
+                  <p style="color: red">{{ DischargeData.rc }}</p>
                 </div>
                 <div class="text-color2">
                   <p>鍑洪櫌灏辫瘖閲忥紙浜烘锛�</p>
@@ -70,7 +70,7 @@
               </el-col>
               <el-col :span="10">
                 <div class="home-user-task-stats">
-                  <p style="color: red">{{ DischargeData.rc }}</p>
+                  <p style="color: red">{{ DischargeData.rs }}</p>
                   <div class="text-color2">
                     <p>鍑洪櫌鏈嶅姟閲忥紙浜烘锛�</p>
                   </div>
@@ -330,7 +330,7 @@
       SkuTop: [],
       cylinderSeries: [],
       cylinderXAxis: [],
-      dyat: 30,
+      dyat: 6,
       intervalId: null,
     };
   },
@@ -373,11 +373,11 @@
     // 鏀瑰彉鏃堕棿浜嬩欢
     changes() {
       if (this.radio1 == "鍛�") {
-        this.dyat = 7;
+        this.dyat = 6;
       } else if (this.radio1 == "鏈�") {
         this.dyat = 30;
       } else {
-        this.dyat = 360;
+        this.dyat = 364;
       }
       this.getgraphdata();
       this.getranking();
@@ -623,7 +623,7 @@
           },
         },
         legend: {
-          data: ["鍑洪櫌闅忚閲�", "闂ㄨ瘖闅忚閲�", "鍑洪櫌鏈嶅姟浜烘", "闂ㄨ瘖鏈嶅姟浜烘"],
+          data: ["鍑洪櫌鏈嶅姟閲�", "闂ㄨ瘖鏈嶅姟閲�", "鍑洪櫌灏辫瘖浜烘", "闂ㄨ瘖灏辫瘖浜烘"],
         },
         xAxis: [
           {
@@ -655,7 +655,7 @@
         grid: { top: "35%" },
         series: [
           {
-            name: "鍑洪櫌闅忚閲�",
+            name: "鍑洪櫌鏈嶅姟閲�",
             type: "bar",
             tooltip: {
               valueFormatter: function (value) {
@@ -665,7 +665,7 @@
             data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
           },
           {
-            name: "闂ㄨ瘖闅忚閲�",
+            name: "闂ㄨ瘖鏈嶅姟閲�",
             type: "bar",
             tooltip: {
               valueFormatter: function (value) {
@@ -675,7 +675,7 @@
             data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
           },
           {
-            name: "鍑洪櫌鏈嶅姟浜烘",
+            name: "鍑洪櫌灏辫瘖浜烘",
             type: "line",
             smooth: 0.3,
             yAxisIndex: 1,
@@ -687,7 +687,7 @@
             data: [], // 鍒濆涓虹┖锛屽皢閫氳繃API鏁版嵁濉厖
           },
           {
-            name: "闂ㄨ瘖鏈嶅姟浜烘",
+            name: "闂ㄨ瘖灏辫瘖浜烘",
             type: "line",
             smooth: 0.3,
             yAxisIndex: 1,
diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index 1e06ca3..a9288cf 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -155,17 +155,220 @@
                 >
               </el-col>
             </el-form>
-            <!-- <right-toolbar
-          :showSearch.sync="showSearch"
-          @queryTable="getList"
-          :columns="columns"
-        ></right-toolbar> -->
             <el-table
               v-loading="loading"
               :data="userList"
               :border="true"
               @selection-change="handleSelectionChange"
+              @row-click="handleRowClick"
+              @expand-change="handleRowClick"
+              :row-key="getRowKey"
+              :expand-row-keys="expands"
             >
+              <!-- 灞曞紑琛岀澶村垪 -->
+              <el-table-column type="expand">
+                <template slot-scope="props">
+                  <el-table
+                    :data="props.row.doctorStats"
+                    border
+                    style="width: 95%; margin: 0 auto"
+                    class="inner-table"
+                  >
+                    <el-table-column
+                      label="鍖荤敓濮撳悕"
+                      prop="drname"
+                      align="center"
+                    />
+                    <el-table-column
+                      label="绉戝"
+                       width="120"
+                      prop="deptname"
+                      align="center"
+                    />
+                    <el-table-column
+                      label="鍑洪櫌浜烘"
+                      prop="dischargeCount"
+                      align="center"
+                    />
+                    <el-table-column
+                      label="鍑洪櫌浜烘"
+                      align="center"
+                      key="dischargeCount"
+                      prop="dischargeCount"
+                    >
+                    </el-table-column>
+
+                    <el-table-column
+                      label="鏃犻渶闅忚浜烘"
+                      align="center"
+                      width="100"
+                      key="nonFollowUp"
+                      prop="nonFollowUp"
+                    >
+                    </el-table-column>
+                    <el-table-column
+                      label="搴旈殢璁夸汉娆�"
+                      align="center"
+                      width="100"
+                      key="followUpNeeded"
+                      prop="followUpNeeded"
+                    >
+                    </el-table-column>
+                    <el-table-column align="center" label="棣栨鍑洪櫌闅忚">
+                      <el-table-column
+                        label="搴旈殢璁�"
+                        align="center"
+                        key="needFollowUp"
+                        prop="needFollowUp"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="寰呴殢璁�"
+                        align="center"
+                        key="pendingFollowUp"
+                        prop="pendingFollowUp"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="闅忚鎴愬姛"
+                        align="center"
+                        key="followUpSuccess"
+                        prop="followUpSuccess"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="闅忚澶辫触"
+                        align="center"
+                        key="followUpFail"
+                        prop="followUpFail"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="闅忚鐜�"
+                        align="center"
+                        width="120"
+                        key="followUpRate"
+                        prop="followUpRate"
+                      >
+                        <!-- <template slot-scope="scope">
+                    <span
+                      >{{
+                        (Number(scope.row.followUpRate) * 100).toFixed(2)
+                      }}%</span
+                    >
+                  </template> -->
+                      </el-table-column>
+                      <el-table-column
+                        label="鍙婃椂鐜�"
+                        align="center"
+                        width="120"
+                        key="rate"
+                        prop="rate"
+                      >
+                        <template slot-scope="scope">
+                          <el-button
+                            size="medium"
+                            type="text"
+                            @click="Seedetails(scope.row)"
+                            ><span class="button-zx"
+                              >{{
+                                (Number(scope.row.rate) * 100).toFixed(2)
+                              }}%</span
+                            ></el-button
+                          >
+                        </template>
+                      </el-table-column>
+                      <el-table-column
+                        label="浜哄伐"
+                        align="center"
+                        key="manual"
+                        prop="manual"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="鐭俊"
+                        align="center"
+                        key="sms"
+                        prop="sms"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="寰俊"
+                        align="center"
+                        key="weChat"
+                        prop="weChat"
+                      >
+                      </el-table-column>
+                    </el-table-column>
+                    <el-table-column align="center" label="鍐嶆鍑洪櫌闅忚">
+                      <el-table-column
+                        label="搴旈殢璁�"
+                        align="center"
+                        key="needFollowUpAgain"
+                        prop="needFollowUpAgain"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="寰呴殢璁�"
+                        align="center"
+                        key="pendingFollowUpAgain"
+                        prop="pendingFollowUpAgain"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="闅忚鎴愬姛"
+                        align="center"
+                        key="followUpSuccessAgain"
+                        prop="followUpSuccessAgain"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="闅忚澶辫触"
+                        align="center"
+                        key="followUpFailAgain"
+                        prop="followUpFailAgain"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="闅忚鐜�"
+                        align="center"
+                        width="120"
+                        key="followUpRateAgain"
+                        prop="followUpRateAgain"
+                      >
+                        <!-- <template slot-scope="scope">
+                    <span
+                      >{{
+                        (Number(scope.row.FollowUpRateAgain) * 100).toFixed(2)
+                      }}%</span
+                    >
+                  </template> -->
+                      </el-table-column>
+                      <el-table-column
+                        label="浜哄伐"
+                        align="center"
+                        key="manualAgain"
+                        prop="manualAgain"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="鐭俊"
+                        align="center"
+                        key="smsAgain"
+                        prop="smsAgain"
+                      >
+                      </el-table-column>
+                      <el-table-column
+                        label="寰俊"
+                        align="center"
+                        key="weChatAgain"
+                        prop="weChatAgain"
+                      >
+                      </el-table-column>
+                    </el-table-column>
+                  </el-table>
+                </template>
+              </el-table-column>
               <el-table-column
                 label="鍑洪櫌鐥呭尯"
                 align="center"
@@ -644,6 +847,7 @@
     return {
       topactiveName: "Local", //椤堕儴閫夋嫨
       activeName: "first", //渚ц竟閫夋嫨
+      expands: [],
       // 閬僵灞�
       loading: false,
       Seedloading: false,
@@ -784,7 +988,7 @@
         dateRange: [],
         statisticaltype: 1,
         leavehospitaldistrictcodes: ["all"], // 榛樿閫変腑鍏ㄩ儴鐥呭尯
-        deptcodes: ["all"], // 榛樿閫変腑鍏ㄩ儴绉戝
+        deptcodes: [], // 榛樿閫変腑鍏ㄩ儴绉戝
       },
       // 鍒椾俊鎭�
       columns: [
@@ -829,6 +1033,40 @@
         this.userList = response.data;
       });
     },
+    getRowKey(row) {
+      return row.statisticaltype === 1
+        ? row.leavehospitaldistrictcode
+        : row.deptcode;
+    },
+
+    // 澶勭悊琛岀偣鍑诲睍寮�
+    handleRowClick(row) {
+      console.log(row,'row');
+
+      // 濡傛灉宸茬粡灞曞紑鍒欐敹璧�
+      if (this.expands.includes(this.getRowKey(row))) {
+        this.expands = [];
+        return;
+      }
+      // 澶勭悊鏌ヨ鍙傛暟
+      const params = {
+        ...this.queryParams,
+        // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜
+        leavehospitaldistrictcodes: [row.leavehospitaldistrictcode],
+        drcode: "1",
+      };
+      // 濡傛灉璇ヨ杩樻病鏈夊姞杞藉尰鐢熸暟鎹紝鍒欏姞杞�
+      if (!row.doctorStats) {
+        this.loading = true;
+        getSfStatistics(params).then((res) => {
+          this.$set(row, "doctorStats", res.data);
+          this.expands = [this.getRowKey(row)];
+          this.loading = false;
+        });
+      } else {
+        this.expands = [this.getRowKey(row)];
+      }
+    },
     /** 淇敼鏍囩 */
     handleUpdate(row) {
       console.log(row, "淇敼鏍囩");
@@ -870,7 +1108,6 @@
       );
       this.flatArraydept.push({ label: "鍏ㄩ儴", value: "all" });
       this.flatArrayhospit.push({ label: "鍏ㄩ儴", value: "all" });
-
     },
     flattenArray(multiArray) {
       let result = [];
@@ -1160,6 +1397,52 @@
     font-size: 20px;
   }
 }
+/* 浣胯鏈夋墜鍨嬫寚閽� */
+.el-table__row {
+  cursor: pointer;
+}
+/* 鍐呭眰鍖荤敓琛ㄦ牸鏍峰紡 */
+.inner-table {
+  // 琛ㄥご鑳屾櫙鑹�
+  ::v-deep .el-table__header-wrapper {
+    background-color: #f0f7ff !important;
+
+    th {
+      background-color: #f0f7ff !important;
+    }
+  }
+
+  // 琛ㄦ牸琛岃儗鏅壊
+  ::v-deep .el-table__body-wrapper {
+    tr {
+      background-color: #f9fbfe !important;
+
+      &:hover {
+        background-color: #e6f1ff !important;
+      }
+    }
+  }
+
+  // 杈规棰滆壊
+  ::v-deep .el-table--border {
+    border-color: #d9e8ff !important;
+
+    td,
+    th {
+      border-color: #d9e8ff !important;
+    }
+  }
+
+  // 鏂戦┈绾规晥鏋�
+  ::v-deep .el-table--striped .el-table__body tr.el-table__row--striped td {
+    background-color: #f5f9ff !important;
+  }
+}
+/* 灞曞紑琛屾牱寮� */
+.el-table__expanded-cell {
+  padding: 10px 0 !important;
+  background: #f8f8f8;
+}
 .document {
   width: 100px;
   height: 50px;

--
Gitblit v1.9.3