| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -2,7 +2,7 @@ import { connect } from 'react-redux'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import './protable.less' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover } from 'antd'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import ProTable from '@ant-design/pro-table'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { getReportList, getReportDetail } from '../actions/patrol'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { getReportList, getReportDetail, handleReport } from '../actions/patrol'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import React, { useEffect, useState } from 'react'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { httpDel } from '@peace/utils' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import { PinyinHelper } from '@peace/utils'; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -78,7 +78,7 @@ const DetailForm = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					const DetailList = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const { reportList, loading, dispatch, handleOpen, handelRefresh, isAnomaly, isRoad, isPatrol } = props; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const { reportList, loading, dispatch, handleOpen, handelRefresh, isAnomaly, isRoad, isPatrol, queryData } = props; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const [visible, setVisible] = useState(false) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const [selectRecord, setSelectRecord] = useState(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const [noProcessingPopVisible, setNoProcessingPopVisible] = useState(false); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -200,19 +200,25 @@ const DetailList = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <Button | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        onClick={() => { checkDetail(record); handleOpen(); }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        style={{ marginRight: 10 }}>查看</Button>, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    isAnomaly ? <Button>指派</Button> : null, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    isAnomaly ? | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    isAnomaly && record.handleState != '已处理' ? <Button>指派</Button> : null, | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    isAnomaly && record.handleState != '已处理' ? | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <Popover | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            content={[ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <div style={{ width: '100%', height: 30 }}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <Button onClick={() => setNoProcessingPopVisible(false)} style={{ float: "right" }} >否</Button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <Button type="primary" onClick={() => handleRemove(record)} style={{ marginRight: 8, float: "right" }} >是</Button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    <Button type="primary" onClick={() => dispatch(handleReport(record.id, { handleState: '已处理' })).then(res => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                        if (res.success) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                            setNoProcessingPopVisible(false) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                            setNoProcessingSelectRecord(null) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                            handelRefresh() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    })} style={{ marginRight: 8, float: "right" }} >是</Button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            ]} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            visible={noProcessingSelectRecord == record.id && noProcessingPopVisible} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            trigger="click" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            onClick={() => setNoProcessingSelectRecord(record.id)} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            title="是否删除该记录?" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            title="是否不处理该记录?" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            onVisibleChange={(newVisible) => setNoProcessingPopVisible(newVisible)} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <Button>不处理</Button> | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -322,7 +328,6 @@ const PatrolNameList = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    return { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        onClick: () => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            if (record) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                // console.log('record:', record)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                let id = record.id | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                if (selectRoad == record.id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                    id = null | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -353,7 +358,7 @@ const PatrolTable = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const isAnomaly = pathname.includes('anomaly') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const isPatrol = !isRoad && !isAnomaly | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const reportType = isRoad ? 'road' : isAnomaly ? 'anomaly' : 'patrol'; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    console.log(isRoad, pathname, isPatrol); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    useEffect(() => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (userList && userList instanceof Array) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            setRecord(userList[0]); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -410,7 +415,7 @@ const PatrolTable = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <Card style={{ flex: 1 }}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <DetailList | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen} handelRefresh={handelRefresh} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        isPatrol={isPatrol} isRoad={isRoad} isAnomaly={isAnomaly} queryData={queryData} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </Card> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </div> | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -432,7 +437,7 @@ const PatrolTable = (props) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const handleExport = () => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (reportList && reportList instanceof Array && reportList.length) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            let ids = reportList.map(item => item.id); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            exports(ids); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            exports(ids, reportType); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |