提交 8b667ecf authored 作者: zhuyongshuai's avatar zhuyongshuai

fix:点击时间段搜索没用的问题

上级 aeaa3e15
......@@ -146,7 +146,8 @@
<div v-if="scope.row.station.length !== 0">
<div v-for="(items, index) in scope.row.station" :key="index">
<div v-if="isTimeInRange(useAppStoreInstance.globalTimeLineEndSelectTime, items.startTime, items.endTime)">
<div
v-if="isTimeInRange(useAppStoreInstance.globalTimeLineEndSelectTime, items.startTime, items.endTime)">
{{ items.siteName }}
</div>
<div v-else>-</div>
......@@ -244,7 +245,7 @@
<template #default="scope">
<div :class="{ 'errorRed': activeTab != 'equipment' && scope.row.monitor != '-' }">{{ scope.row.monitor
=== 0 ? '-' : scope.row.monitor
}}</div>
}}</div>
</template>
</el-table-column>
<el-table-column prop="baseband" label="基站" width="40" align="center">
......@@ -269,16 +270,8 @@
</div>
<el-dialog v-model="errorDialogVisible"
:show-close="false"
:modal="false"
width="300"
hight="50"
:destroy-on-close="true"
:close-on-click-modal="true"
style="background: rgba(0, 0, 0, 0);padding: 0;margin: 0;"
>
<el-dialog v-model="errorDialogVisible" :show-close="false" :modal="false" width="300" hight="50"
:destroy-on-close="true" :close-on-click-modal="true" style="background: rgba(0, 0, 0, 0);padding: 0;margin: 0;">
<errorDialog :errorDeviceList="errorDeviceList" :satlTitle="satlTitle" :baseDeviceList="baseDeviceList"
@errorDialoghandleClose="errorDialoghandleClose"></errorDialog>
......@@ -297,6 +290,7 @@ import wss from '@/utils/requestSocekt.js'
import useAppStore from '@/store/module/app'
import local from '@/utils/local.js'
import { ElMessage } from 'element-plus';
import { da } from 'element-plus/es/locales.mjs';
const useAppStoreInstance = useAppStore();
// 激活的标签页
......@@ -321,6 +315,9 @@ const globalIntervalTime = ref('')
const globalIntervalTimeTemp = ref('')
const globaleAutoPlay = ref(true)
const carouselKey = ref(0)
watch(globalIntervalTime, (newValue, oldValue) => {
// //console.log("globalIntervalTime发生变化了");
......@@ -414,7 +411,7 @@ const satelliteData = ref();
const searchSateValue = ref('')
function searchSatelliteList() {
//console.log("cao cao2", primitiveSatelliteData.value);
console.log("拿到的数据", primitiveSatelliteData.value);
const filteredData = primitiveSatelliteData.value.filter(item =>
item.name.toLowerCase().includes(searchSateValue.value.toLowerCase()) ||
......@@ -422,7 +419,7 @@ function searchSatelliteList() {
item.manufacturer.toLowerCase().includes(searchSateValue.value.toLowerCase()) ||
item.status.toLowerCase().includes(searchSateValue.value.toLowerCase())
);
// //console.log(filteredData);
console.log(filteredData);
satelliteData.value = filteredData
}
......@@ -489,24 +486,24 @@ function tableHandleRowClickFn(row, column, event) {
// type:"DeviceFaultDialog",
// status:"open"
// })))
if (window.ue5) {
window.ue5("callBackAllDialogFn", String(JSON.stringify({
type:"DeviceFaultDialog",
status:"open"
})));
}
if (window.ue5) {
window.ue5("callBackAllDialogFn", String(JSON.stringify({
type: "DeviceFaultDialog",
status: "open"
})));
}
}
}
function errorDialoghandleClose() {
errorDialogVisible.value = false
if (window.ue5) {
window.ue5("callBackAllDialogFn", String(JSON.stringify({
type:"DeviceFaultDialog",
status:"close"
})));
}
if (window.ue5) {
window.ue5("callBackAllDialogFn", String(JSON.stringify({
type: "DeviceFaultDialog",
status: "close"
})));
}
}
function handleCarouselChange(index) {
......@@ -562,11 +559,12 @@ const transformSatelliteData = (data) => {
const wssTransformSatelliteData = (data) => {
// console.log("wssTransformSatelliteData:", data)
// 检查 data 是否为对象且不为 null
if (typeof data === 'object' && data !== null && !Array.isArray(data)) {
return [{
name: data?.satelliteName || '',
station: data?.siteName === null ? '-' : data?.siteName,
station: (data?.siteName === null || data?.siteName.length === 0) ? '-' : data?.siteName,
manufacturer: data?.manufacturer || '',
status: data?.satelliteStatus || '正常',
statusClass: satelliteStatusMap[data?.satelliteStatus || '正常'] || 'normal',
......@@ -576,7 +574,7 @@ const wssTransformSatelliteData = (data) => {
// 如果意外传入了数组,仍然处理数组
return data.map(item => ({
name: item?.satelliteName || '',
station: item?.siteName === null ? '-' : item?.siteName,
station: (item?.siteName === null || item?.siteName.length === 0) ? '-' : item?.siteName,
manufacturer: item?.manufacturer || '',
status: item?.satelliteStatus || '正常',
statusClass: satelliteStatusMap[item?.satelliteStatus || '正常'] || 'normal',
......@@ -723,40 +721,40 @@ const wssTransformgroudSatelliteData = (data) => {
}));
// 如果 data 不是对象也不是数组,返回空数组
}
}
const transformGroundSatelliteData = (data) => {
return [
{ label: '地面站数', value: data?.groundStationNum === null ? 0 : data?.groundStationNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfGroundStations.png' , import.meta.url).href},
{ label: '开通格网数', value: data?.openGridNum === null ? 0 : data?.openGridNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/ActivateGridNumber.png' , import.meta.url).href},
{ label: '弧段数量', value: data?.arcNum === null ? 0 : data?.arcNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfArcSegments.png' , import.meta.url).href},
{ label: '执行情况-弧段', value: data?.arcExecuteNum === null ? 0 : data?.arcExecuteNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/ExecutionStatusArcSegment.png' , import.meta.url).href},
{ label: '上注完成情况(星)', value: data?.arcCompleteNum === null || data?.arcCompleteNum === undefined ? 0 : data?.arcCompleteNum,CurrentURL:new URL('../../assets/images/leftGroundIcon/CompletionStatusOfTheAboveNote.png' , import.meta.url).href },
{ label: '上注失败星数(星)', value: data?.arcFaultNum === null || data?.arcFaultNum === undefined ? 0 : data?.arcFaultNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfStarsFailedToBet.png' , import.meta.url).href},
{ label: '设备故障', value: data?.faultDeviceNum === null ? 0 : data?.faultDeviceNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfFaultyDevices.png' , import.meta.url).href},
{ label: '地面站数', value: data?.groundStationNum === null ? 0 : data?.groundStationNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfGroundStations.png', import.meta.url).href },
{ label: '开通格网数', value: data?.openGridNum === null ? 0 : data?.openGridNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/ActivateGridNumber.png', import.meta.url).href },
{ label: '弧段数量', value: data?.arcNum === null ? 0 : data?.arcNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfArcSegments.png', import.meta.url).href },
{ label: '执行情况-弧段', value: data?.arcExecuteNum === null ? 0 : data?.arcExecuteNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/ExecutionStatusArcSegment.png', import.meta.url).href },
{ label: '上注完成情况(星)', value: data?.arcCompleteNum === null || data?.arcCompleteNum === undefined ? 0 : data?.arcCompleteNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/CompletionStatusOfTheAboveNote.png', import.meta.url).href },
{ label: '上注失败星数(星)', value: data?.arcFaultNum === null || data?.arcFaultNum === undefined ? 0 : data?.arcFaultNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfStarsFailedToBet.png', import.meta.url).href },
{ label: '设备故障', value: data?.faultDeviceNum === null ? 0 : data?.faultDeviceNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfFaultyDevices.png', import.meta.url).href },
]
};
const wssTransformGroundSatelliteData = (data) => {
// 检查 data 是否为对象且不为 null
if (typeof data === 'object' && data !== null && !Array.isArray(data)) {
return [
{ label: '地面站数', value: data?.groundStationNum === null ? 0 : data?.groundStationNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfGroundStations.png' , import.meta.url).href},
{ label: '开通格网数', value: data?.openGridNum === null ? 0 : data?.openGridNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/ActivateGridNumber.png' , import.meta.url).href},
{ label: '弧段数量', value: data?.arcNum === null ? 0 : data?.arcNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfArcSegments.png' , import.meta.url).href},
{ label: '执行情况-弧段', value: data?.arcExecuteNum === null ? 0 : data?.arcExecuteNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/ExecutionStatusArcSegment.png' , import.meta.url).href},
{ label: '上注完成情况(星)', value: data?.arcCompleteNum === null || data?.arcCompleteNum === undefined ? 0 : data?.arcCompleteNum,CurrentURL:new URL('../../assets/images/leftGroundIcon/CompletionStatusOfTheAboveNote.png' , import.meta.url).href },
{ label: '上注失败星数(星)', value: data?.arcFaultNum === null || data?.arcFaultNum === undefined ? 0 : data?.arcFaultNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfStarsFailedToBet.png' , import.meta.url).href},
{ label: '设备故障', value: data?.faultDeviceNum === null ? 0 : data?.faultDeviceNum ,CurrentURL:new URL('../../assets/images/leftGroundIcon/NumberOfFaultyDevices.png' , import.meta.url).href},
];
}
{ label: '地面站数', value: data?.groundStationNum === null ? 0 : data?.groundStationNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfGroundStations.png', import.meta.url).href },
{ label: '开通格网数', value: data?.openGridNum === null ? 0 : data?.openGridNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/ActivateGridNumber.png', import.meta.url).href },
{ label: '弧段数量', value: data?.arcNum === null ? 0 : data?.arcNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfArcSegments.png', import.meta.url).href },
{ label: '执行情况-弧段', value: data?.arcExecuteNum === null ? 0 : data?.arcExecuteNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/ExecutionStatusArcSegment.png', import.meta.url).href },
{ label: '上注完成情况(星)', value: data?.arcCompleteNum === null || data?.arcCompleteNum === undefined ? 0 : data?.arcCompleteNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/CompletionStatusOfTheAboveNote.png', import.meta.url).href },
{ label: '上注失败星数(星)', value: data?.arcFaultNum === null || data?.arcFaultNum === undefined ? 0 : data?.arcFaultNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfStarsFailedToBet.png', import.meta.url).href },
{ label: '设备故障', value: data?.faultDeviceNum === null ? 0 : data?.faultDeviceNum, CurrentURL: new URL('../../assets/images/leftGroundIcon/NumberOfFaultyDevices.png', import.meta.url).href },
];
}
// 如果 data 不是对象也不是数组,返回空数组
......@@ -768,7 +766,7 @@ const leftGetAllListInfo = () => {
coreMetrics.value = orbitMetrics.value[0].headerTitle
})
stellateListInfoApi().then(res => {
//console.log(res.data, "sas---------asasa");
// console.log("sas---------asasa", res.data);
primitiveSatelliteData.value = transformSatelliteData(res.data)
// 按 satelliteName 排序,专门处理 "SS GEN1-15" 格式
primitiveSatelliteData.value.sort((a, b) => {
......@@ -806,6 +804,7 @@ onBeforeMount(() => {
// 监听 webSocket 结束变化,再根据api查一次数据库
watch(() => useAppStoreInstance.globalStartWss, (newValue, oldValue) => {
if (!newValue) {
setTimeout(() => {
leftGetAllListInfo();
......@@ -860,111 +859,111 @@ const errorDeviceListDetailsDialog = ref([])
const tempCount = ref(0)
watch(() =>useAppStoreInstance.globalLeftWssCONTINE, val => {
const JSONdata = val
// console.log("useAppStoreInstance.globalLeftWssCONTINE", JSONdata,(JSONdata.type === 'history' && !(JSONdata?.isLagrangeInterpolation === true) ),JSONdata.type === 'realtime');
if (JSONdata.type === 'history' ) {
const satelliteList = []
JSONdata.CurrData.forEach(items => {
const temp = items.satelliteBasicInfoResponse
watch(() => useAppStoreInstance.globalLeftWssCONTINE, val => {
const JSONdata = val
// console.log("useAppStoreInstance.globalLeftWssCONTINE", JSONdata,(JSONdata.type === 'history' && !(JSONdata?.isLagrangeInterpolation === true) ),JSONdata.type === 'realtime');
if (JSONdata.type === 'history') {
temp.siteName = items?.currentGatewayAssociations || null
const satelliteList = []
JSONdata.CurrData.forEach(items => {
const temp = items.satelliteBasicInfoResponse
temp.siteName = items?.currentGatewayAssociations || null
satelliteList.push(temp)
});
//console.log("我走了这里", satelliteList);
satelliteList.push(temp)
});
//console.log("我走了这里", satelliteList);
primitiveSatelliteData.value = wssTransformSatelliteData(satelliteList)
primitiveSatelliteData.value.sort((a, b) => {
return a.name.localeCompare(b.name, undefined, {
numeric: true, // 启用数字排序
sensitivity: 'base' // 忽略大小写和重音符号
});
primitiveSatelliteData.value = wssTransformSatelliteData(satelliteList)
primitiveSatelliteData.value.sort((a, b) => {
return a.name.localeCompare(b.name, undefined, {
numeric: true, // 启用数字排序
sensitivity: 'base' // 忽略大小写和重音符号
});
//console.log("cao cao2,", primitiveSatelliteData.value,);
});
//console.log("cao cao2,", primitiveSatelliteData.value,);
satelliteData.value = primitiveSatelliteData.value
primitiveEquipmentData.value = equipmentData.value
//console.log('我是left,type == history获取的wssRespone:', JSONdata.groundStationDeviceCount);
satelliteData.value = primitiveSatelliteData.value
primitiveEquipmentData.value = equipmentData.value
//console.log('我是left,type == history获取的wssRespone:', JSONdata.groundStationDeviceCount);
// 地面数据,上层数据
groundMetrics.value = wssTransformGroundSatelliteData(JSONdata.groundSystem)
// 地面数据,上层数据
groundMetrics.value = wssTransformGroundSatelliteData(JSONdata.groundSystem)
primitiveFaultData.value = []
primitiveFaultData.value = wssTransformgroudSatelliteData(JSONdata.deviceFaultCondition)
faultData.value = primitiveFaultData.value
//console.log("此时的fault", primitiveFaultData.value);
if (searchEquipmentValue.value !== '') {
searchEquipmentList()
}
errorDeviceListDetailsDialog.value = JSONdata?.gatewayStationDetails
primitiveEquipmentData.value = []
primitiveEquipmentData.value = wssTransformgroudSatelliteData(JSONdata.groundStationDeviceCount)
//console.log("此时的equipment", primitiveEquipmentData.value);
primitiveFaultData.value = []
primitiveFaultData.value = wssTransformgroudSatelliteData(JSONdata.deviceFaultCondition)
faultData.value = primitiveFaultData.value
//console.log("此时的fault", primitiveFaultData.value);
if (searchEquipmentValue.value !== '') {
searchEquipmentList()
}
errorDeviceListDetailsDialog.value = JSONdata?.gatewayStationDetails
equipmentData.value = primitiveEquipmentData.value
if (searchEquipmentValue.value !== '') {
searchEquipmentList()
}
primitiveEquipmentData.value = []
primitiveEquipmentData.value = wssTransformgroudSatelliteData(JSONdata.groundStationDeviceCount)
//console.log("此时的equipment", primitiveEquipmentData.value);
equipmentData.value = primitiveEquipmentData.value
if (searchEquipmentValue.value !== '') {
searchEquipmentList()
}
if (JSONdata.type === 'realtime') {
}
console.log("11111EIRP111111rowrealtime");
if (JSONdata.type === 'realtime') {
const satelliteList = []
JSONdata.CurrData.forEach(items => {
const temp = items.satelliteBasicInfoResponse
temp.siteName = items.siteName
satelliteList.push(temp)
});
primitiveSatelliteData.value = wssTransformSatelliteData(satelliteList)
primitiveSatelliteData.value.sort((a, b) => {
return a.name.localeCompare(b.name, undefined, {
numeric: true, // 启用数字排序
sensitivity: 'base' // 忽略大小写和重音符号
});
console.log("11111EIRP111111rowrealtime");
const satelliteList = []
JSONdata.CurrData.forEach(items => {
const temp = items.satelliteBasicInfoResponse
temp.siteName = items.siteName
satelliteList.push(temp)
});
primitiveSatelliteData.value = wssTransformSatelliteData(satelliteList)
primitiveSatelliteData.value.sort((a, b) => {
return a.name.localeCompare(b.name, undefined, {
numeric: true, // 启用数字排序
sensitivity: 'base' // 忽略大小写和重音符号
});
//console.log("cao cao2,", primitiveSatelliteData.value,);
});
//console.log("cao cao2,", primitiveSatelliteData.value,);
satelliteData.value = primitiveSatelliteData.value
primitiveEquipmentData.value = equipmentData.value
// //console.log('我是left,type == history获取的wssRespone:', JSONdata.groundStationDeviceCount);
satelliteData.value = primitiveSatelliteData.value
primitiveEquipmentData.value = equipmentData.value
// //console.log('我是left,type == history获取的wssRespone:', JSONdata.groundStationDeviceCount);
// 地面数据,上层数据
// groundMetrics.value = wssTransformGroundSatelliteData(JSONdata.groundSystem)
// 地面数据,下层数据
// 地面数据,上层数据
// groundMetrics.value = wssTransformGroundSatelliteData(JSONdata.groundSystem)
// 地面数据,下层数据
// primitiveFaultData.value = []
// primitiveFaultData.value = wssTransformgroudSatelliteData(JSONdata.deviceFaultCondition)
// faultData.value = primitiveFaultData.value
// //console.log("此时的fault", primitiveFaultData.value);
// if (searchEquipmentValue.value !== '') {
// searchEquipmentList()
// }
// primitiveFaultData.value = []
// primitiveFaultData.value = wssTransformgroudSatelliteData(JSONdata.deviceFaultCondition)
// faultData.value = primitiveFaultData.value
// //console.log("此时的fault", primitiveFaultData.value);
// if (searchEquipmentValue.value !== '') {
// searchEquipmentList()
// }
// primitiveEquipmentData.value = []
// primitiveEquipmentData.value = wssTransformgroudSatelliteData(JSONdata.groundStationDeviceCount)
// //console.log("此时的equipment", primitiveEquipmentData.value);
// primitiveEquipmentData.value = []
// primitiveEquipmentData.value = wssTransformgroudSatelliteData(JSONdata.groundStationDeviceCount)
// //console.log("此时的equipment", primitiveEquipmentData.value);
// equipmentData.value = primitiveEquipmentData.value
// if (searchEquipmentValue.value !== '') {
// searchEquipmentList()
// }
// equipmentData.value = primitiveEquipmentData.value
// if (searchEquipmentValue.value !== '') {
// searchEquipmentList()
// }
}
tempCount.value++
}
tempCount.value++
}, { deep: true, immediate: true });
......@@ -2026,16 +2025,19 @@ onUnmounted(() => {
background-color: #1C212B;
color: #fff;
border-color: #434a54;
}
:deep(.setting-input .el-input__wrapper) {
box-shadow: none;
border: none;
box-shadow: none;
border: none;
}
:deep(.setting-input .el-input__wrapper .el-input__inner) {
box-shadow: none;
border: none;
box-shadow: none;
border: none;
}
.setting-checkbox {
margin-left: 10px;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论