|
@@ -22,26 +22,68 @@
|
|
|
:key="item + index"
|
|
|
style="margin-bottom: 20px"
|
|
|
>
|
|
|
- <div class="adult-book-input-item">
|
|
|
- <span class="adult-book-lable">序号:</span>
|
|
|
- <el-input
|
|
|
- class="adult-book-input"
|
|
|
- type="textarea"
|
|
|
- autosize
|
|
|
- placeholder="请输入序号"
|
|
|
- v-model="item.number"
|
|
|
- @blur="onBlur(item, 'number')"
|
|
|
- ></el-input>
|
|
|
- <img
|
|
|
- @click="deleteOptionOne"
|
|
|
- class="close"
|
|
|
- src="../../../assets/adult/del-close.png"
|
|
|
- alt=""
|
|
|
- />
|
|
|
- </div>
|
|
|
- <div class="NPC-sentence-Segword">
|
|
|
- <SentenceSegwordChs :curQue="item.detail" />
|
|
|
- </div>
|
|
|
+ <template v-if="this.type == 'text_problem_chs'">
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">序号:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ autosize
|
|
|
+ placeholder="请输入序号"
|
|
|
+ v-model="item.number"
|
|
|
+ @blur="onBlur(item, 'number')"
|
|
|
+ ></el-input>
|
|
|
+ <img
|
|
|
+ @click="deleteOptionOne"
|
|
|
+ class="close"
|
|
|
+ src="../../../assets/adult/del-close.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="NPC-sentence-Segword">
|
|
|
+ <SentenceSegwordChs :curQue="item.detail" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-if="this.type == 'newWord_preview_chs'">
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">拼音:</span>
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ autosize
|
|
|
+ placeholder="请输入拼音"
|
|
|
+ v-model="item.pinyin"
|
|
|
+ @blur="onBlur(item, 'pinyin')"
|
|
|
+ ></el-input>
|
|
|
+ <img
|
|
|
+ @click="deleteOptionOne"
|
|
|
+ class="close"
|
|
|
+ src="../../../assets/adult/del-close.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </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="item.con"
|
|
|
+ @blur="onBlur(item, 'con')"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">音频:</span>
|
|
|
+ <Upload
|
|
|
+ :changeFillId="changeMp3"
|
|
|
+ :datafileList="item.mp3_list"
|
|
|
+ :filleNumber="mp3Number"
|
|
|
+ :uploadType="'mp3'"
|
|
|
+ :index='index'
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<div class="Big-Book-addrole">
|
|
|
<div class="addoption" @click="addOption">添加一个</div>
|
|
@@ -96,6 +138,19 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+
|
|
|
+ data_structure2: {
|
|
|
+ type: "newWord_preview_chs",
|
|
|
+ name: "生字展示",
|
|
|
+ title: "",
|
|
|
+ option: [
|
|
|
+ {
|
|
|
+ mp3_list: [],
|
|
|
+ con: "", //生字
|
|
|
+ pinyin: "", //拼音
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
@@ -121,9 +176,30 @@ export default {
|
|
|
},
|
|
|
initcurQue() {
|
|
|
let data;
|
|
|
- data = JSON.parse(JSON.stringify(this.data_structure));
|
|
|
+ if (this.type == "newWord_preview_chs") {
|
|
|
+ data = JSON.parse(JSON.stringify(this.data_structure2));
|
|
|
+ } else if (this.type == "text_problem_chs") {
|
|
|
+ data = JSON.parse(JSON.stringify(this.data_structure));
|
|
|
+ }
|
|
|
this.changeCurQue(data);
|
|
|
},
|
|
|
+ changeMp3(fileList,item,index) {
|
|
|
+ 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]",
|
|
|
+
|
|
|
+ media_duration: item.response.file_info_list[0].media_duration, //音频时长
|
|
|
+ };
|
|
|
+ articleImgRes.push(obj);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.curQue.option[index].mp3_list = JSON.parse(JSON.stringify(articleImgRes));
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
@@ -214,9 +290,9 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
- .close{
|
|
|
- width: 24px;
|
|
|
- cursor: pointer;
|
|
|
+ .close {
|
|
|
+ width: 24px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
</style>
|