|
@@ -5,6 +5,66 @@
|
|
|
课件配置
|
|
|
</h2>
|
|
|
<div class="m-core">
|
|
|
+ <save-form
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ @submit="search"
|
|
|
+ @reset="onReSet"
|
|
|
+ ref="searchForm"
|
|
|
+ >
|
|
|
+ <el-form-item prop="subjectId">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.subjectId"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择声部"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in selects.subjects"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :key="item.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="teacherRangeType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.teacherRangeType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择适用老师"
|
|
|
+ >
|
|
|
+ <el-option value="ALL" label="全部"></el-option>
|
|
|
+ <el-option value="RANGE" label="部分"></el-option>
|
|
|
+ <el-option value="DISABLE" label="无"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="studentRangeType">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.studentRangeType"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择适用学生"
|
|
|
+ >
|
|
|
+ <el-option value="ALL" label="全部"></el-option>
|
|
|
+ <el-option value="DISABLE" label="无"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="enable">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="searchForm.enable"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ placeholder="请选择状态"
|
|
|
+ >
|
|
|
+ <el-option value="item.value" label="item.label"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button native-type="submit" type="primary">搜索</el-button>
|
|
|
+ <el-button native-type="reset" type="danger">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </save-form>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
style="margin-bottom:20px"
|
|
@@ -46,6 +106,38 @@
|
|
|
label="课时数"
|
|
|
prop="courseNum"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="适用老师"
|
|
|
+ prop="teacherRangeType"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.subjectName">{{
|
|
|
+ scope.row.teacherRangeType | rangeType
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="适用学生"
|
|
|
+ prop="studentRangeType"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.subjectName">{{
|
|
|
+ scope.row.studentRangeType | rangeType
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="添加时间"
|
|
|
+ prop="createTime"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="添加人"
|
|
|
+ prop="createName"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column align="center" label="状态">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag :type="scope.row.enable ? '' : 'danger'">{{
|
|
@@ -62,6 +154,9 @@
|
|
|
@click="coursewareOperation('update', scope.row)"
|
|
|
>修改</el-button
|
|
|
>
|
|
|
+ <el-button v-permission="'lessonCourseware/updateRangeType'" type="text" @click="onAuth(scope.row)"
|
|
|
+ >适用权限</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
v-permission="'lessonCourseware/updateEnableFlag'"
|
|
|
type="text"
|
|
@@ -127,11 +222,31 @@
|
|
|
@getList="getList"
|
|
|
/>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ :title="'适用权限'"
|
|
|
+ :visible.sync="updateAuth"
|
|
|
+ v-if="updateAuth"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ width="500px"
|
|
|
+ >
|
|
|
+ <applyAuth
|
|
|
+ :detail.sync="rowDetail"
|
|
|
+ v-if="updateAuth"
|
|
|
+ @close="
|
|
|
+ () => {
|
|
|
+ updateAuth = false;
|
|
|
+ }
|
|
|
+ "
|
|
|
+ @getList="getList"
|
|
|
+ />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import addCourseware from "./add-courseware.vue";
|
|
|
+import applyAuth from "./apply-auth.vue";
|
|
|
import updateCourseware from "./update-courseware.vue";
|
|
|
import {
|
|
|
queryLessonCourseware,
|
|
@@ -139,11 +254,17 @@ import {
|
|
|
updateEnableFlag
|
|
|
} from "./api";
|
|
|
export default {
|
|
|
- components: { pagination, addCourseware, updateCourseware },
|
|
|
+ components: { pagination, addCourseware, updateCourseware, applyAuth },
|
|
|
name: "helpCategory",
|
|
|
data() {
|
|
|
return {
|
|
|
tableList: [],
|
|
|
+ searchForm: {
|
|
|
+ subjectId: null,
|
|
|
+ teacherRangeType: null,
|
|
|
+ studentRangeType: null,
|
|
|
+ enable: null
|
|
|
+ },
|
|
|
pageInfo: {
|
|
|
// 分页规则
|
|
|
limit: 10, // 限制显示条数
|
|
@@ -154,10 +275,12 @@ export default {
|
|
|
formActionTitle: "create",
|
|
|
coursewareStatus: false,
|
|
|
updateStatus: false,
|
|
|
+ updateAuth: false,
|
|
|
rowDetail: {}
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.$store.dispatch("setSubjects");
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
@@ -165,6 +288,10 @@ export default {
|
|
|
this.pageInfo.page = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ onReSet() {
|
|
|
+ this.$refs.searchForm.resetFields();
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
onChangeStatus(row) {
|
|
|
//
|
|
|
this.$confirm(`是否${row.enable ? "停用" : "启用"}该课件?`, "提示", {
|
|
@@ -201,6 +328,7 @@ export default {
|
|
|
},
|
|
|
async getList() {
|
|
|
let params = {
|
|
|
+ ...this.searchForm,
|
|
|
page: this.pageInfo.page,
|
|
|
rows: this.pageInfo.limit
|
|
|
};
|
|
@@ -220,6 +348,10 @@ export default {
|
|
|
this.updateStatus = true;
|
|
|
this.rowDetail = row || {};
|
|
|
}
|
|
|
+ },
|
|
|
+ onAuth(row) {
|
|
|
+ this.updateAuth = true;
|
|
|
+ this.rowDetail = row || {}
|
|
|
}
|
|
|
}
|
|
|
};
|