From c97bd0d3b646611474faf6017aebbe34180a0e92 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期一, 30 六月 2025 11:23:33 +0800
Subject: [PATCH] 测试完成

---
 src/views/patient/physical/index.vue |  217 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 159 insertions(+), 58 deletions(-)

diff --git a/src/views/patient/physical/index.vue b/src/views/patient/physical/index.vue
index eed2493..3381d58 100644
--- a/src/views/patient/physical/index.vue
+++ b/src/views/patient/physical/index.vue
@@ -154,7 +154,6 @@
                 icon="el-icon-upload2"
                 size="medium"
                 @click="handleExport"
-                v-hasPermi="['system:user:export']"
                 >瀵煎嚭</el-button
               >
             </div>
@@ -184,6 +183,19 @@
                 size="medium"
                 @click="toleadExport(2)"
                 >缁撴灉寮傚父</el-button
+              >
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="1.5">
+          <div class="documentf">
+            <div class="document">
+              <el-button
+                type="success"
+                plain
+                size="medium"
+                @click="buidegetTasklist()"
+                >寰呭姙鏈嶅姟</el-button
               >
             </div>
           </div>
@@ -263,6 +275,41 @@
             <div v-if="scope.row.sendstate == 6">
               <el-tag type="danger" :disable-transitions="false">宸插畬鎴�</el-tag>
             </div>
+            <el-tooltip
+              class="item"
+              effect="dark"
+              :content="scope.row.remark"
+              placement="top-start"
+            >
+              <div v-if="scope.row.sendstate == 1">
+                <el-tag type="primary" :disable-transitions="false"
+                  >琛ㄥ崟宸查鍙�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstate == 2">
+                <el-tag type="primary" :disable-transitions="false"
+                  >寰呮墽琛�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstate == 3">
+                <el-tag type="success" :disable-transitions="false"
+                  >琛ㄥ崟宸插彂閫�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstate == 4">
+                <el-tag type="info" :disable-transitions="false">涓嶆墽琛�</el-tag>
+              </div>
+              <div v-if="scope.row.sendstate == 5">
+                <el-tag type="danger" :disable-transitions="false"
+                  >鍙戦�佸け璐�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstate == 6">
+                <el-tag type="danger" :disable-transitions="false"
+                  >宸插畬鎴�</el-tag
+                >
+              </div>
+            </el-tooltip>
           </template>
         </el-table-column>
         <!-- <el-table-column
@@ -305,33 +352,6 @@
             <span>{{ parseTime(scope.row.finishtime) }}</span>
           </template>
         </el-table-column>
-        <el-table-column
-          label="闅忚缁撴灉"
-          width="200"
-          align="center"
-          key="remark"
-          prop="remark"
-        >
-          <template slot-scope="scope" v-if="scope.row.remark">
-            <el-tag
-              type="warning"
-              v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
-              >{{ scope.row.remark }}</el-tag
-            >
-            <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="妫�鏌ユ棩鏈�"
-          width="200"
-          align="center"
-          key="endtime"
-          prop="endtime"
-        >
-          <template slot-scope="scope">
-            <span>{{ formatTime(scope.row.endtime) }}</span>
-          </template></el-table-column
-        >
         <el-table-column
           label="搴旈殢璁挎棩鏈�"
           width="200"
@@ -652,7 +672,7 @@
   resetUserPwd,
   changeUserStatus,
 } from "@/api/system/user";
-import { getTaskservelist } from "@/api/AiCentre/index";
+import { getTaskservelist, buidegetTasklist } from "@/api/AiCentre/index";
 import Treeselect from "@riophae/vue-treeselect";
 import store from "@/store";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -780,12 +800,10 @@
       topqueryParams: {
         pageNum: 1,
         pageSize: 10,
-        serviceType: 1,
-        searchscope: 3,
+        serviceType: 12,
         sendstate:2,
         scopetype: [],
-        leaveldeptcodes: [],
-        leavehospitaldistrictcodes: [],
+
       },
       propss: { multiple: true },
       options: [],
