From e06cd3953ba8a6e0eee11c235bce9ced419a2800 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期三, 03 六月 2026 14:05:08 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/record/index.vue |  340 ++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 231 insertions(+), 109 deletions(-)

diff --git a/src/views/followvisit/record/index.vue b/src/views/followvisit/record/index.vue
index bdf3aca..7e7d92e 100644
--- a/src/views/followvisit/record/index.vue
+++ b/src/views/followvisit/record/index.vue
@@ -107,9 +107,28 @@
             @change="handleChange"
           ></el-cascader>
         </el-form-item>
-
-        <el-form-item label="浠诲姟鐘舵��" prop="status">
-          <el-select v-model="topqueryParams.sendstate" placeholder="璇烽�夋嫨">
+        <el-form-item label="鏃ユ湡闄愬埗" prop="status">
+          <el-select v-model="endOut" placeholder="璇烽�夋嫨">
+            <el-option
+              v-for="item in endOuts"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </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="status">
+          <el-select
+            v-model="topqueryParams.sendstateView"
+            placeholder="璇烽�夋嫨"
+          >
             <el-option
               v-for="item in topicoptions"
               :key="item.value"
@@ -120,16 +139,16 @@
           </el-select>
         </el-form-item>
         <el-form-item label="鎺掑簭鏂瑰紡" prop="status">
-     <el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
-      <el-option
-       v-for="item in topicoptionssort"
-       :key="item.value"
-       :label="item.label"
-       :value="item.value"
-      >
-      </el-option>
-     </el-select>
-    </el-form-item>
+          <el-select v-model="topqueryParams.sort" placeholder="璇烽�夋嫨">
+            <el-option
+              v-for="item in topicoptionssort"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
 
         <el-form-item>
           <el-button
@@ -149,7 +168,6 @@
         <el-col :span="1.5">
           <el-button
             type="primary"
-            plain
             icon="el-icon-plus"
             size="medium"
             @click="handleAdd"
@@ -165,7 +183,6 @@
                 icon="el-icon-upload2"
                 size="medium"
                 @click="handleExport"
-                v-hasPermi="['system:user:export']"
                 >瀵煎嚭</el-button
               >
             </div>
@@ -212,11 +229,19 @@
             </div>
           </div>
         </el-col>
+        <el-col :span="1.5">
+          <div class="documentf">
+            <div class="document">
+              <el-button type="success" size="medium" @click="onthatday()"
+                >浠婃棩鏈嶅姟</el-button
+              >
+            </div>
+          </div>
+        </el-col>
       </el-row>
       <el-table
         v-loading="loading"
         :data="userList"
-        height="806"
         :row-class-name="tableRowClassName"
         @selection-change="handleSelectionChange"
       >
@@ -242,7 +267,12 @@
               size="medium"
               type="text"
               @click="
