提交 8d5eb8b2 authored 作者: 周文艺's avatar 周文艺

2026/1/16

上级 542613e6
...@@ -1354,7 +1354,7 @@ watch( ...@@ -1354,7 +1354,7 @@ watch(
); );
onUnmounted(() => { onUnmounted(() => {
console.log("我走了这里14") console.log("我走了这里14")
stopAutoPlay(); // stopAutoPlay();
window.removeEventListener('mousemove', handleDrag); window.removeEventListener('mousemove', handleDrag);
window.removeEventListener('mouseup', endDrag); window.removeEventListener('mouseup', endDrag);
}); });
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<script setup> <script setup>
import 'element-plus/dist/index.css' import 'element-plus/dist/index.css'
import { ref, onMounted, onBeforeMount, nextTick, watch, onUnmounted } from 'vue'; import { ref, onMounted, onBeforeMount, nextTick, watch, onUnmounted, h } from 'vue';
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import curve from './component/cruve.vue'; import curve from './component/cruve.vue';
import useAppStore from '@/store/module/app.js'; import useAppStore from '@/store/module/app.js';
...@@ -172,14 +172,16 @@ import { useRouter } from 'vue-router'; ...@@ -172,14 +172,16 @@ import { useRouter } from 'vue-router';
import { getSubSystemOpitionListApi,getSubSystemCurveListApi } from '../../api/Zodiac' import { getSubSystemOpitionListApi,getSubSystemCurveListApi } from '../../api/Zodiac'
import SubWss from '@/utils/subSystemRequestSocket.js' import SubWss from '@/utils/subSystemRequestSocket.js'
import { set } from 'nprogress';
import { tr } from 'element-plus/es/locales.mjs';
const router = useRouter(); const router = useRouter();
const useAppStoreInstance = useAppStore(); const useAppStoreInstance = useAppStore();
const activeIndex = ref(0); const activeIndex = ref(0);
const arcHistoryActiveIndex = ref(0); const arcHistoryActiveIndex = ref(null);
const currentTelemetryData = ref([]); const currentTelemetryData = ref([]);
const arcHistoryData = ref(true);
const arcHistorytabs = [ const arcHistorytabs = [
"姿轨控分系统", "姿轨控分系统",
...@@ -195,15 +197,80 @@ const handleSatelliteGranularityChange = (value) => { ...@@ -195,15 +197,80 @@ const handleSatelliteGranularityChange = (value) => {
} }
const formatToMidnight = (isoString) => {
const date = new Date(isoString);
// 使用 UTC 年月日构造新的 Date,避免时区偏移影响
const year = date.getUTCFullYear();
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
const day = String(date.getUTCDate()).padStart(2, '0');
return `${year}-${month}-${day} 00:00:00`;
};
const defaultGetSubSystemCurveList = () => {
console.log("historyTimeDateRange.value",historyTimeDateRange.value,satelliteOptions.value[0]);
getSubSystemCurveListApi({
endTime: (historyTimeDateRange.value[1]),
satelliteId: useAppStoreInstance.globalSatelliteSearchID==='0'? "4097": (useAppStoreInstance.globalSatelliteSearchID),
startTime: (historyTimeDateRange.value[0]),
subSystemType: arcHistorySubSystemOptions[arcHistoryActiveIndex.value],
code: satelliteOptions.value[0]?.value || 11,
}).then(res => {
left2BottomOpitionX.value = []
left2BottomOpitionY.value = []
res.data.map(item => (
left2BottomOpitionX.value.push(item.x),
left2BottomOpitionY.value.push(item.y)
))
left2BottomOpition.value = {
// falgStartSearch:isFalgStartSearch.value,
maxY:ceilForMaxValue(Math.max(...left2BottomOpitionY.value)) ,
minY:floorForMinValue(Math.min(...left2BottomOpitionY.value)) ,
isFirstSearch:true,
dataX:left2BottomOpitionX.value,
dataY:left2BottomOpitionY.value,
type:'line',
chartName:satelliteOptions.value.filter((item) => (String(satelliteOptions.value[0].value)===String(item.value)))[0].label
}
})
console.log("defaultGetSubSystemCurveList结束了");
arcHistoryData.value = true;
}
const arcHistorySubSystemOptions = ['CONTROL','POWER','THERMAL']; const arcHistorySubSystemOptions = ['CONTROL','POWER','THERMAL'];
const handleArcHistoryTabClick = (index) => { const handleArcHistoryTabClick = (index) => {
if (!arcHistoryData.value) {
ElMessage.warning('请勿连续操作!');
return;
}
arcHistoryActiveIndex.value = index; arcHistoryActiveIndex.value = index;
isFlagOfSeletctType.value = false; isFlagOfSeletctType.value = false;
isFalgStartSearch.value = false; isFalgStartSearch.value = false;
subSystemOptionsFn(arcHistorySubSystemOptions[index]); subSystemOptionsFn(arcHistorySubSystemOptions[index]);
// cureSearchHandleFn() arcHistoryData.value = false;
// cureSearchHandleFn(satelliteOptions.value[0].code)
} }
watch(() => arcHistoryActiveIndex.value,
() => {
nextTick(() => {
setTimeout(() => {
console.log("arcHistoryActiveIndex.value发生改变",satelliteOptions.value[0]);
defaultGetSubSystemCurveList();
}, 500);
})
// defaultGetSubSystemCurveList();
})
// 系统标签 // 系统标签
const tabs = [ const tabs = [
"姿轨控分系统", "姿轨控分系统",
...@@ -661,7 +728,9 @@ const subSystemOptionsFn = (subSystemTypeValue)=>{ ...@@ -661,7 +728,9 @@ const subSystemOptionsFn = (subSystemTypeValue)=>{
value: item.code value: item.code
})); }));
// console.log("************",satelliteGranularity.value,satelliteGranularity.value[0]); // console.log("************",satelliteGranularity.value,satelliteGranularity.value[0]);
satelliteGranularity.value ="" satelliteGranularity.value =satelliteOptions.value[0].value
// satelliteGranularity.value = ""
// historyCode.value = satelliteGranularity.value[0].code; // historyCode.value = satelliteGranularity.value[0].code;
}) })
} }
...@@ -681,13 +750,14 @@ const left2BottomOpition = ref({ ...@@ -681,13 +750,14 @@ const left2BottomOpition = ref({
const cureSearchHandleFn = () => { const cureSearchHandleFn = () => {
console.log("11111111111111-------1111:",isFlagOfSeletctType.value); console.log("11111111111111-------1111:",isFlagOfSeletctType.value);
if (!isFlagOfSeletctType.value) { // if (!isFlagOfSeletctType.value) {
ElMessage({ // ElMessage({
type: 'error', // type: 'error',
message: `请选择卫星粒度`, // message: `请选择卫星粒度`,
}) // })
}else{ // }else
{
// console.log('查询参数:', { // console.log('查询参数:', {
...@@ -706,18 +776,18 @@ isFalgStartSearch.value = true; ...@@ -706,18 +776,18 @@ isFalgStartSearch.value = true;
console.log("propsDate-min--3333333333--------",{ // console.log("propsDate-min--3333333333--------",{
endTime: historyTimeDateRange.value[1], // endTime: historyTimeDateRange.value[1],
satelliteId: useAppStoreInstance.globalSatelliteSearchID==='0'? "4097": (useAppStoreInstance.globalSatelliteSearchID), // satelliteId: useAppStoreInstance.globalSatelliteSearchID==='0'? "4097": (useAppStoreInstance.globalSatelliteSearchID),
startTime: historyTimeDateRange.value[0], // startTime: historyTimeDateRange.value[0],
subSystemType: arcHistorySubSystemOptions[arcHistoryActiveIndex.value], // subSystemType: arcHistorySubSystemOptions[arcHistoryActiveIndex.value],
code: historyCode.value , // code: historyCode.value ,
}); // });
getSubSystemCurveListApi({ getSubSystemCurveListApi({
endTime: historyTimeDateRange.value[1], endTime: (historyTimeDateRange.value[1]),
satelliteId: useAppStoreInstance.globalSatelliteSearchID==='0'? "4097": (useAppStoreInstance.globalSatelliteSearchID), satelliteId: useAppStoreInstance.globalSatelliteSearchID==='0'? "4097": (useAppStoreInstance.globalSatelliteSearchID),
startTime: historyTimeDateRange.value[0], startTime: (historyTimeDateRange.value[0]),
subSystemType: arcHistorySubSystemOptions[arcHistoryActiveIndex.value], subSystemType: arcHistorySubSystemOptions[arcHistoryActiveIndex.value],
code: historyCode.value, code: historyCode.value,
}).then(res => { }).then(res => {
...@@ -739,7 +809,7 @@ isFalgStartSearch.value = true; ...@@ -739,7 +809,7 @@ isFalgStartSearch.value = true;
chartName:satelliteOptions.value.filter((item) => (String(historyCode.value)===String(item.value)))[0].label chartName:satelliteOptions.value.filter((item) => (String(historyCode.value)===String(item.value)))[0].label
} }
}) })
arcHistoryData.value = true;
} }
}; };
...@@ -903,6 +973,7 @@ const handleTabClick = (index) => { ...@@ -903,6 +973,7 @@ const handleTabClick = (index) => {
onBeforeMount(() => { onBeforeMount(() => {
subSystemOptionsFn("CONTROL"); subSystemOptionsFn("CONTROL");
// console.log("12222222222222222222222222",satelliteOptions.value[0].code); // console.log("12222222222222222222222222",satelliteOptions.value[0].code);
...@@ -945,9 +1016,9 @@ const mountformatDateTime = (date) => { ...@@ -945,9 +1016,9 @@ const mountformatDateTime = (date) => {
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}; };
onMounted(() => { onMounted(() => {
nextTick(() => { nextTick(() => {
console.log("我走了globalSubsystemSelectedTimeRange---left2",mountformatDateTime(useAppStoreInstance.globalSubsystemSelectedTimeRange[0]), mountformatDateTime(useAppStoreInstance.globalSubsystemSelectedTimeRange[1])); console.log("我走了globalSubsystemSelectedTimeRange---left2",mountformatDateTime(useAppStoreInstance.globalSubsystemSelectedTimeRange[0]), mountformatDateTime(useAppStoreInstance.globalSubsystemSelectedTimeRange[1]));
if(useAppStoreInstance.footerTimeHasedSelectTimeToSub) { if(useAppStoreInstance.footerTimeHasedSelectTimeToSub) {
...@@ -971,6 +1042,7 @@ onMounted(() => { ...@@ -971,6 +1042,7 @@ onMounted(() => {
left2BottomOpition.value = { left2BottomOpition.value = {
isFirstSearch:false, isFirstSearch:false,
} }
nextTick(() => { nextTick(() => {
watch(() => useAppStoreInstance.subsystemSocketContent, (newVal, oldValue) => { watch(() => useAppStoreInstance.subsystemSocketContent, (newVal, oldValue) => {
// const newValue = useAppStoreInstance.subsystemSocketContent // const newValue = useAppStoreInstance.subsystemSocketContent
...@@ -1043,9 +1115,11 @@ watch(() => useAppStoreInstance.subsystemSocketContent, (newVal, oldValue) => { ...@@ -1043,9 +1115,11 @@ watch(() => useAppStoreInstance.subsystemSocketContent, (newVal, oldValue) => {
},{ deep: true, immediate: true }); },{ deep: true, immediate: true });
}) })
}) })
arcHistoryActiveIndex.value = 0
}); });
onUnmounted(() => { onUnmounted(() => {
// useAppStoreInstance.setGlobalSubsystemSelectedTimeRange([]); // useAppStoreInstance.setGlobalSubsystemSelectedTimeRange([]);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论