From d93ed5c5aadcf3d49f824339c26ebfac911be06d Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期五, 07 十一月 2025 14:39:38 +0800
Subject: [PATCH] 测试完成

---
 src/views/outsideChainwtnew.vue |   53 ++++++++++++++++++++++++++++++++---------------------
 1 files changed, 32 insertions(+), 21 deletions(-)

diff --git a/src/views/outsideChainwtnew.vue b/src/views/outsideChainwtnew.vue
index 24fc1d3..b4aeab6 100644
--- a/src/views/outsideChainwtnew.vue
+++ b/src/views/outsideChainwtnew.vue
@@ -38,7 +38,7 @@
               >
                 <el-radio
                   border
-                  v-for="(items, index) in item.svyLibTemplateTargetoptions"
+                  v-for="(items, index) in item.svyTaskTemplateTargetoptions"
                   :class="
                     items.isabnormal && item.scriptResult == items.optioncontent
                       ? 'red-star'
@@ -70,7 +70,7 @@
                 <el-checkbox
                   border
                   @change="$forceUpdate()"
-                  v-for="(items, indexs) in item.svyLibTemplateTargetoptions"
+                  v-for="(items, indexs) in item.svyTaskTemplateTargetoptions"
                   :key="indexs"
                   :label="items.optioncontent"
                 >
@@ -168,7 +168,7 @@
         //   scriptType: 1,
         //   scriptContent: "鎮ㄧ殑骞撮緞鑼冨洿鏄紵",
         //   scriptResult: null,
-        //   svyLibTemplateTargetoptions: [
+        //   svyTaskTemplateTargetoptions: [
         //     { optioncontent: "18-25", value: "18-25", isabnormal: true },
         //     { optioncontent: "26-35", value: "26-35" },
         //     { optioncontent: "36-45", value: "36-45" },
@@ -181,7 +181,7 @@
         //   scriptType: 1,
         //   scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
         //   scriptResult: null,
-        //   svyLibTemplateTargetoptions: [
+        //   svyTaskTemplateTargetoptions: [
         //     { optioncontent: "瀛︾敓", value: "student" },
         //     { optioncontent: "鏁欏笀", value: "teacher" },
         //     { optioncontent: "宸ョ▼甯�", value: "engineer" },
@@ -194,7 +194,7 @@
         //   scriptType: 2,
         //   scriptContent: "鎮ㄦ劅鍏磋叮鐨勬椿鍔ㄦ湁鍝簺锛�",
         //   scriptResult: [],
-        //   svyLibTemplateTargetoptions: [
+        //   svyTaskTemplateTargetoptions: [
         //     { optioncontent: "鏃呮父", value: "travel", isabnormal: true },
         //     { optioncontent: "闃呰", value: "reading", isabnormal: true },
         //     { optioncontent: "杩愬姩", value: "sports", isabnormal: true },
@@ -207,7 +207,7 @@
         //   scriptType: 1,
         //   scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
         //   scriptResult: null,
-        //   svyLibTemplateTargetoptions: [
+        //   svyTaskTemplateTargetoptions: [
         //     { optioncontent: "瀛︾敓", value: "student" },
         //     { optioncontent: "鏁欏笀", value: "teacher" },
         //     { optioncontent: "宸ョ▼甯�", value: "engineer" },
@@ -220,7 +220,7 @@
         //   scriptType: 1,
         //   scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
         //   scriptResult: null,
-        //   svyLibTemplateTargetoptions: [
+        //   svyTaskTemplateTargetoptions: [
         //     { optioncontent: "瀛︾敓", value: "student" },
         //     { optioncontent: "鏁欏笀", value: "teacher" },
         //     { optioncontent: "宸ョ▼甯�", value: "engineer", isabnormal: true },
@@ -233,7 +233,7 @@
         //   scriptType: 1,
         //   scriptContent: "鎮ㄧ殑鑱屼笟鏄粈涔堬紵",
         //   scriptResult: null,
-        //   svyLibTemplateTargetoptions: [
+        //   svyTaskTemplateTargetoptions: [
         //     { optioncontent: "瀛︾敓", value: "student" },
         //     { optioncontent: "鏁欏笀", value: "teacher" },
         //     { optioncontent: "宸ョ▼甯�", value: "engineer" },
@@ -382,6 +382,7 @@
         param1: this.taskid,
         param2: this.patid,
         excep: this.excep,
+        isabnormal: this.excep,
         serviceSubtaskDetailList: [],
       };
       const arr = structuredClone(this.questionList);
@@ -408,21 +409,31 @@
       let form = {
         param1: this.taskid,
         param2: this.patid,
-        svyLibTemplateScriptVOS: [],
+        svyTaskTemplateScriptVOS: [],
       };
       const arr = structuredClone(this.questionList);
       console.log(arr, "srr");
       arr.forEach((item, index) => {
-        var obj = item.svyLibTemplateTargetoptions.find(
-          (items) => items.optioncontent == item.scriptResult
-        );
-        console.log(obj, "obj");
+        if (item.scriptType == 1 && item.scriptResult) {
+          var obj = item.svyTaskTemplateTargetoptions.find(
+            (items) => items.optioncontent == item.scriptResult
+          );
+          console.log(item);
 
-        if (obj) {
-          if (obj.isabnormal) {
-            console.log(obj.isabnormal);
-            form.excep = 1;
-            this.excep = 1;
+          console.log(obj, "obj");
+          if (obj.sendTaskid) {
+            item.sendTaskname = obj.sendTaskname;
+            item.sendTaskid = obj.sendTaskid;
+            console.log(String(obj.sendTaskid).split(","));
+            item.sendTaskids = String(obj.sendTaskid).split(",");
+
+          }
+          if (obj) {
+            if (obj.isabnormal) {
+              console.log(obj.isabnormal);
+              form.excep = obj.isabnormal;
+              this.excep = obj.isabnormal;
+            }
           }
         }
       });
@@ -434,7 +445,7 @@
           item.scriptResult = JSON.stringify(item.scriptResult);
         }
       });
-      form.svyLibTemplateScriptVOS = arr;
+      form.svyTaskTemplateScriptVOS = arr;
       form.type = 2;
       Cachequestionnaire(form).then((res) => {
         if (res.code == 200) {
@@ -447,7 +458,7 @@
     // 澶勭悊鍗曢�夐�夐」
     handleOptionChange(selectedvalue, index, arr) {
       // 鏌ユ壘閫変腑鐨勯�夐」瀵硅薄
-      const selectedOption = arr.svyLibTemplateTargetoptions.find(
+      const selectedOption = arr.svyTaskTemplateTargetoptions.find(
         (option) => option.optioncontent == selectedvalue
       );
       if (selectedOption) {
@@ -462,7 +473,7 @@
     //   // 锟斤拷鍔犲垎鏁�
     //   let score = 0;
     //   selectedvalues.forEach((value) => {
-    //     const selectedOption = arr.svyLibTemplateTargetoptions.find(
+    //     const selectedOption = arr.svyTaskTemplateTargetoptions.find(
     //       (option) => option.optioncontent == value
     //     );
     //     if (selectedOption) {

--
Gitblit v1.9.3