From 09abeae851f72a25f105030e37c6a0c9f3189378 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 07 七月 2026 14:54:57 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/record/detailpage/index.vue |  363 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 218 insertions(+), 145 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 6bc4606..7a81969 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -362,7 +362,14 @@
                   ><i class="el-icon-notebook-1"></i> 闂嵎闅忚缁撴灉</span
                 >
                 <div class="CONTENT">
-                  <div class="title">{{ taskname ? taskname : "闂嵎" }}</div>
+                  <div class="title">
+                    {{ taskname ? taskname : "闂嵎" }}
+                    <span style="margin-left: 50px">
+                      <el-button type="primary" round @click="smsSubTask" v-if="orgname != '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'">
+                        闂嵎鐭俊鎺ㄩ��
+                      </el-button>
+                    </span>
+                  </div>
 
                   <div class="preview-left" v-if="!Voicetype">
                     <div
@@ -677,7 +684,7 @@
                   type="primary"
                   round
                   @click="sendAgain"
-                  v-if="(form.isVisitAgain != 2) & (visitAgain == 2)"
+                  v-if="(form.isVisitAgain == 1) & (visitAgain == 2)"
                 >
                   鍐嶆闅忚
                 </el-button>
@@ -922,6 +929,13 @@
                   >
                     鏆備笉澶勭悊
                   </el-button>
+                   <el-button
+                    plain
+                    type="success"
+                    @click="Editsingletaskson('6')"
+                  >
+                    宸查潰璁�
+                  </el-button>
                   <el-button
                     plain
                     type="success"
@@ -939,7 +953,7 @@
                   <el-button plain type="info" @click="Editsingletaskson('5')">
                     浜哄伐闅忚
                   </el-button>
-                  <el-button type="primary" round @click="sendAgainmsg">
+                  <el-button type="primary" round @click="sendAgainmsg" v-if="orgname != '鐪佺珛鍚屽痉缈犺嫅闄㈠尯'">
                     鐭俊鍙戦��
                   </el-button>
                 </div>
@@ -1075,51 +1089,37 @@
       </div>
     </el-dialog>
     <el-dialog
-      title="鎮h�呭啀娆¢殢璁�"
-      v-dialogDrags
-      :visible.sync="dialogFormVisible"
-    >
-      <el-form ref="zcform" :rules="zcrules" :model="form" label-width="80px">
+  title="鎮h�呭啀娆¢殢璁�"
+  v-dialogDrags
+  :visible.sync="dialogFormVisible"
+  width="700px"
+>
+  <el-form ref="zcform" :rules="zcrules" :model="form" label-width="80px">
+    <!-- 鍩虹鏈嶅姟淇℃伅 - 榛樿鎶樺彔 -->
+    <el-collapse v-model="activeNames" @change="handleCollapseChange">
+      <el-collapse-item title="鍩虹鏈嶅姟淇℃伅" name="basic">
         <el-form-item label="浠诲姟鍚嶇О">
-          <el-input
-            style="width: 400px"
-            disabled
-            v-model="form.taskName"
-          ></el-input>
+          <el-input style="width: 100%" disabled v-model="form.taskName"></el-input>
         </el-form-item>
         <el-form-item label="鎮h�呭悕绉�">
-          <el-input
-            style="width: 400px"
-            disabled
-            v-model="form.sendname"
-          ></el-input>
+          <el-input style="width: 100%" disabled v-model="form.sendname"></el-input>
         </el-form-item>
         <el-form-item label="骞撮緞">
-          <el-input style="width: 400px" disabled v-model="form.age"></el-input>
+          <el-input style="width: 100%" disabled v-model="form.age"></el-input>
         </el-form-item>
         <el-form-item label="绉戝">
-          <el-input
-            style="width: 400px"
-            disabled
-            v-model="form.deptname"
-          ></el-input>
+          <el-input style="width: 100%" disabled v-model="form.deptname"></el-input>
         </el-form-item>
         <el-form-item label="鐥呭尯">
