Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
2e74697b
Commit
2e74697b
authored
Nov 15, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
3b562f9e
bbbb3ada
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
840 additions
and
36 deletions
+840
-36
modelrelate.png
src/assets/images/modelrelate.png
+0
-0
modelrelate1.png
src/assets/images/modelrelate1.png
+0
-0
index.ts
src/router/routes/index.ts
+16
-3
account.data.ts
src/views/dataQuality/agentClass/mainBody/account.data.ts
+11
-6
associationRulesModal.vue
...dataQuality/agentClass/mainBody/associationRulesModal.vue
+104
-0
dataQualityMainBodyData.ts
...ataQuality/agentClass/mainBody/dataQualityMainBodyData.ts
+27
-0
index.vue
src/views/dataQuality/agentClass/mainBody/index.vue
+13
-0
mainBodyEdit.vue
src/views/dataQuality/agentClass/mainBody/mainBodyEdit.vue
+75
-1
index.vue
src/views/dataWarehousePlanning/physicalModel/index.vue
+0
-7
index.vue
...dataWarehousePlanning/physicalModel/modelDetail/index.vue
+34
-14
crossModel.vue
...hysicalModel/modelDetail/modelRelationship/crossModel.vue
+59
-0
modelRelationship.vue
...Model/modelDetail/modelRelationship/modelRelationship.vue
+166
-0
relate.data.ts
...hysicalModel/modelDetail/modelRelationship/relate.data.ts
+103
-0
relateData.ts
...physicalModel/modelDetail/modelRelationship/relateData.ts
+10
-0
relateImage.vue
...ysicalModel/modelDetail/modelRelationship/relateImage.vue
+91
-0
data.ts
src/views/metadata/data.ts
+8
-0
index.vue
src/views/metadata/index.vue
+21
-1
tagModal.vue
src/views/metadata/tagModal.vue
+102
-4
No files found.
src/assets/images/modelrelate.png
0 → 100644
View file @
2e74697b
54.5 KB
src/assets/images/modelrelate1.png
0 → 100644
View file @
2e74697b
81.7 KB
src/router/routes/index.ts
View file @
2e74697b
...
...
@@ -206,7 +206,8 @@ export const DataWarehousePlanningRoute: AppRouteRecordRaw = {
{
path
:
'logicalModel/ERchart'
,
name
:
'logicalChartModel'
,
component
:
()
=>
import
(
'@/views/dataWarehousePlanning/logicalModel/modelDetail/ERchart/index.vue'
),
component
:
()
=>
import
(
'@/views/dataWarehousePlanning/logicalModel/modelDetail/ERchart/index.vue'
),
meta
:
{
title
:
'实体关系图'
,
icon
:
''
,
...
...
@@ -245,6 +246,18 @@ export const DataWarehousephysicalModelRoute: AppRouteRecordRaw = {
icon
:
''
,
},
},
{
path
:
'physicalModel/relate'
,
name
:
'relateImage'
,
component
:
()
=>
import
(
'@/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/relateImage.vue'
),
meta
:
{
title
:
'模型关系'
,
icon
:
''
,
},
},
],
};
...
...
@@ -377,7 +390,8 @@ export const DataStandardRoute: AppRouteRecordRaw = {
{
path
:
'IndicatorStandards/basicStandardsContrast'
,
name
:
'basicStandardsContrast1'
,
component
:
()
=>
import
(
'@/views/dataStandards/IndicatorStandards/indicatorStandardsContrast.vue'
),
component
:
()
=>
import
(
'@/views/dataStandards/IndicatorStandards/indicatorStandardsContrast.vue'
),
meta
:
{
title
:
'指标标准对比'
,
icon
:
''
,
...
...
@@ -431,7 +445,6 @@ export const DataStandardRoute: AppRouteRecordRaw = {
],
};
export
const
WorkSpaceRoute
:
AppRouteRecordRaw
=
{
path
:
'/workspace'
,
name
:
'Workspace'
,
...
...
src/views/dataQuality/agentClass/mainBody/account.data.ts
View file @
2e74697b
...
...
@@ -9,11 +9,21 @@ type CheckedType = boolean | string | number;
export
const
columns
:
BasicColumn
[]
=
[
{
title
:
'名称'
,
title
:
'
质量主体
名称'
,
dataIndex
:
'fileName'
,
width
:
150
,
slots
:
{
customRender
:
'fileName'
},
},
{
title
:
'描述'
,
dataIndex
:
'descripe'
,
width
:
150
,
},
{
title
:
'创建者'
,
dataIndex
:
'holder'
,
width
:
150
,
},
{
title
:
'创建时间'
,
dataIndex
:
'createDate'
,
...
...
@@ -24,11 +34,6 @@ export const columns: BasicColumn[] = [
dataIndex
:
'updateDate'
,
width
:
150
,
},
{
title
:
'拥有者'
,
dataIndex
:
'holder'
,
width
:
150
,
},
{
title
:
'原始主体'
,
dataIndex
:
'originalPrincipal'
,
...
...
src/views/dataQuality/agentClass/mainBody/associationRulesModal.vue
0 → 100644
View file @
2e74697b
<
template
>
<BasicModal
v-bind=
"$attrs"
width=
"50%"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
minHeight=
"50"
>
<BasicTable
@
register=
"registerAssociationRulesTable"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
}
from
'vue'
;
import
{
BasicTable
,
FormSchema
,
useTable
}
from
'@/components/Table'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
associationRulesData
}
from
'@/views/dataQuality/agentClass/mainBody/dataQualityMainBodyData'
;
defineOptions
({
name
:
'AccountModal'
});
const
associationData
=
ref
(
associationRulesData
);
const
associationRulesColumns
:
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}[]
=
[
{
title
:
'规则名称'
,
dataIndex
:
'ruleName'
,
width
:
120
,
},
{
title
:
'质量模板'
,
dataIndex
:
'template'
,
width
:
120
,
},
{
title
:
'关联字段'
,
dataIndex
:
'keyField'
,
width
:
120
,
// edit: true,
},
{
title
:
'规则描述'
,
dataIndex
:
'described'
,
width
:
120
,
},
];
const
associationSearchFormSchema
:
FormSchema
[]
=
[
{
field
:
'ruleName'
,
label
:
''
,
componentProps
:
{
placeholder
:
'搜索字段'
,
},
component
:
'Input'
,
colProps
:
{
span
:
5
},
},
];
const
[
registerAssociationRulesTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
associationData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
associationData
.
value
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
return
{
...
response
,
data
:
data
};
},
// dataSource: infoData,
columns
:
associationRulesColumns
,
useSearchForm
:
true
,
pagination
:
false
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
associationSearchFormSchema
,
autoSubmitOnEnter
:
true
,
},
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
handleSearchInfoFn
(
info
)
{
associationData
.
value
=
associationRulesData
.
filter
((
item
)
=>
item
.
ruleName
.
includes
(
info
.
ruleName
),
);
// console.log('info', info);
// console.log('tableData', tableData.value);
return
info
;
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
()
=>
{
setModalProps
({
confirmLoading
:
false
});
});
const
getTitle
=
computed
(()
=>
'查看关联质量规则'
);
async
function
handleSubmit
()
{
closeModal
();
}
</
script
>
src/views/dataQuality/agentClass/mainBody/dataQualityMainBodyData.ts
View file @
2e74697b
...
...
@@ -383,6 +383,33 @@ export const infoData: any[] = [
},
];
export
const
associationRulesData
:
any
[]
=
[
{
ruleName
:
'最低成绩'
,
template
:
'学生成绩校验'
,
keyField
:
'score'
,
described
:
'最低成绩不能低于60'
,
},
{
ruleName
:
'青少年'
,
template
:
'年龄限制'
,
keyField
:
'age'
,
described
:
'年龄小于18'
,
},
{
ruleName
:
'规则1'
,
template
:
'质量模板1'
,
keyField
:
'cloums1'
,
described
:
'规则描述1'
,
},
{
ruleName
:
'规则2'
,
template
:
'质量模板2'
,
keyField
:
'cloums2'
,
described
:
'规则描述2'
,
},
];
export
const
reviewData
:
any
[]
=
[
{
age
:
23
,
...
...
src/views/dataQuality/agentClass/mainBody/index.vue
View file @
2e74697b
...
...
@@ -18,6 +18,10 @@
label: '复制',
onClick: copyButton.bind(null, record),
},
{
label: '关联',
onClick: handleOpenAssociationModal.bind(null, record),
},
{
label: '属性',
onClick: handleEdit.bind(null, record),
...
...
@@ -52,6 +56,7 @@
<CreateMainBodyModal
@
register=
"registerCreateCreateMainBodyModal"
@
success=
"handleSuccess"
/>
<MainBodyEdit
@
register=
"registerMainBodyEditModal"
/>
<StorageManageModal
@
register=
"registerStorageManageModal"
/>
<AssociationRulesModal
@
register=
"registerAssociationModal"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
...
...
@@ -80,6 +85,7 @@
import
CreateMainBodyModal
from
'@/views/dataQuality/agentClass/mainBody/createMainBodyModal.vue'
;
import
MainBodyEdit
from
'@/views/dataQuality/agentClass/mainBody/mainBodyEdit.vue'
;
import
StorageManageModal
from
'@/views/dataQuality/agentClass/mainBody/storageManageModal.vue'
;
import
AssociationRulesModal
from
'@/views/dataQuality/agentClass/mainBody/associationRulesModal.vue'
;
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
...
...
@@ -93,6 +99,7 @@
const
[
registerCreateFileModal
,
{
openModal
:
openCreateFileModal
}]
=
useModal
();
// 新建文件夹弹窗
const
[
registerMainBodyEditModal
,
{
openModal
:
openMainBodyEditModal
}]
=
useModal
();
// 质量主体编辑
const
[
registerStorageManageModal
,
{
openModal
:
openStorageManageModal
}]
=
useModal
();
// 存储管理弹窗
const
[
registerAssociationModal
,
{
openModal
:
OpenAssociationModal
}]
=
useModal
();
// 关联规则弹窗
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([]);
const
[
...
...
@@ -252,6 +259,12 @@
});
}
function
handleOpenAssociationModal
(
record
:
Recordable
)
{
OpenAssociationModal
(
true
,
{
record
,
});
}
/** 删除按钮*/
function
handleDelete
(
record
:
Recordable
)
{
tableData
.
value
.
splice
(
...
...
src/views/dataQuality/agentClass/mainBody/mainBodyEdit.vue
View file @
2e74697b
...
...
@@ -67,7 +67,9 @@
</div>
</a-tab-pane>
<a-tab-pane
key=
"4"
tab=
"关联规则"
>
<div
v-if=
"page === '4'"
>
</div>
<div
v-if=
"page === '4'"
>
<BasicTable
@
register=
"registerAssociationRulesTable"
/>
</div>
</a-tab-pane>
</Tabs>
</div>
...
...
@@ -89,11 +91,13 @@
infoData
,
reviewData
,
TreeData
,
associationRulesData
,
}
from
'@/views/dataQuality/agentClass/mainBody/dataQualityMainBodyData'
;
const
{
createMessage
}
=
useMessage
();
const
page
=
ref
(
'1'
);
const
tableData
=
ref
(
infoData
);
const
associationData
=
ref
(
associationRulesData
);
const
title
=
ref
(
''
);
const
sql
=
ref
(
''
);
let
changeAble
=
ref
(
false
);
...
...
@@ -314,6 +318,76 @@
},
]);
});
const
associationRulesColumns
:
{
dataIndex
:
string
;
width
:
number
;
title
:
string
}[]
=
[
{
title
:
'规则名称'
,
dataIndex
:
'ruleName'
,
width
:
120
,
},
{
title
:
'质量模板'
,
dataIndex
:
'template'
,
width
:
120
,
},
{
title
:
'关联字段'
,
dataIndex
:
'keyField'
,
width
:
120
,
// edit: true,
},
{
title
:
'规则描述'
,
dataIndex
:
'described'
,
width
:
120
,
},
];
const
associationSearchFormSchema
:
FormSchema
[]
=
[
{
field
:
'ruleName'
,
label
:
''
,
componentProps
:
{
placeholder
:
'搜索字段'
,
},
component
:
'Input'
,
colProps
:
{
span
:
5
},
},
];
const
[
registerAssociationRulesTable
]
=
useTable
({
api
:
async
()
=>
{
const
response
=
{
pageNum
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
associationData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
//过滤data中的数据,取出等于params.deptId的数据
var
data
=
[];
data
=
associationData
.
value
.
filter
((
item
)
=>
item
.
parentId
!==
0
);
return
{
...
response
,
data
:
data
};
},
// dataSource: infoData,
columns
:
associationRulesColumns
,
useSearchForm
:
true
,
pagination
:
false
,
formConfig
:
{
labelWidth
:
120
,
schemas
:
associationSearchFormSchema
,
autoSubmitOnEnter
:
true
,
},
showIndexColumn
:
false
,
scroll
:
{
y
:
400
},
handleSearchInfoFn
(
info
)
{
associationData
.
value
=
associationRulesData
.
filter
((
item
)
=>
item
.
ruleName
.
includes
(
info
.
ruleName
),
);
// console.log('info', info);
// console.log('tableData', tableData.value);
return
info
;
},
});
function
handleCancel
()
{
changeAble
.
value
=
false
;
...
...
src/views/dataWarehousePlanning/physicalModel/index.vue
View file @
2e74697b
...
...
@@ -15,13 +15,6 @@
@
click=
"handleMoreCreate"
>
批量建表
</a-button
>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
@
click=
"handleWaitUpload"
>
设为待发布
</a-button
>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
发布
</a-button>
<a-button
type=
"primary"
@
click=
"handleBaseImport"
>
从元数据导入
</a-button>
<a-button
type=
"primary"
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
>
导出
</a-button>
<a-button
type=
"primary"
@
click=
"handleImport"
>
导入
</a-button>
...
...
src/views/dataWarehousePlanning/physicalModel/modelDetail/index.vue
View file @
2e74697b
...
...
@@ -3,15 +3,22 @@
<template
#
extra
>
<a-button
type=
"primary"
v-if=
"!editFlag"
@
click=
"handleCreateTable"
>
自动建表
</a-button>
<a-button
type=
"primary"
v-if=
"!editFlag"
@
click=
"handleVersion"
>
版本管理
</a-button>
<a-button
type=
"primary"
@
click=
"handleRelate"
>
模型关系
</a-button>
<a-button
type=
"primary"
v-if=
"!editFlag"
@
click=
"handleExport"
>
导出
</a-button>
<a-button
type=
"primary"
v-if=
"!editFlag"
@
click=
"handleEdit"
>
编辑
</a-button>
<a-button
type=
"primary"
v-if=
"!editFlag"
>
删除
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
>
编辑记录
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
>
设为待发布
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handlePublish"
>
发布
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleDebug"
>
建表调试
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleSave"
>
保存
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleCancel"
>
取消
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleWaitPub"
>
{{
iswaitPub
?
'设为待发布'
:
'取消待发布'
}}
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handlePublish"
:disabled=
"iswaitPub"
>
发布
</a-button>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleDebug"
:disabled=
"!iswaitPub"
>
建表调试
</a-button
>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleSave"
:disabled=
"!iswaitPub"
>
保存
</a-button
>
<a-button
type=
"primary"
v-if=
"editFlag"
@
click=
"handleCancel"
>
退出编辑
</a-button>
</
template
>
<
template
#
footer
>
...
...
@@ -150,7 +157,9 @@
</BasicForm>
</div>
</Tabs
.TabPane
>
<Tabs
.
TabPane
key=
"3"
v-if=
"!editFlag"
tab=
"模型关系"
/>
<Tabs
.
TabPane
key=
"3"
tab=
"模型关系"
>
<ModelRelationship
/>
</Tabs
.TabPane
>
<Tabs
.
TabPane
key=
"4"
v-if=
"!editFlag"
tab=
"模型关联"
>
<SourceData
style=
"margin-top: 20px"
/>
<LogicalModel
style=
"margin-top: 20px"
/>
...
...
@@ -167,7 +176,7 @@
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
,
ref
,
nextTick
,
computed
,
unref
}
from
'vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
useRoute
,
onBeforeRouteLeave
,
useRouter
}
from
'vue-router'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
Descriptions
,
Select
,
Tabs
}
from
'ant-design-vue'
;
import
DetailInfo
from
'./detailInfo.vue'
;
...
...
@@ -195,8 +204,8 @@
import
SqlDevelop
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/sqlDevelop.vue'
;
import
ModelCreateTable
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/modelCreateTable.vue'
;
import
VersionModel
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/versionModel.vue'
;
import
ModelPublishTable
from
"@/views/dataWarehousePlanning/physicalModel/modelDetail/modelPublishTable.vue"
;
import
ModelPublishTable
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/modelPublishTable.vue'
;
import
ModelRelationship
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/modelRelationship.vue'
;
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerDebugModal
,
{
openModal
:
openDebugModal
}]
=
useModal
();
...
...
@@ -209,6 +218,7 @@
const
route
=
useRoute
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
modelName
=
route
.
query
.
modelName
;
const
{
push
}
=
useRouter
();
/**
* 属性定义
*/
...
...
@@ -216,6 +226,7 @@
const
info
=
reactive
({
...
infoData
});
let
editFlag
=
ref
(
false
);
let
isPublish
=
ref
(
false
);
let
iswaitPub
=
ref
(
true
);
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
108
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
...
...
@@ -239,7 +250,7 @@
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
title
:
''
,
scroll
:
{
y
:
200
},
scroll
:
{
y
:
200
},
api
:
async
(
params
)
=>
{
console
.
log
(
'params:'
,
params
);
const
response
=
{
...
...
@@ -251,7 +262,7 @@
message
:
''
,
data
:
[],
};
return
{
...
response
};
return
{
...
response
};
},
rowKey
:
'businessId'
,
columns
:
columnsDetail
,
...
...
@@ -272,8 +283,6 @@
},
});
/**
* 导出
*/
...
...
@@ -295,6 +304,18 @@
});
}
/** 模型管理*/
function
handleRelate
()
{
push
({
path
:
'/dataWarehousePlanning/physicalModel/relate'
,
});
}
/** 设为待发布*/
function
handleWaitPub
()
{
iswaitPub
.
value
=
!
iswaitPub
.
value
;
}
/** 发布*/
function
handlePublish
()
{
openPublishModal
(
true
,
{
...
...
@@ -334,7 +355,6 @@
*/
function
handleCancel
()
{
editFlag
.
value
=
false
;
tabsKey
.
value
=
'1'
;
}
onMounted
(()
=>
{
setFieldsValue
({
...
infoData
});
...
...
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/crossModel.vue
0 → 100644
View file @
2e74697b
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
unref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
ConnectionModelFormSchema
}
from
'./relate.data'
;
defineOptions
({
name
:
'ModelModal'
});
const
isUpdate
=
ref
(
false
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
ConnectionModelFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
await
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
// 塞值
await
setFieldsValue
({
...
data
.
record
,
});
}
});
const
getTitle
=
computed
(()
=>
isUpdate
.
value
?
'编辑模型关系'
:
'新建模型关系'
,
);
/**确定按钮*/
async
function
handleSubmit
()
{
await
validate
();
closeModal
();
}
</
script
>
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/modelRelationship.vue
0 → 100644
View file @
2e74697b
<
template
>
<div>
<BasicTable
@
register=
"registerTable"
:searchInfo=
"searchInfo"
>
<template
#
toolbar
>
<a-button
:disabled=
"getRowSelection().selectedRowKeys
<
=
0
"
type=
"primary"
@
click=
"handleDelete"
><DeleteTwoTone
/>
删除
</a-button
>
<a-button
type=
"primary"
@
click=
"handleCrossModel"
><PlusCircleTwoTone
/>
新增模型关系
</a-button
>
</
template
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
icon: 'clarity:note-edit-line',
onClick: handleCrossEditModel.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
onClick: handleDelete.bind(null, record),
color: 'error',
},
]"
/>
</
template
>
</template>
</BasicTable>
<CrossModel
@
register=
"crossModal"
@
success=
"crossSuccess"
/>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
onMounted
,
ref
}
from
'vue'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
useRoute
,
onBeforeRouteLeave
}
from
'vue-router'
;
import
{
crossFormSchema
,
crossTable
}
from
'./relate.data'
;
import
{
useFilterStore
}
from
'@/store/modules/filterData'
;
import
{
TreeData
}
from
'@/views/dataWarehousePlanning/logicalModel/modelData'
;
import
{
crossData
}
from
'./relateData'
;
import
{
DeleteTwoTone
,
PlusCircleTwoTone
}
from
'@ant-design/icons-vue'
;
import
CrossModel
from
'./crossModel.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
useMessage
}
from
'@/hooks/web/useMessage'
;
defineOptions
({
name
:
'AccountManagement'
});
const
{
createMessage
,
createConfirm
}
=
useMessage
();
const
filterStore
=
useFilterStore
();
const
route
=
useRoute
();
const
searchInfo
=
reactive
<
Recordable
>
({});
const
tableData
=
ref
([]);
// 模态框
const
[
crossModal
,
{
openModal
}]
=
useModal
();
// 实体新增
function
handleCrossModel
()
{
openModal
(
true
,
{
isUpdate
:
false
,
});
}
// 实体编辑
function
handleCrossEditModel
(
record
:
Recordable
)
{
openModal
(
true
,
{
record
,
isUpdate
:
true
,
});
}
// 模态框保存
function
crossSuccess
({
isUpdate
,
values
})
{
if
(
isUpdate
)
{
// 注意:updateTableDataRecord要求表格的rowKey属性为string并且存在于每一行的record的keys中
//修改表单的值
const
result
=
updateTableDataRecord
(
values
.
businessId
,
values
);
reload
();
}
else
{
tableData
.
value
.
push
(
values
);
reload
();
}
}
const
[
registerTable
,
{
reload
,
updateTableDataRecord
,
getSearchInfo
,
getForm
,
getRowSelection
},
]
=
useTable
({
// 数据
api
:
async
(
params
)
=>
{
console
.
log
(
'params:'
,
params
);
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
crossData
.
length
,
code
:
''
,
message
:
''
,
data
:
crossData
,
};
return
{
...
response
};
},
rowKey
:
'businessId'
,
// 列
columns
:
crossTable
,
rowSelection
:
true
,
showIndexColumn
:
false
,
striped
:
false
,
// 搜索
formConfig
:
{
labelWidth
:
120
,
schemas
:
crossFormSchema
,
autoSubmitOnEnter
:
true
,
showActionButtonGroup
:
false
,
},
useSearchForm
:
true
,
showTableSetting
:
false
,
bordered
:
true
,
handleSearchInfoFn
(
info
)
{
return
info
;
},
actionColumn
:
{
width
:
150
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
/** 删除按钮*/
function
handleDelete
()
{
createConfirm
({
iconType
:
'warning'
,
title
:
'确认删除'
,
content
:
'确认批量删除选中数据吗?'
,
onOk
()
{
createMessage
.
success
(
'批量删除成功!'
);
},
});
}
/** 列表删除 */
function
handleRemove
(
record
)
{
createMessage
.
success
(
'删除成功!'
);
}
onMounted
(()
=>
{
tableData
.
value
=
TreeData
;
const
path
=
route
.
path
;
if
(
filterStore
.
getSearchParams
[
path
])
{
if
(
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]
!==
{}))
{
const
params
=
JSON
.
parse
(
filterStore
.
getSearchParams
[
path
]);
getForm
().
setFieldsValue
({
page
:
params
.
page
,
pageSize
:
params
.
pageSize
,
username
:
params
.
username
,
flag
:
params
.
flag
,
});
searchInfo
.
institutionId
=
params
.
institutionId
;
}
}
});
onBeforeRouteLeave
((
to
,
from
,
next
)
=>
{
next
();
// 允许导航
});
</
script
>
<
style
scoped
lang=
"scss"
>
.vben-basic-table-form-container
{
padding
:
0
;
}
</
style
>
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/relate.data.ts
0 → 100644
View file @
2e74697b
import
{
FormSchema
}
from
"@/components/Form"
;
import
{
BasicColumn
}
from
"@/components/Table"
;
import
{
TreeItem
}
from
"@/components/Tree"
;
export
const
ConnectionModelFormSchema
:
any
[]
=
[
{
field
:
'name'
,
label
:
'关系名称'
,
component
:
'Input'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'fatherName'
,
label
:
'子属性'
,
component
:
'Select'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'fatherPK'
,
label
:
'父模型'
,
component
:
'Select'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'fatherNum'
,
label
:
'父属性'
,
component
:
'Select'
,
required
:
true
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
{
field
:
'comments'
,
label
:
'注释'
,
component
:
'InputTextArea'
,
colProps
:
{
lg
:
24
,
md
:
24
},
},
];
export
const
crossFormSchema
:
FormSchema
[]
=
[
{
field
:
'name'
,
component
:
'Input'
,
componentProps
:
{
placeholder
:
'输入关联关系名称搜索'
,
},
colProps
:
{
span
:
4
},
},
];
export
const
crossTable
:
BasicColumn
[]
=
[
{
title
:
'关系名称'
,
dataIndex
:
'name'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'子属性'
,
dataIndex
:
'sonAttribute'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父模型'
,
dataIndex
:
'fatherModel'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'父属性'
,
dataIndex
:
'fatherAttribute'
,
width
:
150
,
// onEditRow: true,
},
{
title
:
'注释'
,
dataIndex
:
'comments'
,
width
:
150
,
// onEditRow: true,
},
];
export
const
chartTreeData
:
TreeItem
[]
=
[
{
title
:
'物理模型'
,
key
:
'1'
,
children
:
[
{
title
:
'yL_table_orc01'
,
icon
:
'ion:cube-outline'
,
key
:
'3'
},
{
title
:
'yl_table_torc01'
,
icon
:
'ion:cube-outline'
,
key
:
'4'
},
],
},
{
title
:
'模型关联'
,
key
:
'2'
,
children
:
[
{
title
:
'NEW orc_id_torc_id'
,
icon
:
'ion:git-merge-outline'
,
key
:
'5'
},
{
title
:
'orc_id_torc_id'
,
icon
:
'ion:git-merge-outline'
,
key
:
'6'
},
],
},
];
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/relateData.ts
0 → 100644
View file @
2e74697b
export
const
crossData
:
any
[]
=
[
{
businessId
:
'1'
,
name
:
'orc_torc_id'
,
sonAttribute
:
'id'
,
fatherModel
:
'/物理模型/test_catalog/argodb/Argodb/yl_test'
,
fatherAttribute
:
'id'
,
comments
:
'备注'
,
},
];
src/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/relateImage.vue
0 → 100644
View file @
2e74697b
<
template
>
<PageWrapper
title=
"模型关系"
contentBackground
headerSticky
>
<template
#
extra
>
<a-button
type=
"primary"
>
刷新
</a-button>
<a-button
type=
"primary"
>
全屏
</a-button>
<a-button
type=
"primary"
>
退出
</a-button>
</
template
>
<
template
#
footer
>
<div
style=
"display: flex"
>
<div
style=
"flex: 1; display: flex"
>
<div
style=
"flex: 1"
>
<BasicTree
:search=
"123"
:rightMenuList=
"
{ type: [{ label: '123' }] }"
:treeData="chartTreeData"
:fieldNames="{ key: 'key', title: 'title' }"
defaultExpandLevel="1"
@select="handleSelect"
/>
</div>
<a-button
@
click=
"handleAdd"
style=
"margin-left: -10px; margin-top: 6px; border-color: #d9d9d9"
size=
"small"
><PlusOutlined
style=
"color: #9396a4"
/></a-button>
</div>
<div
style=
"flex: 4"
>
<img
v-if=
"modelLevel === '1' || modelLevel === '2'"
src=
"../../../../../assets/images/ERchart.jpg"
class=
"erchart-img"
/>
<img
v-if=
"modelLevel === '3' || modelLevel === '4'"
src=
"../../../../../assets/images/modelrelate.png"
class=
"erchart-img"
/>
<img
v-if=
"modelLevel === '5' || modelLevel === '6'"
src=
"../../../../../assets/images/modelrelate1.png"
class=
"erchart-img"
/>
</div>
</div>
</
template
>
<CrossModel
@
register=
"crossModal"
/>
</PageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
PlusOutlined
}
from
'@ant-design/icons-vue'
;
import
{
PageWrapper
}
from
'@/components/Page'
;
import
{
BasicTree
}
from
'@/components/Tree'
;
import
{
chartTreeData
}
from
'./relate.data'
;
import
CrossModel
from
'@/views/dataWarehousePlanning/physicalModel/modelDetail/modelRelationship/crossModel.vue'
;
import
{
useModal
}
from
'@/components/Modal'
;
import
{
ref
}
from
'vue'
;
// 模态框
const
[
crossModal
,
{
openModal
}]
=
useModal
();
let
modelLevel
=
ref
(
'1'
);
function
handleSelect
(
key
)
{
if
(
key
[
0
]
!==
null
&&
key
[
0
]
!==
undefined
)
{
modelLevel
.
value
=
key
[
0
];
}
else
{
modelLevel
.
value
=
'0'
;
}
}
function
handleAdd
()
{
openModal
(
true
);
}
// const options = [
// {
// label: '全部实体',
// value: '1',
// },
// {
// label: '当前模型实体',
// value: '当前模型实体',
// },
// ];
</
script
>
<
style
scoped
>
.erchart-img
{
height
:
calc
(
100vh
-
200px
);
}
</
style
>
src/views/metadata/data.ts
View file @
2e74697b
...
...
@@ -1152,6 +1152,14 @@ export const tagDataSourceColumns: BasicColumn[] = [
edit
:
true
,
},
];
export
const
tagDataBaseColumns
:
BasicColumn
[]
=
[
{
title
:
'数据库名'
,
dataIndex
:
'name'
,
width
:
120
,
edit
:
true
,
},
];
export
const
tagSourceColumns
:
BasicColumn
[]
=
[
{
title
:
'标签名'
,
...
...
src/views/metadata/index.vue
View file @
2e74697b
...
...
@@ -111,7 +111,27 @@
// 选中节点
async
function
onNodeSelect
(
node
:
any
)
{
selectedNode
.
value
=
node
;
title
.
value
=
node
.
workSpaceName
;
if
(
node
.
workSpaceName
==
'数据源1'
||
node
.
workSpaceName
==
'数据库1'
||
node
.
workSpaceName
==
'数据表1'
)
{
title
.
value
=
'admin-个人工作区'
;
}
else
if
(
node
.
workSpaceName
==
'数据源2'
||
node
.
workSpaceName
==
'数据库2'
||
node
.
workSpaceName
==
'数据表2'
)
{
title
.
value
=
'共享工作区'
;
}
else
if
(
node
.
workSpaceName
==
'数据源3'
||
node
.
workSpaceName
==
'数据库3'
||
node
.
workSpaceName
==
'数据表3'
)
{
title
.
value
=
'高级工作区'
;
}
else
{
title
.
value
=
node
.
workSpaceName
;
}
await
getForm
().
setFieldsValue
({
workSpaceName
:
title
.
value
,
});
...
...
src/views/metadata/tagModal.vue
View file @
2e74697b
...
...
@@ -7,7 +7,30 @@
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
/>
<BasicTable
@
register=
"registerPartitionTable"
>
<BasicTable
v-show=
"!tableChange"
@
register=
"registerPartitionTable"
>
<template
#
toolbar
>
<a-button
type=
"primary"
v-show=
"isCopy"
@
click=
"handDelete"
>
删除
</a-button>
<a-button
type=
"primary"
v-show=
"isCopy"
@
click=
"handleNewSource"
>
添加
</a-button>
</
template
>
<
template
#
bodyCell=
"{ column }"
>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
color: 'error',
label: '删除',
popConfirm: {
title: '是否确认删除',
placement: 'left',
confirm: handleDelete.bind(null),
},
},
]"
/>
</
template
>
</template>
</BasicTable>
<BasicTable
v-show=
"tableChange"
@
register=
"registerDataBaseTable"
>
<
template
#
toolbar
>
<a-button
type=
"primary"
v-show=
"isCopy"
@
click=
"handDelete"
>
删除
</a-button>
<a-button
type=
"primary"
v-show=
"isCopy"
@
click=
"handleNewSource"
>
添加
</a-button>
...
...
@@ -65,9 +88,9 @@
import
{
sourceFormData
,
tagFormData
,
tagRecordData
}
from
'@/views/metadata/metadataData'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
tagDataBaseColumns
,
tagDataSourceColumns
,
tagRuleSchema
,
tagSchema
,
tagSourceColumns
,
}
from
'@/views/metadata/data'
;
import
{
BasicTable
,
TableAction
,
useTable
}
from
'@/components/Table'
;
...
...
@@ -86,12 +109,58 @@
const
rowId
=
ref
(
''
);
const
isCopy
=
ref
(
false
);
const
isForm
=
ref
(
false
);
const
tableChange
=
ref
(
false
);
//获取接口数据并放在下拉框里(这里是打开了一个弹框)
//初始化表单
const
[
registerForm
,
{
setFieldsValue
,
resetFields
}]
=
useForm
({
labelWidth
:
120
,
baseColProps
:
{
lg
:
12
,
md
:
24
},
schemas
:
tagSchema
,
schemas
:
[
{
field
:
'typeNum'
,
label
:
'操作类型'
,
component
:
'RadioGroup'
,
colProps
:
{
lg
:
24
,
md
:
24
},
componentProps
:
{
options
:
[
{
label
:
'新增标签'
,
value
:
'0'
},
{
label
:
'删除标签'
,
value
:
'1'
},
],
},
required
:
true
,
},
{
field
:
'workName'
,
label
:
'任务名'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
required
:
true
,
},
{
field
:
'remark'
,
label
:
'描述'
,
component
:
'Input'
,
colProps
:
{
lg
:
24
,
md
:
24
},
required
:
true
,
},
{
field
:
'range'
,
label
:
'打标范围'
,
component
:
'RadioGroup'
,
colProps
:
{
lg
:
24
,
md
:
24
},
defaultValue
:
'0'
,
componentProps
:
({
formModel
})
=>
({
onChange
:
()
=>
{
tableChange
.
value
=
formModel
.
range
===
'1'
;
},
options
:
[
{
label
:
'数据源'
,
value
:
'0'
},
{
label
:
'数据库'
,
value
:
'1'
},
],
}),
required
:
true
,
},
],
disabled
:
isForm
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
...
...
@@ -156,6 +225,33 @@
},
scroll
:
{
y
:
300
},
});
const
[
registerDataBaseTable
]
=
useTable
({
title
:
'选择数据库'
,
columns
:
tagDataBaseColumns
,
api
:
async
()
=>
{
const
response
=
{
pageNu
:
'1'
,
pageSize
:
'10'
,
pages
:
'1'
,
total
:
formData
.
value
.
length
,
code
:
''
,
message
:
''
,
data
:
[],
};
var
data
=
[];
data
=
formData
.
value
.
filter
((
item
)
=>
item
.
businessId
!==
100
);
return
{
...
response
,
data
:
data
};
},
showIndexColumn
:
false
,
pagination
:
false
,
actionColumn
:
{
width
:
80
,
title
:
'操作'
,
dataIndex
:
'action'
,
ifShow
:
isCopy
,
},
scroll
:
{
y
:
300
},
});
const
[
registerTagTable
,
{
reload
:
reloadTag
}]
=
useTable
({
title
:
'选择标签'
,
api
:
async
()
=>
{
...
...
@@ -185,11 +281,13 @@
});
async
function
handleSubmit
()
{
closeModal
();
createMessage
.
success
(
'提交成功'
);
await
resetFields
();
await
resetRuleFields
();
await
reloadTag
();
await
reload
();
if
(
!
isForm
.
value
)
{
createMessage
.
success
(
'提交成功'
);
}
}
function
handDelete
()
{
createConfirm
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment