From fb34ba28cb908bd328cf6690ab0b19a56428f4e2 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 13 十一月 2026 10:56:55 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/discharge/index.vue |  343 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 319 insertions(+), 24 deletions(-)

diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue
index 3531957..5712ad2 100644
--- a/src/views/followvisit/discharge/index.vue
+++ b/src/views/followvisit/discharge/index.vue
@@ -5,6 +5,8 @@
       :ycvalue="ycvalue"
       :jgvalue="jgvalue"
       :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+      clickable
+      @card-click="handleCardClick"
     />
     <el-row :gutter="20">
       <!--鐢ㄦ埛鏁版嵁-->
@@ -73,7 +75,7 @@
         <el-form-item label="缁忕鍖荤敓" prop="managementDoctor">
           <el-input
             v-model="topqueryParams.managementDoctor"
-            placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+            placeholder="璇疯緭鍏ョ粡绠″尰鐢�"
           ></el-input>
         </el-form-item>
         <el-form-item label="鏃ユ湡闄愬埗" prop="status">
@@ -121,6 +123,34 @@
             >
             </el-option>
           </el-select>
+        </el-form-item>
+
+        <el-form-item label="褰撳墠鎵ц鏂瑰紡" prop="currentPreachforms">
+          <el-select
+            v-model="topqueryParams.currentPreachforms"
+            placeholder="璇烽�夋嫨"
+            multiple
+            clearable
+            collapse-tags
+          >
+            <el-option
+              v-for="item in currentPreachformOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="isTongdeCampus"
+          label="鏃ラ棿鏍囪"
+          prop="importanceFlagCode"
+        >
+          <el-input
+            v-model="topqueryParams.importanceFlagCode"
+            placeholder="璇疯緭鍏ユ棩闂存爣璁�"
+          ></el-input>
         </el-form-item>
 
         <el-form-item>
@@ -255,6 +285,15 @@
           </span>
         </div>
       </el-row>
+      <div v-if="cardFilter" class="card-filter-tip">
+        褰撳墠鎸夐《閮ㄥ崱鐗囩瓫閫夛細<b>{{ cardFilter }}</b>
+        <span class="tip-desc"
+          >锛堜笉褰卞搷涓婃柟琛ㄥ崟鏉′欢锛岀偣銆屾悳绱€�嶅彲鎭㈠琛ㄥ崟鏉′欢锛�</span
+        >
+        <el-button type="text" size="mini" @click="clearCardFilter"
+          >娓呴櫎</el-button
+        >
+      </div>
       <div class="selected-info">
         宸查�変腑
         <span style="color: #409eff; font-weight: bold">{{
@@ -442,6 +481,16 @@
         >
         </el-table-column>
         <el-table-column
+          v-if="isTongdeCampus"
+          label="鏃ラ棿鏍囪"
+          align="center"
+          key="importanceFlagCode"
+          prop="importanceFlagCode"
+          width="120"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
           label="闅忚瀹屾垚鏃堕棿"
           sortable
           align="center"
@@ -586,6 +635,28 @@
           prop="phone"
         />
         <el-table-column
+          v-if="
+            orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�' || orgname == '涓芥按甯備腑鍖婚櫌'
+          "
+          label="鎷ㄥ彿鐘舵��"
+          width="120"
+          align="center"
+          key="isManuallyCalled"
+          prop="isManuallyCalled"
+        >
+          <template slot-scope="scope">
+            <el-tag
+              v-if="Number(scope.row.isManuallyCalled) > 0"
+              type="success"
+              :disable-transitions="false"
+              >鎷ㄩ�歿{ scope.row.isManuallyCalled }}娆�</el-tag
+            >
+            <el-tag v-else type="info" :disable-transitions="false"
+              >鏈嫧閫�</el-tag
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
           label="韬唤璇佸彿鐮�"
           width="200"
           align="center"
@@ -608,8 +679,8 @@
         <el-table-column
           label="绉戝"
           align="center"
-          key="deptname"
-          prop="deptname"
+          key="leaveldeptname"
+          prop="leaveldeptname"
           width="120"
         >
         </el-table-column>
@@ -1018,7 +1089,7 @@
           <el-input
             style="width: 400px"
             disabled
-            v-model="zcform.deptname"
+            v-model="zcform.leaveldeptname"
           ></el-input>
         </el-form-item>
         <el-form-item label="鐥呭尯">
@@ -1219,9 +1290,12 @@
             { value: 1, label: "琚鍙�" },
             { value: 2, label: "寰呭彂閫�" },
             { value: 3, label: "宸插彂閫�" },
-            { value: 5, label: "鍙戦�佸け璐�" },
             { value: 7, label: "瓒呮椂" },
           ],
+        },
+        {
+          value: 40, // 涓�绾э細鍙戦�佸け璐ワ紙鍗曠嫭鍒楀嚭锛屾柟渚跨洿鎺ョ瓫锛�
+          label: "鍙戦�佸け璐�",
         },
         {
           value: 20, // 涓�绾э細宸插畬鎴�
@@ -1255,6 +1329,8 @@
       ],
       lastScopeType: 3, // 鎮h�呰寖鍥翠笂娆¢�夋嫨鐨勪竴绾х被鍨嬶紙1=绉戝锛�2=鐥呭尯锛�3=鍏ㄩ儴锛�
       loading: false,
+      // 椤堕儴鍗$墖鐐瑰嚮甯︽潵鐨勪复鏃剁瓫閫夛紙鍙綔鐢ㄤ簬涓嬮潰鍒楄〃锛屼笉鍔ㄨ〃鍗曘�佷笉鏀瑰崱鐗囨暟瀛楋紱鐐广�屾悳绱€�嶆椂娓呯┖锛�
+      cardFilter: null,
       cardlist: [
         {
           name: "鎮h�呮湇鍔℃�婚噺",
@@ -1271,6 +1347,10 @@
         },
         {
           name: "寰呴殢璁�",
+          value: 0,
+        },
+        {
+          name: "鍙戦�佸け璐�",
           value: 0,
         },
         {
@@ -1296,8 +1376,7 @@
         btstatus: "",
       },
       // endOut: 1,
-      endOut:
-        localStorage.getItem("orgname") == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�" ? 0 : 1, //0 鍑洪櫌鏃堕棿(姝e簭)    1 鍑洪櫌鏃堕棿(鍊掑簭)   2 鍙戦�佹椂闂�(姝e簭)    3 鍙戦�佹椂闂�(鍊掑簭)  7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+      endOut: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 0 : 1, //0 鍑洪櫌鏃堕棿(姝e簭)    1 鍑洪櫌鏃堕棿(鍊掑簭)   2 鍙戦�佹椂闂�(姝e簭)    3 鍙戦�佹椂闂�(鍊掑簭)  7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
       endOuts: [
         {
           value: 0,
@@ -1361,6 +1440,8 @@
             : "",
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
+        currentPreachforms: [],
+        importanceFlagCode: "",
       },
       orgname: "",
       propss: { multiple: true },
@@ -1391,6 +1472,16 @@
           value: 5,
           label: "鏃犻渶闅忚",
         },
+      ],
+
+      currentPreachformOptions: [
+        { value: "1", label: "浜哄伐" },
+        { value: "2", label: "绾歌川" },
+        { value: "3", label: "鏅鸿兘璇煶" },
+        { value: "4", label: "鐭俊" },
+        { value: "5", label: "寰俊鍏紬鍙�" },
+        { value: "6", label: "寰俊灏忕▼搴�" },
+        { value: "7", label: "鏈悗闅忚" },
       ],
 
       sextype: [
@@ -1483,6 +1574,15 @@
     // 鐩戝惉璺敱鍙傛暟鍙樺寲
     "$route.query": {
       handler(newQuery, oldQuery) {
+        // 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囧啀娆$偣鍑伙紙褰撳墠宸插湪鏈〉锛�
+        if (
+          newQuery?.month &&
+          newQuery?.fromPendingTask === "1" &&
+          this.taskQueryReady
+        ) {
+          this.applyPendingTaskQuery();
+          return;
+        }
         if (newQuery?.errtype !== oldQuery?.errtype) {
           console.log(22);
           this.loadData();
@@ -1513,7 +1613,10 @@
     });
     // 鍏嶇櫥鐩磋揪锛氭牴鎹瀹�/鐥呭尯缂栫爜棰勫~鎮h�呰寖鍥�
     this.applyFollowUpScope();
-    if (this.errtype == 1) {
+    // 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囪烦杞細鎸夊嚭闄㈠勾鏈� + 寰呴殢璁� + 鍑洪櫌婊� 7 澶╄繃婊�
+    if (this.applyPendingTaskQuery()) {
+      // 宸叉寜鍗$墖鏉′欢鏌ヨ锛屼笉鍐嶈蛋榛樿鍒嗘敮
+    } else if (this.errtype == 1) {
       this.toleadExport(2);
     } else if (this.errtype == 2) {
       // 寰呴殢璁�
@@ -1533,9 +1636,16 @@
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });
+    // created 鍒濆鍖栧畬鎴愶紝涔嬪悗璺敱 query 鍙樺寲鎵嶆寜鍗$墖鏉′欢閲嶆柊鏌ヨ
+    this.taskQueryReady = true;
   },
   activated() {
+    // 浠庡埆鐨勬爣绛鹃〉鍒囧洖鏉ユ椂锛屼互琛ㄥ崟鏉′欢涓哄噯锛屼涪寮冨崱鐗囧甫鏉ョ殑涓�娆℃�х瓫閫�
+    this.cardFilter = null;
     this.errtype = this.$route.query.errtype;
+    if (this.applyPendingTaskQuery()) {
+      return;
+    }
     if (this.errtype == 1) {
       this.toleadExport(2);
     } else if (this.errtype == 2) {
@@ -1590,7 +1700,12 @@
       }
 
       try {
-        const response = await getTaskservelist(this.topqueryParams);
+        // 褰撳墠鎵ц鏂瑰紡涓哄閫夛紝闇�杞垚閫楀彿鍒嗛殧瀛楃涓诧紙濡� 1,2,5锛�
+        const params = { ...this.topqueryParams };
+        if (Array.isArray(params.currentPreachforms)) {
+          params.currentPreachforms = params.currentPreachforms.join(",");
+        }
+        const response = await getTaskservelist(params);
 
         // 鉁� 绗竴姝ワ細鍏堥攣瀹氭仮澶嶇姸鎬�
         this.isRestoring = true;
@@ -1607,15 +1722,14 @@
 
         // 鉁� 绗洓姝ワ細澶勭悊鍏朵粬鏁版嵁
         if (refresh) {
-          this.cardlist[0].value =
-            Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
-          this.cardlist[1].value = response.rows[0].wxsf || 0;
-          this.ycvalue = Number(response.rows[0].yc) || 0;
-          this.jgvalue = response.rows[0].jg;
-          this.cardlist[2].value = response.rows[0].xsf || 0;
-          this.cardlist[3].value = response.rows[0].dsf || 0;
-          this.cardlist[4].value = response.rows[0].ywc || 0;
           this.yfsvalue = response.rows[0].yfs;
+          if (this.isTongdeOrg) {
+            // 鐪佺珛鍚屽痉/鍗楀崕锛氶《閮ㄥ崱鐗囨暟瀛椾笉璺熴�岄殢璁跨姸鎬�/寮傚父銆嶈蛋锛屽崟鐙煡涓�娆″幓鎺夌姸鎬佹潯浠剁殑缁熻
+            this.refreshCardCounts(params);
+          } else {
+            // 鍏朵粬鍖婚櫌锛氶《閮ㄦ暟鎹窡闅忕瓫閫夋潯浠跺彉鍔紝鍗曟鏌ヨ鍗冲彲
+            this.setCardValues(response.rows[0]);
+          }
         }
 
         // 鉁� 绗簲姝ワ細澶勭悊 preachform 绛夊叾浠栨暟鎹�
@@ -1624,10 +1738,13 @@
           if (item.endtime) {
             item.endDay = this.daysBetween(item.endtime);
           }
+          console.log(item, "3");
 
           if (item.preachform) {
             item.preachformson = item.preachform;
             idArray = item.preachform.split(",");
+            console.log(this.checkboxlist);
+            console.log(idArray);
 
             item.preachform = idArray.map((value) => {
               const item = this.checkboxlist.find(
@@ -1638,9 +1755,8 @@
           }
           if (item.currentPreachform) {
             item.currentPreachform = this.checkboxlist.find(
-              (item) => item.value == item.currentPreachform
-            )?.value;
-            console.log(item.currentPreachform, "mi");
+              (items) => items.value == item.currentPreachform
+            )?.label;
           }
         });
 
@@ -1768,9 +1884,9 @@
         this.cardlist[2].value = response.rows[0].ysf;
         this.ycvalue = Number(response.rows[0].yc) || 0;
         this.jgvalue = response.rows[0].jg;
-        this.cardlist[3].value = response.rows[0].fssb;
-        this.cardlist[4].value = response.rows[0].dsf;
-        // this.cardlist[5].value = response.rows[0].yfs2;
+        this.cardlist[3].value = response.rows[0].dsf;
+        this.cardlist[4].value = response.rows[0].fssb;
+        this.cardlist[5].value = response.rows[0].ywc;
         this.yfsvalue = response.rows[0].yfs;
         this.loading = false;
         this.userList.forEach((item) => {
@@ -1852,6 +1968,8 @@
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery(refresh) {
+      // 鐐广�屾悳绱€�嶆椂浠ヨ〃鍗曟潯浠朵负鍑嗭紝娓呮帀鍗$墖鐐瑰嚮甯︽潵鐨勪复鏃舵潯浠�
+      this.cardFilter = null;
       this.applyDeptWardScope();
       this.clearAllSelection();
       this.topqueryParams.pageNum = 1;
@@ -1874,6 +1992,80 @@
       if (wardCode) scope.push([2, wardCode]);
       this.topqueryParams.scopetype = scope;
       this.lastScopeType = deptCode ? 1 : 2;
+    },
+    /**
+     * 鍙充笅瑙掋�屽緟澶勭悊闅忚浠诲姟銆嶅崱鐗囩偣鍑绘暟瀛楄烦杞繃鏉ワ細
+     * 鎸夊嚭闄㈠勾鏈� + 寰呴殢璁匡紙sendstate 1/2/3/7锛�+ 鍑洪櫌婊� 7 澶� 杩囨护锛屽彛寰勪笌鍗$墖涓�鑷�
+     * @returns {boolean} 鏄惁宸叉寜鍗$墖鏉′欢鍙戣捣鏌ヨ
+     */
+    applyPendingTaskQuery() {
+      const query = this.$route.query || {};
+      if (!query.month || query.fromPendingTask !== "1") {
+        return false;
+      }
+      // 椤甸潰琚� keep-alive 澶嶇敤鏃朵細閲嶅瑙﹀彂 activated锛屽悓涓�娆$偣鍑诲彧澶勭悊涓�娆�
+      if (this.pendingTaskToken && this.pendingTaskToken === query._t) {
+        return false;
+      }
+      this.pendingTaskToken = query._t;
+
+      const month = String(query.month);
+      const serviceType = Number(query.serviceType) === 3 ? 3 : 2;
+      this.errtype = undefined;
+      const start = month + "-01";
+      // 鍗$墖缁熻鐨勬槸銆屽嚭闄㈡弧 7 澶┿�嶇殑浠诲姟锛屾埅姝㈡棩 = min(璇ユ湀鏈�鍚庝竴澶�, 浠婂ぉ-7 澶�)
+      const end = this.pendingTaskMonthEnd(month);
+      this.dateRange = [start, end];
+      this.topqueryParams.serviceType = serviceType;
+      this.topqueryParams.sendstateView = 1;
+      this.topqueryParams.sendstate = null;
+      // 鍗$墖缁熻鐨勬槸鍏ㄩ儴寰呴殢璁夸换鍔★紙涓嶅尯鍒嗛杞�/澶嶈瘖锛夛紝鍒楄〃杩欓噷鍚屾鏀惧紑
+      this.topqueryParams.visitCount = null;
+      this.topqueryParams.pageNum = 1;
+      // 褰撴湀杩樻病鍒扮 8 澶╂椂锛岃鏈堜笉鍙兘鏈夈�屽嚭闄㈡弧 7 澶┿�嶇殑浠诲姟锛堝崱鐗囨樉绀� 0锛夛紝鍒楄〃鐩存帴缁欑┖銆�
+      // 鏃ユ湡妗嗕粛鏄剧ず璇ユ湀鐨勮嚜鐒跺尯闂达紝閬垮厤鍑虹幇銆岃捣姝㈠�掓寕銆嶇殑绛涢�夋潯浠躲��
+      if (end < start) {
+        this.dateRange = [start, this.pendingTaskMonthLastDay(month)];
+        this.userList = [];
+        this.total = 0;
+        this.loading = false;
+        this.$message.info("璇ユ湀鏆傛棤鍑洪櫌婊� 7 澶╃殑寰呴殢璁夸换鍔�");
+        return true;
+      }
+      this.handleQuery(1);
+      return true;
+    },
+    /**
+     * 璇ユ湀鏈�鍚庝竴澶╋紙yyyy-MM-dd锛夛紝鍙敤浜庛�屽綋鏈堣繕娌℃湁婊� 7 澶╀换鍔°�嶆椂灞曠ず姝e父鏈堜唤鍖洪棿
+     */
+    pendingTaskMonthLastDay(month) {
+      const parts = String(month).split("-");
+      const date = new Date(Number(parts[0]), Number(parts[1]), 0);
+      const mm = String(date.getMonth() + 1).padStart(2, "0");
+      const dd = String(date.getDate()).padStart(2, "0");
+      return date.getFullYear() + "-" + mm + "-" + dd;
+    },
+    /**
+     * 鍗$墖鍙e緞鐨勬湀浠界粨鏉熸棩锛氬崱鐗囧彧缁熻銆屽嚭闄㈡弧 7 澶╀粛鏈殢璁裤�嶇殑浠诲姟锛�
+     * 鎵�浠ユ埅姝㈡棩姘歌繙鏄� min(璇ユ湀鏈�鍚庝竴澶�, 浠婂ぉ-7 澶�)锛�
+     * 鍘嗗彶鏈堜唤鍚屾牱瑕佹寜銆屼粖澶�-7 澶┿�嶆埅鏂紝鍚﹀垯鏈堟湯鍑犲ぉ鍑洪櫌鐨勬偅鑰呬細琚畻杩涙潵锛堝崱鐗� 49銆佸垪琛� 77锛夈��
+     */
+    pendingTaskMonthEnd(month) {
+      const parts = String(month).split("-");
+      const year = Number(parts[0]);
+      const mon = Number(parts[1]);
+      const now = new Date();
+      // 鍑洪櫌婊� 7 澶╋細鍑洪櫌鏃ユ湡 <= 浠婂ぉ-7锛堜笌鍚庣 endtime < 浠婂ぉ-6 00:00 绛変环锛�
+      const cutoff = new Date(
+        now.getFullYear(),
+        now.getMonth(),
+        now.getDate() - 7
+      );
+      const monthEnd = new Date(year, mon, 0);
+      const date = cutoff < monthEnd ? cutoff : monthEnd;
+      const mm = String(date.getMonth() + 1).padStart(2, "0");
+      const dd = String(date.getDate()).padStart(2, "0");
+      return date.getFullYear() + "-" + mm + "-" + dd;
     },
     // 鎮h�呰寖鍥村鐞嗭細浠庡閫夌骇鑱� scopetype 瑙f瀽绉戝/鐥呭尯
     applyDeptWardScope() {
@@ -1956,6 +2148,11 @@
             break;
         }
         this.topqueryParams.sendstate = null;
+        // 涓�绾с�屽彂閫佸け璐ャ�嶏細鎸夌姸鎬� 5 鐩存帴杩囨护锛堜笉绛夊悓浜庡緟闅忚锛�
+        if (value === 40) {
+          this.topqueryParams.sendstateView = null;
+          this.topqueryParams.sendstate = 5;
+        }
       } else {
         // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
         this.topqueryParams.sendstateView = null;
@@ -1979,6 +2176,8 @@
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
+        currentPreachforms: [],
+        importanceFlagCode: "",
       };
       this.handleQuery(1);
     },
@@ -1999,6 +2198,8 @@
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
+        currentPreachforms: [],
+        importanceFlagCode: "",
       };
     },
     handleSelectionChange(rows) {
@@ -2318,6 +2519,86 @@
       }
       this.handleQuery(1);
     },
