no message

This commit is contained in:
kuaifan 2022-07-19 16:16:22 +08:00
parent 67e2ec4093
commit f7061d1a8d
5 changed files with 8 additions and 8 deletions

View File

@ -136,7 +136,7 @@ class WebSocketDialog extends AbstractModel
$this->has_file = $msgBuilder->clone()->whereMtype('file')->exists(); $this->has_file = $msgBuilder->clone()->whereMtype('file')->exists();
$this->has_link = $msgBuilder->clone()->whereLink(1)->exists(); $this->has_link = $msgBuilder->clone()->whereLink(1)->exists();
} }
$this->name_py = Base::cn2pinyin($this->name); $this->pinyin = Base::cn2pinyin($this->name);
return $this; return $this;
} }

View File

@ -631,7 +631,7 @@ export default {
return b.id - a.id; return b.id - a.id;
}); });
if (projectKeyValue) { if (projectKeyValue) {
return data.filter(item => $A.strExists(`${item.name}||${item.desc}`, projectKeyValue)); return data.filter(item => $A.strExists(`${item.name} ${item.desc}`, projectKeyValue));
} }
return data; return data;
}, },

View File

@ -100,7 +100,7 @@ export default {
return b.id - a.id; return b.id - a.id;
}); });
if (projectKeyValue) { if (projectKeyValue) {
return data.filter(item => $A.strExists(`${item.name}||${item.desc}`, projectKeyValue)); return data.filter(item => $A.strExists(`${item.name} ${item.desc}`, projectKeyValue));
} }
/*return data.map(item => { /*return data.map(item => {
if (!$A.isArray(item.user_simple)) { if (!$A.isArray(item.user_simple)) {

View File

@ -602,7 +602,7 @@ export default {
list = list.filter(({flow_item_id}) => flow_item_id === flowInfo.value); list = list.filter(({flow_item_id}) => flow_item_id === flowInfo.value);
} }
if (searchText) { if (searchText) {
list = list.filter(({name, desc}) => $A.strExists(`${name}||${desc}`, searchText)); list = list.filter(({name, desc}) => $A.strExists(`${name} ${desc}`, searchText));
} }
return list; return list;
} }
@ -1267,7 +1267,7 @@ export default {
return true; return true;
} }
if (searchText) { if (searchText) {
if (!$A.strExists(`${name}||${desc}`, searchText)) { if (!$A.strExists(`${name} ${desc}`, searchText)) {
return true; return true;
} }
} }

View File

@ -227,8 +227,8 @@ export default {
return false; return false;
} }
if (dialogKey) { if (dialogKey) {
const {name, name_py, last_msg} = dialog; const {name, pinyin, last_msg} = dialog;
let searchString = `${name} ${name_py}` let searchString = `${name} ${pinyin}`
if (last_msg) { if (last_msg) {
switch (last_msg.type) { switch (last_msg.type) {
case 'text': case 'text':
@ -292,7 +292,7 @@ export default {
return []; return [];
} }
if (contactsKey) { if (contactsKey) {
return contactsData.filter(item => $A.strExists(`${item.email}||${item.nickname}||${item.profession}||${item.pinyin}`, contactsKey)) return contactsData.filter(item => $A.strExists(`${item.email} ${item.nickname} ${item.profession} ${item.pinyin}`, contactsKey))
} }
return contactsData; return contactsData;
}, },