From 5df476ae693d7577c7a0031ae12c67558b9832a7 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期六, 12 九月 2026 10:48:10 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/ycquestionnaire/index.vue |  262 +++++++++++++++++++++++++++++-----------------------
 1 files changed, 145 insertions(+), 117 deletions(-)

diff --git a/src/views/patient/ycquestionnaire/index.vue b/src/views/patient/ycquestionnaire/index.vue
index 7964707..d7744b9 100644
--- a/src/views/patient/ycquestionnaire/index.vue
+++ b/src/views/patient/ycquestionnaire/index.vue
@@ -1,67 +1,10 @@
 <template>
   <div class="app-container">
-    <div class="leftvlue" style="margin-bottom: 20px">
-      <el-row :gutter="10">
-        <el-col :span="2.5" v-for="(item, index) in cardlist" :key="index">
-          <el-card
-            shadow="hover"
-            :body-style="item.router ? ' cursor: pointer' : 'cursor: default'"
-          >
-            <div style="padding: 8px" @click="$router.push(item.router)">
-              <span>{{ item.name }}</span>
-              <div
-                style="
-                  text-align: center;
-                  font-size: 18px;
-                  margin-top: 10px;
-                  font-weight: 600;
-                "
-              >
-              {{ item.value ? item.value : 0 }}
-              </div>
-            </div>
-          </el-card>
-        </el-col>
-        <el-col :span="2.5">
-          <div class="ysfleftvlue">
-            <el-card shadow="hover">
-              <div style="padding: 8px">
-                <span>琛ㄥ崟宸插彂閫�</span>
-                <div
-                  style="
-                    text-align: center;
-                    font-size: 18px;
-                    margin-top: 10px;
-                    font-weight: 600;
-                  "
-                >
-                  {{ yfsvalue }}
-                </div>
-              </div>
-            </el-card>
-          </div>
-        </el-col>
-        <el-col :span="2.5">
-          <div class="errleftvlue">
-            <el-card shadow="hover">
-              <div style="padding: 8px">
-                <span>寮傚父</span>
-                <div
-                  style="
-                    text-align: center;
-                    font-size: 18px;
-                    margin-top: 10px;
-                    font-weight: 600;
-                  "
-                >
-                  {{ ycvalue }}
-                </div>
-              </div>
-            </el-card>
-          </div>
-        </el-col>
-      </el-row>
-    </div>
+    <statistics-cards
+      :cardlist="cardlist"
+      :show-extra="false"
+      :show-warning-condition="false"
+    />
     <el-row :gutter="20">
       <!--鐢ㄦ埛鏁版嵁-->
       <el-form
@@ -108,16 +51,15 @@
           ></el-cascader>
         </el-form-item>
 
-        <el-form-item label="浠诲姟鐘舵��" prop="status">
-          <el-select v-model="topqueryParams.sendstate" placeholder="璇烽�夋嫨">
-            <el-option
-              v-for="item in topicoptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
+        <el-form-item label="闅忚鐘舵��" prop="status">
+          <el-cascader
+            v-model="serviceStatusValue"
+            placeholder="璇烽�夋嫨"
+            :options="serviceStatusOptions"
+            :props="cascaderProps"
+            @change="handleServiceStatusChange"
+            clearable
+          ></el-cascader>
         </el-form-item>
 
         <el-form-item>
@@ -208,12 +150,43 @@
         <!-- <el-table-column label="搴忓彿" fixed align="center" key="id" prop="id" /> -->
         <el-table-column
           label="濮撳悕"
-          width="100"
           fixed
           align="center"
           key="sendname"
           prop="sendname"
         />
+        <el-table-column
+          label="闅忚鐘舵��"
+          align="center"
+          key="sendstateView"
+          prop="sendstateView"
+          width="120"
+        >
+          <template slot-scope="scope">
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="scope.row.remark"
+              placement="top-start"
+            >
+              <div v-if="scope.row.sendstateView == 1">
+                <el-tag type="primary" :disable-transitions="false"
+                  >寰呴殢璁�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstateView == 2">
+                <el-tag type="success" :disable-transitions="false"
+                  >宸插畬鎴�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstateView == 3">
+                <el-tag type="warning" :disable-transitions="false"
+                  >鏃犻渶闅忚</el-tag
+                >
+              </div>
+            </el-tooltip>
+          </template>
+        </el-table-column>
         <el-table-column
           label="浠诲姟鐘舵��"
           align="center"
@@ -229,7 +202,7 @@
             </div>
             <div v-if="scope.row.sendstate == 2">
               <el-tag type="primary" :disable-transitions="false"
