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