mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 21:20:31 +00:00
显示回复数量
This commit is contained in:
parent
f34133f63e
commit
c6402c72f9
@ -81,41 +81,48 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!--等待/时间/阅读-->
|
||||
<div v-if="isLoading" class="dialog-foot"><Loading/></div>
|
||||
<div v-else class="dialog-foot">
|
||||
<!--时间-->
|
||||
<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>
|
||||
<!--阅读-->
|
||||
<template v-if="!hidePercentage">
|
||||
<div v-if="msgData.send > 1 || dialogType === 'group'" class="percent" @click="openReadPercentage">
|
||||
<EPopover
|
||||
v-model="popperShow"
|
||||
ref="percent"
|
||||
popper-class="dialog-wrapper-read-poptip"
|
||||
placement="left-end">
|
||||
<div class="read-poptip-content">
|
||||
<ul class="read scrollbar-overlay">
|
||||
<li class="read-title"><em>{{ readList.length }}</em>{{ $L('已读') }}</li>
|
||||
<li v-for="item in readList">
|
||||
<UserAvatar :userid="item.userid" :size="26" showName/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="unread scrollbar-overlay">
|
||||
<li class="read-title"><em>{{ unreadList.length }}</em>{{ $L('未读') }}</li>
|
||||
<li v-for="item in unreadList">
|
||||
<UserAvatar :userid="item.userid" :size="26" showName/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div slot="reference"></div>
|
||||
</EPopover>
|
||||
<Loading v-if="popperLoad > 0"/>
|
||||
<WCircle v-else :percent="msgData.percentage" :size="14"/>
|
||||
</div>
|
||||
<Icon v-else-if="msgData.percentage === 100" class="done" type="md-done-all"/>
|
||||
<Icon v-else class="done" type="md-checkmark"/>
|
||||
<div class="dialog-foot">
|
||||
<!--回复数-->
|
||||
<div v-if="msgData.reply_num > 0" class="reply">
|
||||
<i class="taskfont"></i>
|
||||
{{msgData.reply_num}}条回复
|
||||
</div>
|
||||
<!--等待/时间/阅读-->
|
||||
<Loading v-if="isLoading"/>
|
||||
<template v-else>
|
||||
<!--时间-->
|
||||
<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>
|
||||
<!--阅读-->
|
||||
<template v-if="!hidePercentage">
|
||||
<div v-if="msgData.send > 1 || dialogType === 'group'" class="percent" @click="openReadPercentage">
|
||||
<EPopover
|
||||
v-model="popperShow"
|
||||
ref="percent"
|
||||
popper-class="dialog-wrapper-read-poptip"
|
||||
placement="left-end">
|
||||
<div class="read-poptip-content">
|
||||
<ul class="read scrollbar-overlay">
|
||||
<li class="read-title"><em>{{ readList.length }}</em>{{ $L('已读') }}</li>
|
||||
<li v-for="item in readList">
|
||||
<UserAvatar :userid="item.userid" :size="26" showName/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="unread scrollbar-overlay">
|
||||
<li class="read-title"><em>{{ unreadList.length }}</em>{{ $L('未读') }}</li>
|
||||
<li v-for="item in unreadList">
|
||||
<UserAvatar :userid="item.userid" :size="26" showName/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div slot="reference"></div>
|
||||
</EPopover>
|
||||
<Loading v-if="popperLoad > 0"/>
|
||||
<WCircle v-else :percent="msgData.percentage" :size="14"/>
|
||||
</div>
|
||||
<Icon v-else-if="msgData.percentage === 100" class="done" type="md-done-all"/>
|
||||
<Icon v-else class="done" type="md-checkmark"/>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -833,6 +833,7 @@ export default {
|
||||
}
|
||||
this.$store.dispatch("saveDialogMsg", data);
|
||||
this.$store.dispatch("increaseTaskMsgNum", this.dialogId);
|
||||
this.$store.dispatch("increaseMsgReplyNum", data.reply_id);
|
||||
this.$store.dispatch("updateDialogLastMsg", data);
|
||||
this.onCancelReply();
|
||||
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++;
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增回复数量
|
||||
* @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
|
||||
@ -2449,6 +2467,9 @@ export default {
|
||||
if (!state.dialogMsgs.find(({id}) => id == data.id)) {
|
||||
// 新增任务消息数量
|
||||
dispatch("increaseTaskMsgNum", dialog_id);
|
||||
// 新增回复数量
|
||||
dispatch("increaseMsgReplyNum", data.reply_id);
|
||||
//
|
||||
if (mode === "chat") {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -640,6 +640,19 @@
|
||||
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 {
|
||||
color: #bbbbbb;
|
||||
font-size: 12px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user