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
8b08bc9d
Commit
8b08bc9d
authored
Sep 15, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型字段加入标准
parent
9cecc1cf
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
105 additions
and
52 deletions
+105
-52
data-govern0901.zip
data-govern0901.zip
+0
-0
datamodel.js
src/model/datamodel.js
+4
-0
datamodeler.js
src/service/datamodeler.js
+4
-0
MetadataInfo.jsx
src/view/Manage/AssetManage/Component/MetadataInfo.jsx
+3
-4
AssetMount.jsx
src/view/Manage/AssetRecycle/Component/AssetMount.jsx
+15
-17
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+11
-2
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+68
-24
ModelTree.jsx
src/view/Manage/Model/Component/ModelTree.jsx
+0
-5
No files found.
data-govern0901.zip
deleted
100644 → 0
View file @
9cecc1cf
File deleted
src/model/datamodel.js
View file @
8b08bc9d
...
...
@@ -158,6 +158,10 @@ export function* getDataModel(payload) {
return
yield
call
(
datamodelerService
.
getDataModel
,
payload
);
}
export
function
*
getDataModelWithRecommendedDefinitionAndTermDiscovery
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDataModelWithRecommendedDefinitionAndTermDiscovery
,
payload
);
}
export
function
*
getDataModelLocation
(
payload
)
{
return
yield
call
(
datamodelerService
.
getDataModelLocation
,
payload
);
}
...
...
src/service/datamodeler.js
View file @
8b08bc9d
...
...
@@ -113,6 +113,10 @@ export function getDataModel(payload) {
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/getDataModel"
,
payload
);
}
export
function
getDataModelWithRecommendedDefinitionAndTermDiscovery
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/getDataModelWithRecommendedDefinitionAndTermDiscovery"
,
payload
);
}
export
function
getDataModelLocation
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerCURD/getDataModelLocation"
,
payload
);
}
...
...
src/view/Manage/AssetManage/Component/MetadataInfo.jsx
View file @
8b08bc9d
...
...
@@ -5,8 +5,7 @@ import { SettingFilled } from '@ant-design/icons';
import
{
AppContext
}
from
'../../../../App'
;
const
MetadataInfo
=
({
value
=
''
,
config
=
true
})
=>
{
const
metadata
=
((
value
||
''
)
===
''
?{}:
JSON
.
parse
(
value
));
const
metadata
=
(
typeof
(
value
||
''
)
===
'string'
)?{}:
JSON
.
parse
(
value
);
return
(
<
AppContext
.
Consumer
>
...
...
@@ -17,10 +16,10 @@ const MetadataInfo = ({ value = '', config = true }) => {
message
:
'data-govern-show-metadata-message'
,
data
:
metadata
})
}
}
style=
{
{
marginRight
:
5
}
}
>
{
metadata
.
tableName
||
''
}
</
a
>
}
}
style=
{
{
marginRight
:
5
}
}
>
{
metadata
?
.
tableName
||
''
}
</
a
>
{
config
&&
<
Button
icon=
{
<
SettingFilled
/>
}
onClick=
{
()
=>
{
value
?.
setGlobalState
({
value
?.
setGlobalState
&&
value
?.
setGlobalState
({
message
:
'data-govern-show-metadata-list-message'
,
data
:
metadata
})
...
...
src/view/Manage/AssetRecycle/Component/AssetMount.jsx
View file @
8b08bc9d
...
...
@@ -48,29 +48,27 @@ const AssetMount = (props) => {
}
return
(
<
div
>
{
visible
&&
<
Modal
title=
'挂载详情'
visible=
{
visible
}
width=
{
400
}
confirmLoading=
{
confirmLoading
}
onCancel=
{
()
=>
{
reset
();
onCancel
&&
onCancel
()
}
}
onOk=
{
onOk
}
>
<
AssetTree
<
Modal
title=
'挂载详情'
visible=
{
visible
}
width=
{
400
}
confirmLoading=
{
confirmLoading
}
onCancel=
{
()
=>
{
reset
();
onCancel
&&
onCancel
()
}
}
onOk=
{
onOk
}
>
{
visible
&&
<
AssetTree
readOnly=
{
true
}
checkable=
{
true
}
onCheck=
{
onCheck
}
tableId=
{
id
}
{
...
props
}
/>
</
Modal
>
}
</
div
>
}
</
Modal
>
)
}
...
...
src/view/Manage/Model/Component/ImportAction.jsx
View file @
8b08bc9d
...
...
@@ -125,8 +125,16 @@ const ImportAction = (props) => {
}
const
getCurrentDataModel
=
()
=>
{
let
type
=
'datamodel.getDataModel'
;
if
(
action
===
'add'
)
{
type
=
'datamodel.modelCopy'
;
}
else
if
(
action
===
'flow'
)
{
type
=
'datamodel.getDataModelWithRecommendedDefinitionAndTermDiscovery'
;
}
dispatch
({
type
:
(
action
===
'add'
)
?
'datamodel.modelCopy'
:
'datamodel.getDataModel'
,
type
,
payload
:
{
id
:
modelerId
||
''
},
...
...
@@ -324,7 +332,8 @@ const ImportAction = (props) => {
validateReports=
{
validateReports
}
supportedDatatypes=
{
supportedDatatypes
}
onChange=
{
onTableChange
}
editable=
{
action
!==
'detail'
&&
action
!==
'flow'
}
editable=
{
action
!==
'detail'
&&
action
!==
'flow'
}
action=
{
action
}
terms=
{
terms
}
/>
<
ImportActionIndex
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
8b08bc9d
...
...
@@ -8,6 +8,8 @@ import update from 'immutability-helper';
import
{
generateUUID
,
highlightSearchContentByTerms
,
showMessage
}
from
'../../../../util'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
Helper
from
'./Help'
;
import
{
AppContext
}
from
'../../../../App'
;
import
'./ImportActionTable.less'
;
const
{
Option
}
=
Select
;
...
...
@@ -230,7 +232,7 @@ const DragableBodyRow = ({ index, moveRow, className, style, ...restProps }) =>
};
const
ImportActionTable
=
(
props
)
=>
{
const
{
modelerData
,
onChange
,
editable
,
supportedDatatypes
,
constraint
,
template
,
validateReports
,
type
=
'model'
,
terms
}
=
props
;
const
{
modelerData
,
onChange
,
editable
,
supportedDatatypes
,
constraint
,
template
,
validateReports
,
type
=
'model'
,
terms
,
action
}
=
props
;
const
[
data
,
setData
]
=
useState
([]);
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -676,30 +678,72 @@ const ImportActionTable = (props) => {
{
title
:
'操作'
,
dataIndex
:
'action'
,
width
:
1
0
0
,
width
:
1
8
0
,
fixed
:
'right'
,
render
:
(
_
,
record
)
=>
{
if
(
!
editable
)
return
null
;
return
isEditing
(
record
)
?
(
<>
<
Typography
.
Link
className=
'mr-3'
disabled=
{
editingKey
===
''
}
onClick=
{
()
=>
save
()
}
>
保存
</
Typography
.
Link
>
<
Typography
.
Link
disabled=
{
editingKey
===
''
}
onClick=
{
()
=>
{
cancel
()}
}
>
取消
</
Typography
.
Link
>
</>
)
:
(
<>
<
Typography
.
Link
className=
'mr-3'
disabled=
{
editingKey
!==
''
}
onClick=
{
()
=>
edit
(
record
)
}
>
编辑
</
Typography
.
Link
>
<
Popconfirm
disabled=
{
editingKey
!==
''
}
title=
"删除字段会删除相关的索引,您确定删除吗?"
onConfirm=
{
()
=>
remove
(
record
)
}
>
<
a
disabled=
{
editingKey
!==
''
}
href=
""
>
删除
</
a
>
</
Popconfirm
>
</>
);
return
(
<
AppContext
.
Consumer
>
{
value
=>
<
React
.
Fragment
>
{
!
isEditing
(
record
)
&&
<
React
.
Fragment
>
{
record
?.
isPossibleNewRecommendedDefinition
?.
possible
&&
<
Typography
.
Link
className=
'mr-3'
onClick=
{
()
=>
{
value
?.
setGlobalState
&&
value
?.
setGlobalState
({
message
:
'data-govern-show-standard-create'
,
data
:
{
column
:
record
,
type
:
record
?.
isPossibleNewRecommendedDefinition
?.
type
}
})
}
}
>
加入标准
</
Typography
.
Link
>
}
{
record
?.
isPossibleNewTerm
?.
possible
&&
<
Typography
.
Link
className=
'mr-3'
onClick=
{
()
=>
{
value
?.
setGlobalState
({
message
:
'data-govern-show-standard-create'
,
data
:
{
column
:
record
,
type
:
record
?.
isPossibleNewTerm
?.
type
}
})
}
}
>
加入词汇
</
Typography
.
Link
>
}
</
React
.
Fragment
>
}
{
editable
&&
<
React
.
Fragment
>
{
isEditing
(
record
)
?
(
<
React
.
Fragment
>
<
Typography
.
Link
className=
'mr-3'
disabled=
{
editingKey
===
''
}
onClick=
{
()
=>
save
()
}
>
保存
</
Typography
.
Link
>
<
Typography
.
Link
disabled=
{
editingKey
===
''
}
onClick=
{
()
=>
{
cancel
()}
}
>
取消
</
Typography
.
Link
>
</
React
.
Fragment
>
)
:
(
<
React
.
Fragment
>
<
Typography
.
Link
className=
'mr-3'
disabled=
{
editingKey
!==
''
}
onClick=
{
()
=>
edit
(
record
)
}
>
编辑
</
Typography
.
Link
>
<
Popconfirm
disabled=
{
editingKey
!==
''
}
title=
"删除字段会删除相关的索引,您确定删除吗?"
onConfirm=
{
()
=>
remove
(
record
)
}
>
<
a
disabled=
{
editingKey
!==
''
}
href=
""
>
删除
</
a
>
</
Popconfirm
>
</
React
.
Fragment
>
)
}
</
React
.
Fragment
>
}
</
React
.
Fragment
>
}
</
AppContext
.
Consumer
>
)
},
},
]
...
...
@@ -775,7 +819,7 @@ const ImportActionTable = (props) => {
const
mergedColumns
=
()
=>
{
const
hasValidateReports
=
(
validateReports
||
[]).
filter
(
report
=>
report
.
type
===
'DataModelAttribute'
).
length
>
0
;
if
(
editable
)
{
if
(
editable
||
action
===
'flow'
)
{
let
_columns
=
hasValidateReports
?
includeValidateEditableColumn
:
editableColumn
;
...
...
src/view/Manage/Model/Component/ModelTree.jsx
View file @
8b08bc9d
...
...
@@ -325,11 +325,6 @@ const ModelTree = (props) => {
alignItems
:
'center'
}
}
>
<
Dropdown
overlay=
{
exportMenu
}
placement=
"bottomLeft"
>
<
Tooltip
title=
"视角"
>
<
UnorderedListOutlined
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
</
Dropdown
>
{
viewSelectedKey
===
'dir'
&&
(
<
Tooltip
title=
"新增目录"
className=
'ml-4'
>
...
...
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