From 8a5b241f74d1ab28e0badbd5ae6ee7c1b173ef52 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 05 九月 2025 14:50:34 +0800
Subject: [PATCH] 测试完成

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

diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index bb119e0..1b061e9 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -27,35 +27,34 @@
                   </el-option>
                 </el-select>
                 <el-select
-                  style="margin-left: 10px"
                   v-if="queryParams.statisticaltype == 1"
-                  v-model="queryParams.leavehospitaldistrictcodes"
+                  v-model="queryParams.leavehospitaldistrictcode"
                   size="medium"
                   multiple
                   filterable
                   placeholder="璇烽�夋嫨鐥呭尯"
                 >
                   <el-option
-                    v-for="item in flatArrayhospit"
-                    :key="item.value"
+                    v-for="item in flatArray"
+                    :key="item.deptCode"
                     :label="item.label"
-                    :value="item.value"
+                    :value="item.deptCode"
                   >
                   </el-option>
                 </el-select>
                 <el-select
                   v-else-if="queryParams.statisticaltype == 2"
-                  v-model="queryParams.deptcodes"
+                  v-model="queryParams.deptCode"
                   size="medium"
                   multiple
                   filterable
                   placeholder="璇烽�夋嫨绉戝"
                 >
                   <el-option
-                    v-for="item in flatArraydept"
-                    :key="item.value"
+                    v-for="item in flatArray"
+                    :key="item.deptCode"
                     :label="item.label"
-                    :value="item.value"
+                    :value="item.deptCode"
                   >
                   </el-option>
                 </el-select>
@@ -83,7 +82,6 @@
               >
                 <el-date-picker
                   v-model="queryParams.dateRange"
-                  value-format="yyyy-MM-dd"
                   type="daterange"
                   range-separator="鑷�"
                   start-placeholder="寮�濮嬫棩鏈�"
@@ -107,14 +105,18 @@
                   >閲嶇疆</el-button
                 >
               </el-form-item>
-              <el-col :span="19">
+            </el-form>
+
+            <el-row :gutter="10" class="mb8">
+              <el-col :span="1.5">
                 <el-button
-                  type="warning"
+                  type="primary"
                   plain
-                  icon="el-icon-download"
+                  icon="el-icon-plus"
                   size="medium"
-                  @click="handleExport"
-                  >瀵煎嚭</el-button
+                  @click="addladeltag"
+                  v-hasPermi="['system:user:add']"
+                  >鏂板</el-button
                 >
                 <el-button
                   type="primary"
@@ -125,7 +127,8 @@
                   >缁熻瓒嬪娍鍥�</el-button
                 >
               </el-col>
-            </el-form>
+            </el-row>
+
             <el-table
               v-loading="loading"
               :data="userList"
@@ -343,17 +346,8 @@
               <el-table-column
                 label="鍑洪櫌鐥呭尯"
                 align="center"
-                sortable
                 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
@@ -423,24 +417,6 @@
                       }}%</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="浜哄伐"
@@ -798,11 +774,17 @@
 import {
   toamendtag,
   addapitag,
+  detailstag,
   deletetag,
   changetagcategory,
+  toamendtagcategory,
+  addtagcategory,
+  deletetagcategory,
+  listtag,
+  tagclassifylist,
 } from "@/api/system/label";
+import { getSfStatistics, deptTreeSelect } from "@/api/system/user";
 import store from "@/store";
-import { getSfStatistics, selectTimelyRate } from "@/api/system/user";
 
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -831,7 +813,7 @@
   },
 ];
 export default {
-  name: "Percentage",
+  name: "questionnaire",
   dicts: ["sys_normal_disable", "sys_user_sex"],
   components: { Treeselect },
   data() {
@@ -856,10 +838,9 @@
       idds: "", //鍒嗙被id
       // 鎬绘潯鏁�
       total: 0,
-      flatArrayhospit: [],
-      flatArraydept: [],
-      patienttotal: 0,
-      logsheetlist: [],
+      flatArray: [],
+      deptflatArray: [],
+
       Statisticallist: [
         {
           label: "鐥呭尯缁熻",
@@ -870,10 +851,6 @@
           value: 2,
         },
       ],
-      patientqueryParams: {
-        pn: 1,
-        ps: 10,
-      },
       amendtag: false, //鏄惁淇敼绫诲埆
       lstamendtag: false, //鏄惁淇敼鏍囩
       scavisible: false, //鍒犻櫎寮规
@@ -901,10 +878,6 @@
       postOptions: [],
       // 瑙掕壊閫夐」
       roleOptions: [],
-      // 瀛樺偍鎵�鏈夌瀹や唬鐮�
-      allDeptCodes: [],
-      // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮�
-      allWardCodes: [],
       // 琛ㄥ崟鍙傛暟
       form: {},
       forms: {
@@ -916,7 +889,7 @@
       goQRCodeVisible: false, //浜岀淮鐮佸脊妗�
       sidecolumnval: "", //绫诲埆鎼滅储
       propss: { multiple: true },
-      SeedetailsVisible: false,
+
       options: [
         {
           value: 1,
@@ -998,30 +971,14 @@
   },
   watch: {},
   created() {
-    this.getDeptTree();
     this.getList();
+    this.getDeptTree();
   },
 
   methods: {
     /** 鏌ヨ鏍囩鍒楄〃 */
     getList() {
-      // 澶勭悊鏌ヨ鍙傛暟
-      const params = {
-        ...this.queryParams,
-        // 濡傛灉閫夋嫨浜�"鍏ㄩ儴"锛屽垯浼犳墍鏈夌梾鍖�/绉戝浠g爜
-        leavehospitaldistrictcodes:
-          this.queryParams.leavehospitaldistrictcodes.includes("all")
-            ? this.allWardCodes
-            : this.queryParams.leavehospitaldistrictcodes,
-        deptcodes: this.queryParams.deptcodes.includes("all")
-          ? this.allDeptCodes
-          : this.queryParams.deptcodes,
-      };
-
-      // 绉婚櫎鍙兘瀛樺湪鐨�"all"鍊�
-      delete params.leavehospitaldistrictcodes.all;
-      delete params.deptcodes.all;
-      getSfStatistics(params).then((response) => {
+      getSfStatistics(this.queryParams).then((response) => {
         console.log(response);
         // this.total = response.total;
         this.userList = response.data;
@@ -1077,11 +1034,12 @@
     // 鑾峰彇绉戝鏍�
     getDeptTree() {
       // 绉戝鍒楄〃
-      this.flatArraydept = store.getters.belongDepts.map((dept) => {
-        return {
-          label: dept.deptName,
-          value: dept.deptCode,
-        };
+      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.allDeptCodes = store.getters.belongDepts.map(
@@ -1132,41 +1090,6 @@
         tagdescription: "",
         tagid: "",
       };
-    },
-    Seedetails(row) {
-      this.SeedetailsVisible = true;
-      this.Seedloading = true;
-      this.patientqueryParams.starttime = this.parseTime(
-        this.queryParams.dateRange[0]
-      );
-      this.patientqueryParams.endtime = this.parseTime(
-        this.queryParams.dateRange[1]
-      );
-      this.patientqueryParams.deptcode = row.deptcode;
-      selectTimelyRate(this.patientqueryParams).then((response) => {
-        this.logsheetlist = response.data.detail;
-        this.patienttotal = response.data.total;
-        this.Seedloading = false;
-      });
-    },
-    SeedetailsgGo(row) {
-      this.SeedetailsVisible = false;
-      let type = "";
-      if (row.preachformson && row.preachformson.includes("3")) {
-        type = 1;
-      }
-      setTimeout(() => {
-        this.$router.push({
-          path: "/followvisit/record/detailpage/",
-          query: {
-            taskid: row.taskid,
-            patid: row.patid,
-            id: row.id,
-            Voicetype: type,
-            // visitCount: this.topqueryParams.visitCount,
-          },
-        });
-      }, 300);
     },
     // 娣诲姞/淇敼鏍囩
     Maintenancetag() {
@@ -1237,14 +1160,7 @@
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery() {
       this.queryParams.pageNum = 1;
-      if (!this.queryParams.dateRange) this.queryParams.dateRange = [];
-      if (this.queryParams.statisticaltype == 1) {
-        this.queryParams.deptcodes = [];
-      } else if (this.queryParams.statisticaltype == 2) {
-        this.queryParams.leavehospitaldistrictcodes = [];
-      }
-      console.log(this.queryParams.dateRange);
-
+      console.log();
       this.queryParams.startTime = this.parseTime(
         this.queryParams.dateRange[0]
       );

--
Gitblit v1.9.3