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
25ff483a
authored
2025-03-06 15:12:19 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 数据字典,上传文件去掉签名
1 parent
2ab46e16
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
25 deletions
src/api/modules/obsService.ts
src/router/modules/dataInventory.ts
src/views/data_inventory/dictFileds.vue
src/views/importFile.vue
src/api/modules/obsService.ts
View file @
25ff483
...
...
@@ -69,10 +69,18 @@ export const getUpFileSignByUrl = (params) => {
});
};
function getPathUrl(url:string) {
// 查找问号的位置
var questionMarkIndex = url.indexOf('?');
// 如果存在问号,则返回问号之前的部分;如果不存在,则返回原url
return questionMarkIndex !== -1 ? url.substring(0, questionMarkIndex) : url;
}
//obs上传
export const obsUploadRequest = (params) => {
return request({
url: params.signedUrl,
url: params.signedUrl
&& getPathUrl(params.signedUrl)
,
withCredentials: false,
headers: params.actualSignedRequestHeaders ? {
"Content-Type": params.actualSignedRequestHeaders[
...
...
src/router/modules/dataInventory.ts
View file @
25ff483
...
...
@@ -280,6 +280,17 @@ const routes: RouteRecordRaw[] = [
cache
:
true
},
},
{
path
:
'/data-inventory/data-dictionary/import-file'
,
name
:
'importFile'
,
component
:
()
=>
import
(
'@/views/importFile.vue'
),
meta
:
{
title
:
'文件导入'
,
sidebar
:
false
,
breadcrumb
:
false
,
cache
:
true
},
},
],
},
{
...
...
src/views/data_inventory/dictFileds.vue
View file @
25ff483
...
...
@@ -170,7 +170,7 @@ const toolBtnClick = (btn) => {
cacheStore
.
setCatch
(
'uploadSetting'
,
info
)
nextTick
(()
=>
{
router
.
push
({
path
:
'/data-
standards
/import-file'
,
path
:
'/data-
inventory/data-dictionary
/import-file'
,
});
})
}
else
if
(
type
==
'submit'
)
{
...
...
src/views/importFile.vue
View file @
25ff483
...
...
@@ -25,6 +25,9 @@ import {
getDownFileSignByUrl
,
obsDownloadRequest
}
from
'@/api/modules/obsService'
;
import
{
getDictionaryTree
}
from
'@/api/modules/dataInventory'
;
import
{
commonPageConfig
}
from
'@/utils/enum'
;
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -44,9 +47,9 @@ const tabsActiveName = ref('')
const
uploadSetting
:
any
=
ref
({})
const
importType
=
ref
(
''
)
const
defaulttabs
=
[
{
label
:
'标准集导入'
,
name
:
'standard'
},
{
label
:
'字段标准导入'
,
name
:
'field'
},
{
label
:
'命名标准导入'
,
name
:
'naming'
},
//
{ label: '标准集导入', name: 'standard' },
//
{ label: '字段标准导入', name: 'field' },
//
{ label: '命名标准导入', name: 'naming' },
{
label
:
'数据字典导入'
,
name
:
'dictionary'
},
// { label: '质量模型导入', name: 'qualityModelGroup' },
// { label: '质量规则导入', name: 'qualityRule' },
...
...
@@ -135,23 +138,23 @@ const dialogInfo: any = ref({
})
// // 获取所有数据字典
//
const getDictList = () => {
//
const params = {
// paramCode: 'data_structure_code
'
//
}
//
getDictionaryTree(params).then((res: any) => {
//
if (res.code == proxy.$passCode) {
//
const data = res.data ?? []
//
const treeList = data.filter(item => item.children && item.children.length)
//
dictionaryList.value = treeList
//
} else {
//
ElMessage({
//
type: 'error',
//
message: res.msg,
//
})
//
}
//
})
//
}
const
getDictList
=
()
=>
{
const
params
=
{
paramCode
:
'数据字典类型
'
}
getDictionaryTree
(
params
).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
const
data
=
res
.
data
??
[]
const
treeList
=
data
.
filter
(
item
=>
item
.
children
&&
item
.
children
.
length
)
dictionaryList
.
value
=
treeList
}
else
{
ElMessage
({
type
:
'error'
,
message
:
res
.
msg
,
})
}
})
}
const
tabsChange
=
(
name
)
=>
{
tabsActiveName
.
value
=
name
...
...
@@ -658,10 +661,11 @@ onActivated(() => {
if
(
isfileImport
)
{
tabsActiveName
.
value
=
'importFile'
}
else
{
tabsActiveName
.
value
=
uploadSetting
.
value
?.
type
||
'standard'
tabsActiveName
.
value
=
uploadSetting
.
value
?.
type
||
'dictionary'
}
if
(
tabsActiveName
.
value
==
'dictionary'
)
{
getDictList
();
}
//getDictList()
setUploadInfo
()
})
...
...
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