-          <el-input
-            style="width: 400px"
-            disabled
-            v-model="form.leavehospitaldistrictname"
-          ></el-input>
+          <el-input style="width: 100%" disabled v-model="form.leavehospitaldistrictname"></el-input>
         </el-form-item>
         <el-form-item label="鍑洪櫌鏃堕棿">
-          <el-input
-            style="width: 400px"
-            disabled
-            v-model="form.endtime"
-          ></el-input>
+          <el-input style="width: 100%" disabled v-model="form.endtime"></el-input>
         </el-form-item>
-        <div class="headline">涓婃闅忚</div>
-        <el-divider></el-divider>
+      </el-collapse-item>
+
+      <!-- 涓婃闅忚淇℃伅 - 榛樿鎶樺彔 -->
+      <el-collapse-item title="涓婃闅忚" name="last">
         <el-row>
           <el-col :span="12">
             <el-form-item label="闅忚鏂瑰紡">
@@ -1131,6 +1131,7 @@
                 disabled
                 placeholder="璇烽�夋嫨闅忚鏂瑰紡"
                 class="custom-disabled"
+                style="width: 90%"
               >
                 <el-option
                   v-for="item in options"
@@ -1152,11 +1153,11 @@
                 align="right"
                 v-model="form.date2"
                 class="custom-disabled"
+                style="width: 95%"
               ></el-date-picker>
             </el-form-item>
           </el-col>
         </el-row>
-
         <el-form-item label="闅忚璁板綍">
           <el-input
             class="custom-disabled"
@@ -1165,8 +1166,10 @@
             v-model="form.remark2"
           ></el-input>
         </el-form-item>
-        <div class="headline">涓嬫闅忚</div>
-        <el-divider></el-divider>
+      </el-collapse-item>
+
+      <!-- 涓嬫闅忚淇℃伅 - 榛樿灞曞紑 -->
+      <el-collapse-item title="涓嬫闅忚" name="next">
         <el-row>
           <el-col :span="12">
             <el-form-item label="闅忚鏂瑰紡" prop="visitType">
@@ -1177,6 +1180,7 @@
                 default-first-option
                 @change="visitChange"
                 placeholder="璇烽�夋嫨闅忚鏂瑰紡(渚濆嚭闄㈡椂闂磋绠�)"
+                style="width: 90%"
               >
                 <el-option
                   v-for="item in options"
@@ -1197,6 +1201,7 @@
                 align="right"
                 v-model="form.date1"
                 class="custom-disabled"
+                style="width: 92%"
                 value-format="yyyy-MM-dd hh:mm:ss"
                 @change="checkFollowupDate"
               ></el-date-picker>
@@ -1209,18 +1214,17 @@
             <el-radio label="2">闅忚涓績闅忚</el-radio>
           </el-radio-group>
         </el-form-item>
-
         <el-form-item label="闅忚璁板綍" :required="form.resource == '2'">
           <el-input type="textarea" v-model="form.remark"></el-input>
         </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="warning" @click="dialogFormVisible = false"
-          >鍙� 娑�</el-button
-        >
-        <el-button type="primary" @click="setupsubtask">纭鍒涘缓鏈嶅姟</el-button>
-      </div>
-    </el-dialog>
+      </el-collapse-item>
+    </el-collapse>
+  </el-form>
+  <div slot="footer" class="dialog-footer">
+    <el-button type="warning" @click="dialogFormVisible = false">鍙� 娑�</el-button>
+    <el-button type="primary" @click="setupsubtask">纭鍒涘缓鏈嶅姟</el-button>
+  </div>
+</el-dialog>
     <div class="main-content" v-if="orgname == '鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�'">
       <!-- <el-button @click="CaldialogVisible = true">鎵撳紑寮规</el-button> -->
 
@@ -1253,6 +1257,7 @@
   updateTemplate,
   query360PatInfonh,
   sendMsg,
+  smsSubTask,
   getconfigKey,
 } from "@/api/AiCentre/index";
 import {
@@ -1356,6 +1361,7 @@
     };
     return {
       visitAgain: 1,
+      activeNames: ['next'], // 鍙睍寮�"涓嬫闅忚"锛屽叾浠栭兘鎶樺彔
       userid: "",
       defaultKey: false, //鏄惁鍙粯璁ゅ~鎶�
       currentPhoneNumber: "",
@@ -1702,6 +1708,9 @@
         return "scriptTopic-dev"; // 姝e父 - 榛樿鏍峰紡
       }
     },
