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

---
 src/views/sfstatistics/percentage/index.vue |  199 +++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 181 insertions(+), 18 deletions(-)

diff --git a/src/views/sfstatistics/percentage/index.vue b/src/views/sfstatistics/percentage/index.vue
index 745f8f0..5cad6ba 100644
--- a/src/views/sfstatistics/percentage/index.vue
+++ b/src/views/sfstatistics/percentage/index.vue
@@ -356,6 +356,7 @@
                   prop="leavehospitaldistrictname"
                   width="150"
                   :show-overflow-tooltip="true"
+                  :sort-method="sortChineseNumber"
                 />
                 <el-table-column
                   label="绉戝"
@@ -1068,7 +1069,7 @@
             :total="patienttotal"
             :page.sync="patientqueryParams.pn"
             :limit.sync="patientqueryParams.ps"
-            @pagination="Seedetails"
+            @pagination="Seedetailstion"
           />
         </div>
       </div>
@@ -1165,6 +1166,20 @@
                         >宸插畬鎴�</el-tag
                       >
                     </div>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  label="浠诲姟鎵ц鏂瑰紡"
+                  align="center"
+                  key="preachform"
+                  prop="preachform"
+                  width="160"
+                  :show-overflow-tooltip="true"
+                >
+                  <template slot-scope="scope">
+                    <span v-for="item in scope.row.preachform"
+                      >{{ item }}銆�
+                    </span>
                   </template>
                 </el-table-column>
                 <el-table-column
@@ -1283,13 +1298,6 @@
               </el-table>
             </div>
           </el-row>
-          <pagination
-            v-show="patienttotal > 0 && this.patientqueryParams.allhosp != 6"
-            :total="patienttotal"
-            :page.sync="patientqueryParams.pn"
-            :limit.sync="patientqueryParams.ps"
-            @pagination="Seedetails"
-          />
         </div>
       </div>
     </el-dialog>
@@ -1420,6 +1428,7 @@
       allDeptCodes: [],
       // 瀛樺偍鎵�鏈夌梾鍖轰唬鐮�
       allWardCodes: [],
+      checkboxlist: [],
       // 琛ㄥ崟鍙傛暟
       form: {},
       forms: {
@@ -1469,6 +1478,7 @@
   created() {
     this.getDeptTree();
     this.getList();
+    this.checkboxlist = store.getters.checkboxlist;
     this.orgname = localStorage.getItem("orgname");
   },
 
@@ -1487,15 +1497,106 @@
           ? this.allDeptCodes
           : this.queryParams.deptcodes,
       };
-
+      this.loading = true;
       // 绉婚櫎鍙兘瀛樺湪鐨�"all"鍊�
       delete params.leavehospitaldistrictcodes.all;
       delete params.deptcodes.all;
       getSfStatistics(params).then((response) => {
-        console.log(response);
-        // this.total = response.total;
+        this.loading = false;
+
+        this.total = response.total;
+        // this.userList = response.data;
         this.userList = this.customSort(response.data);
       });
