fix: 修复场景联动关系用户显示

* fix: 优化采集器无数据时页面卡死问题

* fix: 修复场景联动关系用户显示
This commit is contained in:
XieYongHong 2023-05-11 18:47:34 +08:00 committed by GitHub
parent 26f63b7abe
commit 285d108bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -178,7 +178,7 @@ const source = computed(() => {
});
const triggerType = computed(() => {
return data?.trigger || data?.trigger?.type;
return data.value?.trigger?.type;
});
const relationData = computed(() => {
@ -228,7 +228,7 @@ const getRelationUsers = async (notifyType: string, notifierId: string) => {
}
};
const getUser = async (_source: string, triggerType: string) => {
const getUser = async (_source: string, _triggerType: string) => {
const newTree = [
{
title: '平台用户',
@ -243,7 +243,8 @@ const getUser = async (_source: string, triggerType: string) => {
paging: false,
sorts: [{ name: 'name', order: 'asc' }],
});
if (triggerType && triggerType === 'device' && _source === 'relation') {
console.log(_triggerType, _source)
if (_triggerType && _triggerType === 'device' && _source === 'relation') {
relationResp = await NoticeApi.getRelationUsers({
paging: false,
sorts: [{ name: 'name', order: 'asc' }],