CourseWarePage.vue 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <template>
  2. <i class="el-icon-star-off"></i>
  3. <!--<el-row id="manage-page-body">-->
  4. <!-- <el-col :span="3">-->
  5. <!-- <el-menu background-color="#f8f9fb" default-active="1" style="position: fixed;"-->
  6. <!-- @select="handleSelect">-->
  7. <!-- <el-menu-item index="0">-->
  8. <!-- <el-icon>-->
  9. <!-- <Back/>-->
  10. <!-- </el-icon>-->
  11. <!-- <span style="padding-left: 20px">返回首页</span>-->
  12. <!-- </el-menu-item>-->
  13. <!-- <el-menu-item index="1">-->
  14. <!-- <el-icon>-->
  15. <!-- <Document/>-->
  16. <!-- </el-icon>-->
  17. <!-- <span style="padding-left: 20px">全部课程</span>-->
  18. <!-- </el-menu-item>-->
  19. <!-- </el-menu>-->
  20. <!-- </el-col>-->
  21. <!-- <el-col :span="1"/>-->
  22. <!-- <el-col :span="18">-->
  23. <!-- <div class="pdf-reader">-->
  24. <!-- <pdf-viewer></pdf-viewer>-->
  25. <!-- <pointer-canvas ref="pointerCanvas" :no-pointer="!pointer" :no-box="!box"></pointer-canvas>-->
  26. <!-- <div class="pointer-actions">-->
  27. <!-- <c-button text :theme="pointer ? 'red' : ''" @click="pointer = !pointer">-->
  28. <!-- <i class="el-icon-edit"/> 指针</c-button>-->
  29. <!-- <c-button text :left="8" :theme="box ? 'blue' : ''" @click="box = !box">-->
  30. <!-- <i class="el-icon-crop"/> 框选</c-button>-->
  31. <!-- <c-button text :left="8" theme="orange" @click="cleanCanvas">-->
  32. <!-- <i class="el-icon-refresh-left"/> 清除</c-button>-->
  33. <!-- </div>-->
  34. <!-- </div>-->
  35. <!-- </el-col>-->
  36. <!--</el-row>-->
  37. </template>
  38. <script>
  39. export default {
  40. name: "CourseWarePage",
  41. };
  42. // import PdfViewer from "@/components/PDF/PdfViewer";
  43. // import { mapState } from "vuex";
  44. // import {
  45. // FOCUS_ON_INPUT,
  46. // NEXT_PAGE,
  47. // PREVIOUS_PAGE,
  48. // RESET, SET_CURRENT_PAGE,
  49. // SET_SRC,
  50. // TOGGLE_SHOW_DISCUSSION,
  51. // USE_FOCUS
  52. // } from "@/store/types/pdf-types";
  53. // import PointerCanvas from "@/components/PDF/PointerCanvas";
  54. // import CButton from "@/components/Basic/CButton";
  55. //
  56. // export default {
  57. // components: {CButton, PointerCanvas, PdfViewer},
  58. // computed: {
  59. // ...mapState({
  60. // src: state => state.pdf.src,
  61. // focus: state => state.pdf.focus
  62. // })
  63. // },
  64. // data () {
  65. // return {
  66. // pointer: false,
  67. // box: false,
  68. // slide: {}
  69. // };
  70. // },
  71. // mounted () {
  72. // console.log("coursewarepage");
  73. // this.$store.commit(RESET);
  74. // let { page } = this.$route.params;
  75. // if (page) {
  76. // this.$store.commit(SET_CURRENT_PAGE, { currentPage: parseInt(page) });
  77. // }
  78. // const _slideId = this.$route.params.slideId;
  79. // this.$apis.getSlideInfo({ slideId: _slideId }).then(res => {
  80. // this.slide = res;
  81. // }).catch(err => {
  82. // //this.$setErrorMessage(err.response.data.msg)
  83. // });
  84. // this.$apis.getSlideUrl({ slideId: _slideId }).then(res => {
  85. // console.log(this.$apis.getSlideUrl({ slideId: _slideId }));
  86. // this.$store.commit(SET_SRC, { src: res });
  87. // }).catch(err => {
  88. // //this.$setErrorMessage('获取课件链接的过程中:' + err.response.data.msg)
  89. // });
  90. // window.addEventListener("keydown", this.handleKey);
  91. // },
  92. // beforeUnmount () {
  93. // window.removeEventListener("keydown", this.handleKey);
  94. // },
  95. // methods: {
  96. // handleSelect(index) {
  97. // if (index === "0") {
  98. // this.$router.push("portal");
  99. // }
  100. // if (index === "1") {
  101. // document.getElementById("app").scrollIntoView({behavior: "smooth"});
  102. // }
  103. // },
  104. // handleKey (e) {
  105. // if (e.key === "Enter") {
  106. // !this.showDiscussion && this.$store.commit(TOGGLE_SHOW_DISCUSSION);
  107. // !this.focus && this.$store.commit(FOCUS_ON_INPUT);
  108. // return;
  109. // }
  110. // if (e.key === "Escape") {
  111. // if (this.focus) {
  112. // this.$store.commit(USE_FOCUS);
  113. // } else {
  114. // this.$store.commit(TOGGLE_SHOW_DISCUSSION);
  115. // }
  116. // return;
  117. // }
  118. // if (!this.showDiscussion || !this.focus) {
  119. // switch (e.key) {
  120. // case "ArrowDown":
  121. // case "ArrowRight":
  122. // case "s":
  123. // case "d":
  124. // case " ":
  125. // this.$store.commit(NEXT_PAGE);
  126. // break;
  127. // case "ArrowUp":
  128. // case "ArrowLeft":
  129. // case "w":
  130. // case "a":
  131. // this.$store.commit(PREVIOUS_PAGE);
  132. // break;
  133. // case "c":
  134. // this.cleanCanvas();
  135. // break;
  136. // case "q":
  137. // case "z":
  138. // this.$refs.pointerCanvas.undo();
  139. // break;
  140. // case "e":
  141. // case "y":
  142. // this.$refs.pointerCanvas.redo();
  143. // break;
  144. // case "[":
  145. // case "b":
  146. // this.box = !this.box;
  147. // break;
  148. // case "p":
  149. // case "v":
  150. // this.pointer = !this.pointer;
  151. // break;
  152. // }
  153. // }
  154. // },
  155. // cleanCanvas () {
  156. // this.$refs.pointerCanvas.cleanCanvas();
  157. // }
  158. // },
  159. // };
  160. </script>
  161. <!--<style lang="scss" scoped>-->
  162. <!-- .pdf-reader {-->
  163. <!-- display: flex;-->
  164. <!-- align-items: center;-->
  165. <!-- justify-content: center;-->
  166. <!-- min-height: 100vh;-->
  167. <!-- }-->
  168. <!-- .icon-button {-->
  169. <!-- z-index: 2;-->
  170. <!-- position: absolute;-->
  171. <!-- left: 16px;-->
  172. <!-- top: 16px;-->
  173. <!-- background-color: rgba(218, 234, 250, 0.4);-->
  174. <!-- backdrop-filter: saturate(150%) blur(20px);-->
  175. <!-- &:hover {-->
  176. <!-- background-color: rgba(218, 234, 250, 0.67);-->
  177. <!-- }-->
  178. <!-- }-->
  179. <!-- .show-discussion, .hide-discussion {-->
  180. <!-- transition: .2s;-->
  181. <!-- }-->
  182. <!-- .hide-discussion {-->
  183. <!-- transform: translateY(100%);-->
  184. <!-- opacity: 0;-->
  185. <!-- }-->
  186. <!-- .pointer-actions {-->
  187. <!-- position: fixed;-->
  188. <!-- left: 6px;-->
  189. <!-- bottom: 8px;-->
  190. <!-- .c-button {-->
  191. <!-- background-color: white;-->
  192. <!-- }-->
  193. <!-- }-->
  194. <!--</style>-->