Browse Source

Merge branch 'master' into NPC-lhd

natasha 3 years ago
parent
commit
7bbebf0513

+ 10 - 7
src/components/Adult/common/SingleModule.vue

@@ -9,9 +9,9 @@
             class="adult-book-input"
             :autosize="{ minRows: 2 }"
             type="textarea"
-            placeholder="请输入题"
-            v-model="curQueItem.title"
-            @blur="curQueItem.title = curQueItem.title.trim()"
+            placeholder="请输入题"
+            v-model="curQueItem.topic.con"
+            @blur="curQueItem.topic.con = curQueItem.topic.con.trim()"
           ></el-input>
           <img
             @click="deleteOption"
@@ -24,7 +24,7 @@
           <span class="adult-book-lable">题目图片:</span>
           <Upload
             :changeFillId="timuchangeImage"
-            :datafileList="fileCon.img_list"
+            :datafileList="fileCon.timu_img_list"
             :filleNumber="imgNumber"
             :uploadType="'image'"
           />
@@ -33,7 +33,7 @@
           <span class="adult-book-lable">题目音频:</span>
           <Upload
             :changeFillId="timuchangeMp3"
-            :datafileList="fileCon.mp3_list"
+            :datafileList="fileCon.timu_mp3_list"
             :filleNumber="mp3Number"
             :uploadType="'mp3'"
           />
@@ -197,7 +197,7 @@ export default {
           articleImgRes.push(obj);
         }
       });
-      this.curQueItem.con.mp3_list = JSON.parse(JSON.stringify(articleImgRes));
+      this.curQueItem.topic.mp3_list = JSON.parse(JSON.stringify(articleImgRes));
     },
     timuchangeImage(fileList) {
       console.log(fileList);
@@ -214,7 +214,7 @@ export default {
         }
       });
       //this.articleImgList = articleImgRes;
-      this.curQueItem.con.img_list = JSON.parse(JSON.stringify(articleImgRes));
+      this.curQueItem.topic.img_list = JSON.parse(JSON.stringify(articleImgRes));
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -224,6 +224,9 @@ export default {
     if (this.curQueItem) {
       this.fileCon.img_list = this.curQueItem.img_list;
       this.fileCon.mp3_list = this.curQueItem.mp3_list;
+      this.fileCon.timu_img_list = this.curQueItem.topic.img_list;
+      this.fileCon.timu_mp3_list = this.curQueItem.topic.mp3_list;
+
     }
   },
   beforeCreate() {}, //生命周期 - 创建之前

+ 1 - 43
src/components/Adult/common/data3.js

@@ -81,50 +81,8 @@ let fnData = [{
 
     },
     {
-        type: "checkbox",
+        type: "checkbox_chs",
         name: "多选题",
-        data_structure: {
-            type: 'checkbox',
-            name: "多选题",
-            title: "",
-            option: [{
-                    con: '',
-                    pinyin: '',
-                    img_list: [],
-                    mp3_list: [],
-                    isAnswer: ''
-                },
-                {
-                    con: '',
-                    pinyin: '',
-                    img_list: [],
-                    mp3_list: [],
-                    isAnswer: ''
-                }
-            ],
-            correct: [],
-            numberList: {
-                type: "number",
-                name: "每行几个",
-                con: "2",
-                arr: [{
-                        id: 1,
-                        value: 1,
-                    }, {
-                        id: 2,
-                        value: 2,
-
-                    }, {
-                        id: 3,
-                        value: 3,
-                    },
-                    {
-                        id: 4,
-                        value: 4,
-                    },
-                ]
-            }
-        }
     },
     {
         type: "judge",

+ 2 - 1
src/components/Adult/inputModules/Single.vue

@@ -9,8 +9,8 @@
         <span class="adult-book-lable">标题:</span>
         <el-input
           class="adult-book-input"
+          :autosize="{ minRows: 2 }"
           type="textarea"
-          autosize
           placeholder="请输入标题"
           v-model="curQue.title"
           @blur="onBlur(curQue, 'title')"
@@ -91,6 +91,7 @@ export default {
               img_list: [],
               mp3_list: [],
             },
+            con:"",
             img_list: [],
             mp3_list: [],
             isAnswer: "",

+ 11 - 3
src/components/Adult/inputModules/Sudoku.vue

@@ -405,9 +405,9 @@ export default {
         if (this.hintNumber < 17) {
           this.hintNumber++;
           item.isHint = true;
-        }else{
-          this.$message.warning("最多为17个提示")
-          return
+        } else {
+          this.$message.warning("最多为17个提示");
+          return;
         }
       }
     },
@@ -422,6 +422,14 @@ export default {
     if (!this.curQue) {
       let res_data = JSON.parse(JSON.stringify(this.data_structure));
       this.changeCurQue(res_data);
+    } else {
+      this.curQue.option.forEach((item) => {
+        item.forEach((it) => {
+          if (it.isHint) {
+            this.hintNumber++;
+          }
+        });
+      });
     }
   },
   beforeCreate() {}, //生命周期 - 创建之前

+ 1 - 5
src/views/adultInput3.vue

@@ -268,11 +268,7 @@
                       </template>
                       <template v-else> </template>
                     </template>
-                    <template
-                      v-if="
-                        topicIitem.type == 'single_chs'
-                      "
-                    >
+                    <template v-if="topicIitem.type == 'single_chs'">
                       <template v-if="topicIitem.is_edit">
                         <Single
                           :curQue="topicIitem.data"