-                gettoken360(scope.row.sfzh)
+                gettoken360(
+                  scope.row.sfzh,
+                  scope.row.drcode,
+                  scope.row.drname,
+                  scope.row.patid
+                )
               "
               ><span class="button-textsc">{{
                 scope.row.sendname
@@ -251,10 +281,10 @@
           </template>
         </el-table-column>
         <el-table-column
-          label="浠诲姟鐘舵��"
+          label="闅忚鐘舵��"
           align="center"
-          key="sendstate"
-          prop="sendstate"
+          key="sendstateView"
+          prop="sendstateView"
           width="120"
         >
           <template slot-scope="scope">
@@ -264,32 +294,29 @@
               :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">
+              <div v-if="scope.row.sendstateView == 1">
                 <el-tag type="primary" :disable-transitions="false"
                   >寰呴殢璁�</el-tag
                 >
               </div>
-              <div v-if="scope.row.sendstate == 3">
+              <div v-if="scope.row.sendstateView == 2">
+                <el-tag type="primary" :disable-transitions="false"
+                  >闅忚涓�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstateView == 3">
+                <el-tag type="warning" :disable-transitions="false"
+                  >鏈畬鎴�</el-tag
+                >
+              </div>
+              <div v-if="scope.row.sendstateView == 4">
                 <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>
+              <div v-if="scope.row.sendstateView == 5">
+                <el-tag type="danger" :disable-transitions="false"
+                  >鏃犻渶闅忚</el-tag
                 >
               </div>
             </el-tooltip>
@@ -350,11 +377,11 @@
           label="搴旈殢璁挎棩鏈�"
           width="200"
           align="center"
-          key="longSendTime"
-          prop="longSendTime"
+          key="visitTime"
+          prop="visitTime"
         >
           <template slot-scope="scope">
-            <span>{{ formatTime(scope.row.longSendTime) }}</span>
+            <span>{{ formatTime(scope.row.visitTime) }}</span>
           </template></el-table-column
         >
         <el-table-column
@@ -396,7 +423,15 @@
           key="drname"
           prop="drname"
         />
-
+        <el-table-column
+          label="璇婃柇鍚嶇О"
+          align="center"
+          key="leavediagname"
+          prop="leavediagname"
+          width="120"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
         <!-- <el-table-column
           label="鐥呭巻鍙�"
           align="center"
@@ -509,7 +544,7 @@
                 ></el-button
               >
             </el-tooltip> -->
-            <el-tooltip
+            <!-- <el-tooltip
               v-if="scope.row.sendstate == 1 || scope.row.sendstate == 2"
               class="item"
               effect="dark"
@@ -525,7 +560,7 @@
                   ><i class="el-icon-remove-outline"></i>鏆傚仠鏈嶅姟</span
                 ></el-button
               >
-            </el-tooltip>
+            </el-tooltip> -->
             <el-button size="medium" type="text" @click="Seedetails(scope.row)"
               ><span class="button-zx"
                 ><i class="el-icon-s-order"></i>鏌ョ湅璇︽儏</span
@@ -729,7 +764,12 @@
   resetUserPwd,
   changeUserStatus,
 } from "@/api/system/user";
-import { getTaskservelist, buidegetTasklist,query360PatInfo } from "@/api/AiCentre/index";
+import {
+  getTaskservelist,
+  buidegetTasklist,
+  query360PatInfo,
+  query360PatInfonh,
+} from "@/api/AiCentre/index";
 import Treeselect from "@riophae/vue-treeselect";
 import store from "@/store";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -788,7 +828,7 @@
         },
         YeWuXX: {
           BingRenXX: {
-            ZhengJianHM: '',
+            ZhengJianHM: "",
             ZhengJianLXDM: "01",
             ZhengJianLXMC: "灞呮皯韬唤璇�",
             ZuZhiJGID: localStorage.getItem("orgid"),
@@ -797,8 +837,8 @@
           YongHuXX: {
             XiTongID: "SUIFANGXT",
             XiTongMC: "闅忚绯荤粺",
-            YongHuID: "1400466972205912064",
-            YongHuXM: "JNRMYY",
+            YongHuID: localStorage.getItem("YongHuID"),
+            YongHuXM: localStorage.getItem("YongHuXM"),
             ZuZhiJGID: localStorage.getItem("orgid"),
             ZuZhiJGMC: localStorage.getItem("orgname"),
             idp: "lyra",
@@ -824,7 +864,17 @@
       },
       value: [],
       list: [],
-
+      endOut: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 0 : 1, //0 鍑洪櫌鏃堕棿(姝e簭)    1 鍑洪櫌鏃堕棿(鍊掑簭)   2 鍙戦�佹椂闂�(姝e簭)    3 鍙戦�佹椂闂�(鍊掑簭)  7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
+      endOuts: [
+        {
+          value: 0,
+          label: "鎴鑷冲綋鏃ユ湇鍔�",
+        },
+        {
+          value: 1,
+          label: "鍏ㄩ儴鏈嶅姟",
+        },
+      ],
       sourcetype: [
         {
           value: 1,
@@ -852,7 +902,7 @@
         //   value: 0,
         // },
         {
-          name: "搴旈殢璁�",
+          name: "闇�闅忚",
           value: 0,
         },
 
@@ -868,10 +918,10 @@
           name: "寰呴殢璁�",
           value: 0,
         },
-        {
-          name: "宸插彂閫�",
-          value: 0,
-        },
+        // {
+        //   name: "宸插彂閫�",
+        //   value: 0,
+        // },
 
         // {
         //   name: "琛ㄥ崟宸插彂閫�",
@@ -894,8 +944,8 @@
         pageSize: 10,
         serviceType: 13,
         searchscope: 3,
-        sendstate:2,
-        sort:2,
+        sendstate: 2,
+        sort: localStorage.getItem("orgname") == "涓芥按甯備腑鍖婚櫌" ? 8 : 2, //0 鍑洪櫌鏃堕棿(姝e簭)    1 鍑洪櫌鏃堕棿(鍊掑簭)   2 鍙戦�佹椂闂�(姝e簭)    3 鍙戦�佹椂闂�(鍊掑簭)  7搴旈殢璁挎棩鏈�(鍊掑簭) 搴旈殢璁挎棩鏈�(姝e簭)
         scopetype: [],
         leaveldeptcodes: [],
         leavehospitaldistrictcodes: [],
@@ -905,28 +955,28 @@
 
       topicoptions: [
         {
-          value: 1,
-          label: "琛ㄥ崟宸查鍙�",
+          value: null,
+          label: "鍏ㄩ儴",
         },
         {
-          value: 2,
+          value: 1,
           label: "寰呴殢璁�",
         },
         {
+          value: 2,
+          label: "闅忚涓�",
+        },
+        {
           value: 3,
-          label: "琛ㄥ崟宸插彂閫�",
+          label: "鏈畬鎴�",
         },
         {
           value: 4,
-          label: "涓嶆墽琛�",
+          label: "宸插畬鎴�",
         },
         {
           value: 5,
-          label: "鍙戦�佸け璐�",
-        },
-        {
-          value: 6,
-          label: "宸插畬鎴�",
+          label: "鏃犻渶闅忚",
         },
       ],
       topicoptionsyj: [
@@ -939,24 +989,32 @@
           label: "姝e父",
         },
       ],
-      topicoptionssort:[
-    {
-     value: 0,
-     label: "鍑洪櫌鏃堕棿(姝e簭)",
-    },
-    {
-     value: 1,
-     label: "鍑洪櫌鏃堕棿(鍊掑簭)",
-    },
-    {
-     value: 2,
-     label: "鍙戦�佹椂闂�(姝e簭)",
-    },
-    {
-     value: 3,
-     label: "鍙戦�佹椂闂�(鍊掑簭)",
-    },
-   ],
+      topicoptionssort: [
+        {
+          value: 0,
+          label: "鍑洪櫌鏃堕棿(姝e簭)",
+        },
+        {
+          value: 1,
+          label: "鍑洪櫌鏃堕棿(鍊掑簭)",
+        },
+        {
+          value: 2,
+          label: "鍙戦�佹椂闂�(姝e簭)",
+        },
+        {
+          value: 3,
+          label: "鍙戦�佹椂闂�(鍊掑簭)",
+        },
+        {
+          value: 7,
+          label: "搴旈殢璁挎棩鏈�(姝e簭)",
+        },
+        {
+          value: 8,
+          label: "搴旈殢璁挎棩鏈�(鍊掑簭)",
+        },
+      ],
       errtype: "",
       leavehospitaldistrictcode: "",
       serviceState: [],
@@ -1007,6 +1065,13 @@
         this.topqueryParams.leavehospitaldistrictcodes =
           store.getters.belongWards.map((obj) => obj.districtCode);
       }
+      if (this.endOut == 0) {
+        this.topqueryParams.endSendDateTime = this.formatDateToYYYYMMDDHHMMSS(
+          this.getEndOfDay()
+        );
+      } else {
+        this.topqueryParams.endSendDateTime = null;
+      }
       // 鎺ュ彈寮傚父璺宠浆
       if (this.errtype) {
         this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1015,10 +1080,18 @@
         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;
+      }
+
+      if (!this.followupAuthority()) {
+        this.$message.warning("鏈厤缃瀹�/鐥呭尯鐩稿叧鏉冮檺涓嶅彲鏌ヨ");
+        return Promise.reject(new Error("鏃犳潈闄愭煡璇�"));
       }
       getTaskservelist(this.topqueryParams).then((response) => {
         this.userList = response.rows[0].serviceSubtaskList;
@@ -1030,8 +1103,8 @@
           this.cardlist[1].value = response.rows[0].ysf;
           this.ycvalue = response.rows[0].yc;
           this.cardlist[2].value = response.rows[0].fssb;
-          this.cardlist[3].value = response.rows[0].dfs;
-          this.cardlist[4].value = response.rows[0].yfs2;
+          this.cardlist[3].value = response.rows[0].dsf;
+          // this.cardlist[4].value = response.rows[0].yfs2;
           this.yfsvalue = response.rows[0].yfs;
         }
         this.loading = false;
@@ -1060,18 +1133,53 @@
         this.total = response.total;
       });
     },