@@ -869,6 +887,48 @@
     /** 鏌ヨ褰卞儚闅忚鏈嶅姟鍒楄〃 */
     getList(refresh) {
       // 榛樿鍏ㄩ儴
+
+      // 鎺ュ彈寮傚父璺宠浆
+
+      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;
+          this.yfsvalue = response.rows[0].yfs;
+        }
+        this.loading = false;
+        this.userList.forEach((item) => {
+          let idArray = null;
+
+
+          if (item.preachform) {
+
+              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.total = response.total;
+      });
+    },
+    buidegetTasklist(type) {
       if (this.topqueryParams.searchscope == 3) {
         this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
           (obj) => obj.deptCode
@@ -890,7 +950,66 @@
         this.topqueryParams.deptOrDistrict=1;
       }
 
+
       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;
+          this.yfsvalue = response.rows[0].yfs;
+        }
+        this.loading = false;
+        this.userList.forEach((item) => {
+          let idArray = null;
+
+
+          if (item.preachform) {
+
+              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.total = response.total;
+      });
+    },
+    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);
+      }
+      // 鎺ュ彈寮傚父璺宠浆
+      if (this.errtype) {
+        this.topqueryParams.leavehospitaldistrictcodes.push(
+          this.leavehospitaldistrictcode
+        );
+      }
+      let obj = {
+        pageNum: 1,
+        pageSize: 10,
+        leavehospitaldistrictcodes: this.topqueryParams.leavehospitaldistrictcodes,
+        sendstates: [2, 3],
+        leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
+      };
+      buidegetTasklist(obj).then((response) => {
         this.userList = response.rows[0].serviceSubtaskList;
         this.total = response.total;
         if (refresh) {
@@ -900,7 +1019,7 @@
           // 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[4].value = response.rows[0].dsf;
           // this.cardlist[5].value = response.rows[0].yfs2;
           this.yfsvalue = response.rows[0].yfs;
         }
@@ -988,13 +1107,7 @@
     },
     /** 鎼滅储鎸夐挳鎿嶄綔 */
     handleQuery(refresh) {
-      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);
-      }
+
       this.topqueryParams.pageNum = 1;
       this.topqueryParams.startOutHospTime = this.dateRange[0];
       this.topqueryParams.endOutHospTime = this.dateRange[1];
@@ -1005,20 +1118,9 @@
     handleChange(value) {
       let type = value[0];
       let code = value.slice(-1)[0];
-      this.topqueryParams.leavehospitaldistrictcodes = [];
-      this.topqueryParams.leaveldeptcodes = [];
 
-      if (type == 1) {
-        this.topqueryParams.leaveldeptcodes.push(code);
-        this.topqueryParams.leavehospitaldistrictcodes = [];
-        this.topqueryParams.searchscope = 1;
-      } else if (type == 2) {
-        this.topqueryParams.leavehospitaldistrictcodes.push(code);
-        this.topqueryParams.leaveldeptcodes = [];
-        this.topqueryParams.searchscope = 2;
-      } else {
-        this.topqueryParams.searchscope = 3;
-      }
+
+
     },
     /** 閲嶇疆鎸夐挳鎿嶄綔 */
     resetQuery() {
@@ -1027,8 +1129,7 @@
         pageNum: 1,
         pageSize: 10,
         serviceType: 1,
-        searchscope: 2,
-        sendstate:2,
+        searchscope: 3,
       };
       this.handleQuery(1);
     },
@@ -1064,7 +1165,7 @@
         path: "/followvisit/QuestionnaireTask",
         query: {
           type: 2,
-          serviceType: 1,
+          serviceType: 12,
         },
       });
     },
@@ -1198,7 +1299,7 @@
       this.topqueryParams.pageNum = null;
       this.topqueryParams.pageSize = null;
       this.download(
-        "smartor/serviceSubtask/export",
+        "smartor/serviceSubtask/patItemExport",
         {
           ...this.topqueryParams,
         },

--
Gitblit v1.9.3