Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2f247ea8
authored
2026-02-12 10:02:44 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
清理内存
1 parent
ccc6a541
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
3 deletions
src/views/data_anonymization/anonTaskCreate.vue
src/views/data_anonymization/anonTaskCreate.vue
View file @
2f247ea
...
...
@@ -1010,6 +1010,10 @@ const uploadFileDialogInfo = ref({
const
folderRefreshTimer
=
ref
();
const
processFolderRefresh
=
async
()
=>
{
// 组件已卸载时不再执行
if
(
!
containerRef
.
value
)
{
return
;
}
await
getDicomStatisticsData
(
taskGuid
.
value
);
if
(
!
dicomStatisticsData
.
value
.
state
||
dicomStatisticsData
.
value
.
state
==
'S'
||
dicomStatisticsData
.
value
.
state
==
'R'
)
{
if
(
folderRefreshTimer
.
value
)
{
...
...
@@ -1717,13 +1721,15 @@ onBeforeMount(() => {
})
})
const
handleResize
=
()
=>
{
containerWidth
.
value
=
containerRef
.
value
?.
offsetWidth
||
0
;
}
onMounted
(()
=>
{
nextTick
(()
=>
{
containerWidth
.
value
=
containerRef
.
value
?.
offsetWidth
||
0
;
})
window
.
onresize
=
()
=>
{
containerWidth
.
value
=
containerRef
.
value
?.
offsetWidth
||
0
;
}
window
.
addEventListener
(
'resize'
,
handleResize
);
})
const
cancelTask
=
()
=>
{
...
...
@@ -1754,6 +1760,10 @@ const getResultPromise: any = ref(null);
/** 第三步处理,定时刷新查看结果 */
const
processStepThreeResultView
=
(
isRefresh
=
false
)
=>
{
// 组件已卸载时不再执行
if
(
!
containerRef
.
value
)
{
return
;
}
let
process
=
(
isRefresh
)
=>
{
getResultPromise
.
value
=
getAnonAnalyzeResult
(
taskExecGuid
.
value
).
then
((
res
:
any
)
=>
{
getResultPromise
.
value
=
null
;
...
...
@@ -1970,6 +1980,35 @@ const downloadWord = () => {
onUnmounted
(()
=>
{
refreshTimer
.
value
&&
clearInterval
(
refreshTimer
.
value
);
refreshTimer
.
value
=
null
;
if
(
folderRefreshTimer
.
value
)
{
clearInterval
(
folderRefreshTimer
.
value
);
folderRefreshTimer
.
value
=
null
;
}
// 清理未完成的Promise引用
if
(
getResultPromise
.
value
)
{
getResultPromise
.
value
=
null
;
}
if
(
promise
.
value
)
{
promise
.
value
=
null
;
}
if
(
downPromise
.
value
)
{
downPromise
.
value
=
null
;
}
// 清理其他可能的异步操作引用
if
(
getParentAreaPromise
.
value
)
{
getParentAreaPromise
.
value
=
null
;
}
if
(
domClone
.
value
)
{
domClone
.
value
=
null
;
}
window
.
removeEventListener
(
'resize'
,
handleResize
);
})
</
script
>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment