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 |  283 +++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 187 insertions(+), 96 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index e776ec9..43446b9 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -336,7 +336,9 @@
             v-if="
               (orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌' ||
                 orgname == '涓芥按甯傜浜屼汉姘戝尰闄�' ||
-                orgname == '缂欎簯鍘夸汉姘戝尰闄�') &&
+                orgname == '缂欎簯鍘夸汉姘戝尰闄�'||
+                orgname == '涓芥按甯傚骞间繚鍋ラ櫌'||
+                orgname == '鏉鹃槼鍘夸腑鍖诲尰闄�') &&
               !Voicetype
             "
           >
@@ -368,7 +370,7 @@
             <div>闅忚鍐呭</div>
           </div>
           <div>
-            <el-tabs v-model="activeName" type="border-card">
+            <el-tabs v-model="activeName" type="card">
               <el-tab-pane name="wj">
                 <span class="mulsz" slot="label"
                   ><i class="el-icon-notebook-1"></i> 闂嵎闅忚缁撴灉</span
@@ -388,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"
@@ -599,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>
@@ -704,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>
 
@@ -984,96 +995,76 @@
             </el-form>
           </div>
 
-          <!-- 鎮h�呮。妗堜俊鎭� -->
-          <div class="detailed">
-            <h3>鎮h�呮。妗堜俊鎭�</h3>
-            <el-form ref="userform" :model="userform" label-width="100px">
-              <el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="鎮h�呭鍚�" prop="name">
-                    <el-input
-                      v-model="userform.name"
-                      placeholder="璇疯緭鍏ュ鍚�"
-                      maxlength="30"
-                    ></el-input>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="鎬у埆" prop="sex">
-                    <el-select v-model="userform.sex" placeholder="璇烽�夋嫨">
-                      <el-option label="鐢�" :value="1"> </el-option>
-                      <el-option label="濂�" :value="2"> </el-option>
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="12">
-                  <el-form-item label="骞撮緞" prop="age">
-                    <el-input
-                      v-model="userform.age"
-                      placeholder="璇疯緭鍏ュ勾榫�"
-                      maxlength="20"
-                    ></el-input>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-
-              <el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="鑱旂郴鏂瑰紡" prop="telcode">
-                    <el-input
-                      v-model="userform.telcode"
-                      placeholder="璇疯緭鍏ヨ仈绯绘柟寮�"
-                      maxlength="20"
-                    />
-                  </el-form-item>
-                </el-col>
-                <el-col :span="12">
-                  <el-form-item label="浜插睘鑱旂郴鏂瑰紡" prop="relativetelcode">
-                    <el-input
-                      v-model="userform.relativetelcode"
-                      placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�"
-                      maxlength="20"
-                    ></el-input>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row :gutter="20">
-                <el-col :span="24">
-                  <el-form-item label="璇婃柇鍚嶇О" prop="leavediagname">
-                    <el-input
-                      v-model="form.leavediagname"
-                      placeholder="璇疯緭鍏ヨ瘖鏂�"
-                      maxlength="50"
-                    ></el-input>
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row :gutter="20">
-                <el-col :span="24">
-                  <el-form-item label="鍑虹敓鍦�" prop="birthplace">
-                    <el-input
-                      v-model="userform.birthplace"
-                      placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅"
-                      maxlength="50"
-                    />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-              <el-row :gutter="20">
-                <el-col :span="24">
-                  <el-form-item label="灞呬綇鍦�" prop="placeOfResidence">
-                    <el-input
-                      v-model="userform.placeOfResidence"
-                      placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑璇︾粏淇℃伅"
-                      maxlength="50"
-                    />
-                  </el-form-item>
-                </el-col>
-              </el-row>
-            </el-form>
+          <!-- 鎶樺彔闈㈡澘锛氭偅鑰呮。妗堜俊鎭� + 鎶曡瘔寤鸿 -->
+          <div class="collapse-section">
+            <el-collapse v-model="collapseActive" accordion>
+              <el-collapse-item title="鎮h�呮。妗堜俊鎭�" name="patient">
+                <el-form ref="userform2" :model="userform" label-width="90px" size="small">
+                  <el-row :gutter="16">
+                    <el-col :span="12">
+                      <el-form-item label="鎮h�呭鍚�">
+                        <el-input v-model="userform.name" placeholder="璇疯緭鍏ュ鍚�" maxlength="30"></el-input>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-form-item label="鎬у埆">
+                        <el-select v-model="userform.sex" placeholder="璇烽�夋嫨" style="width: 100%">
+                          <el-option label="鐢�" :value="1"></el-option>
+                          <el-option label="濂�" :value="2"></el-option>
+                        </el-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="16">
+                    <el-col :span="12">
+                      <el-form-item label="骞撮緞">
+                        <el-input v-model="userform.age" placeholder="璇疯緭鍏ュ勾榫�" maxlength="20"></el-input>
+                      </el-form-item>
+                    </el-col>
+                    <el-col :span="12">
+                      <el-form-item label="鑱旂郴鏂瑰紡">
+                        <el-input v-model="userform.telcode" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" maxlength="20"></el-input>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="16">
+                    <el-col :span="24">
+                      <el-form-item label="浜插睘鐢佃瘽">
+                        <el-input v-model="userform.relativetelcode" placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�" maxlength="20"></el-input>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="16">
+                    <el-col :span="24">
+                      <el-form-item label="璇婃柇鍚嶇О">
+                        <el-input v-model="form.leavediagname" placeholder="璇疯緭鍏ヨ瘖鏂�" maxlength="50"></el-input>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="16">
+                    <el-col :span="24">
+                      <el-form-item label="鍑虹敓鍦�">
+                        <el-input v-model="userform.birthplace" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row :gutter="16">
+                    <el-col :span="24">
+                      <el-form-item label="灞呬綇鍦�">
+                        <el-input v-model="userform.placeOfResidence" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                </el-form>
+              </el-collapse-item>
+              <el-collapse-item title="鎶曡瘔寤鸿" name="advice" v-if="orgname=='缂欎簯鍘夸汉姘戝尰闄�'">
+                <AdviceList :subid="taskid" :taskid="id" :patid="patid" />
+              </el-collapse-item>
+            </el-collapse>
           </div>
+
+
+
         </div>
       </div>
     </div>
@@ -1317,12 +1308,14 @@
 import CallButton from "@/components/CallButton";
 import TemplateSelector from "@/components/optionalModule";
 import MergeAndModify from "./MergeAndModify.vue";
+import AdviceList from "./components/AdviceList.vue";
 import CallCenterLs from "@/components/CallCenterLs";
 import store from "@/store";
 export default {
   components: {
     CallButton,
     MergeAndModify,
+    AdviceList,
     CallCenterLs,
     TemplateSelector,
   },
@@ -1411,6 +1404,7 @@
     return {
       visitAgain: 1,
       activeNames: ["next"], // 鍙睍寮�"涓嬫闅忚"锛屽叾浠栭兘鎶樺彔
+      collapseActive: ["patient"], // 浜哄伐澶勭悊鎶樺彔闈㈡澘婵�娲婚」锛堥粯璁ゅ睍寮�鎮h�呮。妗堬級
       userid: "",
       defaultKey: false, //鏄惁鍙粯璁ゅ~鎶�
       currentPhoneNumber: "",
@@ -1673,6 +1667,15 @@
         failed: "error",
       };
       return typeMap[this.callStatus];
+    },
+    // 鏄惁浠ラ棶鍗峰舰寮忓睍绀猴紙闈炶闊虫湇鍔★紝鎴栬闊虫湇鍔′絾鏃犲畬鏁磋闊虫暟鎹渶鎵嬪姩濉姤锛�
+    showQuestionnaireForm() {
+      return !this.Voicetype ;
+    },
+    // 鏄惁涓虹鐞嗗憳瑙掕壊
+    isAdmin() {
+      const roles = this.$store.getters.roles || [];
+      return roles.includes("admin") || roles.includes("sysadmin");
     },
   },
   created() {
@@ -2008,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;
@@ -2043,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);
+
           });
         }
       });
@@ -2591,6 +2598,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);
@@ -4145,4 +4182,58 @@
   padding: 20px 15px;
   background-color: #fff;
 }
+
+.collapse-section {
+  width: 100%;
+  align-self: stretch;
+  margin-top: 10px;
+
+  ::v-deep .el-collapse {
+    border: none;
+
+    .el-collapse-item__header {
+      background: linear-gradient(135deg, #ecf5ff 0%, #f5f9ff 100%);
+      border-radius: 8px;
+      padding: 0 20px;
+      height: 48px;
+      font-size: 16px;
+      font-weight: 700;
+      color: #303133;
+      border-bottom: 1px solid #e4e7ed;
+      margin-bottom: 8px;
+      letter-spacing: 1px;
+
+      .el-collapse-item__arrow {
+        font-size: 16px;
+        color: #409eff;
+      }
+
+      &:hover {
+        background: linear-gradient(135deg, #e0efff 0%, #ecf5ff 100%);
+      }
+
+      &.is-active {
+        border-bottom-color: transparent;
+        color: #409eff;
+      }
+    }
+
+    .el-collapse-item__wrap {
+      border-bottom: none;
+      padding: 4px 2px 8px;
+    }
+
+    .el-collapse-item__content {
+      padding: 16px;
+      background: #fff;
+      border-radius: 8px;
+      border: 1px solid #ebeef5;
+      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
+    }
+  }
+
+  .el-form-item {
+    margin-bottom: 12px;
+  }
+}
 </style>

--
Gitblit v1.9.3