+    },
+    sortChineseNumber(aRow, bRow) {
+      const a = aRow.leavehospitaldistrictname;
+      const b = bRow.leavehospitaldistrictname;
+
+      // 涓枃鏁板瓧鍒伴樋鎷変集鏁板瓧鐨勬槧灏勶紙鎵╁睍鍒�45锛�
+      const chineseNumMap = {
+        涓�: 1,
+        浜�: 2,
+        涓�: 3,
+        鍥�: 4,
+        浜�: 5,
+        鍏�: 6,
+        涓�: 7,
+        鍏�: 8,
+        涔�: 9,
+        鍗�: 10,
+        鍗佷竴: 11,
+        鍗佷簩: 12,
+        鍗佷笁: 13,
+        鍗佸洓: 14,
+        鍗佷簲: 15,
+        鍗佸叚: 16,
+        鍗佷竷: 17,
+        鍗佸叓: 18,
+        鍗佷節: 19,
+        浜屽崄: 20,
+        浜屽崄涓�: 21,
+        浜屽崄浜�: 22,
+        浜屽崄涓�: 23,
+        浜屽崄鍥�: 24,
+        浜屽崄浜�: 25,
+        浜屽崄鍏�: 26,
+        浜屽崄涓�: 27,
+        浜屽崄鍏�: 28,
+        浜屽崄涔�: 29,
+        涓夊崄: 30,
+        涓夊崄涓�: 31,
+        涓夊崄浜�: 32,
+        涓夊崄涓�: 33,
+        涓夊崄鍥�: 34,
+        涓夊崄浜�: 35,
+        涓夊崄鍏�: 36,
+        涓夊崄涓�: 37,
+        涓夊崄鍏�: 38,
+        涓夊崄涔�: 39,
+        鍥涘崄: 40,
+        鍥涘崄涓�: 41,
+        鍥涘崄浜�: 42,
+        鍥涘崄涓�: 43,
+        鍥涘崄鍥�: 44,
+        鍥涘崄浜�: 45,
+      };
+
+      // 鎻愬彇涓枃鏁板瓧
+      const getNumberFromText = (text) => {
+        if (!text || typeof text !== "string") return -1;
+
+        // 鍖归厤涓枃鏁板瓧锛屾敮鎸佷竴鍒板洓鍗佷簲
+        const match = text.match(/^([涓�浜屼笁鍥涗簲鍏竷鍏節鍗乚+)/);
+
+        if (match && match[1]) {
+          const chineseNum = match[1];
+          return chineseNumMap[chineseNum] !== undefined
+            ? chineseNumMap[chineseNum]
+            : -1;
+        }
+
+        // 濡傛灉娌℃湁鍖归厤鍒颁腑鏂囨暟瀛楋紝灏濊瘯鍖归厤闃挎媺浼暟瀛�
+        const arabicMatch = text.match(/^(\d+)/);
+        if (arabicMatch && arabicMatch[1]) {
+          const num = parseInt(arabicMatch[1], 10);
+          return num >= 1 && num <= 45 ? num : -1;
+        }
+
+        return -1;
+      };
+
+      const numA = getNumberFromText(a);
+      const numB = getNumberFromText(b);
+
+      // 澶勭悊鏃犳硶瑙f瀽鐨勬儏鍐�
+      if (numA === -1 && numB === -1) {
+        return (a || "").localeCompare(b || "");
+      }
+      if (numA === -1) return 1;
+      if (numB === -1) return -1;
+
+      return numA - numB;
     },
     // 鎼滅储澶勭悊鍑芥暟
     handleSearch() {
@@ -1511,8 +1612,9 @@
       }
     },
     customSort(data) {
-      // 瀹氫箟鎮ㄦ湡鏈涚殑鐥呭尯椤哄簭锛堟墿灞曞埌涓夊崄锛�
+      // 瀹氫箟鎮ㄦ湡鏈涚殑鐥呭尯椤哄簭锛堟墿灞曞埌鍥涘崄浜旓級
       const order = [
+        "涓�",
         "浜�",
         "涓�",
         "鍥�",
@@ -1542,21 +1644,55 @@
         "浜屽崄鍏�",
         "浜屽崄涔�",
         "涓夊崄",
+        "涓夊崄涓�",
+        "涓夊崄浜�",
+        "涓夊崄涓�",
+        "涓夊崄鍥�",
+        "涓夊崄浜�",
+        "涓夊崄鍏�",
+        "涓夊崄涓�",
+        "涓夊崄鍏�",
+        "涓夊崄涔�",
+        "鍥涘崄",
+        "鍥涘崄涓�",
+        "鍥涘崄浜�",
+        "鍥涘崄涓�",
+        "鍥涘崄鍥�",
+        "鍥涘崄浜�",
       ];
 
       return data.sort((a, b) => {
-        // 鎻愬彇鐥呭尯鍚嶇О涓殑涓枃鏁板瓧閮ㄥ垎[6](@ref)
+        // 鎻愬彇鐥呭尯鍚嶇О涓殑涓枃鏁板瓧閮ㄥ垎
         const getIndex = (name) => {
-          const numStr = name.match(
-            /^(浜寍涓墊鍥泑浜攟鍏瓅涓億鍏珅涔潀鍗亅鍗佷竴|鍗佷簩|鍗佷笁|鍗佸洓|鍗佷簲|鍗佸叚|鍗佷竷|鍗佸叓|鍗佷節|浜屽崄|浜屽崄涓�|浜屽崄浜寍浜屽崄涓墊浜屽崄鍥泑浜屽崄浜攟浜屽崄鍏瓅浜屽崄涓億浜屽崄鍏珅浜屽崄涔潀涓夊崄)/
-          )?.[1];
-          return order.indexOf(numStr);
+          if (!name || typeof name !== "string") return -1;
+
+          // 鍖归厤涓枃鏁板瓧
+          const chineseMatch = name.match(/^([涓�浜屼笁鍥涗簲鍏竷鍏節鍗乚+)/);
+          if (chineseMatch && chineseMatch[1]) {
+            return order.indexOf(chineseMatch[1]);
+          }
+
+          // 鍖归厤闃挎媺浼暟瀛�
+          const arabicMatch = name.match(/^(\d+)/);
+          if (arabicMatch && arabicMatch[1]) {
+            const num = parseInt(arabicMatch[1], 10);
+            if (num >= 1 && num <= 45) {
+              return num - 1; // 鍥犱负鏁扮粍绱㈠紩浠�0寮�濮�
+            }
+          }
+
+          return -1;
         };
 
         const indexA = getIndex(a.leavehospitaldistrictname);
         const indexB = getIndex(b.leavehospitaldistrictname);
 
-        // 濡傛灉閮藉湪瀹氫箟鐨勯『搴忎腑锛屾寜瀹氫箟椤哄簭鎺掞紱鍚﹀垯锛屾湭瀹氫箟鐨勬帓鍦ㄥ悗闈2](@ref)
+        // 鎺掑簭閫昏緫
+        if (indexA === -1 && indexB === -1) {
+          return (a.leavehospitaldistrictname || "").localeCompare(
+            b.leavehospitaldistrictname || ""
+          );
+        }
         if (indexA === -1) return 1;
         if (indexB === -1) return -1;
         return indexA - indexB;
@@ -1847,11 +1983,36 @@
         this.Seedloading = false;
       });
     },
+    Seedetailstion() {
+      selectTimelyRate(this.patientqueryParams).then((response) => {
+        this.logsheetlist = response.data.detail;
+        this.patienttotal = response.data.total;
+        this.Seedloading = false;
+      });
+    },
     viewDetails(row, title) {
       this.infotitleVisible = true;
       this.infotitle = title;
       this.infotitlelist = row; // 鍋囪row灏辨槸闇�瑕佸睍绀虹殑璇︾粏鏁扮粍
+      console.log(this.infotitlelist, "this.infotitlelist");
 
+      this.infotitlelist.forEach((item) => {
+        let idArray = null;
+
+        if (item.preachform) {
+          if (item.endtime) {
+            item.preachformson = item.preachform;
+            idArray = item.preachform.split(",");
+          }
+
+          item.preachform = idArray.map((value) => {
+            // 鏌ユ壘id瀵瑰簲鐨勫璞�
+            const item = this.checkboxlist.find((item) => item.value == value);
+            // 濡傛灉鎵惧埌瀵瑰簲鐨刬d锛岃繑鍥瀕abel鍊硷紝鍚﹀垯杩斿洖null
+            return item ? item.label : null;
+          });
+        }
+      });
       // 鍒濆鍖栧姞杞�
       this.loadIndex = 0;
       this.currentDisplayList = [];
@@ -1865,6 +2026,8 @@
 
       // 妯℃嫙寮傛鍔犺浇锛屽疄闄呭彲鑳芥槸鐩存帴鍒囩墖鏈湴鏁版嵁
       setTimeout(() => {
+        console.log(this.infotitlelist, "this.infotitlelist");
+
         const nextChunk = this.infotitlelist.slice(
           this.loadIndex,
           this.loadIndex + this.pageSize

--
Gitblit v1.9.3