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
1c6ae929
authored
2026-03-17 15:16:01 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加数据产品下载源文件
1 parent
b24883dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
src/views/data_asset/registerCatalogDetail.vue
src/views/data_asset/registerCatalogDetail.vue
View file @
1c6ae92
...
...
@@ -35,6 +35,7 @@ import {
getContractStrategy
}
from
"@/api/modules/dataDelivery"
;
import
StrategyTable
from
'../data_smart_contract/components/strategyTable.vue'
;
import
{
getDownFileSignByUrl
,
obsDownloadRequest
,
parseAndDecodeUrl
}
from
'@/api/modules/obsService'
;
const
router
=
useRouter
();
const
route
=
useRoute
();
...
...
@@ -477,7 +478,8 @@ const handleTableViewData = (scope) => {
}
/** 下载数据 */
const
handleTableViewDataDown
=
(
scope
)
=>
{
const
handleTableViewDataDown
=
async
(
scope
)
=>
{
if
(
foundMode
.
value
==
'download'
||
foundMode
.
value
==
'readAndDown'
)
{
downloadTableDataCheck
({
userGuid
:
route
.
query
.
useGuid
,
subjectGuid
:
scope
.
row
.
guid
...
...
@@ -497,6 +499,24 @@ const handleTableViewDataDown = (scope) => {
ElMessage
.
error
(
res
?.
msg
||
'下载失败'
);
}
})
}
else
if
(
!
detailInfo
.
nodeId
&&
foundMode
.
value
==
'1'
&&
userData
.
superTubeFlag
==
'Y'
)
{
//下载源文件
let
fileUrl
=
scope
.
row
.
fileUrl
;
const
refSignInfo
:
any
=
await
getDownFileSignByUrl
(
parseAndDecodeUrl
(
fileUrl
).
fileName
);
if
(
!
refSignInfo
?.
data
)
{
refSignInfo
?.
msg
&&
ElMessage
.
error
(
refSignInfo
?.
msg
);
return
;
}
obsDownloadRequest
(
refSignInfo
?.
data
).
then
((
res
:
any
)
=>
{
if
(
res
&&
!
res
.
msg
)
{
let
f
=
scope
.
row
.
fileName
;
let
name
=
f
.
name
;
var
fileSuffix
=
name
?
name
.
substring
(
name
.
lastIndexOf
(
'.'
)
+
1
)
:
''
;
download
(
res
,
name
,
fileSuffix
);
}
else
{
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
}
})
}
}
const
toolBtns
:
any
=
computed
(()
=>
{
...
...
@@ -1526,8 +1546,10 @@ const respParamsTableInfo = ref({
<!-- 如果是下载,就只显示下载,如果是查看和下载就都显示,就两个按钮都显示。仅查看,就仅查看 -->
<span
v-show=
"foundMode != 'download'"
class=
"text_btn"
@
click=
"handleTableViewData(scope)"
>
查看样例数据
</span>
<el-divider
v-show=
"foundMode == 'readAndDown' || (!detailInfo.nodeId && foundMode == '1' && userData.superTubeFlag == 'Y')"
direction=
"vertical"
/>
<span
v-
show=
"foundMode == 'download' || foundMode == 'readAndDown' || (!detailInfo.nodeId && foundMode == '1' && userData.superTubeFlag == 'Y')
"
class=
"text_btn"
<span
v-
if=
"foundMode == 'download' || foundMode == 'readAndDown'
"
class=
"text_btn"
@
click=
"handleTableViewDataDown(scope)"
>
下载数据
</span>
<span
v-else-if=
"!detailInfo.nodeId && foundMode == '1' && userData.superTubeFlag == 'Y'"
class=
"text_btn"
@
click=
"handleTableViewDataDown(scope)"
>
下载
</span>
</
template
>
</el-table-column>
</el-table>
...
...
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