|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="container">
|
|
|
+ <div class="container GCLS-BOOK-Container">
|
|
|
<template v-if="!type">
|
|
|
<Header />
|
|
|
<Nav nav-value="书籍预览" />
|
|
@@ -15,7 +15,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<div class="content">
|
|
|
- <div id="content-tree" class="content-tree">
|
|
|
+ <div id="content-tree" :class="[fullTree ? 'content-tree-full' : 'content-tree']">
|
|
|
<TreeView
|
|
|
ref="treeView"
|
|
|
:book-id="bookId"
|
|
@@ -31,17 +31,22 @@
|
|
|
<div v-if="chapterId" class="title-box">
|
|
|
<img
|
|
|
v-if="!treeFlag"
|
|
|
- src="../assets/common/icon-treelist.png"
|
|
|
+ src="../assets/common/icon-view-back.png"
|
|
|
@click="treeShow"
|
|
|
/>
|
|
|
+ <img
|
|
|
+ v-if="!treeFlag"
|
|
|
+ src="../assets/common/icon-treelist.png"
|
|
|
+ @click="chooseCourseware"
|
|
|
+ />
|
|
|
<!-- <h2 class="title">{{ chapterName }}</h2> -->
|
|
|
- <el-switch
|
|
|
+ <!-- <el-switch
|
|
|
v-if="!treeFlag"
|
|
|
v-model="switchvalue"
|
|
|
active-color="#FF9900"
|
|
|
active-text
|
|
|
inactive-text="生词模式"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
</div>
|
|
|
|
|
|
<template v-if="category == 'OC' || !category">
|
|
@@ -109,6 +114,7 @@ export default {
|
|
|
chapterId: "",
|
|
|
chapterName: "",
|
|
|
fullscreen: false, // 控制全屏
|
|
|
+ fullTree: false, // 全屏模式下树是否显示
|
|
|
context: null,
|
|
|
question: null, // 选择的模板题型
|
|
|
queIndex: "",
|
|
@@ -175,6 +181,10 @@ export default {
|
|
|
_this.chapterName = name;
|
|
|
_this.isAnswerShow = false;
|
|
|
_this.onGetData();
|
|
|
+ if (!_this.treeFlag) {
|
|
|
+ _this.fullTree = false;
|
|
|
+ document.getElementById("content-tree").style.display = "none";
|
|
|
+ }
|
|
|
},
|
|
|
// 点击全屏展示 隐藏tree
|
|
|
fullScreen() {
|
|
@@ -183,6 +193,7 @@ export default {
|
|
|
},
|
|
|
treeShow() {
|
|
|
this.treeFlag = true;
|
|
|
+ this.fullTree = false;
|
|
|
document.getElementById("content-tree").style.display = "block";
|
|
|
},
|
|
|
// 获取预览数据
|
|
@@ -238,6 +249,15 @@ export default {
|
|
|
handleBookUserAnswer(data) {
|
|
|
console.log(data);
|
|
|
},
|
|
|
+ // 悬浮树隐藏显示
|
|
|
+ chooseCourseware() {
|
|
|
+ this.fullTree = !this.fullTree;
|
|
|
+ if (this.fullTree) {
|
|
|
+ document.getElementById("content-tree").style.display = "block";
|
|
|
+ } else {
|
|
|
+ document.getElementById("content-tree").style.display = "none";
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -273,6 +293,17 @@ export default {
|
|
|
padding-top: 124px;
|
|
|
background: #fff;
|
|
|
}
|
|
|
+ .content-tree-full {
|
|
|
+ position: fixed;
|
|
|
+ top: 100px;
|
|
|
+ left: 152px;
|
|
|
+ max-height: 588px;
|
|
|
+ overflow: auto;
|
|
|
+ z-index: 999;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25);
|
|
|
+ border-radius: 4px;
|
|
|
+ }
|
|
|
.inner {
|
|
|
// border-left: 1px solid #d9d9d9;
|
|
|
width: 1000px;
|
|
@@ -389,16 +420,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .screen-full {
|
|
|
- position: fixed;
|
|
|
- right: 30px;
|
|
|
- bottom: 30px;
|
|
|
- width: 48px;
|
|
|
- height: 48px;
|
|
|
- background: rgba(0, 0, 0, 0.4) url("../assets/common/icon-screenFull.png")
|
|
|
- center no-repeat;
|
|
|
- background-size: 32px;
|
|
|
- }
|
|
|
}
|
|
|
.answerShow {
|
|
|
position: absolute;
|
|
@@ -427,6 +448,18 @@ export default {
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
+.GCLS-BOOK-Container{
|
|
|
+ .screen-full {
|
|
|
+ position: fixed;
|
|
|
+ right: 30px;
|
|
|
+ bottom: 30px;
|
|
|
+ width: 48px;
|
|
|
+ height: 48px;
|
|
|
+ background: rgba(0, 0, 0, 0.4) url("../assets/common/icon-screenFull.png")
|
|
|
+ center no-repeat;
|
|
|
+ background-size: 32px;
|
|
|
+ }
|
|
|
+}
|
|
|
.title-box {
|
|
|
.el-switch {
|
|
|
position: absolute;
|