diff --git a/app/Http/Controllers/Api/DialogController.php b/app/Http/Controllers/Api/DialogController.php index 2fbe76c20..92bcf1caf 100755 --- a/app/Http/Controllers/Api/DialogController.php +++ b/app/Http/Controllers/Api/DialogController.php @@ -1042,6 +1042,36 @@ class DialogController extends AbstractController return $msg->toggleTodoMsg($user->userid); } + /** + * @api {get} api/dialog/msg/todolist 14. 获取消息待办情况 + * + * @apiDescription 需要token身份 + * @apiVersion 1.0.0 + * @apiGroup dialog + * @apiName msg__todolist + * + * @apiParam {Number} msg_id 消息ID + * + * @apiSuccess {Number} ret 返回状态码(1正确、0错误) + * @apiSuccess {String} msg 返回信息(错误描述) + * @apiSuccess {Object} data 返回数据 + */ + public function msg__todolist() + { + User::auth(); + // + $msg_id = intval(Request::input('msg_id')); + // + $msg = WebSocketDialogMsg::whereId($msg_id)->first(); + if (empty($msg)) { + return Base::retError("消息不存在或已被删除"); + } + WebSocketDialog::checkDialog($msg->dialog_id); + // + $todo = WebSocketDialogMsgTodo::whereMsgId($msg_id)->get(); + return Base::retSuccess('success', $todo ?: []); + } + /** * @api {get} api/dialog/msg/done 23. 完成待办 * diff --git a/resources/assets/js/pages/manage/components/DialogItem.vue b/resources/assets/js/pages/manage/components/DialogItem.vue index 076ad7885..4a1b5ca04 100644 --- a/resources/assets/js/pages/manage/components/DialogItem.vue +++ b/resources/assets/js/pages/manage/components/DialogItem.vue @@ -24,6 +24,7 @@ :hide-reply="hideReply" :operate-visible="operateVisible" :operate-action="operateVisible && source.id === operateItem.id" + :is-right-msg="isRightMsg" @on-longpress="onLongpress" @on-view-reply="onViewReply" @on-view-text="onViewText" @@ -88,10 +89,14 @@ export default { computed: { ...mapState(['userId']), + isRightMsg() { + return !this.isReply && this.source.userid == this.userId + }, + classArray() { return { 'dialog-item': true, - 'self': !this.isReply && this.source.userid == this.userId, + 'self': this.isRightMsg, } } }, diff --git a/resources/assets/js/pages/manage/components/DialogView.vue b/resources/assets/js/pages/manage/components/DialogView.vue index f7e31da07..ee7b76ac8 100644 --- a/resources/assets/js/pages/manage/components/DialogView.vue +++ b/resources/assets/js/pages/manage/components/DialogView.vue @@ -92,8 +92,30 @@ -
- +
+ +
+
    +
  • {{ todoDoneList.length }}{{ $L('完成') }}
  • +
  • + +
  • +
+
    +
  • {{ todoUndoneList.length }}{{ $L('待办') }}
  • +
  • + +
  • +
+
+
+
+ +
@@ -109,27 +131,27 @@