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
ec3ff51c
authored
2024-12-26 13:08:47 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改下载文件,注释掉血缘
1 parent
c7b77154
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
45 deletions
.env.development
default.conf
src/api/modules/obsService.ts
src/router/modules/dataMeta.ts
src/views/data_meta/metaSheet.vue
src/views/importFile.vue
.env.development
View file @
ec3ff51
...
...
@@ -4,7 +4,7 @@ VITE_APP_TITLE = 数据资产管理系统
# VITE_API_BASEURL = https://www.zgsjzc.com/api
# VITE_API_BASEURL = https://swzl-test.csbr.cn/api
# VITE_API_BASEURL = http://localhost:9000
VITE_API_BASEURL = http://1
0.4.82.1
:28052/
VITE_API_BASEURL = http://1
92.168.6.20
:28052/
# 平台用户 接口请地址
VITE_APP_USER_API_BASEURL = gateway-server
...
...
default.conf
View file @
ec3ff51
...
...
@@ -3,7 +3,7 @@ server {
listen
[::]:
80
;
server_name
localhost
;
# server_name http://192.168.6.20:8052;
client_max_body_size
100
M
;
# 设置允许跨域的域名,可以使用通配符 '*' 允许所有域访问
add_header
'Access-Control-Allow-Origin'
*
always
;
...
...
src/api/modules/obsService.ts
0 → 100644
View file @
ec3ff51
import
request
from
"@/utils/request"
;
export
const
parseAndDecodeUrl
=
(
url
:
string
)
=>
{
// 创建一个 URL 对象来解析传入的 URL 字符串
const
parsedUrl
=
new
URL
(
url
);
// 获取 pathname (路径) 和 search (查询字符串, 如果有的话)
// hash (锚点, 如果有的话) 也可以根据需要添加
let
{
pathname
,
search
=
''
,
hash
=
''
}
=
parsedUrl
;
// 去掉路径最前面的斜杠
pathname
=
pathname
.
startsWith
(
'/'
)
?
pathname
.
slice
(
1
)
:
pathname
;
// 将路径、查询字符串和锚点部分进行解码
pathname
=
decodeURIComponent
(
pathname
);
search
=
decodeURIComponent
(
search
);
hash
=
decodeURIComponent
(
hash
);
// 提取最后一个斜杠后面的内容(文件名或资源标识符)
const
lastSlashIndex
=
pathname
.
lastIndexOf
(
'/'
);
const
lastPart
=
lastSlashIndex
!==
-
1
?
pathname
.
substring
(
lastSlashIndex
+
1
)
:
pathname
;
// 返回去掉主机信息和开头斜杠后的解码部分以及最后一个斜杠后面的内容
return
{
decodedPath
:
pathname
+
search
+
hash
,
lastPart
:
lastPart
};
}
//获取下载签名
export
const
getDownFileSignByUrl
=
(
fileName
)
=>
{
return
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_COMMON_URL
}
/obs/g
enerate
-
download
-
file
-
signature
?
fileName
=
$
{
fileName
}
`,
method: "get",
});
};
export const getImageContent = (params) => request({
url: `
$
{
import
.
meta
.
env
.
VITE_APP_COMMON_URL
}
/obs/
download
-
file
-
stream
?
filePath
=
$
{
params
.
signedUrl
}
`,
method: 'get',
responseType: 'blob',
headers: { 'Content-Type': params.actualSignedRequestHeaders['Content-Type'] }
});
src/router/modules/dataMeta.ts
View file @
ec3ff51
...
...
@@ -93,46 +93,46 @@ const routes: RouteRecordRaw[] = [
},
],
},
{
path
:
'/data-meta/metadata-lineage'
,
component
:
Layout
,
meta
:
{
title
:
'元数据血缘'
,
icon
:
'ep:grid'
,
},
children
:
[
{
path
:
'analysis-view'
,
name
:
'analysisView'
,
component
:
()
=>
import
(
'@/views/data_meta/analysisView.vue'
),
meta
:
{
title
:
'查看血缘'
,
breadcrumb
:
false
,
cache
:
true
},
},
{
path
:
'change-detection'
,
name
:
'changeDetection'
,
component
:
()
=>
import
(
'@/views/data_meta/changeDetection.vue'
),
meta
:
{
title
:
'血缘变更检测'
,
breadcrumb
:
false
,
cache
:
true
},
},
{
path
:
'analysis-reports'
,
name
:
'analysisReports'
,
component
:
()
=>
import
(
'@/views/data_meta/analysisReports.vue'
),
meta
:
{
title
:
'血缘关系解析'
,
breadcrumb
:
false
,
cache
:
true
},
},
],
},
//
{
//
path: '/data-meta/metadata-lineage',
//
component: Layout,
//
meta: {
//
title: '元数据血缘',
//
icon: 'ep:grid',
//
},
//
children: [
//
{
//
path: 'analysis-view',
//
name: 'analysisView',
//
component: () => import('@/views/data_meta/analysisView.vue'),
//
meta: {
//
title: '查看血缘',
//
breadcrumb: false,
//
cache: true
//
},
//
},
//
{
//
path: 'change-detection',
//
name: 'changeDetection',
//
component: () => import('@/views/data_meta/changeDetection.vue'),
//
meta: {
//
title: '血缘变更检测',
//
breadcrumb: false,
//
cache: true
//
},
//
},
//
{
//
path: 'analysis-reports',
//
name: 'analysisReports',
//
component: () => import('@/views/data_meta/analysisReports.vue'),
//
meta: {
//
title: '血缘关系解析',
//
breadcrumb: false,
//
cache: true
//
},
//
},
//
],
//
},
]
export
default
routes
...
...
src/views/data_meta/metaSheet.vue
View file @
ec3ff51
...
...
@@ -60,7 +60,7 @@ const tabsInfo = ref({
activeName
:
''
,
tabs
:
[
{
label
:
'基础信息'
,
name
:
'first'
},
{
label
:
'数据血缘'
,
name
:
'second'
},
// /
{ label: '数据血缘', name: 'second' },
{
label
:
'变更记录'
,
name
:
'third'
}
]
})
...
...
src/views/importFile.vue
View file @
ec3ff51
...
...
@@ -18,8 +18,13 @@ import {
getImportData
,
exportDictionary
,
exportCollectTask
,
getImageContent
//
getImageContent
}
from
'@/api/modules/queryService'
;
import
{
parseAndDecodeUrl
,
getDownFileSignByUrl
,
getImageContent
}
from
'@/api/modules/obsService'
;
import
{
commonPageConfig
}
from
'@/utils/enum'
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -216,7 +221,12 @@ const tableBtnClick = async (scope, btn) => {
const
row
=
scope
.
row
;
currTableData
.
value
=
row
;
if
(
type
==
"export_file"
)
{
getImageContent
(
row
.
filePath
).
then
((
res
:
any
)
=>
{
const
refSignInfo
:
any
=
await
getDownFileSignByUrl
(
parseAndDecodeUrl
(
row
.
filePath
).
decodedPath
);
if
(
!
refSignInfo
?.
data
)
{
refSignInfo
?.
msg
&&
ElMessage
.
error
(
refSignInfo
?.
msg
);
return
;
}
getImageContent
(
refSignInfo
?.
data
).
then
((
res
:
any
)
=>
{
if
(
res
&&
!
res
.
msg
)
{
let
name
=
row
.
filePath
;
var
fileSuffix
=
name
?
name
.
substring
(
name
.
lastIndexOf
(
'.'
)
+
1
)
:
''
;
...
...
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