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
bf9e671d
Commit
bf9e671d
authored
Dec 02, 2021
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模型增加路径
parent
0c5beccc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
22 deletions
+43
-22
ImportActionIndex.jsx
src/view/Manage/Model/Component/ImportActionIndex.jsx
+3
-1
ImportActionTable.jsx
src/view/Manage/Model/Component/ImportActionTable.jsx
+2
-2
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+38
-19
No files found.
src/view/Manage/Model/Component/ImportActionIndex.jsx
View file @
bf9e671d
...
...
@@ -389,12 +389,14 @@ const ImportActionIndex = (props) => {
}
if
(
index
===
-
1
)
{
newData
.
splice
(
0
,
0
,
{
newData
.
push
({
name
:
row
.
name
,
unique
:
row
.
unique
,
indexedEasyDataModelAttributes
:
_indexedEasyDataModelAttributes
,
indexedAttributeOrders
:
_indexedAttributeOrders
,
});
}
else
{
newData
.
splice
(
index
,
1
,
{...{
name
:
row
.
name
,
...
...
src/view/Manage/Model/Component/ImportActionTable.jsx
View file @
bf9e671d
...
...
@@ -365,9 +365,9 @@ const ImportActionTable = (props) => {
}
if
(
index
===
-
1
)
{
newData
.
splice
(
0
,
0
,
{...
row
,
iid
:
editingKey
,
modelingTemplateTag
:
null
});
newData
.
push
({...
row
,
iid
:
editingKey
,
modelingTemplateTag
:
null
});
}
else
{
const
item
=
newData
[
index
];
newData
.
splice
(
index
,
1
,
{
...
item
,
...
row
,
modelingTemplateTag
:
null
});
...
...
src/view/Manage/Model/Component/ModelTable.jsx
View file @
bf9e671d
...
...
@@ -124,24 +124,24 @@ const ModelTable = (props) => {
width
:
100
,
ellipsis
:
true
,
},
{
title
:
'标签'
,
dataIndex
:
'tag'
,
width
:
200
,
onCell
:
(
record
)
=>
({
onMouseEnter
:
event
=>
{
setMouseEnterKey
(
record
.
id
);
},
onMouseLeave
:
event
=>
{
setMouseEnterKey
(
null
);
},
}),
render
:
(
_
,
record
)
=>
{
return
(
record
.
id
===
mouseEnterKey
?<
Tag
styleType=
'complex'
id=
{
record
.
id
}
/>:<
Tag
id=
{
record
.
id
}
/>
);
}
},
//
{
//
title: '标签',
//
dataIndex: 'tag',
//
width: 200,
//
onCell: (record) => ({
//
onMouseEnter: event => {
//
setMouseEnterKey(record.id);
//
},
//
onMouseLeave: event => {
//
setMouseEnterKey(null);
//
},
//
}),
//
render: (_,record) => {
//
return (
//
record.id===mouseEnterKey?<Tag styleType='complex' id={record.id} />:<Tag id={record.id} />
//
);
//
}
//
},
{
title
:
'操作'
,
key
:
'action'
,
...
...
@@ -214,6 +214,20 @@ const ModelTable = (props) => {
},
];
const
pathColumn
=
{
title
:
'路径'
,
dataIndex
:
'path'
,
width
:
120
,
ellipsis
:
true
,
render
:
(
text
,
_
,
__
)
=>
{
return
(
<
Tooltip
title=
{
text
||
''
}
>
<
span
>
{
text
||
''
}
</
span
>
</
Tooltip
>
)
}
};
const
[
pagination
,
setPagination
]
=
useState
(
{
pageNum
:
1
,
pageSize
:
20
}
);
const
{
pageNum
,
pageSize
}
=
pagination
;
...
...
@@ -478,8 +492,13 @@ const ModelTable = (props) => {
}
let
_columns
=
[...
columns
];
if
((
modelId
||
''
)
===
''
&&
(
view
===
'state'
||
(
keyword
||
''
)
!==
''
))
{
_columns
.
splice
(
3
,
0
,
pathColumn
);
}
if
((
modelId
||
''
)
!==
''
)
{
_columns
=
columns
.
filter
(
item
=>
item
.
dataIndex
!==
'key'
)
_columns
=
_
columns
.
filter
(
item
=>
item
.
dataIndex
!==
'key'
)
}
return
(
...
...
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