Bladeren bron

Merge branch 'master' of http://221.216.211.14:3000/GCLS/GCLS_Page_Book_Component_NPC

natasha 3 jaren geleden
bovenliggende
commit
0de00d61ad

+ 76 - 10
src/components/Adult/Preview.vue

@@ -174,7 +174,13 @@ export default {
     SentenceSort,
     Checkbox,
   },
-  props: ["context", "fatherName"],
+  props: [
+    "context",
+    "fatherName",
+    "currentTreeID",
+    "FatherTreeData",
+    "changeId",
+  ],
   data() {
     return {
       contextData: null,
@@ -235,15 +241,43 @@ export default {
         }
       }
     },
-
     // 上一页
     handleNNPEprev() {
       const _this = this;
       if (_this.queIndex == 0) {
-        this.$message({
-          message: "已经是第一题",
-          type: "success",
+        let data = {};
+        _this.FatherTreeData.forEach((item, itemIndex) => {
+          if (item.children) {
+            item.children.forEach((it, childrenIndex) => {
+              if (itemIndex < 1 && childrenIndex < 1) {
+                this.$message({
+                  message: "已经是第一题",
+                  type: "success",
+                });
+              } else if (it.id == _this.currentTreeID) {
+                data.fatherName = item.children[childrenIndex - 1].fatherName;
+                data.id = item.children[childrenIndex - 1].id;
+                data.name = item.children[childrenIndex - 1].name;
+              }
+            });
+          } else {
+            if (itemIndex < 1) {
+              this.$message({
+                message: "已经是第一题",
+                type: "success",
+              });
+            } else if (item.id == _this.currentTreeID) {
+              {
+                data.fatherName =
+                  _this.FatherTreeData[itemIndex - 1].fatherName;
+                data.id = _this.FatherTreeData[itemIndex - 1].id;
+                data.name = _this.FatherTreeData[itemIndex - 1].name;
+              }
+            }
+          }
         });
+        _this.queIndex = 0;
+        _this.changeId(data.id, data.name, data.fatherName);
       } else {
         _this.queIndex = _this.queIndex - 1;
         _this.watchIndex = _this.queIndex + new Date().getTime();
@@ -254,10 +288,42 @@ export default {
     handleNNPEnext() {
       const _this = this;
       if (_this.queIndex == _this.queTotal - 1) {
-        this.$message({
-          message: "已经是最后一题",
-          type: "success",
-        });
+          let data = {};
+          _this.FatherTreeData.forEach((item, itemIndex) => {
+            if (item.children) {
+              item.children.forEach((it, childrenIndex) => {
+                if (
+                  itemIndex == _this.FatherTreeData.length - 1 &&
+                  childrenIndex == item.children.length - 1
+                ) {
+                  this.$message({
+                    message: "已经是最后一题",
+                    type: "success",
+                  });
+                } else if (it.id == _this.currentTreeID) {
+                  data.fatherName = item.children[childrenIndex + 1].fatherName;
+                  data.id = item.children[childrenIndex + 1].id;
+                  data.name = item.children[childrenIndex + 1].name;
+                }
+              });
+            } else {
+              if (itemIndex == _this.FatherTreeData.length - 1) {
+                this.$message({
+                  message: "已经是最后一题",
+                  type: "success",
+                });
+              } else if (item.id == _this.currentTreeID) {
+                {
+                  data.fatherName =
+                    _this.FatherTreeData[itemIndex + 1].fatherName;
+                  data.id = _this.FatherTreeData[itemIndex + 1].id;
+                  data.name = _this.FatherTreeData[itemIndex + 1].name;
+                }
+              }
+            }
+          });
+          _this.queIndex = 0;
+          _this.changeId(data.id, data.name, data.fatherName);
       } else {
         _this.queIndex = _this.queIndex + 1;
         _this.watchIndex = _this.queIndex + new Date().getTime();
@@ -346,7 +412,7 @@ export default {
       border-radius: 8px;
       padding: 12px 8px;
       &.NNPE-tableList-hasBg {
-        background: #F7F7F7;
+        background: #f7f7f7;
         border: 1px solid rgba(0, 0, 0, 0.1);
         box-sizing: border-box;
         border-radius: 8px;

+ 765 - 810
src/components/Adult/common/data.js

@@ -1,843 +1,798 @@
 let fnData = [{
-  type: "article_chs",
-  name: "课文",
-}, {
-  type: "dialogue_article_chs",
-  name: "对话课文",
-},
-{
-  type: "sentence_segword_chs",
-  name: "句子分词",
-},
-{
-  type: "NewWord_chs",
-  name: "生词",
-},
-{
-  type: "notes_chs",
-  name: "注释",
+        type: "article_chs",
+        name: "课文",
+    }, {
+        type: "dialogue_article_chs",
+        name: "对话课文",
+    },
+    {
+        type: "sentence_segword_chs",
+        name: "句子分词",
+    },
+    {
+        type: "NewWord_chs",
+        name: "生词",
+    },
+    {
+        type: "notes_chs",
+        name: "注释",
 
-}, {
-  type: "dialogue_answer_chs",
-  name: "对话题模板"
-}, {
-  type: "sentence_chs",
-  name: "句子模板",
-  list: [{
-    type: "sentence_input_chs",
-    name: "句子填空",
-  },
-  {
-    type: "sentence_judge_chs",
-    name: "句子判断",
-  },
-  {
-    type: "sentence_record_chs",
-    name: "句子录音",
-  },
-  {
-    type: "sentence_input_record_chs",
-    name: "句子填空+录音",
-  }
-  ],
+    }, {
+        type: "dialogue_answer_chs",
+        name: "对话题模板"
+    }, {
+        type: "sentence_chs",
+        name: "句子模板",
+        list: [{
+                type: "sentence_input_chs",
+                name: "句子填空",
+            },
+            {
+                type: "sentence_judge_chs",
+                name: "句子判断",
+            },
+            {
+                type: "sentence_record_chs",
+                name: "句子录音",
+            },
+            {
+                type: "sentence_input_record_chs",
+                name: "句子填空+录音",
+            }
+        ],
 
-}, {
-  type: "image_question",
-  name: "看图模板",
-  list: [
-    {
-      type: "image_question_input",
-      name: "看图填空",
     }, {
-      type: "image_question_record",
-      name: "看图录入",
+        type: "image_question",
+        name: "看图模板",
+        list: [{
+            type: "image_question_input",
+            name: "看图填空",
+        }, {
+            type: "image_question_record",
+            name: "看图录入",
+        }, {
+            type: "image_question_input_record",
+            name: "看图填空+录入",
+        }]
     }, {
-      type: "image_question_input_record",
-      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: ""
-    },
-    {
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ""
-    }
-    ],
-    correct: [],
-    numberList: {
-      type: "number",
-      name: "每行几个",
-      con: "2",
-      arr: [{
-        id: 1,
-        value: 1,
-      }, {
-        id: 2,
-        value: 2,
+        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_chs",
+        name: "单选题",
+    },
+    {
+        type: "listen_record_single_chs",
+        name: "听录音选答案",
+    },
+    {
+        type: "checkbox_chs",
+        name: "多选题",
+    },
+    {
+        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: "",
 
-      }, {
-        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: ''
-    },
-    {
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    }
-    ],
-    correct: [],
-    numberList: {
-      type: "number",
-      name: "每行几个",
-      con: "2",
-      arr: [{
-        id: 1,
-        value: 1,
-      }, {
-        id: 2,
-        value: 2,
+            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: ''
+            }],
 
-      }, {
-        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: "",
+            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",
+        name: "图片控件",
+        list: [{
+                type: 'image_checkBox',
+                name: "图片多选",
+            },
+            {
+                type: 'image_judge',
+                name: "图片判断",
+            },
+            {
+                type: 'image_single',
+                name: "图片单选",
+            },
+            {
+                type: 'image_dobleinput',
+                name: "双输入",
+            },
+            {
+                type: 'image_gdcy',
+                name: "固定词语",
+            },
+            {
+                type: 'image_input',
+                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,
 
-    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: ''
-    }],
+                    }, {
+                        id: 3,
+                        value: 3,
+                    },
+                    {
+                        id: 4,
+                        value: 4,
+                    },
+                ]
+            }
+        },
+    },
 
-    correct: [{
-      single: [],
-      checkBox: [],
-      judge: [],
-      input: [],
-      spell: []
-    }],
-    fn_list: [{
-      type: 'def',
-      name: '更多释义',
-      isFn: false,
-      isDisable: false,
+    {
+        type: "audio_control",
+        name: "音频控制条",
+        data_structure: {
+            type: 'audio_control',
+            name: "音频控制条",
+            option: [{
+                xuhao: '',
+                yinbiao: '',
+                img_list: [],
+                mp3_list: [],
+                isAnswer: ''
+            }, ],
+        }
     },
     {
-      type: 'record',
-      name: '跟读',
-      isFn: false,
-      isDisable: false,
+        type: "audio_control_easy",
+        name: "音频控制条-简易",
+        data_structure: {
+            type: 'audio_control_easy',
+            name: "音频控制条-简易",
+            option: [{
+                xuhao: '',
+                yinbiao: '',
+                img_list: [],
+                mp3_list: [],
+                isAnswer: ''
+            }, ],
+        }
     },
     {
-      type: 'spell',
-      name: '拼写',
-      isFn: false,
-      isDisable: false,
+        type: "input_record_chs",
+        name: "输入+录音",
     },
     {
-      type: 'input',
-      name: '输入',
-      isFn: false,
-      isDisable: false,
+        type: "recordHZ_inputPY_chs",
+        name: "读汉字写拼音",
     },
     {
-      type: 'copy',
-      name: '摹写',
-      isFn: false,
-      isDisable: false,
+        type: "inputItem_chs",
+        name: "输入选项",
     },
     {
-      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: '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: "upload_control_chs",
+        name: "上传控件",
+    },
+    {
+        type: "upload_control_preview_chs",
+        name: "上传控件预览查看",
+    },
+    // {
+    //     type: "inputItem_chs",
+    //     name: "输入选项",
+    // },
+    {
+        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: "",
+                },
+                {
+                    con: "",
+                    Answer: "",
+                },
+            ],
+            option: [{
+                    con: '',
+                    pinyin: '',
+                    img_list: [],
+                    mp3_list: [],
+                    isAnswer: ''
+                },
+                {
+                    con: '',
+                    pinyin: '',
+                    img_list: [],
+                    mp3_list: [],
+                    isAnswer: ''
+                }
+            ],
+            correct: ["", ""]
+        }
+    },
+    {
+        type: "matrixChckbox",
+        name: "矩阵多选",
+        data_structure: {
+            type: 'matrixChckbox',
+            name: "矩阵多选",
+            title: "",
 
-{
-  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_chs",
-  name: "输入+录音",
-},
-{
-  type: "recordHZ_inputPY_chs",
-  name: "读汉字写拼音",
-},
-{
-  type: "inputItem_chs",
-  name: "输入选项",
-},
-{
-  type: "upload_control_chs",
-  name: "上传控件",
-},
-// {
-//     type: "inputItem_chs",
-//     name: "输入选项",
-// },
-{
-  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: "",
-    },
-    {
-      con: "",
-      Answer: "",
-    },
-    ],
-    option: [{
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    },
-    {
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    }
-    ],
-    correct: ["", ""]
-  }
-},
-{
-  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: [{
-      con: "",
-      AnswerList: [],
+                {
+                    con: '',
+                    pinyin: '',
+                    img_list: [],
+                    mp3_list: [],
+                    isAnswer: ''
+                }
+            ],
+            correct: [
+                [],
+                []
+            ]
+        }
     },
+
     {
-      type: "matrixChekbox",
-      name: "矩阵多选",
-      data_structure: {
-        type: 'matrixChekbox',
-        name: "矩阵多选",
-        con: [{
-          con: "",
-          AnswerList: [],
-        },
-        {
-          con: "",
-          AnswerList: [],
+        type: "text_input_RecoedItem",
+        name: "文字+录入+录音条",
+        data_structure: {
+            type: "text_input_RecoedItem",
+            name: "文字+录入+录音条",
+            title: "",
+            option: [{
+                number: "",
+                con: "",
+                answer: "",
+            }, ]
         },
-        ],
-        option: [{
-          con: '',
-          pinyin: '',
-          img_list: [],
-          mp3_list: [],
-          isAnswer: ''
+    },
+    {
+        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: ["", ""],
+            }]
         },
-        {
-          con: '',
-          pinyin: '',
-          img_list: [],
-          mp3_list: [],
-          isAnswer: ''
+    },
+    {
+        type: "ligature_chs",
+        name: "连线",
+    },
+    {
+        type: "record",
+        name: "录音题",
+        data_structure: {
+            type: "record",
+            name: "录音题",
+            title: "",
+            option: [{
+                mp3_list: [],
+                con: "",
+                value: "",
+            }, ]
         }
-        ],
-        correct: [
-          [],
-          []
-        ]
-      }
     },
-
     {
-      con: '',
-      pinyin: '',
-      img_list: [],
-      mp3_list: [],
-      isAnswer: ''
-    }
-    ],
-    correct: [
-      [],
-      []
-    ]
-  }
-},
-
-{
-  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: ''
-    },
-    {
-      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_chs",
-  name: "连线",
-},
-{
-  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: "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,
+            title: "",
+            option: [{
+                mp3_list: [],
+                con: "",
+                value: "",
+            }, ]
+        }
+    },
+    // {
+    //     type: "sort",
+    //     name: "排序题",
+    // },
+    // {
+    //     type: "blank",
+    //     name: "填空题",
+    // },
+    // {
+    //     type: "annex",
+    //     name: "附件题",
+    // },
+    // {
+    //     type: "dropdown",
+    //     name: "下拉题",
+    // },
+    // {
+    //     type: "drawing",
+    //     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,
 
-      }, {
-        id: 3,
-        value: 3,
-      },
-      {
-        id: 4,
-        value: 4,
-      },
-      ]
-    }
-  }
-},
-{
-  type: "bg_control",
-  name: "背景图控件",
-  data_structure: {
-    type: 'bg_control',
-    name: "背景图控件",
-    img_list: [],
-  }
-},
-{
-  type: "NumberCombination_chs",
-  name: "数字组合",
-},
-{
-  type: "toneSelect_chs",
-  name: "音调选择",
-},
-{
-  type: "sudoku_chs",
-  name: "数独",
-},
+                    }, {
+                        id: 3,
+                        value: 3,
+                    },
+                    {
+                        id: 4,
+                        value: 4,
+                    },
+                ]
+            }
+        }
+    },
+    {
+        type: "bg_control",
+        name: "背景图控件",
+        data_structure: {
+            type: 'bg_control',
+            name: "背景图控件",
+            img_list: [],
+        }
+    },
+    {
+        type: "NumberCombination_chs",
+        name: "数字组合",
+    },
+    {
+        type: "toneSelect_chs",
+        name: "音调选择",
+    },
+    {
+        type: "sudoku_chs",
+        name: "数独",
+    },
+    {
+        type: "text_problem_chs",
+        name: "课文上方的问题",
+    },
+    {
+        type: "newWord_preview_chs",
+        name: "生字展示",
+    },
+    {
+        type: "listen_record_single_syllable_chs",
+        name: "听录音选音节",
+    },
+    {
+        type: "zi_transverse_line_chs",
+        name: "字+横线",
+    },
+    {
+        type: "select_input_chs",
+        name: "选择填空控件",
+    },
+    {
+        type: "play_input_record_chs",
+        name: "播放+输入+录音",
+    },
+    {
+        type: "drag_chs",
+        name: "拖拽",
+    },
+    {
+        type: "sort_chs",
+        name: "排序"
+    },
 ]
 
 

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

