Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
SatelliteDigital
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
nijiawen
SatelliteDigital
Commits
c62bcf89
提交
c62bcf89
authored
4月 08, 2026
作者:
liujiaxing
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev/z' into dev/L
上级
d6b4aba1
6cc37c1b
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
6 行删除
+18
-6
MEMORY.md
.workbuddy/memory/MEMORY.md
+9
-3
timers.vue
src/pages/footer/component/timers.vue
+0
-0
index.vue
src/pages/rights/index.vue
+3
-3
app.js
src/store/module/app.js
+6
-0
没有找到文件。
.workbuddy/memory/MEMORY.md
浏览文件 @
c62bcf89
...
...
@@ -31,9 +31,14 @@
-
`footerTimeHasedSelectTimeToSub`
:标记主系统时间范围是否已同步给子系统
-
`globalTimeLineEndSelectTime`
:记录滑块当前指向的时间,用于分系统返回后恢复(
**实时和历史模式都要更新**
,
`updateSelectedTimes`
已改为无条件更新,不再限制
`!is_flag_isRealtime`
)
-
`globalSubsystemSelectedStartTime`
:记录用户选择的时间范围
`[startTime, endTime]`
-
`globalLeftWssCONTINE`
:WebSocket 数据对象,包含
`type`
(
`"history"`
或
`"realtime"`
)
-
从子系统返回时,根据
`footerTimeHasedSelectTimeToSub`
和
`globalLeftWssCONTINE.type`
判断走历史模式恢复还是实时模式恢复
-
`globalLeftWssCONTINE`
:WebSocket 数据对象,包含
`type`
(
`"history"`
或
`"realtime"`
)。
**注意**
:
`lefts/index.vue`
的
`onMounted`
会把
`wss`
(WebSocket 实例)写入该字段,导致
`.type`
变成
`undefined`
,
**不可用于判断实时/历史模式**
。
-
`globalIsRealtimeBeforeSub`
:
**专门用于从子系统返回时恢复**
,在
`timers.vue`
的
`onUnmounted`
时写入
`is_flag_isRealtime.value`
,
`onMounted`
恢复时读该字段判断。
-
从子系统返回时,根据
`footerTimeHasedSelectTimeToSub`
和
`globalIsRealtimeBeforeSub`
判断走历史模式恢复还是实时模式恢复
-
**实时模式返回**
:恢复
`is_flag_isRealtime = true`
,重新开启实时 WS + 自动播放,不重置滑块
-
实时模式不回显时间段:
`dateRange=[]`
、
`pick_select_date=null`
-
**不走 `handleDateRangeChange`**
,因为它会重置
`is_flag_isRealtime=false`
、
`isDateRangeNotEmpty=false`
、
`updateTimeline()`
重置滑块为0;之后设
`isDateRangeNotEmpty=true`
会触发 watch,
`autoHandleDateRangeChange`
每秒把时间改成
`Date.now()-24h`
,覆盖原来时间
-
实时模式恢复只需:
`is_flag_isRealtime=true`
+
`isChange_flag_select_date=true`
+
`updateTimeline()`
+
`wssOpenHandle({continue})`
-
**不设 `isDateRangeNotEmpty=true`**
,避免
`autoHandleDateRangeChange`
把时间改成当前时间;实时模式的 WS 返回数据时会自动更新时间
-
**历史模式返回**
:恢复时间范围和滑块位置,发
`continue`
WS 请求
-
滑块恢复:
`handleDateRangeChange(..., true)`
内部会把滑块重置为 0,需在
`nextTick`
后调用
`jumpToSpecificTime(new Date(tempDateTime.value))`
跳回保存的位置
-
`tempDateTime.value`
在
`onMounted`
开头赋值为
`globalTimeLineEndSelectTime`
(每次
`updateSelectedTimes`
都会更新该 Store 字段)
...
...
@@ -41,5 +46,5 @@
-
⚠️
**关键时序**
:
`wssOpenHandle`
末尾无条件调用
`startAutoPlay()`
,因此必须把
`wssOpenHandle`
放在
`nextTick`
**内部**
(在
`jumpToSpecificTime`
之后),否则
`startAutoPlay`
会从
`endHandlePercent=0`
开始播放,自动走的滑块仍会从头重置
-
正确顺序:
`handleDateRangeChange`
→
`nextTick`
→
`jumpToSpecificTime`
→
`wssOpenHandle`
(含
`startAutoPlay`
)
-
⚠️
**onMounted 末尾的 realTimeData() 陷阱**
:
`onUnmounted`
调用
`stopAutoPlay()`
导致
`isPlaying=false`
,所以 onMounted 末尾的
`if (!isPlaying.value) { realTimeData() }`
在历史恢复分支执行后
**还会继续执行**
,生成新 taskCode、重开 WS,把恢复逻辑全部覆盖。修复:在
`setGlobalisFromTosub(false)`
之后,
`realTimeData()`
之前,判断
`if (footerTimeHasedSelectTimeToSub) return;`
提前退出。
-
⚠️
**实时模式 is_flag_isRealtime 被覆盖**
:
`handleDateRangeChange`
内部会把
`is_flag_isRealtime = false`
,导致实时模式返回后变成历史模式。修复:在
调用
`handleDateRangeChange`
前先读取
`wasRealtime = globalLeftWssCONTINE.type === "realtime"`
,调用
后如果
`wasRealtime=true`
则恢复
`is_flag_isRealtime.value = true`
。
-
⚠️
**实时模式 is_flag_isRealtime 被覆盖**
:
`handleDateRangeChange`
内部会把
`is_flag_isRealtime = false`
,导致实时模式返回后变成历史模式。修复:在
`onUnmounted`
时把
`is_flag_isRealtime.value`
存入
`globalIsRealtimeBeforeSub`
,
`onMounted`
恢复时读
`wasRealtime = globalIsRealtimeBeforeSub === true`
,调用
`handleDateRangeChange`
后如果
`wasRealtime=true`
则恢复
`is_flag_isRealtime.value = true`
。
-
⚠️
**isPlaying 没有恢复**
:
`handleDateRangeChange`
内部设置
`isPlaying=false`
,但
`startAutoPlay`
里没有设置
`isPlaying=true`
,导致
`moveEndHandle`
检查
`if (!isPlaying) return`
直接返回,滑块不动。修复:在
`nextTick`
里
`jumpToSpecificTime`
之后、
`wssOpenHandle`
之前手动设置
`isPlaying.value = true`
。
\ No newline at end of file
src/pages/footer/component/timers.vue
浏览文件 @
c62bcf89
差异被折叠。
点击展开。
src/pages/rights/index.vue
浏览文件 @
c62bcf89
...
...
@@ -154,9 +154,9 @@ const calculateConfig = (selectedTemplate) => {
component2
.
value
=
obj
[
selectedTemplate
.
availabilityCurveType
]
component3
.
value
=
obj
[
selectedTemplate
.
latencyCurveType
]
console
.
log
(
'component1'
,
component1
.
value
)
console
.
log
(
'component2'
,
component2
.
value
)
console
.
log
(
'component3'
,
component3
.
value
)
//
console.log('component1', component1.value)
//
console.log('component2', component2.value)
//
console.log('component3', component3.value)
const
curveType
=
{
'1'
:
'瞬时值曲线'
,
...
...
src/store/module/app.js
浏览文件 @
c62bcf89
...
...
@@ -25,6 +25,9 @@ const useAppStore = defineStore("app", {
globalLeftWssCONTINE
:
false
,
// 进入子系统前是否处于实时模式(专门用于返回时恢复,不依赖 globalLeftWssCONTINE)
globalIsRealtimeBeforeSub
:
false
,
globalRecordMainSysTaskCode
:
0
,
subSystemTimeLineEndSelectTime
:
"-"
,
...
...
@@ -71,6 +74,9 @@ const useAppStore = defineStore("app", {
setGlobalLeftWssCONTINE
(
status
)
{
this
.
globalLeftWssCONTINE
=
status
;
},
setGlobalIsRealtimeBeforeSub
(
status
)
{
this
.
globalIsRealtimeBeforeSub
=
status
;
},
setSubSystemTimeLineEndSelectTime
(
status
)
{
this
.
subSystemTimeLineEndSelectTime
=
status
;
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论