guanchunjie 3 years ago
parent
commit
233b61000c

+ 57 - 24
src/components/Adult/Preview.vue

@@ -10,8 +10,8 @@
     </div>
     <div v-if="cur" class="NNPE-Book-content-inner">
       <div v-for="(item, index) in cur.cur_fn_data" :key="index">
-        <h2 v-if="item.title_z">{{ item.z_title }}</h2>
-        <h3 v-if="item.title_f">{{ item.f_title }}</h3>
+        <h2 v-if="item.z_title">{{ item.z_title }}</h2>
+        <h3 v-if="item.f_title">{{ item.f_title }}</h3>
         <div
           :class="['NNPE-tableList', item.is_bg ? 'NNPE-tableList-hasBg' : '']"
         >
@@ -124,10 +124,25 @@
                 <template v-if="itemss.type == 'checkbox_self_assessment_chs'">
                   <Checkbox :cur-que="itemss.data" />
                 </template>
-                <template v-if="itemss.type == 'dialogue_answer_chs'">
-                  <DialogueAnswerViewChs
+                <template
+                  v-if="
+                    itemss.type == 'record_control_mini' ||
+                    itemss.type == 'record_control_normal' ||
+                    itemss.type == 'record_control_pro' ||
+                    itemss.type == 'record_control_promax'
+                  "
+                >
+                  <RecordModule :cur-que="itemss.data" />
+                </template>
+                <template
+                  v-if="
+                    itemss.type == 'upload_control_chs' ||
+                    itemss.type == 'upload_control_preview_chs'
+                  "
+                >
+                  <UploadControlView
                     :cur-que="itemss.data"
-                    :colorBox="colorBox"
+                    :type="itemss.type"
                   />
                 </template>
               </template>
@@ -146,7 +161,7 @@ import Soundrecord from "./preview/Soundrecord.vue"; // 录音模板
 import ArticleTemChs from "./preview/ArticleViewChs/index.vue"; // 文章模板
 import DialogueArticleViewChs from "./preview/DialogueArticleViewChs/index.vue"; // 文章模板
 import SentenceSegWordViewChs from "./preview/SentenceSegWordViewChs.vue"; // 句子分词
-import WordPhrase from "./preview/WordPhrase.vue"; // 生词 短语
+import WordPhrase from "./preview/WordPhrase.vue"; // 生词短语
 import Notes from "./preview/Notes.vue"; // 注释
 import Ligature from "./preview/Ligature.vue";
 import InputHasRecord from "./preview/InputHasRecord.vue"; // 输入加录音
@@ -163,7 +178,8 @@ import SentenceListenRead from "./preview/SentenceListenRead.vue"; // 听并朗
 import SentenceSort from "./preview/SentenceSort.vue"; // 句子拖拽排序
 import Checkbox from "./preview/CheckBoxModule.vue"; // 问卷调查-多选题
 import VoiceMatrix from "./preview/VoiceMatrix.vue"; // 语音矩阵
-import DialogueAnswerViewChs from "./preview/DialogueArticleViewChs/DialogueAnswerViewChs.vue"; //对话答题
+import RecordModule from "./preview/RecordModule.vue"; // 录音组件
+import UploadControlView from "./preview/UploadControlView.vue";//预览控件
 
 export default {
   name: "Preview",
@@ -191,7 +207,8 @@ export default {
     SentenceSort,
     Checkbox,
     VoiceMatrix,
-    DialogueAnswerViewChs,
+    RecordModule,
+    UploadControlView,
   },
   props: [
     "context",
@@ -276,27 +293,43 @@ export default {
       _this.NNPENewPhraseList = [];
       _this.watchIndex = _this.queIndex + new Date().getTime();
       if (_this.contextData) {
-        const list = _this.contextData;
-        if (list && list.length > 0) {
-          _this.queList = list;
-          _this.cur = list[_this.queIndex];
-          _this.queTotal = list.length;
-          _this.cur.cur_fn_data.forEach((item) => {
+        // const list = _this.contextData;
+        // if (list && list.length > 0) {
+        //   _this.queList = list;
+        //   _this.cur = list[_this.queIndex];
+          _this.queTotal = 1;
+        //   _this.cur.cur_fn_data.forEach((item) => {
+        //     item.table_list.forEach((items) => {
+        //       items.forEach((itemss) => {
+        //         if (itemss.data && itemss.data.type == "NewWord_chs") {
+        //           _this.NNPENewWordList = _this.NNPENewWordList.concat(
+        //             itemss.data.option
+        //           );
+        //         } else if (itemss.data && itemss.data.type == "notes_chs") {
+        //           _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
+        //             itemss.data.option
+        //           );
+        //         }
+        //       });
+        //     });
+        //   });
+        // }
+        _this.cur = _this.contextData;
+        _this.cur.cur_fn_data.forEach((item) => {
             item.table_list.forEach((items) => {
-              items.forEach((itemss) => {
+                items.forEach((itemss) => {
                 if (itemss.data && itemss.data.type == "NewWord_chs") {
-                  _this.NNPENewWordList = _this.NNPENewWordList.concat(
-                    itemss.data.option
-                  );
+                        _this.NNPENewWordList = _this.NNPENewWordList.concat(
+                        itemss.data.option
+                    );
                 } else if (itemss.data && itemss.data.type == "notes_chs") {
-                  _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
-                    itemss.data.option
-                  );
+                        _this.NNPEAnnotationList = _this.NNPEAnnotationList.concat(
+                        itemss.data.option
+                    );
                 }
-              });
+                });
             });
-          });
-        }
+        });
       }
     },
     // 上一页

+ 17 - 3
src/components/Adult/common/InputRecordModule.vue

@@ -4,13 +4,13 @@
     <div class="Big-Book-content m">
       <div class="Big-Book-con-main">
         <div class="adult-book-input-item">
-          <span class="adult-book-lable">题目:</span>
+          <span class="adult-book-lable">序号:</span>
           <el-input
             type="textarea"
             class="adult-book-input"
             :autosize="{ minRows: 2 }"
-            placeholder="请输入题目"
-            v-model="curQueItem.con"
+            placeholder="请输入序号"
+            v-model="curQueItem.number"
           ></el-input>
           <img
             @click="romveoptionCon"
@@ -19,6 +19,9 @@
             alt=""
           />
         </div>
+        <div class="adult-book-input-item">
+          <SentenceSegwordChs :curQue="curQueItem.detail" />
+        </div>
         <div class="adult-book-input-item InputRecordModule_textarea">
           <span class="adult-book-lable">答案:</span>
           <el-input
@@ -30,6 +33,14 @@
           ></el-input>
         </div>
         <div class="adult-book-input-item">
+          <span class="adult-book-lable">字体:</span>
+          <el-radio-group v-model="curQueItem.font">
+            <el-radio label="cn">中文</el-radio>
+            <el-radio label="en">英文</el-radio>
+            <el-radio label="pinyin">拼音</el-radio>
+          </el-radio-group>
+        </div>
+        <div class="adult-book-input-item">
           <span class="adult-book-lable">录音:</span>
           <el-radio v-model="curQueItem.record" :label="true">需要</el-radio>
           <el-radio v-model="curQueItem.record" :label="false">不要</el-radio>
@@ -43,9 +54,12 @@
 import Upload from "./Upload.vue";
 import "@/utils/pinyin_dict_withtone";
 import "@/utils/pinyinUtil";
+import SentenceSegwordChs from "../common/SentenceSegwordChs/index.vue";
+
 export default {
   components: {
     Upload,
+    SentenceSegwordChs,
   },
   props: ["curQueItem", "index", "deleteOptionOne", "type"],
   data() {

+ 26 - 4
src/components/Adult/common/SentenceModule.vue

@@ -20,10 +20,10 @@
         />
       </div>
     </div>
-    <div class="NPC-sentence-Segword">
+    <div class="NPC-sentence-Segword" v-if="type != 'recordHZ_inputPY_chs'">
       <SentenceSegwordChs :curQue="curQueItem.detail" />
     </div>
-    <div class="adult-book-input-item">
+    <div class="adult-book-input-item" v-if="type != 'recordHZ_inputPY_chs'">
       <span class="adult-book-lable">英文:</span>
       <el-input
         size="small"
@@ -33,11 +33,33 @@
         @blur="onBlur(curQueItem, 'en')"
       ></el-input>
     </div>
+    <div class="adult-book-input-item" v-if="type == 'recordHZ_inputPY_chs'">
+      <span class="adult-book-lable">内容:</span>
+      <el-input
+        size="small"
+        class="adult-book-input"
+        placeholder="请输入内容"
+        v-model="curQueItem.con"
+        @blur="onBlur(curQueItem, 'con')"
+      ></el-input>
+    </div>
+    <div class="adult-book-input-item" v-if="type == 'recordHZ_inputPY_chs'">
+      <span class="adult-book-lable">答案:</span>
+      <el-input
+        size="small"
+        class="adult-book-input"
+        placeholder="请输入答案"
+        v-model="curQueItem.answer"
+        @blur="onBlur(curQueItem, 'answer')"
+      ></el-input>
+    </div>
     <div
       class="adult-book-input-item"
-      v-if="type == 'sentence_listen_read_chs'"
+      v-if="
+        type == 'sentence_listen_read_chs' || type == 'recordHZ_inputPY_chs'
+      "
     >
-      <span class="adult-book-lable">选项字体:</span>
+      <span class="adult-book-lable">字体:</span>
       <el-radio-group v-model="curQueItem.font">
         <el-radio label="cn">中文字体</el-radio>
         <el-radio label="en">英文字体</el-radio>

+ 706 - 784
src/components/Adult/common/data.js

@@ -1,798 +1,720 @@
 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: "sentence_listen_read_chs",
+    name: "句子听+朗读",
+  },
+  ],
 
-    }, {
-        type: "image_question",
-        name: "看图模板",
-        list: [{
-            type: "image_question_input",
-            name: "看图填空",
-        }, {
-            type: "image_question_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_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: "",
+}, {
+  type: "image_question",
+  name: "看图模板",
+  list: [{
+    type: "image_question_input",
+    name: "看图填空",
+  }, {
+    type: "image_question_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_chs",
+  name: "单选题",
+},
+{
+  type: "listen_record_single_chs",
+  name: "听录音选答案",
+},
+{
+  type: "checkbox_chs",
+  name: "多选题",
+},
+{
+  type: "checkbox_self_assessment_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: "",
 
-            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: ''
-            }],
+//         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: ''
+//         }],
 
-            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,
+//         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: "纯图片",
+  },
+  ],
+},
 
