From b4fe2c16274a91fee4fb26d91374f95fbe2dbcec Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期一, 09 十一月 2026 15:28:21 +0800
Subject: [PATCH] 测试完成

---
 src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue |   73 +++++++++++++++++++++++++++++++++++-
 1 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue b/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue
index 3095477..ca5e54b 100644
--- a/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue
+++ b/src/views/Satisfaction/sfstatistics/components/components/TopicDialog.vue
@@ -40,7 +40,14 @@
                 min-width="120"
               >
                 <template slot-scope="{ row }">
-                  {{ row.chosenQuantity || 0 }}
+                  <el-button
+                    v-if="row.chosenQuantity"
+                    type="text"
+                    @click="handleOptionClick(item, row)"
+                  >
+                    {{ row.chosenQuantity }}
+                  </el-button>
+                  <span v-else>0</span>
                 </template>
               </el-table-column>
               <el-table-column
@@ -83,15 +90,26 @@
     >
       <el-button @click="handleClose">鍏� 闂�</el-button>
     </div>
+
+    <!-- 閫夐」涓嬮捇锛氭偅鑰呮湇鍔″垪琛� -->
+    <TopicPatientListDialog
+      :visible.sync="patientListVisible"
+      :title="patientListTitle"
+      :drill-params="patientDrillParams"
+    />
   </div>
 </template>
 
 <script>
 import ExcelJS from "exceljs";
 import { saveAs } from "file-saver";
+import TopicPatientListDialog from "./TopicPatientListDialog.vue";
 
 export default {
   name: "TopicDialog",
+  components: {
+    TopicPatientListDialog,
+  },
   props: {
     rowData: {
       type: Object,
@@ -113,12 +131,18 @@
     return {
       processedTopicList: [],
       orgname: "", // 鏂板锛氬尰闄㈠悕绉�
+      patientListVisible: false,
+      patientListTitle: "鎮h�呮湇鍔″垪琛�",
+      patientDrillParams: {},
     };
   },
   computed: {
     configTitle() {
-      const key = this.queryParams?.configKey;
-      return key === "returnVisitCount" ? "澶嶈瘖閫氱煡" : "婊℃剰搴�";
+      return this.topType == 1 ? "澶嶈瘖閫氱煡" : "婊℃剰搴�";
+    },
+    // 涓嬮捇鎺ュ彛闇�瑕佺殑 configKey锛�1 澶嶈瘖閫氱煡锛�2 婊℃剰搴�
+    configKey() {
+      return this.topType == 1 ? "returnVisitCount" : "joyCount";
     },
   },
   created() {
@@ -158,6 +182,49 @@
       this.processedTopicList = result;
     },
 
+    // 鐐瑰嚮閫夐」鈥滈�夋嫨浜烘暟鈥濅笅閽诲埌鎮h�呮湇鍔″垪琛�
+    handleOptionClick(topicItem, detail) {
+      if (!detail || !detail.optionText) return;
+
+      const params = {
+        scriptid: topicItem.scriptid,
+        scriptContent: topicItem.scriptContent,
+        subtaskType: topicItem.subtaskType,
+        optionText: detail.optionText,
+        statisticaltype: this.queryParams.statisticaltype,
+        serviceType: this.queryParams.serviceType || [],
+        configKey: this.configKey,
+      };
+
+      // 鏃堕棿鑼冨洿
+      if (
+        this.queryParams.dateRange &&
+        this.queryParams.dateRange.length === 2
+      ) {
+        params.startTime = this.queryParams.dateRange[0];
+        params.endTime = this.queryParams.dateRange[1];
+      }
+
+      // 缁熻缁村害
+      if (this.queryParams.statisticaltype == 1) {
+        // 鎸夌梾鍖�
+        params.deptcode = this.rowData.leavehospitaldistrictcode;
+        params.leavehospitaldistrictcode =
+          this.rowData.leavehospitaldistrictcode;
+        params.leavehospitaldistrictcodes = [
+          this.rowData.leavehospitaldistrictcode,
+        ];
+      } else {
+        // 鎸夌瀹�
+        params.deptcode = this.rowData.deptcode;
+        params.deptcodes = [this.rowData.deptcode];
+      }
+
+      this.patientDrillParams = params;
+      this.patientListTitle = `銆�${detail.optionText}銆嶆偅鑰呮湇鍔″垪琛╜;
+      this.patientListVisible = true;
+    },
+
     // 鏍煎紡鍖栨棩鏈熻寖鍥村瓧绗︿覆锛堜笌涓婚〉闈竴鑷达級
     formatDateRangeForExport() {
       let dateRangeString = "";

--
Gitblit v1.9.3