From f3bf99618bc379a9fa91cefefc813f770dcddc53 Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期三, 24 四月 2024 16:10:56 +0800
Subject: [PATCH] 测试完成

---
 src/views/knowledge/questionbank/particulars/index.vue |  168 +++++++++++++++++++++++++++++++-------------------------
 1 files changed, 93 insertions(+), 75 deletions(-)

diff --git a/src/views/knowledge/questionbank/particulars/index.vue b/src/views/knowledge/questionbank/particulars/index.vue
index 93ed503..cd24643 100644
--- a/src/views/knowledge/questionbank/particulars/index.vue
+++ b/src/views/knowledge/questionbank/particulars/index.vue
@@ -7,7 +7,11 @@
             棰樼洰璁剧疆璇︽儏
             <span style="margin-left: 30px"
               ><el-button type="primary" @click="compileissue"
-                >淇濆瓨</el-button
+                >淇� 瀛�</el-button
+              ></span
+            ><span style="margin-left: 30px"
+              ><el-button type="success" round @click="drawer = true"
+                >+閫夋嫨鎸囨爣</el-button
               ></span
             >
           </div>
@@ -101,14 +105,14 @@
               <el-col :span="6"
                 ><el-form-item label="棰樼洰绫诲瀷">
                   <el-select
-                    v-model="topicobj.topictype"
+                    v-model="topicobj.valueType"
                     size="medium"
                     filterable
                     placeholder="璇烽�夋嫨鍒嗙被"
                   >
                     <el-option
                       class="topicobjaa"
-                      v-for="item in xjxsoptions"
+                      v-for="item in valuetype"
                       :key="item.value"
                       :label="item.label"
                       :value="item.value"
@@ -280,66 +284,63 @@
               </el-col></el-row
             > -->
           </div>
-
-          <div class="headline">
-            閫夐」璁剧疆<span style="margin-left: 30px"
-              ><el-button type="primary" round @click="addoption"
-                >+鏂板</el-button
-              ></span
-            ><span style="margin-left: 30px"
-              ><el-button type="success" round @click="drawer = true"
-                >+閫夋嫨鎸囨爣</el-button
-              ></span
+          <div v-if="topicobj.valueType == 1">
+            <div class="headline">
+              閫夐」璁剧疆<span style="margin-left: 30px"
+                ><el-button type="primary" round @click="addoption"
+                  >+鏂板</el-button
+                ></span
+              >
+            </div>
+            <div
+              class="topicxq"
+              v-for="item in topicobj.svyLibTopicoptions"
+              v-if="item.isoperation != 3"
             >
-          </div>
-          <div
-            class="topicxq"
-            v-for="item in topicobj.svyLibTopicoptions"
-            v-if="item.isoperation != 3"
-          >
-            <el-row :gutter="10">
-              <el-col :span="11"
-                ><el-form-item label="閫夐」">
-                  <el-input
-                    type="text"
-                    placeholder="璇疯緭鍏ラ�夐」"
-                    v-model="item.optioncontent"
-                    show-word-limit
-                  >
-                  </el-input> </el-form-item
-              ></el-col>
-              <el-col :span="11"
-                ><el-form-item label="鍒嗗��">
-                  <el-input
-                    type="text"
-                    placeholder="璇疯緭鍏�"
-                    v-model="item.score"
-                    show-word-limit
-                  >
-                  </el-input> </el-form-item
-              ></el-col>
-              <el-col :span="2">
-                <el-button
-                  type="danger"
-                  icon="el-icon-delete"
-                  circle
-                  @click="deletexuanx(item)"
-                ></el-button>
-              </el-col>
-            </el-row>
+              <el-row :gutter="10">
+                <el-col :span="11"
+                  ><el-form-item label="閫夐」">
+                    <el-input
+                      type="text"
+                      placeholder="璇疯緭鍏ラ�夐」"
+                      v-model="item.optioncontent"
+                      show-word-limit
+                    >
+                    </el-input> </el-form-item
+                ></el-col>
+                <el-col :span="11"
+                  ><el-form-item label="鍒嗗��">
+                    <el-input
+                      type="text"
+                      placeholder="璇疯緭鍏�"
+                      v-model="item.score"
+                      show-word-limit
+                    >
+                    </el-input> </el-form-item
+                ></el-col>
+                <el-col :span="2">
+                  <el-button
+                    type="danger"
+                    icon="el-icon-delete"
+                    circle
+                    @click="deletexuanx(item)"
+                  ></el-button>
+                </el-col>
+              </el-row>
 
