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
12748e02
authored
2025-12-08 16:28:48 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
下载数据前先调用检查接口
1 parent
d3eee8b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
src/api/modules/dataDelivery.ts
src/views/data_asset/registerCatalogDetail.vue
src/api/modules/dataDelivery.ts
View file @
12748e0
...
...
@@ -54,6 +54,12 @@ export const downloadTableData = (params) => request({
responseType
:
'blob'
});
/** 下载数据前的检查 */
export
const
downloadTableDataCheck
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract-use/download-check?userGuid=
${
params
.
userGuid
}
&subjectGuid=
${
params
.
subjectGuid
}
`
,
method
:
'get'
});
/** 数据使用中查看资产表的数据 */
export
const
queryUseData
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DIGITAL_CONTRACT_URL
}
/contract-use/read?userGuid=
${
params
.
userGuid
}
&subjectGuid=
${
params
.
subjectGuid
}
`
,
...
...
src/views/data_asset/registerCatalogDetail.vue
View file @
12748e0
...
...
@@ -30,7 +30,8 @@ import { CircleCloseFilled } from '@element-plus/icons-vue'
import
useDataAssetStore
from
"@/store/modules/dataAsset"
;
import
{
TableColumnWidth
}
from
'@/utils/enum'
;
import
{
downloadTableData
downloadTableData
,
downloadTableDataCheck
}
from
"@/api/modules/dataDelivery"
;
const
router
=
useRouter
();
...
...
@@ -450,14 +451,23 @@ const handleTableViewData = (scope) => {
/** 下载数据 */
const
handleTableViewDataDown
=
(
scope
)
=>
{
downloadTableData
({
downloadTableData
Check
({
userGuid
:
route
.
query
.
useGuid
,
subjectGuid
:
scope
.
row
.
guid
}).
then
((
res
:
any
)
=>
{
if
(
res
&&
!
res
.
msg
)
{
download
(
res
,
`
${
scope
.
row
.
tableChName
}
.xlsx`
,
'excel'
);
if
(
res
?.
code
==
proxy
.
$passCode
)
{
downloadTableData
({
userGuid
:
route
.
query
.
useGuid
,
subjectGuid
:
scope
.
row
.
guid
}).
then
((
res
:
any
)
=>
{
if
(
res
&&
!
res
.
msg
)
{
download
(
res
,
`
${
scope
.
row
.
tableChName
}
.xlsx`
,
'excel'
);
}
else
{
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
}
})
}
else
{
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
ElMessage
.
error
(
res
?.
msg
||
'下载失败'
);
}
})
}
...
...
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