|
@@ -6,7 +6,7 @@
|
|
|
<a-tag
|
|
<a-tag
|
|
|
v-for="platform in platformNames"
|
|
v-for="platform in platformNames"
|
|
|
:key="platform"
|
|
:key="platform"
|
|
|
- :color="getPlatformStatus(platform).hasOffline ? '#f53f3f' : '#165dff'"
|
|
|
|
|
|
|
+ :color="getPlatformStatus(platform).hasOffline ? '#f53f3f' : 'blue'"
|
|
|
:style="{ marginRight: '8px' }"
|
|
:style="{ marginRight: '8px' }"
|
|
|
:class="{ 'warning-pulse': getPlatformStatus(platform).hasOffline }"
|
|
:class="{ 'warning-pulse': getPlatformStatus(platform).hasOffline }"
|
|
|
>
|
|
>
|
|
@@ -24,7 +24,7 @@
|
|
|
<a-tag
|
|
<a-tag
|
|
|
v-for="(stats, type) in accountWarningData[platform]"
|
|
v-for="(stats, type) in accountWarningData[platform]"
|
|
|
:key="type"
|
|
:key="type"
|
|
|
- :color="stats[1] === 0 ? '#f53f3f' : '#165dff'"
|
|
|
|
|
|
|
+ :color="stats[0] !== stats[1] ? 'red' : 'blue'"
|
|
|
size="small"
|
|
size="small"
|
|
|
:style="{ marginRight: '4px', marginBottom: '4px' }"
|
|
:style="{ marginRight: '4px', marginBottom: '4px' }"
|
|
|
>
|
|
>
|
|
@@ -93,11 +93,11 @@ const getPlatformStatus = (platform: string) => {
|
|
|
const platformData = accountWarningData.value[platform];
|
|
const platformData = accountWarningData.value[platform];
|
|
|
if (!platformData) return { status: '无数据', hasOffline: false };
|
|
if (!platformData) return { status: '无数据', hasOffline: false };
|
|
|
|
|
|
|
|
- const hasOffline = Object.values(platformData).some(([, onlineCount]) => onlineCount === 0);
|
|
|
|
|
|
|
+ const hasOffline = Object.values(platformData).some(([totalCount, onlineCount]) => totalCount !== onlineCount);
|
|
|
|
|
|
|
|
if (hasOffline) {
|
|
if (hasOffline) {
|
|
|
const offlineTypes = Object.entries(platformData)
|
|
const offlineTypes = Object.entries(platformData)
|
|
|
- .filter(([, [, onlineCount]]) => onlineCount === 0)
|
|
|
|
|
|
|
+ .filter(([, [totalCount, onlineCount]]) => totalCount !== onlineCount)
|
|
|
.map(([type]) => type);
|
|
.map(([type]) => type);
|
|
|
return {
|
|
return {
|
|
|
status: `异常(${offlineTypes.join(',')})`,
|
|
status: `异常(${offlineTypes.join(',')})`,
|