@@ -137,7 +137,6 @@ let fnData = [{
             type: 'singleRowInput',
             name: "单行文本题",
             title: "",
-
             con: [{
                 con: '',
                 annotation: "", //注释

+ 17 - 2
src/components/Adult/inputModules/Catelog.vue

@@ -142,7 +142,13 @@ export default {
   components: {
     Tree: Tree.mixPlugins([Fold, Draggable]),
   },
-  props: ["changeId", "emptyQustion", "bookLevel", "bookNodeIndex"],
+  props: [
+    "changeId",
+    "emptyQustion",
+    "bookLevel",
+    "bookNodeIndex",
+    "changeTreeData",
+  ],
   data() {
     return {
       treeData: [],
@@ -252,6 +258,7 @@ export default {
             this.isDragFlag = false;
             // 移动后只有这一个节点 不对
             this.treeData = this.oldLists;
+            this.changeTreeData(this.oldLists);
             this.$message({
               type: "warning",
               message: "不能跨级移动!",
@@ -268,6 +275,8 @@ export default {
               } else {
                 // if (item.pid === 'undefined')
                 this.treeData = this.oldLists;
+                this.changeTreeData(this.oldLists);
+
                 this.isDragFlag = false;
                 this.$message({
                   type: "warning",
@@ -284,6 +293,8 @@ export default {
                 // this.treeData.lists = list;
               } else {
                 this.treeData = this.oldLists;
+                this.changeTreeData(this.oldLists);
+
                 this.isDragFlag = false;
                 this.$message({
                   type: "warning",
@@ -424,16 +435,20 @@ export default {
           this.handleData(res, 0);
           this.treeData = JSON.parse(JSON.stringify(res.nodes));
           this.oldLists = JSON.parse(JSON.stringify(res.nodes));
+          this.changeTreeData(res.nodes);
+
           _this.$nextTick(() => {
             _this.foldAll();
             if (this.type) {
               this.curINdexArr = this.curIndex.split("-");
               this.handleFold(res, 0);
               this.treeData = JSON.parse(JSON.stringify(res.nodes));
+              this.changeTreeData(res.nodes);
             } else if (this.bookLevel) {
               this.curINdexArr = this.bookLevel.split("-");
               this.handleFold(res, 0);
               this.treeData = JSON.parse(JSON.stringify(res.nodes));
+              this.changeTreeData(res.nodes);
             }
           });
         })
@@ -479,7 +494,7 @@ export default {
     handleNodeClick(data) {
       console.log(data);
       this.activeIndex = data.id;
-      this.changeId(data.id, data.name,data.fatherName);
+      this.changeId(data.id, data.name, data.fatherName);
     },
     remove(data, index) {
       this.curIndex = data.level_index;

+ 14 - 1
src/views/adultInput3.vue

@@ -9,6 +9,7 @@
           :book-level="bookLevel"
           :book-node-index="bookIndex"
           :change-id="changeId"
+          :changeTreeData="changeTreeData"
         />
       </div>
       <div class="Book-content" v-if="currentTreeID">
@@ -493,6 +494,10 @@
           :context="context"
           :que-index="queIndex"
           :fatherName="fatherName"
+          :currentTreeID="currentTreeID"
+          :FatherTreeData="FatherTreeData"
+          :change-id="changeId"
+
         />
       </div>
       <span slot="footer" class="dialog-footer">
@@ -644,6 +649,7 @@ export default {
       fatherName: "",
       module_type: "",
       tmInde: "",
+      FatherTreeData: null,
     };
   },
   computed: {
@@ -659,9 +665,16 @@ export default {
       }
     },
   },
-  watch: {},
+  watch: {
+    FatherTreeData(val, oldval) {
+      console.log(val);
+    },
+  },
   //方法集合
   methods: {
+    changeTreeData(val){
+      this.FatherTreeData = JSON.parse(JSON.stringify(val))
+    },
     // 随意插入模板获取位置
     changeSite(x, y) {
       this.bgControlX = x;