{
const [whichofits, setWhichofits] = useState('县')
const [delet, setDelet] = useState()
const ref = useRef()
- useEffect(() => { ref.current.reload() }, [ whichofits, delet])
+ useEffect(() => { ref.current.reload() }, [whichofits, delet])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@@ -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
+ >编辑
+ { deldata(record.id) }}>
+
}
},
@@ -2337,14 +2352,11 @@ const TransporTationTable = (props) => {
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldata(record.id) }}>
+
+
+
}
},
@@ -3497,15 +3509,10 @@ const TransporTationTable = (props) => {
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldata(record.id) }}>
+
+
}
},
@@ -3688,16 +3695,11 @@ const TransporTationTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
- >编辑
+ >编辑
+ { deldatas(record.id) }}>
+
+
+
}
},
@@ -3747,19 +3749,19 @@ const TransporTationTable = (props) => {
{
key: 'tab1',
label: {
- setWhichofits('xian')
+ setWhichofits('县')
}}>县道{activeKey === 'tab1'},
},
{
key: 'tab2',
label: {
- setWhichofits('xiang')
+ setWhichofits('乡')
}}>乡道{activeKey === 'tab2'},
},
{
key: 'tab3',
label: {
- setWhichofits('cun')
+ setWhichofits('村')
}}>村道{activeKey === 'tab3'},
}, {
key: 'tab4',