|
@@ -22,39 +22,59 @@
|
|
|
<div class="NPC-sentence-Segword">
|
|
|
<SentenceSegwordChs :curQue="curQueItem.detail" />
|
|
|
</div>
|
|
|
- <div class="adult-book-input-item" v-if="type == 'sentence_input'">
|
|
|
- <span class="adult-book-lable">答案:</span>
|
|
|
- <div
|
|
|
- class="NPC-sentence-input-box"
|
|
|
- v-for="(ansItem, ansIndex) in curQueItem.answer"
|
|
|
- :key="'answer' + ansIndex"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- class="adult-book-input"
|
|
|
- type="textarea"
|
|
|
- autosize
|
|
|
- placeholder="请输入答案"
|
|
|
- v-model="curQueItem.answer[ansIndex]"
|
|
|
- @blur="onBlurIndex(ansIndex, 'answer')"
|
|
|
- ></el-input>
|
|
|
- <div class="adult-book-del-icon">
|
|
|
- <i class="el-icon-circle-close"></i>
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">英文:</span>
|
|
|
+ <el-input
|
|
|
+ size="small"
|
|
|
+ class="adult-book-input"
|
|
|
+ placeholder="请输入句子翻译"
|
|
|
+ v-model="curQueItem.en"
|
|
|
+ @blur="onBlur(curQueItem, 'en')"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <template v-if="type == 'sentence_input'">
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">答案:</span>
|
|
|
+ <div>
|
|
|
+ <div
|
|
|
+ class="NPC-sentence-input-box"
|
|
|
+ v-for="(ansItem, ansIndex) in curQueItem.answer"
|
|
|
+ :key="'answer' + ansIndex"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ class="adult-book-input"
|
|
|
+ type="textarea"
|
|
|
+ autosize
|
|
|
+ placeholder="请输入答案"
|
|
|
+ v-model="curQueItem.answer[ansIndex]"
|
|
|
+ @blur="onBlurIndex(ansIndex, 'answer')"
|
|
|
+ ></el-input>
|
|
|
+ <div class="adult-book-del-icon" @click="delAnswer(ansIndex)">
|
|
|
+ <i class="el-icon-circle-close"></i>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="adult-book-input-item" style="padding-left: 80px">
|
|
|
- <el-button size="mini" type="primary" icon="el-icon-plus"
|
|
|
- >添加答案</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
+ <div class="adult-book-input-item" style="padding-left: 80px">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="addAnswer"
|
|
|
+ >添加答案</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<div class="adult-book-input-item" v-if="type == 'sentence_judge'">
|
|
|
<span class="adult-book-lable">判断:</span>
|
|
|
- <el-radio v-model="curQueItem.judge" :label="true">正确</el-radio>
|
|
|
- <el-radio v-model="curQueItem.judge" :label="false">错误</el-radio>
|
|
|
+ <el-radio-group v-model="curQueItem.judge">
|
|
|
+ <el-radio :lable="true" :label="true">正确</el-radio>
|
|
|
+ <el-radio :lable="false" :label="false">错误</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
</div>
|
|
|
<div class="adult-book-input-item" v-if="type == 'sentence_record'">
|
|
|
<span class="adult-book-lable">录音组件:</span>
|
|
|
- <img src="../../../assets/adult/mini.png" alt="" />
|
|
|
+ <img src="../../../assets/adult/mini.png" class="adult-record-min" />
|
|
|
</div>
|
|
|
<div class="adult-book-input-item" v-if="type == 'recordHZ_inputPY_chs'">
|
|
|
<span>录音</span>
|
|
@@ -67,8 +87,8 @@
|
|
|
>
|
|
|
<img src="../../../assets/adult/pro-plus.png" alt="" />
|
|
|
</div>
|
|
|
- <div class="adult-book-input-item" v-if="type == 'inputItem_chs'">
|
|
|
- <span class="adult-book-lable">音频</span>
|
|
|
+ <div class="adult-book-input-item">
|
|
|
+ <span class="adult-book-lable">音频:</span>
|
|
|
<Upload
|
|
|
:changeFillId="changeMp3"
|
|
|
:datafileList="fileCon.mp3_list"
|
|
@@ -107,16 +127,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {},
|
|
|
- watch: {
|
|
|
- // checkList: {
|
|
|
- // handler: function (val, oldVal) {
|
|
|
- // const _this = this;
|
|
|
- // _this.checkListRes = val;
|
|
|
- // },
|
|
|
- // // 深度观察监听
|
|
|
- // deep: true,
|
|
|
- // },
|
|
|
- },
|
|
|
+ watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
onBlur(item, field) {
|
|
@@ -144,22 +155,6 @@ export default {
|
|
|
changeIsAnswer(type) {
|
|
|
this.changAnswer(this.index, type);
|
|
|
},
|
|
|
- // 点击生成拼音
|
|
|
- getPinyin(item) {
|
|
|
- let bool = false;
|
|
|
- let value = "";
|
|
|
- if (item.hanzi == "") {
|
|
|
- this.$message.warning("请先输入内容,再生成拼音");
|
|
|
- bool = true;
|
|
|
- } else {
|
|
|
- value = item.hanzi;
|
|
|
- }
|
|
|
- if (bool) {
|
|
|
- return;
|
|
|
- }
|
|
|
- let result = pinyinUtil.getPinyin(value);
|
|
|
- item.pinyin = result;
|
|
|
- },
|
|
|
changeMp3(fileList) {
|
|
|
const articleImgList = JSON.parse(JSON.stringify(fileList));
|
|
|
const articleImgRes = [];
|
|
@@ -176,35 +171,18 @@ export default {
|
|
|
});
|
|
|
this.curQueItem.mp3_list = JSON.parse(JSON.stringify(articleImgRes));
|
|
|
},
|
|
|
- changeImage(fileList) {
|
|
|
- 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.articleImgList = articleImgRes;
|
|
|
- this.curQueItem.img_list = JSON.parse(JSON.stringify(articleImgRes));
|
|
|
- },
|
|
|
- //添加释义
|
|
|
- addDef() {
|
|
|
- let leg = this.curQueItem.definition_list.length;
|
|
|
- let last = this.curQueItem.definition_list[leg - 1];
|
|
|
+ //添加答案
|
|
|
+ addAnswer() {
|
|
|
+ let leg = this.curQueItem.answer.length;
|
|
|
+ let last = this.curQueItem.answer[leg - 1];
|
|
|
if (!last) {
|
|
|
- this.$message.warning("请填写");
|
|
|
+ this.$message.warning("请先填写完整");
|
|
|
return;
|
|
|
}
|
|
|
- this.curQueItem.definition_list.push("");
|
|
|
+ this.curQueItem.answer.push("");
|
|
|
},
|
|
|
- delDef(defIndex) {
|
|
|
- this.curQueItem.definition_list.splice(defIndex, 1);
|
|
|
+ delAnswer(ansIndex) {
|
|
|
+ this.curQueItem.answer.splice(ansIndex, 1);
|
|
|
},
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -254,26 +232,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- &-SentenceModule {
|
|
|
- // display: flex;
|
|
|
- // justify-content: flex-start;
|
|
|
- // align-items: center;
|
|
|
- > .adult-book-input-item {
|
|
|
- display: flex;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
- margin-right: 10px;
|
|
|
- > span {
|
|
|
- line-height: 32px;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- }
|
|
|
- .NPC-sentence-Segword {
|
|
|
- margin-top: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
&-mp3 {
|
|
|
margin-top: 6px;
|
|
|
span {
|
|
@@ -290,6 +248,7 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
align-items: flex-start;
|
|
|
+ margin-bottom: 10px;
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|