|
@@ -62,10 +62,10 @@
|
|
|
<el-form-item class="pull-left">
|
|
|
<span>批量操作:</span>
|
|
|
<el-button size="small" type="primary" @click="openCoursePropertys"
|
|
|
- ><i class="el-icon-circle-check"></i> 启用</el-button
|
|
|
+ ><i class="el-icon-check"></i> 启用</el-button
|
|
|
>
|
|
|
<el-button size="small" type="danger" @click="closeCoursePropertys"
|
|
|
- ><i class="el-icon-circle-close"></i> 禁用</el-button
|
|
|
+ ><i class="el-icon-close"></i> 禁用</el-button
|
|
|
>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
@@ -93,7 +93,26 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="状态">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ getEnable(scope.row.enable) }}</span>
|
|
|
+ <span v-if="scope.row.enable">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="启用"
|
|
|
+ placement="left"
|
|
|
+ >
|
|
|
+ <i class="el-icon-success" style="color:green;"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ <span v-else>
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="禁用"
|
|
|
+ placement="left"
|
|
|
+ >
|
|
|
+ <i class="el-icon-error" style="color:red;"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="260">
|
|
@@ -103,19 +122,25 @@
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="editCourseProperty(scope.row)"
|
|
|
+ plain
|
|
|
><i class="el-icon-zoom-in"></i> 详情
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ v-if="!scope.row.enable"
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
+ plain
|
|
|
@click="openCourseProperty(scope.row)"
|
|
|
- ><i class="el-icon-circle-check"></i> 启用
|
|
|
+ >
|
|
|
+ <i class="fa fa-check" aria-hidden="true"></i>启用
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
+ v-if="scope.row.enable"
|
|
|
size="mini"
|
|
|
type="danger"
|
|
|
@click="closeCourseProperty(scope.row)"
|
|
|
- ><i class="el-icon-circle-close"></i> 禁用
|
|
|
+ >
|
|
|
+ <i class="fa fa-close" aria-hidden="true"></i>禁用
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -428,13 +453,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getEnable(value) {
|
|
|
- if (value === true) {
|
|
|
- return "开启";
|
|
|
- } else {
|
|
|
- return "禁用";
|
|
|
- }
|
|
|
- },
|
|
|
//查询所有课程
|
|
|
getCourses(query) {
|
|
|
query = query.trim();
|