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
e53e80b1
Commit
e53e80b1
authored
Aug 23, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改模型bug
parent
daaf9476
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
25 deletions
+30
-25
ImportAction.jsx
src/view/Manage/Model/Component/ImportAction.jsx
+3
-1
ImportActionIndex.jsx
src/view/Manage/Model/Component/ImportActionIndex.jsx
+2
-10
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+6
-11
ImportActionTable.less
src/view/Manage/Model/Component/ImportActionTable.less
+1
-1
ImportStockWordDrawer.jsx
src/view/Manage/Model/Component/ImportStockWordDrawer.jsx
+2
-1
index.jsx
src/view/Manage/Model/index.jsx
+16
-1
No files found.
src/view/Manage/Model/Component/ImportAction.jsx
View file @
e53e80b1
...
@@ -21,7 +21,7 @@ const ImportAction = (props) => {
...
@@ -21,7 +21,7 @@ const ImportAction = (props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
((
action
||
''
)
===
''
||
(
action
===
'add'
&&
(
hints
||
[]).
length
===
0
&&
(
ddl
||
''
).
length
===
0
&&
(
modelerId
||
''
)
===
''
&&
roughModelerData
===
{})
)
return
;
if
((
action
||
''
)
===
''
)
return
;
//初始化form状态
//初始化form状态
if
(
action
===
'add'
||
action
===
'edit'
)
{
if
(
action
===
'add'
||
action
===
'edit'
)
{
...
@@ -53,6 +53,8 @@ const ImportAction = (props) => {
...
@@ -53,6 +53,8 @@ const ImportAction = (props) => {
}
else
if
(
roughModelerData
!==
{})
{
}
else
if
(
roughModelerData
!==
{})
{
setLoading
(
false
);
setLoading
(
false
);
getExtraData
(
roughModelerData
);
getExtraData
(
roughModelerData
);
}
else
{
setLoading
(
false
);
}
}
}
else
if
(
action
===
'edit'
||
action
===
'detail'
)
{
}
else
if
(
action
===
'edit'
||
action
===
'detail'
)
{
getCurrentDataModel
();
getCurrentDataModel
();
...
...
src/view/Manage/Model/Component/ImportActionIndex.jsx
View file @
e53e80b1
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
{
Input
,
Form
,
Typography
,
Divider
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
}
from
'antd'
;
import
{
Input
,
Form
,
Typography
,
Divider
,
Button
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
,
Table
}
from
'antd'
;
import
{
QuestionCircleOutlined
,
DeleteOutlined
,
CloseOutlined
,
CheckOutlined
}
from
'@ant-design/icons'
;
import
{
QuestionCircleOutlined
,
DeleteOutlined
,
CloseOutlined
,
CheckOutlined
}
from
'@ant-design/icons'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
import
update
from
'immutability-helper'
;
import
ProTable
from
"@ant-design/pro-table"
;
import
Helper
from
'./Help'
;
import
Helper
from
'./Help'
;
import
{
showMessage
,
highlightSearchContentByTerms
}
from
'../../../../util'
;
import
{
showMessage
,
highlightSearchContentByTerms
}
from
'../../../../util'
;
...
@@ -669,7 +668,7 @@ const ImportActionIndex = (props) => {
...
@@ -669,7 +668,7 @@ const ImportActionIndex = (props) => {
<
div
id=
"containerId"
>
<
div
id=
"containerId"
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Pro
Table
<
Table
components=
{
{
components=
{
{
body
:
{
body
:
{
cell
:
EditableCell
,
cell
:
EditableCell
,
...
@@ -691,13 +690,6 @@ const ImportActionIndex = (props) => {
...
@@ -691,13 +690,6 @@ const ImportActionIndex = (props) => {
rowKey=
'name'
rowKey=
'name'
rowClassName=
"editable-row"
rowClassName=
"editable-row"
pagination=
{
false
}
pagination=
{
false
}
search=
{
false
}
options=
{
{
density
:
false
,
setting
:
false
,
reload
:
false
,
}
}
columnEmptyText=
{
false
}
sticky
sticky
/>
/>
</
Form
>
</
Form
>
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
e53e80b1
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useCallback
,
useRef
,
useEffect
}
from
'react'
;
import
{
Input
,
Form
,
Typography
,
Radio
,
Divider
,
Button
,
Popconfirm
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
}
from
'antd'
;
import
{
Input
,
Form
,
Typography
,
Radio
,
Divider
,
Button
,
Popconfirm
,
Select
,
Row
,
Col
,
Popover
,
Checkbox
,
Tooltip
,
Table
}
from
'antd'
;
import
{
QuestionCircleOutlined
,
CloseOutlined
,
CheckOutlined
}
from
'@ant-design/icons'
;
import
{
QuestionCircleOutlined
,
CloseOutlined
,
CheckOutlined
}
from
'@ant-design/icons'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
DndProvider
,
useDrag
,
useDrop
}
from
'react-dnd'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
{
HTML5Backend
}
from
'react-dnd-html5-backend'
;
import
update
from
'immutability-helper'
;
import
update
from
'immutability-helper'
;
import
ProTable
from
"@ant-design/pro-table"
;
import
{
generateUUID
,
highlightSearchContentByTerms
,
showMessage
}
from
'../../../../util'
;
import
{
generateUUID
,
highlightSearchContentByTerms
,
showMessage
}
from
'../../../../util'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
import
{
dispatchLatest
}
from
'../../../../model'
;
...
@@ -278,7 +277,10 @@ const ImportActionTable = (props) => {
...
@@ -278,7 +277,10 @@ const ImportActionTable = (props) => {
form
.
setFieldsValue
({
form
.
setFieldsValue
({
name
:
''
,
name
:
''
,
cnName
:
''
,
cnName
:
''
,
datatype
:
{},
datatype
:
null
,
nullable
:
null
,
partOfPrimaryKey
:
null
,
partOfDistributionKey
:
null
,
remark
:
''
,
remark
:
''
,
defaultValue
:
''
,
defaultValue
:
''
,
definition
:
''
,
definition
:
''
,
...
@@ -855,7 +857,7 @@ const ImportActionTable = (props) => {
...
@@ -855,7 +857,7 @@ const ImportActionTable = (props) => {
<
div
id=
"containerId"
>
<
div
id=
"containerId"
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
DndProvider
backend=
{
HTML5Backend
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Form
form=
{
form
}
component=
{
false
}
onValuesChange=
{
onValuesChange
}
>
<
Pro
Table
<
Table
components=
{
{
components=
{
{
body
:
{
body
:
{
cell
:
EditableCell
,
cell
:
EditableCell
,
...
@@ -883,14 +885,7 @@ const ImportActionTable = (props) => {
...
@@ -883,14 +885,7 @@ const ImportActionTable = (props) => {
size=
'small'
size=
'small'
rowKey=
'iid'
rowKey=
'iid'
pagination=
{
false
}
pagination=
{
false
}
search=
{
false
}
scroll=
{
{
x
:
1500
}
}
scroll=
{
{
x
:
1500
}
}
options=
{
{
density
:
false
,
setting
:
false
,
reload
:
false
,
}
}
columnEmptyText=
{
false
}
sticky
sticky
expandable=
{
{
expandable=
{
{
columnWidth
:
0
,
columnWidth
:
0
,
...
...
src/view/Manage/Model/Component/ImportActionTable.less
View file @
e53e80b1
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
}
}
}
}
.yy-
pro-
table {
.yy-table {
.yy-card-body {
.yy-card-body {
padding: 0 !important;
padding: 0 !important;
}
}
...
...
src/view/Manage/Model/Component/ImportStockWordDrawer.jsx
View file @
e53e80b1
...
@@ -78,7 +78,7 @@ const ImportStockWordModal = (props) => {
...
@@ -78,7 +78,7 @@ const ImportStockWordModal = (props) => {
const
getLogs
=
(
p
=
1
,
s
=
20
)
=>
{
const
getLogs
=
(
p
=
1
,
s
=
20
)
=>
{
setLoading
(
true
);
setLoading
(
true
);
dispatch
({
dispatch
({
type
:
'datamodel
er
.importWordLogs'
,
type
:
'datamodel.importWordLogs'
,
payload
:
{
payload
:
{
params
:
{
params
:
{
page
:
p
,
page
:
p
,
...
@@ -133,6 +133,7 @@ const ImportStockWordModal = (props) => {
...
@@ -133,6 +133,7 @@ const ImportStockWordModal = (props) => {
},
},
callback
:
data
=>
{
callback
:
data
=>
{
setConfirmLoading
(
false
);
setConfirmLoading
(
false
);
setFileList
([]);
getLogs
(
pageNum
,
pageSize
);
getLogs
(
pageNum
,
pageSize
);
onSuccess
&&
onSuccess
();
onSuccess
&&
onSuccess
();
},
},
...
...
src/view/Manage/Model/index.jsx
View file @
e53e80b1
...
@@ -175,6 +175,16 @@ class Model extends React.Component {
...
@@ -175,6 +175,16 @@ class Model extends React.Component {
this
.
setState
({
filterTableData
:
_filterData
});
this
.
setState
({
filterTableData
:
_filterData
});
}
}
onImportUnconditionBtnClick
=
()
=>
{
const
{
catalogId
}
=
this
.
state
;
if
(
!
catalogId
||
catalogId
===
''
)
{
showMessage
(
'info'
,
'请先选择目录'
);
return
;
}
window
.
open
(
`/data-govern/data-model-action?
${
Action
}
=add&
${
CatalogId
}
=
${
catalogId
}
`
);
}
onImportExcelBtnClick
=
()
=>
{
onImportExcelBtnClick
=
()
=>
{
const
{
catalogId
}
=
this
.
state
;
const
{
catalogId
}
=
this
.
state
;
if
(
!
catalogId
||
catalogId
===
''
)
{
if
(
!
catalogId
||
catalogId
===
''
)
{
...
@@ -399,7 +409,9 @@ class Model extends React.Component {
...
@@ -399,7 +409,9 @@ class Model extends React.Component {
onCreateModelMenuClick
=
(
e
)
=>
{
onCreateModelMenuClick
=
(
e
)
=>
{
const
{
key
}
=
e
;
const
{
key
}
=
e
;
if
(
key
===
'excel'
)
{
if
(
key
===
'uncondition'
)
{
this
.
onImportUnconditionBtnClick
();
}
else
if
(
key
===
'excel'
)
{
this
.
onImportExcelBtnClick
();
this
.
onImportExcelBtnClick
();
}
else
if
(
key
===
'excel-copy'
)
{
}
else
if
(
key
===
'excel-copy'
)
{
this
.
onImportExcelCopyBtnClick
();
this
.
onImportExcelCopyBtnClick
();
...
@@ -452,6 +464,9 @@ class Model extends React.Component {
...
@@ -452,6 +464,9 @@ class Model extends React.Component {
const
createModelMenu
=
(
const
createModelMenu
=
(
<
Menu
onClick=
{
this
.
onCreateModelMenuClick
}
>
<
Menu
onClick=
{
this
.
onCreateModelMenuClick
}
>
<
Menu
.
Item
key=
'uncondition'
>
新增
</
Menu
.
Item
>
<
Menu
.
Item
key=
'excel'
>
<
Menu
.
Item
key=
'excel'
>
Excel导入
Excel导入
</
Menu
.
Item
>
</
Menu
.
Item
>
...
...
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