去掉删除课程的事件,转为后端去处理了

This commit is contained in:
daihh
2022-11-29 13:39:28 +08:00
parent 8db7130faa
commit c1be147270
2 changed files with 18 additions and 18 deletions

View File

@@ -75,7 +75,7 @@
<el-table-column label="序号" type="index" width="50"></el-table-column> <el-table-column label="序号" type="index" width="50"></el-table-column>
<el-table-column label="名称" prop="name" width="200" show-overflow-tooltip> <el-table-column label="名称" prop="name" width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.name }}</span> <span class="previewStyle" @click="viewTopic(scope.row)">{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="内容分类" prop="sysType" sortable width="240px"> <el-table-column label="内容分类" prop="sysType" sortable width="240px">
@@ -776,22 +776,22 @@ export default {
const {status} = await apiCourse.del(params); const {status} = await apiCourse.del(params);
if(status === 200) { if(status === 200) {
this.$message.success('操作成功!'); //只是之前发布过的课程删除才可 this.$message.success('操作成功!'); //只是之前发布过的课程删除才可
if(!row.erasable){ // if(!row.erasable){
let event = { // let event = {
key: "CourseDelete",//被管理员删除 // key: "CourseDelete",//被管理员删除
title: '被管理员删除课程',//事件的标题 // title: '被管理员删除课程',//事件的标题
parameters:"author:"+row.sysCreateAid,//作者,一般这种情况不是管理员自己添加的 // parameters:"author:"+row.sysCreateAid,//作者,一般这种情况不是管理员自己添加的
content: '被管理员删除课程',//事件的内容 // content: '被管理员删除课程',//事件的内容
objId: row.id,//关联的id // objId: row.id,//关联的id
objType: "1",//关联的类型 // objType: "1",//关联的类型
objInfo:row.name, // objInfo:row.name,
aid: this.userInfo.aid, //当前登录人的id // aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名 // aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1 // status: 1 //状态直接写1
} // }
this.$store.dispatch("userTrigger", event); // this.$store.dispatch("userTrigger", event);
} // }
this.searchData(); this.searchData();
} }
} catch (error) { } catch (error) {

View File

@@ -286,7 +286,7 @@ export default {
const { status } = await apiCourse.del(params); const { status } = await apiCourse.del(params);
if (status === 200) { if (status === 200) {
this.$message.success('操作成功!'); this.$message.success('操作成功!');
//发送自己删除课程的事件,审核通过的,自己不能删除了 //事件移到后端处理
// if(!row.erasable){ // if(!row.erasable){
// let event = { // let event = {
// key: "DeleteCourse",//被管理员删除 // key: "DeleteCourse",//被管理员删除