|
@@ -65,6 +65,8 @@
|
|
|
:is-show-save="showSaveFlag"
|
|
|
:book-answer-content="bookAnswerContent"
|
|
|
:is-answer-item-show="isAnswerItemShow"
|
|
|
+ :previewType="previewType"
|
|
|
+ :previewGroupId="previewGroupId"
|
|
|
@finishTaskMaterial="finishTaskMaterial"
|
|
|
/>
|
|
|
</template>
|
|
@@ -182,6 +184,13 @@ export default {
|
|
|
BusinessID: this.$route.query.BusinessID
|
|
|
? this.$route.query.BusinessID
|
|
|
: "",
|
|
|
+ previewType:
|
|
|
+ this.$route.query.ViewMode && this.$route.query.ViewMode === "Select"
|
|
|
+ ? "previewCheck"
|
|
|
+ : "previewCheckShow",
|
|
|
+ previewGroupId: this.$route.query.CoursewareGroupIDSelectedInfo
|
|
|
+ ? this.$route.query.CoursewareGroupIDSelectedInfo
|
|
|
+ : "[]",
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -216,7 +225,18 @@ export default {
|
|
|
|
|
|
_this.changeId();
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ const _this = this;
|
|
|
+ window.addEventListener(
|
|
|
+ "message",
|
|
|
+ function (event) {
|
|
|
+ if (event.data === "Selected") {
|
|
|
+ _this.finishPreviewGroupIds();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ false
|
|
|
+ );
|
|
|
+ },
|
|
|
methods: {
|
|
|
back() {
|
|
|
this.$router.go(-1);
|
|
@@ -350,6 +370,12 @@ export default {
|
|
|
finishPreviewGroupId() {
|
|
|
this.$refs.previewBook.submitPreviewGroupId();
|
|
|
},
|
|
|
+ // 给父级返回选中课件内容id
|
|
|
+ finishPreviewGroupIds() {
|
|
|
+ let CoursewareGroupIDSelectedInfo =
|
|
|
+ this.$refs.previewBook.submitPreviewGroupId();
|
|
|
+ window.parent.postMessage(CoursewareGroupIDSelectedInfo, "*");
|
|
|
+ },
|
|
|
// 获取用户答题信息
|
|
|
getUserAnswer() {
|
|
|
this.loading = true;
|