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
37bbc3ba
Commit
37bbc3ba
authored
Aug 02, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '巡检反馈增加搜索'
parent
ec1d80be
Pipeline
#77000
waiting for manual action with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
6 deletions
+40
-6
patrolFeedback.jsx
...nager/patrolMaintenance/patrolFeedback/patrolFeedback.jsx
+40
-6
No files found.
src/pages/bsmanager/patrolMaintenance/patrolFeedback/patrolFeedback.jsx
View file @
37bbc3ba
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable camelcase */
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
Button
,
notification
,
Spin
,
Card
}
from
'antd'
;
import
{
Space
,
Table
,
Popconfirm
,
Tooltip
,
Button
,
notification
,
Spin
,
Card
,
Input
}
from
'antd'
;
import
{
CM_Feedback_LoadPatrolFeedbacks
,
CM_Feedback_RemovePatrolFeedback
,
...
...
@@ -20,6 +20,8 @@ import AddModal from './AddModal';
import
SortModal
from
'./SortModal'
;
import
DragTable
from
'@/components/DragTable/DragTable'
;
const
{
Search
}
=
Input
;
const
patrolFeedback
=
()
=>
{
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
type
,
setType
]
=
useState
(
''
);
...
...
@@ -34,6 +36,7 @@ const patrolFeedback = () => {
const
[
treeVisible
,
setTreeVisible
]
=
useState
(
true
);
// 左边列表是否可见
const
[
pickItem
,
setPickItem
]
=
useState
(
'区域巡检'
);
const
[
hoverItemIndex
,
setHoverItemIndex
]
=
useState
(
''
);
const
[
searchValue
,
setSearchValue
]
=
useState
(
''
);
const
columns
=
[
{
...
...
@@ -201,7 +204,8 @@ const patrolFeedback = () => {
useEffect
(()
=>
{
setTreeLoading
(
true
);
CM_Feedback_LoadPatrolFeedbacks
({
pageIndex
:
0
,
pageSize
:
0
}).
then
(
res
=>
{
CM_Feedback_LoadPatrolFeedbacks
({
pageIndex
:
1
,
pageSize
:
20
,
keyword
:
searchValue
}).
then
(
res
=>
{
setTreeLoading
(
false
);
if
(
res
.
code
===
0
)
{
let
data
=
{};
...
...
@@ -240,7 +244,8 @@ const patrolFeedback = () => {
});
setKeepTableData
(
list
);
}
});
},
);
},
[
flag
]);
const
add
=
()
=>
{
...
...
@@ -314,6 +319,15 @@ const patrolFeedback = () => {
}
};
// 搜索
const
handleSearch
=
text
=>
{
setFlag
(
flag
+
1
);
};
// 搜索框改变时存储输入的值
const
handleChange
=
e
=>
{
setSearchValue
(
e
.
target
.
value
);
};
return
(
<
div
className=
{
styles
.
PatrolFeedbackContainer
}
>
<
div
className=
{
styles
.
contentContainers
}
>
...
...
@@ -398,8 +412,28 @@ const patrolFeedback = () => {
[
styles
.
userContainerHide
]:
!
treeVisible
,
})
}
>
<
div
style=
{
{
height
:
'50px'
,
backgroundColor
:
'white'
}
}
>
<
span
style=
{
{
float
:
'right'
,
marginRight
:
'10px'
}
}
>
<
div
style=
{
{
height
:
'50px'
,
backgroundColor
:
'white'
,
display
:
'flex'
,
justifyContent
:
'space-between'
,
}
}
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
}
}
>
<
span
style=
{
{
marginLeft
:
'20px'
,
marginRight
:
'5px'
}
}
>
快速检索:
</
span
>
<
Search
allowClear
placeholder=
"请输入巡检对象名称"
onSearch=
{
handleSearch
}
onChange=
{
handleChange
}
value=
{
searchValue
}
enterButton
style=
{
{
width
:
'300px'
}
}
/>
</
div
>
<
div
style=
{
{
marginRight
:
'10px'
}
}
>
<
Button
icon=
{
<
PlusOutlined
className=
{
styles
.
icon
}
/>
}
onClick=
{
add
}
...
...
@@ -432,7 +466,7 @@ const patrolFeedback = () => {
>
<
span
style=
{
{
marginTop
:
'-2px'
}
}
>
批量删除
</
span
>
</
Button
>
</
span
>
</
div
>
</
div
>
<
Table
// rowClassName={setRowClassName}
...
...
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