From 044ffaad1ff4fe69be1a23d65b32a49642650056 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 10 四月 2026 17:11:00 +0800
Subject: [PATCH] 测试完成

---
 src/views/followvisit/record/detailpage/index.vue |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 2ac7ea2..5d10928 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -1760,11 +1760,13 @@
         if (res.code == 200) {
           this.tableDatatop = res.data.ivrTaskTemplateScriptVOList;
           this.tableDatatop.forEach((item) => {
+            item.scriptID = item.id;
             item.id = null;
             // 绫诲瀷鍒ゆ柇璧嬪��
-            if (item.ivrTaskScriptTargetoptionList) {
+            if (item.ivrTaskScriptTargetoptionList.length) {
               item.targetvalue = 1;
               item.questiontext = item.scriptContent;
+
               item.targetvalue = item.ivrTaskScriptTargetoptionList
                 .map((obj) => obj.targetvalue)
                 .join("&");
@@ -1780,6 +1782,8 @@
     },
     // 鍖绘姢浜哄憳瀛樺偍鏁版嵁
     getdetail() {
+      console.log(1);
+
       let excep = "";
       const promises = [];
       this.tableDatatop.forEach((item) => {
@@ -1827,6 +1831,7 @@
         //   promises.push(serviceSubtaskDetailadd(obj));
         // }
       });
+      console.log(2);
       console.log(this.tableDatatop);
       let obj = {
         svyTaskTemplateScriptVOS: this.tableDatatop, // 鎻愪氦澶勭悊鍚庣殑鍓湰
@@ -2045,23 +2050,33 @@
       }, 3000);
     },
     yuyingetdetail() {
+      console.log("c", 1);
+
       const dataToSubmit = JSON.parse(JSON.stringify(this.tableDatatop));
-      console.log(dataToSubmit, "dataToSubmit");
-      // return;
+      console.log(dataToSubmit, 2);
+
       dataToSubmit.forEach((item, index) => {
+
         // 瀵规嫹璐濈殑鏁版嵁杩涜鎿嶄綔锛屼笉褰卞搷鍘熷鐨� scriptResult 鏁扮粍
-        item.scriptResult = item.scriptResult.join("&");
+        if (item.targetvalue) {
+          item.scriptResult = item.scriptResult.join("&");
+          item.asrtext = item.matchedtext;
+          item.ivrtext = item.matchedtext;
+        } else {
+          item.asrtext = item.scriptResult;
+          item.ivrtext = item.scriptResult;
+        }
         item.templatequestionnum = index + 1;
         item.subId = this.id;
+
         item.taskid = this.taskid;
-        item.asrtext = item.matchedtext;
-        item.ivrtext = item.matchedtext;
         if (!item.id) {
           item.isoperation = 1;
         }
         item.patid = this.patid;
         item.templateid = item.templateID;
       });
+      console.log("c", 3);
 
       let obj = {
         ivrTaskTemplateScriptVOList: dataToSubmit, // 鎻愪氦澶勭悊鍚庣殑鍓湰
@@ -2070,6 +2085,7 @@
         param6: this.id,
         type: 1,
       };
+      console.log("c", 4);
       const orgName = localStorage.getItem("orgname");
       console.log(orgName, "orgName");
 
@@ -2138,7 +2154,6 @@
           this.form = res.rows[0].serviceSubtaskList.find(
             (item) => item.id == this.id
           );
-          console.log(this.form, "serviceType");
 
           this.logsheetlist = res.rows[0].serviceSubtaskList;
           this.templateid = this.form.templateid;

--
Gitblit v1.9.3