-                    }, {
-                        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_chs",
+  name: "输入+录音",
+},
+{
+  type: "recordHZ_inputPY_chs",
+  name: "读汉字写拼音",
+},
+{
+  type: "inputItem_chs",
+  name: "输入选项",
+},
+{
+  type: "upload_control_chs",
+  name: "上传控件",
+},
+{
+  type: "upload_control_preview_chs",
+  name: "上传控件预览查看",
+},
+{
+  type: "inputItem_chs",
+  name: "输入选项",
+},
+{
+  type: "switch_control_chs",
+  name: "开关控件",
+},
+{
+  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: "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: "",
+//         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: [],
-                },
-                {
-                    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: [
+//             [],
+//             []
+//         ]
+//     }
+// },
 
-                {
-                    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: "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: "听录音题",
+//         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: "数独",
-    },
-    {
-        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: "排序"
-    },
+//                 }, {
+//                     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: "排序"
+},
+{
+  type: "CourseStart_chs",
+  name: "封面",
+},
+{
+  type: "tinydemo_chs",
+  name: "富文本"
+},
 ]
 
 

+ 25 - 1
src/components/Adult/inputModules/InputRecord.vue

@@ -5,6 +5,7 @@
       src="../../../assets/adult/maikefeng-red.png"
       class="Big-Book-Record-icon"
     /> -->
+<<<<<<< HEAD
     <div class="adult-book-input-item">
       <span class="adult-book-lable">标题:</span>           
       <el-input
@@ -15,6 +16,20 @@
         v-model="curQue.title"
         @blur="curQue.title = curQue.title.trim()"
       ></el-input>
+=======
+    <div>
+      <div class="adult-book-input-item">
+        <span class="adult-book-lable">标题:</span>
+        <el-input
+          class="adult-book-input"
+          type="textarea"
+          autosize
+          placeholder="请输入标题"
+          v-model="curQue.title"
+          @blur="onBlur(curQue, 'title')"
+        ></el-input>
+      </div>
+>>>>>>> bcc91e147a2ffebc870640078f8aa86a562dc718
     </div>
     <div
       class="Big-Book-hanzi-option"
