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
388f84a0
Commit
388f84a0
authored
Jul 27, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
英文名称推荐
parent
0b799bad
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
82 deletions
+32
-82
ConstraintDetailDrawer.jsx
src/view/Manage/Model/Component/ConstraintDetailDrawer.jsx
+10
-24
ConstraintDetailModal.less
src/view/Manage/Model/Component/ConstraintDetailModal.less
+0
-7
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+2
-2
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+11
-39
ImportModal.jsx
src/view/Manage/Model/Component/ImportModal.jsx
+0
-1
index.jsx
src/view/Manage/Model/index.jsx
+9
-9
No files found.
src/view/Manage/Model/Component/ConstraintDetail
Modal
.jsx
→
src/view/Manage/Model/Component/ConstraintDetail
Drawer
.jsx
View file @
388f84a0
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Button
,
Table
,
Input
}
from
'antd'
;
import
{
Table
,
Input
,
Drawer
}
from
'antd'
;
import
{
dispatch
}
from
'../../../../model'
;
import
'./ConstraintDetailModal.less'
;
const
ConstraintDetail
Modal
=
(
props
)
=>
{
const
ConstraintDetail
Drawer
=
(
props
)
=>
{
const
{
onCancel
,
visible
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
rules
,
setRules
]
=
useState
([]);
...
...
@@ -74,28 +73,15 @@ const ConstraintDetailModal = (props) => {
}
return
(
<
Modal
className=
'constraint-detail-modal'
forceRender
visible=
{
visible
}
<
Drawer
title=
'规范详情'
placement=
"right"
closable=
{
true
}
width=
{
1000
}
onC
ancel
=
{
()
=>
{
onC
lose
=
{
()
=>
{
onCancel
&&
onCancel
();
}
}
footer=
{
[
<
Button
key=
"1"
type=
"primary"
onClick=
{
()
=>
{
onCancel
&&
onCancel
();
}
}
>
取消
</
Button
>
]
}
visible=
{
visible
}
>
<
div
className=
'd-flex mb-3'
style=
{
{
alignItems
:
'center'
}
}
>
<
span
className=
'mr-3'
>
前置依赖搜索:
</
span
>
...
...
@@ -115,8 +101,8 @@ const ConstraintDetailModal = (props) => {
pagination=
{
false
}
sticky
/>
</
Modal
>
</
Drawer
>
);
}
export
default
ConstraintDetailModal
;
\ No newline at end of file
export
default
ConstraintDetailDrawer
;
\ No newline at end of file
src/view/Manage/Model/Component/ConstraintDetailModal.less
deleted
100644 → 0
View file @
0b799bad
.constraint-detail-modal {
.yy-table {
max-height: 600px !important;
overflow: auto !important;
}
}
\ No newline at end of file
src/view/Manage/Model/Component/EditModel.jsx
View file @
388f84a0
...
...
@@ -122,7 +122,7 @@ const EditModel = (props) => {
className=
'flex'
style=
{
{
width
:
'100%'
,
height
:
4
4
,
height
:
6
4
,
padding
:
'0 15px'
,
backgroundColor
:
'#fff'
,
alignItems
:
'center'
,
...
...
@@ -135,7 +135,7 @@ const EditModel = (props) => {
<
span
style=
{
{
fontSize
:
16
,
fontWeight
:
'bold'
,
color
:
'#000'
}
}
>
{
title
}
</
span
>
{
actionBtn
}
</
div
>
<
div
className=
'position-absolute'
style=
{
{
top
:
4
4
,
width
:
'100%'
}
}
>
<
div
className=
'position-absolute'
style=
{
{
top
:
6
4
,
width
:
'100%'
}
}
>
<
div
className=
'position-relative'
style=
{
{
margin
:
15
}
}
>
<
ImportAction
hints=
{
hints
}
onChange=
{
onActionChange
}
action=
{
action
}
modelerId=
{
modelerId
}
form=
{
form
}
terms=
{
terms
}
/>
</
div
>
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
388f84a0
...
...
@@ -358,9 +358,8 @@ const ImportActionTable = (props) => {
// console.log('all values', allValues);
setSuggests
([]);
setEnglishSuggests
([]);
if
(
changedValues
.
hasOwnProperty
(
'cnName'
))
{
if
(
changedValues
.
hasOwnProperty
(
'cnName'
)
||
changedValues
.
hasOwnProperty
(
'name'
)
)
{
const
newData
=
[...
data
];
const
index
=
newData
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
...
...
@@ -381,20 +380,11 @@ const ImportActionTable = (props) => {
}
},
callback
:
data
=>
{
setSuggests
(
data
||
[]);
}
})
}
else
if
(
changedValues
.
hasOwnProperty
(
'name'
))
{
dispatchLatest
({
type
:
'datamodel.autocomplete'
,
payload
:
{
params
:
{
word
:
changedValues
.
name
,
isEasyDataModelerDataModelAttribute
:
true
,
if
(
changedValues
.
hasOwnProperty
(
'cnName'
))
{
setSuggests
((
data
||
[]).
length
>
0
?(
data
[
0
].
suggestions
||
[]):[]);
}
else
if
(
changedValues
.
hasOwnProperty
(
'name'
))
{
setSuggests
((
data
||
[]).
length
>
1
?(
data
[
1
].
suggestions
||
[]):[]);
}
},
callback
:
data
=>
{
setEnglishSuggests
(
data
||
[]);
}
})
}
else
if
(
changedValues
.
hasOwnProperty
(
'nullable'
)
)
{
...
...
@@ -790,12 +780,12 @@ const ImportActionTable = (props) => {
expandable=
{
{
columnWidth
:
0
,
expandedRowRender
:
record
=>
(
<>
<
React
.
Fragment
>
{
editingKey
!==
''
&&
<>
editingKey
!==
''
&&
<
React
.
Fragment
>
{
suggests
&&
suggests
.
length
>
0
&&
(
<>
<
React
.
Fragment
>
{
/* <Divider orientation="left">智能推荐</Divider> */
}
<
Radio
.
Group
onChange=
{
onSuggestChange
}
className=
'mb-3 ml-7'
>
{
...
...
@@ -815,30 +805,12 @@ const ImportActionTable = (props) => {
})
}
</
Radio
.
Group
>
</>
)
}
{
englishSuggests
&&
englishSuggests
.
length
>
0
&&
(
<>
{
/* <Divider orientation="left">智能推荐</Divider> */
}
<
Radio
.
Group
onChange=
{
onEnglishSuggestChange
}
className=
'mb-3 ml-7'
>
{
englishSuggests
&&
englishSuggests
.
map
((
suggest
,
index
)
=>
{
return
(
<
Radio
key=
{
index
}
value=
{
index
}
className=
'mt-3'
style=
{
{
display
:
'block'
}
}
>
{
suggest
||
''
}
</
Radio
>
)
})
}
</
Radio
.
Group
>
</>
</
React
.
Fragment
>
)
}
</>
</
React
.
Fragment
>
}
</>
</
React
.
Fragment
>
),
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
{
return
null
;
...
...
src/view/Manage/Model/Component/ImportModal.jsx
View file @
388f84a0
...
...
@@ -99,7 +99,6 @@ const ImportModal = (props) => {
visible=
{
visible
}
title=
{
title
}
width=
{
520
}
maskClosable=
{
false
}
onCancel=
{
cancel
}
footer=
{
footer
}
>
...
...
src/view/Manage/Model/index.jsx
View file @
388f84a0
...
...
@@ -6,7 +6,7 @@ import ModelTree from './Component/ModelTree';
import
ModelTable
from
'./Component/ModelTable'
;
import
WordTemplateModal
from
'./Component/WordTemplateModal'
;
import
TemplateCURDModal
from
'./Component/TemplateCURDModal'
;
import
ConstraintDetail
Modal
from
'./Component/ConstraintDetailModal
'
;
import
ConstraintDetail
Drawer
from
'./Component/ConstraintDetailDrawer
'
;
import
ImportModal
from
'./Component/ImportModal'
;
import
ImportWordModal
from
'./Component/ImportWordModal'
;
import
ExportDDLModal
from
'./Component/ExportDDLModal'
;
...
...
@@ -23,7 +23,7 @@ class Model extends React.Component {
this
.
state
=
{
wordTemplateModalVisible
:
false
,
templateCURDModalVisible
:
false
,
constraintDetail
Modal
Visible
:
false
,
constraintDetail
Drawer
Visible
:
false
,
importModalVisible
:
false
,
importWordModalVisible
:
false
,
exportDDLModalVisible
:
false
,
...
...
@@ -153,7 +153,7 @@ class Model extends React.Component {
}
onConstraintDetailClick
=
()
=>
{
this
.
setState
({
constraintDetail
Modal
Visible
:
true
});
this
.
setState
({
constraintDetail
Drawer
Visible
:
true
});
}
setFilterData
=
()
=>
{
...
...
@@ -287,8 +287,8 @@ class Model extends React.Component {
refresh
&&
this
.
onTableChange
();
}
onConstraintDetail
Modal
Cancel
=
()
=>
{
this
.
setState
({
constraintDetail
Modal
Visible
:
false
});
onConstraintDetail
Drawer
Cancel
=
()
=>
{
this
.
setState
({
constraintDetail
Drawer
Visible
:
false
});
}
onImportModalCancel
=
(
hints
=
[])
=>
{
...
...
@@ -313,7 +313,7 @@ class Model extends React.Component {
}
render
()
{
const
{
importModalVisible
,
catalogId
,
loadingTableData
,
selectModelerIds
,
keyword
,
filterTableData
,
selectModelerNames
,
importModalAddMode
,
exportErwinLoading
,
exportDDLModalVisible
,
templateCURDModalVisible
,
wordTemplateModalVisible
,
constraintDetail
Modal
Visible
,
importWordModalVisible
,
loadingStates
,
modelStates
,
currentModelState
,
currentView
}
=
this
.
state
;
const
{
importModalVisible
,
catalogId
,
loadingTableData
,
selectModelerIds
,
keyword
,
filterTableData
,
selectModelerNames
,
importModalAddMode
,
exportErwinLoading
,
exportDDLModalVisible
,
templateCURDModalVisible
,
wordTemplateModalVisible
,
constraintDetail
Drawer
Visible
,
importWordModalVisible
,
loadingStates
,
modelStates
,
currentModelState
,
currentView
}
=
this
.
state
;
const
content
=
(
<
ModelTable
loading=
{
loadingTableData
}
catalogId=
{
catalogId
}
data=
{
filterTableData
}
view=
{
currentView
}
loadingStates=
{
loadingStates
}
modelStates=
{
modelStates
}
currentModelState=
{
currentModelState
}
keyword=
{
keyword
}
onChange=
{
this
.
onTableChange
}
onSelect=
{
this
.
onTableSelect
}
onItemAction=
{
this
.
onTableItemAction
}
onModelStateChange=
{
this
.
onModelStateChange
}
onSearchInputChange=
{
this
.
onSearchInputChange
}
{
...
this
.
props
}
/>
...
...
@@ -385,9 +385,9 @@ class Model extends React.Component {
onCancel=
{
this
.
onTemplateCURDModalCancel
}
/>
<
ConstraintDetail
Modal
visible=
{
constraintDetail
Modal
Visible
}
onCancel=
{
this
.
onConstraintDetail
Modal
Cancel
}
<
ConstraintDetail
Drawer
visible=
{
constraintDetail
Drawer
Visible
}
onCancel=
{
this
.
onConstraintDetail
Drawer
Cancel
}
/>
<
ImportModal
...
...
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