|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="cread" v-loading="loading">
|
|
|
- <Header :projectShow="true" />
|
|
|
+ <Header :projectShow="true" v-if="!userID" />
|
|
|
<div class="main" v-if="!isPreview">
|
|
|
<div class="from">
|
|
|
<div class="type">
|
|
@@ -141,7 +141,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="preview_dv" v-if="isPreview">
|
|
|
+ <div class="preview_dv" v-if="isPreview" :style="{ top: userID ? '0' : '' }">
|
|
|
<img class="close" src="../../assets/teacherdev/creadCad-close.png" alt="" @click="closepreviewEvent" />
|
|
|
<div class="preview_main">
|
|
|
<img
|
|
@@ -230,6 +230,7 @@ export default {
|
|
|
saveShow: false,
|
|
|
writetableShow: true,
|
|
|
hzDetailList: null,
|
|
|
+ userID: this.$route.query.userID ? this.$route.query.userID : '',
|
|
|
};
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -280,12 +281,14 @@ export default {
|
|
|
type: this.typeIndex == 0 ? 'WORD' : 'SENTENCE',
|
|
|
text: this.from.content,
|
|
|
content: JSON.stringify(this.writeTableData),
|
|
|
+ app_user_id: this.userID,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
this.$router.replace({
|
|
|
path: '/wordcard/cread',
|
|
|
query: {
|
|
|
id: res.id,
|
|
|
+ userID: this.userID,
|
|
|
},
|
|
|
});
|
|
|
this.loading.close();
|
|
@@ -373,7 +376,12 @@ export default {
|
|
|
if (this.writeTableData) {
|
|
|
let str = JSON.stringify(this.writeTableData);
|
|
|
localStorage.setItem('writeTableData', str);
|
|
|
- this.$router.replace('/wordcard/print');
|
|
|
+ this.$router.replace({
|
|
|
+ path: '/wordcard/print',
|
|
|
+ query: {
|
|
|
+ userID: this.userID,
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -617,27 +625,27 @@ export default {
|
|
|
audio_file_obj[item.con] = res.file_id;
|
|
|
}
|
|
|
});
|
|
|
- // let data = {
|
|
|
- // query: item.con,
|
|
|
- // };
|
|
|
- // getHZChineseInfo(data).then((res) => {
|
|
|
- // let dataDetail = res.data.result;
|
|
|
- // if (dataDetail && dataDetail.length > 0) {
|
|
|
- // dataDetail.forEach((item) => {
|
|
|
- // if (item.request.queryType == 'entity') {
|
|
|
- // // 读音
|
|
|
- // item.response.entity.forEach((items) => {
|
|
|
- // items.attrs.forEach((itemss) => {
|
|
|
- // if (itemss.key == 'pronunciation') {
|
|
|
- // // 音频
|
|
|
- // audio_file_obj[item.con] = itemss.objects[0]['@value'] ? itemss.objects[0]['@value'] : '';
|
|
|
- // }
|
|
|
- // });
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // });
|
|
|
+ let data = {
|
|
|
+ query: item.con,
|
|
|
+ };
|
|
|
+ getHZChineseInfo(data).then((res) => {
|
|
|
+ let dataDetail = res.data.result;
|
|
|
+ if (dataDetail && dataDetail.length > 0) {
|
|
|
+ dataDetail.forEach((item) => {
|
|
|
+ if (item.request.queryType == 'entity') {
|
|
|
+ // 读音
|
|
|
+ item.response.entity.forEach((items) => {
|
|
|
+ items.attrs.forEach((itemss) => {
|
|
|
+ if (itemss.key == 'pronunciation') {
|
|
|
+ // 音频
|
|
|
+ audio_file_obj[item.con] = itemss.objects[0]['@value'] ? itemss.objects[0]['@value'] : '';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
data.option.forEach((item) => {
|