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
a5cad1b7
Commit
a5cad1b7
authored
Oct 28, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化数据字典搜索功能,界面修改
parent
bc4bedf3
Pipeline
#36755
skipped with stages
Changes
12
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
393 additions
and
582 deletions
+393
-582
AppDic.js
src/pages/dataCenter/dictionary/AppDic.js
+0
-0
AppDic.less
src/pages/dataCenter/dictionary/AppDic.less
+0
-45
WebDic.js
src/pages/dataCenter/dictionary/WebDic.js
+0
-0
WebDic.less
src/pages/dataCenter/dictionary/WebDic.less
+0
-48
index.js
src/pages/dataCenter/dictionary/index.js
+324
-17
index.less
src/pages/dataCenter/dictionary/index.less
+45
-0
AppDic.js
src/pages/dataCenter/dictionary1/AppDic.js
+6
-3
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+9
-2
index.js
src/pages/dataCenter/dictionary1/index.js
+1
-1
search.js
src/pages/dataCenter/search.js
+0
-194
search.less
src/pages/dataCenter/search.less
+0
-264
config.js
src/routes/config.js
+8
-8
No files found.
src/pages/dataCenter/dictionary/AppDic.js
deleted
100644 → 0
View file @
bc4bedf3
This diff is collapsed.
Click to expand it.
src/pages/dataCenter/dictionary/AppDic.less
deleted
100644 → 0
View file @
bc4bedf3
.AppDic{
overflow: auto;
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-pagination{
z-index: 999;
background: white;
margin: 2px 0px;
padding:6px 10px;
}
.ant-table-tbody{
.clickRowStyle{
background: #cfe7fd;
}
.clickRowStyle:hover>td{
background: #aed8fa;
}
}
.ant-card-body{
padding: 10px !important;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-table-content{
height:calc(100vh - 258px);
border-right: white;
overflow: auto !important;
}
.ant-pagination{
z-index: 999;
border-top: 1px solid #f0eded;
}
.ant-table-pagination{
padding-right: 12px;
background: white;
margin: 1px 0;
padding:8px;
padding-right: 20px;
}
}
\ No newline at end of file
src/pages/dataCenter/dictionary/WebDic.js
deleted
100644 → 0
View file @
bc4bedf3
This diff is collapsed.
Click to expand it.
src/pages/dataCenter/dictionary/WebDic.less
deleted
100644 → 0
View file @
bc4bedf3
.WebDic{
overflow: auto;
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-pagination{
z-index: 999;
background: white;
margin: 2px 0px;
padding:6px 10px;
}
.ant-table-tbody{
.clickRowStyle{
background: #cfe7fd;
}
.clickRowStyle:hover>td{
background: #aed8fa;
}
}
.ant-card-body{
padding: 10px !important;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-table-content{
height:calc(100vh - 268px);
border-right: white;
overflow: auto !important;
}
.ant-pagination{
z-index: 999;
border-top: 1px solid #f0eded;
}
.left{
.ant-pagination{
border-right: 1px solid #f0eded;
}
}
.ant-table-pagination{
padding-top: 16px;
background: white;
padding-right: 20px;
}
}
\ No newline at end of file
src/pages/dataCenter/dictionary/index.js
View file @
a5cad1b7
import
React
from
'react'
;
/*
import
{
Tabs
,
Card
}
from
'antd'
;
* @Description:
* @Author: leizhe
* @Date: 2021-05-27 16:31:05
* @LastEditTime: 2021-10-28 13:57:57
* @LastEditors: leizhe
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Table
,
Tooltip
,
Spin
,
Modal
,
Form
,
Input
,
Space
,
Popconfirm
,
notification
,
message
,
Button
,
Upload
,
Search
,
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
WebDic
from
'./WebDic'
;
import
{
import
AppDic
from
'./AppDic'
;
EditTwoTone
,
// import VersionPublish from './VersionPublish';
RollbackOutlined
,
DeleteOutlined
,
}
from
'@ant-design/icons'
;
import
{
SearchDataDictionaryList
,
EditDataDictionary
,
DeleteDataDictionary
}
from
'@/services/dataCenter/api'
;
import
styles
from
'./index.less'
;
import
{
useHistory
}
from
'react-router-dom'
;
const
dictionary
=
()
=>
{
const
dictionary
=
()
=>
{
const
{
TabPane
}
=
Tabs
;
const
[
searchData
,
setSearchData
]
=
useState
([]);
// 搜索框表格数据
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
[
editVisible
,
setEditVisible
]
=
useState
(
false
);
//编辑二级条目
const
[
editVisible1
,
setEditVisible1
]
=
useState
(
false
);
//编辑一级条目
const
[
select
,
setSelect
]
=
useState
({});
// 当前选中条目,可以是一级/二级,修改/删除时设置
const
history
=
useHistory
();
const
[
editForm
]
=
Form
.
useForm
();
const
{
Search
}
=
Input
;
const
columns2
=
[
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
名称
<
/span>
,
dataIndex
:
'nodeName'
,
key
:
'nodeName'
,
width
:
'45%'
,
},
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
值
<
/span>
,
dataIndex
:
'nodeValue'
,
key
:
'nodeValue'
,
render
:
record
=>
{
if
(
!
record
)
{
return
'-'
;
}
return
record
;
},
},
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
操作
<
/span>
,
key
:
'action'
,
width
:
100
,
align
:
'center'
,
render
:
record
=>
(
<
Space
>
<
Tooltip
title
=
"编辑"
>
<
EditTwoTone
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
||
record
.
parentID
===
null
)
{
setEditVisible1
(
true
);
}
else
{
setEditVisible
(
true
);
}
editForm
.
setFieldsValue
({
nodeName
:
record
.
nodeName
,
nodeValue
:
record
.
nodeValue
,
});
}}
style
=
{{
fontSize
:
'16px'
}}
/
>
<
/Tooltip
>
<
div
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
Tooltip
title
=
"删除"
>
<
Popconfirm
title
=
"是否确认删除该数据?"
okText
=
"确认"
cancelText
=
"取消"
onConfirm
=
{
submitDelete
}
placement
=
"left"
>
<
DeleteOutlined
onClick
=
{()
=>
{
setSelect
(
record
);
}
}
style
=
{{
fontSize
:
'16px'
,
margin
:
'0px 10px'
,
color
:
'#e86060'
,
}}
/
>
<
/Popconfirm
>
<
/Tooltip
>
<
/div
>
<
/Space
>
),
},
];
//修改
const
submitEdit
=
()
=>
{
const
nodeName
=
editForm
.
getFieldValue
(
'nodeName'
);
const
nodeValue
=
editForm
.
getFieldValue
(
'nodeValue'
);
if
(
nodeName
)
{
EditDataDictionary
({
nodeID
:
select
.
nodeID
,
nodeName
:
nodeName
,
nodeValue
:
nodeValue
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setEditVisible
(
false
);
sumbitSearch
()
// getData(select.parentID === '-1' ? null : select.parentID);
notification
.
success
({
message
:
'提交成功'
,
});
// if (flag1 === 1) {
// sumbitSearch()
// }
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
msg
,
});
}
});
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'名称不能为空'
,
});
}
}
const
submitEdit1
=
()
=>
{
const
nodeName
=
editForm
.
getFieldValue
(
'nodeName'
);
if
(
nodeName
)
{
EditDataDictionary
({
nodeID
:
select
.
nodeID
,
nodeName
:
nodeName
,
nodeValue
:
'null'
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setEditVisible1
(
false
);
sumbitSearch
()
// getData(select.parentID === '-1' ? null : select.parentID);
notification
.
success
({
message
:
'提交成功'
,
});
// if (flag1 === 1) {
// sumbitSearch()
// }
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
res
.
msg
,
});
}
});
}
else
{
notification
.
error
({
message
:
'提交失败'
,
description
:
'名称不能为空'
,
});
}
}
const
sumbitSearch
=
()
=>
{
SearchDataDictionaryList
({
key
:
searchWord
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setSearchData
(
res
.
data
);
}
// else {
// notification.error({
// message: '提交失败',
// description: res.message,
// })
// }
});
};
const
submitDelete
=
()
=>
{
console
.
log
(
select
)
DeleteDataDictionary
({
nodeID
:
select
.
nodeID
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
// if (flag1 === 1) {
// sumbitSearch()
// }
sumbitSearch
()
notification
.
success
({
message
:
'删除成功'
,
});
}
else
{
notification
.
error
({
message
:
'删除失败'
,
description
:
res
.
message
,
});
}
})
.
catch
(
err
=>
{
message
.
error
(
err
);
})
}
// 获取搜索框的值
const
handleSearch
=
e
=>
{
setSearchWord
(
e
.
target
.
value
);
};
const
pagenation
=
{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
'20'
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
};
const
back
=
()
=>
{
history
.
push
({
pathname
:
'/dataCenter/dictionary1'
});
};
return
(
return
(
<
PageContainer
>
<
PageContainer
className
=
{
styles
.
dictionaryContainer
}
>
<
Card
>
<
div
className
=
{
styles
.
containerBox
}
>
<
Tabs
defaultActiveKey
=
"1"
type
=
"card"
>
<
div
className
=
{
styles
.
config
}
>
<
TabPane
tab
=
"通用数据字典"
key
=
"1"
>
<
div
className
=
{
styles
.
title
}
>
<
WebDic
/>
<
Search
<
/TabPane
>
style
=
{{
width
:
500
,
marginBottom
:
25
}}
<
TabPane
tab
=
"App数据字典"
key
=
"2"
type
=
"card"
>
placeholder
=
"输入关键字"
<
AppDic
/>
onSearch
=
{
sumbitSearch
}
<
/TabPane
>
onChange
=
{
e
=>
handleSearch
(
e
)}
<
/Tabs
>
enterButton
<
/Card
>
value
=
{
searchWord
}
/
>
<
/div
>
<
div
className
=
{
styles
.
btn
}
>
<
Button
type
=
"primary"
icon
=
{
<
RollbackOutlined
/>
}
onClick
=
{()
=>
back
()}
>
返回
<
/Button
>
<
/div
>
<
/div
>
<
Table
size
=
'small'
bordered
key
=
""
columns
=
{
columns2
}
dataSource
=
{
searchData
}
scroll
=
{{
y
:
'calc(100vh - 280px)'
}}
pagination
=
{
pagenation
}
onRow
=
{
record
=>
({
onClick
:
()
=>
{
setSelect
(
record
);
},
})}
/
>
<
/div
>
{
/*修改一级条目 */
}
<
Modal
title
=
{
'修改一级条目'
}
visible
=
{
editVisible1
}
onOk
=
{
submitEdit1
}
onCancel
=
{()
=>
{
setEditVisible1
(
false
);
}}
okText
=
"确认"
cancelText
=
"取消"
>
<
Form
form
=
{
editForm
}
labelCol
=
{{
span
:
3
}}
>
<
Form
.
Item
name
=
"nodeName"
label
=
"名称"
rules
=
{[{
required
:
true
,
message
:
'不能为空'
}]}
>
<
Input
placeholder
=
"请输入名称"
style
=
{{
width
:
'90%'
}}
/
>
<
/Form.Item
>
<
/Form
>
<
/Modal
>
{
/*修改二级条目 */
}
<
Modal
title
=
{
'修改二级条目'
}
visible
=
{
editVisible
}
onOk
=
{
submitEdit
}
onCancel
=
{()
=>
{
setEditVisible
(
false
);
}}
okText
=
"确认"
cancelText
=
"取消"
>
<
Form
form
=
{
editForm
}
labelCol
=
{{
span
:
3
}}
>
<
Form
.
Item
name
=
"nodeName"
label
=
"名称"
rules
=
{[{
required
:
true
,
message
:
'不能为空'
}]}
>
<
Input
placeholder
=
"请输入名称"
style
=
{{
width
:
'90%'
}}
/
>
<
/Form.Item
>
<
Form
.
Item
name
=
"nodeValue"
label
=
"值"
>
<
Input
placeholder
=
"请输入值"
style
=
{{
width
:
'90%'
}}
/
>
<
/Form.Item
>
<
/Form
>
<
/Modal
>
<
/PageContainer
>
<
/PageContainer
>
);
);
};
};
...
...
src/pages/dataCenter/dictionary/index.less
0 → 100644
View file @
a5cad1b7
.dictionaryContainer{
.font {
font-weight: bold;
}
.containerBox {
width: 100vm;
height: calc(100vh - 70px) ;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
}
.config{
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn{
display: flex;
justify-content: flex-end;
width: 20rem;
}
.ant-btn{
display: flex;
align-items: center;
margin-left: 20px;
}
}
}
\ No newline at end of file
src/pages/dataCenter/dictionary1/AppDic.js
View file @
a5cad1b7
...
@@ -354,9 +354,12 @@ const AppDic = () => {
...
@@ -354,9 +354,12 @@ const AppDic = () => {
height
:
'calc(100vh-200px)'
,
height
:
'calc(100vh-200px)'
,
display
:
'flex'
,
display
:
'flex'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
justifyContent
:
'space-between'
}}
}}
>
>
<
span
>
数据字典
<
/span
>
<
span
>
数据字典
<
/span
>
<
div
>
<
Tooltip
title
=
"添加"
>
<
Tooltip
title
=
"添加"
>
<
PlusSquareOutlined
<
PlusSquareOutlined
onClick
=
{()
=>
{
onClick
=
{()
=>
{
...
@@ -367,7 +370,7 @@ const AppDic = () => {
...
@@ -367,7 +370,7 @@ const AppDic = () => {
color
:
'#1890FF'
,
color
:
'#1890FF'
,
fontSize
:
'20px'
,
fontSize
:
'20px'
,
marginRight
:
'22px'
,
marginRight
:
'22px'
,
marginLeft
:
'90%'
,
}}
}}
/
>
/
>
<
/Tooltip
>
<
/Tooltip
>
...
@@ -383,13 +386,13 @@ const AppDic = () => {
...
@@ -383,13 +386,13 @@ const AppDic = () => {
style
=
{{
style
=
{{
color
:
'#1890FF'
,
color
:
'#1890FF'
,
fontSize
:
'20px'
,
fontSize
:
'20px'
,
verticalAlign
:
'text-bottom'
,
marginRight
:
'30px'
,
marginRight
:
'30px'
,
float
:
'right'
,
}}
}}
/
>
/
>
<
/Tooltip
>
<
/Tooltip
>
<
/Popconfirm
>
<
/Popconfirm
>
<
/div
>
<
/div
>
<
/div
>
<
Table
<
Table
size
=
"small"
size
=
"small"
...
...
src/pages/dataCenter/dictionary1/WebDic.js
View file @
a5cad1b7
...
@@ -19,6 +19,7 @@ import { EditTwoTone, DeleteOutlined, CloudSyncOutlined, SearchOutlined, PlusSqu
...
@@ -19,6 +19,7 @@ import { EditTwoTone, DeleteOutlined, CloudSyncOutlined, SearchOutlined, PlusSqu
import
{
GetDataDictionaryList
,
EditDataDictionary
,
AddDataDictionary
,
DeleteDataDictionary
,
AddDataDictionaryList
,
SearchDataDictionaryList
,
ExportDataDictionary
,
ImportDataDictionary
}
from
'@/services/dataCenter/api'
import
{
GetDataDictionaryList
,
EditDataDictionary
,
AddDataDictionary
,
DeleteDataDictionary
,
AddDataDictionaryList
,
SearchDataDictionaryList
,
ExportDataDictionary
,
ImportDataDictionary
}
from
'@/services/dataCenter/api'
import
styles
from
'./WebDic.less'
;
import
styles
from
'./WebDic.less'
;
import
{
useHistory
}
from
'react-router-dom'
;
import
map
from
'@/pages/user/login/components/Login/map'
;
import
map
from
'@/pages/user/login/components/Login/map'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
Link
}
from
'react-router-dom'
;
import
{
GetMetaData
}
from
'@/services/platform/gis'
;
import
{
GetMetaData
}
from
'@/services/platform/gis'
;
...
@@ -48,6 +49,7 @@ const WebDic = () => {
...
@@ -48,6 +49,7 @@ const WebDic = () => {
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
flag1
,
setFlag1
]
=
useState
(
0
);
//搜索框数据是否刷新
const
[
flag1
,
setFlag1
]
=
useState
(
0
);
//搜索框数据是否刷新
const
[
isloading
,
setIsloading
]
=
useState
(
false
)
const
[
isloading
,
setIsloading
]
=
useState
(
false
)
const
history
=
useHistory
();
const
[
InPutVisible
,
setInPutVisible
]
=
useState
(
false
);
const
[
InPutVisible
,
setInPutVisible
]
=
useState
(
false
);
...
@@ -348,9 +350,14 @@ const WebDic = () => {
...
@@ -348,9 +350,14 @@ const WebDic = () => {
setIsloading
(
data
)
setIsloading
(
data
)
}
}
}
}
// const onSearch = () => {
// setSearchVisible(true)
// setFlag1(1)
// }
const
onSearch
=
()
=>
{
const
onSearch
=
()
=>
{
setSearchVisible
(
true
)
history
.
push
({
setFlag1
(
1
)
pathname
:
'/dataCenter/dictionary'
});
}
}
//搜索
//搜索
const
sumbitSearch
=
()
=>
{
const
sumbitSearch
=
()
=>
{
...
...
src/pages/dataCenter/dictionary1/index.js
View file @
a5cad1b7
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Description:
* @Description:
* @Author: leizhe
* @Author: leizhe
* @Date: 2021-07-13 16:32:28
* @Date: 2021-07-13 16:32:28
* @LastEditTime: 2021-
07-13 18:02:49
* @LastEditTime: 2021-
10-26 16:38:27
* @LastEditors: leizhe
* @LastEditors: leizhe
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
...
...
src/pages/dataCenter/search.js
deleted
100644 → 0
View file @
bc4bedf3
/*
* @Description:
* @Author: leizhe
* @Date: 2021-10-26 14:27:34
* @LastEditTime: 2021-10-26 15:16:07
* @LastEditors: leizhe
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Table
,
Tooltip
,
Spin
,
Modal
,
Form
,
Input
,
Space
,
Popconfirm
,
notification
,
message
,
Row
,
Col
,
Button
,
Upload
,
}
from
'antd'
;
import
{
EditTwoTone
,
DeleteOutlined
,
CloudSyncOutlined
,
SearchOutlined
,
PlusSquareFilled
,
MinusCircleOutlined
,
PlusOutlined
,
LogoutOutlined
,
DownloadOutlined
,
UploadOutlined
,
}
from
'@ant-design/icons'
;
import
styles
from
'./search.less'
;
import
{
GetDataDictionaryList
,
EditDataDictionary
,
AddDataDictionary
,
DeleteDataDictionary
,
AddDataDictionaryList
,
SearchDataDictionaryList
,
ExportDataDictionary
,
ImportDataDictionary
,
}
from
'@/services/dataCenter/api'
;
const
Search
=
()
=>
{
const
[
searchData
,
setSearchData
]
=
useState
([]);
// 搜索框表格数据
const
[
treeLoading
,
setTreeLoading
]
=
useState
(
false
);
const
[
searchWord
,
setSearchWord
]
=
useState
(
''
);
// 关键字
const
columns2
=
[
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
名称
<
/span>
,
dataIndex
:
'nodeName'
,
key
:
'nodeName'
,
},
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
值
<
/span>
,
dataIndex
:
'nodeValue'
,
width
:
400
,
key
:
'nodeValue'
,
render
:
record
=>
{
if
(
!
record
)
{
return
'-'
;
}
return
record
;
},
},
{
title
:
()
=>
<
span
className
=
{
styles
.
font
}
>
操作
<
/span>
,
key
:
'action'
,
width
:
100
,
align
:
'center'
,
render
:
record
=>
(
<
Space
>
<
Tooltip
title
=
"编辑"
>
<
EditTwoTone
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
)
{
setSelectColor
(
record
);
}
if
(
record
.
parentID
===
'-1'
||
record
.
parentID
===
null
)
{
setEditVisible1
(
true
);
}
else
{
setEditVisible
(
true
);
}
editForm
.
setFieldsValue
({
nodeName
:
record
.
nodeName
,
nodeValue
:
record
.
nodeValue
,
});
}}
style
=
{{
fontSize
:
'16px'
}}
/
>
<
/Tooltip
>
<
div
onClick
=
{
e
=>
e
.
stopPropagation
()}
>
<
Tooltip
title
=
"删除"
>
<
Popconfirm
title
=
"是否确认删除该数据,删除一级目录数据会将其二级目录子数据一起删除?"
okText
=
"确认"
cancelText
=
"取消"
onConfirm
=
{
submitDelete
}
>
<
DeleteOutlined
onClick
=
{()
=>
{
setSelect
(
record
);
if
(
record
.
parentID
===
'-1'
)
{
setSelectColor
(
record
);
}
}}
style
=
{{
fontSize
:
'16px'
,
margin
:
'0px 10px'
,
color
:
'#e86060'
,
}}
/
>
<
/Popconfirm
>
<
/Tooltip
>
<
/div
>
<
/Space
>
),
},
];
const
sumbitSearch
=
()
=>
{
SearchDataDictionaryList
({
key
:
searchWord
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setSearchData
(
res
.
data
);
}
// else {
// notification.error({
// message: '提交失败',
// description: res.message,
// })
// }
});
};
// 获取搜索框的值
const
handleSearch
=
e
=>
{
setSearchWord
(
e
.
target
.
value
);
};
const
pagenation
=
{
showTotal
:
(
total
,
range
)
=>
`第
${
range
[
0
]}
-
${
range
[
1
]}
条/共
${
total
}
条`
,
pageSizeOptions
:
[
10
,
20
,
50
,
100
],
defaultPageSize
:
'20'
,
showQuickJumper
:
true
,
showSizeChanger
:
true
,
};
return
(
<>
<
Spin
tip
=
"loading..."
spinning
=
{
treeLoading
}
>
<
div
className
=
{
styles
.
containerBox
}
>
<
div
className
=
{
styles
.
config
}
>
<
div
className
=
{
styles
.
title
}
/
>
<
div
className
=
{
styles
.
btn
}
>
<
Search
style
=
{{
width
:
470
,
marginBottom
:
25
}}
placeholder
=
"输入关键字"
onSearch
=
{
sumbitSearch
}
onChange
=
{
e
=>
handleSearch
(
e
)}
enterButton
value
=
{
searchWord
}
/
>
<
/div
>
<
/div
>
<
Table
size
=
"small"
bordered
key
=
""
columns
=
{
columns2
}
dataSource
=
{
searchData
}
scroll
=
{{
y
:
'calc(100vh - 300px)'
}}
// rowClassName={setRowClassName}
// onRow={record => ({
// onClick: () => {
// setSelect(record);
// setSelectColor(record);
// setSelectID(record.nodeID);
// },
// })}
pagination
=
{
pagenation
}
/
>
<
/div
>
<
/Spin
>
<
/
>
);
};
export
default
Search
;
src/pages/dataCenter/search.less
deleted
100644 → 0
View file @
bc4bedf3
.ant-modal-close-x {
line-height: 35px;
}
.ant-btn .anticon.anticon-plus > svg {
margin-top:-5px;
}
.incidentContainer{
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.linkDrowp{
position: absolute;
left: 93.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-btn .anticon.anticon-plus > svg, .ant-btn .anticon.anticon-minus > svg {
margin-top: -5px;
}
.pickItem{
background-color: #F5F6F9;
}
.contentContainers{
display: flex;
width: 100%;
position: relative;
.ant-table.ant-table-bordered > .ant-table-container {
min-width: calc(100vw - 582px);
height: calc(100vh - 166px);
overflow-x: hidden;
border: none;
}
.orgContainer{
height: calc(100vh - 74px);
width: 250px;
left: 0;
top: 0;
overflow-x: hidden;
margin-right: 10px;
position: relative;
transition-property:width,left;
transition-duration: 0.5s;
white-space: nowrap;
.ant-tree{
padding-top: 6px;
.ant-tree-switcher{
line-height: 1;
margin-right: 0px !important;
color:#1890FF;
.ant-tree-switcher-line-icon{
margin-left: 5px;
}
}
}
.switcher{
display: block;
position: absolute;
font-size: 18px;
color: #1890FF!important;
top: 50%;
right: 2px;
transform: translate(0%,-50%);
z-index: 1;
}
}
.orgContainerHide{
// transform: translateX(-230px);
left: 0px;
top: 0;
width: 26px;
}
.ant-popover-message-title {
padding-left: 20px;
}
.userContainer{
height: calc(100vh - 74px) !important;
z-index: 999;
min-width: 800px;
background: white;
width: 100%;
position: relative;
transition: width 0.5s;
.title{
margin: 16px 0 10px 16px;
display: inline-block;
width: 270px;
cursor: pointer;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-pagination{
padding-right: 12px;
background: white;
margin: 1px 0;
padding: 8px;
padding-right: 20px;
}
.ant-btn{
margin: 0px 10px;
.ant-btn-primary{
background: #50aefc;
}
}
.ant-input-search-button{
margin-left: 0px !important;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
background-color:#F6F9FE;
}
.ant-table-cell{
text-align:center;
overflow: hidden;
// text-overflow:ellipsis;
white-space: nowrap;
}
.ant-table-body{
height:calc(100vh - 210px);
border-right: white;
overflow: auto !important;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-pagination{
z-index: 999;
border-top: 1px solid #f0eded;
}
}
}
.icon{
margin-top: -5px !important;
vertical-align: text-bottom;
}
}
.formData{
height: 38rem;
overflow-y: scroll;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
display: none;
}
.formData_label{
display: flex;
align-items: center;
}
.filed_listItem{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.listCard{
display: flex;
.cardItem{
padding: 0.5rem;
}
.cardContent{
height: 30rem;
overflow-y: scroll;
width: 19rem;
}
.cardItemData{
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
overflow-x: hidden;
}
}
.doctorTable {
margin-bottom: 16px;
table {
width: 100%;
td {
padding: 6px;
border: 1px solid #e8e8e8;
}
thead {
tr {
font-weight: 600;
background: #FAFAFA;
}
}
tbody{
tr:hover{
background-color:#ededed ;
}
}
}
}
.ant-checkbox-group-item {
width: 260px;
}
.ant-drawer-footer {
display:flex;
justify-content: flex-end;
}
.config{
display: flex;
padding: 1rem 0 0.5rem 0.5rem;
justify-content: space-between;
width: calc(100% - 10px);
.title{
font-size: 18px;
color: rgba(0, 114, 255, 1);
font-weight: bold;
}
.btn{
display: flex;
justify-content: flex-end;
width: 20rem;
}
.ant-btn{
display: flex;
align-items: center;
margin-left: 20px;
}
}
.containerBox {
width: 100vm;
height: calc(100vh - 90px) ;
background: #ffffff;
.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{
margin-left: 0;
}
.ant-table.ant-table-bordered > .ant-table-container{
border: none;
}
.clickRowStyle{
background: #cfe7fd;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
}
\ No newline at end of file
src/routes/config.js
View file @
a5cad1b7
...
@@ -25,7 +25,7 @@ import SiteManage from '../pages/userCenter/siteManage/SiteManage';
...
@@ -25,7 +25,7 @@ import SiteManage from '../pages/userCenter/siteManage/SiteManage';
import
SiteManageV2
from
'../pages/userCenter/siteManageV2/SiteManage'
;
import
SiteManageV2
from
'../pages/userCenter/siteManageV2/SiteManage'
;
import
Dictionary
from
'../pages/dataCenter/dictionary'
;
import
Dictionary
from
'../pages/dataCenter/dictionary'
;
import
Dictionary1
from
'../pages/dataCenter/dictionary1'
;
import
Dictionary1
from
'../pages/dataCenter/dictionary1'
;
import
Search
from
'../pages/dataCenter/search'
;
//
import Search from '../pages/dataCenter/search';
import
ServiceLog
from
'../pages/log/serviceLog'
;
import
ServiceLog
from
'../pages/log/serviceLog'
;
import
LoginLog
from
'../pages/log/loginLog'
;
import
LoginLog
from
'../pages/log/loginLog'
;
import
OmsLog
from
'../pages/log/omsLog'
;
import
OmsLog
from
'../pages/log/omsLog'
;
...
@@ -370,11 +370,12 @@ export default {
...
@@ -370,11 +370,12 @@ export default {
icon
:
<
TableOutlined
style
=
{
iconStyle
}
/>
,
icon
:
<
TableOutlined
style
=
{
iconStyle
}
/>
,
component
:
BlankLayout
,
component
:
BlankLayout
,
routes
:
[
routes
:
[
// {
{
// path: '/dataCenter/dictionary',
path
:
'/dataCenter/dictionary'
,
// name: '数据字典',
name
:
'数据字典1'
,
// component: Dictionary,
hideMenu
:
true
,
// },
component
:
Dictionary
,
},
{
{
path
:
'/dataCenter/dictionary1'
,
path
:
'/dataCenter/dictionary1'
,
name
:
'数据字典'
,
name
:
'数据字典'
,
...
@@ -382,8 +383,7 @@ export default {
...
@@ -382,8 +383,7 @@ export default {
},
},
// {
// {
// path: '/dataCenter/search',
// path: '/dataCenter/search',
// name: '搜索',
// name: '数据字典',
// // hideMenu: true,
// component: Search,
// component: Search,
// },
// },
// {
// {
...
...
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