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
975c6e0b
authored
2025-01-06 13:16:13 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_20241202_xukangle' into develop
2 parents
0eaaaefc
ae104e1a
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
97 additions
and
68 deletions
.env.development
src/api/modules/dataInventory.ts
src/views/data_asset/registerCatalogCreate.vue
src/views/data_asset/registerCatalogManagement.vue
src/views/data_asset/registerStart.vue
src/views/data_inventory/classifyGradeCatalogue.vue
src/views/data_inventory/configureRules.vue
src/views/data_inventory/tableCreateExisting.vue
.env.development
View file @
975c6e0
...
...
@@ -59,6 +59,7 @@ VITE_API_MESSAGE = ms-swzl-message-notification-service
VITE_API_NEW_PORTAL = ms-daop-zcgl-asset-dam-service
# 是否在打包时生成 sourcemap
VITE_BUILD_SOURCEMAP = false
# 是否在打包时开启压缩,支持 gzip 和 brotli
...
...
src/api/modules/dataInventory.ts
View file @
975c6e0
...
...
@@ -788,7 +788,7 @@ export const exportDbDirTable = (params) => request({
*
*/
export
const
getDbDirDetail
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/db-dir/detail?tableGuid=
${
params
.
tableGuid
}
`
,
url
:
`
${
import
.
meta
.
env
.
VITE_APP_CHECK_BASEURL
}
/db-dir/detail?tableGuid=
${
params
.
tableGuid
}
&execGuid=
${
params
.
execGuid
}
`
,
method
:
'get'
,
})
...
...
src/views/data_asset/registerCatalogCreate.vue
View file @
975c6e0
...
...
@@ -575,9 +575,8 @@ onBeforeMount(() => {
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
.
data
||
[];
baseInfoFormItems
.
value
[
1
].
options
=
damTypes
.
value
;
// let item = baseInfoFormItems.value.find(item => item.field == 'damType');
// item && (item.options = damTypes.value);
let
item
=
baseInfoFormItems
.
value
.
find
(
item
=>
item
.
field
==
'damType'
);
item
&&
(
item
.
options
=
damTypes
.
value
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
...
...
@@ -586,11 +585,9 @@ onBeforeMount(() => {
dictType
:
"数据资产目录主题名称"
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
subjectDomainListData
.
value
=
res
.
data
||
[];
replaceChildDictListKey
(
subjectDomainListData
.
value
);
baseInfoFormItems
.
value
[
3
].
options
=
replaceChildDictListKey
(
subjectDomainListData
.
value
);
// let item = baseInfoFormItems.value.find(item => item.field == 'subjectDomain');
// item && (item.options = subjectDomainListData.value);
subjectDomainListData
.
value
=
replaceChildDictListKey
(
res
.
data
)
||
[];
let
item
=
baseInfoFormItems
.
value
.
find
(
item
=>
item
.
field
==
'subjectDomain'
);
item
&&
(
item
.
options
=
subjectDomainListData
.
value
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
...
...
src/views/data_asset/registerCatalogManagement.vue
View file @
975c6e0
...
...
@@ -222,9 +222,8 @@ onBeforeMount(() => {
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
.
data
||
[];
searchItemList
.
value
[
1
].
options
=
damTypes
.
value
;
// let item = searchItemList.value.find(item => item.field == 'damType');
// item && (item.options = damTypes.value);
let
item
=
searchItemList
.
value
.
find
(
item
=>
item
.
field
==
'damType'
);
item
&&
(
item
.
options
=
damTypes
.
value
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
...
...
@@ -233,11 +232,9 @@ onBeforeMount(() => {
dictType
:
"数据资产目录主题名称"
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
subjectDomainListData
.
value
=
res
.
data
||
[];
replaceChildDictListKey
(
subjectDomainListData
.
value
);
searchItemList
.
value
[
2
].
options
=
replaceChildDictListKey
(
subjectDomainListData
.
value
);
// let item = searchItemList.value.find(item => item.field == 'subjectDomain');
// item && (item.options = subjectDomainListData.value);
subjectDomainListData
.
value
=
replaceChildDictListKey
(
res
.
data
)
||
[];
let
item
=
searchItemList
.
value
.
find
(
item
=>
item
.
field
==
'subjectDomain'
);
item
&&
(
item
.
options
=
subjectDomainListData
.
value
);
}
else
{
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
...
...
src/views/data_asset/registerStart.vue
View file @
975c6e0
...
...
@@ -59,7 +59,7 @@ const parentAreaData: any = ref([]);
const
getArea1
=
(
node
,
resolve
)
=>
{
const
{
level
}
=
node
let
params
=
{
parent
I
d
:
node
.
value
parent
Gui
d
:
node
.
value
}
if
(
!
node
.
value
)
{
if
(
getParentAreaPromise
.
value
)
{
...
...
@@ -108,7 +108,7 @@ const getArea1 = (node, resolve) => {
const
getArea
=
(
node
,
resolve
)
=>
{
const
{
level
}
=
node
let
params
=
{
parent
I
d
:
node
.
value
parent
Gui
d
:
node
.
value
}
if
(
!
node
.
value
)
{
if
(
getParentAreaPromise
.
value
)
{
...
...
@@ -324,18 +324,18 @@ const getRegisterCatalogListData = () => {
if
(
res
.
code
==
proxy
.
$passCode
)
{
baseFormItems
.
value
[
0
].
options
=
registerCatalogList
.
value
=
res
.
data
||
[]
let
dataScaleItem
=
baseFormItems
.
value
.
find
(
item
=>
item
.
field
==
'dataScale'
);
if
(
draftDetailInfo
.
value
.
damGuid
)
{
let
da
=
registerCatalogList
.
value
.
find
(
r
=>
r
.
guid
==
draftDetailInfo
.
value
.
damGuid
);
if
(
da
&&
da
.
dataCount
!=
null
)
{
dataScaleItem
.
disabled
=
true
;
if
(
draftDetailInfo
.
value
.
dataScale
==
null
)
{
draftDetailInfo
.
value
.
dataScale
=
da
.
dataCount
;
setBaseFormItemsValue
(
draftDetailInfo
.
value
);
}
}
else
{
dataScaleItem
.
disabled
=
false
;
if
(
draftDetailInfo
.
value
.
damGuid
)
{
let
da
=
registerCatalogList
.
value
.
find
(
r
=>
r
.
guid
==
draftDetailInfo
.
value
.
damGuid
);
if
(
da
&&
da
.
dataCount
!=
null
)
{
dataScaleItem
.
disabled
=
true
;
if
(
draftDetailInfo
.
value
.
dataScale
==
null
)
{
draftDetailInfo
.
value
.
dataScale
=
da
.
dataCount
;
setBaseFormItemsValue
(
draftDetailInfo
.
value
);
}
}
else
{
dataScaleItem
.
disabled
=
false
;
}
}
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
...
...
@@ -525,7 +525,9 @@ onBeforeMount(() => {
ElMessage
.
error
(
res
.
msg
);
}
})
getDamTypesList
().
then
((
res
:
any
)
=>
{
getDamTypesList
({
dictType
:
"资产类型"
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
damTypes
.
value
=
res
.
data
||
[];
let
item
=
baseFormItems
.
value
.
find
(
item
=>
item
.
field
==
'damType'
);
...
...
@@ -542,9 +544,11 @@ onBeforeMount(() => {
proxy
.
$ElMessage
.
error
(
res
.
msg
);
}
})
getSubjectDoaminList
().
then
((
res
:
any
)
=>
{
getSubjectDoaminList
({
dictType
:
"数据资产目录主题名称"
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
subjectDomainListData
.
value
=
re
s
.
data
||
[];
subjectDomainListData
.
value
=
re
placeChildDictListKey
(
res
.
data
)
||
[];
let
item
=
baseFormItems
.
value
.
find
(
item
=>
item
.
field
==
'subjectDomain'
);
item
&&
(
item
.
options
=
subjectDomainListData
.
value
);
}
else
{
...
...
@@ -553,6 +557,18 @@ onBeforeMount(() => {
})
});
function
replaceChildDictListKey
(
data
)
{
if
(
Array
.
isArray
(
data
))
{
return
data
.
map
(
item
=>
replaceChildDictListKey
(
item
));
}
else
if
(
data
&&
typeof
data
===
'object'
)
{
const
{
childDictList
,
...
rest
}
=
data
;
return
{
...
rest
,
children
:
childDictList
?
replaceChildDictListKey
(
childDictList
)
:
undefined
,
};
}
return
data
;
}
const
tabsInfo
=
ref
({
visible
:
false
,
activeName
:
"baseInfo"
,
...
...
@@ -618,8 +634,8 @@ const baseFormItems: any = ref([
default
:
''
,
options
:
damTypes
.
value
,
props
:
{
value
:
'paramValue'
,
label
:
'paramName'
label
:
"label"
,
value
:
"value"
,
},
required
:
true
,
visible
:
true
...
...
@@ -633,8 +649,8 @@ const baseFormItems: any = ref([
checkStrictly
:
false
,
//只能选择叶子节点。
lazy
:
false
,
props
:
{
label
:
"
paramName
"
,
value
:
"
paramV
alue"
,
label
:
"
label
"
,
value
:
"
v
alue"
,
},
filterable
:
true
,
clearable
:
true
,
...
...
@@ -649,14 +665,14 @@ const baseFormItems: any = ref([
regexp
:
/
\D
/g
,
default
:
''
,
required
:
true
},
{
label
:
"数据时间范围"
,
type
:
"date-picker"
,
field
:
"dateRange"
,
default
:
null
,
placeholder
:
"开始时间~结束时间"
,
clearable
:
true
,
required
:
true
,
},
{
label
:
"数据时间范围"
,
type
:
"date-picker"
,
field
:
"dateRange"
,
default
:
null
,
placeholder
:
"开始时间~结束时间"
,
clearable
:
true
,
required
:
true
,
},
{
label
:
'病例总数(例)'
,
type
:
'input'
,
...
...
@@ -666,7 +682,7 @@ const baseFormItems: any = ref([
regexp
:
/
\D
/g
,
default
:
''
,
required
:
false
},
{
},
{
label
:
'数据覆盖地域'
,
type
:
'checkbox-select'
,
placeholder
:
'全国'
,
...
...
@@ -709,7 +725,7 @@ const baseFormItems: any = ref([
placeholder
:
'请选择'
,
field
:
'exchangeGuid'
,
default
:
''
,
// col: 'mr8',
// col: 'mr8',
options
:
currTenantChanged
.
value
,
props
:
{
value
:
'serviceTenantGuid'
,
...
...
@@ -803,7 +819,7 @@ const baseFormItems: any = ref([
}
],
required
:
true
,
},
{
},
{
label
:
"数据分类"
,
type
:
"radio-group"
,
placeholder
:
""
,
...
...
src/views/data_inventory/classifyGradeCatalogue.vue
View file @
975c6e0
...
...
@@ -220,9 +220,19 @@ const toSearch = (val: any, clear: boolean = false) => {
selectedB
.
value
=
null
;
selectedC
.
value
=
null
;
searchItemList
.
value
.
map
(
item
=>
item
.
default
=
''
)
console
.
log
(
'clear'
,
CgDirTreeList
.
value
);
treeInfo
.
value
.
expandedKey
=
[];
currentPath
.
value
=
[
CgDirTreeList
.
value
[
0
].
classifyName
];
treeInfo
.
value
.
expandedKey
.
push
(
CgDirTreeList
.
value
[
0
].
classifyDetailGuid
);
treeInfo
.
value
.
currentNodeKey
=
CgDirTreeList
.
value
[
0
].
classifyDetailGuid
;
console
.
log
(
'clear'
,
treeInfo
.
value
.
expandedKey
,
clear
);
getCgDirFieldPage
({
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
CgDirTreeList
.
value
[
0
].
classifyDetailGuid
,
});
}
console
.
log
(
'toSearch'
,
val
,
classifyDetailGuidInfo
.
value
);
if
(
activeName
.
value
===
'first'
)
{
if
(
activeName
.
value
===
'first'
&&
!
clear
)
{
getCgDirFieldPage
({
pageIndex
:
1
,
pageSize
:
50
,
...
...
@@ -277,6 +287,7 @@ const nodeClick = async (data: any) => {
await
getCgDirFieldPage
({
execGuid
:
execGuidInfo
.
value
.
execGuid
,
classifyDetail
:
classifyDetailGuid
,
gradeDetailGuid
:
levelGuidInfo
.
value
,
});
// 递归tempData找到所有祖先元素的standardName,存入currentPath中
const
path
=
findPath
(
CgDirTreeList
.
value
,
guid
);
...
...
@@ -831,7 +842,7 @@ const handleTreeItemMenuClick = (data: any, type) => {
// tab切换
const
activeName
=
ref
(
'first'
);
const
handleClick
=
(
tab
:
any
)
=>
{
const
handleClick
=
async
(
tab
:
any
)
=>
{
// 切换时选中的配置业务规则清空
selectedRulesData
.
value
=
{};
console
.
log
(
tab
.
props
.
name
);
...
...
@@ -850,9 +861,9 @@ const handleClick = (tab: any) => {
optionsA
.
value
=
[];
optionsB
.
value
=
[];
optionsC
.
value
=
[];
getDataBaseTreeData
();
getDataBaseTableData
();
getDataBaseFieldData
();
await
getDataBaseTreeData
();
await
getDataBaseTableData
();
await
getDataBaseFieldData
();
getDbDirTableSelectData
(
1
,
{});
}
else
{
searchItemList
.
value
[
0
].
visible
=
true
;
...
...
@@ -1019,7 +1030,7 @@ const tableFieldsDataInfo = ref({
{
label
:
"表中文名"
,
field
:
"tableChName"
,
width
:
140
,
},
{
label
:
"数据库名称"
,
field
:
"database"
,
width
:
120
},
{
label
:
"数据库中文名"
,
field
:
"databaseChName"
,
width
:
TableColumnWidth
.
DATETIME
},
{
label
:
"分类"
,
field
:
"classifyDetailName
"
,
width
:
120
,
align
:
'left'
},
{
label
:
"分类"
,
field
:
"classifyDetailName
Routes"
,
width
:
120
,
align
:
'left'
,
getName
:
(
scope
)
=>
{
return
scope
.
row
.
classifyDetailNameRoutes
.
join
(
'/'
)
}
},
{
label
:
"分级"
,
field
:
"gradeDetailName"
,
width
:
120
,
align
:
'left'
},
// { label: "标签", field: "label", width: 120, align: 'center' },
],
...
...
@@ -1359,10 +1370,7 @@ const labelGuidInfo = ref('');
const
levelGuidInfo
=
ref
(
''
);
// 标签选择
const
selectChange
=
(
val
,
row
,
info
)
=>
{
console
.
log
(
'selectChange'
,
val
,
row
,
info
);
if
(
info
.
classifyName
==
undefined
)
{
classifyDetailGuidInfo
.
value
=
''
;
}
if
(
info
)
{
labelGuidInfo
.
value
=
info
.
labelName
;
levelGuidInfo
.
value
=
info
.
levelName
;
...
...
@@ -1388,6 +1396,7 @@ onActivated(async () => {
});
const
treeSelectNodeClick
=
(
node
,
item
)
=>
{
classifyDetailGuidInfo
.
value
=
node
.
classifyDetailGuid
;
treeInfo
.
value
.
expandedKey
=
[];
treeInfo
.
value
.
expandedKey
.
push
(
node
.
classifyDetailGuid
);
treeInfo
.
value
.
currentNodeKey
=
node
.
classifyDetailGuid
;
...
...
src/views/data_inventory/configureRules.vue
View file @
975c6e0
...
...
@@ -369,9 +369,10 @@ const cancelEdit = (row) => {
</
template
>
</el-table-column>
<!-- 分类(不可编辑)classifyName -->
<el-table-column
prop=
"classifyDetailName"
label=
"分类"
width=
"120"
show-overflow-tooltip
>
<el-table-column
prop=
"classifyDetailName
Routes
"
label=
"分类"
width=
"120"
show-overflow-tooltip
>
<
template
#
default=
"scope"
>
{{
scope
.
row
.
classifyDetailName
?
scope
.
row
.
classifyDetailName
:
'--'
}}
{{
Array
.
isArray
(
scope
.
row
.
classifyDetailNameRoutes
)
?
scope
.
row
.
classifyDetailNameRoutes
.
join
(
'/'
)
:
'--'
}}
</
template
>
</el-table-column>
<!-- 分级(不可编辑) -->
...
...
@@ -397,7 +398,8 @@ const cancelEdit = (row) => {
<span
v-if=
"!scope.row.isEdit"
>
{{
scope
.
row
.
fieldLengthCondition
?
scope
.
row
.
fieldLengthCondition
.
replace
(
'#'
,
''
)
:
'--'
}}
</span>
<div
v-else
>
<el-select
v-model=
"scope.row.lengthSymbol"
placeholder=
"请选择"
style=
"width: 50%;margin-right: 8px;"
>
<el-select
v-model=
"scope.row.lengthSymbol"
placeholder=
"请选择"
style=
"width: 50%;margin-right: 8px;"
clearable
>
<el-option
label=
"大于"
value=
">"
></el-option>
<el-option
label=
"等于"
value=
"="
></el-option>
<el-option
label=
"小于"
value=
"
<
">
</el-option>
...
...
@@ -412,7 +414,7 @@ const cancelEdit = (row) => {
<
template
#
default=
"scope"
>
<span
v-if=
"!scope.row.isEdit || !editableFields.fieldPrecision"
>
{{
scope
.
row
.
fieldPrecision
?
scope
.
row
.
fieldPrecision
:
'--'
}}
</span>
<el-input
v-else
v-model=
"scope.row.fieldPrecision"
placeholder=
"请输入精度"
/>
<el-input
v-else
v-model=
"scope.row.fieldPrecision"
placeholder=
"请输入精度"
clearable
/>
</
template
>
</el-table-column>
...
...
@@ -421,7 +423,7 @@ const cancelEdit = (row) => {
<
template
#
default=
"scope"
>
<span
v-if=
"!scope.row.isEdit"
>
{{
scope
.
row
.
dictionaryGuid
?
dictionaryList
.
find
((
item
:
any
)
=>
item
.
guid
===
scope
.
row
.
dictionaryGuid
)?.
chName
:
'--'
}}
</span>
<el-select
v-else
v-model=
"scope.row.dictionaryGuid"
placeholder=
"请选择"
>
<el-select
v-else
v-model=
"scope.row.dictionaryGuid"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in dictionaryList"
:key=
"item?.guid"
:label=
"item.chName"
:value=
"item.guid"
/>
</el-select>
</
template
>
...
...
@@ -434,7 +436,7 @@ const cancelEdit = (row) => {
<span
v-if=
"!scope.row.isEdit || !editableFields.isUnique"
>
{{
scope
.
row
.
isUnique
?
(
scope
.
row
.
isUnique
===
'Y'
?
'是'
:
'否'
)
:
'--'
}}
</span>
<el-select
v-else
v-model=
"scope.row.isUnique"
placeholder=
"请选择"
>
<el-select
v-else
v-model=
"scope.row.isUnique"
placeholder=
"请选择"
clearable
>
<el-option
label=
"是"
value=
"Y"
/>
<el-option
label=
"否"
value=
"N"
/>
</el-select>
...
...
@@ -445,7 +447,7 @@ const cancelEdit = (row) => {
<
template
#
default=
"scope"
>
<span
v-if=
"!scope.row.isEdit"
>
{{
scope
.
row
.
notNull
?
(
scope
.
row
.
notNull
===
'Y'
?
'是'
:
'否'
)
:
'--'
}}
</span>
<el-select
v-else
v-model=
"scope.row.notNull"
placeholder=
"请选择"
>
<el-select
v-else
v-model=
"scope.row.notNull"
placeholder=
"请选择"
clearable
>
<el-option
label=
"是"
value=
"Y"
/>
<el-option
label=
"否"
value=
"N"
/>
</el-select>
...
...
@@ -462,9 +464,9 @@ const cancelEdit = (row) => {
</span>
<!-- 编辑模式,显示两个输入框 -->
<div
v-else
style=
"display: flex; gap: 5px; align-items: center;"
>
<el-input
v-model=
"scope.row.rangeStart"
placeholder=
"最小值"
style=
"width: 45%;"
type=
"number"
/>
<el-input
v-model=
"scope.row.rangeStart"
placeholder=
"最小值"
style=
"width: 45%;"
type=
"number"
clearable
/>
<span>
-
</span>
<el-input
v-model=
"scope.row.rangeEnd"
placeholder=
"最大值"
style=
"width: 45%;"
type=
"number"
/>
<el-input
v-model=
"scope.row.rangeEnd"
placeholder=
"最大值"
style=
"width: 45%;"
type=
"number"
clearable
/>
</div>
</
template
>
</el-table-column>
...
...
@@ -484,8 +486,8 @@ const cancelEdit = (row) => {
</el-table>
</div>
<div
class=
"botton_btn"
>
<el-button
type=
"primary"
@
click=
"saveData"
:loading=
"loading"
>
保存
</el-button>
<el-button
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"saveData"
:loading=
"loading"
>
保存
</el-button>
</div>
</div>
...
...
@@ -518,5 +520,11 @@ const cancelEdit = (row) => {
height
:
36px
;
}
}
.botton_btn
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
}
</
style
>
...
...
src/views/data_inventory/tableCreateExisting.vue
View file @
975c6e0
...
...
@@ -187,7 +187,8 @@ onMounted(async () => {
tableFieldsLoading
.
value
=
true
;
stepsInfo
.
value
.
step
=
1
;
getDbDirDetail
({
tableGuid
:
route
.
query
.
tableGuid
tableGuid
:
route
.
query
.
tableGuid
,
execGuid
:
route
.
query
.
execGuid
,
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
==
proxy
.
$passCode
)
{
editInfoData
.
value
=
res
.
data
;
...
...
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