Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
b6261b47
Commit
b6261b47
authored
Apr 01, 2018
by
ddcat1115
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #1209
parent
13725bcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
60 deletions
+62
-60
src/routes/List/TableList.js
src/routes/List/TableList.js
+62
-60
No files found.
src/routes/List/TableList.js
View file @
b6261b47
...
...
@@ -32,66 +32,6 @@ const getValue = obj =>
.
join
(
'
,
'
);
const
statusMap
=
[
'
default
'
,
'
processing
'
,
'
success
'
,
'
error
'
];
const
status
=
[
'
关闭
'
,
'
运行中
'
,
'
已上线
'
,
'
异常
'
];
const
columns
=
[
{
title
:
'
规则编号
'
,
dataIndex
:
'
no
'
,
},
{
title
:
'
描述
'
,
dataIndex
:
'
description
'
,
},
{
title
:
'
服务调用次数
'
,
dataIndex
:
'
callNo
'
,
sorter
:
true
,
align
:
'
right
'
,
render
:
val
=>
`
${
val
}
万`
,
// mark to display a total number
needTotal
:
true
,
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
filters
:
[
{
text
:
status
[
0
],
value
:
0
,
},
{
text
:
status
[
1
],
value
:
1
,
},
{
text
:
status
[
2
],
value
:
2
,
},
{
text
:
status
[
3
],
value
:
3
,
},
],
render
(
val
)
{
return
<
Badge
status
=
{
statusMap
[
val
]}
text
=
{
status
[
val
]}
/>
;
},
},
{
title
:
'
更新时间
'
,
dataIndex
:
'
updatedAt
'
,
sorter
:
true
,
render
:
val
=>
<
span
>
{
moment
(
val
).
format
(
'
YYYY-MM-DD HH:mm:ss
'
)}
<
/span>
,
},
{
title
:
'
操作
'
,
render
:
()
=>
(
<
Fragment
>
<
a
href
=
""
>
配置
<
/a
>
<
Divider
type
=
"
vertical
"
/>
<
a
href
=
""
>
订阅警报
<
/a
>
<
/Fragment
>
),
},
];
const
CreateForm
=
Form
.
create
()(
props
=>
{
const
{
modalVisible
,
form
,
handleAdd
,
handleModalVisible
}
=
props
;
...
...
@@ -375,6 +315,68 @@ export default class TableList extends PureComponent {
const
{
rule
:
{
data
},
loading
}
=
this
.
props
;
const
{
selectedRows
,
modalVisible
}
=
this
.
state
;
const
columns
=
[
{
title
:
'
规则编号
'
,
dataIndex
:
'
no
'
,
},
{
title
:
'
描述
'
,
dataIndex
:
'
description
'
,
},
{
title
:
'
服务调用次数
'
,
dataIndex
:
'
callNo
'
,
sorter
:
true
,
align
:
'
right
'
,
render
:
val
=>
`
${
val
}
万`
,
// mark to display a total number
needTotal
:
true
,
},
{
title
:
'
状态
'
,
dataIndex
:
'
status
'
,
filters
:
[
{
text
:
status
[
0
],
value
:
0
,
},
{
text
:
status
[
1
],
value
:
1
,
},
{
text
:
status
[
2
],
value
:
2
,
},
{
text
:
status
[
3
],
value
:
3
,
},
],
onFilter
:
(
value
,
record
)
=>
record
.
status
.
toString
()
===
value
,
render
(
val
)
{
return
<
Badge
status
=
{
statusMap
[
val
]}
text
=
{
status
[
val
]}
/>
;
},
},
{
title
:
'
更新时间
'
,
dataIndex
:
'
updatedAt
'
,
sorter
:
true
,
render
:
val
=>
<
span
>
{
moment
(
val
).
format
(
'
YYYY-MM-DD HH:mm:ss
'
)}
<
/span>
,
},
{
title
:
'
操作
'
,
render
:
()
=>
(
<
Fragment
>
<
a
href
=
""
>
配置
<
/a
>
<
Divider
type
=
"
vertical
"
/>
<
a
href
=
""
>
订阅警报
<
/a
>
<
/Fragment
>
),
},
];
const
menu
=
(
<
Menu
onClick
=
{
this
.
handleMenuClick
}
selectedKeys
=
{[]}
>
<
Menu
.
Item
key
=
"
remove
"
>
删除
<
/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