From b14bdee1aaf639dd14440b42c6a0ce2e12549ee7 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期五, 26 七月 2024 10:38:09 +0800
Subject: [PATCH] 测试完成

---
 src/views/knowledge/questionbank/particulars/index.vue |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index 5b3670c..a5cab12 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -302,7 +302,9 @@
                 ></span
               >
               <span style="margin-left: 30px"
-                >閫変腑鎸囨爣锛歿{ topicobj.scriptTopic }}</span
+                >閫変腑鎸囨爣锛�<el-tag type="success" effect="dark">{{
+                  topicobj.targetname ? topicobj.targetname : "鏈�夋嫨"
+                }}</el-tag></span
               >
               <span style="margin-left: 30px"
                 ><el-button type="success" round @click="gettargetInfo"
@@ -660,6 +662,9 @@
           return item;
         }
       );
+      this.topicobj.targetoptions = this.topicobj.svyLibScriptOptions
+        .map((item) => item.optioncontent)
+        .join(", ");
       this.topicobj.otherdata = JSON.stringify(this.variablelist);
       this.topicobj.suitway = this.suitwaylist.join(",");
       if (this.id) {
@@ -740,13 +745,12 @@
     },
     Saveproblem() {
       if (this.topicobj.scoretype == 1) {
-        console.log(321);
         this.Scorejudgment();
       } else {
         this.compileissue();
       }
     },
- 
+
     // 鍒犻櫎閫夐」
     deletexuanx(row) {
       const index = this.getIndexInArray(
@@ -775,10 +779,11 @@
         )
         .then(() => {
           console.log(row);
-          console.log(this.topicobj);
           this.topicobj.scriptTopic = row.targetname;
           this.topicobj.valueType = row.valueType;
           this.topicobj.scriptContent = row.targetdesc;
+          this.topicobj.targetid = row.id;
+          this.topicobj.targetname = row.targetname;
           this.topicobj.isavailable = "0";
           this.topicobj.language = "鏅�氳瘽";
           this.topicobj.svyLibScriptOptions = [];
@@ -1021,10 +1026,14 @@
     handleChange(item, response, file, fileList) {
       console.log(response);
       if (response.code == 200) {
+        console.log(item);
         let index = this.topicobj.svyLibScriptOptions.findIndex(
-          (obj) => obj.id == item.id && obj.name == item.name
+          (obj) => obj.optioncontent == item.optioncontent
         );
+        console.log(index);
         this.topicobj.svyLibScriptOptions[index].picturePath = response.url;
+        console.log(this.topicobj.svyLibScriptOptions[index]);
+        this.$forceUpdate();
       } else {
         this.$message.error("鍥剧墖鎻掑叆澶辫触");
       }

--
Gitblit v1.9.3