|
@@ -24,7 +24,12 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
- <el-select v-model.trim="searchForm.teacherIdList" clearable filterable placeholder="请选择老师">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.teacherIdList"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择老师"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="(item, index) in teacherList"
|
|
|
:key="index"
|
|
@@ -103,12 +108,10 @@
|
|
|
<el-table-column align="center" prop="classGroupName" label="班级名称"></el-table-column>
|
|
|
<el-table-column align="center" prop="studentId" label="学生id">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="scope.row.groupType != 'MUSIC'">
|
|
|
- {{scope.row.studentId}}
|
|
|
- </div>
|
|
|
+ <div v-if="scope.row.groupType != 'MUSIC'">{{scope.row.studentId}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="subjectName" label="声部"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="subjectName" label="声部"></el-table-column>
|
|
|
<el-table-column align="center" prop="name" label="课程名称"></el-table-column>
|
|
|
<el-table-column align="center" label="课程类型">
|
|
|
<template slot-scope="scope">
|
|
@@ -135,16 +138,16 @@
|
|
|
<div>{{ scope.row.isSignIn | attendanceType}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="是否签退" fixed="right">
|
|
|
+ <el-table-column align="center" label="是否签退" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<div>{{ scope.row.isSignOut | attendanceOutType}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="isCallNames" label="是否点名" fixed="right">
|
|
|
+ <el-table-column align="center" prop="isCallNames" label="是否点名" fixed="right">
|
|
|
<template slot-scope="scope">{{ scope.row.isCallNames ? '是' : '否' }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="teacherName" label="指导老师" fixed="right"></el-table-column>
|
|
|
- <el-table-column align="center" label="详情" fixed="right">
|
|
|
+ <el-table-column align="center" prop="teacherName" label="指导老师" fixed="right"></el-table-column>
|
|
|
+ <el-table-column align="center" label="详情" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
<el-button type="text" @click="lookDetail(scope.row)">详情</el-button>
|
|
@@ -161,7 +164,12 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog title="课表详情" :visible.sync="classVisible" :before-close="closeClassVisible" width="1000px">
|
|
|
+ <el-dialog
|
|
|
+ title="课表详情"
|
|
|
+ :visible.sync="classVisible"
|
|
|
+ :before-close="closeClassVisible"
|
|
|
+ width="1000px"
|
|
|
+ >
|
|
|
<el-form :model="maskForm" :inline="true">
|
|
|
<el-form-item label="老师姓名">
|
|
|
<!-- <el-input v-model.trim="maskForm.teacherName"
|
|
@@ -244,7 +252,11 @@
|
|
|
<studentWork :courseScheduleId="maskForm.id"></studentWork>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane label="评论" v-if="maskForm.type == 'VIP' || maskForm.type == 'PRACTICE'" name="four">
|
|
|
+ <el-tab-pane
|
|
|
+ label="评论"
|
|
|
+ v-if="maskForm.type == 'VIP' || maskForm.type == 'PRACTICE'"
|
|
|
+ name="four"
|
|
|
+ >
|
|
|
<div v-if="activeName == 'four'">
|
|
|
<courseEvaluate :courseScheduleId="maskForm.id"></courseEvaluate>
|
|
|
</div>
|
|
@@ -269,7 +281,7 @@ import studentWork from "./componentCourse/studentWork";
|
|
|
import courseEvaluate from "./componentCourse/courseEvaluate";
|
|
|
import axios from "axios";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
-import load from '@/utils/loading'
|
|
|
+import load from "@/utils/loading";
|
|
|
let nowTime = new Date();
|
|
|
nowTime =
|
|
|
nowTime.getFullYear() +
|
|
@@ -354,8 +366,10 @@ export default {
|
|
|
onCourseExport() {
|
|
|
// 课表导出
|
|
|
let searchForm = this.searchForm;
|
|
|
- if (!searchForm.timer) {
|
|
|
+ if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
|
searchForm.timer = [];
|
|
|
+ this.$message.error("请选择时间段");
|
|
|
+ return;
|
|
|
}
|
|
|
let obj = {
|
|
|
courseStatus: searchForm.courseStatus || null,
|
|
@@ -384,41 +398,45 @@ export default {
|
|
|
type: "warning"
|
|
|
})
|
|
|
.then(() => {
|
|
|
- load.startLoading()
|
|
|
- axios(options).then(res => {
|
|
|
- let blob = new Blob([res.data], {
|
|
|
- // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
- type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
- //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
- });
|
|
|
- let text = (new Response(blob)).text()
|
|
|
- text.then(res => {
|
|
|
- // 判断是否报错
|
|
|
- if(res.indexOf('code') != -1) {
|
|
|
- let json = JSON.parse(res)
|
|
|
- this.$message.error(json.msg)
|
|
|
- } else {
|
|
|
- let objectUrl = URL.createObjectURL(blob);
|
|
|
- let link = document.createElement("a");
|
|
|
- let fname = "课表列表" + new Date().getTime(); //下载文件的名字
|
|
|
- link.href = objectUrl;
|
|
|
- link.setAttribute("download", fname);
|
|
|
- document.body.appendChild(link);
|
|
|
- link.click();
|
|
|
- }
|
|
|
+ load.startLoading();
|
|
|
+ axios(options)
|
|
|
+ .then(res => {
|
|
|
+ let blob = new Blob([res.data], {
|
|
|
+ // type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'
|
|
|
+ type: "application/vnd.ms-excel;charset=utf-8"
|
|
|
+ //word文档为application/msword,pdf文档为application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8
|
|
|
+ });
|
|
|
+ let text = new Response(blob).text();
|
|
|
+ text.then(res => {
|
|
|
+ // 判断是否报错
|
|
|
+ if (res.indexOf("code") != -1) {
|
|
|
+ let json = JSON.parse(res);
|
|
|
+ this.$message.error(json.msg);
|
|
|
+ } else {
|
|
|
+ let objectUrl = URL.createObjectURL(blob);
|
|
|
+ let link = document.createElement("a");
|
|
|
+ let fname = "课表列表" + new Date().getTime(); //下载文件的名字
|
|
|
+ link.href = objectUrl;
|
|
|
+ link.setAttribute("download", fname);
|
|
|
+ document.body.appendChild(link);
|
|
|
+ link.click();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ load.endLoading();
|
|
|
})
|
|
|
- load.endLoading();
|
|
|
- }).catch(error => {
|
|
|
- this.$message.error('导出数据失败,请连接管理员');
|
|
|
- load.endLoading();
|
|
|
- })
|
|
|
+ .catch(error => {
|
|
|
+ this.$message.error("导出数据失败,请连接管理员");
|
|
|
+ load.endLoading();
|
|
|
+ });
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
getList() {
|
|
|
let searchForm = this.searchForm;
|
|
|
- if (!searchForm.timer) {
|
|
|
+ if (!searchForm.timer || searchForm.timer.length <= 0) {
|
|
|
searchForm.timer = [];
|
|
|
+ this.$message.error("请选择时间段");
|
|
|
+ return;
|
|
|
}
|
|
|
let obj = {
|
|
|
courseStatus: searchForm.courseStatus || null,
|