Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
db01bd32
Commit
db01bd32
authored
Nov 13, 2025
by
延飞 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
继续修改 loading 一直显示问题
parent
1a039f47
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
25 deletions
+13
-25
qdry_project/static/src/view/oee_analysis.html
+13
-25
No files found.
qdry_project/static/src/view/oee_analysis.html
View file @
db01bd32
...
@@ -258,37 +258,14 @@
...
@@ -258,37 +258,14 @@
this
.
init
();
// 直接调用init方法
this
.
init
();
// 直接调用init方法
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
//
这些初始化操作可能会与init方法中的操作重复,可以考虑移除
//
只显示页面内容,其他初始化操作由init方法处理
document
.
getElementById
(
"bodyId"
).
style
.
display
=
"block"
;
document
.
getElementById
(
"bodyId"
).
style
.
display
=
"block"
;
this
.
charts
.
statusPie
=
this
.
initStatusPieChart
();
this
.
charts
.
oeeRank
=
this
.
initOEERankChart
();
this
.
charts
.
waitingLoss
=
this
.
initWaitingLossChart
();
this
.
charts
.
oeeTrend
=
this
.
initOEETrendChart
();
this
.
charts
.
faultLoss
=
this
.
initFaultLossChart
();
// 直接更新图表,不需要先获取设备列表
this
.
updateAllCharts
();
// 设置默认选中的车间和产线
if
(
this
.
productionLines
.
length
>
0
)
{
this
.
selectedLine
=
this
.
productionLines
[
0
].
id
;
const
workshopId
=
this
.
productionLines
[
0
].
workshopId
;
this
.
selectedWorkshop
=
this
.
workshops
.
find
((
w
)
=>
w
.
id
===
workshopId
);
}
// 初始化拖拽功能
this
.
initDraggable
();
// 添加窗口大小变化监听
window
.
addEventListener
(
"resize"
,
this
.
handleResize
);
// 初始化完成后触发一次resize
this
.
handleResize
();
});
});
// 添加延迟更新,确保图表能正确显示
// 添加延迟更新,确保图表能正确显示
setTimeout
(()
=>
{
setTimeout
(()
=>
{
console
.
log
(
"延迟更新所有图表..."
);
console
.
log
(
"延迟更新所有图表..."
);
console
.
log
(
"当前loading状态:"
,
this
.
loading
);
if
(
this
.
apiData
.
faultLossData
&&
this
.
apiData
.
faultLossData
.
length
>
0
)
{
if
(
this
.
apiData
.
faultLossData
&&
this
.
apiData
.
faultLossData
.
length
>
0
)
{
console
.
log
(
"故障损失数据存在,重新更新故障损失图表"
);
console
.
log
(
"故障损失数据存在,重新更新故障损失图表"
);
this
.
updateFaultLossChart
();
this
.
updateFaultLossChart
();
...
@@ -297,6 +274,7 @@
...
@@ -297,6 +274,7 @@
console
.
log
(
"等待损失数据存在,重新更新等待损失图表"
);
console
.
log
(
"等待损失数据存在,重新更新等待损失图表"
);
this
.
updateWaitingLossChart
();
this
.
updateWaitingLossChart
();
}
}
console
.
log
(
"延迟更新完成,当前loading状态:"
,
this
.
loading
);
},
1000
);
},
1000
);
},
},
...
@@ -321,6 +299,7 @@
...
@@ -321,6 +299,7 @@
},
},
// 初始化
// 初始化
async
init
()
{
async
init
()
{
console
.
log
(
"Init started: setting loading to true"
);
this
.
loading
=
true
;
this
.
loading
=
true
;
try
{
try
{
// console.log("开始初始化...");
// console.log("开始初始化...");
...
@@ -384,6 +363,12 @@
...
@@ -384,6 +363,12 @@
this
.
$message
.
error
(
"初始化失败,请刷新页面重试"
);
this
.
$message
.
error
(
"初始化失败,请刷新页面重试"
);
}
finally
{
}
finally
{
this
.
loading
=
false
;
this
.
loading
=
false
;
console
.
log
(
"Init completed: loading set to false"
);
// 强制确保loading状态被正确设置,延迟一点时间确保所有异步操作完成
setTimeout
(()
=>
{
this
.
loading
=
false
;
console
.
log
(
"Final loading state set to false"
);
},
100
);
}
}
},
},
...
@@ -647,6 +632,9 @@
...
@@ -647,6 +632,9 @@
// 只有当我们设置了loading状态时才关闭它
// 只有当我们设置了loading状态时才关闭它
if
(
!
isAlreadyLoading
)
{
if
(
!
isAlreadyLoading
)
{
this
.
loading
=
false
;
this
.
loading
=
false
;
console
.
log
(
"HandleLineChange completed: loading set to false"
);
}
else
{
console
.
log
(
"HandleLineChange completed: loading state managed by parent"
);
}
}
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment