Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
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
zhaochengxiang
szse
Commits
8338d076
Commit
8338d076
authored
May 08, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型关联元数据
parent
e8f0f6b9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
8 deletions
+54
-8
datamodel.js
src/model/datamodel.js
+5
-0
datamodeler.js
src/service/datamodeler.js
+6
-0
index.js
src/util/index.js
+2
-2
ImportActionManage.jsx
src/view/Manage/Model/Component/ImportActionManage.jsx
+1
-1
ImportActionRelation.jsx
src/view/Manage/Model/Component/ImportActionRelation.jsx
+36
-1
suggest.jsx
src/view/Manage/Model/Component/suggest.jsx
+1
-1
result-detail.jsx
src/view/Manage/ModelCompare/result-detail.jsx
+3
-3
No files found.
src/model/datamodel.js
View file @
8338d076
...
...
@@ -734,4 +734,8 @@ export function* getOwner(payload) {
export
function
*
setOwner
(
payload
)
{
return
yield
call
(
datamodelerService
.
setOwner
,
payload
)
}
export
function
*
findAssociationMetadataByModelId
(
payload
)
{
return
yield
call
(
datamodelerService
.
findAssociationMetadataByModelId
,
payload
)
}
\ No newline at end of file
src/service/datamodeler.js
View file @
8338d076
...
...
@@ -684,4 +684,9 @@ export function getOwner(payload) {
export
function
setOwner
(
payload
)
{
return
PostJSON
(
"/datamodeler/easyDataModelerCooperation/setDataModelOwner"
,
payload
)
}
//模型和元数据关联
export
function
findAssociationMetadataByModelId
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerMetadataAssociation/findAssociationByModelId"
,
payload
)
}
\ No newline at end of file
src/util/index.js
View file @
8338d076
...
...
@@ -564,8 +564,8 @@ export function isChromeVersionLessThan80() {
return
false
;
}
export
function
openMetadataDetail
(
id
,
name
)
{
window
.
open
(
`/center-home/metadetail?mid=
${
encodeURIComponent
(
id
)}
&action=metadetail&type=detail&manager=false&activekey=1
&name=
${
encodeURIComponent
(
name
||
''
)}
`
);
export
function
openMetadataDetail
(
id
)
{
window
.
open
(
`/center-home/metadetail?mid=
${
encodeURIComponent
(
id
)}
&action=metadetail&type=detail&manager=false&activekey=1`
);
}
export
function
openModelDetail
(
id
)
{
...
...
src/view/Manage/Model/Component/ImportActionManage.jsx
View file @
8338d076
...
...
@@ -109,7 +109,7 @@ const FC = (props) => {
</
Form
>
)
:
(
<
Descriptions
column=
{
3
}
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
维护历史
</
div
>
}
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
106
}
}
>
维护历史
</
div
>
}
>
<
div
style=
{
{
maxHeight
:
70
,
overflow
:
'auto'
}
}
>
{
(
maintenanceRecords
||
[]).
map
((
record
,
index
)
=>
{
...
...
src/view/Manage/Model/Component/ImportActionRelation.jsx
View file @
8338d076
...
...
@@ -4,8 +4,10 @@ import { DownOutlined, UpOutlined, QuestionCircleOutlined } from '@ant-design/ic
import
{
Action
,
ModelerId
,
PermitCheckOut
,
Editable
,
StateId
,
ReadOnly
}
from
'../../../../util/constant'
import
{
importActionSubject
}
from
"./ImportAction"
import
{
dispatch
}
from
'../../../../model'
;
import
'./ImportActionHeader.less'
import
{
openMetadataDetail
}
from
"../../../../util"
export
const
inheritanceHistoricalType
=
'historical'
export
const
inheritanceZipperType
=
'zipper'
...
...
@@ -14,6 +16,7 @@ const FC = (props) => {
const
{
modelerData
,
action
}
=
props
const
[
isCollapse
,
setCollapse
]
=
React
.
useState
(
true
)
const
[
relationModelerDatas
,
setRelationModelerDatas
]
=
React
.
useState
([])
const
[
associationMetadata
,
setMetadata
]
=
React
.
useState
()
React
.
useEffect
(()
=>
{
const
$importActionSubject
=
importActionSubject
.
subscribe
((
props
)
=>
{
...
...
@@ -28,6 +31,10 @@ const FC = (props) => {
},
[
action
])
React
.
useEffect
(()
=>
{
if
(
modelerData
?.
id
)
{
getAssociationMetadata
()
}
if
(
modelerData
?.
inheritedFromEasyDataModelerDataModel
)
{
const
newRelationModelerDatas
=
[];
...
...
@@ -54,6 +61,18 @@ const FC = (props) => {
//eslint-disable-next-line react-hooks/exhaustive-deps
},
[
modelerData
])
const
getAssociationMetadata
=
()
=>
{
dispatch
({
type
:
'datamodel.findAssociationMetadataByModelId'
,
payload
:
{
easyDataModelerDataModelId
:
modelerData
?.
id
,
},
callback
:
data
=>
{
setMetadata
(
data
)
}
})
}
return
(
<
div
className=
'model-import-action-relation'
>
<
Space
>
...
...
@@ -77,7 +96,23 @@ const FC = (props) => {
!
isCollapse
&&
<
Descriptions
className=
'mt-3'
column=
{
3
}
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
100
}
}
>
<
div
style=
{
{
textAlign
:
'right'
,
width
:
106
}
}
>
元数据
</
div
>
}
>
<
span
>
{
!
associationMetadata
?.
metadataPath
?
'暂无信息'
:
<
a
className=
'mr-3'
onClick=
{
()
=>
{
openMetadataDetail
(
associationMetadata
?.
metadataId
)
}
}
>
{
associationMetadata
?.
metadataPath
}
</
a
>
}
</
span
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
106
}
}
>
历史存储形式
</
div
>
}
>
...
...
src/view/Manage/Model/Component/suggest.jsx
View file @
8338d076
...
...
@@ -150,7 +150,7 @@ const FC = (props) => {
id
},
callback: data => {
openMetadataDetail(data?._id
, name
)
openMetadataDetail(data?._id)
}
})
} else {
...
...
src/view/Manage/ModelCompare/result-detail.jsx
View file @
8338d076
...
...
@@ -204,7 +204,7 @@ const PerfectMatch = ({ item }) => {
<Tooltip title={record.metadataName}>
<Typography.Text ellipsis={true}>
<a onClick={() => {
openMetadataDetail(record.metadataId
, record.metadataName
)
openMetadataDetail(record.metadataId)
}}>
{ record.metadataName }
</a>
...
...
@@ -485,7 +485,7 @@ const PartialMatch = ({ item }) => {
<Tooltip title={record.metadataName}>
<Typography.Text ellipsis={true}>
<a onClick={() => {
openMetadataDetail(record.metadataId
, record.metadataName
)
openMetadataDetail(record.metadataId)
}}>
{ record.metadataName }
</a>
...
...
@@ -765,7 +765,7 @@ const NotMatch = ({ item }) => {
<Tooltip title={record.metadataName}>
<Typography.Text ellipsis={true}>
<a onClick={() => {
openMetadataDetail(record.metadataId
, record.metadataName
)
openMetadataDetail(record.metadataId)
}}>
{ record.metadataName }
</a>
...
...
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