From c899dff1fce7f8054008cd9887a9729cdffd88cb Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期四, 19 十一月 2026 11:34:32 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/mzsatisfaction/index.vue |  363 +++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 261 insertions(+), 102 deletions(-)

diff --git a/src/views/followvisit/mzsatisfaction/index.vue b/src/views/followvisit/mzsatisfaction/index.vue
index 9cadc18..75813ce 100644
--- a/src/views/followvisit/mzsatisfaction/index.vue
+++ b/src/views/followvisit/mzsatisfaction/index.vue
@@ -2,9 +2,8 @@
   <div class="app-container">
     <statistics-cards
       :cardlist="cardlist"
-      :ycvalue="ycvalue"
-      :jgvalue="jgvalue"
-      :show-warning-condition="orgname == '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'"
+      :show-extra="false"
+      :show-warning-condition="false"
     />
     <el-row :gutter="20">
       <!--鐢ㄦ埛鏁版嵁-->
@@ -16,14 +15,7 @@
         v-show="showSearch"
         label-width="98px"
       >
-        <el-form-item label="浠诲姟鍚嶇О">
-          <el-input
-            v-model="topqueryParams.taskName"
-            placeholder="璇烽�夋嫨浠诲姟鍚嶇О"
-          ></el-input>
-        </el-form-item>
-
-        <el-form-item label="鍑洪櫌鏃堕棿">
+        <el-form-item label="瀹屾垚鏃堕棿">
           <el-date-picker
             v-model="dateRange"
             style="width: 240px"
@@ -41,31 +33,18 @@
             placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
           ></el-input>
         </el-form-item>
-        <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
-          <el-input
-            v-model="topqueryParams.leavediagname"
-            placeholder="璇疯緭鍏ヨ瘖鏂悕绉�"
-          ></el-input>
-        </el-form-item>
-        <el-form-item label="闅忚浜哄憳" prop="updateBy">
+        <el-form-item label="澶勭悊浜哄憳" prop="updateBy">
           <el-input
             v-model="topqueryParams.updateBy"
-            placeholder="璇疯緭鍏ラ殢璁夸汉鍛�"
+            placeholder="璇疯緭鍏ュ鐞嗕汉鍛�"
           ></el-input>
         </el-form-item>
-        <el-form-item label="涓绘不鍖荤敓" prop="drname">
+        <el-form-item label="鎺ヨ瘖鍖荤敓" prop="drname">
           <el-input
             v-model="topqueryParams.drname"
-            placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
+            placeholder="璇疯緭鍏ユ帴璇婂尰鐢�"
           ></el-input>
         </el-form-item>
-        <el-form-item label="缁忕鍖荤敓" prop="managementDoctor">
-          <el-input
-            v-model="topqueryParams.managementDoctor"
-            placeholder="璇疯緭鍏ヤ富娌诲尰鐢�"
-          ></el-input>
-        </el-form-item>
-
         <el-form-item label="鎮h�呰寖鍥�" prop="status">
           <el-cascader
             v-model="topqueryParams.scopetype"
@@ -76,6 +55,24 @@
             :props="{ expandTrigger: 'hover' }"
             @change="handleChange"
           ></el-cascader>
+        </el-form-item>
+        <el-form-item label="鐐逛綅" prop="pointLocations" v-if="isTongdeCampus">
+          <el-select
+            v-model="topqueryParams.pointLocations"
+            multiple
+            filterable
+            clearable
+            placeholder="璇烽�夋嫨鐐逛綅"
+            style="width: 240px"
+            @change="handlePointLocationChange"
+          >
+            <el-option
+              v-for="item in pointOptions"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            ></el-option>
+          </el-select>
         </el-form-item>
 
         <!-- <el-form-item label="鏈嶅姟鐘舵��" prop="status">
@@ -92,7 +89,7 @@
             </el-option>
           </el-select>
         </el-form-item> -->
-        <el-form-item label="闅忚鐘舵��" prop="status">
+        <el-form-item label="澶勭悊鐘舵��" prop="status">
           <el-cascader
             v-model="serviceStatusValue"
             placeholder="璇烽�夋嫨"
@@ -194,7 +191,7 @@
             </div>
           </div>
         </el-col>
-        <el-col :span="1.5">
+        <!-- <el-col :span="1.5">
           <div class="documentf">
             <div class="document">
               <el-button
@@ -206,7 +203,7 @@
               >
             </div>
           </div>
-        </el-col>
+        </el-col> -->
         <el-col :span="1.5">
           <div class="documentf">
             <div class="document">
