|
@@ -35,11 +35,16 @@
|
|
|
<div class="curricula-teacher-container-list">
|
|
|
<el-table :data="courseList">
|
|
|
<el-table-column prop="name" label="课程名称" width="320" />
|
|
|
- <el-table-column label="课程周期">
|
|
|
+ <el-table-column label="课程周期" width="210">
|
|
|
<template slot-scope="{ row }">
|
|
|
<i class="el-icon-date" /> {{ row.begin_date }} - {{ row.end_date }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="已发布">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ {{ row.is_release === 'true' ? '√' : '' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column fixed="right" width="80">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-dropdown trigger="click">
|
|
@@ -53,6 +58,15 @@
|
|
|
<el-dropdown-item @click.native="view(row.id)">
|
|
|
<svg-icon icon-class="view" /> 查看
|
|
|
</el-dropdown-item>
|
|
|
+ <el-dropdown-item
|
|
|
+ v-if="row.is_release === 'false'"
|
|
|
+ @click.native="releaseCourse(row.id, true)"
|
|
|
+ >
|
|
|
+ <svg-icon icon-class="publish" /> 发布
|
|
|
+ </el-dropdown-item>
|
|
|
+ <el-dropdown-item v-else @click.native="releaseCourse(row.id, false)">
|
|
|
+ <svg-icon icon-class="undo" /> 取消发布
|
|
|
+ </el-dropdown-item>
|
|
|
<el-dropdown-item @click.native="studentList(row.id)">
|
|
|
<svg-icon icon-class="students" /> 学生列表
|
|
|
</el-dropdown-item>
|
|
@@ -82,6 +96,7 @@
|
|
|
import { updateWordPack } from '@/utils/i18n';
|
|
|
import { PageQueryMyCourseList } from '@/api/table';
|
|
|
import { GetFinishStatusList_Course } from '@/api/select';
|
|
|
+import { ReleaseCourse } from '@/api/course';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -143,6 +158,7 @@ export default {
|
|
|
return '#4F8EEC';
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
studentList(id) {
|
|
|
this.$router.push(`/student_list/index/${id}`);
|
|
|
},
|
|
@@ -151,6 +167,12 @@ export default {
|
|
|
},
|
|
|
view(id) {
|
|
|
this.$router.push(`/GoodsDetail?id=${id}&goodsType=201&readonly=true`);
|
|
|
+ },
|
|
|
+ releaseCourse(course_id, is_release) {
|
|
|
+ ReleaseCourse({ course_id, is_release }).then(() => {
|
|
|
+ this.queryMyCourseList();
|
|
|
+ this.$message.success(`${is_release ? '' : '取消'}发布课程成功`);
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|