-     //鎮h��360璺宠浆
-     gettoken360(sfzh) {
-      this.postData.YeWuXX.BingRenXX.ZhengJianHM=sfzh
+
+    //鎮h��360璺宠浆
+    gettoken360(sfzh, drcode, drname, id) {
+      const orgname = localStorage.getItem("orgname");
+      if (orgname == "鍗楀崕澶у闄勫睘绗竴鍖婚櫌") {
+        query360PatInfonh(id).then((res) => {
+          if (res.data) {
+            window.open(res.data, "_blank");
+          } else {
+            this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
+          }
+        });
+        return;
+      } else if (
+        orgname == "绗竴浜烘皯鍖婚櫌婀栨花闄㈠尯" ||
+        orgname == "绗竴浜烘皯鍖婚櫌鍚村北闄㈠尯"
+      ) {
+        let url = `http://192.200.81.189:9100/blj/view?BINGRENID=${id}&YONGHUID=DBA`;
+        window.open(url, "_blank");
+        return;
+      }
+
+      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
+
       query360PatInfo(this.postData).then((res) => {
         if (res.data.url) {
-           window.open(res.data.url, '_blank');
+          window.open(res.data.url, "_blank");
           // this.linkUrl = res.data.url;
-        }else{
+        } else {
           this.$modal.msgWarning("360鏌ヨ鏃犵粨鏋�");
         }
       });
+    },
+    getEndOfDay() {
+      const date = new Date(); // 鍒涘缓涓�涓〃绀哄綋鍓嶆椂闂寸殑Date瀵硅薄
+      date.setHours(23, 59, 59, 0); // 灏嗘椂闂磋缃负23:59:59.000
+      return date;
+    },
+    formatDateToYYYYMMDDHHMMSS(date) {
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, "0"); // 鏈堜唤琛ラ浂
+      const day = String(date.getDate()).padStart(2, "0"); // 鏃ユ湡琛ラ浂
+      const hours = String(date.getHours()).padStart(2, "0");
+      const minutes = String(date.getMinutes()).padStart(2, "0");
+      const seconds = String(date.getSeconds()).padStart(2, "0");
 
+      return `${year}-${month}-${day}`;
     },
     buidegetTasklist(type) {
       if (this.topqueryParams.searchscope == 3) {
@@ -1105,8 +1213,8 @@
           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.cardlist[4].value = response.rows[0].dsf;
+          // this.cardlist[5].value = response.rows[0].yfs2;
           this.yfsvalue = response.rows[0].yfs;
         }
         this.loading = false;
@@ -1232,9 +1340,12 @@
         pageNum: 1,
         pageSize: 10,
         serviceType: 13,
-        sort:2,
+        sort: 2,
         searchscope: 2,
-        sendstate:2,
+        sendstate: 2,
+        scopetype: [],
+        leaveldeptcodes: [],
+        leavehospitaldistrictcodes: [],
       };
       this.handleQuery(1);
     },
