|
@@ -0,0 +1,149 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-table
|
|
|
+ :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
|
+ :data="details"
|
|
|
+ max-height="300px"
|
|
|
+ style="width:100%!important;"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ label="主教老师"
|
|
|
+ prop="actualTeacherName"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="助教老师"
|
|
|
+ prop="teachingTeacherNames"
|
|
|
+ ></el-table-column>
|
|
|
+ <!-- <!-- courseTypeListByName[scope.row.type] --> -->
|
|
|
+ <el-table-column label="课程类型" prop="type">
|
|
|
+ <span slot-scope="scope">{{
|
|
|
+ scope.row.type
|
|
|
+ }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="周次" key="week">
|
|
|
+ <span slot-scope="scope">{{
|
|
|
+ weeks[$helpers.dayjs(scope.row.startClassTime).day()]
|
|
|
+ }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="开始时间" prop="startClassTime">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{ scope.row.startClassTime | dateForMinFormat }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="课程时长(分钟)" key="time">
|
|
|
+ <span slot-scope="scope">{{ getTimers(scope.row) }}</span>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { diffTimerFormMinute } from "@/utils/date";
|
|
|
+import dayjs from "dayjs";
|
|
|
+export default {
|
|
|
+ props: {
|
|
|
+ types: {
|
|
|
+ type: Object,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
+ details: {
|
|
|
+ type: Array,
|
|
|
+ default: [],
|
|
|
+ },
|
|
|
+ courseTypeListByName: {
|
|
|
+ type: Object,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
+ teacherList: {
|
|
|
+ type: Array,
|
|
|
+ default: [],
|
|
|
+ },
|
|
|
+ cooperationList: {
|
|
|
+ type: Array,
|
|
|
+ default: [],
|
|
|
+ },
|
|
|
+ coreTeacher: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
+ assistant: {
|
|
|
+ type: Array,
|
|
|
+ default: [],
|
|
|
+ },
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ weeks: {
|
|
|
+ 0: "星期天",
|
|
|
+ 1: "星期一",
|
|
|
+ 2: "星期二",
|
|
|
+ 3: "星期三",
|
|
|
+ 4: "星期四",
|
|
|
+ 5: "星期五",
|
|
|
+ 6: "星期六",
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ // coreTeacherName() {
|
|
|
+ // let name = "";
|
|
|
+ // for (const item of this.teacherList) {
|
|
|
+ // if (this.coreTeacher == item.id) {
|
|
|
+ // name = item.realName;
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return name;
|
|
|
+ // },
|
|
|
+ // assistantName() {
|
|
|
+ // let names = [];
|
|
|
+ // for (const item of this.cooperationList) {
|
|
|
+ // if (this.assistant.includes(item.id)) {
|
|
|
+ // names.push(item.realName);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // return names.join(" ");
|
|
|
+ // },
|
|
|
+ typelist() {
|
|
|
+ const list = [];
|
|
|
+ for (const key in this.types) {
|
|
|
+ // if (Object.hasOwnProperty.call(this.types, key)) {
|
|
|
+ // const item = this.types[key];
|
|
|
+ // let surplusTime = 0;
|
|
|
+ // let surplus = 0;
|
|
|
+ // for (const ke of item.cycle) {
|
|
|
+ // surplus += parseFloat(ke.expectCourseNum);
|
|
|
+ // surplusTime += parseFloat(ke.expectCourseNum) * parseFloat(ke.time);
|
|
|
+ // }
|
|
|
+ // surplusTime = item.courseTotalMinuties - surplusTime;
|
|
|
+ // list.push({
|
|
|
+ // name: this.courseTypeListByName[key],
|
|
|
+ // cycles: item.cycle.length,
|
|
|
+ // courseTotalMinuties: item.courseTotalMinuties,
|
|
|
+ // surplus,
|
|
|
+ // surplusTime,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ console.log(this);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getTimers(item) {
|
|
|
+ const time = diffTimerFormMinute(
|
|
|
+ dayjs(item.classDate).format("YYYY-MM-DD"),
|
|
|
+ dayjs(item.startClassTime).format("HH:mm"),
|
|
|
+ dayjs(item.endClassTime).format("HH:mm")
|
|
|
+ );
|
|
|
+ return time;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+</style>
|