mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
显示回复数量
This commit is contained in:
parent
f34133f63e
commit
c6402c72f9
@ -81,9 +81,15 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="dialog-foot">
|
||||||
|
<!--回复数-->
|
||||||
|
<div v-if="msgData.reply_num > 0" class="reply">
|
||||||
|
<i class="taskfont"></i>
|
||||||
|
{{msgData.reply_num}}条回复
|
||||||
|
</div>
|
||||||
<!--等待/时间/阅读-->
|
<!--等待/时间/阅读-->
|
||||||
<div v-if="isLoading" class="dialog-foot"><Loading/></div>
|
<Loading v-if="isLoading"/>
|
||||||
<div v-else class="dialog-foot">
|
<template v-else>
|
||||||
<!--时间-->
|
<!--时间-->
|
||||||
<div v-if="timeShow" class="time" @click="timeShow=false">{{msgData.created_at}}</div>
|
<div v-if="timeShow" class="time" @click="timeShow=false">{{msgData.created_at}}</div>
|
||||||
<div v-else class="time" :title="msgData.created_at" @click="timeShow=true">{{$A.formatTime(msgData.created_at)}}</div>
|
<div v-else class="time" :title="msgData.created_at" @click="timeShow=true">{{$A.formatTime(msgData.created_at)}}</div>
|
||||||
@ -117,6 +123,7 @@
|
|||||||
<Icon v-else-if="msgData.percentage === 100" class="done" type="md-done-all"/>
|
<Icon v-else-if="msgData.percentage === 100" class="done" type="md-done-all"/>
|
||||||
<Icon v-else class="done" type="md-checkmark"/>
|
<Icon v-else class="done" type="md-checkmark"/>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -833,6 +833,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$store.dispatch("saveDialogMsg", data);
|
this.$store.dispatch("saveDialogMsg", data);
|
||||||
this.$store.dispatch("increaseTaskMsgNum", this.dialogId);
|
this.$store.dispatch("increaseTaskMsgNum", this.dialogId);
|
||||||
|
this.$store.dispatch("increaseMsgReplyNum", data.reply_id);
|
||||||
this.$store.dispatch("updateDialogLastMsg", data);
|
this.$store.dispatch("updateDialogLastMsg", data);
|
||||||
this.onCancelReply();
|
this.onCancelReply();
|
||||||
this.onActive();
|
this.onActive();
|
||||||
|
|||||||
21
resources/assets/js/store/actions.js
vendored
21
resources/assets/js/store/actions.js
vendored
@ -1118,6 +1118,24 @@ export default {
|
|||||||
if (task) task.msg_num++;
|
if (task) task.msg_num++;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增回复数量
|
||||||
|
* @param state
|
||||||
|
* @param dispatch
|
||||||
|
* @param reply_id
|
||||||
|
*/
|
||||||
|
increaseMsgReplyNum({state, dispatch}, reply_id) {
|
||||||
|
$A.execMainDispatch("increaseMsgReplyNum", reply_id)
|
||||||
|
//
|
||||||
|
if (reply_id > 0) {
|
||||||
|
const msg = state.dialogMsgs.find(({id}) => id == reply_id)
|
||||||
|
if (msg) {
|
||||||
|
msg.reply_num++
|
||||||
|
dispatch("saveDialogMsg", msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取任务
|
* 获取任务
|
||||||
* @param state
|
* @param state
|
||||||
@ -2449,6 +2467,9 @@ export default {
|
|||||||
if (!state.dialogMsgs.find(({id}) => id == data.id)) {
|
if (!state.dialogMsgs.find(({id}) => id == data.id)) {
|
||||||
// 新增任务消息数量
|
// 新增任务消息数量
|
||||||
dispatch("increaseTaskMsgNum", dialog_id);
|
dispatch("increaseTaskMsgNum", dialog_id);
|
||||||
|
// 新增回复数量
|
||||||
|
dispatch("increaseMsgReplyNum", data.reply_id);
|
||||||
|
//
|
||||||
if (mode === "chat") {
|
if (mode === "chat") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -640,6 +640,19 @@
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.reply {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 12px;
|
||||||
|
margin-right: 6px;
|
||||||
|
color: $primary-color;
|
||||||
|
cursor: pointer;
|
||||||
|
> i {
|
||||||
|
font-size: 13px;
|
||||||
|
padding-right: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
color: #bbbbbb;
|
color: #bbbbbb;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user