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/followvisit/record/detailpage/index.vue |   63 +++++++++++++++++++++++++++++--
 1 files changed, 58 insertions(+), 5 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 4f97c69..43446b9 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -337,6 +337,7 @@
               (orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌' ||
                 orgname == '涓芥按甯傜浜屼汉姘戝尰闄�' ||
                 orgname == '缂欎簯鍘夸汉姘戝尰闄�'||
+                orgname == '涓芥按甯傚骞间繚鍋ラ櫌'||
                 orgname == '鏉鹃槼鍘夸腑鍖诲尰闄�') &&
               !Voicetype
             "
@@ -389,7 +390,7 @@
                     </span>
                   </div>
 
-                  <div class="preview-left" v-if="!Voicetype">
+                  <div class="preview-left" v-if="showQuestionnaireForm">
                     <div
                       class="topic-dev"
                       v-for="(item, index) in tableDatatop"
@@ -600,12 +601,12 @@
                     </div>
                   </div>
                   <el-button
-                    v-if="Voicetype"
+                    v-if="showQuestionnaireForm"
                     type="primary"
-                    @click="yuyingetdetail"
+                    @click="getdetail"
                     >淇濆瓨闂嵎璇︽儏</el-button
                   >
-                  <el-button v-else type="primary" @click="getdetail"
+                  <el-button v-else type="primary" @click="yuyingetdetail"
                     >淇濆瓨闂嵎璇︽儏</el-button
                   >
                 </div>
@@ -705,6 +706,15 @@
                   v-if="(form.isVisitAgain == 1) & (visitAgain == 2)"
                 >
                   鍐嶆闅忚
+                </el-button>
+                <!-- 瓒呮椂鏈嶅姟锛氱鐞嗗憳鍙皢瀹屾垚鏃堕棿鏀逛负搴旈殢璁挎椂闂淬�佺姸鎬佹敼涓哄凡瀹屾垚 -->
+                <el-button
+                  type="danger"
+                  plain
+                  @click="handleTimeoutComplete"
+                  v-if="form.sendstate == 7 && isAdmin"
+                >
+                  瓒呮椂鏍囪宸插畬鎴�
                 </el-button>
               </div>
 
@@ -1658,6 +1668,15 @@
       };
       return typeMap[this.callStatus];
     },
+    // 鏄惁浠ラ棶鍗峰舰寮忓睍绀猴紙闈炶闊虫湇鍔★紝鎴栬闊虫湇鍔′絾鏃犲畬鏁磋闊虫暟鎹渶鎵嬪姩濉姤锛�
+    showQuestionnaireForm() {
+      return !this.Voicetype ;
+    },
+    // 鏄惁涓虹鐞嗗憳瑙掕壊
+    isAdmin() {
+      const roles = this.$store.getters.roles || [];
+      return roles.includes("admin") || roles.includes("sysadmin");
+    },
   },
   created() {
     this.taskid = this.$route.query.taskid;
@@ -1992,7 +2011,7 @@
         if (res.code == 200) {
           this.voiceDatatop = res.data.serviceSubtaskDetails;
           this.voice = res.data.voice;
-          this.activeName = "yy";
+          this.activeName = this.voice ? "yy" : "wj";
           this.taskname = res.data.taskName;
           // 闂嵎灞曠ず鏁版嵁澶勭悊
           this.tableDatatop = res.data.filteredDetails;
@@ -2027,9 +2046,13 @@
                 .map((obj) => obj.targetvalue)
                 .join("&");
             }
+            console.log(item.targetvalue,'item.targetvalue');
+
             if (item.targetvalue) {
               item.scriptResult = item.targetvalue.split("&");
             }
+            console.log(item.scriptResult);
+
           });
         }
       });
@@ -2576,6 +2599,36 @@
         }
       });
     },
+    // 瓒呮椂鏈嶅姟锛氱鐞嗗憳灏嗗畬鎴愭椂闂存敼涓哄簲闅忚鏃堕棿銆佺姸鎬佹敼涓哄凡瀹屾垚
+    handleTimeoutComplete() {
+      this.$modal
+        .confirm(
+          "鏄惁灏嗚瓒呮椂鏈嶅姟鐨勯殢璁垮畬鎴愭椂闂磋皟鏁翠负搴旈殢璁挎椂闂达紝骞跺皢闅忚鐘舵�佹敼涓哄凡瀹屾垚锛�"
+        )
+        .then(() => {
+          getTaskservelist({
+            patid: this.patid,
+            subId: this.id,
+          }).then((res) => {
+            if (res.code == 200) {
+              const objson = res.rows[0].serviceSubtaskList.find(
+                (item) => item.id == this.id
+              );
+              if (objson) {
+                objson.finishtime = objson.visitTime;
+                objson.sendstate = 6;
+                Editsingletaskson(objson).then((res) => {
+                  if (res.code) {
+                    this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+                    this.getTaskservelist();
+                  }
+                });
+              }
+            }
+          });
+        })
+        .catch(() => {});
+    },
     alterpatient(sendstate) {
       this.Editsingletasksonyic(this.serviceStates);
       // alterpatient(this.userform).then((res) => {

--
Gitblit v1.9.3