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
0b873519
Commit
0b873519
authored
Jan 20, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型字段编辑
parent
acfbab7e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
12 deletions
+49
-12
EditModel.jsx
src/view/Manage/Model/Component/EditModel.jsx
+4
-0
ImportActionIndex.jsx
src/view/Manage/Model/Component/ImportActionIndex.jsx
+33
-4
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+12
-8
No files found.
src/view/Manage/Model/Component/EditModel.jsx
View file @
0b873519
...
@@ -109,6 +109,10 @@ const EditModel = (props) => {
...
@@ -109,6 +109,10 @@ const EditModel = (props) => {
newModelerData
.
easyDataModelerModelingTemplate
=
null
;
newModelerData
.
easyDataModelerModelingTemplate
=
null
;
}
}
if
(
newModelerData
.
partition
&&
(
!
newModelerData
.
partition
.
partitionType
||
newModelerData
.
partition
.
partitionType
===
{}
||
(
newModelerData
.
partition
.
keys
||
[]).
length
===
0
))
{
newModelerData
.
partition
=
null
;
}
if
(
action
===
'add'
&&
(
cid
||
''
)
===
''
&&
((
catalogId
||
''
)
===
''
))
{
if
(
action
===
'add'
&&
(
cid
||
''
)
===
''
&&
((
catalogId
||
''
)
===
''
))
{
setCatalogModalVisible
(
true
);
setCatalogModalVisible
(
true
);
return
;
return
;
...
...
src/view/Manage/Model/Component/ImportActionIndex.jsx
View file @
0b873519
...
@@ -428,8 +428,8 @@ const ImportActionIndex = (props) => {
...
@@ -428,8 +428,8 @@ const ImportActionIndex = (props) => {
}
}
};
};
const
remove
=
(
record
)
=>
{
const
remove
Logic
=
(
record
)
=>
{
const
newData
=
[...
data
];
const
newData
=
[...
data
Ref
.
current
];
const
index
=
newData
.
findIndex
((
item
)
=>
record
.
name
===
item
.
name
);
const
index
=
newData
.
findIndex
((
item
)
=>
record
.
name
===
item
.
name
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
...
@@ -437,8 +437,37 @@ const ImportActionIndex = (props) => {
...
@@ -437,8 +437,37 @@ const ImportActionIndex = (props) => {
}
}
onChange
&&
onChange
(
newData
);
onChange
&&
onChange
(
newData
);
}
setEditingKey
(
null
);
const
remove
=
(
record
)
=>
{
if
(
record
.
name
===
''
)
{
const
newData
=
[...
dataRef
.
current
];
onChange
&&
onChange
(
newData
);
}
else
{
if
(
record
.
name
!==
editingKey
)
{
save
().
then
(
result
=>
{
if
(
result
)
{
removeLogic
(
record
);
}
})
}
else
{
removeLogic
(
record
);
}
}
save
().
then
(
result
=>
{
if
(
result
)
{
const
newData
=
[...
dataRef
.
current
];
const
index
=
newData
.
findIndex
((
item
)
=>
record
.
name
===
item
.
name
);
if
(
index
!==
-
1
)
{
newData
.
splice
(
index
,
1
);
}
onChange
&&
onChange
(
newData
);
}
})
}
}
const
save
=
async
()
=>
{
const
save
=
async
()
=>
{
...
@@ -676,7 +705,7 @@ const ImportActionIndex = (props) => {
...
@@ -676,7 +705,7 @@ const ImportActionIndex = (props) => {
}
}
title=
"规则详情"
title=
"规则详情"
>
>
<
a
href=
""
>
详情
</
a
>
<
a
href=
"
#
"
>
详情
</
a
>
</
Popover
>
</
Popover
>
}
}
</
div
>
</
div
>
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
0b873519
...
@@ -404,8 +404,6 @@ const ImportActionTable = (props) => {
...
@@ -404,8 +404,6 @@ const ImportActionTable = (props) => {
...
record
,
...
record
,
});
});
console
.
log
(
'record'
,
record
);
setEditingKey
(
record
?.
iid
);
setEditingKey
(
record
?.
iid
);
setAutoTranslate
((
record
?.
name
||
''
)
===
''
);
setAutoTranslate
((
record
?.
name
||
''
)
===
''
);
...
@@ -428,8 +426,8 @@ const ImportActionTable = (props) => {
...
@@ -428,8 +426,8 @@ const ImportActionTable = (props) => {
}
}
};
};
const
remove
=
(
record
)
=>
{
const
remove
Logic
=
(
record
)
=>
{
const
newData
=
[...
data
];
const
newData
=
[...
moveRowRef
.
current
.
data
];
const
index
=
newData
.
findIndex
((
item
)
=>
record
.
iid
===
item
.
iid
);
const
index
=
newData
.
findIndex
((
item
)
=>
record
.
iid
===
item
.
iid
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
...
@@ -437,11 +435,17 @@ const ImportActionTable = (props) => {
...
@@ -437,11 +435,17 @@ const ImportActionTable = (props) => {
}
}
onChange
&&
onChange
(
newData
);
onChange
&&
onChange
(
newData
);
}
if
(
editingKey
===
record
.
iid
)
{
const
remove
=
(
record
)
=>
{
setEditingKey
(
''
);
if
(
record
.
iid
!==
editingKey
)
{
setSuggests
([]);
save
().
then
(
result
=>
{
setEnglishSuggests
([]);
if
(
result
)
{
removeLogic
(
record
);
}
})
}
else
{
removeLogic
(
record
);
}
}
}
}
...
...
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