@@ -47,9 +62,18 @@ export default {
         title: "",
         option: [
           {
-            con: "", //标题
+            detail: {
+              type: "detail",
+              pyPosition: "top", //top 拼音在上面;bottom 拼音在下面
+              sentence: "", //句子
+              segList: [], //分词结果
+              seg_words: "",
+              wordsList: [],
+            },
+            font:"",
             answer: "", //答案
             record: false, //需要录音
+            number: "",
             mp3_list: [],
           },
         ],

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

@@ -46,7 +46,7 @@
       <div class="Big-Book-addrole">
         <div class="addoption" @click="addOption">添加一个</div>
       </div>
-      <div class="lrc-box">
+      <div class="lrc-box" v-if="type != 'recordHZ_inputPY_chs'">
         <div
           v-if="this.curQue.wordTime && this.curQue.wordTime.length > 0"
           class="lrc-box"
@@ -109,6 +109,7 @@ export default {
             answer: "",
             IsRecord: false,
             mp3_url: [],
+            font:"",
           },
         ],
       },

+ 21 - 35
src/components/Adult/inputModules/SuitchControl.vue

@@ -6,16 +6,16 @@
       class="Big-Book-Record-icon"
     /> -->
     <div class="Big-Book-hanzi-option">
-        <span>标题:</span>
-        <el-input
-          style="width: 300px"
-          type="textarea"
-          autosize
-          placeholder="请输入标题"
-          v-model="curQue.con"
-          @blur="curQue.con = curQue.con.trim()"
-        ></el-input>
-      <el-switch style="margin-left:10px" v-model="value1"> </el-switch>
+      <span>标题:</span>
+      <el-input
+        style="width: 300px"
+        type="textarea"
+        autosize
+        placeholder="请输入标题"
+        v-model="curQue.con"
+        @blur="curQue.con = curQue.con.trim()"
+      ></el-input>
+      <el-switch style="margin-left: 10px" v-model="value1"> </el-switch>
     </div>
   </div>
 </template>
