|
|
@ -1,6 +1,6 @@ |
|
|
|
import React, { useEffect, useState, useRef } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import { Spin, Button, Popconfirm, Badge } from 'antd'; |
|
|
|
import { Spin, Button, Popconfirm } from 'antd'; |
|
|
|
import ProTable from '@ant-design/pro-table'; |
|
|
|
import './protable.less' |
|
|
|
import moment from 'moment'; |
|
|
@ -42,7 +42,24 @@ const TransporTationTable = (props) => { |
|
|
|
setModalRecord(null); |
|
|
|
} |
|
|
|
} |
|
|
|
// console.log(counts)
|
|
|
|
//删除daolu
|
|
|
|
const deldata = (id) => { |
|
|
|
const query = { |
|
|
|
roadId: id |
|
|
|
} |
|
|
|
dispatch(delRoadway(query)).then((res) => { |
|
|
|
setDelet(res) |
|
|
|
}) |
|
|
|
} |
|
|
|
//删除工程
|
|
|
|
const deldatas = (id) => { |
|
|
|
const query = { |
|
|
|
projectId: id |
|
|
|
} |
|
|
|
dispatch(delProject(query)).then((res) => { |
|
|
|
setDelet(res) |
|
|
|
}) |
|
|
|
} |
|
|
|
//批量导出
|
|
|
|
const exports = (ids, counts) => { |
|
|
|
// console.log(user);
|
|
|
@ -1170,22 +1187,20 @@ const TransporTationTable = (props) => { |
|
|
|
width: 120, |
|
|
|
fixed: 'right', |
|
|
|
render: (dom, record) => { |
|
|
|
// node = renderRemoveUser('移除');
|
|
|
|
return <div><Button type="link" |
|
|
|
onClick={() => { |
|
|
|
setRecortd(record) |
|
|
|
openModal('edit', record) |
|
|
|
setTypecard('111') |
|
|
|
}} |
|
|
|
>编辑</Button><Button type="link" |
|
|
|
onClick={() => { |
|
|
|
const query = { |
|
|
|
roadId: record.id |
|
|
|
} |
|
|
|
dispatch(delRoadway(query)).then((res) => { |
|
|
|
setDelet(res) |
|
|
|
}) |
|
|
|
}} |
|
|
|
>删除</Button></div> |
|
|
|
>编辑</Button> |
|
|
|
<Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}><Button type="link" |
|
|
|
// onClick={() => {
|
|
|
|
|
|
|
|
// }}
|
|
|
|
>删除</Button></Popconfirm> |
|
|
|
</div> |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -2337,14 +2352,11 @@ const TransporTationTable = (props) => { |
|
|
|
setRecortd(record) |
|
|
|
|
|
|
|
}} |
|
|
|
>编辑</Button><Button type="link" onClick={() => { |
|
|
|
const query = { |
|
|
|
roadId: record.id |
|
|
|
} |
|
|
|
dispatch(delRoadway(query)).then((res) => { |
|
|
|
setDelet(res) |
|
|
|
}) |
|
|
|
}}>删除</Button></div> |
|
|
|
>编辑</Button> |
|
|
|
<Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}> |
|
|
|
<Button type="link">删除</Button> |
|
|
|
</Popconfirm> |
|
|
|
</div> |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -3497,15 +3509,10 @@ const TransporTationTable = (props) => { |
|
|
|
setRecortd(record) |
|
|
|
|
|
|
|
}} |
|
|
|
>编辑</Button><Button type="link" onClick={() => { |
|
|
|
const query = { |
|
|
|
roadId: record.id |
|
|
|
} |
|
|
|
dispatch(delRoadway(query)).then((res) => { |
|
|
|
setDelet(res) |
|
|
|
}) |
|
|
|
}} |
|
|
|
>删除</Button></div> |
|
|
|
>编辑</Button> |
|
|
|
<Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}> |
|
|
|
<Button type="link">删除</Button> |
|
|
|
</Popconfirm></div> |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -3688,16 +3695,11 @@ const TransporTationTable = (props) => { |
|
|
|
setTypecard('111') |
|
|
|
setRecortd(record) |
|
|
|
}} |
|
|
|
>编辑</Button><Button type="link" |
|
|
|
onClick={() => { |
|
|
|
const query = { |
|
|
|
projectId: record.id |
|
|
|
} |
|
|
|
dispatch(delProject(query)).then((res) => { |
|
|
|
setDelet(res) |
|
|
|
}) |
|
|
|
}} |
|
|
|
>删除</Button></div> |
|
|
|
>编辑</Button> |
|
|
|
<Popconfirm title='是否确认删除' onConfirm={() => { deldatas(record.id) }}> |
|
|
|
<Button type="link">删除</Button> |
|
|
|
</Popconfirm> |
|
|
|
</div> |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
@ -3747,19 +3749,19 @@ const TransporTationTable = (props) => { |
|
|
|
{ |
|
|
|
key: 'tab1', |
|
|
|
label: <span onClick={() => { |
|
|
|
setWhichofits('xian') |
|
|
|
setWhichofits('县') |
|
|
|
}}>县道{activeKey === 'tab1'}</span>, |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'tab2', |
|
|
|
label: <span onClick={() => { |
|
|
|
setWhichofits('xiang') |
|
|
|
setWhichofits('乡') |
|
|
|
}}>乡道{activeKey === 'tab2'}</span>, |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 'tab3', |
|
|
|
label: <span onClick={() => { |
|
|
|
setWhichofits('cun') |
|
|
|
setWhichofits('村') |
|
|
|
}}>村道{activeKey === 'tab3'}</span>, |
|
|
|
}, { |
|
|
|
key: 'tab4', |
|
|
|