Browse Source

删除提示

release_0.0.4
xingyongchun 3 years ago
parent
commit
7669b0483d
  1. 43
      web/client/src/sections/fillion/components/bridgeTable.js
  2. 2
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  3. 4
      web/client/src/sections/fillion/components/infor/details.js
  4. 23
      web/client/src/sections/fillion/components/inforTable.js
  5. 80
      web/client/src/sections/fillion/components/operationalTable.js
  6. 2
      web/client/src/sections/fillion/components/project/project.js
  7. 57
      web/client/src/sections/fillion/components/publicTable.js
  8. 86
      web/client/src/sections/fillion/components/transportationTable.js

43
web/client/src/sections/fillion/components/bridgeTable.js

@ -27,6 +27,22 @@ const BrideTable = (props) => {
const ref = useRef() const ref = useRef()
useEffect(() => { ref.current.reload() }, [whichofits, delet]) useEffect(() => { ref.current.reload() }, [whichofits, delet])
const deldata = (id) => { // 桥梁
const query = {
bridgeId: id
}
dispatch(delBridge(query)).then((res) => {
setDelet(res)
})
}
const deldatas = (id) => { // 工程
const query = {
projectId: id
}
dispatch(delProject(query)).then((res) => {
setDelet(res)
})
}
const columns = { const columns = {
tab1: [ tab1: [
{ {
@ -1493,16 +1509,10 @@ const BrideTable = (props) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button>
onClick={() => { <Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}>
const query = { <Button type="link">删除</Button>
bridgeId: record.id </Popconfirm></div>
}
dispatch(delBridge(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },
@ -1683,16 +1693,9 @@ const BrideTable = (props) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
onClick={() => { <Button type="link">删除</Button>
const query = { </Popconfirm></div>
projectId: record.id
}
dispatch(delProject(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },

2
web/client/src/sections/fillion/components/highways/highwaysdata.js

@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form'; import { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional,putHighways } from "../../actions/infor" import { putOperaTional,putHighways } from "../../actions/infor"
import { _ } from 'lodash' import _ from 'lodash'
const HightModal = (props) => { const HightModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd,setDelet } = props const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd,setDelet } = props

4
web/client/src/sections/fillion/components/infor/details.js

@ -189,14 +189,14 @@ const UserModal = (props) => {
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') { if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (typecard == '111') { if (typecard == '111') {
setDelet(values) setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys === 'chuzu' ? '出租车' : '危货' } const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => { dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success) setSuccess(res.success)
}) })
return true return true
} else { } else {
setDelet(values) setDelet(values)
const query = { ...values, type: rewkeys } const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => { dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success) setSuccess(res.success)
}) })

23
web/client/src/sections/fillion/components/inforTable.js

@ -51,6 +51,14 @@ const InForTable = (props) => {
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
}) })
} }
const deldata = (id) => { // 治超删除
const query = {
overspeedId: id
}
dispatch(delPurchase(query)).then((res) => {
setDelet(res)
})
}
const columns = const columns =
[ [
{ {
@ -364,16 +372,11 @@ const InForTable = (props) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button>
onClick={() => {
const query = { <Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}>
overspeedId: record.id <Button type="link">删除</Button>
} </Popconfirm></div>
dispatch(delPurchase(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },

80
web/client/src/sections/fillion/components/operationalTable.js

@ -35,6 +35,23 @@ const OperaTionalTable = (props) => {
setModalRecord(null); setModalRecord(null);
} }
} }
const deldata = (id) => { // 出租危货
const query = {
vehicleId: id
}
dispatch(delSpecificVehicle(query)).then((res) => {
setDelet(res)
})
}
const deldatas = (id) => { // 业户
const query = {
businessId: id
}
dispatch(delHouseholds(query)).then((res) => {
setDelet(res)
})
}
//打开弹窗 //打开弹窗
const hightModal = (type, record) => { const hightModal = (type, record) => {
setModalVisibleyilan(true); setModalVisibleyilan(true);
@ -696,16 +713,9 @@ const OperaTionalTable = (props) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
onClick={() => { <Button type="link">删除</Button>
const query = { </Popconfirm></div>
vehicleId: record.id
}
dispatch(delSpecificVehicle(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },
@ -1336,16 +1346,9 @@ const OperaTionalTable = (props) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
onClick={() => { <Button type="link">删除</Button>
const query = { </Popconfirm></div>
vehicleId: record.id
}
dispatch(delSpecificVehicle(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },
@ -1813,16 +1816,9 @@ const OperaTionalTable = (props) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
onClick={() => { <Button type="link">删除</Button>
const query = { </Popconfirm></div>
businessId: record.id
}
dispatch(delHouseholds(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },
@ -1881,16 +1877,20 @@ const OperaTionalTable = (props) => {
}, },
{ {
key: 'tab2', key: 'tab2',
label: <span onClick={() => { { label: <span onClick={() => {
{
setRewkeys('chuzu') setRewkeys('chuzu')
} }}>出租车{activeKey === 'tab2'}</span>, }
}}>出租车{activeKey === 'tab2'}</span>,
}, },
{ {
key: 'tab3', key: 'tab3',
label: <span onClick={() => { { label: <span onClick={() => {
{
setRewkeys('weihuo') setRewkeys('weihuo')
} }}>危险货运{activeKey === 'tab3'}</span>, }
}}>危险货运{activeKey === 'tab3'}</span>,
}, { }, {
key: 'tab4', key: 'tab4',
@ -1928,7 +1928,8 @@ const OperaTionalTable = (props) => {
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
}} }
}
if (rewkeys == 'chuzu') { if (rewkeys == 'chuzu') {
const query = { const query = {
type: '出租车', type: '出租车',
@ -1940,7 +1941,8 @@ const OperaTionalTable = (props) => {
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
}} }
}
if (rewkeys == 'weihuo') { if (rewkeys == 'weihuo') {
const query = { const query = {
type: '危货', type: '危货',
@ -1952,7 +1954,8 @@ const OperaTionalTable = (props) => {
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
}} }
}
if (rewkeys == 'yehu') { if (rewkeys == 'yehu') {
const query = { const query = {
nameOfBusinessOwner: sitename nameOfBusinessOwner: sitename
@ -1963,7 +1966,8 @@ const OperaTionalTable = (props) => {
return { return {
...res, ...res,
total: res.payload.data ? res.payload.data.count : 0 total: res.payload.data ? res.payload.data.count : 0
}} }
}
}} }}
search={{ search={{
defaultCollapsed: false, defaultCollapsed: false,

2
web/client/src/sections/fillion/components/project/project.js

@ -3,7 +3,7 @@ import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd'; import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form'; import { DrawerForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putProject } from "../../actions/infor" import { putProject } from "../../actions/infor"
import { _ } from 'lodash' import _ from 'lodash'
const data = { const data = {
"entryName": "项目名称", "entryName": "项目名称",

57
web/client/src/sections/fillion/components/publicTable.js

@ -67,6 +67,22 @@ const requestcheliang = (name) => {
`attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`)
}) })
} }
const deldata = (id) => { // 线路
const query = {
lineId: id
}
dispatch(delCircuit(query)).then((res) => {
setDelet(res)
})
}
const deldatas = (id) => { // 车辆
const query = {
carId: id
}
dispatch(delVehicle(query)).then((res) => {
setDelet(res)
})
}
const columns = { const columns = {
tab1: [ tab1: [
{ {
@ -411,16 +427,9 @@ const requestcheliang = (name) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button><Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
onClick={() => { <Button type="link">删除</Button>
const query = { </Popconfirm></div>
lineId: record.id
}
dispatch(delCircuit(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },
@ -1113,16 +1122,9 @@ const requestcheliang = (name) => {
setTypecard('111') setTypecard('111')
setRecortd(record) setRecortd(record)
}} }}
>编辑</Button><Button type="link" >编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
onClick={() => { <Button type="link">删除</Button>
const query = { </Popconfirm></div>
carId: record.id
}
dispatch(delVehicle(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
} }
}, },
@ -1173,16 +1175,20 @@ const requestcheliang = (name) => {
items: [ items: [
{ {
key: 'tab1', key: 'tab1',
label: <span onClick={() => { { label: <span onClick={() => {
{
setRewkeys('xianlu') setRewkeys('xianlu')
} }}>运营线路{activeKey === 'tab1'}</span>, }
}}>运营线路{activeKey === 'tab1'}</span>,
}, },
{ {
key: 'tab2', key: 'tab2',
label: <span onClick={() => { { label: <span onClick={() => {
{
setRewkeys('cheliang') setRewkeys('cheliang')
} }}>车辆信息{activeKey === 'tab2'}</span>, }
}}>车辆信息{activeKey === 'tab2'}</span>,
} }
], ],
@ -1292,7 +1298,8 @@ const data = {
"area": "所属区域", "area": "所属区域",
"remarks": "备注" "remarks": "备注"
} }
const date={ "company": "所属公司", const date = {
"company": "所属公司",
"fleet": "所属车队", "fleet": "所属车队",
"line": "所属线路", "line": "所属线路",
"vehicleNumber": "车辆编号", "vehicleNumber": "车辆编号",

86
web/client/src/sections/fillion/components/transportationTable.js

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

Loading…
Cancel
Save