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
884921f8
Commit
884921f8
authored
Jul 23, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据字典界面UI
parent
a42d0aca
Pipeline
#32046
skipped with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
10 deletions
+22
-10
AppDic.js
src/pages/dataCenter/dictionary1/AppDic.js
+3
-2
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+14
-8
WebDic.less
src/pages/dataCenter/dictionary1/WebDic.less
+5
-0
No files found.
src/pages/dataCenter/dictionary1/AppDic.js
View file @
884921f8
...
...
@@ -274,7 +274,7 @@ const AppDic = () => {
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
set
Add
Visible
(
false
);
set
Edit
Visible
(
false
);
getData
();
notification
.
success
({
message
:
'提交成功'
,
...
...
@@ -317,11 +317,12 @@ const AppDic = () => {
// .catch(err => {
// message.error(err);
// });
console
.
log
(
select
)
DeleteKeyValue
({
key
:
select
.
Key
,
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
=
0
)
{
getData
(
select
.
parentID
);
notification
.
success
({
message
:
'删除成功'
,
...
...
src/pages/dataCenter/dictionary1/WebDic.js
View file @
884921f8
...
...
@@ -32,6 +32,7 @@ const WebDic = () => {
const
[
searchData
,
setSearchData
]
=
useState
([]);
// 搜索框表格数据
const
[
first
,
setFirst
]
=
useState
(
true
);
// 是否第一次加载
const
[
select
,
setSelect
]
=
useState
({});
// 当前选中条目,可以是一级/二级,修改/删除时设置
const
[
twoSelectColor
,
setTwoSelectColor
]
=
useState
({});
const
[
selectColor
,
setSelectColor
]
=
useState
({});
// 当前选中一级条目颜色,修改/删除时设置
const
[
selectID
,
setSelectID
]
=
useState
(
'-1'
);
// 当前选中一级条目的ID,添加二级条目时使用
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
//添加二级条目
...
...
@@ -220,8 +221,13 @@ const WebDic = () => {
}
]
const
setRowClassName
=
record
=>
record
.
nodeID
===
selectColor
.
nodeID
?
styles
.
clickRowStyle
:
''
;
const
setRowClassName
=
record
=>
{
return
record
.
nodeID
===
selectColor
.
nodeID
?
styles
.
clickRowStyle
:
''
;
}
const
setRowClassName1
=
record
=>
{
return
record
.
nodeID
===
twoSelectColor
.
nodeID
?
styles
.
clickRowStyle
:
''
;
}
// 获取搜索框的值
const
handleSearch
=
e
=>
{
...
...
@@ -601,16 +607,16 @@ const WebDic = () => {
<
Table
size
=
"small"
bordered
width
=
"99%"
columns
=
{
columns1
}
className
=
{
styles
.
tab
}
dataSource
=
{
subData
}
scroll
=
{{
x
:
'max-content'
,
y
:
'calc(100vh - 340px)'
}}
rowClassName
=
{
setRowClassName
}
rowClassName
=
{
setRowClassName
1
}
onRow
=
{
record
=>
({
onClick
:
()
=>
{
setSelect
(
record
);
setSelectColor
(
record
);
set
Two
SelectColor
(
record
);
setSelectID
(
record
.
nodeID
);
},
})}
...
...
@@ -728,7 +734,7 @@ const WebDic = () => {
))}
<
Form
.
Item
>
<
Button
type
=
"dashed"
onClick
=
{()
=>
add
()}
block
icon
=
{
<
PlusOutlined
/>
}
style
=
{{
width
:
'353px'
,
marginLeft
:
'61px'
}}
>
新增
表单
项
新增
条目
项
<
/Button
>
<
/Form.Item
>
<
/
>
...
...
@@ -820,7 +826,7 @@ const WebDic = () => {
/
>
<
/Modal
>
<
Modal
title
=
{
'
查找条目
'
}
title
=
{
'
导入数据
'
}
visible
=
{
InPutVisible
}
onOk
=
{
input1
}
onCancel
=
{()
=>
{
...
...
@@ -829,7 +835,7 @@ const WebDic = () => {
okText
=
"确认"
cancelText
=
"取消"
>
<
Upload
{...
props
}
>
<
UploadOutlined
/><
span
style
=
{{
verticalAlign
:
'middle'
,
marginLeft
:
'6px'
,
marginRight
:
"40px"
,
cursor
:
"pointer"
}}
><
a
style
=
{{
color
:
'rgb
a(0, 0, 0, 0.85)'
}}
>
导入数据
<
/a></
span
>
<
UploadOutlined
/><
span
style
=
{{
verticalAlign
:
'middle'
,
marginLeft
:
'6px'
,
marginRight
:
"40px"
,
cursor
:
"pointer"
}}
><
a
style
=
{{
color
:
'rgb
(24 144 255)'
}}
>
请选择将要导入的数据文件(仅支持
Excel
文件)
<
/a></
span
>
<
/Upload
>
<
/Modal
>
<
/div
>
...
...
src/pages/dataCenter/dictionary1/WebDic.less
View file @
884921f8
...
...
@@ -24,6 +24,7 @@
.ant-table-body{
max-height: calc(100vh - 338px) !important;
min-height:calc(100vh - 338px);
margin-right: -6px;
}
.ant-table-pagination.ant-pagination {
margin: 10px 0 !important;
...
...
@@ -37,5 +38,8 @@
margin-right: -7px;
}
}
.ant-table-wrapper {
max-width: 98%;
}
}
\ No newline at end of file
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