mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
提交
This commit is contained in:
@@ -122,8 +122,12 @@
|
||||
|
||||
<script>
|
||||
import apiArticle from '@/api/modules/article.js'
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'articleItems',
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageData: {
|
||||
@@ -227,6 +231,19 @@ export default {
|
||||
if (res.status == 200) {
|
||||
this.$message.success('删除成功')
|
||||
this.getArticleList()
|
||||
let event = {
|
||||
key: "DeleteArticle",//后台的事件key 发布文章且审核通过
|
||||
title: '删除文章(被删除)',//事件的标题
|
||||
parameters:"",//用户自定义参数 name:value,name:value
|
||||
content: '删除文章(被删除)',//事件的内容
|
||||
objId: item.id,//关联的id
|
||||
objType: "2",//关联的类型
|
||||
objInfo:item.title,
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
|
||||
@@ -131,8 +131,12 @@
|
||||
|
||||
<script>
|
||||
import apiQa from '@/api/modules/qa.js';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'articleItems',
|
||||
computed: {
|
||||
...mapGetters(['userInfo'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
getRowKeys(row) {
|
||||
@@ -208,14 +212,30 @@ export default {
|
||||
.del(id)
|
||||
.then(res => {
|
||||
if (res.status == 200) {
|
||||
|
||||
this.getQaList();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功'
|
||||
});
|
||||
|
||||
let event = {
|
||||
key: "DeleteQuestion",//后台的事件key 发布文章且审核通过
|
||||
title: '删除问题',//事件的标题
|
||||
parameters:"",//用户自定义参数 name:value,name:value
|
||||
content: '删除问题',//事件的内容
|
||||
objId: data.id,//关联的id
|
||||
objType: "3",//关联的类型
|
||||
objInfo:data.title,
|
||||
aid: this.userInfo.aid, //当前登录人的id
|
||||
aname: this.userInfo.name,//当前人的姓名
|
||||
status: 1 //状态,直接写1
|
||||
}
|
||||
this.$store.dispatch("userTrigger", event);
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err,'err');
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '删除失败'
|
||||
@@ -230,7 +250,7 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.delQaList(item);
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
//设置单挑数据
|
||||
|
||||
Reference in New Issue
Block a user