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
9c1212d2
Commit
9c1212d2
authored
Apr 12, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型问题
parent
2b13e598
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
23 deletions
+93
-23
datamodel.js
src/model/datamodel.js
+9
-0
datamodeler.js
src/service/datamodeler.js
+8
-0
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+6
-2
ImportActionHeader.jsx
src/view/Manage/Model/Component/ImportActionHeader.jsx
+58
-18
UpdateTreeItemModal.jsx
src/view/Manage/Model/Component/UpdateTreeItemModal.jsx
+12
-3
No files found.
src/model/datamodel.js
View file @
9c1212d2
...
...
@@ -309,3 +309,11 @@ export function* getMaintenanceRecords(payload) {
export
function
*
getSystemAllGraph
(
payload
)
{
return
yield
call
(
metadataService
.
getSystemAllGraph
,
payload
);
}
export
function
*
dataTypeList
()
{
return
yield
call
(
datamodelerService
.
dataTypeList
);
}
export
function
*
bindingLoadRangeList
(
payload
)
{
return
yield
call
(
datamodelerService
.
bindingLoadRangeList
,
payload
);
}
\ No newline at end of file
src/service/datamodeler.js
View file @
9c1212d2
...
...
@@ -261,3 +261,10 @@ export function autoCreateTable(payload) {
return
PostJSON
(
"/metadataharvester/datasource/createTableByDDLList"
,
payload
);
}
export
function
dataTypeList
()
{
return
GetJSON
(
"/datamodeler/easyDataModelerDataType/dataTypeList"
);
}
export
function
bindingLoadRangeList
(
payload
)
{
return
GetJSON
(
"/datamodeler/easyDataModelerDataType/bindingLoadRangeList"
,
payload
);
}
\ No newline at end of file
src/view/Manage/Model/Component/ImportAction.jsx
View file @
9c1212d2
...
...
@@ -93,11 +93,13 @@ const ImportAction = (props) => {
dispatch
({
type
:
'datamodel.getDraft'
,
payload
:
{
params
:
{
dataCatalogId
:
catalogId
,
},
data
:
{
hints
:
_hints
,
modelerModelingConstraint
:
_constraint
,
easyDataModelerModelingTemplate
:
_template
,
dataCatalogId
:
catalogId
,
}
},
callback
:
data
=>
{
...
...
@@ -262,14 +264,16 @@ const ImportAction = (props) => {
getConsult
(
newModelerData
);
}
const
onTemplateChange
=
(
value
)
=>
{
const
onTemplateChange
=
(
value
,
isCustom
=
false
)
=>
{
let
currentTemplate
=
null
;
if
(
!
isCustom
)
{
(
templates
||
[]).
forEach
((
_template
,
index
)
=>
{
if
(
_template
.
cnName
===
value
)
{
currentTemplate
=
_template
;
}
});
}
form
.
setFieldsValue
({
easyDataModelerModelingTemplate
:
currentTemplate
||
{},
...
...
src/view/Manage/Model/Component/ImportActionHeader.jsx
View file @
9c1212d2
...
...
@@ -58,8 +58,8 @@ const etlTableTypeData = {
full
:
[
'chain'
,
'daily'
,
'current'
,
'chain,current'
,
'daily,current'
,
'chain,daily,current'
],
change
:
[
'chain'
,
'current'
,
'chain,current'
,
'daily,current'
,
'chain,daily,current'
],
};
const
etlTable
TypeRemark
=
'描述ETL框架中目标表的数据类型'
;
const
etl
LoadRemark
=
'描述ETL框架绑定加载列表,如chain、daily、current等'
;
const
data
TypeRemark
=
'描述ETL框架中目标表的数据类型'
;
const
binding
LoadRemark
=
'描述ETL框架绑定加载列表,如chain、daily、current等'
;
const
ConstraintSelect
=
({
value
=
{},
constraints
=
[],
onChange
,
...
restProps
})
=>
{
...
...
@@ -105,11 +105,13 @@ const TemplateSelect = ({ value = '', modelerData = undefined, templates = [], o
allowClear
defaultValue=
{
modelerData
?.
tableType
}
onChange=
{
(
val
)
=>
{
onChange
?.(
val
);
onChange
?.(
val
,
true
);
}
}
style=
{
{
flex
:
1
}
}
/>
:
<
Select
onChange=
{
onChange
}
onChange=
{
(
val
)
=>
{
onChange
?.(
val
);
}
}
defaultValue=
{
value
||
undefined
}
placeholder=
'请选择数据表类型'
allowClear
...
...
@@ -366,6 +368,15 @@ const ImportActionHeader = (props) => {
const
[
autoTranslate
,
setAutoTranslate
]
=
useState
(
false
);
const
[
onlyShowRequireChange
,
setOnlyShowRequireChange
]
=
useState
(
true
);
const
[
maintenanceRecords
,
setMaintenanceRecords
]
=
useState
(
null
);
const
[
dataTypeList
,
setDataTypeList
]
=
useState
(
null
);
const
[
bindingLoadRangeList
,
setBindingLoadRangeList
]
=
useState
(
null
);
useEffect
(()
=>
{
getDataTypeList
();
if
(
modelerData
?.
dataType
)
{
getBindingLoadRangeList
(
modelerData
?.
dataType
);
}
},
[])
useEffect
(()
=>
{
...
...
@@ -507,6 +518,27 @@ const ImportActionHeader = (props) => {
})
}
const
getDataTypeList
=
()
=>
{
dispatch
({
type
:
'datamodel.dataTypeList'
,
callback
:
data
=>
{
setDataTypeList
(
data
);
}
})
}
const
getBindingLoadRangeList
=
(
dataTypeName
)
=>
{
dispatch
({
type
:
'datamodel.bindingLoadRangeList'
,
payload
:
{
dataTypeName
},
callback
:
data
=>
{
setBindingLoadRangeList
(
data
);
}
})
}
const
onSearch
=
(
searchText
)
=>
{
const
_searchText
=
searchText
.
replace
(
/ /g
,
''
);
...
...
@@ -571,6 +603,14 @@ const ImportActionHeader = (props) => {
}
})
}
}
else
if
(
changedValues
.
hasOwnProperty
(
'dataType'
))
{
if
(
changedValues
.
dataType
)
{
getBindingLoadRangeList
(
changedValues
.
dataType
);
onChange
?.({...
changedValues
,
bindingLoadRange
:
''
},
{...
allValues
,
bindingLoadRange
:
''
});
}
else
{
setBindingLoadRangeList
([]);
onChange
?.({...
changedValues
,
bindingLoadRange
:
''
},
{...
allValues
,
bindingLoadRange
:
''
});
}
}
}
...
...
@@ -690,21 +730,21 @@ const ImportActionHeader = (props) => {
<
AttributesSelect
modelerData=
{
modelerData
}
/>
</
Form
.
Item
>
</
Col
>
{
/*
<Col xs={24} sm={24} lg={12} xl={8}>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"数据类型"
name=""
tooltip={
etlTable
TypeRemark}
name=
"
dataType
"
tooltip=
{
data
TypeRemark
}
>
<
Select
allowClear
placeholder=
'请选择数据类型'
>
{
Object.keys(etlTableTypeData)
.map((item, index) => <Option key={index} value={item}>
dataTypeList
?
.
map
((
item
,
index
)
=>
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>)
}
</
Select
>
</
Form
.
Item
>
</Col>
*/
}
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"更新时间"
...
...
@@ -721,21 +761,21 @@ const ImportActionHeader = (props) => {
<
PartitionSelect
modelerData=
{
modelerData
}
partitionTypes=
{
supportedPartitionTypes
}
/>
</
Form
.
Item
>
</
Col
>
{
/*
<Col xs={24} sm={24} lg={12} xl={8}>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"绑定加载范围"
name=""
tooltip={
etl
LoadRemark}
name=
"
bindingLoadRange
"
tooltip=
{
binding
LoadRemark
}
>
<
Select
allowClear
placeholder=
'请选择绑定加载范围'
>
{
// Object.keys(etlTableTypeData)
.map((item, index) => <Option key={index} value={item}>
//
{item}
//
</Option>)
bindingLoadRangeList
?
.
map
((
item
,
index
)
=>
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>)
}
</
Select
>
</
Form
.
Item
>
</Col>
*/
}
</
Col
>
<
Col
xs=
{
24
}
sm=
{
24
}
lg=
{
12
}
xl=
{
8
}
>
<
Form
.
Item
label=
"维护历史"
...
...
@@ -797,10 +837,10 @@ const ImportActionHeader = (props) => {
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据平台
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
dataResidence
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据情况
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
dataCircumstances
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
分布键
</
div
>
}
>
{
highlightSearchContentByTerms
(
distributionDescription
||
''
,
terms
)
}
</
Descriptions
.
Item
>
{
/* <Descriptions.Item label={<div style={{ textAlign: 'right', width: 85 }}>数据类型</div>} ></Descriptions.Item> */
}
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
数据类型
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
dataType
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
更新时间
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
dataUpdatingTiming
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
分区键
</
div
>
}
>
{
highlightSearchContentByTerms
(
partitionsDescription
||
''
,
terms
)
}
</
Descriptions
.
Item
>
{
/* <Descriptions.Item label={<div style={{ textAlign: 'right', width: 85 }}>绑定加载范围</div>} ></Descriptions.Item> */
}
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
绑定加载范围
</
div
>
}
>
{
highlightSearchContentByTerms
(
modelerData
.
bindingLoadRange
||
''
,
terms
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
<
div
style=
{
{
textAlign
:
'right'
,
width
:
85
}
}
>
维护历史
</
div
>
}
>
<
div
>
{
...
...
src/view/Manage/Model/Component/UpdateTreeItemModal.jsx
View file @
9c1212d2
...
...
@@ -70,6 +70,12 @@ class UpdateTreeItemForm extends React.Component {
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"数据平台"
name=
"platformInfo"
>
<
Input
/>
</
Form
.
Item
>
</
Form
>
);
}
...
...
@@ -89,12 +95,12 @@ const UpdateTreeItemModal = (props) => {
_action
=
item
?
'sub'
:
'root'
;
}
form
.
setFields
([{
name
:
'name'
,
errors
:
[]
},
{
name
:
'remark'
,
errors
:
[]
}]);
form
.
setFields
([{
name
:
'name'
,
errors
:
[]
},
{
name
:
'remark'
,
errors
:
[]
}
,
{
name
:
'platformInfo'
,
errors
:
[]
}
]);
if
(
type
===
'add'
)
{
form
.
setFieldsValue
({
action
:
_action
,
name
:
''
,
remark
:
''
});
form
.
setFieldsValue
({
action
:
_action
,
name
:
''
,
remark
:
''
,
platformInfo
:
''
});
}
else
{
form
.
setFieldsValue
({
action
:
''
,
name
:
item
?
item
.
name
:
''
,
remark
:
item
?
item
.
remark
:
''
});
form
.
setFieldsValue
({
action
:
''
,
name
:
item
?
item
.
name
:
''
,
remark
:
item
?
item
.
remark
:
''
,
platformInfo
:
item
?.
platformInfo
});
}
}
//eslint-disable-next-line react-hooks/exhaustive-deps
...
...
@@ -112,12 +118,14 @@ const UpdateTreeItemModal = (props) => {
payload
=
{
name
:
values
.
name
||
''
,
remark
:
values
.
remark
||
''
,
platformInfo
:
values
.
platformInfo
||
''
,
parentId
:
rootId
};
}
else
if
(
type
===
'add'
)
{
payload
=
{
name
:
values
.
name
||
''
,
remark
:
values
.
remark
||
''
,
platformInfo
:
values
.
platformInfo
||
''
,
parentId
:
item
.
id
};
}
else
{
...
...
@@ -125,6 +133,7 @@ const UpdateTreeItemModal = (props) => {
...
item
,
name
:
values
.
name
||
''
,
remark
:
values
.
remark
||
''
,
platformInfo
:
values
.
platformInfo
||
''
,
}
}
...
...
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