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
bc17f639
authored
2026-03-18 13:36:51 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
下载文件资源检查
1 parent
353a4042
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
Jenkinsfile
src/api/modules/dataDelivery.ts
src/views/data_asset/registerCatalogDetail.vue
Jenkinsfile
View file @
bc17f63
...
...
@@ -6,7 +6,7 @@ pipeline {
SVN_FOLD = "fe-data-trusted-space-connector"
SSH_PATH = "js-match"
SVN_TYPE = "temp"
image_tag = "1.0.
0
-amd"
image_tag = "1.0.
1
-amd"
ip = "121.237.182.192:30002"
port = "59900"
vport = "80"
...
...
src/api/modules/dataDelivery.ts
View file @
bc17f63
...
...
@@ -60,6 +60,12 @@ export const downloadTableData = (params) => request({
responseType
:
'blob'
});
/** 下载文件前的检查 */
export
const
downloadFileCheck
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_COMMON_URL
}
/contract-use/download-file?userGuid=
${
params
.
userGuid
}
&fileName=
${
params
.
fileName
}
`
,
method
:
'get'
});
/** 下载数据前的检查 */
export
const
downloadTableDataCheck
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_API_COMMON_URL
}
/contract-use/download-check?userGuid=
${
params
.
userGuid
}
&subjectGuid=
${
params
.
subjectGuid
}
`
,
...
...
src/views/data_asset/registerCatalogDetail.vue
View file @
bc17f63
...
...
@@ -32,7 +32,8 @@ import { TableColumnWidth } from '@/utils/enum';
import
{
downloadTableData
,
downloadTableDataCheck
,
getContractStrategy
getContractStrategy
,
downloadFileCheck
}
from
"@/api/modules/dataDelivery"
;
import
StrategyTable
from
'../data_smart_contract/components/strategyTable.vue'
;
import
{
getDownFileSignByUrl
,
obsDownloadRequest
,
parseAndDecodeUrl
}
from
'@/api/modules/obsService'
;
...
...
@@ -477,6 +478,24 @@ const handleTableViewData = (scope) => {
});
}
/** 下载文件资源 */
const
downloadFile
=
(
productDetailItem
)
=>
{
if
(
foundMode
.
value
==
'1'
)
{
onUploadFileDownload
(
productDetailItem
);
}
else
{
// 使用次数需要先调用
downloadFileCheck
({
userGuid
:
route
.
query
.
useGuid
,
fileName
:
productDetailItem
}).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
onUploadFileDownload
(
productDetailItem
);
}
else
{
ElMessage
.
error
(
res
?.
msg
||
'下载失败'
);
}
});
}
}
/** 下载数据 */
const
handleTableViewDataDown
=
async
(
scope
)
=>
{
if
(
foundMode
.
value
==
'download'
||
foundMode
.
value
==
'readAndDown'
)
{
...
...
@@ -1493,13 +1512,13 @@ const respParamsTableInfo = ref({
</
template
>
<div
class=
"file-name"
><ellipsis-tooltip
:content=
"productDetailItem.name ?? ''"
class-name=
"w100f"
refName=
"tooltipOver"
></ellipsis-tooltip></div>
<div
<
!-- <
div
v-if="foundMode != 'download' && ['pdf', 'png', 'jpg', 'jpeg'].includes(productDetailItem.name?.substring(productDetailItem.name.lastIndexOf('.') + 1).toLowerCase())"
:style="{ right: '36px' }" class="file-preview" @click="onUploadFilePreview(productDetailItem)">
查看
</div>
</div>
-->
<div
:style=
"{ right: '0px' }"
class=
"file-preview"
v-if=
"foundMode == 'download' || foundMode == 'readAndDown' || foundMode == '1'"
@
click=
"
onUploadFileDownload(productDetailItem)
"
>
下载
</div>
@
click=
"
downloadFile
"
>
下载
</div>
</div>
</span>
</span>
...
...
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