@@ -225,15 +222,6 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="50" align="center" />
-        <el-table-column
-          label="浠诲姟鍚嶇О"
-          fixed
-          width="150"
-          show-overflow-tooltip
-          align="center"
-          key="taskName"
-          prop="taskName"
-        />
         <!-- <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> -->
         <el-table-column
           label="濮撳悕"
@@ -261,7 +249,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          label="闅忚鐘舵��"
+          label="澶勭悊鐘舵��"
           align="center"
           key="sendstateView"
           prop="sendstateView"
@@ -338,20 +326,13 @@
           </template></el-table-column
         >
         <el-table-column
-          label="涓绘不鍖荤敓"
+          label="鎺ヨ瘖鍖荤敓"
           width="120"
           align="center"
           key="drname"
           prop="drname"
         />
 
-        <el-table-column
-          label="缁忕鍖荤敓"
-          align="center"
-          key="managementDoctor"
-          prop="managementDoctor"
-          width="120"
-        />
         <el-table-column
           label="鍑洪櫌澶╂暟"
           width="120"
@@ -400,8 +381,8 @@
         <el-table-column
           label="绉戝"
           align="center"
-          key="deptname"
-          prop="deptname"
+          key="leaveldeptname"
+          prop="leaveldeptname"
           width="120"
         >
         </el-table-column>
@@ -413,22 +394,25 @@
           width="120"
         >
         </el-table-column>
+        <el-table-column
+          v-if="isTongdeCampus"
+          label="鐐逛綅"
+          width="120"
+          align="center"
+          key="pointLocation"
+        >
+          <template slot-scope="scope">
+            {{ pointNameOf(scope.row) }}
+          </template>
+        </el-table-column>
 
         <el-table-column
-          label="璇婃柇鍚嶇О"
-          align="center"
-          key="leavediagname"
-          prop="leavediagname"
-          width="120"
-          :show-overflow-tooltip="true"
-        >
-        </el-table-column>
-        <el-table-column
-          label="闅忚浜哄憳"
+          label="澶勭悊浜哄憳"
           align="center"
           key="updateBy"
           prop="updateBy"
-          width="120"
+          min-width="120"
+          :show-overflow-tooltip="true"
         />
         <el-table-column
           label="闂ㄨ瘖婊℃剰搴︽ā鏉垮悕绉�"
@@ -917,7 +901,7 @@
           <el-input
             style="width: 400px"
             disabled
-            v-model="zcform.deptname"
+            v-model="zcform.leaveldeptname"
           ></el-input>
         </el-form-item>
         <el-form-item label="鐥呭尯">
@@ -970,6 +954,7 @@
   updateUser,
   resetUserPwd,
   changeUserStatus,
+  deptTreeSelect,
 } from "@/api/system/user";
 import {
   getTaskservelist,
@@ -1001,6 +986,8 @@
       multiple: true,
       // 鏄剧ず鎼滅储鏉′欢
       showSearch: true,
+      jgvalue: 0,
+
       dialogFormVisible: false,
       // 鎬绘潯鏁�
       total: 0,
@@ -1028,7 +1015,7 @@
       dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
       inputVisible: false,
       Labelchange: false,
-      ycvalue: "",
+      ycvalue: 0,
       yfsvalue: "",
       inputValue: "",
       preachform: "",
@@ -1097,25 +1084,24 @@
       loading: false,
       cardlist: [
         {
-          name: "鎮h�呮湇鍔℃�婚噺",
-          value: 0,
-        },
-
-        {
-          name: "鏃犻渶闅忚",
+          name: "闂ㄨ瘖鎬婚噺",
           value: 0,
         },
         {
-          name: "闇�闅忚",
+          name: "鍙戦�佷换鍔¢噺",
           value: 0,
         },
         {
-          name: "寰呴殢璁�",
+          name: "寰呭畬鎴�",
           value: 0,
         },
         {
           name: "宸插畬鎴�",
           value: 0,
+        },
+        {
+          name: "瀹屾垚鐜�",
+          value: "0%",
         },
       ],
       zcrules: {
@@ -1174,6 +1160,7 @@
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
+        pointLocations: [],
       },
       propss: { multiple: true },
       options: [],
@@ -1258,11 +1245,17 @@
           },
         },
       },
+      orgname: "",
+
       amendtag: false,
       errtype: "",
       leavehospitaldistrictcode: "",
       serviceState: [],
       checkboxlist: [],
