动态收集事件添加

This commit is contained in:
zhaofang
2022-09-19 20:12:23 +08:00
parent 9d8839b401
commit 596410abef
4 changed files with 306 additions and 238 deletions

View File

@@ -59,7 +59,7 @@
</div>
<div style="width: 90px;display: flex;justify-content: flex-end;">
<el-button @click="submit()" style="height: 35px;margin-top:20px" type="primary">发布</el-button>
<el-button @click="submit()" style="height: 52px;" type="primary">发布</el-button>
</div>
</div>
</div>
@@ -193,7 +193,7 @@
<el-input show-word-limit class="hideControl" type="textarea" v-model="replyInfo.content" maxlength="100" placeholder="回复内容..."></el-input>
</div>
<div style="width: 120px;display: flex;justify-content: flex-end;">
<el-button @click="submitDlgReply(com)" type="primary">发布回复</el-button>
<el-button @click="submitDlgReply(com)" type="primary">发布1回复</el-button>
</div>
</div>
</div>
@@ -499,7 +499,20 @@
this.list.unshift(res.result);
this.loadAuthorInfo([res.result],[res.result.sysCreateAid]);
this.$message.success('发布成功');
//
let event = {
key: "PublishComment",//后台的事件key 发布文章且审核通过
title: "发表评论",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "每发表一个评论",//事件的内容
objId: this.resolveId,//关联的id
objType: this.objType,//关联的类型
objInfo: "评论",
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
this.total++;
this.$emit('success',res.result);
@@ -569,6 +582,19 @@
this.replyInfo.parentId='';
this.replyInfo.content='';
this.$message.success("发布成功");
let event = {
key: "ReplyComment",//后台的事件key 发布文章且审核通过
title: "回复评论",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "每回一个评论",//事件的内容
objId: this.replyInfo.commentId,//关联的id
objType: this.objType,//关联的类型
objInfo: "评论",
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
}else{
this.$message.error(res.message);
}