Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
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
ReactWeb5
CivManage
Commits
4c1e494d
Commit
4c1e494d
authored
Dec 04, 2020
by
陈前坚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: dictionary
parent
73291171
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
25 deletions
+32
-25
WebDic.js
src/pages/platformCenter/dictionary/WebDic.js
+27
-25
WebDic.less
src/pages/platformCenter/dictionary/WebDic.less
+5
-0
No files found.
src/pages/platformCenter/dictionary/WebDic.js
View file @
4c1e494d
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Table
,
Tooltip
,
Spin
,
Modal
,
Form
,
...
...
@@ -13,6 +14,7 @@ import {
Row
,
Col
,
}
from
'antd'
;
import
{
EditTwoTone
,
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
get
}
from
'@/services/index'
;
import
styles
from
'./WebDic.less'
;
...
...
@@ -51,26 +53,25 @@ const WebDic = () => {
{
title
:
'操作'
,
key
:
'action'
,
width
:
1
3
0
,
width
:
1
0
0
,
render
:
record
=>
(
<
Space
>
<
Button
type
=
"primary"
size
=
"small"
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
)
{
setSelectColor
(
record
);
}
setEditVisible
(
true
);
editForm
.
setFieldsValue
({
nodeName1
:
record
.
nodeName
,
nodeValue
:
record
.
nodeValue
,
});
}}
>
修改
<
/Button
>
<
Tooltip
title
=
"编辑"
>
<
EditTwoTone
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
)
{
setSelectColor
(
record
);
}
setEditVisible
(
true
);
editForm
.
setFieldsValue
({
nodeName1
:
record
.
nodeName
,
nodeValue
:
record
.
nodeValue
,
});
}}
style
=
{{
fontSize
:
'16px'
}}
/
>
<
/Tooltip
>
<
div
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
Popconfirm
title
=
"是否删除该数据?"
...
...
@@ -78,18 +79,19 @@ const WebDic = () => {
cancelText
=
"取消"
onConfirm
=
{
submitDelete
}
>
<
Button
size
=
"small"
danger
<
DeleteOutlined
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
)
{
setSelectColor
(
record
);
}
}}
>
删除
<
/Button
>
style
=
{{
fontSize
:
'16px'
,
margin
:
'0px 10px'
,
color
:
'#e86060'
,
}}
/
>
<
/Popconfirm
>
<
/div
>
<
/Space
>
...
...
@@ -275,7 +277,7 @@ const WebDic = () => {
<
div
className
=
{
styles
.
WebDic
}
>
<
Spin
spinning
=
{
loading
}
tip
=
"loading..."
>
<
Row
style
=
{{
background
:
'white'
}}
>
<
Col
span
=
{
12
}
>
<
Col
span
=
{
12
}
className
=
{
styles
.
left
}
>
<
div
style
=
{{
marginBottom
:
'10px'
,
fontSize
:
'16px'
}}
>
<
span
style
=
{{
padding
:
'0 10px'
}}
>
一级条目
<
/span
>
<
Button
type
=
"primary"
size
=
"small"
onClick
=
{()
=>
setItem
(
1
)}
>
...
...
src/pages/platformCenter/dictionary/WebDic.less
View file @
4c1e494d
...
...
@@ -34,6 +34,11 @@
z-index: 999;
border-top: 1px solid #f0eded;
}
.left{
.ant-pagination{
border-right: 1px solid #f0eded;
}
}
.ant-table-pagination{
padding-top: 16px;
background: white;
...
...
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