From dafbb909e478015ee062bf962bddcb20a6fed55c Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期四, 03 七月 2025 14:51:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/sfstatistics/percentage/index.vue |   62 ++++++++++++++++++++-----------
 1 files changed, 40 insertions(+), 22 deletions(-)

diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index f1c04d4..8b1537d 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -69,7 +69,7 @@
                   </el-option>
                 </el-select>
                 <el-select
-                style="margin-left: 10px;"
+                  style="margin-left: 10px"
                   v-if="queryParams.statisticaltype == 1"
                   v-model="queryParams.leavehospitaldistrictcodes"
                   size="medium"
@@ -78,10 +78,10 @@
                   placeholder="璇烽�夋嫨鐥呭尯"
                 >
                   <el-option
-                    v-for="item in flatArray"
-                    :key="item.deptCode"
+                    v-for="item in flatArrayhospit"
+                    :key="item.value"
                     :label="item.label"
-                    :value="item.deptCode"
+                    :value="item.value"
                   >
                   </el-option>
                 </el-select>
@@ -94,10 +94,10 @@
                   placeholder="璇烽�夋嫨绉戝"
                 >
                   <el-option
-                    v-for="item in flatArray"
-                    :key="item.deptCode"
+                    v-for="item in flatArraydept"
+                    :key="item.value"
                     :label="item.label"
-                    :value="item.deptCode"
+                    :value="item.value"
                   >
                   </el-option>
                 </el-select>
@@ -209,6 +209,14 @@
                 align="center"
                 key="leavehospitaldistrictname"
                 prop="leavehospitaldistrictname"
+                width="150"
+                :show-overflow-tooltip="true"
+              />
+              <el-table-column
+                label="绉戝"
+                align="center"
+                key="deptname"
+                prop="deptname"
                 :show-overflow-tooltip="true"
               />
               <el-table-column
@@ -387,15 +395,10 @@
 import {
   toamendtag,
   addapitag,
-  detailstag,
   deletetag,
   changetagcategory,
-  toamendtagcategory,
-  addtagcategory,
-  deletetagcategory,
-  listtag,
-  tagclassifylist,
 } from "@/api/system/label";
+import store from "@/store";
 import { getSfStatistics, deptTreeSelect } from "@/api/system/user";
 
 import Treeselect from "@riophae/vue-treeselect";
@@ -445,8 +448,8 @@
       idds: "", //鍒嗙被id
       // 鎬绘潯鏁�
       total: 0,
-      flatArray: [],
-      deptflatArray: [],
+      flatArrayhospit: [],
+      flatArraydept: [],
 
       Statisticallist: [
         {
@@ -605,13 +608,23 @@
     // 鑾峰彇绉戝鏍�
     getDeptTree() {
       // 绉戝鍒楄〃
-      deptTreeSelect().then((response) => {
-        this.deptOptions = response.data;
-        console.log(this.deptOptions, " this.deptOptions");
-
-        this.flatArray = this.flattenArray(response.data);
-        console.log(this.flatArray, "this.flatArray");
-      });
+       this.flatArraydept = store.getters.belongDepts.map((dept) => {
+      return {
+        label: dept.deptName,
+        value: dept.deptCode,
+      };
+    });
+    this.flatArrayhospit = store.getters.belongWards.map((dept) => {
+      return {
+        label: dept.districtName,
+        value: dept.districtCode,
+      };
+    });
+      // deptTreeSelect().then((response) => {
+      //   this.deptOptions = response.data;
+      //   console.log(this.deptOptions, " this.deptOptions");
+      //   this.flatArray = this.flattenArray(response.data);
+      // });
     },
     flattenArray(multiArray) {
       let result = [];
@@ -713,6 +726,11 @@
     handleQuery() {
       this.queryParams.pageNum = 1;
       console.log();
+      if (this.queryParams.statisticaltype == 1) {
+        this.queryParams.deptcodes = [];
+      } else if (this.queryParams.statisticaltype == 2) {
+        this.queryParams.leavehospitaldistrictcodes = [];
+      }
       this.queryParams.startTime = this.parseTime(
         this.queryParams.dateRange[0]
       );

--
Gitblit v1.9.3