|  | @@ -23,31 +23,31 @@
 | 
	
		
			
				|  |  |              prop="name"
 | 
	
		
			
				|  |  |              label="课件名称"
 | 
	
		
			
				|  |  |            ></el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column
 | 
	
		
			
				|  |  | -            align="center"
 | 
	
		
			
				|  |  | -            prop="cover"
 | 
	
		
			
				|  |  | -            label="课件封面"
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | -          <template slot-scope="scope">
 | 
	
		
			
				|  |  | -            <el-image
 | 
	
		
			
				|  |  | -              v-if="scope.row.cover"
 | 
	
		
			
				|  |  | -              :src="scope.row.cover"
 | 
	
		
			
				|  |  | -              style="width: 60px;height: 60px"
 | 
	
		
			
				|  |  | -              fit="contain"
 | 
	
		
			
				|  |  | -            />
 | 
	
		
			
				|  |  | -          </template>
 | 
	
		
			
				|  |  | -        </el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column align="center" prop="cover" label="课件封面">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">
 | 
	
		
			
				|  |  | +              <el-image
 | 
	
		
			
				|  |  | +                v-if="scope.row.cover"
 | 
	
		
			
				|  |  | +                :src="scope.row.cover"
 | 
	
		
			
				|  |  | +                style="width: 60px;height: 60px"
 | 
	
		
			
				|  |  | +                fit="contain"
 | 
	
		
			
				|  |  | +              />
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  | +          </el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column align="center" label="声部" prop="subjectName">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope"">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">
 | 
	
		
			
				|  |  |                <span v-if="scope.row.subjectName">{{
 | 
	
		
			
				|  |  |                  scope.row.subjectName
 | 
	
		
			
				|  |  |                }}</span>
 | 
	
		
			
				|  |  |                <span v-else style="color: red;">暂未配置声部</span>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  |            </el-table-column>
 | 
	
		
			
				|  |  | -          <el-table-column align="center" label="课时数" prop="courseNum"></el-table-column>
 | 
	
		
			
				|  |  | +          <el-table-column
 | 
	
		
			
				|  |  | +            align="center"
 | 
	
		
			
				|  |  | +            label="课时数"
 | 
	
		
			
				|  |  | +            prop="courseNum"
 | 
	
		
			
				|  |  | +          ></el-table-column>
 | 
	
		
			
				|  |  |            <el-table-column align="center" label="状态">
 | 
	
		
			
				|  |  | -            <template slot-scope="scope"">
 | 
	
		
			
				|  |  | +            <template slot-scope="scope">
 | 
	
		
			
				|  |  |                <el-tag :type="scope.row.enable ? '' : 'danger'">{{
 | 
	
		
			
				|  |  |                  scope.row.enable ? "启用" : "停用"
 | 
	
		
			
				|  |  |                }}</el-tag>
 | 
	
	
		
			
				|  | @@ -65,10 +65,15 @@
 | 
	
		
			
				|  |  |                <el-button
 | 
	
		
			
				|  |  |                  v-permission="'lessonCourseware/updateEnableFlag'"
 | 
	
		
			
				|  |  |                  type="text"
 | 
	
		
			
				|  |  | +                :disabled="!scope.row.subjectName"
 | 
	
		
			
				|  |  |                  @click="onChangeStatus(scope.row)"
 | 
	
		
			
				|  |  | -                >{{ scope.row.enable ? '停用' : '启用' }}</el-button
 | 
	
		
			
				|  |  | +                >{{ scope.row.enable ? "停用" : "启用" }}</el-button
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  | -              <el-button v-permission="'lessonCourseware/deleteLessonCourseware'" type="text" @click="onRemove(scope.row)"
 | 
	
		
			
				|  |  | +              <el-button
 | 
	
		
			
				|  |  | +                :disabled="scope.row.enable"
 | 
	
		
			
				|  |  | +                v-permission="'lessonCourseware/deleteLessonCourseware'"
 | 
	
		
			
				|  |  | +                type="text"
 | 
	
		
			
				|  |  | +                @click="onRemove(scope.row)"
 | 
	
		
			
				|  |  |                  >删除</el-button
 | 
	
		
			
				|  |  |                >
 | 
	
		
			
				|  |  |              </template>
 | 
	
	
		
			
				|  | @@ -95,7 +100,11 @@
 | 
	
		
			
				|  |  |        <addCourseware
 | 
	
		
			
				|  |  |          :detail.sync="rowDetail"
 | 
	
		
			
				|  |  |          v-if="coursewareStatus"
 | 
	
		
			
				|  |  | -        @close="() => {coursewareStatus = false}"
 | 
	
		
			
				|  |  | +        @close="
 | 
	
		
			
				|  |  | +          () => {
 | 
	
		
			
				|  |  | +            coursewareStatus = false;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        "
 | 
	
		
			
				|  |  |          @getList="getList"
 | 
	
		
			
				|  |  |        />
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
	
		
			
				|  | @@ -110,7 +119,11 @@
 | 
	
		
			
				|  |  |        <updateCourseware
 | 
	
		
			
				|  |  |          :detail.sync="rowDetail"
 | 
	
		
			
				|  |  |          v-if="updateStatus"
 | 
	
		
			
				|  |  | -        @close="() => {updateStatus = false}"
 | 
	
		
			
				|  |  | +        @close="
 | 
	
		
			
				|  |  | +          () => {
 | 
	
		
			
				|  |  | +            updateStatus = false;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +        "
 | 
	
		
			
				|  |  |          @getList="getList"
 | 
	
		
			
				|  |  |        />
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
	
		
			
				|  | @@ -120,7 +133,11 @@
 | 
	
		
			
				|  |  |  import pagination from "@/components/Pagination/index";
 | 
	
		
			
				|  |  |  import addCourseware from "./add-courseware.vue";
 | 
	
		
			
				|  |  |  import updateCourseware from "./update-courseware.vue";
 | 
	
		
			
				|  |  | -import { queryLessonCourseware, deleteLessonCourseware, updateEnableFlag } from "./api";
 | 
	
		
			
				|  |  | +import {
 | 
	
		
			
				|  |  | +  queryLessonCourseware,
 | 
	
		
			
				|  |  | +  deleteLessonCourseware,
 | 
	
		
			
				|  |  | +  updateEnableFlag
 | 
	
		
			
				|  |  | +} from "./api";
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    components: { pagination, addCourseware, updateCourseware },
 | 
	
		
			
				|  |  |    name: "helpCategory",
 | 
	
	
		
			
				|  | @@ -150,39 +167,37 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onChangeStatus(row) {
 | 
	
		
			
				|  |  |        //
 | 
	
		
			
				|  |  | -      this.$confirm(`是否${row.enable ? '停用' : '启用'}该课件?`, "提示", {
 | 
	
		
			
				|  |  | +      this.$confirm(`是否${row.enable ? "停用" : "启用"}该课件?`, "提示", {
 | 
	
		
			
				|  |  |          confirmButtonText: "确定",
 | 
	
		
			
				|  |  |          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | -        type: "warning",
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -        .then(async () => {
 | 
	
		
			
				|  |  | -          try {
 | 
	
		
			
				|  |  | -            await updateEnableFlag({
 | 
	
		
			
				|  |  | -              id: row.id,
 | 
	
		
			
				|  |  | -              enableFlag: !row.enable
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -            this.$message.success((row.enable ? '停用' : '启用' ) +'成功')
 | 
	
		
			
				|  |  | -            this.getList()
 | 
	
		
			
				|  |  | -          } catch {
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  | +      }).then(async () => {
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +          await updateEnableFlag({
 | 
	
		
			
				|  |  | +            id: row.id,
 | 
	
		
			
				|  |  | +            enableFlag: !row.enable
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          this.$message.success((row.enable ? "停用" : "启用") + "成功");
 | 
	
		
			
				|  |  | +          this.getList();
 | 
	
		
			
				|  |  | +        } catch {
 | 
	
		
			
				|  |  |            //
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      onRemove(row) {
 | 
	
		
			
				|  |  |        this.$confirm("是否删除该课件?", "提示", {
 | 
	
		
			
				|  |  |          confirmButtonText: "确定",
 | 
	
		
			
				|  |  |          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | -        type: "warning",
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -        .then(async () => {
 | 
	
		
			
				|  |  | -          try {
 | 
	
		
			
				|  |  | -            await deleteLessonCourseware([row.id])
 | 
	
		
			
				|  |  | -            this.$message.success('删除成功')
 | 
	
		
			
				|  |  | -            this.getList()
 | 
	
		
			
				|  |  | -          } catch {
 | 
	
		
			
				|  |  | +        type: "warning"
 | 
	
		
			
				|  |  | +      }).then(async () => {
 | 
	
		
			
				|  |  | +        try {
 | 
	
		
			
				|  |  | +          await deleteLessonCourseware([row.id]);
 | 
	
		
			
				|  |  | +          this.$message.success("删除成功");
 | 
	
		
			
				|  |  | +          this.getList();
 | 
	
		
			
				|  |  | +        } catch {
 | 
	
		
			
				|  |  |            //
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      async getList() {
 | 
	
		
			
				|  |  |        let params = {
 |