-                >寰呴殢璁�</el-tag
+                >寰呮墽琛�</el-tag
               >
             </div>
             <div v-if="scope.row.sendstate == 3">
@@ -248,6 +221,9 @@
             <div v-if="scope.row.sendstate == 6">
               <el-tag type="danger" :disable-transitions="false">宸插畬鎴�</el-tag>
             </div>
+            <div v-if="scope.row.sendstate == 7">
+              <el-tag type="danger" :disable-transitions="false">瓒呮椂</el-tag>
+            </div>
           </template>
         </el-table-column>
         <!-- <el-table-column
@@ -259,7 +235,7 @@
         />
 
         <el-table-column
-          label="澶勭悊鎰忚"
+          label="浜哄伐澶勭悊鎰忚"
           align="center"
           key="suggest"
           prop="suggest"
@@ -362,7 +338,7 @@
         /> -->
 
         <!-- <el-table-column label="骞撮緞" align="center" key="age" prop="age" /> -->
-        <!-- <el-table-column label="鎬у埆"width="100" align="center" key="sex" prop="sex" /> -->
+        <!-- <el-table-column label="鎬у埆" align="center" key="sex" prop="sex" /> -->
         <!-- <el-table-column label="搴婂彿" align="center" key="badNo" prop="badNo" /> -->
         <el-table-column
           label="绉戝"
