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
ae92c7d6
authored
2025-06-19 17:25:01 +0800
by
fanguang
Committed by
lihua
2025-06-20 09:33:12 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
标注代码表导入
1 parent
193e9c24
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
22 deletions
src/router/modules/dataMeta.ts
src/views/data_meta/components/dictFileds.vue
src/views/data_meta/standard-codetable.vue
src/views/data_meta/standard-import.vue
src/router/modules/dataMeta.ts
View file @
ae92c7d
...
...
@@ -258,6 +258,17 @@ const routes: RouteRecordRaw[] = [
breadcrumb
:
false
,
cache
:
true
}
},
{
path
:
'standard-import'
,
name
:
'metadataStandardImport'
,
component
:
()
=>
import
(
'@/views/data_meta/standard-import.vue'
),
meta
:
{
title
:
'标准代码导入'
,
breadcrumb
:
false
,
cache
:
true
,
activeMenu
:
'/data-meta/metadata-standard/standard-codetable'
}
}
]
}
...
...
src/views/data_meta/components/dictFileds.vue
View file @
ae92c7d
...
...
@@ -26,6 +26,7 @@ const { proxy } = getCurrentInstance() as any;
const
cacheStore
=
useCatchStore
()
const
standardGuid
=
ref
(
""
)
const
standardName
=
ref
(
''
)
const
tableSearchInput
=
ref
(
''
)
const
tableFields
:
any
=
ref
([])
const
orginData
:
any
=
ref
([])
...
...
@@ -156,19 +157,17 @@ const tablePageChange = (info) => {
};
const
toolBtnClick
=
(
btn
)
=>
{
console
.
log
(
'btnType'
,
btn
)
const
type
=
btn
.
value
if
(
type
==
'export'
)
{
exportData
()
}
else
if
(
type
==
'import'
)
{
const
info
=
{
type
:
'dictionary'
,
standardGuid
:
standardGuid
.
value
}
const
info
=
[
{
standardGuid
:
standardGuid
.
value
,
standardName
:
standardName
.
value
}
]
cacheStore
.
setCatch
(
'uploadSetting'
,
info
)
nextTick
(()
=>
{
router
.
push
({
path
:
'/data-
inventory/data-dictionary/import-file
'
,
path
:
'/data-
meta/metadata-standard/standard-import
'
,
});
})
}
else
if
(
type
==
'submit'
)
{
...
...
@@ -537,6 +536,7 @@ const dialogBtnClick = (btn, info) => {
defineExpose
({
standardGuid
,
standardName
,
getFirstPageData
,
checkSave
});
...
...
src/views/data_meta/standard-codetable.vue
View file @
ae92c7d
...
...
@@ -38,6 +38,7 @@ import {
checkDictionaryData
,
getNewDataTypeList
}
from
'@/api/modules/dataInventory'
;
import
router
from
'@/router'
const
{
proxy
}
=
getCurrentInstance
()
as
any
;
...
...
@@ -103,6 +104,7 @@ const page = ref({
],
});
const
selectRowData
=
ref
([])
const
selectedRowData
=
ref
([])
const
tableInfo
:
any
=
ref
({
id
:
'data-source-table'
,
multiple
:
true
,
...
...
@@ -140,6 +142,7 @@ const orginOptions = [
{
label
:
'code'
,
value
:
'code'
},
{
label
:
'name'
,
value
:
'name'
},
]
let
codeOptions
=
ref
([])
const
orginItems
=
[
{
label
:
'标准类型'
,
...
...
@@ -306,18 +309,17 @@ const formItems: any = ref([
required
:
true
},
{
label
:
'编码字段'
,
label
:
'编码字段
11
'
,
type
:
'select'
,
placeholder
:
'请选择'
,
field
:
'codeFields'
,
default
:
[],
options
:
[
{
label
:
'code'
,
value
:
'code'
},
{
label
:
'name'
,
value
:
'name'
}
],
options
:
codeOptions
,
clearable
:
true
,
required
:
true
,
multiple
:
true
multiple
:
true
,
tagsTooltip
:
true
,
filterable
:
true
,
},
{
label
:
'编码名称'
,
...
...
@@ -325,10 +327,7 @@ const formItems: any = ref([
placeholder
:
'请选择'
,
field
:
'codeFieldName'
,
default
:
''
,
options
:
[
{
label
:
'code'
,
value
:
'code'
},
{
label
:
'name'
,
value
:
'name'
}
],
options
:
codeOptions
,
clearable
:
true
,
required
:
true
},
...
...
@@ -759,6 +758,7 @@ const tableSelectionChange = (val, tId) => {
}
}
else
{
selectRowData
.
value
=
val
.
map
((
item
)
=>
item
.
guid
);
selectedRowData
.
value
=
val
}
};
...
...
@@ -789,11 +789,7 @@ const setCodeOptions = () => {
opts
.
push
(
row
)
}
})
formItems
.
value
.
at
(
-
1
).
children
.
map
(
child
=>
{
if
(
child
.
type
==
'select'
)
{
child
.
options
=
opts
}
})
codeOptions
.
value
=
opts
}
const
toolBtnClick
=
(
btn
,
data
)
=>
{
...
...
@@ -1222,7 +1218,7 @@ const loadDrawer = async () => {
drawerInfo
.
value
.
visible
=
true
console
.
log
(
'table'
,
formTable
.
value
)
console
.
log
(
'formInfo'
,
formInfo
)
setCodeOptions
()
};
const
batching
=
(
type
)
=>
{
...
...
@@ -1238,6 +1234,26 @@ const batching = (type) => {
open
(
"此操作将永久删除, 是否继续?"
,
"warning"
,
true
);
tableInfo
.
value
.
loading
=
false
}
if
(
type
==
'export'
)
{
if
(
selectRowData
.
value
.
length
==
0
)
{
ElMessage
({
type
:
'error'
,
message
:
'请选择代码名称'
,
})
return
}
// console.log(selectedRowData)
let
uploadSetting
=
selectedRowData
.
value
.
map
(
item
=>
{
return
{
standardName
:
item
.
codeName
,
standardGuid
:
item
.
guid
}
})
cacheStore
.
setCatch
(
'uploadSetting'
,
uploadSetting
)
router
.
push
({
path
:
'/data-meta/metadata-standard/standard-import'
,
});
}
};
const
nodeClick
=
(
data
)
=>
{
...
...
@@ -1251,6 +1267,7 @@ const nodeClick = (data) => {
showFiledsPage
.
value
=
true
nextTick
(()
=>
{
dictFiledsRef
.
value
.
standardGuid
=
data
.
value
dictFiledsRef
.
value
.
standardName
=
data
.
label
dictFiledsRef
.
value
.
getFirstPageData
()
})
}
else
{
...
...
@@ -1354,6 +1371,7 @@ const setDetailInfo = () => {
drawerInfo
.
value
.
container
.
contents
=
contents
.
value
[
'add'
]
drawerInfo
.
value
.
visible
=
true
setCodeOptions
()
}
const
saveData
=
async
(
params
)
=>
{
...
...
@@ -1504,6 +1522,7 @@ onMounted(() => {
<div
class=
"tools_btns"
>
<el-button
type=
"primary"
@
click=
"loadDrawer"
v-preReClick
>
新建
</el-button>
<el-button
@
click=
"batching('delete')"
v-preReClick
>
批量删除
</el-button>
<el-button
@
click=
"batching('export')"
v-preReClick
>
批量导入
</el-button>
</div>
<el-input
class=
"table_search_input"
v-model
.
trim=
"tableSearchInput"
placeholder=
"请输入代码名称搜索"
:suffix-icon=
"Search"
clearable
@
change=
"val => getFirstPageData()"
/>
...
...
src/views/data_meta/standard-import.vue
0 → 100644
View file @
ae92c7d
This diff is collapsed.
Click to expand it.
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