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
71d2bb2b
authored
2025-06-26 09:22:58 +0800
by
lihua
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新建数据集
1 parent
8957880b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
5 deletions
src/api/modules/dataMetaService.ts
src/views/data_meta/standard-query.vue
src/api/modules/dataMetaService.ts
View file @
71d2bb2
...
...
@@ -401,3 +401,10 @@ export const getSankeyData = (guid) => request({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_STANDARD_URL
}
/meta-standard/sankey-data?metaStandardGuid=
${
guid
}
`
,
method
:
'get'
})
/** 数仓目录树列表查询 */
export
const
getDataWareCatalogList
=
(
params
)
=>
request
({
url
:
`
${
import
.
meta
.
env
.
VITE_APP_DATA_DELIVERY
}
delivery/ms-daop-data-plan-service/data-catalog-directory/tree-list`
,
method
:
'post'
,
data
:
params
})
\ No newline at end of file
...
...
src/views/data_meta/standard-query.vue
View file @
71d2bb2
...
...
@@ -9,6 +9,7 @@ import Sankey from './components/Sankey.vue';
import
Tree
from
'@/components/Tree/index.vue'
;
import
RelationNetwork
from
'@/components/RelationNetwork/index.vue'
;
import
{
getDataWareCatalogList
,
getMetaStandardTreeList
,
getMetaStandardField
,
getSankeyData
...
...
@@ -17,6 +18,10 @@ import { useRouter, useRoute } from "vue-router";
import
useDataMetaStore
from
"@/store/modules/dataMeta"
import
{
cloneDeep
}
from
'lodash-es'
;
import
{
useValidator
}
from
'@/hooks/useValidator'
;
const
{
required
}
=
useValidator
();
const
router
=
useRouter
();
const
route
=
useRoute
()
...
...
@@ -200,15 +205,113 @@ const handleNodeItemClick = (graph, nodeItem) => {
})
}
const
handleContextMenu
=
(
nodeData
)
=>
{
//TODO,新建引用数据集
window
.
open
(
''
);
const
handleContextMenu
=
(
model
)
=>
{
if
(
model
.
isHaveData
==
'N'
)
{
ElMessage
.
warning
(
'当前标准下无字段,请先添加字段'
);
return
;
}
contextNodeData
.
value
=
model
;
dialogInfo
.
value
.
visible
=
true
;
formItems
.
value
[
0
].
default
=
''
;
getDataWareCatalogList
({}).
then
((
res
:
any
)
=>
{
if
(
res
?.
code
==
proxy
.
$passCode
)
{
dataCatalogList
.
value
=
res
.
data
||
[];
formItems
.
value
[
0
].
options
=
dataCatalogList
.
value
;
}
else
{
ElMessage
.
error
(
res
.
msg
);
}
})
}
onBeforeUnmount
(()
=>
{
relationNetworkRef
.
value
.
destroy
();
})
/** 数仓目录树形列表 */
const
dataCatalogList
=
ref
([{
name
:
'测试'
,
guid
:
'1'
,
children
:
[{
name
:
'cesi'
,
guid
:
'1-1'
}]
}]);
const
formItems
=
ref
([{
label
:
"数仓目录"
,
type
:
"tree-select"
,
placeholder
:
"请选择"
,
field
:
"domainGuid"
,
default
:
''
,
options
:
dataCatalogList
.
value
,
props
:
{
label
:
'name'
,
value
:
'guid'
},
showAllLevels
:
false
,
checkStrictly
:
false
,
//只能选择叶子节点。
lazy
:
false
,
filterable
:
true
,
clearable
:
true
,
required
:
true
,
}]);
const
formRules
=
ref
({
domainGuid
:
[
required
(
'请选择数仓目录'
)],
});
const
dialogInfo
=
ref
({
visible
:
false
,
size
:
400
,
direction
:
"column"
,
header
:
{
title
:
"引用标准新建数据集"
,
},
type
:
''
,
contents
:
[
{
type
:
'form'
,
title
:
''
,
formInfo
:
{
id
:
'select-subject-domain-list'
,
items
:
formItems
.
value
,
rules
:
formRules
.
value
}
}
],
footer
:
{
btns
:
[
{
type
:
"default"
,
label
:
"取消"
,
value
:
"cancel"
},
{
type
:
"primary"
,
label
:
"确定"
,
value
:
"submit"
,
loading
:
false
},
],
},
});
const
contextNodeData
:
any
=
ref
({});
const
selectDataCatalogNodeObj
:
any
=
ref
({});
const
handleTreeSelectNodeChange
=
(
node
,
item
,
nodeObj
)
=>
{
selectDataCatalogNodeObj
.
value
=
nodeObj
;
}
const
dialogBtnClick
=
(
btn
,
info
)
=>
{
if
(
btn
.
value
==
'submit'
)
{
dialogInfo
.
value
.
visible
=
false
;
if
(
selectDataCatalogNodeObj
.
value
.
parent
.
data
.
layereAttribute
==
2
)
{
//维度
window
.
open
(
`
${
import
.
meta
.
env
.
VITE_APP_DATA_DELIVERY
}
data-catalog/data-warehouse/dim-table-create-manual?domainGuid=
${
info
.
domainGuid
}
&domainName=
${
selectDataCatalogNodeObj
.
value
.
data
.
name
}
&metaStandard=
${
contextNodeData
.
value
.
guid
}
`
);
}
else
{
if
(
selectDataCatalogNodeObj
.
value
.
parent
.
data
.
layereAttribute
==
4
)
{
window
.
open
(
`
${
import
.
meta
.
env
.
VITE_APP_DATA_DELIVERY
}
data-catalog/data-warehouse/table-create-manual?domainGuid=
${
info
.
domainGuid
}
&domainName=
${
selectDataCatalogNodeObj
.
value
.
data
.
name
}
&layereAttribute=
${
selectDataCatalogNodeObj
.
value
.
parent
.
data
.
layereAttribute
}
&metaStandard=
${
contextNodeData
.
value
.
guid
}
`
);
}
else
{
window
.
open
(
`
${
import
.
meta
.
env
.
VITE_APP_DATA_DELIVERY
}
data-catalog/data-warehouse/table-create-manual?domainGuid=
${
info
.
domainGuid
}
&domainName=
${
selectDataCatalogNodeObj
.
value
.
data
.
name
}
&metaStandard=
${
contextNodeData
.
value
.
guid
}
`
);
}
}
}
else
if
(
btn
.
value
==
'cancel'
)
{
dialogInfo
.
value
.
visible
=
false
;
}
}
</
script
>
<
template
>
...
...
@@ -225,13 +328,17 @@ onBeforeUnmount(() => {
:tree-data=
"lastClickNode"
v-loading=
"treeDataLoading"
@
nodeItemClick=
"handleNodeItemClick"
@
contextMenu=
"handleContextMenu"
>
</RelationNetwork>
<Sankey
v-show=
"lastClickNode?.guid && !isGraphDisplay && (sankeyNames?.length || sankeyDataLoading)"
v-loading=
"sankeyDataLoading"
:tree-data=
"sankeyData"
:names=
"sankeyNames"
>
<Sankey
v-show=
"lastClickNode?.guid && !isGraphDisplay && (sankeyNames?.length || sankeyDataLoading)"
v-loading=
"sankeyDataLoading"
:tree-data=
"sankeyData"
:names=
"sankeyNames"
>
</Sankey>
<div
v-show=
"!lastClickNode?.guid && !treeInfo.data?.length || (!isGraphDisplay && !sankeyDataLoading && !sankeyNames?.length)"
class=
"main-placeholder"
>
<div
v-show=
"!lastClickNode?.guid && !treeInfo.data?.length || (!isGraphDisplay && !sankeyDataLoading && !sankeyNames?.length)"
class=
"main-placeholder"
>
<img
src=
"../../assets/images/no-data.png"
:style=
"
{ width: '96px', height: '96px' }" />
<div
class=
"empty-text"
>
暂无数据
</div>
</div>
</div>
<Dialog
:dialogInfo=
"dialogInfo"
@
btnClick=
"dialogBtnClick"
@
treeSelectNodeChange=
"handleTreeSelectNodeChange"
/>
</div>
</
template
>
...
...
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