|
@@ -1,9 +1,15 @@
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
- <div class="book-content-inner">
|
|
|
+ <div
|
|
|
+ class="book-content-inner"
|
|
|
+ :style="{ height: fromPhone ? 'auto' : '' }"
|
|
|
+ >
|
|
|
<div
|
|
|
id="content-tree"
|
|
|
- :class="[fullTree ? 'content-tree-full' : 'content-tree']"
|
|
|
+ :class="[
|
|
|
+ fullTree ? 'content-tree-full' : 'content-tree',
|
|
|
+ fromPhone ? 'content-tree-fromPhone' : '',
|
|
|
+ ]"
|
|
|
>
|
|
|
<h2 class="catelog"><!-- 目录 -->{{ $t("Key612") }}</h2>
|
|
|
<div style="padding-left: 8px">
|
|
@@ -16,108 +22,115 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-image :src="pictureUrl" fit="scale-down" class="img_url" v-if="!chapterId&&pictureUrl">
|
|
|
+ <template v-if="!fromPhone">
|
|
|
+ <el-image
|
|
|
+ :src="pictureUrl"
|
|
|
+ fit="scale-down"
|
|
|
+ class="img_url"
|
|
|
+ v-if="!chapterId && pictureUrl"
|
|
|
+ >
|
|
|
<div slot="placeholder" class="image-slot">
|
|
|
<img src="../assets/common/icon-imgloading.png" />
|
|
|
</div>
|
|
|
</el-image>
|
|
|
- <div
|
|
|
- id="data-screen"
|
|
|
- class="inner"
|
|
|
- v-if="chapterFree == 'true' || bookIsBuy == 'true'"
|
|
|
- >
|
|
|
- <!-- 显示答案按钮 -->
|
|
|
- <!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
|
|
|
- <!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
|
|
|
- <div v-if="chapterId" class="title-box">
|
|
|
- <img
|
|
|
- v-if="!treeFlag"
|
|
|
- src="../assets/common/icon-view-back.png"
|
|
|
- @click="treeShow"
|
|
|
- />
|
|
|
- <img
|
|
|
- v-if="!treeFlag"
|
|
|
- :src="
|
|
|
- fullTree
|
|
|
- ? require('../assets/common/icon-treelist-gray.png')
|
|
|
- : require('../assets/common/icon-treelist.png')
|
|
|
- "
|
|
|
- @click="chooseCourseware"
|
|
|
- />
|
|
|
- <!-- <h2 class="title">{{ chapterName }}</h2> -->
|
|
|
- <!-- <el-switch
|
|
|
+ <div
|
|
|
+ id="data-screen"
|
|
|
+ class="inner"
|
|
|
+ v-if="chapterFree == 'true' || bookIsBuy == 'true'"
|
|
|
+ >
|
|
|
+ <!-- 显示答案按钮 -->
|
|
|
+ <!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
|
|
|
+ <!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
|
|
|
+ <div v-if="chapterId" class="title-box">
|
|
|
+ <img
|
|
|
+ v-if="!treeFlag"
|
|
|
+ src="../assets/common/icon-view-back.png"
|
|
|
+ @click="treeShow"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ v-if="!treeFlag"
|
|
|
+ :src="
|
|
|
+ fullTree
|
|
|
+ ? require('../assets/common/icon-treelist-gray.png')
|
|
|
+ : require('../assets/common/icon-treelist.png')
|
|
|
+ "
|
|
|
+ @click="chooseCourseware"
|
|
|
+ />
|
|
|
+ <!-- <h2 class="title">{{ chapterName }}</h2> -->
|
|
|
+ <!-- <el-switch
|
|
|
v-if="!treeFlag"
|
|
|
v-model="switchvalue"
|
|
|
active-color="#FF9900"
|
|
|
active-text
|
|
|
inactive-text="生词模式"
|
|
|
/> -->
|
|
|
+ </div>
|
|
|
+ <template v-if="category == 'OC' || !category">
|
|
|
+ <Preview
|
|
|
+ v-if="chapterId && context"
|
|
|
+ ref="previewAnswer"
|
|
|
+ :context="context"
|
|
|
+ :bookAnswerContent="bookAnswerContent"
|
|
|
+ bookclientwidth="900"
|
|
|
+ :TaskModel="TaskModel"
|
|
|
+ @handleBookUserAnswer="handleBookUserAnswer"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-if="category == 'NPC'">
|
|
|
+ <Booknpc
|
|
|
+ v-if="chapterId && context"
|
|
|
+ ref="previewAnswer"
|
|
|
+ :context="context"
|
|
|
+ :currentTreeID="chapterId"
|
|
|
+ :FatherTreeData="FatherTreeData"
|
|
|
+ :change-id="changeId"
|
|
|
+ :themeColor="themeColor"
|
|
|
+ :isShowTitle="true"
|
|
|
+ :isAnswerItemShow="isAnswerItemShow"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-if="category == 'NNPE'">
|
|
|
+ <Booknnpe
|
|
|
+ v-if="chapterId && context"
|
|
|
+ ref="previewAnswer"
|
|
|
+ :context="context"
|
|
|
+ :currentTreeID="chapterId"
|
|
|
+ :FatherTreeData="FatherTreeData"
|
|
|
+ :change-id="changeId"
|
|
|
+ :themeColor="themeColor"
|
|
|
+ :isShowTitle="true"
|
|
|
+ :isAnswerItemShow="true"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-if="category == 'RLC'">
|
|
|
+ <Bookrlc
|
|
|
+ v-if="chapterId && context"
|
|
|
+ ref="previewAnswer"
|
|
|
+ :context="context"
|
|
|
+ :currentTreeID="chapterId"
|
|
|
+ :FatherTreeData="FatherTreeData"
|
|
|
+ :change-id="changeId"
|
|
|
+ :themeColor="themeColor"
|
|
|
+ :isShowTitle="true"
|
|
|
+ :bookFontSize="bookFontSize"
|
|
|
+ :isAnswerItemShow="isAnswerItemShow"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ <template v-if="category == 'NEW'">
|
|
|
+ <BookNew
|
|
|
+ v-if="chapterId && context"
|
|
|
+ ref="book"
|
|
|
+ :context="context"
|
|
|
+ :currentTreeID="chapterId"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
- <template v-if="category == 'OC' || !category">
|
|
|
- <Preview
|
|
|
- v-if="chapterId && context"
|
|
|
- ref="previewAnswer"
|
|
|
- :context="context"
|
|
|
- :bookAnswerContent="bookAnswerContent"
|
|
|
- bookclientwidth="900"
|
|
|
- :TaskModel="TaskModel"
|
|
|
- @handleBookUserAnswer="handleBookUserAnswer"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-if="category == 'NPC'">
|
|
|
- <Booknpc
|
|
|
- v-if="chapterId && context"
|
|
|
- ref="previewAnswer"
|
|
|
- :context="context"
|
|
|
- :currentTreeID="chapterId"
|
|
|
- :FatherTreeData="FatherTreeData"
|
|
|
- :change-id="changeId"
|
|
|
- :themeColor="themeColor"
|
|
|
- :isShowTitle="true"
|
|
|
- :isAnswerItemShow="isAnswerItemShow"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-if="category == 'NNPE'">
|
|
|
- <Booknnpe
|
|
|
- v-if="chapterId && context"
|
|
|
- ref="previewAnswer"
|
|
|
- :context="context"
|
|
|
- :currentTreeID="chapterId"
|
|
|
- :FatherTreeData="FatherTreeData"
|
|
|
- :change-id="changeId"
|
|
|
- :themeColor="themeColor"
|
|
|
- :isShowTitle="true"
|
|
|
- :isAnswerItemShow="true"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-if="category == 'RLC'">
|
|
|
- <Bookrlc
|
|
|
- v-if="chapterId && context"
|
|
|
- ref="previewAnswer"
|
|
|
- :context="context"
|
|
|
- :currentTreeID="chapterId"
|
|
|
- :FatherTreeData="FatherTreeData"
|
|
|
- :change-id="changeId"
|
|
|
- :themeColor="themeColor"
|
|
|
- :isShowTitle="true"
|
|
|
- :bookFontSize="bookFontSize"
|
|
|
- :isAnswerItemShow="isAnswerItemShow"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-if="category == 'NEW'">
|
|
|
- <BookNew
|
|
|
- v-if="chapterId && context"
|
|
|
- ref="book"
|
|
|
- :context="context"
|
|
|
- :currentTreeID="chapterId"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- <a
|
|
|
- v-if="chapterId && treeFlag"
|
|
|
- class="screen-full"
|
|
|
- @click="fullScreen()"
|
|
|
- />
|
|
|
+ <a
|
|
|
+ v-if="chapterId && treeFlag"
|
|
|
+ class="screen-full"
|
|
|
+ @click="fullScreen()"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<!-- <Preview :context="context" :queIndex="queIndex" /> -->
|
|
|
</div>
|
|
@@ -136,7 +149,7 @@ export default {
|
|
|
TreeView,
|
|
|
Preview,
|
|
|
},
|
|
|
- props: ["bookId", "bookIsBuy","bookFontSize","pictureUrl"],
|
|
|
+ props: ["bookId", "bookIsBuy", "bookFontSize", "pictureUrl", "fromPhone"],
|
|
|
data() {
|
|
|
return {
|
|
|
chapterId: "",
|
|
@@ -162,10 +175,13 @@ export default {
|
|
|
// const _this = this
|
|
|
// _this.bookId = this.$route.query.bookId
|
|
|
},
|
|
|
- created(){
|
|
|
- const _this = this
|
|
|
+ created() {
|
|
|
+ const _this = this;
|
|
|
let userInfor = JSON.parse(getToken());
|
|
|
- if (userInfor && (userInfor.user_type == "TEACHER"||userInfor.user_type == "INNER")) {
|
|
|
+ if (
|
|
|
+ userInfor &&
|
|
|
+ (userInfor.user_type == "TEACHER" || userInfor.user_type == "INNER")
|
|
|
+ ) {
|
|
|
_this.isAnswerItemShow = true;
|
|
|
} else {
|
|
|
_this.isAnswerItemShow = false;
|
|
@@ -315,6 +331,20 @@ export default {
|
|
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
+ .content-tree-fromPhone {
|
|
|
+ width: 100%;
|
|
|
+ border-right: none;
|
|
|
+ max-height: none;
|
|
|
+ background: rgba(249, 249, 249, 1);
|
|
|
+ border-radius: 16px;
|
|
|
+ padding: 10px;
|
|
|
+ .catelog {
|
|
|
+ padding: 0;
|
|
|
+ margin: 5px 20px;
|
|
|
+ font-size: 16px;
|
|
|
+ border-bottom: 1px solid rgba(153, 153, 153, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
.inner {
|
|
|
width: 1000px;
|
|
|
max-height: 700px;
|
|
@@ -466,9 +496,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-.img_url{
|
|
|
- width: 1000px;
|
|
|
- height: 700px;
|
|
|
+.img_url {
|
|
|
+ width: 1000px;
|
|
|
+ height: 700px;
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
@@ -487,4 +517,9 @@ export default {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
}
|
|
|
+.content-tree-fromPhone {
|
|
|
+ .el-tree {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|