Browse Source

删除提示

release_0.0.4
xingyongchun 2 years ago
parent
commit
7669b0483d
  1. 57
      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. 27
      web/client/src/sections/fillion/components/inforTable.js
  5. 176
      web/client/src/sections/fillion/components/operationalTable.js
  6. 2
      web/client/src/sections/fillion/components/project/project.js
  7. 245
      web/client/src/sections/fillion/components/publicTable.js
  8. 88
      web/client/src/sections/fillion/components/transportationTable.js

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

@ -4,7 +4,7 @@ import { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import moment from 'moment';
import { getBridge, getProject,delBridge,delProject } from "../actions/infor"
import { getBridge, getProject, delBridge, delProject } from "../actions/infor"
import UserModal from './infor/details';
import ProjectModal from './project/project';
@ -26,7 +26,23 @@ const BrideTable = (props) => {
const [delet, setDelet] = useState()
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 = {
tab1: [
{
@ -1493,16 +1509,10 @@ const BrideTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
bridgeId: record.id
}
dispatch(delBridge(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button>
<Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -1683,16 +1693,9 @@ const BrideTable = (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>
}
},
@ -1809,20 +1812,20 @@ const BrideTable = (props) => {
dataSource={counts || []}
request={async (params) => {
if(whichofits=='qiaoliang'){
if (whichofits == 'qiaoliang') {
const query = {
bridgeName:sitename
bridgeName: sitename
}
setRowSelected([]);
const res = await dispatch(getBridge(query));
// console.log(res)
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}if(whichofits=='gongcheng'){
} if (whichofits == 'gongcheng') {
const query = {
type: 'bridge',
// type:sitename
@ -1835,7 +1838,7 @@ const BrideTable = (props) => {
total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,

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 { ModalForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putOperaTional,putHighways } from "../../actions/infor"
import { _ } from 'lodash'
import _ from 'lodash'
const HightModal = (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 (typecard == '111') {
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) => {
setSuccess(res.success)
})
return true
} else {
setDelet(values)
const query = { ...values, type: rewkeys }
const query = { ...values, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success)
})

27
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}`)
})
}
const deldata = (id) => { // 治超删除
const query = {
overspeedId: id
}
dispatch(delPurchase(query)).then((res) => {
setDelet(res)
})
}
const columns =
[
{
@ -364,16 +372,11 @@ const InForTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
overspeedId: record.id
}
dispatch(delPurchase(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button>
<Popconfirm title='是否确认删除' onConfirm={() => { deldata(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -438,8 +441,8 @@ const InForTable = (props) => {
request={async (params) => {
console.log(params)
const query = {
limit:params.pageSize,
page:params.current-1,
limit: params.pageSize,
page: params.current - 1,
nameOfInspectionPoint: nameOfInspectionPoint,
licensePlate: licensePlate,
numberOfAxles: numberOfAxles,

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

@ -1,9 +1,9 @@
import React, { useEffect, useState,useRef } from 'react';
import React, { useEffect, useState, useRef } from 'react';
import { connect } from 'react-redux';
import { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import { getOperaTional, getSpecificVehicle, getHouseholds,delSpecificVehicle,delHouseholds } from "../actions/infor"
import { getOperaTional, getSpecificVehicle, getHouseholds, delSpecificVehicle, delHouseholds } from "../actions/infor"
import UserModal from './infor/details';
import HightModal from './highways/highwaysdata';
@ -24,7 +24,7 @@ const OperaTionalTable = (props) => {
const [delet, setDelet] = useState()
const ref = useRef()
useEffect(() => { ref.current.reload() }, [rewkeys,activeKey,delet])
useEffect(() => { ref.current.reload() }, [rewkeys, activeKey, delet])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@ -35,6 +35,23 @@ const OperaTionalTable = (props) => {
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) => {
setModalVisibleyilan(true);
@ -73,7 +90,7 @@ const OperaTionalTable = (props) => {
search: false,
fieldProps: {
placeholder: '请输入道路名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@ -132,7 +149,7 @@ const OperaTionalTable = (props) => {
render: (dom, record) => {
return record.nameOfBusinessOwner
},
},
},
{
title: '车籍地',
search: false,
@ -696,16 +713,9 @@ const OperaTionalTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
vehicleId: record.id
}
dispatch(delSpecificVehicle(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -759,7 +769,7 @@ const OperaTionalTable = (props) => {
render: (dom, record) => {
return record.nameOfBusinessOwner
},
}, {
}, {
title: '品名',
search: false,
dataIndex: 'containers',
@ -1336,16 +1346,9 @@ const OperaTionalTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
vehicleId: record.id
}
dispatch(delSpecificVehicle(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -1813,16 +1816,9 @@ const OperaTionalTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
businessId: record.id
}
dispatch(delHouseholds(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -1881,16 +1877,20 @@ const OperaTionalTable = (props) => {
},
{
key: 'tab2',
label: <span onClick={() => { {
setRewkeys('chuzu')
} }}>出租车{activeKey === 'tab2'}</span>,
label: <span onClick={() => {
{
setRewkeys('chuzu')
}
}}>出租车{activeKey === 'tab2'}</span>,
},
{
key: 'tab3',
label: <span onClick={() => { {
setRewkeys('weihuo')
} }}>危险货运{activeKey === 'tab3'}</span>,
label: <span onClick={() => {
{
setRewkeys('weihuo')
}
}}>危险货运{activeKey === 'tab3'}</span>,
}, {
key: 'tab4',
@ -1918,58 +1918,62 @@ const OperaTionalTable = (props) => {
}}
columns={columns[activeKey]}
dataSource={counts || []}
dataSource={counts || []}
request={async (params, sort, filter) => {
if(rewkeys=='keyun'){
if (rewkeys == 'keyun') {
const query = {}
setRowSelected([]);
const res = await dispatch(getOperaTional(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}}
if(rewkeys=='chuzu'){
setRowSelected([]);
const res = await dispatch(getOperaTional(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
if (rewkeys == 'chuzu') {
const query = {
type:'出租车',
nameOfBusinessOwner:sitename
type: '出租车',
nameOfBusinessOwner: sitename
}
setRowSelected([]);
const res = await dispatch(getSpecificVehicle(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}}
if(rewkeys=='weihuo'){
setRowSelected([]);
const res = await dispatch(getSpecificVehicle(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
if (rewkeys == 'weihuo') {
const query = {
type:'危货',
nameOfBusinessOwner:sitename
type: '危货',
nameOfBusinessOwner: sitename
}
setRowSelected([]);
const res = await dispatch(getSpecificVehicle(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}}
if(rewkeys=='yehu'){
setRowSelected([]);
const res = await dispatch(getSpecificVehicle(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
if (rewkeys == 'yehu') {
const query = {
nameOfBusinessOwner:sitename
nameOfBusinessOwner: sitename
}
setRowSelected([]);
const res = await dispatch(getHouseholds(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}}
setRowSelected([]);
const res = await dispatch(getHouseholds(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
...dom.reverse(),
['tab2','tab3','tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
['tab2', 'tab3', 'tab4'].includes(activeKey) ? <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
<Button
>
导出
@ -1981,13 +1985,13 @@ const OperaTionalTable = (props) => {
>
</ProTable></div>
{modalVisible ? <UserModal
{modalVisible ? <UserModal
visible={modalVisible}
onVisibleChange={setModalVisible}
modalRecord={modalRecord}
typecard={typecard}
rewkeys={rewkeys}
data={rewkeys==='yehu'?data:date}
data={rewkeys === 'yehu' ? data : date}
recortd={recortd}
// sitename={sitename}
setDelet={setDelet}
@ -2006,7 +2010,7 @@ const OperaTionalTable = (props) => {
</Spin >
)
}
const date={
const date = {
"nameOfBusinessOwner": "业户名称",
"productName": "品名",
"vehicleRegistry": "车籍地",
@ -2047,7 +2051,7 @@ const date={
"nextRatingDate": "下次等级评定日期",
"creationDate": "创建日期"
}
const data={
const data = {
"nameOfBusinessOwner": "业户名称",
"productName": "品名",
"creditSocialCode": "信用社会代码",
@ -2076,7 +2080,7 @@ const data={
"licenseIssuanceType": "证照发放类型",
"numberOfSharedVehicles": "共有车辆数",
"creationDate": "创建日期",
'type':'类型'
'type': '类型'
}
function mapStateToProps(state) {
const { auth, depMessage } = state;

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 { DrawerForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form';
import { putProject } from "../../actions/infor"
import { _ } from 'lodash'
import _ from 'lodash'
const data = {
"entryName": "项目名称",

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

@ -4,7 +4,7 @@ import { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import moment from 'moment';
import { getCircuit,getVehicle,delCircuit,delVehicle } from "../actions/infor"
import { getCircuit, getVehicle, delCircuit, delVehicle } from "../actions/infor"
import UserModal from './infor/details';
const PublicTable = (props) => {
@ -24,23 +24,23 @@ const PublicTable = (props) => {
const [delet, setDelet] = useState()
const ref = useRef()
useEffect(() => { ref.current.reload() }, [delet,rewkeys])
//xianlu请求
const requestxianlu = (name) => {
const query = name
setRowSelected([]);
dispatch(getCircuit(query)).then((res)=>{
setCounts(res.payload.data)
})
}
//cheliang请求
const requestcheliang = (name) => {
const query = ''
setRowSelected([]);
dispatch(getVehicle(query)).then((res)=>{
setCounts(res.payload.data)
})
}
useEffect(() => { ref.current.reload() }, [delet, rewkeys])
//xianlu请求
const requestxianlu = (name) => {
const query = name
setRowSelected([]);
dispatch(getCircuit(query)).then((res) => {
setCounts(res.payload.data)
})
}
//cheliang请求
const requestcheliang = (name) => {
const query = ''
setRowSelected([]);
dispatch(getVehicle(query)).then((res) => {
setCounts(res.payload.data)
})
}
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@ -67,6 +67,22 @@ const requestcheliang = (name) => {
`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 = {
tab1: [
{
@ -411,16 +427,9 @@ const requestcheliang = (name) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
lineId: record.id
}
dispatch(delCircuit(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button><Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -1113,16 +1122,9 @@ const requestcheliang = (name) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
carId: record.id
}
dispatch(delVehicle(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
>编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
<Button type="link">删除</Button>
</Popconfirm></div>
}
},
@ -1173,16 +1175,20 @@ const requestcheliang = (name) => {
items: [
{
key: 'tab1',
label: <span onClick={() => { {
setRewkeys('xianlu')
} }}>运营线路{activeKey === 'tab1'}</span>,
label: <span onClick={() => {
{
setRewkeys('xianlu')
}
}}>运营线路{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => { {
setRewkeys('cheliang')
} }}>车辆信息{activeKey === 'tab2'}</span>,
label: <span onClick={() => {
{
setRewkeys('cheliang')
}
}}>车辆信息{activeKey === 'tab2'}</span>,
}
],
@ -1211,31 +1217,31 @@ const requestcheliang = (name) => {
dataSource={counts || []}
request={async (params) => {
if(rewkeys=='xianlu'){
if (rewkeys == 'xianlu') {
const query = {
fleet:sitename
fleet: sitename
}
setRowSelected([]);
const res = await dispatch(getCircuit(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
setRowSelected([]);
const res = await dispatch(getCircuit(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
if(rewkeys=='cheliang'){
if (rewkeys == 'cheliang') {
const query = {
fleet:sitename
}
setRowSelected([]);
const res = await dispatch(getVehicle(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
fleet: sitename
}
setRowSelected([]);
const res = await dispatch(getVehicle(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
}
}}
search={{
defaultCollapsed: false,
@ -1252,13 +1258,13 @@ const requestcheliang = (name) => {
>
</ProTable></div>
{modalVisible ? <UserModal
{modalVisible ? <UserModal
visible={modalVisible}
onVisibleChange={setModalVisible}
modalRecord={modalRecord}
typecard={typecard}
rewkeys={rewkeys}
data={rewkeys==='xianlu'?data:date}
data={rewkeys === 'xianlu' ? data : date}
recortd={recortd}
// sitename={sitename}
setDelet={setDelet}
@ -1292,58 +1298,59 @@ const data = {
"area": "所属区域",
"remarks": "备注"
}
const date={ "company": "所属公司",
"fleet": "所属车队",
"line": "所属线路",
"vehicleNumber": "车辆编号",
"vehicleLicensePlateNumber": "车辆牌照号",
"operationCategory": "运营类别",
"serviceLife": "已使用年限",
"engineModel": "发动机型号",
"vehicleModel": "车辆型号",
"vehicleCategory": "车辆类别",
"vehicleStatus": "车辆状态",
"dateOfEntry": "入户日期",
"purchaseDate": "购进日期",
"energyConsumptionType": "能耗类型",
"numberOfStandardUnits": "标台数",
"maintenanceUnit": "维保单位",
"vehicleType": "车辆类型",
"brandAndModel": "厂牌型号",
"manufacturer": "生产厂家",
"drivingLicenseNo": "行驶证编号",
"engineNumber": "发动机编号",
"mainEnergyConsumption": "主能耗",
"secondaryEnergyConsumption": "副能耗",
"emissionStandard": "排放标准",
"startDate": "启用日期",
"lastTransferDate": "最近一次调动日期",
"conductor": "车长",
"vehicleWidth": "车宽",
"carHeight": "车高",
"approvedPassengerCapacity": "核定载客数",
"vehicleIdentificationNumber": "车辆识别号",
"gearboxBrand": "变速箱品牌",
"manualCarWashingFee": "人工洗车费",
"laborCost": "劳务费",
"curbWeight": "整备质量",
"totalMass": "总质量",
"airConditioningTemperature": "空调温度",
"airConditionedCarOrNot": "是否空调车",
"turnOnTheAirConditioningTemperature": "开空调温度",
"power": "功率",
"transmission": "变速器",
"seatingCapacity": "座位数",
"airConditioningBrand": "空调品牌",
"seatType": "座椅类型",
"tireSpecifications": "轮胎规格",
"roadTransportCertificateNo": "道路运输证号",
"parkingPoint": "停放点",
"carWashingType": "洗车类型",
"maintenanceFreeWheelEnd": "免维护轮端",
"firstGuaranteeDate": "首保日期",
"dateOfRenovation": "整修日期",
"motorVehicleOwner": "机动车所有人"
const date = {
"company": "所属公司",
"fleet": "所属车队",
"line": "所属线路",
"vehicleNumber": "车辆编号",
"vehicleLicensePlateNumber": "车辆牌照号",
"operationCategory": "运营类别",
"serviceLife": "已使用年限",
"engineModel": "发动机型号",
"vehicleModel": "车辆型号",
"vehicleCategory": "车辆类别",
"vehicleStatus": "车辆状态",
"dateOfEntry": "入户日期",
"purchaseDate": "购进日期",
"energyConsumptionType": "能耗类型",
"numberOfStandardUnits": "标台数",
"maintenanceUnit": "维保单位",
"vehicleType": "车辆类型",
"brandAndModel": "厂牌型号",
"manufacturer": "生产厂家",
"drivingLicenseNo": "行驶证编号",
"engineNumber": "发动机编号",
"mainEnergyConsumption": "主能耗",
"secondaryEnergyConsumption": "副能耗",
"emissionStandard": "排放标准",
"startDate": "启用日期",
"lastTransferDate": "最近一次调动日期",
"conductor": "车长",
"vehicleWidth": "车宽",
"carHeight": "车高",
"approvedPassengerCapacity": "核定载客数",
"vehicleIdentificationNumber": "车辆识别号",
"gearboxBrand": "变速箱品牌",
"manualCarWashingFee": "人工洗车费",
"laborCost": "劳务费",
"curbWeight": "整备质量",
"totalMass": "总质量",
"airConditioningTemperature": "空调温度",
"airConditionedCarOrNot": "是否空调车",
"turnOnTheAirConditioningTemperature": "开空调温度",
"power": "功率",
"transmission": "变速器",
"seatingCapacity": "座位数",
"airConditioningBrand": "空调品牌",
"seatType": "座椅类型",
"tireSpecifications": "轮胎规格",
"roadTransportCertificateNo": "道路运输证号",
"parkingPoint": "停放点",
"carWashingType": "洗车类型",
"maintenanceFreeWheelEnd": "免维护轮端",
"firstGuaranteeDate": "首保日期",
"dateOfRenovation": "整修日期",
"motorVehicleOwner": "机动车所有人"
}
function mapStateToProps(state) {
const { auth, depMessage } = state;

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

@ -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';
@ -22,7 +22,7 @@ const TransporTationTable = (props) => {
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 <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',

Loading…
Cancel
Save