Browse Source

拷贝录入组件并修改

秦鹏 3 năm trước cách đây
mục cha
commit
c1dae8a90d

BIN
src/assets/adult/pro-plus.png


+ 7 - 35
src/components/Adult/common/InputRecordModule.vue

@@ -2,17 +2,16 @@
 <template>
   <div class="Big-Book-ligatureModule">
     <div class="Big-Book-content m">
-      <div class="Big-Book-con-main" v-if="type == 'input_record'">
+      <div class="Big-Book-con-main">
         <div class="Big-Book-con">
-                    <span>标题:</span>           <el-input
-            style="width: 300px"
+          <span>题目:</span>
+          <el-input
+            style="width: 500px"
             type="textarea"
             autosize
-            placeholder="请输入标题"
-            v-model="curQueItem.title"
-            @blur="curQueItem.title = curQueItem.title.trim()"
+            placeholder="请输入题目"
+            v-model="curQueItem.con"
           ></el-input>
-                  
           <img
             @click="romveoptionCon"
             class="close"
@@ -20,16 +19,6 @@
             alt=""
           />
         </div>
-        <div class="Big-Book-con">
-          <span>题目:</span>
-          <el-input
-            style="width: 500px"
-            type="textarea"
-            autosize
-            placeholder="请输入题目"
-            v-model="curQueItem.con"
-          ></el-input>
-        </div>
         <div class="Big-Book-con InputRecordModule_textarea">
           <span>答案:</span>
           <el-input
@@ -52,24 +41,6 @@
           /> -->
         </div>
       </div>
-      <div class="Big-Book-con-main" v-if="type == 'pure_input'">
-        <div class="Big-Book-con">
-          <span>答案:</span>
-          <el-input
-            style="width: 300px"
-            type="textarea"
-            autosize
-            placeholder="请输入答案"
-            v-model="curQueItem.answer"
-          ></el-input>
-          <img
-            @click="romveoptionCon"
-            class="close"
-            src="../../../assets/adult/del-close.png"
-            alt=""
-          />
-        </div>
-      </div>
     </div>
   </div>
 </template>
@@ -133,6 +104,7 @@ export default {
             name: item.name,
             url: item.response.file_info_list[0].file_url,
             id: item.response.file_info_list[0].file_id,
+            media_duration: item.response.file_info_list[0].media_duration, //音频时长
           };
           articleImgRes.push(obj);
         }

+ 21 - 35
src/components/Adult/common/SentenceModule.vue

@@ -1,6 +1,6 @@
 <!--  -->
 <template>
-  <div class="Big-Book-HzModule">
+  <div class="Big-Book-SentenceModule">
     <div class="Big-Book-top">
       <span>内容</span>
       <el-input
@@ -29,33 +29,20 @@
         @blur="onBlur(curQueItem, 'number')"
       ></el-input>
     </div>
-    <template v-if="curQue.type == 'sentence'">
-      <div class="Big-Book-top" v-if="curQue.ChildType == 'sentence_judge'">
-        <span>判断</span>
-        <el-radio v-model="curQueItem.judge" :label="true">正确</el-radio>
-        <el-radio v-model="curQueItem.judge" :label="false">错误</el-radio>
-      </div>
-      <div class="Big-Book-top" v-if="curQue.ChildType == 'sentence_answer'">
-        <span>答案</span>
-        <el-input
-          type="textarea"
-          autosize
-          placeholder="请输入答案"
-          v-model="curQueItem.answer"
-          @blur="onBlur(curQueItem, 'answer')"
-        ></el-input>
-      </div>
-      <div class="Big-Book-top" v-if="curQue.ChildType == 'sentence_Record'">
-        <img src="../../../assets/adult/mini.png" alt="" />
-      </div>
-    </template>
-    <template v-else>
-      <div class="Big-Book-top">
-        <img src="../../../assets/adult/mini.png" alt="" />
-
-      </div>
-    </template>
-    <div class="Big-Book-mp3">
+    <div class="Big-Book-top" v-if="curQue.ChildType == 'sentence_answer'">
+      <span>答案</span>
+      <el-input
+        type="textarea"
+        autosize
+        placeholder="请输入答案"
+        v-model="curQueItem.answer"
+        @blur="onBlur(curQueItem, 'answer')"
+      ></el-input>
+    </div>
+    <div class="Big-Book-top">
+      <img src="../../../assets/adult/pro-plus.png" alt="" />
+    </div>
+    <!-- <div class="Big-Book-mp3">
       <span>音频</span>
       <Upload
         :changeFillId="changeMp3"
@@ -63,7 +50,7 @@
         :filleNumber="mp3Number"
         :uploadType="'mp3'"
       />
-    </div>
+    </div> -->
   </div>
 </template>
 
@@ -234,7 +221,7 @@ export default {
     }
     .deleteOptionBox {
       width: 40px;
-      height: 40px;
+      height: 33px;
       display: flex;
       justify-content: center;
       align-items: center;
@@ -253,7 +240,7 @@ export default {
       }
     }
   }