@@ -640,11 +616,12 @@
 import Treeselect from "@riophae/vue-treeselect";
 import store from "@/store";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import StatisticsCards from "@/components/StatisticsCards";
 
 export default {
   name: "Discharge",
   dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"],
-  components: { Treeselect },
+  components: { Treeselect, StatisticsCards },
   data() {
     return {
       // 閬僵灞�
@@ -657,6 +634,7 @@
       multiple: true,
       // 鏄剧ず鎼滅储鏉′欢
       showSearch: true,
+      jgvalue: 0,
       // 鎬绘潯鏁�
       total: 0,
       // 鐢ㄦ埛琛ㄦ牸鏁版嵁
@@ -678,9 +656,10 @@
       ruleForm: {
         type: [],
       },
+      ycvalue: 0,
+      jgvalue: 0,
       dynamicTags: ["閫夐」涓�", "閫夐」浜�", "閫夐」涓�"], //閫夐」
       inputVisible: false,
-      ycvalue: "",
       yfsvalue: "",
       inputValue: "",
       preachform: "",
@@ -696,6 +675,7 @@
       },
       value: [],
       list: [],
+      orgname: "",
 
       sourcetype: [
         {
@@ -716,24 +696,7 @@
       loading: false,
       cardlist: [
         {
-          name: "鍑洪櫌鏈嶅姟鎬婚噺",
-          value: 0,
-        },
-        {
-          name: "鎮h�呰繃婊�",
-          value: 0,
-        },
-        {
-          name: "搴旈殢璁�",
-          value: 0,
-        },
-
-        // {
-        //   name: "寮傚父",
-        //   value: 0,
-        // },
-        {
-          name: "鍙戦�佸け璐�",
+          name: "鎮h�呮湇鍔℃�婚噺",
           value: 0,
         },
         {
@@ -741,14 +704,44 @@
           value: 0,
         },
         {
-          name: "宸插彂閫�",
+          name: "宸插畬鎴�",
           value: 0,
         },
+      ],
 
-        // {
-        //   name: "琛ㄥ崟宸插彂閫�",
-        //   value: 0,
-        // },
+      serviceStatusValue: null,
+      cascaderProps: {
+        expandTrigger: "hover", // 鎮仠灞曞紑
+        checkStrictly: true, // 鉁� 鍏抽敭锛氬厑璁搁�変腑浠绘剰涓�绾�
+        emitPath: false, // 鉁� 鍙繑鍥為�変腑鐨勫�硷紝涓嶈繑鍥炶矾寰勬暟缁�
+      },
+      // 闅忚鐘舵�佺骇鑱旈�夋嫨鍣�
+      serviceStatusOptions: [
+        {
+          value: null,
+          label: "鍏ㄩ儴",
+        },
+        {
+          value: 10, // 涓�绾э細寰呴殢璁�
+          label: "寰呴殢璁�",
+          children: [
+            { value: 1, label: "琚鍙�" },
+            { value: 2, label: "寰呭彂閫�" },
+            { value: 3, label: "宸插彂閫�" },
+            { value: 5, label: "鍙戦�佸け璐�" },
+            { value: 7, label: "瓒呮椂" },
+          ],
+        },
+        {
+          value: 20, // 涓�绾э細宸插畬鎴�
+          label: "宸插畬鎴�",
+          children: [{ value: 6, label: "宸插畬鎴�" }],
+        },
+        {
+          value: 30, // 涓�绾э細鏃犻渶闅忚
+          label: "鏃犻渶闅忚",
+          children: [{ value: 4, label: "涓嶆墽琛�" }],
+        },
       ],
 
       // 琛ㄥ崟鍙傛暟
@@ -764,8 +757,10 @@
       topqueryParams: {
         pageNum: 1,
         pageSize: 10,
-        serviceType: 9,
+        serviceType: 20,
         searchscope: 3,
+        sendstateView: null,
+        sendstate: null,
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
@@ -780,7 +775,7 @@
         },
         {
           value: 2,
-          label: "寰呴殢璁�",
+          label: "寰呮墽琛�",
         },
         {
           value: 3,
@@ -824,6 +819,8 @@
     this.errtype = this.$route.query.errtype;
     this.leavehospitaldistrictcode =
       this.$route.query.leavehospitaldistrictcode;
+    this.orgname = localStorage.getItem("orgname");
+
     this.sourcetype[0].children = store.getters.belongDepts.map((dept) => {
       return {
         label: dept.deptName,
@@ -866,24 +863,23 @@
         );
         console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
       }
-      this.loading = true;
-      if (this.topqueryParams.leavehospitaldistrictcodes[0]&&this.topqueryParams.leaveldeptcodes[0]) {
-        this.topqueryParams.deptOrDistrict=2;
-      }else{
-        this.topqueryParams.deptOrDistrict=1;
+      if (
+        this.topqueryParams.leavehospitaldistrictcodes[0] &&
+        this.topqueryParams.leaveldeptcodes[0]
+      ) {
+        this.topqueryParams.deptOrDistrict = 2;
+      } else {
+        this.topqueryParams.deptOrDistrict = 1;
       }
+      this.loading = true;
       getTaskservelist(this.topqueryParams).then((response) => {
         this.userList = response.rows[0].serviceSubtaskList;
         this.total = response.total;
         if (refresh) {
           this.cardlist[0].value =
-            Number(response.rows[0].wzx) + Number(response.rows[0].ysf);
-          this.cardlist[1].value = response.rows[0].wzx;
-          this.cardlist[2].value = response.rows[0].ysf;
-          this.ycvalue = response.rows[0].yc;
-          this.cardlist[3].value = response.rows[0].fssb;
-          this.cardlist[4].value = response.rows[0].dfs;
-          this.cardlist[5].value = response.rows[0].yfs2;
+            Number(response.rows[0].wxsf) + Number(response.rows[0].xsf) || 0;
+          this.cardlist[1].value = response.rows[0].dsf || 0;
+          this.cardlist[2].value = response.rows[0].ywc || 0;
           this.yfsvalue = response.rows[0].yfs;
         }
         this.loading = false;
@@ -983,6 +979,35 @@
 
       this.getList(refresh);
     },
+    // 闅忚鐘舵�佸彉鏇村鐞�
+    handleServiceStatusChange(value) {
+      // 娓呯┖閫夋嫨
+      if (value === null || value === undefined || value === "") {
+        this.topqueryParams.sendstateView = null;
+        this.topqueryParams.sendstate = null;
+        return;
+      }
+
+      // 涓�绾ц妭鐐圭殑鍊硷紙澶т簬绛変簬10锛�
+      if (value >= 10) {
+        switch (value) {
+          case 10:
+            this.topqueryParams.sendstateView = 1; // 寰呴殢璁�
+            break;
+          case 20:
+            this.topqueryParams.sendstateView = 2; // 宸插畬鎴�
+            break;
+          case 30:
+            this.topqueryParams.sendstateView = 3; // 鏃犻渶闅忚
+            break;
+        }
+        this.topqueryParams.sendstate = null;
+      } else {
+        // 閫変腑浜嗕簩绾э紙鍏蜂綋鐘舵�侊級
+        this.topqueryParams.sendstateView = null;
+        this.topqueryParams.sendstate = value;
+      }
+    },
     // 鎮h�呰寖鍥村鐞�
     handleChange(value) {
       let type = value[0];
@@ -1005,11 +1030,14 @@
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
       this.dateRange = [];
+      this.serviceStatusValue = null;
       this.topqueryParams = {
         pageNum: 1,
         pageSize: 10,
-        serviceType: 9,
+        serviceType: 20,
         searchscope: 2,
+        sendstateView: null,
+        sendstate: null,
       };
       this.handleQuery(1);
     },
@@ -1045,7 +1073,7 @@
         path: "/followvisit/QuestionnaireTask",
         query: {
           type: 2,
-          serviceType: 9,
+          serviceType: 20,
         },
       });
     },

--
Gitblit v1.9.3