|
@@ -16,7 +16,7 @@
|
|
|
<!-- 分组 -->
|
|
|
<el-popover v-else width="200" trigger="hover" placement="top" @show="onLoadDetail(item)">
|
|
|
<div v-if="item.list.length > 0" class="flex flex-wrap break-all">
|
|
|
- <span v-for="ip in item.list" :key="String(ip)" class="mr-2">{{ ip }}</span>
|
|
|
+ <span v-for="ip in item.list" :key="String(ip)" class="mr-2">{{ typeof ip == 'string' ? ip : ipSplicing(ip.startIp, ip.endIp) }}</span>
|
|
|
</div>
|
|
|
<div v-else>{{ t('marketingApps.noData') }}</div>
|
|
|
<template #reference>
|
|
@@ -92,12 +92,11 @@ function addGroupsUnique(newGroups: IpItem[], ipType: number) {
|
|
|
const targetList = getTargetList(ipType);
|
|
|
const conflictType = ipType === IpType.WHITE ? IpType.BLACK : IpType.WHITE;
|
|
|
const conflictList = getTargetList(conflictType);
|
|
|
- const existIds = new Set(targetList.filter(i => i.sourceType === SourceType.DOMAIN).map(i => i.groupId));
|
|
|
+ const existIds = new Set(targetList.filter(i => i.sourceType === SourceType.GROUP).map(i => i.groupId));
|
|
|
const conflictIds = new Set(conflictList.filter(i => i.sourceType === SourceType.GROUP).map(i => i.groupId));
|
|
|
-
|
|
|
const conflict = newGroups.find(i => conflictIds.has(i.id as string));
|
|
|
if (conflict) {
|
|
|
- useMessage().warning(`分组 ${conflict.groupName} 已存在于 ${ipType === IpType.WHITE ? '黑名单' : '白名单'} 中`);
|
|
|
+ useMessage().error(`分组 ${conflict.groupName} 已存在于 ${ipType === IpType.WHITE ? '黑名单' : '白名单'} 中`);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -117,7 +116,7 @@ function addGroupsUnique(newGroups: IpItem[], ipType: number) {
|
|
|
}));
|
|
|
setTargetList(ipType, [...targetList, ...processedGroups]);
|
|
|
} else {
|
|
|
- useMessage().warning(t('marketingApps.addIpTip'));
|
|
|
+ useMessage().error(t('marketingApps.addIpTip'));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -132,7 +131,7 @@ function addSinglesUnique(newSingles: IpItem[], ipType: number) {
|
|
|
const conflict = newSingles.find(i => conflictIps.has(i.startIp));
|
|
|
if (conflict) {
|
|
|
console.log(conflict);
|
|
|
- useMessage().warning(`IP ${conflict.startIp} 已存在于 ${ipType === IpType.WHITE ? '黑名单' : '白名单'} 中`);
|
|
|
+ useMessage().error(`IP ${conflict.startIp} 已存在于 ${ipType === IpType.WHITE ? '黑名单' : '白名单'} 中`);
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -152,7 +151,7 @@ function addSinglesUnique(newSingles: IpItem[], ipType: number) {
|
|
|
}));
|
|
|
setTargetList(ipType, [...targetList, ...processedSingles]);
|
|
|
} else {
|
|
|
- useMessage().warning(t('marketingApps.addIpTip2'));
|
|
|
+ useMessage().error(t('marketingApps.addIpTip2'));
|
|
|
}
|
|
|
}
|
|
|
|