+    handleCollapseChange(val) {
+    console.log('鎶樺彔闈㈡澘鐘舵�佸彉鍖�:', val);
+  },
     getconfigKey() {
       getconfigKey("default.value.icon").then((res) => {
         if (res.msg) {
@@ -1785,7 +1794,9 @@
               item.scriptResult = item.scriptResult;
             } else if (item.scriptResultId && item.scriptType == 2) {
               console.log(item.scriptResult, "item.scriptResult");
-              item.scriptResult = item.scriptResult.split("&");
+              item.scriptResult = item.scriptResult
+                ? item.scriptResult.split("&")
+                : [];
               item.isoption = 3;
             } else if (!item.scriptResultId && item.scriptType == 2) {
               item.scriptResult = [];
@@ -2025,37 +2036,38 @@
           this.Editsingletasksonyic(this.serviceStates);
           const orgName = localStorage.getItem("orgname");
 
-          if (
-            this.form.isVisitAgain != 1 ||
-            orgName == "涓芥按甯備腑鍖婚櫌" ||
-            this.visitAgain == 1
-          ) {
+          if (this.form.isVisitAgain != 1 || this.visitAgain == 1) {
             this.Torouter();
             return;
           }
-          // this.$modal
-          //   .confirm(
-          //     '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
-          //       this.userform.name +
-          //       '"鍐嶆闅忚锛�',
-          //     "纭",
-          //     {
-          //       confirmButtonText: "纭畾",
-          //       cancelButtonText: "鍙栨秷",
-          //       showCancelButton: true,
-          //       dangerouslyUseHTMLString: true,
-          //       confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
-          //       cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
-          //     }
-          //   )
-          //   .then(() => {
-          //     document.querySelector("#app").scrollTo(0, 0);
-          //     this.formtidy();
-          //     this.dialogFormVisible = true;
-          //   })
-          //   .catch(() => {
-          //     this.Torouter();
-          //   });
+          if (
+            orgName == "鏅畞鐣叉棌鑷不鍘夸汉姘戝尰闄�" ||
+            orgName == "缂欎簯绗簩浜烘皯鍖婚櫌"
+          ) {
+            this.$modal
+              .confirm(
+                '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
+                  this.userform.name +
+                  '"鍐嶆闅忚锛�',
+                "纭",
+                {
+                  confirmButtonText: "纭畾",
+                  cancelButtonText: "鍙栨秷",
+                  showCancelButton: true,
+                  dangerouslyUseHTMLString: true,
+                  confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
+                  cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
+                }
+              )
+              .then(() => {
+                document.querySelector("#app").scrollTo(0, 0);
+                this.formtidy();
+                this.dialogFormVisible = true;
+              })
+              .catch(() => {
+                this.Torouter();
+              });
+          }
         }
       });
     },
@@ -2142,6 +2154,25 @@
 
     handleTemplateClear() {
       console.log("娓呴櫎浜嗘ā鏉块�夋嫨");
+    },
+    smsSubTask() {
+      this.$modal
+        .confirm("鏄惁鍚戞偅鑰呴�氳繃鐭俊鎺ㄩ�佹枃浠跺唴瀹癸紵")
+        .then(() => {
+          console.log(11, this.id);
+
+          smsSubTask(this.id).then((res) => {
+            console.log(11);
+
+            if (res.code) {
+              this.$modal.msgSuccess("鏂囦欢宸查�氳繃鐭俊鎺ㄩ�佺粰鎮h��");
+            } else {
+            }
+          });
+        })
+        .catch((err) => {
+          console.log(err);
+        });
     },
     handleConfirmReplace() {
       // 閬嶅巻鎵�鏈夐鐩紙tableDatatop锛�
@@ -2288,42 +2319,43 @@
       const orgName = localStorage.getItem("orgname");
       console.log(orgName, "orgName");
 
-      if (
-        this.form.isVisitAgain != 1 ||
-        orgName == "涓芥按甯備腑鍖婚櫌" ||
-        this.visitAgain == 1
-      ) {
-        this.Torouter();
-        return;
-      }
       savequestiondetail(obj).then((res) => {
         if (res.code == 200) {
           this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
-          this.Torouter();
+          // this.Torouter();
+          if (
+            this.form.isVisitAgain != 1 ||
+            orgName == "涓芥按甯備腑鍖婚櫌" ||
+            this.visitAgain == 1
+          ) {
+            console.log("c4");
 
-          //   this.$modal
-          //     .confirm(
-          //       '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
-          //         this.userform.name +
-          //         '"鍐嶆闅忚锛�',
-          //       "纭",
-          //       {
-          //         confirmButtonText: "纭畾",
-          //         cancelButtonText: "鍙栨秷",
-          //         showCancelButton: true,
-          //         dangerouslyUseHTMLString: true,
-          //         confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
-          //         cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
-          //       }
-          //     )
-          //     .then(() => {
-          //       document.querySelector("#app").scrollTo(0, 0);
-          //       this.formtidy();
-          //       this.dialogFormVisible = true;
-          //     })
-          //     .catch(() => {
-          //       this.Torouter();
-          //     });
+            this.Torouter();
+            return;
+          }
+          this.$modal
+            .confirm(
+              '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
+                this.userform.name +
+                '"鍐嶆闅忚锛�',
+              "纭",
+              {
+                confirmButtonText: "纭畾",
+                cancelButtonText: "鍙栨秷",
+                showCancelButton: true,
+                dangerouslyUseHTMLString: true,
+                confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
+                cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
+              }
+            )
+            .then(() => {
+              document.querySelector("#app").scrollTo(0, 0);
+              this.formtidy();
+              this.dialogFormVisible = true;
+            })
+            .catch(() => {
+              this.Torouter();
+            });
         }
       });
     },
@@ -2390,8 +2422,15 @@
     },
     // 璋冭捣鐭俊鍙戦�佸璇濇
     sendAgainmsg() {
-      this.smsDialogVisible = true;
-      // 鍙互鍦ㄨ繖閲屽垵濮嬪寲 smsContent锛屼緥濡� this.smsContent = '';
+      // this.smsDialogVisible = true;
+      this.$store.dispatch("sms/openSmsDialog", {
+        name: this.form.sendname,
+        age: this.form.age,
+        phone: this.userform.telcode,
+        deptName: this.form.deptname,
+        wardName: this.form.leavehospitaldistrictname,
+        smsTemplate: `灏婃暚鐨�${this.form.sendname}锛屾偍濂斤紒`,
+      });
     },
 
     // 鍙戦�佺煭淇$殑鏂规硶
