Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
SatelliteDigital
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
nijiawen
SatelliteDigital
Commits
27204661
提交
27204661
authored
4月 16, 2026
作者:
liujiaxing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
精确到秒级
上级
39a0c761
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
116 行增加
和
25 行删除
+116
-25
errorDialog.vue
src/pages/lefts/component/errorDialog.vue
+112
-21
index.vue
src/pages/lefts/index.vue
+4
-4
没有找到文件。
src/pages/lefts/component/errorDialog.vue
浏览文件 @
27204661
...
...
@@ -165,43 +165,134 @@ const deviceStatusMap = ref([
])
// 监听 errorDeviceList 的变化
watch
(()
=>
props
.
errorDeviceList
,
(
newVal
)
=>
{
console
.
log
(
props
.
errorDeviceList
,
'故障详情'
);
if
(
newVal
.
length
===
0
)
{
import
useAppStore
from
'@/store/module/app'
const
useAppStoreInstance
=
useAppStore
();
watch
(()
=>
useAppStoreInstance
.
globalTimeLineEndSelectTime
,
(
val
)
=>
{
// console.log(val, '时间变化----------------', faultData.value);
//故障情况判定--每一个信关站的故障设备判定
// console.log('当前时间', props.errorDeviceList);
if
(
props
.
errorDeviceList
.
length
===
0
)
{
devices
.
value
=
[]
return
}
if
(
newVal
&&
typeof
newVal
===
'object'
&&
!
Array
.
isArray
(
newVal
))
{
if
(
props
.
errorDeviceList
&&
typeof
props
.
errorDeviceList
===
'object'
&&
!
Array
.
isArray
(
props
.
errorDeviceList
))
{
// 如果是对象且包含 groundNetworkElementResponses 数组
if
(
newVal
.
groundNetworkElementResponses
&&
Array
.
isArray
(
newVal
.
groundNetworkElementResponses
))
{
devices
.
value
=
newVal
.
groundNetworkElementResponses
.
map
(
item
=>
({
if
(
props
.
errorDeviceList
.
groundNetworkElementResponses
&&
Array
.
isArray
(
props
.
errorDeviceList
.
groundNetworkElementResponses
))
{
devices
.
value
=
props
.
errorDeviceList
.
groundNetworkElementResponses
.
map
(
item
=>
({
name
:
item
.
elementName
||
'未知设备'
,
status
:
item
.
status
===
'正常'
?
'normal'
:
'error'
,
expanded
:
false
,
errorDetails
:
item
.
stAlarmInfoResponse
||
null
}))
}
}
else
if
(
Array
.
isArray
(
newVal
))
{
}
else
if
(
Array
.
isArray
(
props
.
errorDeviceList
))
{
// 如果是数组,直接映射
devices
.
value
=
newVal
.
map
(
item
=>
({
name
:
item
.
elementName
||
'未知设备'
,
status
:
item
.
statue
===
'正常'
?
'normal'
:
'error'
,
expanded
:
false
,
errorDetails
:
item
.
stAlarmInfoResponse
?.
locationInfo
||
null
}))
}
else
if
(
newVal
&&
typeof
newVal
===
'object'
)
{
devices
.
value
=
[]
props
.
errorDeviceList
.
forEach
(
item
=>
{
let
status
=
true
item
.
stAlarmInfoResponseArr
.
forEach
(
it
=>
{
if
(
it
.
status
==
"故障"
)
{
if
(
compareTime
(
val
,
it
.
startTime
)
&&
compareTime
(
it
.
endTime
,
val
))
{
status
=
false
devices
.
value
.
push
({
name
:
item
.
elementName
||
'未知设备'
,
status
:
'error'
,
expanded
:
true
,
errorDetails
:
it
.
locationInfo
||
null
})
}
}
})
if
(
status
)
{
devices
.
value
.
push
({
name
:
item
.
elementName
||
'未知设备'
,
status
:
item
.
statue
===
'正常'
?
'normal'
:
'error'
,
expanded
:
false
,
errorDetails
:
item
.
stAlarmInfoResponseArr
[
0
]?.
locationInfo
||
null
})
}
})
// devices.value = props.errorDeviceList.map(item => ({
// name: item.elementName || '未知设备',
// status: item.statue === '正常' ? 'normal' : 'error',
// expanded: false,
// errorDetails: item.stAlarmInfoResponse?.locationInfo || null
// }))
// console.log(devices.value, '设备列表');
}
else
if
(
props
.
errorDeviceList
&&
typeof
props
.
errorDeviceList
===
'object'
)
{
// 如果是普通对象,尝试直接使用
devices
.
value
=
[{
name
:
newVal
.
elementName
||
'未知设备'
,
status
:
newVal
.
statue
===
'正常'
?
'normal'
:
'error'
,
name
:
props
.
errorDeviceList
.
elementName
||
'未知设备'
,
status
:
props
.
errorDeviceList
.
statue
===
'正常'
?
'normal'
:
'error'
,
expanded
:
false
,
errorDetails
:
newVal
.
stAlarmInfoResponse
?.
locationInfo
||
null
errorDetails
:
props
.
errorDeviceList
.
stAlarmInfoResponse
?.
locationInfo
||
null
}]
}
},
{
immediate
:
true
})
})
// 对比时间
const
compareTime
=
(
time1
,
time2
)
=>
{
// console.log('cao每隔开始compareTime----------1', time1, time2);
// 将时间字符串转换为 Date 对象
const
date1
=
new
Date
(
time1
);
if
(
time2
===
null
||
time2
===
""
||
time2
===
undefined
)
{
time2
=
new
Date
(
new
Date
(
selectedStartTime
.
value
).
getTime
()
+
60
*
1000
).
toISOString
();
// //console.log('每隔开始compareTime----------', time1, time2);
}
const
date2
=
new
Date
(
time2
);
// 检查时间是否有效
if
(
isNaN
(
date1
.
getTime
())
||
isNaN
(
date2
.
getTime
()))
{
throw
new
Error
(
"无效的时间格式"
);
}
// 比较时间戳
if
(
date1
>=
date2
)
{
return
true
;
}
else
{
return
false
;
}
};
// 监听 errorDeviceList 的变化
// watch(() => props.errorDeviceList, (newVal) => {
// console.log(props.errorDeviceList, '故障详情');
// if (newVal.length === 0) {
// devices.value = []
// return
// }
// if (newVal && typeof newVal === 'object' && !Array.isArray(newVal)) {
// // 如果是对象且包含 groundNetworkElementResponses 数组
// if (newVal.groundNetworkElementResponses && Array.isArray(newVal.groundNetworkElementResponses)) {
// devices.value = newVal.groundNetworkElementResponses.map(item => ({
// name: item.elementName || '未知设备',
// status: item.status === '正常' ? 'normal' : 'error',
// expanded: false,
// errorDetails: item.stAlarmInfoResponse || null
// }))
// }
// } else if (Array.isArray(newVal)) {
// // 如果是数组,直接映射
// devices.value = newVal.map(item => ({
// name: item.elementName || '未知设备',
// status: item.statue === '正常' ? 'normal' : 'error',
// expanded: false,
// errorDetails: item.stAlarmInfoResponse?.locationInfo || null
// }))
// } else if (newVal && typeof newVal === 'object') {
// // 如果是普通对象,尝试直接使用
// devices.value = [{
// name: newVal.elementName || '未知设备',
// status: newVal.statue === '正常' ? 'normal' : 'error',
// expanded: false,
// errorDetails: newVal.stAlarmInfoResponse?.locationInfo || null
// }]
// }
// }, { immediate: true })
watch
(()
=>
props
.
baseDeviceList
,
(
newVal
)
=>
{
deviceStatusMap
.
value
=
[]
...
...
src/pages/lefts/index.vue
浏览文件 @
27204661
...
...
@@ -443,7 +443,7 @@ function searchEquipmentList() {
)
filteredData
.
map
(
item
=>
{
item
.
allData
.
arr
.
map
(
it
=>
{
console
.
log
(
useAppStoreInstance
.
globalTimeLineEndSelectTime
,
it
.
startTime
,
it
.
endTime
,
'故障时间'
,
isTimeInRange
(
useAppStoreInstance
.
globalTimeLineEndSelectTime
,
it
.
startTime
,
it
.
endTime
));
//
console.log(useAppStoreInstance.globalTimeLineEndSelectTime, it.startTime, it.endTime, '故障时间',isTimeInRange(useAppStoreInstance.globalTimeLineEndSelectTime, it.startTime, it.endTime));
//判断故障时间是否包含当前时间
if
(
isTimeInRange
(
useAppStoreInstance
.
globalTimeLineEndSelectTime
,
it
.
startTime
,
it
.
endTime
))
{
...
...
@@ -452,7 +452,7 @@ function searchEquipmentList() {
item
.
monitor
=
it
.
controlBaseStationNum
item
.
baseband
=
it
.
baseStationNum
// console.log(item.ku, item.qv, item.monitor, item.baseband, '故障数量',it);
}
})
})
...
...
@@ -904,9 +904,9 @@ watch(() => useAppStoreInstance.globalLeftWssCONTINE, val => {
if
(
JSONdata
.
type
===
'realtime'
)
{
//实时模式
//卫星轨迹数据,实时模式下的wss数据结构和历史模式不太一样,历史模式是CurrData数组里套satelliteBasicInfoResponse对象,实时模式是CurrData数组里直接就是satelliteBasicInfoResponse对象
const
satelliteList
=
[]
JSONdata
.
CurrData
?.
forEach
(
items
=>
{
let
temp
=
items
.
satelliteBasicInfoResponse
||
{}
let
temp
=
items
.
satelliteBasicInfoResponse
||
{}
temp
.
siteName
=
items
.
siteName
satelliteList
.
push
(
temp
)
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论