|
@@ -0,0 +1,536 @@
|
|
|
+<template>
|
|
|
+ <div class="pb_content" style="height: auto">
|
|
|
+ <div class="pb_head top">
|
|
|
+ <span>课堂备课</span>
|
|
|
+ <div class="student_button">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="bgColor"
|
|
|
+ @click="goTo('/course/addCourse?userid=' + userid + '&oid=' + oid)"
|
|
|
+ >添加备课ppt</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="pb_content_body" style="height: 100%">
|
|
|
+ <div class="student_head">
|
|
|
+ <div class="student_right">
|
|
|
+ <div class="head_left">
|
|
|
+ <el-input v-model="courseName" class="student_input" placeholder="请输入课程名称"></el-input>
|
|
|
+ <el-button class="course_button" @click="searchCourse">查询</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="student_table">
|
|
|
+ <div class="course_box">
|
|
|
+ <div class="out_box" v-for="(item, index) in course" :key="index">
|
|
|
+ <div class="tup">
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ item.cover != null && item.cover != ''
|
|
|
+ ? JSON.parse(item.cover).length > 0
|
|
|
+ ? JSON.parse(item.cover)[0].url
|
|
|
+ : mr
|
|
|
+ : mr
|
|
|
+ "
|
|
|
+ alt
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="bottom_box">
|
|
|
+ <div>{{ item.title }}</div>
|
|
|
+ <div class="kc_t" v-if="groupA == '1'">创建老师:{{ item.uname }}</div>
|
|
|
+ <div class="kc_time">{{ item.time }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="three_bottom">
|
|
|
+ <div @click="jump(item.courseId)">查看课程</div>
|
|
|
+ <div
|
|
|
+ v-if="groupA == '0'"
|
|
|
+ @click="
|
|
|
+ goTo(
|
|
|
+ '/course/addCourse?cid=' +
|
|
|
+ item.courseId +
|
|
|
+ '&userid=' +
|
|
|
+ userid +
|
|
|
+ '&oid=' +
|
|
|
+ oid
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >修改</div>
|
|
|
+ <div
|
|
|
+ @click="
|
|
|
+ goTo(
|
|
|
+ '/works?cid=' +
|
|
|
+ item.courseId +
|
|
|
+ '&userid=' +
|
|
|
+ userid +
|
|
|
+ '&oid=' +
|
|
|
+ oid
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >报告</div>
|
|
|
+ <div @click="deleteCourse(item.courseId)">删除</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="course_empty" v-if="course.length == 0">暂无数据</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="student_page">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page-size="10"
|
|
|
+ :total="total"
|
|
|
+ v-if="page && course.length"
|
|
|
+ style="padding-bottom: 20px"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import "../../common/aws-sdk-2.235.1.min";
|
|
|
+import EditorBar from "../../components/tools/wangEnduit";
|
|
|
+import CourseProblem from "./components/courseProblem";
|
|
|
+export default {
|
|
|
+ components: { EditorBar,CourseProblem },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ isLoading: false,
|
|
|
+ formLabelWidth: "100px",
|
|
|
+ userid: this.$route.query.userid,
|
|
|
+ oid: this.$route.query.oid,
|
|
|
+ page: 1,
|
|
|
+ total: 0,
|
|
|
+ tableData: [
|
|
|
+
|
|
|
+ ],
|
|
|
+ now: "",
|
|
|
+ groupA: "0",
|
|
|
+ course: [
|
|
|
+ {cover:[],title:"认识种子的起源在线课程.ppt",time:new Date().getTime()},
|
|
|
+ {cover:[],title:"人工智能创意应用.ppt",time:new Date().getTime()},
|
|
|
+ ],
|
|
|
+ courseName: "",
|
|
|
+ mr: require("../../assets/icon/kc1.png"),
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ change(val) {
|
|
|
+ console.log(val);
|
|
|
+ },
|
|
|
+ goTo(path) {
|
|
|
+ this.$router.push(path);
|
|
|
+ },
|
|
|
+ tableRowClassName({ row, rowIndex }) {
|
|
|
+ if ((rowIndex + 1) % 2 === 0) {
|
|
|
+ return "even_row";
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ jump(cid) {
|
|
|
+ window.parent.postMessage({ cid: cid, type: "1" }, "*");
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // console.log(`当前页: ${val}`);
|
|
|
+ this.page = val;
|
|
|
+ },
|
|
|
+ init() {},
|
|
|
+ handleClose(done) {
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ console.log(file, fileList);
|
|
|
+ },
|
|
|
+ onExceed() {
|
|
|
+ this.$message.error("课程海报仅支持上传一张,请删除后再进行上传");
|
|
|
+ },
|
|
|
+ //uuid生成
|
|
|
+ guid() {
|
|
|
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (
|
|
|
+ c
|
|
|
+ ) {
|
|
|
+ var r = (Math.random() * 16) | 0,
|
|
|
+ v = c == "x" ? r : (r & 0x3) | 0x8;
|
|
|
+ return v.toString(16);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ time() {
|
|
|
+ if (!this.now) {
|
|
|
+ this.now = new Date().getTime();
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ let time = new Date().getTime();
|
|
|
+ if (time - this.now > 3000) {
|
|
|
+ this.now = time;
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ searchCourse() {
|
|
|
+ this.page = 1;
|
|
|
+ },
|
|
|
+ // deleteCourse(cid) {
|
|
|
+ // const loading = this.openLoading(
|
|
|
+ // document.querySelector(".student_table")
|
|
|
+ // );
|
|
|
+ // this.isLoading = true;
|
|
|
+ // let params = {
|
|
|
+ // cid: cid,
|
|
|
+ // };
|
|
|
+ // this.ajax
|
|
|
+ // .get(this.$store.state.api + "deleteCourse", params)
|
|
|
+ // .then((res) => {
|
|
|
+ // loading.close();
|
|
|
+ // this.isLoading = false;
|
|
|
+ // this.$message.success("删除成功");
|
|
|
+ // })
|
|
|
+ // .catch((err) => {
|
|
|
+ // console.error(err);
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+
|
|
|
+ search() {
|
|
|
+ this.page = 1;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.page = 1;
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.dialog_diy >>> .el-dialog__header {
|
|
|
+ background: #3d67bc !important;
|
|
|
+ padding: 15px 20px;
|
|
|
+}
|
|
|
+.dialog_diy >>> .el-dialog__title {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn {
|
|
|
+ top: 19px;
|
|
|
+}
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+.student_head >>> .el-button--primary {
|
|
|
+ background-color: #2268bc;
|
|
|
+}
|
|
|
+
|
|
|
+.xls_button {
|
|
|
+ font-size: 14px;
|
|
|
+ cursor: pointer;
|
|
|
+ text-decoration: underline;
|
|
|
+ color: rgb(34, 104, 188);
|
|
|
+}
|
|
|
+.student_head {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ align-items: baseline;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ margin-top: 25px;
|
|
|
+}
|
|
|
+
|
|
|
+.top {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.bgColor {
|
|
|
+ background: #466b99;
|
|
|
+}
|
|
|
+
|
|
|
+.student_search {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ width: calc(100% / 3);
|
|
|
+}
|
|
|
+.student_search span {
|
|
|
+ margin: 0 10px 0 0;
|
|
|
+ width: 65px;
|
|
|
+}
|
|
|
+.student_button {
|
|
|
+ display: flex;
|
|
|
+ overflow: hidden;
|
|
|
+ height: 40px;
|
|
|
+}
|
|
|
+.upload-demo {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: end;
|
|
|
+ /* position: relative; */
|
|
|
+ width: 100px;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.student_table {
|
|
|
+ margin: 10px 0;
|
|
|
+ height: 100%;
|
|
|
+ overflow: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.student_empty {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.el-table >>> .even_row {
|
|
|
+ background-color: #f1f1f1;
|
|
|
+}
|
|
|
+
|
|
|
+.time {
|
|
|
+ font-size: 13px;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+
|
|
|
+.course_button {
|
|
|
+ padding: 10px 20px;
|
|
|
+}
|
|
|
+.course_button_box {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 5px;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+.course_rate {
|
|
|
+ margin-top: 5px;
|
|
|
+}
|
|
|
+.course_view {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin: 5px 0 0 0;
|
|
|
+}
|
|
|
+.course_view i {
|
|
|
+ background-image: url("../../assets/liulan.png");
|
|
|
+ width: 25px;
|
|
|
+ height: 25px;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ /* margin-top: 1px; */
|
|
|
+ line-height: 25px;
|
|
|
+ vertical-align: text-top;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+}
|
|
|
+.image {
|
|
|
+ width: 100%;
|
|
|
+ height: 150px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.course_box {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ height: 100%;
|
|
|
+ min-height: 530px;
|
|
|
+}
|
|
|
+.student_page {
|
|
|
+ width: 95%;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+.course_create_box {
|
|
|
+ font-size: 18px;
|
|
|
+}
|
|
|
+.course_name {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
+.course_name span {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.homework_box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+.course_homework {
|
|
|
+ width: 130px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ margin: 0 10px 10px 0;
|
|
|
+}
|
|
|
+.course_type {
|
|
|
+ margin-top: 10px;
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.course_type1 span {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.course_type2 {
|
|
|
+ margin-left: 20px;
|
|
|
+}
|
|
|
+.course_type2 span {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.course_empty {
|
|
|
+ color: rgb(110, 110, 110);
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
+.el_cards >>> .el-card__body {
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+.courseBtnBox {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: space-between;
|
|
|
+ height: calc(100% - 170px);
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.wordUpload {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+
|
|
|
+.wordUpload > .buttonUp {
|
|
|
+ margin-right: 5px;
|
|
|
+}
|
|
|
+
|
|
|
+.out_box {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ flex-wrap: nowrap;
|
|
|
+ width: 250px;
|
|
|
+ background: #fff;
|
|
|
+ margin-left: 25px;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ height: fit-content;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-radius: 0px 0px 5px 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-bottom: 15px;
|
|
|
+}
|
|
|
+
|
|
|
+.bottom_box {
|
|
|
+ display: flex;
|
|
|
+ padding: 10px 0 10px 10px;
|
|
|
+ flex-direction: column;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+.bottom_box > div:nth-child(1) {
|
|
|
+ width: 230px;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+}
|
|
|
+
|
|
|
+.tup {
|
|
|
+ width: 100%;
|
|
|
+ height: 141.06px;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+
|
|
|
+.tup > img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.kc_time {
|
|
|
+ margin-top: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #999;
|
|
|
+}
|
|
|
+.kc_t {
|
|
|
+ margin-top: 5px;
|
|
|
+}
|
|
|
+
|
|
|
+.three_bottom {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-around;
|
|
|
+ height: 40px;
|
|
|
+ align-items: center;
|
|
|
+ background: #f5f4f4;
|
|
|
+ font-size: 14px;
|
|
|
+}
|
|
|
+.three_bottom > div {
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.three_bottom > div:hover {
|
|
|
+ color: #79a2ff;
|
|
|
+}
|
|
|
+.head_left {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.student_input >>> .el-input__inner {
|
|
|
+ height: 40px;
|
|
|
+ width: 190px;
|
|
|
+ font-size: 13px;
|
|
|
+ padding: 0 10px;
|
|
|
+}
|
|
|
+.course_button {
|
|
|
+ color: #fff;
|
|
|
+ background: #2268bc;
|
|
|
+ width: 75px;
|
|
|
+ height: 40px;
|
|
|
+ padding: 0 !important;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 40px;
|
|
|
+}
|
|
|
+.all_choose {
|
|
|
+ margin: 15px 0 10px;
|
|
|
+ height: 20%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ width: calc(100% / 3);
|
|
|
+}
|
|
|
+.all_choose > span {
|
|
|
+ width: 50px;
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+.choose {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ align-content: space-between;
|
|
|
+ height: 100%;
|
|
|
+ justify-content: flex-start;
|
|
|
+ width: 60%;
|
|
|
+ min-width: 868px;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+.choose > div:nth-child(2) {
|
|
|
+ margin-left: 1%;
|
|
|
+ width: 32.33333%;
|
|
|
+}
|
|
|
+.choose > div:nth-child(4) {
|
|
|
+ margin-right: 1%;
|
|
|
+ width: 32.33333%;
|
|
|
+}
|
|
|
+.choose > div:nth-child(5) {
|
|
|
+ margin-left: 1%;
|
|
|
+}
|
|
|
+.choose > div:nth-child(4) > span {
|
|
|
+ width: 74px !important;
|
|
|
+ min-width: 74px;
|
|
|
+}
|
|
|
+.choose > div:nth-child(4) >>> .el-select {
|
|
|
+ width: 217.5px;
|
|
|
+ min-width: 215.06px;
|
|
|
+}
|
|
|
+.clear {
|
|
|
+ width: 70px;
|
|
|
+ height: 35px;
|
|
|
+ background: #2268bc;
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 5px;
|
|
|
+ line-height: 35px;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 20px;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+</style>
|