-  &-HzModule {
+  &-SentenceModule {
     // display: flex;
     // justify-content: flex-start;
     // align-items: center;
@@ -266,7 +253,6 @@ export default {
       > span {
         line-height: 32px;
         font-size: 14px;
-        margin-right: 10px;
       }
     }
   }
@@ -285,16 +271,16 @@ export default {
 }
 </style>
 <style lang="scss">
-.Big-Book-HzModule {
+.Big-Book-SentenceModule {
   .el-textarea {
     width: 400px;
-    margin-right: 15px;
+    // margin-right: 15px;
   }
 }
 .Big-Book-input {
   .el-textarea {
     width: 160px;
-    margin-right: 15px;
+    // margin-right: 15px;
   }
 }
 </style>

+ 850 - 853
src/components/Adult/common/data.js

@@ -1,914 +1,911 @@
 let fnData = [{
-  type: "article_chs",
-  name: "课文",
-}, {
-  type: "dialog_article_chs",
-  name: "对话课文",
-},
-{
-  type: "NewWord_chs",
-  name: "生词",
-},
-{
-  type: "notes_chs",
-  name: "注释",
-
-}, {
-  type: "voice_matrix",
-  name: "语音矩阵",
-}, {
-  type: "divider",
-  name: "分割线",
-  data_structure: {
-    type: 'divider',
-    name: "分割线",
-  }
-},
-{
-  type: "text",
-  name: "文本描述",
-  data_structure: {
-    type: 'text',
-    name: "文本描述",
-    con: '',
-    pinyin: '',
-    english: '',
-    img_list: [],
-    mp3_list: []
-  }
-},
-{
-  type: "single",
-  name: "单选题",
-  data_structure: {
-    type: 'single',
-    name: "单选题",
-    title: "",
-    option: [{
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ""
+        type: "article_chs",
+        name: "课文",
+    }, {
+        type: "dialog_article_chs",
+        name: "对话课文",
     },
     {
-      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: "checkbox",
-  name: "多选题",
-  data_structure: {
-    type: 'checkbox',
-    name: "多选题",
-    title: "",
-    option: [{
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
+        type: "NewWord_chs",
+        name: "生词",
     },
     {
-      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",
-  name: "判断题",
-  data_structure: {
-    type: 'judge',
-    name: "判断题",
-    title: "",
-    con: '',
-    pinyin: '',
-    img_list: [],
-    mp3_list: [],
-    judge: ''
-  }
-},
-{
-  type: "multiRowInput",
-  name: "多行文本题",
-  data_structure: {
-    type: 'multiRowInput',
-    name: "多行文本题",
-    title: "",
-    con: [{
-      con: '',
-      annotation: "", //注释
-    }],
-    pinyin: '',
-    img_list: [],
-    mp3_list: [],
-    fn_list: [{
-      type: 'astrictNumber',
-      name: '限制字数',
-      isFn: false,
-    },],
-  }
-},
-{
-  type: "singleRowInput",
-  name: "单行文本题",
-  data_structure: {
-    type: 'singleRowInput',
-    name: "单行文本题",
-    title: "",
-
-    con: [{
-      con: '',
-      annotation: "", //注释
-    }],
-    pinyin: '',
-    img_list: [],
-    mp3_list: [],
-    fn_list: [{
-      type: 'astrictNumber',
-      name: '限制字数',
-      isFn: false,
-    },],
-  }
-},
-{
-  type: "hanzi",
-  name: "汉字模版",
-  data_structure: {
-    type: 'hanzi',
-    name: "汉字模版",
-    title: "",
-    option: [{
-      hanzi: '',
-      pinyin: '',
-      mp3_list: [],
-      img_list: [],
-      definition_list: [''],
-      isAnswer: '',
-      isChecked: '',
-      isJudge: '',
-      correctInput: ''
-    }],
+        type: "notes_chs",
+        name: "注释",
 
-    correct: [{
-      single: [],
-      checkBox: [],
-      judge: [],
-      input: [],
-      spell: []
-    }],
-    fn_list: [{
-      type: 'def',
-      name: '更多释义',
-      isFn: false,
-      isDisable: false,
+    }, {
+        type: "voice_matrix",
+        name: "语音矩阵",
+    }, {
+        type: "divider",
+        name: "分割线",
+        data_structure: {
+            type: 'divider',
+            name: "分割线",
+        }
     },
     {
-      type: 'record',
-      name: '跟读',
-      isFn: false,
-      isDisable: false,
+        type: "text",
+        name: "文本描述",
+        data_structure: {
+            type: 'text',
+            name: "文本描述",
+            con: '',
+            pinyin: '',
+            english: '',
+            img_list: [],
+            mp3_list: []
+        }
     },
     {
-      type: 'spell',
-      name: '拼写',
-      isFn: false,
-      isDisable: false,
+        type: "single",
+        name: "单选题",
+        data_structure: {
+            type: 'single',
+            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: 'input',
-      name: '输入',
-      isFn: false,
-      isDisable: false,
+        type: "checkbox",
+        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: 'copy',
-      name: '摹写',
-      isFn: false,
-      isDisable: false,
+        type: "judge",
+        name: "判断题",
+        data_structure: {
+            type: 'judge',
+            name: "判断题",
+            title: "",
+            con: '',
+            pinyin: '',
+            img_list: [],
+            mp3_list: [],
+            judge: ''
+        }
     },
     {
-      type: 'single',
-      name: '单选',
-      isFn: false,
-      isDisable: false,
-    }, {
-      type: 'checkBox',
-      name: '多选',
-      isFn: false,
-      isDisable: false,
-    }, {
-      type: 'judge',
-      name: '判断',
-      isFn: false,
-      isDisable: false,
-    },
-    ]
-  },
-},
-{
-  type: "image",
-  name: "图片控件",
-  list: [{
-    type: 'image_checkBox',
-    name: "图片多选",
-  },
-  {
-    type: 'image_judge',
-    name: "图片判断",
-  },
-  {
-    type: 'image_single',
-    name: "图片单选",
-  },
-  {
-    type: 'image_dobleinput',
-    name: "双输入",
-  },
-  {
-    type: 'image_gdcy',
-    name: "固定词语",
-  },
-  {
-    type: 'image_wordInput',
-    name: "单词+输入",
-  },
-  {
-    type: "imgage_image",
-    name: "纯图片",
-  },
-  ],
-  data_structure: {
-    type: 'image',
-    name: "图片控件",
-    title: "",
-    option: [{
-      hanzi: '',
-      pinyin: '',
-      mp3_list: [],
-      img_list: [],
-      isAnswer: '',
-      isChecked: '',
-      isJudge: '',
-      correctInput: '',
-    }],
-    correct: [{
-      single: [],
-      checkBox: [],
-      judge: [],
-      input: [],
-      spell: []
-    }],
-    fn_list: [{
-      type: 'image_record',
-      name: '跟读',
-      isFn: false,
-      isDisable: false,
+        type: "multiRowInput",
+        name: "多行文本题",
+        data_structure: {
+            type: 'multiRowInput',
+            name: "多行文本题",
+            title: "",
+            con: [{
+                con: '',
+                annotation: "", //注释
+            }],
+            pinyin: '',
+            img_list: [],
+            mp3_list: [],
+            fn_list: [{
+                type: 'astrictNumber',
+                name: '限制字数',
+                isFn: false,
+            }, ],
+        }
     },
     {
-      type: 'image_spell',
-      name: '拼写',
-      isFn: false,
-      isDisable: false,
+        type: "singleRowInput",
+        name: "单行文本题",
+        data_structure: {
+            type: 'singleRowInput',
+            name: "单行文本题",
+            title: "",
+
+            con: [{
+                con: '',
+                annotation: "", //注释
+            }],
+            pinyin: '',
+            img_list: [],
+            mp3_list: [],
+            fn_list: [{
+                type: 'astrictNumber',
+                name: '限制字数',
+                isFn: false,
+            }, ],
+        }
     },
     {
-      type: 'image_input',
-      name: '输入',
-      isFn: false,
-      isDisable: false,
+        type: "hanzi",
+        name: "汉字模版",
+        data_structure: {
+            type: 'hanzi',
+            name: "汉字模版",
+            title: "",
+            option: [{
+                hanzi: '',
+                pinyin: '',
+                mp3_list: [],
+                img_list: [],
+                definition_list: [''],
+                isAnswer: '',
+                isChecked: '',
+                isJudge: '',
+                correctInput: ''
+            }],
+
+            correct: [{
+                single: [],
+                checkBox: [],
+                judge: [],
+                input: [],
+                spell: []
+            }],
+            fn_list: [{
+                    type: 'def',
+                    name: '更多释义',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'record',
+                    name: '跟读',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'spell',
+                    name: '拼写',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'input',
+                    name: '输入',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'copy',
+                    name: '摹写',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'single',
+                    name: '单选',
+                    isFn: false,
+                    isDisable: false,
+                }, {
+                    type: 'checkBox',
+                    name: '多选',
+                    isFn: false,
+                    isDisable: false,
+                }, {
+                    type: 'judge',
+                    name: '判断',
+                    isFn: false,
+                    isDisable: false,
+                },
+            ]
+        },
     },
     {
-      type: 'image_dobleinput',
-      name: '双输入',
-      isFn: false,
-      isDisable: false,
+        type: "image",
+        name: "图片控件",
+        list: [{
+                type: 'image_checkBox',
+                name: "图片多选",
+            },
+            {
+                type: 'image_judge',
+                name: "图片判断",
+            },
+            {
+                type: 'image_single',
+                name: "图片单选",
+            },
+            {
+                type: 'image_dobleinput',
+                name: "双输入",
+            },
+            {
+                type: 'image_gdcy',
+                name: "固定词语",
+            },
+            {
+                type: 'image_wordInput',
+                name: "单词+输入",
+            },
+            {
+                type: "imgage_image",
+                name: "纯图片",
+            },
+        ],
+        data_structure: {
+            type: 'image',
+            name: "图片控件",
+            title: "",
+            option: [{
+                hanzi: '',
+                pinyin: '',
+                mp3_list: [],
+                img_list: [],
+                isAnswer: '',
+                isChecked: '',
+                isJudge: '',
+                correctInput: '',
+            }],
+            correct: [{
+                single: [],
+                checkBox: [],
+                judge: [],
+                input: [],
+                spell: []
+            }],
+            fn_list: [{
+                    type: 'image_record',
+                    name: '跟读',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'image_spell',
+                    name: '拼写',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'image_input',
+                    name: '输入',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'image_dobleinput',
+                    name: '双输入',
+                    isFn: false,
+                    isDisable: false,
+                },
+                {
+                    type: 'image_single',
+                    name: '单选',
+                    isFn: false,
+                    isDisable: false,
+                }, {
+                    type: 'image_checkBox',
+                    name: '多选',
+                    isFn: false,
+                    isDisable: false,
+                }, {
+                    type: 'image_judge',
+                    name: '判断',
+                    isFn: false,
+                    isDisable: false,
+                },
+            ],
+            numberList: {
+                type: "number",
+                name: "每行几个",
+                con: "2",
+                arr: [{
+                        id: 1,
+                        value: 1,
+                    }, {
+                        id: 2,
+                        value: 2,
+
+                    }, {
+                        id: 3,
+                        value: 3,
+                    },
+                    {
+                        id: 4,
+                        value: 4,
+                    },
+                ]
+            }
+        },
     },
+
     {
-      type: 'image_single',
-      name: '单选',
-      isFn: false,
-      isDisable: false,
-    }, {
-      type: 'image_checkBox',
-      name: '多选',
-      isFn: false,
-      isDisable: false,
-    }, {
-      type: 'image_judge',
-      name: '判断',
-      isFn: false,
-      isDisable: false,
+        type: "audio_control",
+        name: "音频控制条",
+        data_structure: {
+            type: 'audio_control',
+            name: "音频控制条",
+            option: [{
+                xuhao: '',
+                yinbiao: '',
+                img_list: [],
+                mp3_list: [],
+                isAnswer: ''
+            }, ],
+        }
     },
-    ],
-    numberList: {
-      type: "number",
-      name: "每行几个",
-      con: "2",
-      arr: [{
-        id: 1,
-        value: 1,
-      }, {
-        id: 2,
-        value: 2,
-
-      }, {
-        id: 3,
-        value: 3,
-      },
-      {
-        id: 4,
-        value: 4,
-      },
-      ]
-    }
-  },
-},
-
-{
-  type: "audio_control",
-  name: "音频控制条",
-  data_structure: {
-    type: 'audio_control',
-    name: "音频控制条",
-    option: [{
-      xuhao: '',
-      yinbiao: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    },],
-  }
-},
-{
-  type: "audio_control_easy",
-  name: "音频控制条-简易",
-  data_structure: {
-    type: 'audio_control_easy',
-    name: "音频控制条-简易",
-    option: [{
-      xuhao: '',
-      yinbiao: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    },],
-  }
-},
-{
-  type: "input_record",
-  name: "输入+录音",
-  data_structure: {
-    type: 'input_record',
-    name: "输入+录音",
-    title: "",
-    option: [{
-      con: "", //标题
-      answer: "", //答案
-      record: false, //需要录音
-      mp3_list: [],
-    },],
-  }
-},
-{
-  type: "switch_control",
-  name: "开关控件",
-  data_structure: {
-    type: 'switch_control',
-    name: "开关控件",
-    con: "",
-    option: [{
-      con: "", //标题
-      answer: "", //答案
-      record: false, //需要录音
-      mp3_list: [],
-    },],
-  }
-},
-{
-  type: "record_control",
-  name: "录音控件",
-  list: [{
-    type: 'record_control_mini',
-    name: "录音控件-mini",
-  },
-  {
-    type: 'record_control_normal',
-    name: "录音控件-normal",
-  },
-  {
-    type: 'record_control_pro',
-    name: "录音控件-pro",
-  },
-  {
-    type: 'record_control_promax',
-    name: "录音控件-promax",
-  },
-  ],
-  data_structure: {
-    type: 'record_control',
-    name: "录音控件",
-    option: [{
-      hanzi: '',
-      pinyin: '',
-      mp3_list: [],
-      img_list: [],
-      isAnswer: '',
-      isChecked: '',
-      isJudge: '',
-      correctInput: '',
-    }],
-  },
-},
-{
-  type: "pure_input",
-  name: "纯输入",
-  data_structure: {
-    type: 'pure_input',
-    name: "纯输入",
-    option: [{
-      answer: "",
-    },],
-    answer: "",
-    record: false, //需要录音
-    mp3_list: [],
-  }
-},
-{
-  type: "matrixSingle",
-  name: "矩阵单选",
-  data_structure: {
-    type: 'matrixSingle',
-    name: "矩阵单选",
-    title: "",
-    con: [{
-      con: "",
-      Answer: "",
+    {
+        type: "audio_control_easy",
+        name: "音频控制条-简易",
+        data_structure: {
+            type: 'audio_control_easy',
+            name: "音频控制条-简易",
+            option: [{
+                xuhao: '',
+                yinbiao: '',
+                img_list: [],
+                mp3_list: [],
+                isAnswer: ''
+            }, ],
+        }
     },
     {
-      con: "",
-      Answer: "",
+        type: "input_record_chs",
+        name: "输入+录音",
     },
-    ],
-    option: [{
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
+    {
+        type: "recordHZ_inputPY_chs",
+        name: "读汉字写拼音",
     },
+    // {
+    //     type: "inputItem_chs",
+    //     name: "输入选项",
+    // },
     {
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    }
-    ],
-    correct: ["", ""]
-  }
-},
-{
-  type: "matrixChckbox",
-  name: "矩阵多选",
-  data_structure: {
-    type: 'matrixChckbox',
-    name: "矩阵多选",
-    title: "",
-
-    con: [{
-      con: "",
-      AnswerList: [],
+        type: "switch_control",
+        name: "开关控件",
+        data_structure: {
+            type: 'switch_control',
+            name: "开关控件",
+            con: "",
+            option: [{
+                con: "", //标题
+                answer: "", //答案
+                record: false, //需要录音
+                mp3_list: [],
+            }, ],
+        }
     },
     {
-      type: "matrixChekbox",
-      name: "矩阵多选",
-      data_structure: {
-        type: 'matrixChekbox',
-        name: "矩阵多选",
-        con: [{
-          con: "",
-          AnswerList: [],
-        },
-        {
-          con: "",
-          AnswerList: [],
-        },
+        type: "record_control",
+        name: "录音控件",
+        list: [{
+                type: 'record_control_mini',
+                name: "录音控件-mini",
+            },
+            {
+                type: 'record_control_normal',
+                name: "录音控件-normal",
+            },
+            {
+                type: 'record_control_pro',
+                name: "录音控件-pro",
+            },
+            {
+                type: 'record_control_promax',
+                name: "录音控件-promax",
+            },
         ],
-        option: [{
-          con: '',
-          pinyin: '',
-          img_list: [],
-          mp3_list: [],
-          isAnswer: ''
+        data_structure: {
+            type: 'record_control',
+            name: "录音控件",
+            option: [{
+                hanzi: '',
+                pinyin: '',
+                mp3_list: [],
+                img_list: [],
+                isAnswer: '',
+                isChecked: '',
+                isJudge: '',
+                correctInput: '',
+            }],
         },
-        {
-          con: '',
-          pinyin: '',
-          img_list: [],
-          mp3_list: [],
-          isAnswer: ''
-        }
-        ],
-        correct: [
-          [],
-          []
-        ]
-      }
     },
-
-    {
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    }
-    ],
-    correct: [
-      [],
-      []
-    ]
-  }
-},
-{
-  type: "sentence",
-  name: "句子模板",
-  list: [
-
     {
-      type: "sentence_answer",
-      name: "句子填空",
+        type: "pure_input",
+        name: "纯输入",
+        data_structure: {
+            type: 'pure_input',
+            name: "纯输入",
+            option: [{
+                answer: "",
+            }, ],
+            answer: "",
+            record: false, //需要录音
+            mp3_list: [],
+        }
     },
     {
-      type: "sentence_judge",
-      name: "句子判断",
+        type: "matrixSingle",
+        name: "矩阵单选",
+        data_structure: {
+            type: 'matrixSingle',
+            name: "矩阵单选",
+            title: "",
+            con: [{
+                    con: "",
+                    Answer: "",
+                },
+                {
+                    con: "",
+                    Answer: "",
+                },
+            ],
+            option: [{
+                    con: '',
+                    pinyin: '',
+                    img_list: [],
+                    mp3_list: [],
+                    isAnswer: ''
+                },
+                {
+                    con: '',
+                    pinyin: '',
+                    img_list: [],
+                    mp3_list: [],
+                    isAnswer: ''
+                }
+            ],
+            correct: ["", ""]
+        }
     },
     {
-      type: "sentence_Record",
-      name: "句子录音",
-    },
-  ],
-  data_structure: {
-    type: "sentence",
-    name: "句子模板",
-    title: "",
-    option: [{
-      mp3_list: [],
-      number: "",
-      con: "",
-      answer: "",
-      judge: true,
-    }],
-    fn_list: [{
-      type: 'record',
-      name: '录音',
-      isFn: false,
+        type: "matrixChckbox",
+        name: "矩阵多选",
+        data_structure: {
+            type: 'matrixChckbox',
+            name: "矩阵多选",
+            title: "",
+
+            con: [{
+                    con: "",
+                    AnswerList: [],
+                },
+                {
+                    type: "matrixChekbox",
+                    name: "矩阵多选",
+                    data_structure: {
+                        type: 'matrixChekbox',
+                        name: "矩阵多选",
+                        con: [{
+                                con: "",
+                                AnswerList: [],
+                            },
+                            {
+                                con: "",
+                                AnswerList: [],
+                            },
+                        ],
+                        option: [{
+                                con: '',
+                                pinyin: '',
+                                img_list: [],
+                                mp3_list: [],
+                                isAnswer: ''
+                            },
+                            {
+                                con: '',
+                                pinyin: '',
+                                img_list: [],
+                                mp3_list: [],
+                                isAnswer: ''
+                            }
+                        ],
+                        correct: [
+                            [],
+                            []
+                        ]
+                    }
+                },
+
+                {
+                    con: '',
+                    pinyin: '',
+                    img_list: [],
+                    mp3_list: [],
+                    isAnswer: ''
+                }
+            ],
+            correct: [
+                [],
+                []
+            ]
+        }
     },
     {
-      type: 'input',
-      name: '输入',
-      isFn: false,
+        type: "sentence",
+        name: "句子模板",
+        list: [
+
+            {
+                type: "sentence_answer",
+                name: "句子填空",
+            },
+            {
+                type: "sentence_judge",
+                name: "句子判断",
+            },
+            {
+                type: "sentence_Record",
+                name: "句子录音",
+            },
+        ],
+        data_structure: {
+            type: "sentence",
+            name: "句子模板",
+            title: "",
+            option: [{
+                mp3_list: [],
+                number: "",
+                con: "",
+                answer: "",
+                judge: true,
+            }],
+            fn_list: [{
+                    type: 'record',
+                    name: '录音',
+                    isFn: false,
+                },
+                {
+                    type: 'input',
+                    name: '输入',
+                    isFn: false,
+                },
+                {
+                    type: 'judge',
+                    name: '判断',
+                    isFn: false,
+                },
+            ],
+        },
     },
     {
-      type: 'judge',
-      name: '判断',
-      isFn: false,
-    },
-    ],
-  },
-},
-{
-  type: "text_input_RecoedItem",
-  name: "文字+录入+录音条",
-  data_structure: {
-    type: "text_input_RecoedItem",
-    name: "文字+录入+录音条",
-    title: "",
-    option: [{
-      number: "",
-      con: "",
-      answer: "",
-    },]
-  },
-},
-{
-  type: "dialogue",
-  name: "对话题",
-  data_structure: {
-    type: 'dialogue',
-    name: "对话题",
-    title: "",
-    option: [{
-      roleName: "",
-      site: "left",
-      con: '',
-      number: "",
-      isRecord: "", //是否需要录音
-      mp3_list: [],
-      img_list: [],
-      definition_list: [],
-      AnswerList: [""],
-      isAnswer: '',
-      isChecked: '',
-      judge: '',
-      correctInput: ''
+        type: "text_input_RecoedItem",
+        name: "文字+录入+录音条",
+        data_structure: {
+            type: "text_input_RecoedItem",
+            name: "文字+录入+录音条",
+            title: "",
+            option: [{
+                number: "",
+                con: "",
+                answer: "",
+            }, ]
+        },
     },
     {
-      roleName: "",
-      site: "left",
-      con: '',
-      number: "",
-      isRecord: "", //是否需要录音
-      mp3_list: [],
-      img_list: [],
-      definition_list: [],
-      AnswerList: [""],
-      isAnswer: '',
-      isChecked: '',
-      judge: '',
-      correctInput: ''
-    },
-    ],
-    fn_list: [
-      // {
-      //       type: 'def',
-      //       name: '更多释义',
-      //       isFn: false,
-      //   },
-      {
-        type: 'record',
-        name: '跟读',
-        isFn: false,
-      },
-      // {
-      //     type: 'spell',
-      //     name: '拼写',
-      //     isFn: false,
-      // },
-      {
-        type: 'input',
-        name: '输入',
-        isFn: false,
-      },
-      // {
-      //     type: 'copy',
-      //     name: '摹写',
-      //     isFn: false,
-      // },
-      // {
-      //     type: 'single',
-      //     name: '单选',
-      //     isFn: false,
-      // }, {
-      //     type: 'checkout',
-      //     name: '多选',
-      //     isFn: false,
-      // }, {
-      //     type: 'judge',
-      //     name: '判断',
-      //     isFn: false,
-      // },
-    ],
-    correct: [{
-      input: ["", ""],
-    }]
-  },
-},
-{
-  type: "ligature",
-  name: "连线",
-  data_structure: {
-    type: 'ligature',
-    name: "连线",
-    title: "",
-    con: [{
-      hanzi: '',
-      Number: '',
-      mp3_list: [],
-      img_list: [],
-      definition_list: [],
-      Answer: "",
-      isAnswer: '',
-      isChecked: '',
-      judge: '',
-      correctInput: '',
-      AnswerList: [],
+        type: "dialogue",
+        name: "对话题",
+        data_structure: {
+            type: 'dialogue',
+            name: "对话题",
+            title: "",
+            option: [{
+                    roleName: "",
+                    site: "left",
+                    con: '',
+                    number: "",
+                    isRecord: "", //是否需要录音
+                    mp3_list: [],
+                    img_list: [],
+                    definition_list: [],
+                    AnswerList: [""],
+                    isAnswer: '',
+                    isChecked: '',
+                    judge: '',
+                    correctInput: ''
+                },
+                {
+                    roleName: "",
+                    site: "left",
+                    con: '',
+                    number: "",
+                    isRecord: "", //是否需要录音
+                    mp3_list: [],
+                    img_list: [],
+                    definition_list: [],
+                    AnswerList: [""],
+                    isAnswer: '',
+                    isChecked: '',
+                    judge: '',
+                    correctInput: ''
+                },
+            ],
+            fn_list: [
+                // {
+                //       type: 'def',
+                //       name: '更多释义',
+                //       isFn: false,
+                //   },
+                {
+                    type: 'record',
+                    name: '跟读',
+                    isFn: false,
+                },
+                // {
+                //     type: 'spell',
+                //     name: '拼写',
+                //     isFn: false,
+                // },
+                {
+                    type: 'input',
+                    name: '输入',
+                    isFn: false,
+                },
+                // {
+                //     type: 'copy',
+                //     name: '摹写',
+                //     isFn: false,
+                // },
+                // {
+                //     type: 'single',
+                //     name: '单选',
+                //     isFn: false,
+                // }, {
+                //     type: 'checkout',
+                //     name: '多选',
+                //     isFn: false,
+                // }, {
+                //     type: 'judge',
+                //     name: '判断',
+                //     isFn: false,
+                // },
+            ],
+            correct: [{
+                input: ["", ""],
+            }]
+        },
     },
     {
-      hanzi: '',
-      Number: '',
-      mp3_list: [],
-      img_list: [],
-      definition_list: [],
-      Answer: "",
-      isAnswer: '',
-      isChecked: '',
-      judge: '',
-      correctInput: '',
-      AnswerList: [],
+        type: "ligature",
+        name: "连线",
+        data_structure: {
+            type: 'ligature',
+            name: "连线",
+            title: "",
+            con: [{
+                    hanzi: '',
+                    Number: '',
+                    mp3_list: [],
+                    img_list: [],
+                    definition_list: [],
+                    Answer: "",
+                    isAnswer: '',
+                    isChecked: '',
+                    judge: '',
+                    correctInput: '',
+                    AnswerList: [],
+                },
+                {
+                    hanzi: '',
+                    Number: '',
+                    mp3_list: [],
+                    img_list: [],
+                    definition_list: [],
+                    Answer: "",
+                    isAnswer: '',
+                    isChecked: '',
+                    judge: '',
+                    correctInput: '',
+                    AnswerList: [],
 
-    },
-    ],
-    option: [{
-      roleName: "",
-      site: "left",
-      hanzi: '',
-      pinyin: '',
-      mp3_list: [],
-      img_list: [],
-      definition_list: [],
-      Answer: "",
-      isAnswer: '',
-      isChecked: '',
-      judge: '',
-      correctInput: ''
+                },
+            ],
+            option: [{
+                    roleName: "",
+                    site: "left",
+                    hanzi: '',
+                    pinyin: '',
+                    mp3_list: [],
+                    img_list: [],
+                    definition_list: [],
+                    Answer: "",
+                    isAnswer: '',
+                    isChecked: '',
+                    judge: '',
+                    correctInput: ''
+                },
+                {
+                    roleName: "",
+                    site: "left",
+                    hanzi: '',
+                    pinyin: '',
+                    mp3_list: [],
+                    img_list: [],
+                    definition_list: [],
+                    Answer: "",
+                    isAnswer: '',
+                    isChecked: '',
+                    judge: '',
+                    correctInput: ''
+                },
+            ],
+            correct: [{
+                input: ["", ""],
+            }]
+        },
     },
     {
-      roleName: "",
-      site: "left",
-      hanzi: '',
-      pinyin: '',
-      mp3_list: [],
-      img_list: [],
-      definition_list: [],
-      Answer: "",
-      isAnswer: '',
-      isChecked: '',
-      judge: '',
-      correctInput: ''
+        type: "record",
+        name: "录音题",
+        data_structure: {
+            type: "record",
+            name: "录音题",
+            title: "",
+            option: [{
+                mp3_list: [],
+                con: "",
+                value: "",
+            }, ]
+        }
     },
-    ],
-    correct: [{
-      input: ["", ""],
-    }]
-  },
-},
-{
-  type: "record",
-  name: "录音题",
-  data_structure: {
-    type: "record",
-    name: "录音题",
-    title: "",
-    option: [{
-      mp3_list: [],
-      con: "",
-      value: "",
-    },]
-  }
-},
-{
-  type: "hearRecord",
-  name: "听录音题",
-  data_structure: {
-    type: "hearRecord",
-    name: "听录音题",
+    {
+        type: "hearRecord",
+        name: "听录音题",
+        data_structure: {
+            type: "hearRecord",
+            name: "听录音题",
 
-    title: "",
-    option: [{
-      mp3_list: [],
-      con: "",
-      value: "",
-    },]
-  }
-},
-// {
-//     type: "sort",
-//     name: "排序题",
-// },
-// {
-//     type: "blank",
-//     name: "填空题",
-// },
-// {
-//     type: "annex",
-//     name: "附件题",
-// },
-// {
-//     type: "dropdown",
-//     name: "下拉题",
-// },
-// {
-//     type: "drawing",
-//     name: "画图题",
-// },
-{
-  type: "upload_control",
-  name: "上传控件",
-  data_structure: {
-    type: "upload_control",
-    name: "上传控件",
-    uploadType: "",
-    list: [{
-      name: "图片",
+            title: "",
+            option: [{
+                mp3_list: [],
+                con: "",
+                value: "",
+            }, ]
+        }
     },
+    // {
+    //     type: "sort",
+    //     name: "排序题",
+    // },
+    // {
+    //     type: "blank",
+    //     name: "填空题",
+    // },
+    // {
+    //     type: "annex",
+    //     name: "附件题",
+    // },
+    // {
+    //     type: "dropdown",
+    //     name: "下拉题",
+    // },
+    // {
+    //     type: "drawing",
+    //     name: "画图题",
+    // },
     {
-      name: "pdf",
+        type: "upload_control",
+        name: "上传控件",
+        data_structure: {
+            type: "upload_control",
+            name: "上传控件",
+            uploadType: "",
+            list: [{
+                    name: "图片",
+                },
+                {
+                    name: "pdf",
+                },
+                {
+                    name: "其它",
+                },
+            ]
+        }
     },
     {
-      name: "其它",
-    },
-    ]
-  }
-},
-{
-  type: "text_item",
-  name: "文本条",
-  data_structure: {
-    type: "text_item",
-    name: "文本条",
-    title: "",
-    option: [{
-      number: "",
-      con: "",
-    }],
-    numberList: {
-      type: "number",
-      name: "每行几个",
-      con: "2",
-      arr: [{
-        id: 1,
-        value: 1,
-      }, {
-        id: 2,
-        value: 2,
+        type: "text_item",
+        name: "文本条",
+        data_structure: {
+            type: "text_item",
+            name: "文本条",
+            title: "",
+            option: [{
+                number: "",
+                con: "",
+            }],
+            numberList: {
+                type: "number",
+                name: "每行几个",
+                con: "2",
+                arr: [{
+                        id: 1,
+                        value: 1,
+                    }, {
+                        id: 2,
+                        value: 2,
 
-      }, {
-        id: 3,
-        value: 3,
-      },
-      {
-        id: 4,
-        value: 4,
-      },
-      ]
-    }
-  }
-},
-{
-  type: "bg_control",
-  name: "背景图控件",
-  data_structure: {
-    type: 'bg_control',
-    name: "背景图控件",
-    img_list: [],
-  }
-},
+                    }, {
+                        id: 3,
+                        value: 3,
+                    },
+                    {
+                        id: 4,
+                        value: 4,
+                    },
+                ]
+            }
+        }
+    },
+    {
+        type: "bg_control",
+        name: "背景图控件",
+        data_structure: {
+            type: 'bg_control',
+            name: "背景图控件",
+            img_list: [],
+        }
+    },
 ]
 
 

+ 41 - 9
src/components/Adult/inputModules/InputRecord.vue

@@ -5,6 +5,16 @@
       src="../../../assets/adult/maikefeng-red.png"
       class="Big-Book-Record-icon"
     /> -->
+    <div class="Big-Book-con">
+                <span>标题:</span>           <el-input
+        style="width: 300px"
+        type="textarea"
+        autosize
+        placeholder="请输入标题"
+        v-model="curQue.title"
+        @blur="curQue.title = curQue.title.trim()"
+      ></el-input>
+    </div>
     <div
       class="Big-Book-hanzi-option"
       v-for="(item, index) in curQue.option"
@@ -18,12 +28,7 @@
         :deleteOptionOne="deleteOptionOne"
       />
     </div>
-    <div
-      class="addoption"
-      @click="addOption"
-    >
-      添加题目
-    </div>
+    <div class="addoption" @click="addOption">添加题目</div>
   </div>
 </template>
 
@@ -32,9 +37,23 @@ import InputRecordModule from "../common/InputRecordModule.vue";
 
 export default {
   components: { InputRecordModule },
-  props: ["curQue", "fn_data"],
+  props: ["curQue", "fn_data", "changeCurQue"],
   data() {
-    return {};
+    return {
+      data_structure: {
+        type: "input_record_chs",
+        name: "输入+录音",
+        title: "",
+        option: [
+          {
+            con: "", //标题
+            answer: "", //答案
+            record: false, //需要录音
+            mp3_list: [],
+          },
+        ],
+      },
+    };
   },
   computed: {},
   watch: {},
@@ -61,9 +80,18 @@ export default {
       }
       this.curQue.option.splice(index, 1);
     },
+    initcurQue() {
+      let data = JSON.parse(JSON.stringify(this.data_structure));
+      this.changeCurQue(data)
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() {
+    console.log(this.curQue);
+    if(!this.curQue){
+      this.initcurQue()
+    }
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前
@@ -98,5 +126,9 @@ export default {
     font-size: 14px;
     color: #000000;
   }
+  .Big-Book-con {
+    display: flex;
+    align-items: center;
+  }
 }
 </style>

+ 36 - 43
src/components/Adult/inputModules/Sentence.vue

@@ -1,27 +1,20 @@
 <!--  -->
 <template>
-  <div class="Big-Book-Single">
+  <div class="Big-Book-sentence">
     <div
       class="Big-Book-Single-content"
       style="margin-left: 50px; margin-top: 20px"
     >
-      <div class="Big-Book-top">
+      <div class="Big-Book-con">
         <span>标题</span>
         <el-input
+          style="width: 300px"
           type="textarea"
           autosize
           placeholder="请输入标题"
           v-model="curQue.title"
           @blur="onBlur(curQue, 'title')"
         ></el-input>
-        <div class="deleteOptionBox">
-          <img
-            @click="deleteOption"
-            class="close"
-            src="../../../assets/adult/del-close.png"
-            alt=""
-          />
-        </div>
       </div>
       <div
         class="Big-Book-main"
@@ -39,18 +32,6 @@
       <div class="Big-Book-addrole">
         <div class="addoption" @click="addOption">添加一个</div>
       </div>
-      <div class="Big-Book-divide" v-if="curQue.type == 'sentence'">
-        <el-divider content-position="center">功能设置</el-divider>
-      </div>
-      <div>
-        <el-checkbox-group v-model="checkList" @change="handleCheckedFnChange">
-          <el-checkbox
-            v-for="(fnItem, fnIndex) in curQue.fn_list"
-            :key="'fn_list' + fnItem.type + fnIndex"
-            :label="fnItem.name"
-          ></el-checkbox>
-        </el-checkbox-group>
-      </div>
     </div>
   </div>
 </template>
@@ -60,7 +41,7 @@ import SentenceModule from "../common/SentenceModule.vue";
 
 export default {
   name: "Single",
-  props: ["curQue", "fn_data"],
+  props: ["curQue", "fn_data", "changeCurQue"],
   components: {
     SentenceModule,
   },
@@ -78,6 +59,18 @@ export default {
           mp3_url: [],
         },
       },
+      data_structure: {
+        type: "recordHZ_inputPY_chs",
+        name: "读汉字写拼音",
+        title: "",
+        option: [
+          {
+            number: "",
+            con: "",
+            answer: "",
+          },
+        ],
+      },
     };
   },
   computed: {},
@@ -109,10 +102,7 @@ export default {
       //   this.$message.warning("数据不能全是空");
       //   return;
       // }
-      let type = this.curQue.type;
-      let cur_fn_data_arr = this.fn_data.filter((item) => item.type == type);
-      let cur_fn_data = JSON.parse(JSON.stringify(cur_fn_data_arr[0]));
-      let obj = cur_fn_data.data_structure.option[0];
+      let obj = this.data_structure.option[0];
       this.curQue.option.push(obj);
     },
     // 更多配置选择
@@ -131,22 +121,15 @@ export default {
       //     return item;
       //   });
     },
+    initcurQue() {
+      let data = JSON.parse(JSON.stringify(this.data_structure));
+      this.changeCurQue(data);
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    this.curQue.fn_list.forEach((item) => {
-      if (item.isFn) {
-        this.checkList.push(item.name);
-      }
-    });
-    if (this.curQue.ChildType == "sentence_answer") {
-      this.checkList.push("输入");
-    }
-    if (this.curQue.ChildType == "sentence_judge") {
-      this.checkList.push("判断");
-    }
-    if (this.curQue.ChildType == "sentence_Record") {
-      this.checkList.push("录音");
+    if (!this.curQue) {
+      this.initcurQue();
     }
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
@@ -162,7 +145,7 @@ export default {
 </script>
 <style lang='scss' scope>
 //@import url(); 引入公共css类
-.Big-Book-Single {
+.Big-Book-sentence {
   &-content {
     &.m {
       display: flex;
@@ -187,15 +170,18 @@ export default {
       }
     }
   }
+
   .Big-Book-addrole {
     > div {
-      margin-left: 115px;
-      width: 600px;
+      width: 300px;
       height: 40px;
       background: #f3f3f3;
       border: 1px dashed rgba(0, 0, 0, 0.15);
       box-sizing: border-box;
       border-radius: 4px;
+      text-align: center;
+      line-height: 40px;
+      cursor: pointer;
     }
   }
   .Big-Book-more {
@@ -225,6 +211,13 @@ export default {
       }
     }
   }
+  .Big-Book-con{
+    display: flex;
+    align-items: center;
+        > span {
+      width: 50px;
+    }
+  }
 }
 </style>
 <style lang="scss">

+ 23 - 1
src/views/adultInput.vue

@@ -153,6 +153,26 @@
                         <NewordPhraseview :curQue="topicIitem.data" />
                       </template>
                     </template>
+                    <template v-if="topicIitem.type == 'input_record_chs'">
+                      <template v-if="topicIitem.is_edit">
+                        <InputRecord
+                          :curQue="topicIitem.data"
+                          :fn_data="fn_data"
+                          :changeCurQue="changeCurQue"
+                        />
+                      </template>
+                      <template v-else> </template>
+                    </template>
+                       <template v-if="topicIitem.type == 'recordHZ_inputPY_chs'">
+                      <template v-if="topicIitem.is_edit">
+                        <Sentence
+                          :curQue="topicIitem.data"
+                          :fn_data="fn_data"
+                          :changeCurQue="changeCurQue"
+                        />
+                      </template>
+                      <template v-else> </template>
+                    </template>
                   </div>
                   <div
                     class="addoption"
@@ -510,6 +530,9 @@ export default {
           return item;
         });
         this.question_list = question_list;
+        this.TopicIndex = null;
+        this.RowIndex = null;
+        this.LineIndex = null;
       }
     },
     tabClick(tab) {
@@ -528,7 +551,6 @@ export default {
         this.$message.warning("请先选择添加模板的位置");
         return;
       }
-
       if (
         this.question_list[this.tabIndex].cur_fn_data[this.TopicIndex]
           .table_list[this.RowIndex][this.LineIndex].data