Explorar o código

fix: 修改空界面导致无法上线部署的bug

chillqi %!s(int64=4) %!d(string=hai) anos
pai
achega
d4329ea4a3

+ 89 - 88
src/components/Basic/CButton.vue

@@ -1,95 +1,96 @@
-<!--<template>-->
+<template>
+    <el-button></el-button>
 <!--  <button class="c-button" :style="style" :class="classList" @click="$emit('click')">-->
 <!--    <c-icon :bold="!noBold" :right="6" :left="-4" v-if="icon" class="icon" :size="20">{{icon}}</c-icon>-->
 <!--    <slot></slot>-->
 <!--  </button>-->
-<!--</template>-->
-
-<!--<script>-->
-<!--import CIcon from "@/components/Basic/CIcon";-->
-
-<!--export default {-->
-<!--  components: { CIcon },-->
-<!--  // props: ['icon', 'noClickWarn']-->
-<!--  props: {-->
-<!--    icon: {-->
-<!--      type: String,-->
-<!--      default: null-->
-<!--    },-->
-<!--    noClickWarn: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    theme: {-->
-<!--      type: String,-->
-<!--      default: "normal"-->
-<!--    },-->
-<!--    // 背景透明的按钮-->
-<!--    text: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    // 使用白色字体、深色背景的最显眼按钮,优先级大于 text-->
-<!--    standout: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    // 占满宽度-->
-<!--    block: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    small: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    large: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    // 去掉涟漪效果-->
-<!--    noRipple: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    noBold: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-<!--    left: {-->
-<!--      type: Number,-->
-<!--      default: 0-->
-<!--    },-->
-<!--    right: {-->
-<!--      type: Number,-->
-<!--      default: 0-->
-<!--    }-->
-<!--  },-->
-<!--  computed: {-->
-<!--    style () {-->
-<!--      return {-->
-<!--        marginRight: this.right ? this.right + "px" : null,-->
-<!--        marginLeft: this.left ? this.left + "px" : null-->
-<!--      };-->
-<!--    },-->
-<!--    classList () {-->
-<!--      return [-->
-<!--        this.standout-->
-<!--          ? (this.theme ? "c-button-standout&#45;&#45;" + this.theme : "c-button-standout&#45;&#45;normal")-->
-<!--          : (-->
-<!--            this.text-->
-<!--              ? (this.theme ? "c-button-text&#45;&#45;" + this.theme : "c-button-text&#45;&#45;normal")-->
-<!--              : (this.theme ? "c-button&#45;&#45;" + this.theme : "c-button&#45;&#45;normal")-->
-<!--          ),-->
-<!--        this.large ? "c-button&#45;&#45;large" : "",-->
-<!--        this.small ? "c-button&#45;&#45;small" : "",-->
-<!--        this.noClickWarn ? "c-button&#45;&#45;disabled" : "",-->
-<!--        this.block ? "c-button&#45;&#45;block" : ""-->
-<!--      ];-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+</template>
+
+<script>
+// import CIcon from "@/components/Basic/CIcon";
+//
+// export default {
+//   components: { CIcon },
+//   // props: ['icon', 'noClickWarn']
+//   props: {
+//     icon: {
+//       type: String,
+//       default: null
+//     },
+//     noClickWarn: {
+//       type: Boolean,
+//       default: false
+//     },
+//     theme: {
+//       type: String,
+//       default: "normal"
+//     },
+//     // 背景透明的按钮
+//     text: {
+//       type: Boolean,
+//       default: false
+//     },
+//     // 使用白色字体、深色背景的最显眼按钮,优先级大于 text
+//     standout: {
+//       type: Boolean,
+//       default: false
+//     },
+//     // 占满宽度
+//     block: {
+//       type: Boolean,
+//       default: false
+//     },
+//     small: {
+//       type: Boolean,
+//       default: false
+//     },
+//     large: {
+//       type: Boolean,
+//       default: false
+//     },
+//     // 去掉涟漪效果
+//     noRipple: {
+//       type: Boolean,
+//       default: false
+//     },
+//     noBold: {
+//       type: Boolean,
+//       default: false
+//     },
+//     left: {
+//       type: Number,
+//       default: 0
+//     },
+//     right: {
+//       type: Number,
+//       default: 0
+//     }
+//   },
+//   computed: {
+//     style () {
+//       return {
+//         marginRight: this.right ? this.right + "px" : null,
+//         marginLeft: this.left ? this.left + "px" : null
+//       };
+//     },
+//     classList () {
+//       return [
+//         this.standout
+//           ? (this.theme ? "c-button-standout--" + this.theme : "c-button-standout--normal")
+//           : (
+//             this.text
+//               ? (this.theme ? "c-button-text--" + this.theme : "c-button-text--normal")
+//               : (this.theme ? "c-button--" + this.theme : "c-button--normal")
+//           ),
+//         this.large ? "c-button--large" : "",
+//         this.small ? "c-button--small" : "",
+//         this.noClickWarn ? "c-button--disabled" : "",
+//         this.block ? "c-button--block" : ""
+//       ];
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--@import "src/style/theme.scss";-->

+ 56 - 55
src/components/Basic/CIcon.vue

@@ -1,62 +1,63 @@
-<!--<template>-->
+<template>
+    <i></i>
 <!--  <i class="c-icons c-icon" :class="classList" :style="style">-->
 <!--    <slot></slot>-->
 <!--  </i>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--export default {-->
-<!--  props: {-->
-<!--    bold: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-
-<!--    // icon 大小-->
-<!--    size: {-->
-<!--      type: Number,-->
-<!--      default: 0-->
-<!--    },-->
-
-<!--    // 可以直接传入 6 位颜色值,将覆盖 theme 设置的颜色-->
-<!--    color: {-->
-<!--      type: String,-->
-<!--      default: ""-->
-<!--    },-->
-
-<!--    theme: {-->
-<!--      type: String,-->
-<!--      default: "normal"-->
-<!--    },-->
-
-<!--    right: {-->
-<!--      type: Number,-->
-<!--      default: 0-->
-<!--    },-->
-
-<!--    left: {-->
-<!--      type: Number,-->
-<!--      default: 0-->
-<!--    }-->
-<!--  },-->
-<!--  computed: {-->
-<!--    classList () {-->
-<!--      return [-->
-<!--        this.bold ? "bold" : "",-->
-<!--        this.theme ? "c-icon&#45;&#45;" + this.theme : ""-->
-<!--      ];-->
-<!--    },-->
-<!--    style () {-->
-<!--      return {-->
-<!--        fontSize: this.size ? this.size + "px" : null,-->
-<!--        marginRight: this.right ? this.right + "px" : null,-->
-<!--        marginLeft: this.left ? this.left + "px" : null,-->
-<!--        color: this.color || null-->
-<!--      };-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// export default {
+//   props: {
+//     bold: {
+//       type: Boolean,
+//       default: false
+//     },
+//
+//     // icon 大小
+//     size: {
+//       type: Number,
+//       default: 0
+//     },
+//
+//     // 可以直接传入 6 位颜色值,将覆盖 theme 设置的颜色
+//     color: {
+//       type: String,
+//       default: ""
+//     },
+//
+//     theme: {
+//       type: String,
+//       default: "normal"
+//     },
+//
+//     right: {
+//       type: Number,
+//       default: 0
+//     },
+//
+//     left: {
+//       type: Number,
+//       default: 0
+//     }
+//   },
+//   computed: {
+//     classList () {
+//       return [
+//         this.bold ? "bold" : "",
+//         this.theme ? "c-icon--" + this.theme : ""
+//       ];
+//     },
+//     style () {
+//       return {
+//         fontSize: this.size ? this.size + "px" : null,
+//         marginRight: this.right ? this.right + "px" : null,
+//         marginLeft: this.left ? this.left + "px" : null,
+//         color: this.color || null
+//       };
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!-- @import "src/style/set-theme.scss";-->

+ 20 - 18
src/components/Basic/CInput.vue

@@ -1,4 +1,5 @@
-<!--<template>-->
+<template>
+    <el-button></el-button>
 <!--  <component-->
 <!--    class="c-input"-->
 <!--    :required="required"-->
@@ -9,24 +10,25 @@
 <!--    :maxlength="maxlength ? maxlength : null"-->
 <!--    @input="$emit('input', $event.target.value)"-->
 <!--  />-->
-<!--</template>-->
+</template>
+
+<script>
+// export default {
+//   model: {
+//     prop: "value",
+//     event: "input"
+//   },
+//   props: {
+//     value: [String, Number],
+//     placeholder: String,
+//     textarea: Boolean,
+//     type: String,
+//     maxlength: Number,
+//     required: Boolean
+//   }
+// };
+</script>
 
-<!--<script>-->
-<!--export default {-->
-<!--  model: {-->
-<!--    prop: "value",-->
-<!--    event: "input"-->
-<!--  },-->
-<!--  props: {-->
-<!--    value: [String, Number],-->
-<!--    placeholder: String,-->
-<!--    textarea: Boolean,-->
-<!--    type: String,-->
-<!--    maxlength: Number,-->
-<!--    required: Boolean-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
 <!--<style lang="scss" scoped>-->
 <!--@import "src/style/theme.scss";-->
 

+ 18 - 17
src/components/Basic/CTag.vue

@@ -1,24 +1,25 @@
-<!--<template>-->
+<template>
+    <el-tag></el-tag>
 <!--  <div class="c-tag" :class="classList">-->
 <!--    <slot></slot>-->
 <!--  </div>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--export default {-->
-<!--  props: {-->
-<!--    theme: {-->
-<!--      type: String,-->
-<!--      default: "normal"-->
-<!--    }-->
-<!--  },-->
-<!--  computed: {-->
-<!--    classList () {-->
-<!--      return [this.theme ? "c-tag&#45;&#45;" + this.theme : ""];-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// export default {
+//   props: {
+//     theme: {
+//       type: String,
+//       default: "normal"
+//     }
+//   },
+//   computed: {
+//     classList () {
+//       return [this.theme ? "c-tag--" + this.theme : ""];
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--@import "src/style/set-theme.scss";-->

+ 54 - 53
src/components/Basic/IconButton.vue

@@ -1,63 +1,64 @@
-<!--<template>-->
+<template>
+    <el-button></el-button>
 <!--  <div class="icon-button" :class="classList" :title="title ? title : ''" @click="$emit('click')" :style="style">-->
 <!--    <c-icon :theme="theme" :bold="!noBold" :size="size ? size / 1.4 - 4 : 26">-->
 <!--      <slot></slot>-->
 <!--    </c-icon>-->
 <!--    <ripple :color="theme"></ripple>-->
 <!--  </div>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--import CIcon from "@/components/Basic/CIcon";-->
-<!--import Ripple from "@/components/Basic/Ripple";-->
-
-<!--export default {-->
-<!--  components: { Ripple, CIcon },-->
-<!--  // props: ['title', 'ripple', 'small']-->
-<!--  props: {-->
-<!--    title: {-->
-<!--      type: String,-->
-<!--      default: "按钮"-->
-<!--    },-->
-
-<!--    // 可以直接传入 6 位颜色值,将覆盖 theme 设置的颜色-->
-<!--    color: {-->
-<!--      type: String,-->
-<!--      default: ""-->
-<!--    },-->
-
-<!--    // 这个值需要在下方 scss 中有相应的定义,否则无效-->
-<!--    theme: {-->
-<!--      type: String,-->
-<!--      default: "normal"-->
-<!--    },-->
-
-<!--    noBold: {-->
-<!--      type: Boolean,-->
-<!--      default: false-->
-<!--    },-->
-
-<!--    // icon button 大小-->
-<!--    size: Number,-->
-<!--    left: Number,-->
-<!--    right: Number-->
-<!--  },-->
-<!--  computed: {-->
-<!--    classList () {-->
-<!--      return [this.theme ? "icon-button&#45;&#45;" + this.theme : ""];-->
-<!--    },-->
-<!--    style () {-->
-<!--      return {-->
-<!--        color: this.color.match(/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/) ? this.color : "",-->
-<!--        width: this.size ? this.size + "px" : null,-->
-<!--        height: this.size ? this.size + "px" : null,-->
-<!--        marginLeft: this.left ? this.left + "px" : null,-->
-<!--        marginRight: this.right ? this.right + "px" : null-->
-<!--      };-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// import CIcon from "@/components/Basic/CIcon";
+// import Ripple from "@/components/Basic/Ripple";
+//
+// export default {
+//   components: { Ripple, CIcon },
+//   // props: ['title', 'ripple', 'small']
+//   props: {
+//     title: {
+//       type: String,
+//       default: "按钮"
+//     },
+//
+//     // 可以直接传入 6 位颜色值,将覆盖 theme 设置的颜色
+//     color: {
+//       type: String,
+//       default: ""
+//     },
+//
+//     // 这个值需要在下方 scss 中有相应的定义,否则无效
+//     theme: {
+//       type: String,
+//       default: "normal"
+//     },
+//
+//     noBold: {
+//       type: Boolean,
+//       default: false
+//     },
+//
+//     // icon button 大小
+//     size: Number,
+//     left: Number,
+//     right: Number
+//   },
+//   computed: {
+//     classList () {
+//       return [this.theme ? "icon-button--" + this.theme : ""];
+//     },
+//     style () {
+//       return {
+//         color: this.color.match(/^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/) ? this.color : "",
+//         width: this.size ? this.size + "px" : null,
+//         height: this.size ? this.size + "px" : null,
+//         marginLeft: this.left ? this.left + "px" : null,
+//         marginRight: this.right ? this.right + "px" : null
+//       };
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--@import "src/style/theme.scss";-->

+ 24 - 23
src/components/Basic/Ripple.vue

@@ -1,32 +1,33 @@
-<!--<template>-->
+<template>
+    <el-tag></el-tag>
 <!--  <div class="ripple-wrapper" :class="color || ''">-->
 <!--    <div class="ripple" @click="handleRipple" :class="className" :style="size ? `width: ${size}px; height: ${size}px;` : ''">-->
 <!--    </div>-->
 <!--    <div class="background"></div>-->
 <!--  </div>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--export default {-->
-<!--  props: ["size", "color"],-->
-<!--  data () {-->
-<!--    return {-->
-<!--      className: "hide"-->
-<!--    };-->
-<!--  },-->
-<!--  methods: {-->
-<!--    handleRipple () {-->
-<!--      this.className = "";-->
-<!--      this.$nextTick(() => {-->
-<!--        this.className = "show";-->
-<!--        setTimeout(() => {-->
-<!--          this.className = "";-->
-<!--        }, 500);-->
-<!--      });-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// export default {
+//   props: ["size", "color"],
+//   data () {
+//     return {
+//       className: "hide"
+//     };
+//   },
+//   methods: {
+//     handleRipple () {
+//       this.className = "";
+//       this.$nextTick(() => {
+//         this.className = "show";
+//         setTimeout(() => {
+//           this.className = "";
+//         }, 500);
+//       });
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--@import "src/style/theme.scss";-->

+ 86 - 85
src/components/PDF/Pdf.vue

@@ -1,4 +1,5 @@
-<!--<template>-->
+<template>
+    <el-tag></el-tag>
 <!--  <div class="pdf">-->
 <!--    <canvas class="pdf pdf-canvas" id="pdf-canvas" :class="classList"></canvas>-->
 <!--    <div v-if="loading" class="loading">加载中...</div>-->
@@ -6,91 +7,91 @@
 <!--      <div v-if="focus" class="focus-mask">禁用快捷键中...<br>点击空白出退出</div>-->
 <!--    </fade-transition>-->
 <!--  </div>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--import pdfjs from "@/utils/pdf";-->
-<!--import { mapState } from "vuex";-->
-<!--import { SET_TOTAL_PAGES } from "@/store/types/pdf-types";-->
-<!--import FadeTransition from "@/animations/FadeTransition";-->
-
-<!--export default {-->
-<!--  components: { FadeTransition },-->
-<!--  data () {-->
-<!--    return {-->
-<!--      loading: true-->
-<!--    };-->
-<!--  },-->
-<!--  mounted () {-->
-<!--    console.log("hhh");-->
-<!--    this.loading = true;-->
-<!--    this._canvas = document.getElementById("pdf-canvas");-->
-<!--    this._context = this._canvas.getContext("2d");-->
-
-<!--    // Default size-->
-<!--    this._canvas.height = 1080;-->
-<!--    this._canvas.width = 1440;-->
-
-<!--    console.log(this.src);-->
-<!--    if (this.src) {-->
-<!--      this.load(this.src);-->
-<!--    } else {-->
-<!--      // ! 1秒后重试-->
-<!--      setTimeout(() => {-->
-<!--        this.load(this.src);-->
-<!--      }, 1000);-->
-<!--    }-->
-<!--  },-->
-<!--  computed: {-->
-<!--    ...mapState({-->
-<!--      src: state => state.pdf.src,-->
-<!--      showDiscussion: state => state.pdf.showDiscussion,-->
-<!--      currentPage: state => state.pdf.currentPage,-->
-<!--      screenShot: state => state.pdf.screenShot,-->
-<!--      focus: state => state.pdf.focus-->
-<!--    }),-->
-<!--    classList () {-->
-<!--      return {-->
-<!--        "full-size": !this.showDiscussion-->
-<!--      };-->
-<!--    }-->
-<!--  },-->
-<!--  watch: {-->
-<!--    currentPage () {-->
-<!--      this.showPage();-->
-<!--    }-->
-<!--  },-->
-<!--  methods: {-->
-<!--    load (src) {-->
-<!--      const loadingTask = pdfjs.getDocument(src);-->
-<!--      loadingTask.promise.then(pdf => {-->
-<!--        this.loading = false;-->
-<!--        this._pdf = pdf;-->
-<!--        this.$store.commit(SET_TOTAL_PAGES, { totalPages: pdf.numPages });-->
-<!--        this.showPage();-->
-<!--      });-->
-<!--    },-->
-<!--    showPage () {-->
-<!--      this._pdf && this._pdf.getPage(this.currentPage || 1).then(page => {-->
-<!--        const scale = 2.5;-->
-<!--        const viewport = page.getViewport({ scale: scale });-->
-
-<!--        this._canvas.height = viewport.height;-->
-<!--        this._canvas.width = viewport.width;-->
-
-<!--        const renderContext = {-->
-<!--          canvasContext: this._context,-->
-<!--          viewport: viewport-->
-<!--        };-->
-<!--        page.render(renderContext);-->
-<!--      }).catch(() => {-->
-<!--        console.log("PDF 当前页解析错误");-->
-<!--        //this.$setInfoMessage('PDF 当前页解析错误')-->
-<!--      });-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// import pdfjs from "@/utils/pdf";
+// import { mapState } from "vuex";
+// import { SET_TOTAL_PAGES } from "@/store/types/pdf-types";
+// import FadeTransition from "@/animations/FadeTransition";
+//
+// export default {
+//   components: { FadeTransition },
+//   data () {
+//     return {
+//       loading: true
+//     };
+//   },
+//   mounted () {
+//     console.log("hhh");
+//     this.loading = true;
+//     this._canvas = document.getElementById("pdf-canvas");
+//     this._context = this._canvas.getContext("2d");
+//
+//     // Default size
+//     this._canvas.height = 1080;
+//     this._canvas.width = 1440;
+//
+//     console.log(this.src);
+//     if (this.src) {
+//       this.load(this.src);
+//     } else {
+//       // ! 1秒后重试
+//       setTimeout(() => {
+//         this.load(this.src);
+//       }, 1000);
+//     }
+//   },
+//   computed: {
+//     ...mapState({
+//       src: state => state.pdf.src,
+//       showDiscussion: state => state.pdf.showDiscussion,
+//       currentPage: state => state.pdf.currentPage,
+//       screenShot: state => state.pdf.screenShot,
+//       focus: state => state.pdf.focus
+//     }),
+//     classList () {
+//       return {
+//         "full-size": !this.showDiscussion
+//       };
+//     }
+//   },
+//   watch: {
+//     currentPage () {
+//       this.showPage();
+//     }
+//   },
+//   methods: {
+//     load (src) {
+//       const loadingTask = pdfjs.getDocument(src);
+//       loadingTask.promise.then(pdf => {
+//         this.loading = false;
+//         this._pdf = pdf;
+//         this.$store.commit(SET_TOTAL_PAGES, { totalPages: pdf.numPages });
+//         this.showPage();
+//       });
+//     },
+//     showPage () {
+//       this._pdf && this._pdf.getPage(this.currentPage || 1).then(page => {
+//         const scale = 2.5;
+//         const viewport = page.getViewport({ scale: scale });
+//
+//         this._canvas.height = viewport.height;
+//         this._canvas.width = viewport.width;
+//
+//         const renderContext = {
+//           canvasContext: this._context,
+//           viewport: viewport
+//         };
+//         page.render(renderContext);
+//       }).catch(() => {
+//         console.log("PDF 当前页解析错误");
+//         //this.$setInfoMessage('PDF 当前页解析错误')
+//       });
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--@import 'src/style/theme.scss';-->

+ 62 - 61
src/components/PDF/PdfController.vue

@@ -1,4 +1,5 @@
-<!--<template>-->
+<template>
+    <el-button></el-button>
 <!--  <div class="pdf-controller" style="margin-top: 5%">-->
 <!--    <div class="actions" :class="hide ? 'hide-actions' : ''">-->
 <!--      <a :href="src">-->
@@ -17,66 +18,66 @@
 <!--      <i class="el-icon-arrow-down"/>-->
 <!--    </icon-button>-->
 <!--  </div>-->
-<!--</template>-->
-
-<!--<script>-->
-<!--import IconButton from "@/components/Basic/IconButton";-->
-<!--import { NEXT_PAGE, PREVIOUS_PAGE, SET_CURRENT_PAGE, TOGGLE_SHOW_DISCUSSION } from "@/store/types/pdf-types";-->
-<!--import { mapState } from "vuex";-->
-<!--import CInput from "@/components/Basic/CInput";-->
-<!--import { isEmpty } from "@/utils/types";-->
-
-<!--export default {-->
-<!--  components: { CInput, IconButton },-->
-<!--  data () {-->
-<!--    return {-->
-<!--      pageMarked: false,-->
-<!--      toPage: "",-->
-<!--      hide: false-->
-<!--    };-->
-<!--  },-->
-<!--  computed: {-->
-<!--    ...mapState({-->
-<!--      showDiscussion: state => state.pdf.showDiscussion,-->
-<!--      src: state => state.pdf.src,-->
-<!--      totalPages: state => state.pdf.totalPages,-->
-<!--      currentPage: state => state.pdf.currentPage-->
-<!--    })-->
-<!--  },-->
-<!--  methods: {-->
-<!--    handleDiscussionShowState () {-->
-<!--      this.$store.commit(TOGGLE_SHOW_DISCUSSION);-->
-<!--    },-->
-<!--    handlePrevious () {-->
-<!--      this.$store.commit(PREVIOUS_PAGE);-->
-<!--    },-->
-<!--    handleNext () {-->
-<!--      this.$store.commit(NEXT_PAGE);-->
-<!--    },-->
-<!--    handleToPage (value) {-->
-<!--      if (isEmpty(value) || value === "" || value === 0) {-->
-<!--        return;-->
-<!--      }-->
-<!--      value = typeof value === typeof "" ? parseInt(value) : value;-->
-<!--      if (value > this.totalPages) {-->
-<!--        console.log("超过最大页数,已跳到最后一页");-->
-<!--        this.$store.commit(SET_CURRENT_PAGE, { currentPage: this.totalPages });-->
-<!--      } else if (value <= 0) {-->
-<!--        console.log("超过最小页数,已跳到第一页");-->
-<!--        this.$store.commit(SET_CURRENT_PAGE, { currentPage: 1 });-->
-<!--      } else {-->
-<!--        this.$store.commit(SET_CURRENT_PAGE, { currentPage: value });-->
-<!--      }-->
-<!--    },-->
-<!--    handleHide () {-->
-<!--      this.hide = !this.hide;-->
-<!--    }-->
-<!--    // handleScreenShot () {-->
-<!--    //   this.$store.commit(SET_SCREEN_SHOT)-->
-<!--    // }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+</template>
+
+<script>
+// import IconButton from "@/components/Basic/IconButton";
+// import { NEXT_PAGE, PREVIOUS_PAGE, SET_CURRENT_PAGE, TOGGLE_SHOW_DISCUSSION } from "@/store/types/pdf-types";
+// import { mapState } from "vuex";
+// import CInput from "@/components/Basic/CInput";
+// import { isEmpty } from "@/utils/types";
+//
+// export default {
+//   components: { CInput, IconButton },
+//   data () {
+//     return {
+//       pageMarked: false,
+//       toPage: "",
+//       hide: false
+//     };
+//   },
+//   computed: {
+//     ...mapState({
+//       showDiscussion: state => state.pdf.showDiscussion,
+//       src: state => state.pdf.src,
+//       totalPages: state => state.pdf.totalPages,
+//       currentPage: state => state.pdf.currentPage
+//     })
+//   },
+//   methods: {
+//     handleDiscussionShowState () {
+//       this.$store.commit(TOGGLE_SHOW_DISCUSSION);
+//     },
+//     handlePrevious () {
+//       this.$store.commit(PREVIOUS_PAGE);
+//     },
+//     handleNext () {
+//       this.$store.commit(NEXT_PAGE);
+//     },
+//     handleToPage (value) {
+//       if (isEmpty(value) || value === "" || value === 0) {
+//         return;
+//       }
+//       value = typeof value === typeof "" ? parseInt(value) : value;
+//       if (value > this.totalPages) {
+//         console.log("超过最大页数,已跳到最后一页");
+//         this.$store.commit(SET_CURRENT_PAGE, { currentPage: this.totalPages });
+//       } else if (value <= 0) {
+//         console.log("超过最小页数,已跳到第一页");
+//         this.$store.commit(SET_CURRENT_PAGE, { currentPage: 1 });
+//       } else {
+//         this.$store.commit(SET_CURRENT_PAGE, { currentPage: value });
+//       }
+//     },
+//     handleHide () {
+//       this.hide = !this.hide;
+//     }
+//     // handleScreenShot () {
+//     //   this.$store.commit(SET_SCREEN_SHOT)
+//     // }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--@import 'src/style/theme.scss';-->

+ 22 - 21
src/components/PDF/PdfViewer.vue

@@ -1,29 +1,30 @@
-<!--<template>-->
+<template>
+    <el-tag></el-tag>
 <!--  <div>-->
 <!--    <pdf></pdf>-->
 <!--    <pdf-controller></pdf-controller>-->
 <!--  </div>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--import Pdf from "@/components/PDF/Pdf";-->
-<!--import PdfController from "@/components/PDF/PdfController";-->
-<!--export default {-->
-<!--  components: { PdfController, Pdf },-->
-<!--  props: ["src", "discussion"],-->
-<!--  data () {-->
-<!--    return {-->
-<!--      currentPage: 1,-->
-<!--      fullSize: !this.discussion-->
-<!--    };-->
-<!--  },-->
-<!--  watch: {-->
-<!--    discussion (newValue) {-->
-<!--      this.fullSize = !newValue;-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// import Pdf from "@/components/PDF/Pdf";
+// import PdfController from "@/components/PDF/PdfController";
+// export default {
+//   components: { PdfController, Pdf },
+//   props: ["src", "discussion"],
+//   data () {
+//     return {
+//       currentPage: 1,
+//       fullSize: !this.discussion
+//     };
+//   },
+//   watch: {
+//     discussion (newValue) {
+//       this.fullSize = !newValue;
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 <!--</style>-->

+ 176 - 175
src/components/PDF/PointerCanvas.vue

@@ -1,181 +1,182 @@
-<!--<template>-->
+<template>
+    <el-button></el-button>
 <!--  <canvas :width="width" :height="height" class="pointer-canvas" ref="pointerCanvas" @click="handleFocus">-->
 <!--  </canvas>-->
-<!--</template>-->
+</template>
 
-<!--<script>-->
-<!--import { mapState } from "vuex";-->
-<!--import { USE_FOCUS } from "@/store/types/pdf-types";-->
-
-<!--export default {-->
-<!--  name: "PointerCanvas",-->
-<!--  props: {-->
-<!--    noPointer: Boolean,-->
-<!--    noBox: Boolean-->
-<!--  },-->
-<!--  data () {-->
-<!--    return {-->
-<!--      points: [],-->
-<!--      disablePointer: false,-->
-<!--      width: window.innerWidth,-->
-<!--      height: document.documentElement.clientHeight,-->
-<!--      rects: [],-->
-<!--      drawingRect: {},-->
-<!--      poped: [],-->
-<!--      // 为了突破30fps限制(应该与chrome优化机制有关),往数组中多放入冗余数字,以让动画更流畅-->
-<!--      overrate: 4-->
-<!--    };-->
-<!--  },-->
-<!--  computed: {-->
-<!--    pointerActive () {-->
-<!--      return this.width > 500 && !this.noPointer && !this.disablePointer;-->
-<!--    },-->
-<!--    ...mapState({-->
-<!--      currentPage: state => state.pdf.currentPage-->
-<!--    })-->
-<!--  },-->
-<!--  watch: {-->
-<!--    currentPage () {-->
-<!--      this.rects = [];-->
-<!--      this.poped = [];-->
-<!--      this.drawingRect = {};-->
-<!--      this.renderer();-->
-<!--    }-->
-<!--  },-->
-<!--  mounted () {-->
-<!--    this._canvas = this.$refs.pointerCanvas;-->
-<!--    this._ctx = this._canvas.getContext("2d");-->
-
-<!--    window.addEventListener("resize", this.handleResize);-->
-<!--    this._canvas.addEventListener("mousemove", this.handleMouseMove);-->
-<!--    this._canvas.addEventListener("mousedown", this.handleMouseDown);-->
-<!--    this._canvas.addEventListener("mouseup", this.handleMouseUp);-->
-<!--    this._interval = setInterval(this.shiftPoints, 1000 / 90);-->
-<!--  },-->
-<!--  unmounted () {-->
-<!--    clearInterval(this._interval);-->
-<!--    window.removeEventListener("resize", this.handleResize);-->
-<!--    this._canvas.removeEventListener("mousemove", this.handleMouseMove);-->
-<!--    this._canvas.removeEventListener("mousedown", this.handleMouseDown);-->
-<!--    this._canvas.removeEventListener("mouseup", this.handleMouseUp);-->
-<!--  },-->
-<!--  methods: {-->
-<!--    handleResize () {-->
-<!--      this.width = window.innerWidth;-->
-<!--      this.height = document.documentElement.clientHeight;-->
-<!--      this.renderer();-->
-<!--    },-->
-<!--    handleMouseMove (e) {-->
-<!--      if (this.pointerActive) {-->
-<!--        const { x, y } = this.points[this.points.length - 1] ?? { x: 0, y: 0 };-->
-<!--        if (this.points.length === 0 || Math.abs(x - e.clientX) > 8 || Math.abs(y - e.clientY) > 8) {-->
-<!--          [...Array(this.overrate)].forEach(_ => this.points.unshift({ x: e.clientX, y: e.clientY }));-->
-<!--          if (this.points.length > 100) {-->
-<!--            [...Array(this.overrate)].forEach(_ => this.points.pop());-->
-<!--          }-->
-<!--        }-->
-<!--      }-->
-<!--    },-->
-<!--    shiftPoints () {-->
-<!--      if (this.points.length > 34) {-->
-<!--        this.points.pop();-->
-<!--      }-->
-<!--      if (this.points.length > 0) {-->
-<!--        this.points.pop();-->
-<!--        requestAnimationFrame(() => {-->
-<!--          this.renderer();-->
-<!--        });-->
-<!--      }-->
-<!--    },-->
-<!--    handleMouseDown (e) {-->
-<!--      if (!this.noBox) {-->
-<!--        this.disablePointer = true;-->
-<!--        this.drawingRect.begin = { x: e.clientX, y: e.clientY };-->
-
-<!--        this._canvas.addEventListener("mousemove", this.handleBoxMouseMove);-->
-<!--      }-->
-<!--    },-->
-<!--    handleBoxMouseMove (e) {-->
-<!--      this.drawingRect.end = { x: e.clientX, y: e.clientY };-->
-<!--      requestAnimationFrame(() => {-->
-<!--        this.renderer();-->
-<!--      });-->
-<!--    },-->
-<!--    handleMouseUp (e) {-->
-<!--      if (!this.noBox) {-->
-<!--        if (this.drawingRect.begin && this.drawingRect.end) {-->
-<!--          this.rects.push(this.drawingRect);-->
-<!--          this.poped = [];-->
-<!--        }-->
-<!--        this._canvas.removeEventListener("mousemove", this.handleBoxMouseMove);-->
-<!--        this.disablePointer = false;-->
-<!--        this.renderer();-->
-<!--        this.drawingRect = {};-->
-<!--      }-->
-<!--    },-->
-<!--    renderer () {-->
-<!--      this._ctx.clearRect(0, 0, 2000, 2000);-->
-
-<!--      // 框选-->
-<!--      this._ctx.lineWidth = 4;-->
-<!--      this._ctx.lineJoin = "round";-->
-<!--      this._ctx.strokeStyle = "rgba(85, 136, 229, 1)";-->
-<!--      this._ctx.fillStyle = "rgba(85, 136, 229, .05)";-->
-<!--      this.rects.forEach(rect => {-->
-<!--        if (rect) {-->
-<!--          this._ctx.beginPath();-->
-<!--          this._ctx.rect(rect.begin.x, rect.begin.y, rect.end.x - rect.begin.x, rect.end.y - rect.begin.y);-->
-<!--          this._ctx.closePath();-->
-<!--          this._ctx.fill();-->
-<!--          this._ctx.stroke();-->
-<!--        }-->
-<!--      });-->
-<!--      if (this.drawingRect.begin && this.drawingRect.end) {-->
-<!--        this._ctx.beginPath();-->
-<!--        this._ctx.rect(-->
-<!--          this.drawingRect.begin.x,-->
-<!--          this.drawingRect.begin.y,-->
-<!--          this.drawingRect.end.x - this.drawingRect.begin.x,-->
-<!--          this.drawingRect.end.y - this.drawingRect.begin.y-->
-<!--        );-->
-<!--        this._ctx.closePath();-->
-<!--        this._ctx.fill();-->
-<!--        this._ctx.stroke();-->
-<!--      }-->
-
-<!--      // 线条-->
-<!--      this._ctx.strokeStyle = "rgba(211, 47, 47, .2)";-->
-<!--      this._ctx.beginPath();-->
-<!--      const length = this.points.length;-->
-<!--      this.points.forEach((point, index) => {-->
-<!--        if (index % this.overrate) {-->
-<!--          this._ctx.lineTo(point.x, point.y);-->
-<!--          this._ctx.lineWidth = (length - index + 4) / (2 * this.overrate);-->
-<!--          this._ctx.stroke();-->
-<!--        }-->
-<!--      });-->
-<!--      this._ctx.closePath();-->
-<!--    },-->
-<!--    handleFocus () {-->
-<!--      this.$store.commit(USE_FOCUS);-->
-<!--    },-->
-<!--    cleanCanvas () {-->
-<!--      this.rects = [];-->
-<!--      this.renderer();-->
-<!--    },-->
-<!--    undo () {-->
-<!--      const rect = this.rects.pop();-->
-<!--      rect && this.poped.push(rect);-->
-<!--      rect && this.renderer();-->
-<!--    },-->
-<!--    redo () {-->
-<!--      const rect = this.poped.pop();-->
-<!--      rect && this.rects.push(rect);-->
-<!--      rect && this.renderer();-->
-<!--    }-->
-<!--  }-->
-<!--};-->
-<!--</script>-->
+<script>
+// import { mapState } from "vuex";
+// import { USE_FOCUS } from "@/store/types/pdf-types";
+//
+// export default {
+//   name: "PointerCanvas",
+//   props: {
+//     noPointer: Boolean,
+//     noBox: Boolean
+//   },
+//   data () {
+//     return {
+//       points: [],
+//       disablePointer: false,
+//       width: window.innerWidth,
+//       height: document.documentElement.clientHeight,
+//       rects: [],
+//       drawingRect: {},
+//       poped: [],
+//       // 为了突破30fps限制(应该与chrome优化机制有关),往数组中多放入冗余数字,以让动画更流畅
+//       overrate: 4
+//     };
+//   },
+//   computed: {
+//     pointerActive () {
+//       return this.width > 500 && !this.noPointer && !this.disablePointer;
+//     },
+//     ...mapState({
+//       currentPage: state => state.pdf.currentPage
+//     })
+//   },
+//   watch: {
+//     currentPage () {
+//       this.rects = [];
+//       this.poped = [];
+//       this.drawingRect = {};
+//       this.renderer();
+//     }
+//   },
+//   mounted () {
+//     this._canvas = this.$refs.pointerCanvas;
+//     this._ctx = this._canvas.getContext("2d");
+//
+//     window.addEventListener("resize", this.handleResize);
+//     this._canvas.addEventListener("mousemove", this.handleMouseMove);
+//     this._canvas.addEventListener("mousedown", this.handleMouseDown);
+//     this._canvas.addEventListener("mouseup", this.handleMouseUp);
+//     this._interval = setInterval(this.shiftPoints, 1000 / 90);
+//   },
+//   unmounted () {
+//     clearInterval(this._interval);
+//     window.removeEventListener("resize", this.handleResize);
+//     this._canvas.removeEventListener("mousemove", this.handleMouseMove);
+//     this._canvas.removeEventListener("mousedown", this.handleMouseDown);
+//     this._canvas.removeEventListener("mouseup", this.handleMouseUp);
+//   },
+//   methods: {
+//     handleResize () {
+//       this.width = window.innerWidth;
+//       this.height = document.documentElement.clientHeight;
+//       this.renderer();
+//     },
+//     handleMouseMove (e) {
+//       if (this.pointerActive) {
+//         const { x, y } = this.points[this.points.length - 1] ?? { x: 0, y: 0 };
+//         if (this.points.length === 0 || Math.abs(x - e.clientX) > 8 || Math.abs(y - e.clientY) > 8) {
+//           [...Array(this.overrate)].forEach(_ => this.points.unshift({ x: e.clientX, y: e.clientY }));
+//           if (this.points.length > 100) {
+//             [...Array(this.overrate)].forEach(_ => this.points.pop());
+//           }
+//         }
+//       }
+//     },
+//     shiftPoints () {
+//       if (this.points.length > 34) {
+//         this.points.pop();
+//       }
+//       if (this.points.length > 0) {
+//         this.points.pop();
+//         requestAnimationFrame(() => {
+//           this.renderer();
+//         });
+//       }
+//     },
+//     handleMouseDown (e) {
+//       if (!this.noBox) {
+//         this.disablePointer = true;
+//         this.drawingRect.begin = { x: e.clientX, y: e.clientY };
+//
+//         this._canvas.addEventListener("mousemove", this.handleBoxMouseMove);
+//       }
+//     },
+//     handleBoxMouseMove (e) {
+//       this.drawingRect.end = { x: e.clientX, y: e.clientY };
+//       requestAnimationFrame(() => {
+//         this.renderer();
+//       });
+//     },
+//     handleMouseUp (e) {
+//       if (!this.noBox) {
+//         if (this.drawingRect.begin && this.drawingRect.end) {
+//           this.rects.push(this.drawingRect);
+//           this.poped = [];
+//         }
+//         this._canvas.removeEventListener("mousemove", this.handleBoxMouseMove);
+//         this.disablePointer = false;
+//         this.renderer();
+//         this.drawingRect = {};
+//       }
+//     },
+//     renderer () {
+//       this._ctx.clearRect(0, 0, 2000, 2000);
+//
+//       // 框选
+//       this._ctx.lineWidth = 4;
+//       this._ctx.lineJoin = "round";
+//       this._ctx.strokeStyle = "rgba(85, 136, 229, 1)";
+//       this._ctx.fillStyle = "rgba(85, 136, 229, .05)";
+//       this.rects.forEach(rect => {
+//         if (rect) {
+//           this._ctx.beginPath();
+//           this._ctx.rect(rect.begin.x, rect.begin.y, rect.end.x - rect.begin.x, rect.end.y - rect.begin.y);
+//           this._ctx.closePath();
+//           this._ctx.fill();
+//           this._ctx.stroke();
+//         }
+//       });
+//       if (this.drawingRect.begin && this.drawingRect.end) {
+//         this._ctx.beginPath();
+//         this._ctx.rect(
+//           this.drawingRect.begin.x,
+//           this.drawingRect.begin.y,
+//           this.drawingRect.end.x - this.drawingRect.begin.x,
+//           this.drawingRect.end.y - this.drawingRect.begin.y
+//         );
+//         this._ctx.closePath();
+//         this._ctx.fill();
+//         this._ctx.stroke();
+//       }
+//
+//       // 线条
+//       this._ctx.strokeStyle = "rgba(211, 47, 47, .2)";
+//       this._ctx.beginPath();
+//       const length = this.points.length;
+//       this.points.forEach((point, index) => {
+//         if (index % this.overrate) {
+//           this._ctx.lineTo(point.x, point.y);
+//           this._ctx.lineWidth = (length - index + 4) / (2 * this.overrate);
+//           this._ctx.stroke();
+//         }
+//       });
+//       this._ctx.closePath();
+//     },
+//     handleFocus () {
+//       this.$store.commit(USE_FOCUS);
+//     },
+//     cleanCanvas () {
+//       this.rects = [];
+//       this.renderer();
+//     },
+//     undo () {
+//       const rect = this.rects.pop();
+//       rect && this.poped.push(rect);
+//       rect && this.renderer();
+//     },
+//     redo () {
+//       const rect = this.poped.pop();
+//       rect && this.rects.push(rect);
+//       rect && this.renderer();
+//     }
+//   }
+// };
+</script>
 
 <!--<style lang="scss" scoped>-->
 

+ 190 - 187
src/views/CourseWarePage/CourseWarePage.vue

@@ -1,201 +1,204 @@
 <template>
-<el-row id="manage-page-body">
-    <el-col :span="3">
-        <el-menu background-color="#f8f9fb" default-active="1" style="position: fixed;"
-                 @select="handleSelect">
-            <el-menu-item index="0">
-                <el-icon>
-                    <Back/>
-                </el-icon>
-                <span style="padding-left: 20px">返回首页</span>
-            </el-menu-item>
-            <el-menu-item index="1">
-                <el-icon>
-                    <Document/>
-                </el-icon>
-                <span style="padding-left: 20px">全部课程</span>
-            </el-menu-item>
-        </el-menu>
-    </el-col>
-    <el-col :span="1"/>
-    <el-col :span="18">
-        <div class="pdf-reader">
-            <pdf-viewer></pdf-viewer>
-            <pointer-canvas ref="pointerCanvas" :no-pointer="!pointer" :no-box="!box"></pointer-canvas>
-            <div class="pointer-actions">
-                <c-button text :theme="pointer ? 'red' : ''" @click="pointer = !pointer">
-                    <i class="el-icon-edit"/> 指针</c-button>
-                <c-button text :left="8" :theme="box ? 'blue' : ''" @click="box = !box">
-                    <i class="el-icon-crop"/> 框选</c-button>
-                <c-button text :left="8" theme="orange" @click="cleanCanvas">
-                    <i class="el-icon-refresh-left"/> 清除</c-button>
-            </div>
-        </div>
-    </el-col>
-</el-row>
-
+    <i class="el-icon-star-off"></i>
+<!--<el-row id="manage-page-body">-->
+<!--    <el-col :span="3">-->
+<!--        <el-menu background-color="#f8f9fb" default-active="1" style="position: fixed;"-->
+<!--                 @select="handleSelect">-->
+<!--            <el-menu-item index="0">-->
+<!--                <el-icon>-->
+<!--                    <Back/>-->
+<!--                </el-icon>-->
+<!--                <span style="padding-left: 20px">返回首页</span>-->
+<!--            </el-menu-item>-->
+<!--            <el-menu-item index="1">-->
+<!--                <el-icon>-->
+<!--                    <Document/>-->
+<!--                </el-icon>-->
+<!--                <span style="padding-left: 20px">全部课程</span>-->
+<!--            </el-menu-item>-->
+<!--        </el-menu>-->
+<!--    </el-col>-->
+<!--    <el-col :span="1"/>-->
+<!--    <el-col :span="18">-->
+<!--        <div class="pdf-reader">-->
+<!--            <pdf-viewer></pdf-viewer>-->
+<!--            <pointer-canvas ref="pointerCanvas" :no-pointer="!pointer" :no-box="!box"></pointer-canvas>-->
+<!--            <div class="pointer-actions">-->
+<!--                <c-button text :theme="pointer ? 'red' : ''" @click="pointer = !pointer">-->
+<!--                    <i class="el-icon-edit"/> 指针</c-button>-->
+<!--                <c-button text :left="8" :theme="box ? 'blue' : ''" @click="box = !box">-->
+<!--                    <i class="el-icon-crop"/> 框选</c-button>-->
+<!--                <c-button text :left="8" theme="orange" @click="cleanCanvas">-->
+<!--                    <i class="el-icon-refresh-left"/> 清除</c-button>-->
+<!--            </div>-->
+<!--        </div>-->
+<!--    </el-col>-->
+<!--</el-row>-->
 </template>
 
 <script>
-import PdfViewer from "@/components/PDF/PdfViewer";
-import { mapState } from "vuex";
-import {
-    FOCUS_ON_INPUT,
-    NEXT_PAGE,
-    PREVIOUS_PAGE,
-    RESET, SET_CURRENT_PAGE,
-    SET_SRC,
-    TOGGLE_SHOW_DISCUSSION,
-    USE_FOCUS
-} from "@/store/types/pdf-types";
-import PointerCanvas from "@/components/PDF/PointerCanvas";
-import CButton from "@/components/Basic/CButton";
-
-export default {
-    components: {CButton, PointerCanvas, PdfViewer},
-    computed: {
-        ...mapState({
-            src: state => state.pdf.src,
-            focus: state => state.pdf.focus
-        })
-    },
-    data () {
-        return {
-            pointer: false,
-            box: false,
-            slide: {}
-        };
-    },
-    mounted () {
-        console.log("coursewarepage");
-        this.$store.commit(RESET);
-        let { page } = this.$route.params;
-        if (page) {
-            this.$store.commit(SET_CURRENT_PAGE, { currentPage: parseInt(page) });
-        }
-        const _slideId = this.$route.params.slideId;
-        this.$apis.getSlideInfo({ slideId: _slideId }).then(res => {
-            this.slide = res;
-        }).catch(err => {
-            //this.$setErrorMessage(err.response.data.msg)
-        });
-        this.$apis.getSlideUrl({ slideId: _slideId }).then(res => {
-            console.log(this.$apis.getSlideUrl({ slideId: _slideId }));
-            this.$store.commit(SET_SRC, { src: res });
-        }).catch(err => {
-            //this.$setErrorMessage('获取课件链接的过程中:' + err.response.data.msg)
-        });
-        window.addEventListener("keydown", this.handleKey);
-    },
-    beforeUnmount () {
-        window.removeEventListener("keydown", this.handleKey);
-    },
-    methods: {
-        handleSelect(index) {
-            if (index === "0") {
-                this.$router.push("portal");
-            }
-            if (index === "1") {
-                document.getElementById("app").scrollIntoView({behavior: "smooth"});
-            }
-        },
-        handleKey (e) {
-            if (e.key === "Enter") {
-                !this.showDiscussion && this.$store.commit(TOGGLE_SHOW_DISCUSSION);
-                !this.focus && this.$store.commit(FOCUS_ON_INPUT);
-                return;
-            }
-            if (e.key === "Escape") {
-                if (this.focus) {
-                    this.$store.commit(USE_FOCUS);
-                } else {
-                    this.$store.commit(TOGGLE_SHOW_DISCUSSION);
-                }
-                return;
-            }
-            if (!this.showDiscussion || !this.focus) {
-                switch (e.key) {
-                    case "ArrowDown":
-                    case "ArrowRight":
-                    case "s":
-                    case "d":
-                    case " ":
-                        this.$store.commit(NEXT_PAGE);
-                        break;
-                    case "ArrowUp":
-                    case "ArrowLeft":
-                    case "w":
-                    case "a":
-                        this.$store.commit(PREVIOUS_PAGE);
-                        break;
-                    case "c":
-                        this.cleanCanvas();
-                        break;
-                    case "q":
-                    case "z":
-                        this.$refs.pointerCanvas.undo();
-                        break;
-                    case "e":
-                    case "y":
-                        this.$refs.pointerCanvas.redo();
-                        break;
-                    case "[":
-                    case "b":
-                        this.box = !this.box;
-                        break;
-                    case "p":
-                    case "v":
-                        this.pointer = !this.pointer;
-                        break;
-                }
-            }
-        },
-        cleanCanvas () {
-            this.$refs.pointerCanvas.cleanCanvas();
-        }
-    },
-};
+    export default {
+        name: "CourseWarePage",
+    };
+// import PdfViewer from "@/components/PDF/PdfViewer";
+// import { mapState } from "vuex";
+// import {
+//     FOCUS_ON_INPUT,
+//     NEXT_PAGE,
+//     PREVIOUS_PAGE,
+//     RESET, SET_CURRENT_PAGE,
+//     SET_SRC,
+//     TOGGLE_SHOW_DISCUSSION,
+//     USE_FOCUS
+// } from "@/store/types/pdf-types";
+// import PointerCanvas from "@/components/PDF/PointerCanvas";
+// import CButton from "@/components/Basic/CButton";
+//
+// export default {
+//     components: {CButton, PointerCanvas, PdfViewer},
+//     computed: {
+//         ...mapState({
+//             src: state => state.pdf.src,
+//             focus: state => state.pdf.focus
+//         })
+//     },
+//     data () {
+//         return {
+//             pointer: false,
+//             box: false,
+//             slide: {}
+//         };
+//     },
+//     mounted () {
+//         console.log("coursewarepage");
+//         this.$store.commit(RESET);
+//         let { page } = this.$route.params;
+//         if (page) {
+//             this.$store.commit(SET_CURRENT_PAGE, { currentPage: parseInt(page) });
+//         }
+//         const _slideId = this.$route.params.slideId;
+//         this.$apis.getSlideInfo({ slideId: _slideId }).then(res => {
+//             this.slide = res;
+//         }).catch(err => {
+//             //this.$setErrorMessage(err.response.data.msg)
+//         });
+//         this.$apis.getSlideUrl({ slideId: _slideId }).then(res => {
+//             console.log(this.$apis.getSlideUrl({ slideId: _slideId }));
+//             this.$store.commit(SET_SRC, { src: res });
+//         }).catch(err => {
+//             //this.$setErrorMessage('获取课件链接的过程中:' + err.response.data.msg)
+//         });
+//         window.addEventListener("keydown", this.handleKey);
+//     },
+//     beforeUnmount () {
+//         window.removeEventListener("keydown", this.handleKey);
+//     },
+//     methods: {
+//         handleSelect(index) {
+//             if (index === "0") {
+//                 this.$router.push("portal");
+//             }
+//             if (index === "1") {
+//                 document.getElementById("app").scrollIntoView({behavior: "smooth"});
+//             }
+//         },
+//         handleKey (e) {
+//             if (e.key === "Enter") {
+//                 !this.showDiscussion && this.$store.commit(TOGGLE_SHOW_DISCUSSION);
+//                 !this.focus && this.$store.commit(FOCUS_ON_INPUT);
+//                 return;
+//             }
+//             if (e.key === "Escape") {
+//                 if (this.focus) {
+//                     this.$store.commit(USE_FOCUS);
+//                 } else {
+//                     this.$store.commit(TOGGLE_SHOW_DISCUSSION);
+//                 }
+//                 return;
+//             }
+//             if (!this.showDiscussion || !this.focus) {
+//                 switch (e.key) {
+//                     case "ArrowDown":
+//                     case "ArrowRight":
+//                     case "s":
+//                     case "d":
+//                     case " ":
+//                         this.$store.commit(NEXT_PAGE);
+//                         break;
+//                     case "ArrowUp":
+//                     case "ArrowLeft":
+//                     case "w":
+//                     case "a":
+//                         this.$store.commit(PREVIOUS_PAGE);
+//                         break;
+//                     case "c":
+//                         this.cleanCanvas();
+//                         break;
+//                     case "q":
+//                     case "z":
+//                         this.$refs.pointerCanvas.undo();
+//                         break;
+//                     case "e":
+//                     case "y":
+//                         this.$refs.pointerCanvas.redo();
+//                         break;
+//                     case "[":
+//                     case "b":
+//                         this.box = !this.box;
+//                         break;
+//                     case "p":
+//                     case "v":
+//                         this.pointer = !this.pointer;
+//                         break;
+//                 }
+//             }
+//         },
+//         cleanCanvas () {
+//             this.$refs.pointerCanvas.cleanCanvas();
+//         }
+//     },
+// };
 
 
 </script>
 
-<style lang="scss" scoped>
-    .pdf-reader {
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        min-height: 100vh;
-    }
+<!--<style lang="scss" scoped>-->
+<!--    .pdf-reader {-->
+<!--        display: flex;-->
+<!--        align-items: center;-->
+<!--        justify-content: center;-->
+<!--        min-height: 100vh;-->
+<!--    }-->
 
-    .icon-button {
-        z-index: 2;
-        position: absolute;
-        left: 16px;
-        top: 16px;
-        background-color: rgba(218, 234, 250, 0.4);
-        backdrop-filter: saturate(150%) blur(20px);
+<!--    .icon-button {-->
+<!--        z-index: 2;-->
+<!--        position: absolute;-->
+<!--        left: 16px;-->
+<!--        top: 16px;-->
+<!--        background-color: rgba(218, 234, 250, 0.4);-->
+<!--        backdrop-filter: saturate(150%) blur(20px);-->
 
-        &:hover {
-            background-color: rgba(218, 234, 250, 0.67);
-        }
-    }
+<!--        &:hover {-->
+<!--            background-color: rgba(218, 234, 250, 0.67);-->
+<!--        }-->
+<!--    }-->
 
-    .show-discussion, .hide-discussion {
-        transition: .2s;
-    }
+<!--    .show-discussion, .hide-discussion {-->
+<!--        transition: .2s;-->
+<!--    }-->
 
-    .hide-discussion {
-        transform: translateY(100%);
-        opacity: 0;
-    }
+<!--    .hide-discussion {-->
+<!--        transform: translateY(100%);-->
+<!--        opacity: 0;-->
+<!--    }-->
 
-    .pointer-actions {
-        position: fixed;
-        left: 6px;
-        bottom: 8px;
+<!--    .pointer-actions {-->
+<!--        position: fixed;-->
+<!--        left: 6px;-->
+<!--        bottom: 8px;-->
 
-        .c-button {
-            background-color: white;
-        }
-    }
-</style>
+<!--        .c-button {-->
+<!--            background-color: white;-->
+<!--        }-->
+<!--    }-->
+<!--</style>-->