@@ -1254,6 +1365,15 @@
       this.$nextTick((_) => {
         this.$refs.saveTagInput.$refs.input.focus();
       });
+    },
+    onthatday() {
+      this.topqueryParams.startSendDateTime = this.getCurrentDate();
+      this.topqueryParams.endSendDateTime = this.getCurrentDate();
+      this.getList(1);
+    },
+    getCurrentDate() {
+      const now = new Date();
+      return now.toISOString().slice(0, 10); // 鎴彇鍓�10涓瓧绗︼紝鍗� YYYY-MM-DD
     },
     //鑾峰彇澶卞幓鐒︾偣瑙﹀彂
     handleInputConfirm() {
@@ -1373,11 +1493,8 @@
     Seedetails(row) {
       let type = "";
       console.log(row, "rwo");
-      if (row.preachformson) {
-        if (row.preachformson.includes("3")) {
-          type = 1;
-          console.log(type, "rwo");
-        }
+      if (row.type == 1) {
+        type = 1;
       }
       this.$router.push({
         path: "/followvisit/record/detailpage/",
@@ -1386,6 +1503,8 @@
           patid: row.patid,
           id: row.id,
           Voicetype: type,
+          visitCount: 1,
+          again: 1,
         },
       });
     },
@@ -1439,7 +1558,8 @@
       this.topqueryParams.pageNum = null;
       this.topqueryParams.pageSize = null;
       this.download(
-        "smartor/serviceSubtask/export",
+        // "smartor/serviceSubtask/export",
+        "smartor/serviceSubtask/patItemExport",
         {
           ...this.topqueryParams,
         },
@@ -1550,10 +1670,12 @@
   }
 }
 ::v-deep.leftvlue .el-card__body {
-  background: #d0e9fd;
+  background: #f2f8ff;
+  color: #324a9b;
 }
 ::v-deep.leftvlue .el-card__body:hover {
-  background: #8dc8f8;
+  background: #3664d9;
+  color: #fff;
   cursor: pointer; /* 榧犳爣鎮诞鏃跺彉涓烘墜褰� */
 }
 ::v-deep.errleftvlue .el-card__body {

--
Gitblit v1.9.3