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
bbb6189b
Commit
bbb6189b
authored
Aug 04, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型列表增加状态
parent
90714323
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+13
-6
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+9
-1
No files found.
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
bbb6189b
...
...
@@ -282,6 +282,12 @@ const ImportActionTable = (props) => {
});
setEditingKey
(
record
.
iid
);
if
((
record
.
cnName
||
''
)
!==
''
)
{
onValuesChange
({
cnName
:
record
.
cnName
},
record
,
1
,
record
.
iid
);
}
else
if
((
record
.
name
||
''
)
!==
''
)
{
onValuesChange
({
name
:
record
.
name
},
record
,
1
,
record
.
iid
);
}
};
const
remove
=
(
record
)
=>
{
...
...
@@ -294,10 +300,11 @@ const ImportActionTable = (props) => {
const
cancel
=
()
=>
{
const
newFilterData
=
[...
filterData
];
const
index
=
newFilterData
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
const
_index
=
(
data
||
[])
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
const
index
=
newFilterData
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
const
item
=
newFilterData
[
index
];
if
(
!
item
.
name
||
item
.
name
===
''
)
{
if
(
_index
===-
1
&&
(
!
item
.
name
||
item
.
name
===
''
)
)
{
newFilterData
.
splice
(
index
,
1
);
setFilterData
(
newFilterData
);
}
...
...
@@ -361,7 +368,7 @@ const ImportActionTable = (props) => {
}
};
const
onValuesChange
=
(
changedValues
,
allValues
,
offset
=
1
)
=>
{
const
onValuesChange
=
(
changedValues
,
allValues
,
offset
=
1
,
iid
=
editingKey
)
=>
{
// console.log('changed values', changedValues);
// console.log('all values', allValues);
...
...
@@ -370,10 +377,10 @@ const ImportActionTable = (props) => {
if
(
changedValues
.
hasOwnProperty
(
'cnName'
)
||
changedValues
.
hasOwnProperty
(
'name'
))
{
const
newData
=
[...
data
];
const
index
=
newData
.
findIndex
((
item
)
=>
editingKey
===
item
.
iid
);
const
index
=
newData
.
findIndex
((
item
)
=>
iid
===
item
.
iid
);
if
(
index
===
-
1
)
{
newData
.
splice
(
0
,
0
,
{
iid
:
editingKey
,
...
allValues
});
newData
.
splice
(
0
,
0
,
{
iid
,
...
allValues
});
}
else
if
(
index
!==
-
1
)
{
const
item
=
newData
[
index
];
newData
.
splice
(
index
,
1
,
{
...
item
,
...
allValues
});
...
...
@@ -387,7 +394,7 @@ const ImportActionTable = (props) => {
payload
:
{
data
:
{
...
modelerData
,
easyDataModelerDataModelAttributes
:
newData
},
params
:
{
easyDataModelerDataModelAttributeIid
:
editingKey
,
easyDataModelerDataModelAttributeIid
:
iid
,
topN
:
(
offset
+
perSuggestCount
-
1
),
offset
}
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
bbb6189b
...
...
@@ -60,10 +60,18 @@ const ModelTable = (props) => {
{
title
:
'模型描述'
,
dataIndex
:
'remark'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
width
:
100
,
ellipsis
:
true
,
render
:
(
_
,
record
)
=>
{
return
record
?.
state
?.
cnName
||
''
;
}
},
{
title
:
'操作'
,
key
:
'action'
,
width
:
200
,
...
...
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