-            <el-row :gutter="10">
-              <el-form-item label="閫変腑鎻愮ず">
-                <el-input
-                  style="width: 40vw"
-                  type="textarea"
-                  autosize
-                  placeholder="璇疯緭鍏ュ唴瀹�"
-                  v-model="item.prompt"
-                >
-                </el-input
-              ></el-form-item>
-            </el-row>
+              <el-row :gutter="10">
+                <el-form-item label="閫変腑鎻愮ず">
+                  <el-input
+                    style="width: 40vw"
+                    type="textarea"
+                    autosize
+                    placeholder="璇疯緭鍏ュ唴瀹�"
+                    v-model="item.prompt"
+                  >
+                  </el-input
+                ></el-form-item>
+              </el-row>
+            </div>
           </div>
         </el-form>
       </el-card>
@@ -409,7 +410,7 @@
                 type="text"
                 @click="selectlabel(scope.row)"
                 ><span class="button-textxg"
-                  ><i class="el-icon-circle-plus-outline"></i>娣诲姞</span
+                  ><i class="el-icon-circle-plus-outline"></i>閫夋嫨</span
                 ></el-button
               >
             </template>
@@ -492,7 +493,7 @@
       illnesslist: [],
       classifylist: [],
       optionstag: [],
-      xjxsoptions: [],
+      valuetype: [],
       usable: [],
       mode: [], //鏂瑰紡
     };
@@ -505,7 +506,7 @@
     this.mode = store.getters.mode;
     this.languagelist = store.getters.languagelist;
     this.usable = store.getters.usable;
-    this.xjxsoptions = store.getters.xjxsoptions;
+    this.valuetype = store.getters.valuetype;
     this.required = store.getters.required;
   },
 
@@ -533,6 +534,10 @@
     // 鑾峰彇鏁版嵁
     getissueinfo() {
       this.id = this.$route.query.id;
+      // 鍒嗙被
+      getissueclassify({}).then((res) => {
+        this.classifylist = res.rows;
+      });
       if (!this.id) {
         return;
       }
@@ -552,10 +557,7 @@
       getillness({ outid: this.id, type: 4 }).then((res) => {
         this.illnesslist = res.rows;
       });
-      // 鍒嗙被
-      getissueclassify({}).then((res) => {
-        this.classifylist = res.rows;
-      });
+      
     },
     gettargetInfo() {
       gettargetInfo(this.queryParams).then((res) => {
@@ -635,13 +637,29 @@
     },
     // 閫夋嫨鎸囨爣
     selectlabel(row) {
-      const labellist = row.targetoptionList;
-      labellist.forEach((item) => {
-        this.topicobj.svyLibTopicoptions.push({
-          optioncontent: item.targetvalue,
-          isoperation: 1,
-        });
-      });
+      this.$modal
+        .confirm(
+          '鏄惁閫夋嫨鏍囬涓�"' + row.targetname + '"鐨勬寚鏍囧苟鏇挎崲濉厖闂淇℃伅锛�'
+        )
+        .then(() => {
+          console.log(row);
+          console.log(this.topicobj);
+          this.topicobj.topic = row.targetname;
+          this.topicobj.valueType = row.valueType;
+          this.topicobj.topicContent = row.targetdesc;
+          this.topicobj.isavailable = "0";
+          this.topicobj.language = "鏅�氳瘽";
+          this.topicobj.svyLibTopicoptions = [];
+          const labellist = row.targetoptionList;
+          labellist.forEach((item) => {
+            this.topicobj.svyLibTopicoptions.push({
+              optioncontent: item.targetvalue,
+              isoperation: 1,
+            });
+          });
+          this.drawer = false;
+        })
+        .catch(() => {});
     },
 
     // 鏍囩-----------------

--
Gitblit v1.9.3