动态收集事件添加

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

@@ -13,13 +13,8 @@
<img src="../../../public/images/cotedetel.png" @click="timeDel()" /> <img src="../../../public/images/cotedetel.png" @click="timeDel()" />
</div> </div>
<div class="newcote-text"> <div class="newcote-text">
<el-input <el-input type="textarea" :autofocus="true" placeholder="好记性不如烂笔头,记录些什么吧~"
type="textarea" v-model="mynoteData.content" maxlength="200" :autosize="{ minRows: 18, maxRows: 20}"
:autofocus="true"
placeholder="好记性不如烂笔头,记录些什么吧~"
v-model="mynoteData.content"
maxlength="200"
:autosize="{ minRows: 18, maxRows: 20}"
show-word-limit> show-word-limit>
</el-input> </el-input>
</div> </div>
@@ -27,7 +22,8 @@
<!-- 我的笔记 --> <!-- 我的笔记 -->
<div class="mycote-content" v-if="notetab == 2"> <div class="mycote-content" v-if="notetab == 2">
<div v-if="noteList.length > 0"> <div v-if="noteList.length > 0">
<div style="border-bottom:1px solid #4444;padding-bottom:25px;" v-for="note in noteList" :key="note.id"> <div style="border-bottom:1px solid #4444;padding-bottom:25px;" v-for="note in noteList"
:key="note.id">
<span class="mycote-time">{{note.sysCreateTime}} <span class="mycote-time">{{note.sysCreateTime}}
<span class="sm">{{note.openType == 1?'公开':'私密'}}</span> <span class="sm">{{note.openType == 1?'公开':'私密'}}</span>
<span class="more"> <span class="more">
@@ -35,15 +31,20 @@
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<svg-icon style="margin-right: 0;font-size:26px;" icon-class="spot"></svg-icon> <svg-icon style="margin-right: 0;font-size:26px;" icon-class="spot"></svg-icon>
</span> </span>
<el-dropdown-menu slot="dropdown" class="dropdown-box" style="background:#333333;border: none;"> <el-dropdown-menu slot="dropdown" class="dropdown-box"
<el-dropdown-item command="a" style="color:#fff" @click.native="noteDel(note)"><img style="width:13px;height:18px;vertical-align: middle;" src="@/assets/images/icon/note-del.png" /> 删除</el-dropdown-item> style="background:#333333;border: none;">
<el-dropdown-item command="b" style="color:#fff" @click.native="noteEdit(note)"><img style="width:13px;height:14px;margin-right:4px;vertical-align: middle;" src="@/assets/images/icon/note-edit.png" />编辑</el-dropdown-item> <el-dropdown-item command="a" style="color:#fff" @click.native="noteDel(note)">
<img style="width:13px;height:18px;vertical-align: middle;"
src="@/assets/images/icon/note-del.png" /> 删除</el-dropdown-item>
<el-dropdown-item command="b" style="color:#fff" @click.native="noteEdit(note)">
<img style="width:13px;height:14px;margin-right:4px;vertical-align: middle;"
src="@/assets/images/icon/note-edit.png" />编辑</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</span> </span>
</span> </span>
<div style="margin-top:10px" class="newcote-time" v-if="note.playTime" @click="onPlayVideo(note.playTime)"> <div style="margin-top:10px" class="newcote-time" v-if="note.playTime"
@click="onPlayVideo(note.playTime)">
<img src="../../../public/images/coteplay.png" alt=""> <img src="../../../public/images/coteplay.png" alt="">
{{formatSeconds(note.playTime)}} {{formatSeconds(note.playTime)}}
</div> </div>
@@ -59,7 +60,8 @@
</div> </div>
</div> </div>
<div class="newcote-bottom" v-if="notetab == 1"> <div class="newcote-bottom" v-if="notetab == 1">
<span style="cursor: pointer;" @click="videoLocation"> <img src="../../../public/images/playtime.png" alt=""> 视频位置</span> <span style="cursor: pointer;" @click="videoLocation"> <img src="../../../public/images/playtime.png"
alt=""> 视频位置</span>
<el-radio v-model="mynoteData.openType" :label="1">公开</el-radio> <el-radio v-model="mynoteData.openType" :label="1">公开</el-radio>
<el-radio v-model="mynoteData.openType" :label="2">私密</el-radio> <el-radio v-model="mynoteData.openType" :label="2">私密</el-radio>
<el-button type="primary" size="small" @click="saveNote()">保存</el-button> <el-button type="primary" size="small" @click="saveNote()">保存</el-button>
@@ -197,6 +199,9 @@
if (res.status == 200) { if (res.status == 200) {
if (!this.mynoteData.id) { if (!this.mynoteData.id) {
this.inAnimation = true; this.inAnimation = true;
if(this.mynoteData.openType != 9){
return
}
// 是编辑新增 // 是编辑新增
let event = { let event = {
key: "PublishNote",//后台的事件key key: "PublishNote",//后台的事件key
@@ -242,21 +247,25 @@
::v-deep .el-dropdown-menu__item:hover { ::v-deep .el-dropdown-menu__item:hover {
background: #333333; background: #333333;
} }
.mynote { .mynote {
// width: 100%; // width: 100%;
margin: 35px 30px; margin: 35px 30px;
position: relative; position: relative;
.animation { .animation {
display: block !important; display: block !important;
animation-name: ubAddBlock; animation-name: ubAddBlock;
animation-duration: 2s; animation-duration: 2s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
} }
.animation-box { .animation-box {
display: none; display: none;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 200px; right: 200px;
.box-text { .box-text {
padding: 12px 16px; padding: 12px 16px;
width: 252px; width: 252px;
@@ -266,6 +275,7 @@
border-radius: 2px; border-radius: 2px;
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
img { img {
width: 16px; width: 16px;
height: 16px; height: 16px;
@@ -274,27 +284,32 @@
} }
} }
} }
.newcote-time { .newcote-time {
width: 80px; width: 80px;
height: 30px; height: 30px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #3379FB; border: 1px solid #3379FB;
font-size: 14px; font-size: 14px;
color: #387DF7;; color: #387DF7;
;
text-align: center; text-align: center;
line-height: 28px; line-height: 28px;
margin-bottom: 12px; margin-bottom: 12px;
img { img {
vertical-align: middle; vertical-align: middle;
margin: 0 5px; margin: 0 5px;
} }
} }
.newcote-bottom { .newcote-bottom {
span { span {
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
margin-right: 30px; margin-right: 30px;
img { img {
width: 20px; width: 20px;
height: 24px; height: 24px;
@@ -302,17 +317,20 @@
} }
} }
} }
.newcote-text { .newcote-text {
// margin-top: 24px; // margin-top: 24px;
font-size: 14px; font-size: 14px;
color: #333333; color: #333333;
height: 100%; height: 100%;
::v-deep .el-textarea__inner { ::v-deep .el-textarea__inner {
background: #f5f5f5; background: #f5f5f5;
border: none; border: none;
padding: 0; padding: 0;
} }
} }
.newcote-content { .newcote-content {
margin: 30px 0px; margin: 30px 0px;
box-sizing: border-box; box-sizing: border-box;
@@ -320,6 +338,7 @@
height: 474px; height: 474px;
background-color: #F5F5F5; background-color: #F5F5F5;
} }
.mycote-content { .mycote-content {
margin: 30px 0px; margin: 30px 0px;
box-sizing: border-box; box-sizing: border-box;
@@ -327,18 +346,22 @@
height: 550px; height: 550px;
overflow-y: auto; overflow-y: auto;
background-color: #fff; background-color: #fff;
.my-nonote { .my-nonote {
text-align: center; text-align: center;
margin-top: 100px; margin-top: 100px;
img { img {
width: 198px; width: 198px;
height: 163px; height: 163px;
} }
} }
.mycote-time { .mycote-time {
color: #666; color: #666;
font-size: 14px; font-size: 14px;
padding-bottom: 20px; padding-bottom: 20px;
.sm { .sm {
width: 50px; width: 50px;
height: 22px; height: 22px;
@@ -350,11 +373,13 @@
margin-left: 20px; margin-left: 20px;
padding: 3px 10px; padding: 3px 10px;
} }
.more { .more {
margin-top: 12px; margin-top: 12px;
float: right; float: right;
} }
} }
.mycote-dibu { .mycote-dibu {
margin: 50px 38%; margin: 50px 38%;
@@ -362,16 +387,19 @@
font-size: 14px; font-size: 14px;
} }
} }
.mynote-tab { .mynote-tab {
width: 180px; width: 180px;
margin-top: 17px; margin-top: 17px;
display: flex; display: flex;
div { div {
font-size: 16px; font-size: 16px;
color: #666666; color: #666666;
flex: 1; flex: 1;
} }
.noteactive a { .noteactive a {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;

View File

@@ -59,7 +59,7 @@
</div> </div>
<div style="width: 90px;display: flex;justify-content: flex-end;"> <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> </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> <el-input show-word-limit class="hideControl" type="textarea" v-model="replyInfo.content" maxlength="100" placeholder="回复内容..."></el-input>
</div> </div>
<div style="width: 120px;display: flex;justify-content: flex-end;"> <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> </div>
</div> </div>
@@ -499,7 +499,20 @@
this.list.unshift(res.result); this.list.unshift(res.result);
this.loadAuthorInfo([res.result],[res.result.sysCreateAid]); this.loadAuthorInfo([res.result],[res.result.sysCreateAid]);
this.$message.success('发布成功'); 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.total++;
this.$emit('success',res.result); this.$emit('success',res.result);
@@ -569,6 +582,19 @@
this.replyInfo.parentId=''; this.replyInfo.parentId='';
this.replyInfo.content=''; this.replyInfo.content='';
this.$message.success("发布成功"); 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{ }else{
this.$message.error(res.message); this.$message.error(res.message);
} }

View File

@@ -489,6 +489,20 @@ export default {
this.$message.success('打分成功,谢谢您的打分'); this.$message.success('打分成功,谢谢您的打分');
that.scoreInfo.has = true; that.scoreInfo.has = true;
that.courseInfo.score = rs.result; that.courseInfo.score = rs.result;
let event = {
key: "ScoreCourse",//后台的事件key 发布文章且审核通过
title: "完成课程评分",//事件的标题
parameters:"",//用户自定义参数 name:value,name:value
content: "给课程评分",//事件的内容
objId: this.resolveId,//关联的id
objType: 1,//关联的类型
objInfo: this.courseInfo.name,
aid: this.userInfo.aid, //当前登录人的id
aname: this.userInfo.name,//当前人的姓名
status: 1 //状态直接写1
}
this.$store.dispatch("userTrigger", event);
} else { } else {
this.$message.error('打分处理失败,请稍后再试'); this.$message.error('打分处理失败,请稍后再试');
} }