diff --git a/app/Http/Controllers/Api/DialogController.php b/app/Http/Controllers/Api/DialogController.php index 9c59ef6a9..015613234 100755 --- a/app/Http/Controllers/Api/DialogController.php +++ b/app/Http/Controllers/Api/DialogController.php @@ -405,6 +405,8 @@ class DialogController extends AbstractController if ($msg_type) { if ($msg_type === 'tag') { $builder->where('tag', '>', 0); + } elseif ($msg_type === 'todo') { + $builder->where('todo', '>', 0); } elseif ($msg_type === 'link') { $builder->whereLink(1); } elseif (in_array($msg_type, ['text', 'image', 'file', 'record', 'meeting'])) { diff --git a/app/Models/WebSocketDialog.php b/app/Models/WebSocketDialog.php index c122d986e..de263e044 100644 --- a/app/Models/WebSocketDialog.php +++ b/app/Models/WebSocketDialog.php @@ -193,6 +193,7 @@ class WebSocketDialog extends AbstractModel $this->has_image = $msgBuilder->clone()->whereMtype('image')->exists(); $this->has_file = $msgBuilder->clone()->whereMtype('file')->exists(); $this->has_link = $msgBuilder->clone()->whereLink(1)->exists(); + $this->has_todo = $msgBuilder->clone()->where('todo', '>', 0)->exists(); } return $this; } diff --git a/public/images/dialog/todo.svg b/public/images/dialog/todo.svg new file mode 100644 index 000000000..b4670f968 --- /dev/null +++ b/public/images/dialog/todo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index b1f4213f6..ac5c4c8bd 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -786,6 +786,9 @@ export default { if (this.dialogData.has_tag) { array.push({type: 'tag', label: '标注'}) } + if (this.dialogData.has_todo) { + array.push({type: 'todo', label: '代办'}) + } if (this.dialogData.has_image) { array.push({type: 'image', label: '图片'}) } @@ -1416,6 +1419,10 @@ export default { if (!item.tag) { return false } + } else if (this.msgType === 'todo') { + if (!item.todo) { + return false + } } else if (this.msgType === 'link') { if (!item.link) { return false diff --git a/resources/assets/sass/pages/components/dialog-wrapper.scss b/resources/assets/sass/pages/components/dialog-wrapper.scss index 01236fbe9..3303906b6 100644 --- a/resources/assets/sass/pages/components/dialog-wrapper.scss +++ b/resources/assets/sass/pages/components/dialog-wrapper.scss @@ -308,6 +308,10 @@ background-image: url("../images/dialog/tag.svg"); } + &.todo i { + background-image: url("../images/dialog/todo.svg"); + } + &.project i { background-image: url("../images/dialog/project.svg"); }