Browse Source

对话答题

gcj 3 years ago
parent
commit
f9f2b684ab

+ 5 - 0
src/components/Adult/inputModules/DialogueAnswerChs/index.vue

@@ -97,6 +97,7 @@
       <DialogueTem
         :curQue="curQue.option[listIndex]"
         :listIndex="'option' + listIndex"
+        type="option"
       />
       <span slot="footer" class="dialog-footer">
         <el-button @click="optionVisible = false">取 消</el-button>
@@ -267,6 +268,10 @@ export default {
           this.isByWord = true;
         }
       }
+      this.curQue.list.forEach((item) => {
+        item.checkList = ["input"];
+        item.judge = [];
+      });
     } else {
       this.initCurQueData();
     }

+ 3 - 3
src/components/Adult/inputModules/DialogueTem/index.vue

@@ -39,7 +39,7 @@
         <el-radio label="cn">汉字</el-radio>
       </el-radio-group>
     </div>
-    <div class="adult-book-input-item">
+    <div class="adult-book-input-item" v-if="type != 'option'">
       <span class="adult-book-lable">功能设置:</span>
       <el-checkbox-group
         v-model="curQue.checkList"
@@ -149,7 +149,7 @@
 
     <div
       class="adult-book-input-item"
-      v-if="curQue.checkList.indexOf('input') > -1"
+      v-if="curQue.checkList && curQue.checkList.indexOf('input') > -1"
     >
       <span class="adult-book-lable">答案:</span>
       <el-input
@@ -226,7 +226,7 @@ export default {
     Createtimelist,
     RoleChs,
   },
-  props: ["curQue", "changeCurQue", "listIndex", "segModel"],
+  props: ["curQue", "changeCurQue", "listIndex", "segModel", "type"],
   filters: {
     handlePinyin(wordsList) {
       let str = "";