+    // 椤堕儴缁熻鍗$墖鐐瑰嚮锛氭妸瀵瑰簲绛涢�夋潯浠朵笅甯﹀埌涓嬮潰鐨勫垪琛紙鏁板�间负 0 鐨勫崱鐗囧悓鏍峰彲鐐癸級
+    // 椤堕儴鍗$墖缁熻锛氬幓鎺夈�岄殢璁跨姸鎬� / 寮傚父銆嶆潯浠跺悗鍐嶇粺璁★紝
+    // 杩欐牱鍗$墖鏁板瓧鍙窡鏃ユ湡銆佺瀹�/鐥呭尯绛夋潯浠惰蛋锛屼笉浼氬洜涓虹瓫浜嗐�屽緟闅忚銆嶅氨鎶娿�屽凡瀹屾垚銆嶇畻鎴� 0
+    // 鎶婁竴娆℃煡璇㈣繑鍥炵殑缁熻琛屽啓鍏ラ《閮ㄥ崱鐗�
+    setCardValues(row) {
+      if (!row) return;
+      this.cardlist[0].value = Number(row.wxsf || 0) + Number(row.xsf || 0);
+      this.cardlist[1].value = Number(row.wxsf) || 0;
+      this.cardlist[2].value = Number(row.xsf) || 0;
+      this.cardlist[3].value = Number(row.dsf) || 0;
+      this.cardlist[4].value = Number(row.fssb) || 0;
+      this.cardlist[5].value = Number(row.ywc) || 0;
+      this.ycvalue = Number(row.yc) || 0;
+      this.jgvalue = Number(row.jg) || 0;
+    },
+    async refreshCardCounts(baseQuery) {
+      const query = {
+        ...(baseQuery || this.topqueryParams),
+        pageNum: 1,
+        pageSize: 1,
+        sendstate: null,
+        sendstateView: null,
+        sendstates: null,
+        excep: null,
+      };
+      try {
+        const res = await getTaskservelist(query);
+        const row = (res && res.rows && res.rows[0]) || {};
+        // 鎺ュ彛娌¤繑鍥炵粺璁¤鏃朵繚鎸佸師鍊硷紝閬垮厤涓�娆″紓甯告妸鍗$墖鍏ㄥ埛鎴� 0
+        if (!res || !res.rows || !res.rows.length) {
+          return;
+        }
+        this.setCardValues(row);
+      } catch (e) {
+        console.warn("鍒锋柊椤堕儴鍗$墖缁熻澶辫触", e);
+      }
+    },
+    // 椤堕儴缁熻鍗$墖鐐瑰嚮锛氬彧缁欎笅闈㈢殑鍒楄〃鍔犱复鏃舵潯浠讹紝涓嶅姩涓婃柟琛ㄥ崟銆佷篃涓嶆敼鍗$墖鏁板瓧锛�
+    // 鍗$墖鏁板瓧鍙湪鐐广�屾悳绱€�嶆椂鎸夎〃鍗曟潯浠堕噸绠�
+    handleCardClick(item) {
+      this.cardFilter = item && item.name ? item.name : null;
+      this.topqueryParams.pageNum = 1;
+      // 浼� 0锛氬埛鏂板垪琛紝浣嗕笉鍥炲啓椤堕儴鍗$墖鏁板瓧
+      this.getList(0);
+    },
+    // 鎶婂崱鐗囩偣鍑荤殑鏉′欢鍙犲姞鍒版煡璇㈠弬鏁帮紙杩斿洖鏂板璞★紝涓嶄慨鏀硅〃鍗曟湰韬級
+    applyCardFilter(query) {
+      const name = this.cardFilter;
+      if (!name) return query;
+      // 鍗$墖鏁板瓧鏄�屼笉鍚殢璁跨姸鎬�/寮傚父銆嶇殑鎬婚噺锛屾墍浠ョ偣鍗$墖鏃朵篃鎶婅〃鍗曢噷鐨勭姸鎬佹潯浠跺幓鎺夛紝
+      // 鍙寜鍗$墖鑷繁鐨勬潯浠舵煡锛屽惁鍒欎細鍑虹幇銆屽崱鐗� 922銆佸垪琛� 3 鏉°��
+      query.sendstate = null;
+      query.sendstateView = null;
+      query.sendstates = null;
+      query.excep = null;
+
+      if (name === "鏃犻渶闅忚") {
+        query.sendstateView = 3;
+      } else if (name === "寰呴殢璁�") {
+        query.sendstateView = 1;
+      } else if (name === "鍙戦�佸け璐�") {
+        query.sendstates = [5];
+      } else if (name === "宸插畬鎴�") {
+        query.sendstateView = 2;
+      } else if (name === "闇�闅忚") {
+        query.sendstates = [1, 2, 3, 5, 6, 7];
+      } else if (name === "寮傚父") {
+        query.excep = "1";
+      } else if (name === "璀﹀憡") {
+        query.excep = "2";
+      }
+      // 銆屾偅鑰呮湇鍔℃�婚噺銆�= 鍙幓鎺夌姸鎬佹潯浠讹紝涓嶅姞鍒殑
+      return query;
+    },
+    // 娓呴櫎鍗$墖绛涢�夛紝鍥炲埌琛ㄥ崟鏉′欢
+    clearCardFilter() {
+      this.cardFilter = null;
+      this.topqueryParams.pageNum = 1;
+      this.getList(0);
+    },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
       const originalPageNum = this.topqueryParams.pageNum;
@@ -2503,7 +2784,7 @@
         leavelDeptName: "",
         leavehospitaldistrictcode: "",
         leavehospitaldistrictname: "",
-        currentDeptName: row.deptname || row.deptName || "",
+        currentDeptName: row.leaveldeptname || row.deptName || "",
         currentWardName:
           row.leavehospitaldistrictname || row.leavehospitaldistrictName || "",
       };
@@ -2859,6 +3140,20 @@
   font-size: 14px;
   color: #666;
 }
+.card-filter-tip {
+  margin: 2px 0 4px;
+  padding: 6px 10px;
+  font-size: 13px;
+  color: #303133;
+  background: #f0f7ff;
+  border: 1px solid #d6e9ff;
+  border-radius: 4px;
+}
+.card-filter-tip .tip-desc {
+  margin: 0 6px;
+  font-size: 12px;
+  color: #909399;
+}
 /* ================= 娓呮柊楂樼骇绠�绾﹂ ================= */
 .app-container {
   background: #f5f7fb;

--
Gitblit v1.9.3