+      // 鐐逛綅鍒楄〃锛堝悓寰烽櫌鍖猴紝deptType=3锛�
+      pointOptions: [],
+      // 鐐逛綅閫夋嫨鍘嗗彶鍊硷紙鐢ㄤ簬鈥滃叏閮�/鍏蜂綋鐐逛綅鈥濅簰鏂ュ垽鏂級
+      pointPrevLocations: [],
       // 琛ㄥ崟鏍¢獙
       rules: {},
     };
@@ -1272,6 +1265,8 @@
     this.serviceState = store.getters.serviceState;
     this.checkboxlist = store.getters.checkboxlist;
     this.errtype = this.$route.query.errtype;
+    this.orgname = localStorage.getItem("orgname");
+
     this.leavehospitaldistrictcode =
       this.$route.query.leavehospitaldistrictcode;
     this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
@@ -1291,6 +1286,7 @@
     } else {
       this.getList(1);
     }
+    this.getPointOptions();
     this.getConfigKey("sys.user.initPassword").then((response) => {
       this.initPassword = response.msg;
     });
@@ -1317,32 +1313,42 @@
         );
         console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
       }
+
+      const queryParams = this.buildQueryParams();
+
       this.loading = true;
       if (
-        this.topqueryParams.leavehospitaldistrictcodes[0] &&
-        this.topqueryParams.leaveldeptcodes[0]
+        queryParams.leavehospitaldistrictcodes &&
+        queryParams.leavehospitaldistrictcodes[0] &&
+        queryParams.leaveldeptcodes &&
+        queryParams.leaveldeptcodes[0]
       ) {
-        this.topqueryParams.deptOrDistrict = 2;
+        queryParams.deptOrDistrict = 2;
       } else {
-        this.topqueryParams.deptOrDistrict = 1;
+        queryParams.deptOrDistrict = 1;
       }
 
       if (!this.followupAuthority()) {
         this.$message.warning("鏈厤缃瀹�/鐥呭尯鐩稿叧鏉冮檺涓嶅彲鏌ヨ");
         return Promise.reject(new Error("鏃犳潈闄愭煡璇�"));
       }
