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
084a87b7
authored
2026-02-12 14:19:09 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
专区自己新建的显示下载按钮
1 parent
27925b94
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
src/views/data_anonymization/anonResultReportView.vue
src/views/data_anonymization/anonTaskCreate.vue
src/views/data_anonymization/resultProcess.vue
src/views/data_anonymization/anonResultReportView.vue
View file @
084a87b
...
...
@@ -206,8 +206,9 @@ const downloadWord = () => {
let
report
=
resultReportRef
.
value
?.
report
;
dom
.
innerHTML
=
report
?.
innerHTML
;
resultDataLoading
.
value
=
true
;
loadingText
.
value
=
'评测报告正在发送中,请勿关闭浏览器...'
;
loadingText
.
value
=
`评测报告正在
${
route
.
query
.
dataOwner
==
'1'
?
'发送'
:
'下载'
}
中,请勿关闭浏览器...`
;
downPromise
.
value
=
convertHtml2Img
(
report
,
dom
).
then
(()
=>
{
if
(
route
.
query
.
dataOwner
==
'1'
)
{
sendAnonReport
({
taskGuid
:
taskGuid
.
value
,
html
:
encodeURIComponent
(
`<div>
${
getHTML
(
dom
.
innerHTML
)}
</div>`
)
}).
then
((
res
:
any
)
=>
{
downPromise
.
value
=
null
loadingText
.
value
=
''
;
...
...
@@ -218,6 +219,18 @@ const downloadWord = () => {
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
}
})
}
else
{
htmlToWord
({
html
:
encodeURIComponent
(
`<div>
${
getHTML
(
dom
.
innerHTML
)}
</div>`
)
}).
then
((
res
:
any
)
=>
{
downPromise
.
value
=
null
loadingText
.
value
=
''
;
resultDataLoading
.
value
=
false
;
if
(
res
&&
!
res
.
msg
)
{
download
(
res
,
(
route
.
query
.
taskName
||
oldAnonTaskValueInfo
.
value
.
taskName
)
+
'_匿名化评估报告.docx'
,
'word'
)
}
else
{
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
}
})
}
}).
catch
(()
=>
{
downPromise
.
value
=
null
;
});
...
...
@@ -264,7 +277,8 @@ onBeforeMount(() => {
v-preReClick
>
预览Word评估报告
</el-button>
<div
v-show=
"isWordStyle"
style=
"margin-bottom: 8px;"
>
<el-button
@
click=
"isWordStyle = false"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"downloadWord"
>
确认并发送评测报告
</el-button>
<el-button
type=
"primary"
@
click=
"downloadWord"
>
{{
route
.
query
.
dataOwner
==
'1'
?
'确认并发送评测报告'
:
'下载评测报告'
}}
</el-button>
</div>
</
template
>
<anonResultAnalysis
ref=
"resultReportRef"
:show-title=
"true"
:analysis-result-info=
"analysisResultInfo"
...
...
src/views/data_anonymization/anonTaskCreate.vue
View file @
084a87b
...
...
@@ -169,7 +169,8 @@
v-loading=
"!!downPromise"
@
click=
"transfer"
>
预览Word评估报告
</el-button>
<div
v-show=
"isWordStyle"
>
<el-button
@
click=
"isWordStyle = false"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"downloadWord"
>
确认并发送评测报告
</el-button>
<!-- 专区自己新建的显示下载报告。 -->
<el-button
type=
"primary"
@
click=
"downloadWord"
>
下载评估报告
</el-button>
</div>
</
template
>
</ContentWrap>
...
...
@@ -1968,12 +1969,12 @@ const downloadWord = () => {
loadingText
.
value
=
'报告正在下载中,请勿关闭浏览器...'
;
downloadLoading
.
value
=
true
;
downPromise
.
value
=
convertHtml2Img
(
report
,
dom
).
then
(()
=>
{
sendAnonReport
({
taskGuid
:
taskGuid
.
value
,
html
:
encodeURIComponent
(
`<div>
${
getHTML
(
dom
.
innerHTML
)}
</div>`
)
}).
then
((
res
:
any
)
=>
{
htmlToWord
({
html
:
encodeURIComponent
(
`<div>
${
getHTML
(
dom
.
innerHTML
)}
</div>`
)
}).
then
((
res
:
any
)
=>
{
downPromise
.
value
=
null
loadingText
.
value
=
''
;
downloadLoading
.
value
=
false
;
if
(
res
?.
code
==
proxy
.
$passCode
)
{
proxy
.
$ElMessage
.
success
(
'评测报告发送成功'
);
if
(
res
&&
!
res
.
msg
)
{
download
(
res
,
(
route
.
query
.
taskName
||
oldAnonTaskValueInfo
.
value
.
taskName
)
+
'_匿名化评估报告.docx'
,
'word'
)
}
else
{
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
}
...
...
src/views/data_anonymization/resultProcess.vue
View file @
084a87b
...
...
@@ -95,7 +95,8 @@ const tableInfo = ref({
query
:
{
guid
:
scope
.
row
.
guid
,
execGuid
:
scope
.
row
.
lastExecGuid
,
taskName
:
scope
.
row
.
taskName
taskName
:
scope
.
row
.
taskName
,
dataOwner
:
scope
.
row
.
dataOwnership
}
});
}
...
...
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