巴林闲侠 1 year ago
parent
commit
44a611cc4e
  1. 4
      api/app/lib/controllers/data/vehicle.js
  2. 2
      api/app/lib/models/report.js
  3. 4
      scripts/1.3.0/schema/6.update_report.sql
  4. 9
      scripts/1.3.1/schema/4.update_report.sql
  5. 2
      weapp/src/packages/patrol/index.jsx
  6. 3
      web/client/src/sections/auth/containers/login.js
  7. 4
      web/client/src/sections/fillion/components/uploads.js
  8. 11
      web/client/src/sections/fillion/containers/maintenanceSpotCheck.js
  9. 19
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  10. 37
      web/client/src/sections/quanju/containers/footer/guanli/style.less
  11. 149
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  12. 3
      web/client/src/sections/quanju/containers/heand/index.js

4
api/app/lib/controllers/data/vehicle.js

@ -7,8 +7,8 @@ async function get(ctx) {
const { type } = ctx.request.body;
const { name } = ctx.query;
const sequelize = ctx.fs.dc.orm
const sqlStr = `select count(p.road_marking) 标线,count(p.roadside_ditch) 边沟,
count(p.guardrail) 护栏, count(p.roadside_trees) 行道树,count(p.wrong_lane) 错车道
const sqlStr = `select sum(p.road_marking) 标线,sum(p.roadside_ditch) 边沟,
sum(p.guardrail) 护栏, sum(p.roadside_trees) 行道树,sum(p.wrong_lane) 错车道
from (
select t.*,row_number() over (partition by t.luduan order by t.time desc ) rn from (
select code_road||'-'||road_section_start||'-'||road_section_end luduan,

2
api/app/lib/models/report.js

@ -163,7 +163,7 @@ module.exports = dc => {
handleState: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
defaultValue: '已处理',
comment: null,
primaryKey: false,
field: "handle_state",

4
scripts/1.3.0/schema/6.update_report.sql

@ -1,4 +0,0 @@
alter table report
add handle_opinions varchar(1024);
comment on column report.handle_opinions is '处理意见';

9
scripts/1.3.1/schema/4.update_report.sql

@ -1,6 +1,13 @@
ALTER TABLE "public"."report"
ADD COLUMN "handle_advice" varchar(1024);
ADD COLUMN "handle_advice" varchar(1024)
add handle_opinions varchar(1024);
COMMENT ON COLUMN "public"."report"."handle_state" IS '待处理 / 已指派 / 已处理 / 不处理';
COMMENT ON COLUMN "public"."report"."handle_advice" IS '管理员处理意见';
comment on column report.handle_opinions is '处理意见';

2
weapp/src/packages/patrol/index.jsx

@ -871,7 +871,7 @@ const Index = () => {
if (isSuperAdmin) {
data = {
handleState: isAppoint ? '已指派' : '不处理',
performerId: userList[appointUser].id,
performerId: userList[appointUser]?.id,
handleAdvice,
}
} else {

3
web/client/src/sections/auth/containers/login.js

@ -31,7 +31,8 @@ const Login = props => {
if (user && user.authorized) {
hasAuth = allroutes?.filter((item) => { return user?.userResources.find((child) => { return child.resourceId === item.authCode }) })
if (user?.username === 'SuperAdmin') {
dispatch(push('/fillion/infor'))
dispatch(push('/fillion/luzheng'))
}
else if (hasAuth && hasAuth.length > 0) {
const path = hasAuth[0].path

4
web/client/src/sections/fillion/components/uploads.js

@ -56,12 +56,13 @@ class Uploads extends Component {
componentWillReceiveProps (np) {
const { dispatch, value: thisEditData, onChange } = this.props;
const { value: nextEditData, clearFileList } = np;
console.log(nextEditData,'哈哈哈哈')
const setFileList = () => {
let defaultFileList = [];
defaultFileList = nextEditData.map((u, index) => {
// let fileUrl = `${this.ApiRoot}/${u.storageUrl}`;
let fileUrl = `${u.storageUrl}`;
let fileUrl = `${u.url}`;
return {
uid: -index - 1,
name: this.dealName(u.storageUrl),
@ -75,7 +76,6 @@ class Uploads extends Component {
fileList: defaultFileList
});
};
if (nextEditData && nextEditData.length) {
if (!thisEditData || !this.state.fileList.length) {
setFileList();

11
web/client/src/sections/fillion/containers/maintenanceSpotCheck.js

@ -450,7 +450,7 @@ const MaintenanceSpotCheck = (props) => {
<Modal visible={vis} onCancel={cancelHandler} title='养护抽查' onOk={okHandler}>
<Form form={form}>
<Form.Item
label="抽取比例"
label="抽取比例(%)"
// name="percent"
rules={[{ required: true, message: '请填写抽取比例' }]}
>
@ -468,19 +468,18 @@ const MaintenanceSpotCheck = (props) => {
>
<Input style={{ width: '80%' }} placeholder="请输入抽取比例" />
</Form.Item>
<Form.Item
{/* <Form.Item
// name="percentSign"
noStyle
style={{ width: '20%', textAlign: 'center' }}
>
%
</Form.Item>
</Form.Item> */}
</Input.Group>
</Form.Item>
<Form.Item className="ant-row" >
<div style={{ display: 'flex', justifyContent: 'center' }}>
<Button type='primary' onClick={extractHandler}>开始抽取</Button>
</div>
<Button style={{ marginLeft: '40%' }} type='primary' onClick={extractHandler}>开始抽取</Button>
</Form.Item>
<Form.Item label='抽查总数' name='result'>
<Input disabled />

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

@ -65,7 +65,6 @@ const Guanli = (props) => {
}
useEffect(() => {
requestleftDatas();
// requestRightDatas()
@ -79,12 +78,14 @@ const Guanli = (props) => {
if (index < 120) {
return <div key={index} className='guanli-right-item'>
<Tooltip title={<div className='popover-content'>
<div style={{ width: '100%', height: "100%", marginTop: "0", display: "flex" }}>
<div style={{ width: '100%', height: "100%", marginTop: "0",paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <Image
width={200}
src={`/_file-server/${v.storageUrl}`}
{picfile?.map(v => <img className='picfileimg'
style={{ width: 200, height: 200,display: 'inline-block', }}
// src={`/_file-server/${v.storageUrl}`}
src={v.url}
width={`200px`}
/>)}
</Carousel>
: <img src="/" style={{
@ -102,14 +103,14 @@ const Guanli = (props) => {
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法道路:<span style={{
执法道路:<span title={roadname} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{roadname}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法成果:<span style={{
执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
@ -168,7 +169,7 @@ const Guanli = (props) => {
<span>处罚</span>
<span>处理日期</span>
</div> */}
o<div style={{ width: "100%", display: "flex", color: "#FFF" }}>
<div style={{ width: "90%",margin:"auto", display: "flex", color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div>
</div>
@ -181,7 +182,7 @@ const Guanli = (props) => {
)
}
function mapStateToProps (state) {
const { auth, depMessage } = state;
const { auth, depMessage, global } = state;
const pakData = (dep) => {
return dep.map((d) => {
return {

37
web/client/src/sections/quanju/containers/footer/guanli/style.less

@ -29,7 +29,7 @@
align-items: center;
padding: 0 10%;
justify-content: space-between;
border: 2px solid rgba(28, 96, 254, 0.5000);
border: 2px solid rgba(28, 96, 254, 0.5);
.guanli-left-item-left {
width: 45%;
@ -42,7 +42,7 @@
font-size: 1.25rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(216, 240, 255, 0.8000);
color: rgba(216, 240, 255, 0.8);
}
div {
@ -51,10 +51,10 @@
// align-items: ;
font-size: 2.125rem;
font-family: YouSheBiaoTiHei;
color: #FFFFFF;
color: #ffffff;
height: 70%;
width: 100%;
background: url('/assets/images/quanju/guanlijiance_1.png') no-repeat;
background: url("/assets/images/quanju/guanlijiance_1.png") no-repeat;
background-size: 100% 80%;
background-position: center bottom;
@ -65,7 +65,7 @@
padding-top: 10%;
margin-left: 5px;
// height: 0;
color: rgba(216, 240, 255, 0.8000);
color: rgba(216, 240, 255, 0.8);
}
}
@ -120,15 +120,15 @@
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(216, 240, 255, 0.8000);
margin: 0 10px 0 2px
color: rgba(216, 240, 255, 0.8);
margin: 0 10px 0 2px;
}
&:nth-child(3) {
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
margin-right: 10px;
}
@ -136,11 +136,9 @@
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(216, 240, 255, 0.8000);
color: rgba(216, 240, 255, 0.8);
}
}
}
.guanli-right-title {
@ -150,13 +148,13 @@
display: flex;
align-items: center;
justify-content: space-around;
background: rgba(21, 77, 160, 0.2000);
background: rgba(21, 77, 160, 0.2);
span {
font-size: 12px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
color: #ffffff;
flex: 1;
text-align: center;
// &:nth-child(1){
@ -175,7 +173,11 @@
justify-content: space-around;
&:hover {
background: linear-gradient(270deg, rgba(0, 124, 230, 0) 0%, rgba(0, 70, 200, 0.8700) 100%);
background: linear-gradient(
270deg,
rgba(0, 124, 230, 0) 0%,
rgba(0, 70, 200, 0.87) 100%
);
}
// background: rgba(21,77,160,0.2000);
@ -183,7 +185,7 @@
font-size: 0.875rem;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(216, 240, 255, 0.8000);
color: rgba(216, 240, 255, 0.8);
line-height: 20px;
flex: 1;
text-align: center;
@ -191,6 +193,7 @@
// }
}
}
}
@ -273,6 +276,10 @@
// }
// }
// }
.picfileimg {
width: 200px !important;
height: 200px !important;
}
}
.popover {

149
web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js

@ -1,9 +1,15 @@
import React, { useState, useEffect } from 'react'
import Module from '../../../public/module'
import { Spin } from 'antd'
import { Carousel, Tooltip, } from 'antd'
import Lun from "./lunbo"
import moment from 'moment'
import "./left.less"
import { getZhichaolist } from "../../../../actions/example"
import { getRoadadministration } from '../../../../../fillion/actions/luzheng'
import NoData from '../../../public/noData';
import AutoRollComponent from '../../build/AutoRollComponent'
const Rightbottom = (props) => {
const { dispatch } = props
@ -13,6 +19,8 @@ const Rightbottom = (props) => {
const [rightDatas, setrightDatas] = useState([])
const [nums, setNums] = useState([])
const [num, setNum] = useState()
const [rightitemlist, setrightitemlist] = useState([])
const requestRightDatas = async () => {
const res = await dispatch(getZhichaolist())
var pattern = /[\u4e00-\u9fa5]*/;
@ -30,77 +38,100 @@ const Rightbottom = (props) => {
setList(d)
}
useEffect(() => {
const zhichaolist = dispatch(getZhichaolist()).then((res) => {
setNums(res.payload?.data?.processed)
// const zhichaolist = dispatch(getZhichaolist()).then((res) => {
// setNums(res.payload?.data?.processed)
})
requestRightDatas()
// })
// requestRightDatas()
roadManagement()
}, [])
console.log(list);
const renderBody = () => {
return (
<div style={{ width: "100%", height: "50%" }}>
{/* <Spin spinning={!list} tip="Loading" size="large"> */}
{list?.map((item, index) => {
return <li style={{ width: "100%", height: "3vh", marginTop: "5px", position: "relative", }} onMouseEnter={() => {
setBeijing(index)
setNum(index)
// console.log(beijing);
}} onMouseLeave={() => {
setBeijing()
setNum()
const roadManagement = async () => {
await dispatch(getRoadadministration({})).then(res => {
if (res.success) {
setrightitemlist(res.payload.data?.rows || [])
}
})
}
const renderContent = () => {
return <div style={{ height: "100%" }}>
{rightitemlist && rightitemlist.length !== 0 ? rightitemlist?.map(({ enforcementdate, enforcementreslt, roadname, picfile }, index) => {
if (index < 120) {
return <div key={index} className='guanli-right-item'>
<Tooltip title={<div className='popover-content'>
<div style={{ width: '100%', height: "100%", marginTop: "0", paddingBottom: 20, display: "flex" }}>
{picfile?.length > 0 ? <Carousel autoplay style={{ width: 200, height: 200, margin: "20px 0px 0px 20px" }}>
{picfile?.map(v => <img className='picfileimg'
style={{ width: 200, height: 200, display: 'inline-block', }}
// src={`/_file-server/${v.storageUrl}`}
src={v.url}
width={`200px`}
/>)}
</Carousel>
: <img src="/" style={{
width: 200, height: 200, margin: "20px 0px 0px 20px", display: 'inline-block', borderRight: "1px solid #FFF",
}} />
}
<div style={{ width: 240, marginLeft: 20, marginTop: 20, display: "flex", flexDirection: "column", justifyContent: "space-around" }}>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法日期:<span style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis"
}}>
{beijing == index ? <img src='/assets/images/leadership/bei.png' style={{ width: "100%", height: "100%", position: "absolute" }} /> : ""}
<div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute" }}>{item.licensePlate}</div>
<div style={{ width: "10%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "30%" }}>{item.overrunRate ? item.overrunRate + "%" : "--"}</div>
<div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "40%" }}>{item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"}</div>
<div style={{ width: "30%", height: "100%", textAlign: "center", lineHeight: "3vh", fontSize: "14px", color: beijing == index ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.processingTime ? item.processingTime : "--"}</div>
{
num == index ? <div style={{ position: "fixed", width: "400px", height: "200px", zIndex: 100, left: "55%", marginTop: "0", top: "78%" }}>
<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" }}>{item.overrunRate ? item.overrunRate + "%" : "--"}</p>
<p style={{ color: "rgba(216,240,255,0.8)", position: "absolute", top: "60%", left: "43%", fontSize: "14px" }}>超限</p>
{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法道路:<span title={roadname} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{roadname}
</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC", display: "flex" }}>
执法成果:<span title={enforcementreslt} style={{
color: "#EEF4FF", marginLeft: "10px", fontFamily: " PingFangSC-Medium, PingFang SC",
overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis", display: 'inline-block', width: 160
}}>
{enforcementreslt}</span></p>
</div>
<div style={{ position: "absolute", top: "0", width: "50%", left: "50%", paddingRight: "10px" }}>
<p style={{ color: "rgba(216,240,255,0.8)", marginTop: "30px", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>车牌号<span style={{ color: "#EEF4FF", marginLeft: "33px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.licensePlate}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>检测点<span style={{ color: "#EEF4FF", marginLeft: "30px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.nameOfInspectionPoint ? item.nameOfInspectionPoint : "--"}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>处罚<span style={{ color: "#FF0001", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.deductPoints ? "-" + item.deductPoints + "分" : ""}{item.deductPoints && item.fine ? "和" : ""}{item.fine ? "-" + item.fine + "元" : ""}{item.deductPoints || item.fine ? "" : "--"}</span></p>
<p style={{ color: "rgba(216,240,255,0.8)", fontSize: "14px", fontFamily: "PingFangSC-Regular, PingFang SC" }}>日期<span style={{ color: "#EEF4FF", marginLeft: "50px", fontFamily: " PingFangSC-Medium, PingFang SC" }}>{item.processingTime ? item.processingTime : "--"}</span></p>
</div>
</div> : ""
}
</li>
})
</div>}
placement="leftTop"
overlayStyle={{ minWidth: 500, minHeight: 200, paddingTop: 10, margin: 0, backgroundImage: `url(../../../../../assets/images/leadership/beijinglan.png)` }}
overlayClassName='popover'
>
<div style={{ width: '100%', height: '100%', display: 'flex', color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center", }}>{enforcementdate && moment(enforcementdate).format("YYYY-MM-DD") || "--"}</div>
<div title={enforcementreslt} style={{ width: '50%', textAlign: "center", overflow: 'hidden', whiteSpace: "nowrap", textOverflow: "ellipsis" }}>{enforcementreslt}</div>
</div>
</Tooltip>
</div>
}
{/* </Spin> */}
}) : ""}
</div>
)
}
return (
<>
<Module style={style} title={"治超详情"}>
<Module style={style} title={"道路隐患排查治理"}>
<div style={{ position: "relative", width: "90%", height: "5%", left: "5%", textAlign: "right", fontSize: "16px", top: "-3%", color: "rgba(216,240,255,0.8)" }}>
<img src='/assets/images/leadership/jiejue.png' style={{ width: "4.5%", height: "2vh", marginTop: "-1%" }} />
已处理<span style={{ color: "#FFFFFF", fontSize: "18px", paddingLeft: "2%", paddingRight: "2%" }}>{nums ? nums : 0}</span>
</div>
<div style={{ width: "90%", height: "3vh", backgroundColor: "rgba(21,77,160,0.2)", position: "relative", left: "5%", top: "5%" }}>
<p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh" }}>车牌号</p>
<p style={{ width: "10%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "30%" }}>超限</p>
<p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "40%" }}>处罚</p>
<p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "70%" }}>处理日期</p>
<div style={{ width: "90%", margin: "auto", display: "flex", color: "#FFF" }}>
<div style={{ width: '50%', textAlign: "center" }}>执法日期</div>
<div style={{ width: '50%', textAlign: "center", }}>执法成果</div>
</div>
{/* <Spin tip="Loading..." spinning={false} > */}
<Lun
content={renderBody()}
containerStyle={{ position: "relative", height: "70%", width: "90%", left: "5%", top: "8%" }}
divHeight={"100%"}
divId={"screen-slope-midde-top"}
/>
{/* </Spin> */}
{rightitemlist && rightitemlist.length !== 0 ? <AutoRollComponent content={renderContent()}
containerStyle={{ position: "relative", height: "90%", }}
divHeight={"100%"} divId={"chart-overview-deviceList"} /> : <NoData style={{ height: "20%" }} />}
</Module>
</>
)

3
web/client/src/sections/quanju/containers/heand/index.js

@ -17,8 +17,9 @@ const Header = (props) => {
const allroutes = JSON.parse(sessionStorage.getItem('allRoutes')) || []
const hasAuth = allroutes?.filter((item) => { return user?.userResources.find((child) => { return child.resourceId === item.authCode }) })
if (user?.username === 'SuperAdmin') {
dispatch(push('/fillion/infor'))
dispatch(push('/fillion/luzheng'))
}
else if (hasAuth && hasAuth.length > 0) {
const path = hasAuth[0].path
console.log('sasa', `${path}`)

Loading…
Cancel
Save