|
@@ -10,7 +10,7 @@
|
|
|
toolbar="fontselect fontsizeselect forecolor backcolor | underline | bold italic strikethrough alignleft aligncenter alignright"
|
|
|
/>
|
|
|
</div>
|
|
|
- <el-table :data="data.option" border style="width: 100%">
|
|
|
+ <el-table :data="data.new_word_list" border style="width: 100%">
|
|
|
<el-table-column fixed prop="number" label="序号" width="70">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-model="scope.row.number" />
|
|
@@ -245,47 +245,51 @@ export default {
|
|
|
this.data.lrc_arr = [];
|
|
|
},
|
|
|
uploads(file_id, index) {
|
|
|
- this.data.option[index].mp3_list = file_id;
|
|
|
+ this.data.new_word_list[index].mp3_list = file_id;
|
|
|
},
|
|
|
deleteFiles(file_id, index) {
|
|
|
- this.data.option[index].mp3_list = '';
|
|
|
+ this.data.new_word_list[index].mp3_list = '';
|
|
|
},
|
|
|
uploadPic(file_id, index) {
|
|
|
- this.data.option[index].file_list[0] = file_id;
|
|
|
+ this.data.new_word_list[index].file_list[0] = file_id;
|
|
|
},
|
|
|
deletePic(file_id, index) {
|
|
|
- this.data.option[index].file_list[0] = '';
|
|
|
+ this.data.new_word_list[index].file_list[0] = '';
|
|
|
},
|
|
|
// 自动生成音频
|
|
|
handleMatic(index) {
|
|
|
GetStaticResources('tool-TextToVoiceFile', {
|
|
|
- text: this.data.option[index].new_word.replace(/<[^>]+>/g, ''),
|
|
|
+ text: this.data.new_word_list[index].new_word.replace(/<[^>]+>/g, ''),
|
|
|
})
|
|
|
.then(({ status, file_id }) => {
|
|
|
if (status === 1) {
|
|
|
- this.data.option[index].mp3_list = file_id;
|
|
|
+ this.data.new_word_list[index].mp3_list = file_id;
|
|
|
}
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
// 删除行
|
|
|
handleDelete(index) {
|
|
|
- this.data.option.splice(index, 1);
|
|
|
+ this.data.new_word_list.splice(index, 1);
|
|
|
},
|
|
|
// 上移下移
|
|
|
moveElement(dItem, index, type) {
|
|
|
let obj = JSON.parse(JSON.stringify(dItem));
|
|
|
if (type == 'up' && index > 0) {
|
|
|
- this.data.option.splice(index - 1, 0, obj);
|
|
|
- this.data.option.splice(index + 1, 1);
|
|
|
+ this.data.new_word_list.splice(index - 1, 0, obj);
|
|
|
+ this.data.new_word_list.splice(index + 1, 1);
|
|
|
}
|
|
|
- if (type == 'down' && index < this.data.option.length - 1) {
|
|
|
- this.data.option[index] = this.data.option.splice(index + 1, 1, this.data.option[index])[0];
|
|
|
+ if (type == 'down' && index < this.data.new_word_list.length - 1) {
|
|
|
+ this.data.new_word_list[index] = this.data.new_word_list.splice(
|
|
|
+ index + 1,
|
|
|
+ 1,
|
|
|
+ this.data.new_word_list[index],
|
|
|
+ )[0];
|
|
|
}
|
|
|
},
|
|
|
// 增加
|
|
|
addElement() {
|
|
|
- this.data.option.push(getOption());
|
|
|
+ this.data.new_word_list.push(getOption());
|
|
|
},
|
|
|
// 获取数据
|
|
|
handleBlurCon(row) {
|