|
@ -4,12 +4,12 @@ import { Spin, Button, Popconfirm } from 'antd'; |
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
import './protable.less' |
|
|
import './protable.less' |
|
|
import moment from 'moment'; |
|
|
import moment from 'moment'; |
|
|
import { getRoadway, getProject, delRoadway, delProject } from "../actions/infor" |
|
|
import { getRoadway, getProject, delRoadway, delProject, getVillageList } from "../actions/infor" |
|
|
import UserModal from './infor/details'; |
|
|
import UserModal from './infor/details'; |
|
|
import ProjectModal from './project/project'; |
|
|
import ProjectModal from './project/project'; |
|
|
|
|
|
|
|
|
const TransporTationTable = (props) => { |
|
|
const TransporTationTable = (props) => { |
|
|
const { dispatch, user, depData, depMessage, depLoading } = props |
|
|
const { dispatch, user, depData, depMessage, depLoading, villageList } = props |
|
|
const [rowSelected, setRowSelected] = useState([]) |
|
|
const [rowSelected, setRowSelected] = useState([]) |
|
|
const [sitename, setSitename] = useState()//名称
|
|
|
const [sitename, setSitename] = useState()//名称
|
|
|
const [counts, setCounts] = useState()//shuju
|
|
|
const [counts, setCounts] = useState()//shuju
|
|
@ -76,8 +76,15 @@ const TransporTationTable = (props) => { |
|
|
setDelet(res) |
|
|
setDelet(res) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(async () => { |
|
|
useEffect(async () => { |
|
|
console.log('whichofits', whichofits) |
|
|
dispatch(getVillageList({})) |
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(async () => { |
|
|
|
|
|
|
|
|
let query = {} |
|
|
let query = {} |
|
|
if (whichofits === '县') { |
|
|
if (whichofits === '县') { |
|
|
query.level = '县' |
|
|
query.level = '县' |
|
@ -90,6 +97,9 @@ const TransporTationTable = (props) => { |
|
|
const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))]; |
|
|
const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))]; |
|
|
setRoadData(uniqueArray) |
|
|
setRoadData(uniqueArray) |
|
|
}, [whichofits]) |
|
|
}, [whichofits]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const columns = { |
|
|
const columns = { |
|
|
tab1: [ |
|
|
tab1: [ |
|
|
{ |
|
|
{ |
|
@ -2411,6 +2421,20 @@ const TransporTationTable = (props) => { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
], tab3: [ |
|
|
], tab3: [ |
|
|
|
|
|
{ |
|
|
|
|
|
title: '所属行政村', |
|
|
|
|
|
search: false, |
|
|
|
|
|
dataIndex: 'containers', |
|
|
|
|
|
|
|
|
|
|
|
fixed: 'left', |
|
|
|
|
|
width: 120, |
|
|
|
|
|
render: (dom, record) => { |
|
|
|
|
|
return record.village?.name || '--' |
|
|
|
|
|
}, |
|
|
|
|
|
fieldProps: { |
|
|
|
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '路线名称', |
|
|
title: '路线名称', |
|
|
dataIndex: 'placeName', |
|
|
dataIndex: 'placeName', |
|
@ -2468,7 +2492,7 @@ const TransporTationTable = (props) => { |
|
|
return record.townshipCode |
|
|
return record.townshipCode |
|
|
}, |
|
|
}, |
|
|
fieldProps: { |
|
|
fieldProps: { |
|
|
getPopupContainer: (triggerNode) => triggerNode.parentNode, |
|
|
getPopupContainer: (c) => triggerNode.parentNode, |
|
|
} |
|
|
} |
|
|
}, { |
|
|
}, { |
|
|
title: '起点地名', |
|
|
title: '起点地名', |
|
@ -3915,6 +3939,7 @@ const TransporTationTable = (props) => { |
|
|
typecard={typecard} |
|
|
typecard={typecard} |
|
|
rewkeys={'transportation'} |
|
|
rewkeys={'transportation'} |
|
|
data={data} |
|
|
data={data} |
|
|
|
|
|
villageList={villageList?.map(v => ({ value: v.id, label: v.name })) || []} //村道列表
|
|
|
recortd={recortd} |
|
|
recortd={recortd} |
|
|
whichofits={whichofits} |
|
|
whichofits={whichofits} |
|
|
setRecortd={setRecortd} |
|
|
setRecortd={setRecortd} |
|
@ -3926,6 +3951,8 @@ const TransporTationTable = (props) => { |
|
|
modalRecord={modalRecord} |
|
|
modalRecord={modalRecord} |
|
|
typecard={typecard} |
|
|
typecard={typecard} |
|
|
rewkeys={'road'} |
|
|
rewkeys={'road'} |
|
|
|
|
|
whichofits={whichofits} |
|
|
|
|
|
villageList={villageList?.map(v => ({ value: v.id, label: v.name })) || []} //村道列表
|
|
|
recortd={recortd} |
|
|
recortd={recortd} |
|
|
setRecortd={setRecortd} |
|
|
setRecortd={setRecortd} |
|
|
setDelet={setDelet} |
|
|
setDelet={setDelet} |
|
@ -4011,7 +4038,7 @@ const data = [ |
|
|
{ name: "面层厚度", type: 'surfaceThickness' }, |
|
|
{ name: "面层厚度", type: 'surfaceThickness' }, |
|
|
] |
|
|
] |
|
|
function mapStateToProps (state) { |
|
|
function mapStateToProps (state) { |
|
|
const { auth, depMessage } = state; |
|
|
const { auth, depMessage, villageList } = state; |
|
|
const pakData = (dep) => { |
|
|
const pakData = (dep) => { |
|
|
return dep.map((d) => { |
|
|
return dep.map((d) => { |
|
|
return { |
|
|
return { |
|
@ -4028,6 +4055,7 @@ function mapStateToProps(state) { |
|
|
depMessage: depMessage.data || [], |
|
|
depMessage: depMessage.data || [], |
|
|
depLoading: depMessage.isRequesting, |
|
|
depLoading: depMessage.isRequesting, |
|
|
depData, |
|
|
depData, |
|
|
|
|
|
villageList: villageList?.data || [] |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
export default connect(mapStateToProps)(TransporTationTable); |
|
|
export default connect(mapStateToProps)(TransporTationTable); |