@@ -2468,7 +2507,7 @@
       });
     },
     alterpatient(sendstate) {
-      this.Editsingletasksonyic(this.serviceStates)
+      this.Editsingletasksonyic(this.serviceStates);
       // alterpatient(this.userform).then((res) => {
       //   if (res.code == 200) {
       //     this.$modal.msgSuccess("鍩虹淇℃伅淇濆瓨鎴愬姛");
@@ -2606,15 +2645,26 @@
       if (document.activeElement) {
         document.activeElement.blur();
       }
+      let selectedOptionObj = null;
+      if (this.Voicetype) {
+        console.log('Voicetype');
 
-      // 鎵惧埌琚�変腑鐨勯�夐」瀵硅薄
-      const selectedOptionObj = options.find(
-        (item) => item.optioncontent == selectedOption
-      );
+        selectedOptionObj = options.find(
+          (item) => item.targetvalue == selectedOption
+        );
+      } else {
+        // 鎵惧埌琚�変腑鐨勯�夐」瀵硅薄
+        selectedOptionObj = options.find(
+          (item) => item.optioncontent == selectedOption
+        );
+      }
 
+      console.log(this.tableDatatop, "this.tableDatatop");
+      console.log(selectedOptionObj, "selectedOptionObj");
       // 澶勭悊寮傚父鐘舵�侀珮浜�
       this.tableDatatop[questionIndex].isabnormal =
         selectedOptionObj.isabnormal;
+
       // 澶勭悊闄勫姞杈撳叆妗嗘樉绀�
 
       this.tableDatatop[questionIndex].showAppendInput =
@@ -2867,38 +2917,38 @@
   //   console.log(11);
   // },
   beforeRouteLeave(to, from, next) {
-  const callButton = this.$refs.callButton;
+    const callButton = this.$refs.callButton;
 
-  // 濡傛灉瀛樺湪鍛煎彨缁勪欢涓旀鍦ㄩ�氳瘽涓�
-  if (callButton && callButton.isCalling) {
-    this.$confirm('褰撳墠姝e湪閫氳瘽涓紝纭畾瑕佺寮�姝ら〉闈㈠悧锛�', '鎻愮ず', {
-      confirmButtonText: '鎸傛柇骞剁寮�',
-      cancelButtonText: '缁х画閫氳瘽',
-      type: 'warning'
-    })
-      .then(() => {
-        // 鐢ㄦ埛纭绂诲紑锛屼富鍔ㄦ寕鏂苟娓呯悊
-        callButton.cleanupResources();
-        if (this.$refs.CallCenterLs) {
-          this.$refs.CallCenterLs.handleSeatLogout();
-        }
-        next();
+    // 濡傛灉瀛樺湪鍛煎彨缁勪欢涓旀鍦ㄩ�氳瘽涓�
+    if (callButton && callButton.isCalling) {
+      this.$confirm("褰撳墠姝e湪閫氳瘽涓紝纭畾瑕佺寮�姝ら〉闈㈠悧锛�", "鎻愮ず", {
+        confirmButtonText: "鎸傛柇骞剁寮�",
+        cancelButtonText: "缁х画閫氳瘽",
+        type: "warning",
       })
-      .catch(() => {
-        // 鐢ㄦ埛鍙栨秷锛岄樆姝㈣矾鐢辫烦杞�
-        next(false);
-      });
-  } else {
-    // 鏈�氳瘽鎴栧懠鍙粍浠朵笉瀛樺湪锛屾甯告竻鐞�
-    if (callButton) {
-      callButton.cleanupResources();
+        .then(() => {
+          // 鐢ㄦ埛纭绂诲紑锛屼富鍔ㄦ寕鏂苟娓呯悊
+          callButton.cleanupResources();
+          if (this.$refs.CallCenterLs) {
+            this.$refs.CallCenterLs.handleSeatLogout();
+          }
+          next();
+        })
+        .catch(() => {
+          // 鐢ㄦ埛鍙栨秷锛岄樆姝㈣矾鐢辫烦杞�
+          next(false);
+        });
+    } else {
+      // 鏈�氳瘽鎴栧懠鍙粍浠朵笉瀛樺湪锛屾甯告竻鐞�
+      if (callButton) {
+        callButton.cleanupResources();
+      }
+      if (this.$refs.CallCenterLs) {
+        this.$refs.CallCenterLs.handleSeatLogout();
+      }
+      next();
     }
-    if (this.$refs.CallCenterLs) {
-      this.$refs.CallCenterLs.handleSeatLogout();
-    }
-    next();
-  }
-}
+  },
   // beforeRouteUpdate() {
   //   console.log(33);
   // },
@@ -3987,4 +4037,27 @@
   color: #66b1ff;
   transform: scale(1.1);
 }
+/* 璋冩暣鎶樺彔闈㈡澘鏍峰紡 */
+.el-collapse {
+  border-top: none;
+}
+
+.el-collapse-item__header {
+  font-size: 16px;
+  font-weight: bold;
+  background-color: #f5f7fa;
+  padding-left: 15px;
+  border-radius: 4px;
+  margin-bottom: 5px;
+}
+
+.el-collapse-item__wrap {
+  border-bottom: none;
+}
+
+.el-collapse-item__content {
+  padding: 20px 15px;
+  background-color: #fff;
+}
+
 </style>

--
Gitblit v1.9.3