BookPreview.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div class="book-preview">
  3. <ProjectMenu cur-key="book" />
  4. <CommonPreview ref="preview" :project-id="project_id" :is-show-audit="false" :is-book="true">
  5. <template #operator="{ courseware }">
  6. <span class="link">查看教材信息</span>
  7. <span v-if="isTrue(courseware.is_can_request_xiajia)" class="link">申请下架</span>
  8. <span class="link" @click="goBackToProjectList">返回教材列表</span>
  9. </template>
  10. </CommonPreview>
  11. </div>
  12. </template>
  13. <script>
  14. import ProjectMenu from '@/views/project_manage/common/ProjectMenu.vue';
  15. import CommonPreview from '@/components/CommonPreview.vue';
  16. import { isTrue } from '@/utils/common';
  17. export default {
  18. name: 'BookPreview',
  19. components: {
  20. ProjectMenu,
  21. CommonPreview,
  22. },
  23. data() {
  24. return {
  25. project_id: this.$route.params.projectId || '',
  26. isTrue,
  27. };
  28. },
  29. methods: {
  30. goBackToProjectList() {
  31. this.$router.push({ path: '/project_manage/book' });
  32. },
  33. },
  34. };
  35. </script>
  36. <style lang="scss" scoped>
  37. @use '@/styles/mixin.scss' as *;
  38. .book-preview {
  39. @include page-content(true);
  40. }
  41. </style>