@@ -25,40 +25,26 @@ import AudioControlModule from "../common/AudioControlModule.vue";
 
 export default {
   components: { AudioControlModule },
-  props: ["curQue", "fn_data"],
+  props: ["curQue", "fn_data", "changeCurQue"],
   data() {
     return {
       value1: "",
+      data_structure: {
+        type: "switch_control_chs",
+        name: "开关控件",
+      },
     };
   },
   computed: {},
   watch: {},
   //方法集合
-  methods: {
-    //添加一个选项
-    addOption() {
-      let leg = this.curQue.option.length;
-      let last = this.curQue.option[leg - 1];
-      // if (!last.hanzi && !last.pinyin && !last.definition_list[0]) {
-      //   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];
-      this.curQue.option.push(obj);
-    },
-    deleteOptionOne(index) {
-      if (this.curQue.option.length <= 1) {
-        this.$message.warning("至少要保留一个");
-        return;
-      }
-      this.curQue.option.splice(index, 1);
-    },
-  },
+  methods: {},
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() {
+    if (!this.curQue) {
+      this.changeCurQue(this.data_structure);
+    }
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {},
   beforeCreate() {}, //生命周期 - 创建之前

+ 175 - 0
src/components/Adult/inputModules/Tinydemo.vue

@@ -0,0 +1,175 @@
+<!--  -->
+<template>
+  <div class="Big-Book-Record" v-if="curQue">
+    <!-- <img
+      src="../../../assets/adult/maikefeng-red.png"
+      class="Big-Book-Record-icon"
+    /> -->
+    <div class="adult-book-input-item">
+      <span class="adult-book-lable">标题:</span>
+      <el-input
+        class="adult-book-input"
+        type="textarea"
+        autosize
+        placeholder="请输入标题"
+        v-model="curQue.title"
+        @blur="curQue.title = curQue.title.trim()"
+      ></el-input>
+    </div>
+    <div class="adult-book-input-item">
+      <span class="adult-book-lable">图片:</span>
+      <Upload :changeFillId="changeImage" :uploadType="'image'" />
+    </div>
+    <ul v-if="curQue.img_list.length > 0" class="uploadArt_list">
+      <li
+        v-for="(artItem, artIndex) in curQue.img_list"
+        :key="'articleImgList' + artIndex"
+      >
+        <span class="art_name">{{ artItem.name }}</span>
+        <span v-if="artItem.url" :id="'file' + artIndex" class="art_url"
+          >{{ artItem.url }}
+          <i class="el-icon-document-copy" @click="copyHttp('file' + artIndex)"
+        /></span>
+      </li>
+    </ul>
+    <div class="main">
+      <Editor id="tinydemo" v-model="curQue.con" :init="init" />
+    </div>
+  </div>
+</template>
+
+<script>
+import Upload from "../common/Upload.vue";
+import tinymce from "tinymce/tinymce";
+import Editor from "@tinymce/tinymce-vue";
+import "tinymce/icons/default/icons";
+import "tinymce/themes/silver";
+// 引入富文本编辑器主题的js和css
+import "tinymce/themes/silver/theme.min";
+import "tinymce/skins/ui/oxide/skin.min.css";
+// 扩展插件
+// import "tinymce/plugins/"
+import "tinymce/plugins/image";
+import "tinymce/plugins/link";
+import "tinymce/plugins/code";
+import "tinymce/plugins/table";
+import "tinymce/plugins/lists";
+import "tinymce/plugins/wordcount"; // 字数统计插件
+import "tinymce/plugins/media"; // 插入视频插件
+import "tinymce/plugins/template"; // 模板插件
+import "tinymce/plugins/fullscreen";
+import "tinymce/plugins/paste";
+import "tinymce/plugins/preview";
+import "tinymce/plugins/contextmenu";
+import "tinymce/plugins/textcolor";
+import "tinymce/plugins/colorpicker";
+import { CopyToClipboard } from "@/utils/auth";
+
+export default {
+  components: { Editor, Upload },
+  props: ["curQue", "fn_data", "changeCurQue"],
+  data() {
+    return {
+      init: {
+        language_url: `/tinymce/langs/zh_CN.js`,
+        language: "zh_CN",
+        skin_url: "/tinymce/skins/ui/oxide",
+        height: 500,
+        plugins: "link lists image code table wordcount  preview",
+        toolbar:
+          "preview bold italic underline strikethrough | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote | undo redo | link unlink image code | removeformat",
+        branding: false,
+      }, //富文本初始化
+      data_structure: {
+        type: "tinydemo",
+        name: "富文本",
+        title: "",
+        con: "",
+        img_list: [],
+      },
+    };
+  },
+  computed: {},
+  watch: {},
+  //方法集合
+  methods: {
+    copyHttp(id) {
+      CopyToClipboard(id, this);
+    },
+    changeImage(fileList, item, index) {
+      console.log(fileList);
+      const articleImgList = JSON.parse(JSON.stringify(fileList));
+      const articleImgRes = [];
+      articleImgList.forEach((item) => {
+        if (item.response) {
+          const obj = {
+            name: item.name,
+            url: item.response.file_info_list[0].file_url,
+            id: "[FID##" + item.response.file_info_list[0].file_id + "##FID]",
+          };
+          articleImgRes.push(obj);
+        }
+      });
+      this.curQue.img_list = JSON.parse(JSON.stringify(articleImgRes));
+    },
+  },
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {
+    if (!this.curQue) {
+      this.changeCurQue(this.data_structure);
+    }
+  },
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {
+    tinymce.init({});
+  },
+  beforeCreate() {}, //生命周期 - 创建之前
+  beforeMount() {}, //生命周期 - 挂载之前
+  beforeUpdate() {}, //生命周期 - 更新之前
+  updated() {}, //生命周期 - 更新之后
+  beforeDestroy() {}, //生命周期 - 销毁之前
+  destroyed() {}, //生命周期 - 销毁完成
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+};
+</script>
+<style lang='scss' scoped>
+//@import url(); 引入公共css类
+.Big-Book-Record {
+  &-icon {
+    width: 48px;
+    height: 48px;
+  }
+  .Big-Book-hanzi-option {
+    margin-top: 20px;
+  }
+  .main {
+    margin-top: 10px;
+  }
+  .addoption {
+    width: 148px;
+    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;
+    font-size: 14px;
+    color: #000000;
+  }
+  .Big-Book-con {
+    margin-bottom: 10px;
+    display: flex;
+    align-items: center;
+  }
+  .uploadArt_list {
+    > li {
+      min-height: 28px;
+      .art_name {
+        margin-right: 10px;
+      }
+    }
+  }
+}
+</style>

+ 2 - 3
src/components/Adult/inputModules/UploadControl.vue

@@ -81,9 +81,9 @@ export default {
       this.$message.success("删除成功");
     },
     changeFillId(fileList, item, index) {
-      this.curQue.fileList =JSON.parse(JSON.stringify(fileList));
+      this.curQue.fileList = JSON.parse(JSON.stringify(fileList));
       this.curQue.data = fileList[0].response.file_info_list[0];
-      if (fileList[0].name.indexOf("pdf" != -1)) {
+      if (this.curQue.data.file_name.indexOf("pdf") != -1) {
         this.curQue.data.fileRelativePath =
           process.env.VUE_APP_BASE_API + this.curQue.data.file_relative_path;
         this.getNumPages();
@@ -123,7 +123,6 @@ export default {
   created() {
     if (!this.curQue) {
       this.initcurQue();
-    } else {
     }
   },
   //生命周期 - 挂载完成(可以访问DOM元素)

+ 12 - 3
src/components/Adult/preview/TextInputRecord.vue

@@ -4,6 +4,10 @@
     <h2 v-if="curQue.title">{{curQue.title}}</h2>
     <ul>
       <li v-for="(items, indexs) in curQue.option" :key="indexs">
+          <Audio
+                :mp3="items.mp3_list.length > 0 ? items.mp3_list[0].url : ''"
+                class="audio-play"
+            />
           <b v-if="items.number">{{ items.number }}.</b>
           <span class="item-con">{{items.con}}</span>
           <input
@@ -22,8 +26,9 @@
 
 <script>
 import Soundrecord from "../preview/Soundrecord.vue"; // 录音模板
+import Audio from "../preview/components/AudioRed.vue"; // 音频播放
 export default {
-  components: {Soundrecord},
+  components: {Soundrecord,Audio},
   props: ["curQue"],
   data() {
     return {
@@ -39,13 +44,13 @@ export default {
         },
         // 处理数据
         handleData(){
-            if(!this.curQue.Bookanswer){
+            // if(!this.curQue.Bookanswer){
                 let curCorrect = [];
                 this.curQue.option.forEach(item => {
                     curCorrect.push('')
                 });
                 this.$set(this.curQue, "Bookanswer", curCorrect);
-            }
+            // }
         },
         handleWav(data) {
         
@@ -94,6 +99,10 @@ export default {
             align-items: center;
             padding: 8px 8px 8px 12px;
             margin-bottom: 8px;
+            .audio-play{
+                width: 24px;
+                margin-right: 4px;
+            }
             >b{
                width: 24px;
                line-height: 24px; 

+ 30 - 6
src/utils/auth.js

@@ -3,27 +3,51 @@ import Cookies from 'js-cookie'
 const TokenKey = 'GCLS_Token'
 
 export function getToken() {
-  return Cookies.get(TokenKey)
+    return Cookies.get(TokenKey)
 }
 
 export function setToken(token) {
-  return Cookies.set(TokenKey, token)
+    return Cookies.set(TokenKey, token)
 }
 
 export function removeToken() {
-  return Cookies.remove(TokenKey)
+    return Cookies.remove(TokenKey)
 }
 
 const ConfigKey = 'GCLS_Config'
 
 export function getConfig() {
-  return Cookies.get(ConfigKey)
+    return Cookies.get(ConfigKey)
 }
 
 export function setConfig(val) {
-  return Cookies.set(ConfigKey, val)
+    return Cookies.set(ConfigKey, val)
 }
 
 export function removeConfig() {
-  return Cookies.remove(ConfigKey)
+    return Cookies.remove(ConfigKey)
+}
+export function CopyToClipboard(element, root) {
+    var doc = document,
+        text = doc.getElementById(element),
+        range,
+        selection;
+
+    if (doc.body.createTextRange) {
+        range = doc.body.createTextRange();
+        range.moveToElementText(text);
+        range.select();
+    } else if (window.getSelection) {
+        selection = window.getSelection();
+        range = doc.createRange();
+        range.selectNodeContents(text);
+        selection.removeAllRanges();
+        selection.addRange(range);
+    }
+    document.execCommand("copy");
+    root.$message({
+        message: "复制成功",
+        type: "success",
+    });
+    window.getSelection().removeAllRanges();
 }

File diff suppressed because it is too large
+ 543 - 420
src/views/adultInput.vue


Some files were not shown because too many files changed in this diff