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
96da769e
authored
2025-12-08 16:28:48 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
下载数据前先调用检查接口
1 parent
58a91e65
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
src/api/modules/dataDelivery.ts
src/views/data_asset/registerCatalogDetail.vue
src/api/modules/dataDelivery.ts
View file @
96da769
...
...
@@ -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 @
96da769
...
...
@@ -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
();
...
...
@@ -337,9 +338,11 @@ const productTableInfo = ref({
fields
:
[
{
label
:
"序号"
,
type
:
"index"
,
width
:
TableColumnWidth
.
INDEX
,
align
:
"center"
},
{
label
:
"服务名称"
,
field
:
"apiName"
,
width
:
180
},
{
label
:
"API类型"
,
field
:
"apiType"
,
width
:
100
,
getName
:
(
scope
)
=>
{
{
label
:
"API类型"
,
field
:
"apiType"
,
width
:
100
,
getName
:
(
scope
)
=>
{
return
scope
.
row
.
apiType
&&
apiTypes
.
find
(
a
=>
a
.
value
==
scope
.
row
.
apiType
)?.
label
;
}
},
}
},
{
label
:
"API地址"
,
field
:
"requestUrl"
,
width
:
240
},
{
label
:
"描述"
,
field
:
"apiDescription"
,
width
:
240
},
],
...
...
@@ -450,6 +453,11 @@ const handleTableViewData = (scope) => {
/** 下载数据 */
const
handleTableViewDataDown
=
(
scope
)
=>
{
downloadTableDataCheck
({
userGuid
:
route
.
query
.
useGuid
,
subjectGuid
:
scope
.
row
.
guid
}).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
downloadTableData
({
userGuid
:
route
.
query
.
useGuid
,
subjectGuid
:
scope
.
row
.
guid
...
...
@@ -460,6 +468,10 @@ const handleTableViewDataDown = (scope) => {
res
?.
msg
&&
ElMessage
.
error
(
res
?.
msg
);
}
})
}
else
{
ElMessage
.
error
(
res
?.
msg
||
'下载失败'
);
}
})
}
const
toolBtns
:
any
=
computed
(()
=>
{
...
...
@@ -1272,7 +1284,8 @@ const respParamsTableInfo = ref({
<div
class=
"dataLabel"
v-show=
"detailInfo.domainName"
>
{{
detailInfo
.
domainName
}}
</div>
<div
class=
"dataLabel dataLabel1"
v-if=
"detailInfo.databaseType"
>
{{
detailInfo
.
databaseType
}}
</div>
<div
class=
"dataLabel dataLabel1"
>
{{
detailInfo
.
dataSourcesName
}}
</div>
<div
class=
"dataLabel dataLabel1"
v-if=
"detailInfo.updateFrequency"
>
{{
detailInfo
.
updateFrequencyName
}}
</div>
<div
class=
"dataLabel dataLabel1"
v-if=
"detailInfo.updateFrequency"
>
{{
detailInfo
.
updateFrequencyName
}}
</div>
</div>
</div>
<!--
<template
v-if=
"detailInfo?.foundMode == 1"
>
-->
...
...
@@ -1325,8 +1338,9 @@ const respParamsTableInfo = ref({
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
产品发布机构:
</span>
<span
class=
"item_value"
><ellipsis-tooltip
:content=
"publicDataProductsMainRSVO?.productPublisherName || '--'"
class-name=
"w100f mr8-i"
:refName=
"'tooltipOver' + 'productPublisherName'"
></ellipsis-tooltip></span>
<span
class=
"item_value"
><ellipsis-tooltip
:content=
"publicDataProductsMainRSVO?.productPublisherName || '--'"
class-name=
"w100f mr8-i"
:refName=
"'tooltipOver' + 'productPublisherName'"
></ellipsis-tooltip></span>
</div>
<div
class=
"list_item"
>
<span
class=
"item_label"
>
领域:
</span>
...
...
@@ -1485,11 +1499,13 @@ const respParamsTableInfo = ref({
<span>
{{
scope
.
row
[
"updateTime"
]
||
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
v-if=
"!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read'"
width=
"220px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
<el-table-column
label=
"操作"
v-if=
"!detailInfo.nodeId || foundMode == 'download' || foundMode == 'read'"
width=
"220px"
align=
"left"
fixed=
"right"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
<span
class=
"text_btn"
@
click=
"handleTableViewData(scope)"
>
查看样例数据
</span>
<el-divider
v-show=
"foundMode == 'download'"
direction=
"vertical"
/>
<span
v-show=
"foundMode == 'download'"
class=
"text_btn"
@
click=
"handleTableViewDataDown(scope)"
>
下载数据
</span>
<span
v-show=
"foundMode == 'download'"
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