|
@@ -14,11 +14,22 @@
|
|
:current-tree-i-d="chapterId"
|
|
:current-tree-i-d="chapterId"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<div
|
|
<div
|
|
id="data-screen"
|
|
id="data-screen"
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
:class="['inner', fullscreen ? 'inner-full' : '']"
|
|
:class="['inner', fullscreen ? 'inner-full' : '']"
|
|
>
|
|
>
|
|
|
|
+ <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>
|
|
<!-- 显示答案按钮 -->
|
|
<!-- 显示答案按钮 -->
|
|
<!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
|
|
<!-- <a v-if="chapterId" :class="['answerShow',isAnswerShow?'answerShowTrue':'']" @click="handleAnswerShow">显示答案</a> -->
|
|
<!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
|
|
<!-- <a class="edit-btn" @click="handleEdit">编辑</a> -->
|
|
@@ -56,7 +67,7 @@
|
|
:is-show-title="true"
|
|
:is-show-title="true"
|
|
:book-answer-content="bookAnswerContent"
|
|
:book-answer-content="bookAnswerContent"
|
|
:task-model="TaskModel"
|
|
:task-model="TaskModel"
|
|
- :is-show-save="false"
|
|
|
|
|
|
+ :is-show-save="true"
|
|
:isAnswerItemShow="isAnswerItemShow"
|
|
:isAnswerItemShow="isAnswerItemShow"
|
|
@finishTaskMaterial="finishTaskMaterial"
|
|
@finishTaskMaterial="finishTaskMaterial"
|
|
/>
|
|
/>
|
|
@@ -73,7 +84,7 @@
|
|
<script>
|
|
<script>
|
|
import Header from "@/components/Header.vue";
|
|
import Header from "@/components/Header.vue";
|
|
import TreeView from "@/components/TreeView";
|
|
import TreeView from "@/components/TreeView";
|
|
-import { getContent } from "@/api/ajax";
|
|
|
|
|
|
+import { getContent, TextbookAPI } from "@/api/ajax";
|
|
import Cookies from "js-cookie";
|
|
import Cookies from "js-cookie";
|
|
import Preview from "@/components/Adult/Preview.vue";
|
|
import Preview from "@/components/Adult/Preview.vue";
|
|
import { getToken } from "../utils/auth";
|
|
import { getToken } from "../utils/auth";
|
|
@@ -82,7 +93,7 @@ export default {
|
|
components: {
|
|
components: {
|
|
Header,
|
|
Header,
|
|
TreeView,
|
|
TreeView,
|
|
- Preview,
|
|
|
|
|
|
+ Preview
|
|
},
|
|
},
|
|
props: [],
|
|
props: [],
|
|
data() {
|
|
data() {
|
|
@@ -104,12 +115,12 @@ export default {
|
|
[
|
|
[
|
|
{
|
|
{
|
|
data: {
|
|
data: {
|
|
- Bookanswer: [],
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
|
|
+ Bookanswer: []
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ ]
|
|
|
|
+ }
|
|
],
|
|
],
|
|
bookAnswerContent: "",
|
|
bookAnswerContent: "",
|
|
TaskModel: "", // TEST 考试模式; PRACTICE 练习模式; ANSWER 查看答案模式; 空 预览模式
|
|
TaskModel: "", // TEST 考试模式; PRACTICE 练习模式; ANSWER 查看答案模式; 空 预览模式
|
|
@@ -119,6 +130,8 @@ export default {
|
|
loading: false,
|
|
loading: false,
|
|
fullTree: false, // 全屏模式下树是否显示
|
|
fullTree: false, // 全屏模式下树是否显示
|
|
isAnswerItemShow: false,
|
|
isAnswerItemShow: false,
|
|
|
|
+ previewType: "previewCheck",
|
|
|
|
+ pictureUrl: ""
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -133,8 +146,21 @@ export default {
|
|
} else {
|
|
} else {
|
|
_this.isAnswerItemShow = false;
|
|
_this.isAnswerItemShow = false;
|
|
}
|
|
}
|
|
|
|
+ _this.getdetail();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getdetail() {
|
|
|
|
+ let Mname = "book-book_manager-GetBook";
|
|
|
|
+ // 获取课程详情
|
|
|
|
+ TextbookAPI(Mname, {
|
|
|
|
+ id: this.bookId
|
|
|
|
+ })
|
|
|
|
+ .then(res => {
|
|
|
|
+ this.pictureUrl = res.picture_url;
|
|
|
|
+ debugger;
|
|
|
|
+ })
|
|
|
|
+ .catch(res => {});
|
|
|
|
+ },
|
|
changeTreeData(val) {
|
|
changeTreeData(val) {
|
|
this.FatherTreeData = JSON.parse(JSON.stringify(val));
|
|
this.FatherTreeData = JSON.parse(JSON.stringify(val));
|
|
},
|
|
},
|
|
@@ -170,10 +196,10 @@ export default {
|
|
_this.context = null;
|
|
_this.context = null;
|
|
const MethodName = "book-courseware_manager-GetCoursewareContent_View";
|
|
const MethodName = "book-courseware_manager-GetCoursewareContent_View";
|
|
const data = {
|
|
const data = {
|
|
- id: _this.chapterId,
|
|
|
|
|
|
+ id: _this.chapterId
|
|
};
|
|
};
|
|
getContent(MethodName, data)
|
|
getContent(MethodName, data)
|
|
- .then((res) => {
|
|
|
|
|
|
+ .then(res => {
|
|
_this.loading = false;
|
|
_this.loading = false;
|
|
this.category = res.category;
|
|
this.category = res.category;
|
|
this.themeColor = res.book_theme_color;
|
|
this.themeColor = res.book_theme_color;
|
|
@@ -186,7 +212,7 @@ export default {
|
|
? JSON.parse(res.content).question.ui_type
|
|
? JSON.parse(res.content).question.ui_type
|
|
: "",
|
|
: "",
|
|
sort_number: 1,
|
|
sort_number: 1,
|
|
- content: JSON.parse(res.content),
|
|
|
|
|
|
+ content: JSON.parse(res.content)
|
|
};
|
|
};
|
|
} else if (this.category == "NPC") {
|
|
} else if (this.category == "NPC") {
|
|
_this.context = JSON.parse(res.content);
|
|
_this.context = JSON.parse(res.content);
|
|
@@ -232,8 +258,8 @@ export default {
|
|
console.log("答题时间" + time);
|
|
console.log("答题时间" + time);
|
|
console.log("答对个数" + rightNumber);
|
|
console.log("答对个数" + rightNumber);
|
|
console.log("答错个数" + errorNumber);
|
|
console.log("答错个数" + errorNumber);
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -256,6 +282,8 @@ export default {
|
|
top: 0px;
|
|
top: 0px;
|
|
left: 0;
|
|
left: 0;
|
|
padding-top: 64px;
|
|
padding-top: 64px;
|
|
|
|
+ z-index: 2;
|
|
|
|
+ background: #fff;
|
|
}
|
|
}
|
|
.content-tree-full {
|
|
.content-tree-full {
|
|
position: fixed;
|
|
position: fixed;
|
|
@@ -422,6 +450,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.img_url {
|
|
|
|
+ width: 1000px;
|
|
|
|
+ height: 700px;
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
.title-box {
|
|
.title-box {
|