-      getTaskservelist(this.topqueryParams).then((response) => {
+      getTaskservelist(queryParams).then((response) => {
         this.userList = response.rows[0].serviceSubtaskList;
         this.total = response.total;
         if (refresh) {
-          this.cardlist[0].value =
+          // 闂ㄨ瘖鎬婚噺锛氭殏鏃犲瓧娈碉紝淇濇寔 0
+          // 鍙戦�佷换鍔¢噺 = 鎮h�呮湇鍔℃�婚噺锛堟棤闇�闅忚 + 闇�闅忚锛�
+          this.cardlist[1].value =
             Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
-          // this.cardlist[1].value = response.rows[0].wzx;
-          this.cardlist[1].value = response.rows[0].wxsf || 0;
           this.ycvalue = response.rows[0].yc;
-          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.cardlist[2].value = response.rows[0].dsf || 0; // 寰呭畬鎴� = 寰呴殢璁�
+          this.cardlist[3].value = response.rows[0].ywc || 0; // 宸插畬鎴� = 宸查殢璁�
+          // 瀹屾垚鐜� = 宸插畬鎴� / (寰呭畬鎴� + 宸插畬鎴�)
+          const dsf = Number(response.rows[0].dsf) || 0;
+          const ywc = Number(response.rows[0].ywc) || 0;
+          const doneTotal = dsf + ywc;
+          this.cardlist[4].value =
+            doneTotal > 0 ? ((ywc / doneTotal) * 100).toFixed(2) + "%" : "0%";
           this.yfsvalue = response.rows[0].yfs;
         }
         this.loading = false;
@@ -1377,22 +1383,79 @@
       this.getList(1);
     },
     onthatday() {
-      this.topqueryParams.startSendDateTime = this.getCurrentDate();
-      this.topqueryParams.endSendDateTime = this.getCurrentDate();
+      this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+      this.topqueryParams.sendstate = null;
+      this.topqueryParams.startSendDateTime = null;
+      this.topqueryParams.endSendDateTime = this.getCurrentDate(); // 寮�濮嬮殢璁挎棩鏈� <= 浠婂ぉ
       this.getList(1);
     },
     getCurrentDate() {
       const now = new Date();
       return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
     },
-    buidegetTasklist(type) {
-      if (this.topqueryParams.searchscope == 3) {
-        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
-          (obj) => obj.deptCode
-        );
-        this.topqueryParams.leavehospitaldistrictcodes =
-          store.getters.belongWards.map((obj) => obj.districtCode);
+
+    // 鐐逛綅鍒楄〃锛堝悓寰烽櫌鍖猴紝deptType=3锛�
+    getPointOptions() {
+      if (!this.isTongdeCampus) return;
+      deptTreeSelect(3).then((response) => {
+        const flat = [];
+        const walk = (nodes) => {
+          (Array.isArray(nodes) ? nodes : []).forEach((n) => {
+            if (n.label && n.deptCode) {
+              flat.push({ label: n.label, value: String(n.deptCode) });
+            }
+            if (n.children && n.children.length) walk(n.children);
+          });
+        };
+        walk(response && response.data);
+        this.pointOptions = [{ label: "鍏ㄩ儴", value: "all" }, ...flat];
+        // 杩涘叆椤甸潰榛樿鏌ヨ鍏ㄩ儴鐐逛綅
+        this.topqueryParams.pointLocations = ["all"];
+        this.pointPrevLocations = ["all"];
+        if (!this.errtype) {
+          this.getList(1);
+        }
+      });
+    },
+    // 鐐逛綅閫夋嫨锛氬叏閮ㄤ笌鍏蜂綋鐐逛綅浜掓枼
+    handlePointLocationChange(val) {
+      const all = "all";
+      const hasAll = val.includes(all);
+      if (hasAll && val.length > 1) {
+        const prev = this.pointPrevLocations || [];
+        if (prev.includes(all)) {
+          // 涔嬪墠宸查�夆�滃叏閮ㄢ�濓紝鏈鏂板鍏蜂綋鐐逛綅 鈫� 鍘绘帀鈥滃叏閮ㄢ��
+          this.topqueryParams.pointLocations = val.filter((v) => v !== all);
+        } else {
+          // 鏈鏂板鈥滃叏閮ㄢ�� 鈫� 鍙繚鐣欌�滃叏閮ㄢ��
+          this.topqueryParams.pointLocations = [all];
+        }
       }
+      this.pointPrevLocations = [...this.topqueryParams.pointLocations];
+    },
+
+    // 鐐逛綅鍚嶇О锛氬皢 pointLocation 缂栫爜鏄犲皠涓虹偣浣嶅悕绉�
+    pointNameOf(row) {
+      if (
+        !row ||
+        row.pointLocation === undefined ||
+        row.pointLocation === null ||
+        row.pointLocation === ""
+      ) {
+        return "";
+      }
+      const found = this.pointOptions.find(
+        (p) => String(p.value) === String(row.pointLocation)
+      );
+      return found ? found.label : row.pointLocation;
+    },
+    buidegetTasklist(type) {
+      // 鐢ㄦ埛鏉冮檺涓嬫墍鏈夊緟闅忚浠诲姟锛氫紶閫掑叏閮ㄧ瀹ゅ拰鐥呭尯
+      this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
+        (obj) => obj.deptCode
+      );
+      this.topqueryParams.leavehospitaldistrictcodes =
+        store.getters.belongWards.map((obj) => obj.districtCode);
       // 鎺ュ彈寮傚父璺宠浆
       if (this.errtype) {
         this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1404,7 +1467,7 @@
         pageSize: 10,
         leavehospitaldistrictcodes:
           this.topqueryParams.leavehospitaldistrictcodes,
-        sendstates: [2, 3],
+        sendstateView: 1,
         leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
       };
       buidegetTasklist(obj).then((response) => {
@@ -1496,7 +1559,7 @@
         this.options = [];
       }
     },
-    // 褰卞儚闅忚鐘舵�佷慨鏀�
+    // 褰卞儚澶勭悊鐘舵�佷慨鏀�
     handleStatusChange(row) {
       let text = row.status === "0" ? "鍚敤" : "鍋滅敤";
       this.$modal
@@ -1540,11 +1603,27 @@
           store.getters.belongWards.map((obj) => obj.districtCode);
       }
       this.topqueryParams.pageNum = 1;
-      this.topqueryParams.startOutHospTime = this.dateRange[0];
-      this.topqueryParams.endOutHospTime = this.dateRange[1];
-      this.topqueryParams.startSendDateTime = this.dateRangefs[0];
-      this.topqueryParams.endSendDateTime = this.dateRangefs[1];
+      this.topqueryParams.finishtimeStart = this.dateRange[0];
+      this.topqueryParams.finishtimeEnd = this.dateRange[1];
+
       this.getList(refresh);
+    },
+    // 鏋勯�犳煡璇�/瀵煎嚭鍙傛暟锛氶�夋嫨鐐逛綅鏃剁瀹�/鐥呭尯浼� null锛屽惁鍒欎繚鎸佸師鍊�
+    buildQueryParams() {
+      const params = { ...this.topqueryParams };
+      let locations = this.topqueryParams.pointLocations || [];
+      // 鈥滃叏閮ㄢ�濈偣浣嶏細灞曞紑涓烘墍鏈夊疄闄呯偣浣嶇紪鐮�
+      if (locations.includes("all")) {
+        locations = this.pointOptions
+          .filter((p) => p.value !== "all")
+          .map((p) => p.value);
+      }
+      params.pointLocations = locations;
+      if (locations.length > 0) {
+        params.leaveldeptcodes = null;
+        params.leavehospitaldistrictcodes = null;
+      }
+      return params;
     },
     // 鎮h�呰寖鍥村鐞�
     handleChange(value) {
@@ -1582,7 +1661,9 @@
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
+        pointLocations: ["all"],
       };
+      this.pointPrevLocations = ["all"];
       this.handleQuery(1);
     },
     handleSelectionChange(rows) {
@@ -1847,15 +1928,22 @@
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     handleExport() {
+      // 瀵煎嚭闇�瑕佸叏閲忔暟鎹紝涓存椂鍘绘帀鍒嗛〉锛涘鍑哄悗蹇呴』杩樺師锛屽惁鍒欏垎椤典細绠楁垚 Infinity锛堥〉鐮佹樉绀� infinity锛�
+      const originalPageNum = this.topqueryParams.pageNum;
+      const originalPageSize = this.topqueryParams.pageSize;
       this.topqueryParams.pageNum = null;
       this.topqueryParams.pageSize = null;
       this.download(
         "smartor/serviceSubtask/patItemExport",
         {
-          ...this.topqueryParams,
+          ...this.buildQueryParams(),
         },
         `user_${new Date().getTime()}.xlsx`
-      );
+      ).finally(() => {
+        this.topqueryParams.pageNum = originalPageNum;
+        this.topqueryParams.pageSize = originalPageSize;
+        this.getList();
+      });
     },
     // 寮傚父鍒楁覆鏌�
     tableRowClassName({ row, rowIndex }) {
@@ -1883,8 +1971,8 @@
 <style lang="scss" scoped>
 .el-button--primary.is-plain {
   color: #ffffff;
-  background: #409eff;
-  border-color: #4fabe9;
+  background: #5b7cfa;
+  border-color: #5b7cfa;
 }
 
 .document {
@@ -2077,4 +2165,75 @@
   flex-shrink: 0;
   margin-top: 2px;
 }
+/* ================= 娓呮柊楂樼骇绠�绾﹂ ================= */
+.app-container {
+  background: #f5f7fb;
+  border-radius: 14px;
+  padding: 20px;
+}
+
+/* 鏌ヨ琛ㄥ崟锛氱櫧鑹插渾瑙掑崱鐗� */
+::v-deep .el-form--inline {
+  background: #ffffff;
+  border-radius: 14px;
+  padding: 22px 22px 8px;
+  margin-bottom: 18px;
+  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+
+/* 闅愯棌鍒嗗壊绾� */
+::v-deep .el-divider {
+  display: none;
+}
+
+/* 宸ュ叿鏍忓簳閮ㄩ棿璺� */
+.mb8 {
+  margin-bottom: 18px;
+}
+
+/* 鎸夐挳锛氬渾瑙� + 鏌斿拰杩囨浮 */
+::v-deep .el-button {
+  border-radius: 8px;
+  font-weight: 500;
+  transition: all 0.25s ease;
+}
+
+/* 涓绘寜閽細娓呮柊闈涜摑 */
+::v-deep .el-button--primary:not(.is-plain) {
+  background: #5b7cfa;
+  border-color: #5b7cfa;
+}
+::v-deep .el-button--primary:not(.is-plain):hover,
+::v-deep .el-button--primary:not(.is-plain):focus {
+  background: #7593fb;
+  border-color: #7593fb;
+}
+
+/* 琛ㄦ牸锛氱櫧鑹插渾瑙掑崱鐗� + 鏌斿拰琛ㄥご */
+::v-deep .el-table {
+  border-radius: 14px;
+  overflow: hidden;
+  box-shadow: 0 2px 12px rgba(31, 45, 61, 0.05);
+}
+::v-deep .el-table::before {
+  display: none;
+}
+::v-deep .el-table th {
+  background: #f7f9fd !important;
+  color: #3f4d63;
+  font-weight: 600;
+}
+::v-deep .el-table td {
+  padding: 12px 0;
+}
+
+/* 鏍囩鍦嗚 */
+::v-deep .el-tag {
+  border-radius: 6px;
+}
+
+/* 鍒嗛〉闂磋窛 */
+::v-deep .pagination-container {
+  padding-top: 18px;
+}
 </style>

--
Gitblit v1.9.3