wangyue 2 years ago
parent
commit
2adac9cb4c
  1. 46
      web/client/src/sections/fillion/components/infor/details.js
  2. 12
      web/client/src/sections/fillion/components/operationalTable.js
  3. 4
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  4. 2
      web/client/src/sections/quanju/containers/footer/build/index.js
  5. 2
      web/client/src/sections/quanju/containers/footer/build/style.less
  6. 6
      web/client/src/sections/quanju/containers/footer/guanli/index.js

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

@ -2,11 +2,11 @@ import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putRoadway, putSpecificVehicle, putHouseholds,putCircuit,putVehicle } from "../../actions/infor"
import { putRoadway, putSpecificVehicle, putHouseholds,putCircuit,putVehicle,putPurchase } from "../../actions/infor"
import { putBridge } from "../../actions/infor"
import _ from 'lodash'
const UserModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, engineering } = props
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename,setDelet, dispatch, setRecortd, engineering,whichofits } = props
const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理
@ -64,6 +64,12 @@ const UserModal = (props) => {
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
}if (rewkeys === 'zhichao') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
}
}, [])
useEffect(() => {
@ -136,8 +142,7 @@ const UserModal = (props) => {
onFinish={(values) => {
if (Object.values(values).length > 0) {
if (rewkeys === 'transportation') {
if (typecard == '111') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => {
@ -155,7 +160,7 @@ const UserModal = (props) => {
}
}
if (rewkeys === 'bridge') {
if (typecard == '111') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, roadId: records?.[0]?.value || '' }
dispatch(putBridge(query)).then((res) => {
@ -172,7 +177,7 @@ const UserModal = (props) => {
}
}
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (typecard == '111') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
@ -189,7 +194,7 @@ const UserModal = (props) => {
}
}
if (rewkeys === 'yehu') {
if (typecard == '111') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
@ -205,7 +210,7 @@ const UserModal = (props) => {
return true
}
} if (rewkeys === 'xianlu') {
if (typecard == '111') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, lineId: records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
@ -222,7 +227,7 @@ const UserModal = (props) => {
}
}
if (rewkeys === 'cheliang') {
if (typecard == '111') {
if (typecard == 'compile') {
setDelet(values)
const query = { ...values, carId: records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
@ -234,6 +239,27 @@ const UserModal = (props) => {
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
})
return true
}
}
if (rewkeys == 'zhichao') {
if (typecard == 'compile') {
console.log(typecard)
setDelet(values)
const query = { ...values, overspeedId: records?.[0]?.value || '' }
dispatch(putPurchase(query)).then((res) => {
console.log(res)
})
return true
} else {
setDelet(values)
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
console.log(res)
})
return true
}
@ -243,7 +269,7 @@ const UserModal = (props) => {
}}
initialValues={recortd}
>
{typecard == '111' ?
{typecard == 'compile' ?
<ProForm.Group
>
<ProFormText

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

@ -108,7 +108,7 @@ const [genre,setGenre]=useState()
return <div><Button type="link"
onClick={() => {
hightModal('edit', record)
setTypecard('111')
setTypecard('compile')
setRecortd(record)
}}
>编辑</Button></div>
@ -161,7 +161,7 @@ const [genre,setGenre]=useState()
return <div><Button type="link"
onClick={() => {
hightModal('edit', record)
setTypecard('111')
setTypecard('compile')
setRecortd(record)
}}
>编辑</Button></div>
@ -749,7 +749,7 @@ const [genre,setGenre]=useState()
return <div><Button type="link"
onClick={() => {
openModal('edit', record)
setTypecard('111')
setTypecard('compile')
setRecortd(record)
}}
>编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
@ -1382,7 +1382,7 @@ const [genre,setGenre]=useState()
return <div><Button type="link"
onClick={() => {
openModal('edit', record)
setTypecard('111')
setTypecard('compile')
setRecortd(record)
}}
>编辑</Button> <Popconfirm title='' onConfirm={() => { deldata(record.id) }}>
@ -1851,7 +1851,9 @@ const [genre,setGenre]=useState()
render: (dom, record) => {
return <div><Button type="link"
onClick={() => {
// dispatch(push(`article/update/post`));
openModal('edit', record)
setTypecard('compile')
setRecortd(record)
}}
>编辑</Button><Popconfirm title='' onConfirm={() => { deldatas(record.id) }}>
<Button type="link">删除</Button>

4
web/client/src/sections/quanju/containers/footer/build/Rightbottom.js

@ -217,8 +217,8 @@ function Rightbottom (props) {
</div>
{/* <span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:0}}>段</span> */}
<div className='build-right-bottom-title'>
<h2>{siji[0] + siji[1]+sanji[2] + sanji[3] + sanji[4] || 0}</h2>
<span>路段总数</span>
<h2>{total || 0}</h2>
<span>道路总公里</span>
</div>
{/* <div className='img1'>
<img src='/assets/images/quanju/all.png' />

2
web/client/src/sections/quanju/containers/footer/build/index.js

@ -170,7 +170,7 @@ const Build = (props) => {
</div> : <NoData />}
</div>
</Module>
<Module title={"各乡镇已建道路统计"} style={{
<Module title={"各乡镇现有道路统计"} style={{
width: "100%",
height: " 33%", marginTop: '3%'
}} customize={true}>

2
web/client/src/sections/quanju/containers/footer/build/style.less

@ -309,7 +309,7 @@
justify-content: center;
position: absolute;
align-items: center;
left: 44%;
left: 40%;
top: 35%;
h2 {

6
web/client/src/sections/quanju/containers/footer/guanli/index.js

@ -64,14 +64,13 @@ const Guanli = (props) => {
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ id, licensePlate, overrunRate, fine, processingTime, deductPoints, nameOfInspectionPoint }, index) => {
if (index < 120) {
return <div key={index} className='guanli-right-item'>
<div className='popover'>
<Tooltip title={<div className='popover-content'>
<div style={{ width: "100%", height: "100%", marginTop: "0" }}>
{/* <img src='/assets/images/leadership/beijinglan.png' style={{ width: "100%", height: "100%" }} /> */}
<div style={{ position: "absolute", top: "0", width: "50%", padding: "20px" }}>
<img src='/assets/images/leadership/yuanxing.png' style={{ width: "100%", height: "100%" }} />
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{overrunRate?overrunRate:0}{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}</p>
<p style={{ color: "#09BAFF", position: "absolute", top: "42%", left: "27%", fontSize: "29px", fontFamily: "YouSheBiaoTiHei" }}>{overrunRate ? overrunRate.toFixed(2) : 0}%{/* {item.overrunRate ? item.overrunRate + "%" : "--"} */}</p>
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p>
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", top: '5px' }}>
@ -87,12 +86,13 @@ const Guanli = (props) => {
overlayClassName='popover'
>
<div style={{ width: '100%', height: '100%', display: 'flex' }}>
<span>{licensePlate}</span>
<span>{overrunRate}%</span>
<span>{deductPoints ? `-${deductPoints}` : ""}-{fine}{fine ? "元" : ""}</span>
<span>{processingTime}</span>
</Tooltip>
</div>
</Tooltip>
</div>
}
}) : ""}

Loading…
Cancel
Save