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
ad7b5b62
authored
2025-02-20 14:58:10 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
b55e7c13
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
19 deletions
src/api/modules/dataAsset.ts
src/views/data_asset/importTableField.vue
src/views/data_inventory/dictionary.vue
src/api/modules/dataAsset.ts
View file @
ad7b5b6
...
...
@@ -446,3 +446,9 @@ export const getApiInvokeCount = (data) => request({
// method: 'get',
// params
// })
export
const
chTransformEn
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_COMMON_URL
}
/common/convert-field-ch-name`
,
method
:
"post"
,
data
:
params
,
});
\ No newline at end of file
...
...
src/views/data_asset/importTableField.vue
View file @
ad7b5b6
...
...
@@ -5,7 +5,8 @@
<
script
lang=
"ts"
setup
name=
"importTableField"
>
import
{
ref
}
from
'vue'
;
import
{
getParamsList
getParamsList
,
chTransformEn
}
from
"@/api/modules/dataAsset"
;
import
{
pinyin
}
from
'pinyin-pro'
;
import
useUserStore
from
"@/store/modules/user"
;
...
...
@@ -140,24 +141,41 @@ const changeStep = (val) => {
getParamsListData
();
}
if
(
!
tableCreateInfo
.
value
.
damCatalogTableField
.
length
)
{
tableCreateInfo
.
value
.
damCatalogTableField
=
fileTableFields
.
value
.
map
(
field
=>
{
let
enName
=
pinyin
(
field
.
chName
,
{
pattern
:
'first'
,
separator
:
''
,
toneType
:
'none'
});
let
index
=
enName
.
indexOf
(
"("
)
||
enName
.
indexOf
(
"("
)
||
enName
.
indexOf
(
'['
)
||
enName
.
indexOf
(
'【'
)
||
enName
.
indexOf
(
':'
)
||
enName
.
indexOf
(
':'
);
if
(
index
>
-
1
)
{
enName
=
enName
.
substring
(
0
,
index
);
}
return
{
chName
:
field
.
chName
,
enName
:
enName
,
isPrimary
:
'N'
,
notNull
:
field
.
notNull
||
'N'
,
isEdit
:
true
}
});
let
list
:
any
=
[];
fileTableFields
.
value
.
forEach
(
field
=>
{
list
.
push
(
field
.
chName
)
})
chTransformEn
(
list
).
then
(
res
=>
{
tableCreateInfo
.
value
.
damCatalogTableField
=
res
.
data
.
map
(
field
=>
{
return
{
chName
:
field
.
chName
,
enName
:
field
.
enName
,
isPrimary
:
'N'
,
notNull
:
'N'
,
isEdit
:
true
,
dataType
:
field
.
dataType
,
fieldLength
:
field
.
fieldLength
,
}
})
})
// tableCreateInfo.value.damCatalogTableField = fileTableFields.value.map(field => {
// let enName = pinyin(field.chName, {
// pattern: 'first',
// separator: '',
// toneType: 'none'
// });
// let index = enName.indexOf("(") || enName.indexOf("(") || enName.indexOf('[') || enName.indexOf('【') || enName.indexOf(':') || enName.indexOf(':');
// if (index > -1) {
// enName = enName.substring(0, index);
// }
// return {
// chName: field.chName,
// enName: enName,
// isPrimary: 'N',
// notNull: field.notNull || 'N',
// isEdit: true
// }
// });
}
step
.
value
=
val
;
}
...
...
src/views/data_inventory/dictionary.vue
View file @
ad7b5b6
...
...
@@ -699,6 +699,9 @@ const getTreeData = (needClick = false, currData = {}) => {
});
}
getFirstPageData
()
}
else
{
//处理数据被删除完成,表格没刷新的情况。
tableInfo
.
value
.
data
=
[];
tableInfo
.
value
.
page
.
rows
=
0
;
}
}
else
{
ElMessage
({
...
...
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