mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
feat:聊天列表头部添加代办标签
This commit is contained in:
parent
b79fdbd7e0
commit
40474319e3
@ -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'])) {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
1
public/images/dialog/todo.svg
Normal file
1
public/images/dialog/todo.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1691334156944" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20927" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M351.1 644.3m-40.2 0a40.2 40.2 0 1 0 80.4 0 40.2 40.2 0 1 0-80.4 0Z" p-id="20928" fill="#9D95E5"></path><path d="M489 764.8C489 638.1 592.1 535 718.9 535c69 0 130.2 31.2 172.4 79.4V178.7c0-50.6-41.4-91.9-91.9-91.9H224.7c-50.6 0-91.9 41.4-91.9 91.9v666.5c0 50.8 41.2 91.9 91.9 91.9h343.7C520.2 895 489 833.8 489 764.8z m69-471h183.9c15.8 0 28.7 12.9 28.7 28.7s-12.9 28.7-28.7 28.7H558c-15.8 0-28.7-12.9-28.7-28.7s12.8-28.7 28.7-28.7zM351.1 742c-53.9 0-97.7-43.8-97.7-97.7 0-53.9 43.8-97.7 97.7-97.7s97.7 43.8 97.7 97.7c0 53.9-43.8 97.7-97.7 97.7z m112.3-445.1L348.5 411.8c-5.6 5.6-13 8.4-20.3 8.4s-14.7-2.8-20.3-8.4l-46-46c-11.2-11.2-11.2-29.4 0-40.6 11.2-11.2 29.4-11.2 40.7 0l25.6 25.6 94.6-94.6c11.2-11.2 29.4-11.2 40.7 0 11.1 11.3 11.1 29.5-0.1 40.7z" p-id="20929" fill="#9D95E5"></path><path d="M718.9 592.4c-95.2 0-172.4 77.2-172.4 172.4s77.2 172.4 172.4 172.4S891.3 860 891.3 764.8c-0.1-95.2-77.2-172.4-172.4-172.4z m76.2 248.7c-5.6 5.6-12.9 8.4-20.3 8.4s-14.7-2.8-20.3-8.4l-55.9-55.9c-0.4-0.4-0.6-1-1-1.5-2.1-2.4-4-4.9-5.2-7.8-1.4-3.4-2.1-6.9-2.1-10.5 0-0.2-0.1-0.3-0.1-0.5V681c0-15.8 12.9-28.7 28.7-28.7 15.8 0 28.7 12.9 28.7 28.7v72l47.5 47.5c11.2 11.2 11.2 29.3 0 40.6z" p-id="20930" fill="#9D95E5"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@ -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
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user