Browse Source

Merge branch 'dev' of https://gitea.anxinyun.cn/gao.zhiyuan/Highways4Good into dev

release_0.0.4
巴林闲侠 2 years ago
parent
commit
34378129aa
  1. 12
      api/app/lib/controllers/report/index.js
  2. 71
      web/client/assets/color.less
  3. BIN
      web/client/assets/images/leadership/weizhis.png
  4. BIN
      web/client/assets/images/leadership/youofanye.png
  5. BIN
      web/client/assets/images/leadership/zuofanye.png
  6. 202
      web/client/src/sections/fillion/actions/infor.js
  7. 105
      web/client/src/sections/fillion/components/bridgeTable.js
  8. 40
      web/client/src/sections/fillion/components/gis/patrolGis.js
  9. 106
      web/client/src/sections/fillion/components/highways/highwaysdata.js
  10. 74
      web/client/src/sections/fillion/components/highwaysTable.js
  11. 236
      web/client/src/sections/fillion/components/infor/details.js
  12. 192
      web/client/src/sections/fillion/components/inforTable.js
  13. 1348
      web/client/src/sections/fillion/components/operationalTable.js
  14. 35
      web/client/src/sections/fillion/components/patrolTable.js
  15. 4
      web/client/src/sections/fillion/components/project/project.js
  16. 1044
      web/client/src/sections/fillion/components/publicTable.js
  17. 172
      web/client/src/sections/fillion/components/transportationTable.js
  18. 4
      web/client/src/sections/fillion/nav-item.js
  19. 2
      web/client/src/sections/quanju/containers/footer/build/Rightbottom.js
  20. 2
      web/client/src/sections/quanju/containers/footer/build/Rightcenter.js
  21. 9
      web/client/src/sections/quanju/containers/footer/build/index.js
  22. 4
      web/client/src/sections/quanju/containers/footer/build/style.less
  23. 30
      web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js
  24. 24
      web/client/src/sections/quanju/containers/footer/guanli/index.js
  25. 1
      web/client/src/sections/quanju/containers/footer/guanli/style.less
  26. 18
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
  27. 12
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/handong.js
  28. 6
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/lunbo/bottomlunbo.js
  29. 5
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/lunbo/style.less
  30. 7
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/lunbo/toplunbo.js
  31. 14
      web/client/src/sections/quanju/containers/footer/leadership/centerleft/qiqoliang.js
  32. 2
      web/client/src/sections/quanju/containers/footer/leadership/left/echarts/lefttopecharts.js
  33. 18
      web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js
  34. 41
      web/client/src/sections/quanju/containers/footer/leadership/right/hudong.js
  35. 17
      web/client/src/sections/quanju/containers/footer/leadership/right/right-bottom.js
  36. 12
      web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js
  37. 39
      web/client/src/sections/quanju/containers/footer/operation/left.js
  38. 37
      web/client/src/utils/webapi.js
  39. 3805
      web/log/development.txt
  40. 2
      web/package.json

12
api/app/lib/controllers/report/index.js

@ -4,7 +4,7 @@ const { QueryTypes } = require('sequelize');
async function reportList(ctx) {
try {
const models = ctx.fs.dc.models;
const { limit, page, startTime, endTime, keyword, userId, reportType } = ctx.query
const { limit, page, startTime, endTime, keyword, userId, reportType, isTop } = ctx.query
let findOption = {
where: {
@ -39,7 +39,15 @@ async function reportList (ctx) {
if (reportType) {
findOption.where.reportType = reportType
}
const reportRes = await models.Report.findAll(findOption)
let reportRes = null;
if (isTop) {
const sqlStr = 'select * from (SELECT R.*, "row_number"() OVER(PARTITION BY R.user_id ORDER BY R."time" DESC) AS NEWINDEX FROM report AS R ) AS NR WHERE NEWINDEX = 1'
const sequelize = ctx.fs.dc.orm;
reportRes = await sequelize.query(sqlStr, { type: QueryTypes.SELECT });
} else {
reportRes = await models.Report.findAll(findOption)
}
ctx.status = 200;
ctx.body = reportRes

71
web/client/assets/color.less

@ -174,7 +174,7 @@ button::-moz-focus-inner,
[type='submit']::-moz-focus-inner {border-style: none;}
fieldset {border: 0;}
legend {color: inherit;}
mark {background-color: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);}
mark {background-color: #feffe6;}
::selection {color: #fff;background: @primary-color;}
.anticon {color: inherit;}
.ant-fade-enter, .ant-fade-appear {animation-fill-mode: both;}
@ -1149,18 +1149,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte
.ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;}
.ant-menu-item-danger.ant-menu-item {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;}
<<<<<<< Updated upstream
.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);}
.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{slider-rail-background-color}", 1)`);}
.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);}
=======
.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{segmented-label-hover-color}", 1)`);}
.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;}
.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;}
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{segmented-label-hover-color}", 1)`);}
>>>>>>> Stashed changes
.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{slider-rail-background-color}", 1)`);}
.ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;}
.ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;}
.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;}
@ -1730,64 +1722,31 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;}
.ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;}
.ant-tag-checkable-checked {background-color: @primary-color;}
.ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);}
<<<<<<< Updated upstream
.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{component-background}", 1)`);border-color: #ffadd2;}
=======
>>>>>>> Stashed changes
.ant-tag-pink {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{table-expand-icon-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{component-background}", 1)`);border-color: #ffadd2;}
.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{table-expand-icon-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
<<<<<<< Updated upstream
.ant-tag-red {color: #cf1322;background: #fff1f0;border-color: #ffa39e;}
.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{success-color-deprecated-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{success-color-deprecated-bg}", 1)`);border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);border-color: #ffa39e;}
=======
.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{segmented-label-hover-color}", 1)`);border-color: #ffa39e;}
>>>>>>> Stashed changes
.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{slider-rail-background-color}", 1)`);border-color: #ffa39e;}
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}
.ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;}
.ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;}
.ant-tag-orange {color: #d46b08;background: color(~`colorPalette("@{alert-warning-border-color}", 1)`);border-color: #ffd591;}
.ant-tag-orange {color: #d46b08;background: #fff7e6;border-color: #ffd591;}
.ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;}
.ant-tag-yellow {color: #d4b106;background: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);border-color: #fffb8f;}
.ant-tag-yellow {color: #d4b106;background: #feffe6;border-color: #fffb8f;}
.ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;}
.ant-tag-gold {color: #d48806;background: #fffbe6;border-color: #ffe58f;}
.ant-tag-gold-inverse {color: #fff;background: #faad14;border-color: #faad14;}
.ant-tag-cyan {color: #08979c;background: #e6fffb;border-color: #87e8de;}
.ant-tag-cyan-inverse {color: #fff;background: #13c2c2;border-color: #13c2c2;}
.ant-tag-lime {color: #7cb305;background: color(~`colorPalette("@{text-color-secondary}", 1)`);border-color: #eaff8f;}
.ant-tag-lime {color: #7cb305;background: #fcffe6;border-color: #eaff8f;}
.ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;}
.ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;}
.ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;}
<<<<<<< Updated upstream
.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{btn-primary-bg}", 1)`);border-color: #adc6ff;}
.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: color(~`colorPalette("@{alert-info-border-color}", 5)`);}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{tree-bg}", 1)`);border-color: #adc6ff;}
.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;}
.ant-tag-purple {color: #531dab;background: #f9f0ff;border-color: #d3adf7;}
=======
.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;}
.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{dropdown-menu-submenu-disabled-bg}", 3)`);border-color: #adc6ff;}
.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{cascader-menu-bg}", 1)`);border-color: #adc6ff;}
.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;}
.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{alert-error-bg-color}", 1)`);border-color: #d3adf7;}
>>>>>>> Stashed changes
.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{disabled-color-dark}", 4)`);border-color: #d3adf7;}
.ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;}
.ant-tag-success {color: #52c41a;background: @success-color-deprecated-bg;border-color: @success-color-deprecated-border;}
.ant-tag-processing {color: @primary-color;background: @info-color-deprecated-bg;border-color: @info-color-deprecated-border;}
@ -2025,15 +1984,7 @@ a.ant-typography.ant-typography-disabled:hover, .ant-typography a.ant-typography
.ant-upload-list-picture .ant-upload-list-item-error, .ant-upload-list-picture-card .ant-upload-list-item-error {border-color: #ff4d4f;}
.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info, .ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {background: transparent;}
.ant-upload-list-picture .ant-upload-list-item-uploading, .ant-upload-list-picture-card .ant-upload-list-item-uploading {border-style: dashed;}
<<<<<<< Updated upstream
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;}
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;}
=======
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;}
>>>>>>> Stashed changes
.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'] {fill: #ff4d4f;}
.ant-upload-list-picture-card .ant-upload-list-item-info::before {background-color: rgba(0, 0, 0, 0.5);}
.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {color: rgba(255, 255, 255, 0.85);}

BIN
web/client/assets/images/leadership/weizhis.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

BIN
web/client/assets/images/leadership/youofanye.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

BIN
web/client/assets/images/leadership/zuofanye.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

202
web/client/src/sections/fillion/actions/infor.js

@ -34,6 +34,17 @@ export function getOperaTional(query) {
// reducer: { name: 'reportstatistic' }
});
}
export function putOperaTional(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_OPERA_TIONAL',
url: ApiTable.putOperaTional,
msg: { error: '获取车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getSpecificVehicle(query) {
return dispatch => basicAction({
type: 'get',
@ -45,6 +56,28 @@ export function getSpecificVehicle(query) {
// reducer: { name: 'reportstatistic' }
});
}
export function putSpecificVehicle(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'put_SPECIFIC_VEHICLE',
url: ApiTable.putSpecificVehicle,
msg: { error: '编辑车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function putHouseholds(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'put_HOUSEHOLDS',
url: ApiTable.putHouseholds,
msg: { error: '编辑业户信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getHouseholds(query) {
return dispatch => basicAction({
type: 'get',
@ -122,3 +155,172 @@ export function putProject(query) {
// reducer: { name: 'reportstatistic' }
});
}
export function getHighways(query) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query: query,
actionType: 'GET_HIGHWAYS',
url: ApiTable.getHighways,
msg: { error: '获取路政信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function putHighways(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'GET_HIGHWAYS',
url: ApiTable.putHighways,
msg: { error: '编辑路政信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getCircuit(query) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query: query,
actionType: 'GET_CIRCUIT',
url: ApiTable.getCircuit,
msg: { error: '获取线路信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function putCircuit(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_CIRCUIT',
url: ApiTable.putCircuit,
msg: { error: '编辑线路信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getVehicle(query) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query: query,
actionType: 'GET_VEHICLE',
url: ApiTable.getVehicle,
msg: { error: '获取车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function putVehicle(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_VEHICLE',
url: ApiTable.putVehicle,
msg: { error: '编辑车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delRoadway(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_ROADWAY',
url: ApiTable.delRoadway.replace("{roadId}", query?.roadId),
msg: { error: '删除车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delProject(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_PROJECT',
url: ApiTable.delProject.replace("{projectId}", query?.projectId),
msg: { error: '删除工程信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delBridge(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_BRIDGE',
url: ApiTable.delBridge.replace("{bridgeId}", query?.bridgeId),
msg: { error: '删除桥梁信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delSpecificVehicle(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_SPECIFICVENICLE',
url: ApiTable.delSpecificVehicle.replace("{vehicleId}", query?.vehicleId),
msg: { error: '删除车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delHouseholds(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_HOUSEHOLDS',
url: ApiTable.delHouseholds.replace("{businessId}", query?.businessId),
msg: { error: '删除业户信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delCircuit(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_CIRCUIT',
url: ApiTable.delCircuit.replace("{lineId}", query?.lineId),
msg: { error: '删除运营线路信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delVehicle(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_VEHICLE',
url: ApiTable.delVehicle.replace("{carId}", query?.carId),
msg: { error: '删除车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function getPurchase(query) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query: query,
actionType: 'GET_PURCHASE',
url: ApiTable.getPurchase,
msg: { error: '获取治超信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function putPurchase(query) {
return dispatch => basicAction({
type: 'put',
dispatch: dispatch,
data: query,
actionType: 'PUT_PURCHASE',
url: ApiTable.putPurchase,
msg: { error: '获取治超信息失败' },
// reducer: { name: 'reportstatistic' }
});
}
export function delPurchase(query) {
return dispatch => basicAction({
type: 'del',
dispatch: dispatch,
actionType: 'DEL_PURCHASE',
url: ApiTable.delPurchase.replace("{overspeedId}", query?.overspeedId),
msg: { error: '删除车辆信息失败' },
// reducer: { name: 'reportstatistic' }
});
}

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

@ -1,10 +1,10 @@
import React, { useEffect, useState } 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 moment from 'moment';
import { getBridge, getProject } from "../actions/infor"
import { getBridge, getProject,delBridge,delProject } from "../actions/infor"
import UserModal from './infor/details';
import ProjectModal from './project/project';
@ -14,7 +14,7 @@ const BrideTable = (props) => {
// const [regionId, setRegionId] = useState()//区域id
// const [placeType, setPlaceType] = useState()//场所
// const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期
// const [sitename, setSitename] = useState()//场所名称
const [sitename, setSitename] = useState()//场所名称
const [counts, setCounts] = useState()//shuju
const [modalVisible, setModalVisible] = useState(false);
const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
@ -22,6 +22,11 @@ const BrideTable = (props) => {
const [typecard, setTypecard] = useState();
const [activeKey, setActiveKey] = useState('tab1');
const [recortd, setRecortd] = useState()
const [whichofits, setWhichofits] = useState('qiaoliang')
const [delet, setDelet] = useState()
const ref = useRef()
useEffect(() => { ref.current.reload() }, [modalVisible, modalVisibleyilan,whichofits,delet])
const columns = {
tab1: [
{
@ -30,12 +35,9 @@ const BrideTable = (props) => {
fixed: 'left',
width: 120,
options: 1,
search: false,
backgroundColor: "#ffffff",
fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
placeholder: '请输入桥梁代码进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => {
@ -45,17 +47,19 @@ const BrideTable = (props) => {
},
{
title: '桥梁名称',
search: false,
dataIndex: 'containers',
fixed: 'left',
width: 120,
render: (dom, record) => {
return record.bridgeName
},
fieldProps: {
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入桥梁名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
},
{
title: '中心桩号',
@ -1489,7 +1493,16 @@ const BrideTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"></Button></div>
>编辑</Button><Button type="link"
onClick={() => {
const query = {
bridgeId: record.id
}
dispatch(delBridge(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
}
},
@ -1532,9 +1545,9 @@ const BrideTable = (props) => {
options: 1,
backgroundColor: "#ffffff",
fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入项目名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@ -1670,7 +1683,16 @@ const BrideTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"></Button></div>
>编辑</Button><Button type="link"
onClick={() => {
const query = {
projectId: record.id
}
dispatch(delProject(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
}
},
@ -1706,27 +1728,6 @@ const BrideTable = (props) => {
},
]
}
const requestBridge = () => {
const query = {
}
setRowSelected([]);
dispatch(getBridge(query)).then((res) => {
setCounts(res?.payload?.data)
console.log(res)
});
}
//工程数据
const requestProject = () => {
const query = {
type: '桥梁'
}
setRowSelected([]);
dispatch(getProject(query)).then((res) => {
setCounts(res?.payload?.data)
})
}
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@ -1766,7 +1767,7 @@ const BrideTable = (props) => {
<Spin spinning={false}>
<div className='protable-transpor'>
<ProTable
actionRef={ref}
toolbar={{
multipleLine: true,
@ -1777,13 +1778,13 @@ const BrideTable = (props) => {
{
key: 'tab1',
label: <span onClick={() => {
requestBridge()
setWhichofits('qiaoliang')
}}>桥梁{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => {
requestProject()
setWhichofits('gongcheng')
}}>工程一览{activeKey === 'tab2'}</span>,
},
@ -1796,12 +1797,7 @@ const BrideTable = (props) => {
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
onReset={(v) => {
// const { id } = depMessage[0]
// console.log(id)
// setRegionId(id)
// setPlaceType(-1)
// setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
// setSitename('')
setSitename('')
}}
rowSelection={{
selectedRowKeys: rowSelected,
@ -1813,16 +1809,33 @@ const BrideTable = (props) => {
dataSource={counts || []}
request={async (params) => {
if(whichofits=='qiaoliang'){
const query = {
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'){
const query = {
type: 'bridge',
// type:sitename
}
setRowSelected([]);
const res = await dispatch(getProject(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,

40
web/client/src/sections/fillion/components/gis/patrolGis.js

@ -5,13 +5,15 @@ import { useState } from 'react';
import { DatePicker } from 'antd';
import Bounds from './bounds';
import moment from 'moment';
import { getReportList } from '../../actions/patrol'
const { RangePicker } = DatePicker;
function PatrolGis(props) {
const { reportList, userId, dispatch } = props;
const [mapComplete, setMapComplete] = useState(false);
const [mapObj, setMapObj] = useState();
const [dateRange, setDateRange] = useState();
let markers = [];
let PATH = [];
useEffect(() => {
if (AMap) loadMap();
return () => {
@ -24,8 +26,23 @@ function PatrolGis(props) {
}, [true])
useEffect(() => {
if (mapObj) {
mapObj.remove(markers);
mapObj.remove(PATH);
}
let query = { userId, reportType: 'patrol' }
if (userId) {
if ((dateRange && dateRange instanceof Array)) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment(dateRange[1]).endOf('day').format('YYYY-MM-DD HH:mm:ss')
} else {
query.startTime = moment().add(-6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss')
query.endTime = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
}
dispatch(getReportList(query));
} else {
query.isTop = true;
dispatch(getReportList(query));
}
}, [userId, dateRange])
@ -33,9 +50,10 @@ function PatrolGis(props) {
if (reportList && mapObj) {
mapObj.clearMap();
renderMarkers();
if (userId)
renderPath();
}
}, [reportList, mapObj])
}, [reportList, mapObj, userId])
const loadMap = () => {
const map = new AMap.Map("amapId", {
@ -86,11 +104,12 @@ function PatrolGis(props) {
position: new AMap.LngLat(longitude, latitude),
icon: icon,
offset: new AMap.Pixel(-12, -12),
extData: {
name: user.name || '',
}
// extData: {
// name: user.name || '',
// }
});
// marker.setTitle(s.name);
markers.push(marker);
map.add(marker);
})
}
@ -111,6 +130,7 @@ function PatrolGis(props) {
if (longitude && latitude)
path.push([item.longitude, item.latitude])
});
PATH = path;
var polyline1 = new AMap.Polyline({
map: map,
path: path, // 设置线覆盖物路径
@ -122,9 +142,13 @@ function PatrolGis(props) {
}
return (
<div style={{ width: '100%', backgroundColor: '#101824', height: '100%', minHeight: 700 }}>
<div style={{ width: '100%', backgroundColor: '#101824', height: '100%', minHeight: 700, position: 'relative' }}>
<div id='amapId' style={{ width: '100%', height: '100%', background: "#101824", minHeight: 700 }} />
<RangePicker onChange={(date, dateString) => { setDateRange(dateString) }} />
<div style={{ position: 'absolute', top: 8, left: 20, display: userId ? 'block' : 'none' }}>
<RangePicker
onChange={(date, dateString) => { setDateRange(dateString) }}
/>
</div>
{mapObj ? <Bounds map={mapObj} /> : ''}
</div >
)

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

@ -0,0 +1,106 @@
import React, { useEffect, useState } from 'react';
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"
const HightModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd } = props
const [success,setSuccess]=useState()
useEffect(() => {
return () => {
setRecortd()
}
}, [setRecortd])
// console.log(recortd)
return (
<Spin spinning={false}>
{/* {
newlysay ? */}
<ModalForm
width={'90rem'}
visible={visible}
onVisibleChange={onVisibleChange}
onFinish={(values) => {
if (rewkeys === 'passenger') {
console.log(values)
const query = { ...values, id:recortd?.id }
dispatch(putOperaTional(query)).then((res) => {
setSuccess(res.success)
})
return true
}
if (rewkeys === 'highways') {
console.log(values)
const query = { ...values, id:recortd?.id }
dispatch(putHighways(query)).then((res) => {
setSuccess(res.success)
})
return true
}
}}
initialValues={recortd}
>
{typecard == '111' ?
<ProForm.Group
>
<ProFormText
name='name'
width="md"
label='类型'
tooltip="最长为 24 位"
placeholder="请输入名称"
// value={recortd?.[0]?.value}
disabled
rules={[{ required: true, message: "必填" }]}
/>
<ProFormText
name='count'
width="md"
label='数量'
tooltip="最长为 24 位"
placeholder="请输入名称"
/>
</ProForm.Group>
: <ProForm.Group>
<ProFormText
name={newlys?.[0]?.type}
width="md"
label={newlys?.[0]?.name}
tooltip="最长为 24 位"
placeholder="请输入名称"
/>
</ProForm.Group>}
</ModalForm>
{/* : ''
} */}
</Spin>
)
}
function mapStateToProps(state) {
const { depMessage } = state;
const pakData = (dep) => {
return dep.map((d) => {
return {
title: d.name,
value: d.id,
children: pakData(d.subordinate)
}
})
}
let depData = pakData(depMessage.data || [])
return {
loading: depMessage.isRequesting,
depData,
};
}
export default connect(mapStateToProps)(HightModal);

74
web/client/src/sections/fillion/components/highwaysTable.js

@ -1,27 +1,27 @@
import React, { useEffect, useState } 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 moment from 'moment';
import { getReportStatistic } from "../actions/infor"
import UserModal from './infor/details';
import { getHighways } from "../actions/infor"
import HightModal from './highways/highwaysdata';
const HigwaysTable = (props) => {
const { dispatch, user, depData, depMessage, depLoading } = props
const { dispatch, user, } = props
const [rowSelected, setRowSelected] = useState([])
const [regionId, setRegionId] = useState()//区域id
const [placeType, setPlaceType] = useState()//场所
const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期
const [sitename, setSitename] = useState()//场所名称
const [counts, setCounts] = useState()//shuju
const [modalVisible, setModalVisible] = useState(false);
const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
const [modalRecord, setModalRecord] = useState();
const [typecard, setTypecard] = useState();
const [recortd, setRecortd] = useState()
const [sitename, setSitename] = useState()//桥梁名称
const ref = useRef()
useEffect(() => { ref.current.reload() }, [ modalVisibleyilan])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
const hightModal = (type, record) => {
setModalVisibleyilan(true);
// setModalType(type);
if (type == 'edit') {
setModalRecord(record);
@ -61,6 +61,9 @@ const exports = (ids, counts) => {
placeholder: '请输入类型进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => {
return record.name
},
},
{
title: '数量',
@ -70,7 +73,7 @@ const exports = (ids, counts) => {
fixed: 'left',
width: 120,
render: (dom, record) => {
return record.address
return record.count
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -86,8 +89,9 @@ const exports = (ids, counts) => {
render: (dom, record) => {
return <div><Button type="link"
onClick={() => {
openModal('edit', record)
hightModal('edit', record)
setTypecard('111')
setRecortd(record)
}}
>编辑</Button></div>
@ -99,17 +103,13 @@ const exports = (ids, counts) => {
<Spin spinning={false}>
<div className='protable-transpor'>
<ProTable
actionRef={ref}
scroll={{ x: 800 }}
options={false}
ref={c => { finishedProductTable = c; }}
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
onReset={(v) => {
const { id } = depMessage[0]
console.log(id)
setRegionId(id)
setPlaceType(-1)
setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
setSitename('')
}}
rowSelection={{
@ -120,46 +120,30 @@ const exports = (ids, counts) => {
}}
columns={columns}
dataSource={(counts || {}).rows || []}
dataSource={counts || []}
request={async (params) => {
const query = {
startDate: day[0],
endDate: day[1],
placeType: placeType,
regionId: regionId,
placeName: sitename,
limit: params.pageSize,
offset: ((params.current ? params.current : 1) - 1) * params.pageSize
name:sitename
}
setRowSelected([]);
const res = await dispatch(getReportStatistic(query));
const res = await dispatch(getHighways(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(),
// <Popconfirm title="确认导出?" onConfirm={() => { props.exports(rowSelected, counts) }}>
// <Button
// >
// 导出
// </Button>
// </Popconfirm>
],
}}
>
</ProTable></div>
<UserModal
visible={modalVisible}
onVisibleChange={setModalVisible}
{modalVisibleyilan ? <HightModal
visible={modalVisibleyilan}
onVisibleChange={setModalVisibleyilan}
modalRecord={modalRecord}
typecard={typecard}
/>
rewkeys={'highways'}
recortd={recortd}
setRecortd={setRecortd}
/> : ''}
</Spin >
)
}

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

@ -1,17 +1,19 @@
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { Form, Spin, Table } from 'antd';
import { DrawerForm, ProForm, ProFormText } from '@ant-design/pro-form';
import { putRoadway } from "../../actions/infor"
import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form';
import { putRoadway, putSpecificVehicle, putHouseholds,putCircuit,putVehicle,putPurchase } from "../../actions/infor"
import { putBridge } from "../../actions/infor"
const UserModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, date, setRecortd,engineering } = props
const { visible, onVisibleChange, typecard, rewkeys, data, recortd, sitename, dispatch, setRecortd, setMonitor } = props
const [newlys, setNewlys] = useState() //必填数据
const [newlysay, setNewlysay] = useState() //处理hou
const [records, setRecords] = useState()//处理
const [recordsay, setRecordsay] = useState()//必填数据
const [success, setSuccess] = useState() //状态
// const [success, setSuccess] = useState() //状态
// const [establishment, setEstablishment] = useState() //业户类型
console.log(recortd)
useEffect(() => {
const array = []
if (rewkeys === 'transportation') {
@ -24,7 +26,51 @@ const UserModal = (props) => {
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
console.log(array)
// console.log(array)
}
if (rewkeys === 'weihuo') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
// console.log(array)
}
if (rewkeys === 'chuzu') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
array?.splice(1, 1)
setNewlys(array?.splice(0, 2))
setNewlysay(array)
}
if (rewkeys === 'yehu') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
// console.log(array)
}if (rewkeys === 'xianlu') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
setNewlys(array?.splice(0, 2))
setNewlysay(array)
}if (rewkeys === 'cheliang') {
_.forIn(data, function (value, key) {
array.push({ name: value, type: key })
});
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(() => {
@ -43,12 +89,55 @@ const UserModal = (props) => {
setRecordsay(arr.splice(1, 2))
setRecords(arr)
}
if (rewkeys === 'weihuo') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
setRecords(arr)
}
if (rewkeys === 'chuzu') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
setRecords(arr)
} if (rewkeys === 'yehu') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1))
setRecords(arr)
}
if (rewkeys === 'xianlu') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1))
setRecords(arr)
}if (rewkeys === 'cheliang') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1))
setRecords(arr)
}if (rewkeys === 'zhichao') {
_.forIn(recortd, function (value, key) {
arr.push({ value: value, type: key })
});
setRecordsay(arr.splice(1, 2))
// setEstablishment(arr.splice(-1, 1))
setRecords(arr)
}
}, [recortd])
useEffect(() => {
return () => {
setRecortd()
}
}, [])
}, [setRecortd])
// console.log(recortd)
return (
<Spin spinning={false}>
@ -59,20 +148,21 @@ const UserModal = (props) => {
visible={visible}
onVisibleChange={onVisibleChange}
onFinish={(values) => {
console.log(values)
if (Object.values(values).length > 0) {
if (rewkeys === 'transportation') {
if (typecard == '111') {
console.log(values)
const query = { ...values, level: sitename, roadId: records?.[0]?.value || '' }
dispatch(putRoadway(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
} else {
const query = { ...values, level: sitename }
dispatch(putRoadway(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
}
}
if (rewkeys === 'bridge') {
@ -82,15 +172,98 @@ const UserModal = (props) => {
dispatch(putBridge(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
} else {
const query = { ...values }
dispatch(putBridge(query)).then((res) => {
setSuccess(res.success)
})
return success
return true
}
}
if (rewkeys === 'weihuo' || rewkeys === 'chuzu') {
if (typecard == '111') {
console.log(values)
const query = { ...values, vehicleId: records?.[0]?.value || '', type: rewkeys === 'chuzu' ? '出租车' : '危货' }
dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
const query = { ...values, type: rewkeys }
dispatch(putSpecificVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
}
}
if (rewkeys === 'yehu') {
if (typecard == '111') {
console.log(values)
const query = { ...values, businessId: records?.[0]?.value, type: rewkeys == 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
const query = { ...values, type: rewkeys === 'chuzu' ? '出租车' : '危货' }
dispatch(putHouseholds(query)).then((res) => {
setSuccess(res.success)
})
return true
}
}if (rewkeys === 'xianlu') {
if (typecard == '111') {
console.log(values)
const query = { ...values, lineId:records?.[0]?.value || '' }
dispatch(putCircuit(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
const query = { ...values }
dispatch(putCircuit(query)).then((res) => {
setSuccess(res.success)
})
return true
}
}
if (rewkeys === 'cheliang') {
if (typecard == '111') {
console.log(values)
const query = { ...values, carId:records?.[0]?.value || '' }
dispatch(putVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
} else {
const query = { ...values }
dispatch(putVehicle(query)).then((res) => {
setSuccess(res.success)
})
return true
}
}
if (rewkeys === 'zhichao') {
if (typecard == '111') {
console.log(values)
const query = { ...values, overspeedId:records?.[0]?.value || '' }
dispatch(putPurchase(query)).then((res) => {
setSuccess(res.success)
setMonitor(res)
})
return true
} else {
const query = { ...values }
dispatch(putPurchase(query)).then((res) => {
setSuccess(res.success)
setMonitor(res)
})
return true
}
}
} else { return false }
}}
initialValues={recortd}
>
@ -104,7 +277,7 @@ const UserModal = (props) => {
tooltip="最长为 24 位"
placeholder="请输入名称"
value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
width="md"
@ -112,9 +285,24 @@ const UserModal = (props) => {
tooltip="最长为 24 位"
placeholder="请输入名称"
value={recordsay?.[1]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/>
{rewkeys === 'yehu' ?
<ProFormSelect
rules={[{ required: true, message: "必填" }]}
options={[
{
value: '出租车',
label: '出租车',
}, {
value: '危货',
label: '危险货运',
},
]}
name='type'
label='类型'
/> : null
}
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称"
@ -131,7 +319,7 @@ const UserModal = (props) => {
tooltip="最长为 24 位"
placeholder="请输入名称"
// value={recordssy?.[0]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
width="md"
@ -139,8 +327,24 @@ const UserModal = (props) => {
tooltip="最长为 24 位"
placeholder="请输入名称"
// value={recordssy?.[1]?.value}
rules={[{ required: true, message: "必填" }]}
// rules={[{ required: true, message: "必填" }]}
/>
{rewkeys === 'yehu' ?
<ProFormSelect
rules={[{ required: true, message: "必填" }]}
options={[
{
value: '出租车',
label: '出租车',
}, {
value: '危货',
label: '危险货运',
},
]}
name='type'
label='类型'
/> : null
}
{newlysay?.map((item, index) => {
return <ProFormText width="md"
name={item?.type} label={newlysay[index]?.name} placeholder="请输入名称" key={index}

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

@ -1,21 +1,30 @@
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState,useRef } from 'react';
import { connect } from 'react-redux';
import { Spin, Button, Popconfirm, Col, Input,Row } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import moment from 'moment';
import { getReportStatistic } from "../actions/infor"
import { getPurchase,delPurchase } from "../actions/infor"
import UserModal from './infor/details';
const InForTable = (props) => {
const { dispatch, user, depData, depMessage, depLoading } = props
const [rowSelected, setRowSelected] = useState([])
const [counts, setCounts] = useState()//shuju
const [modalVisible, setModalVisible] = useState(false);
const [modalRecord, setModalRecord] = useState();
const [typecard, setTypecard] = useState();
const [recortd, setRecortd] = useState()
const [monitor, setMonitor] = useState()
const [delet, setDelet] = useState()
const [nameOfInspectionPoint, setNameOfInspectionPoint] = useState()//检测点名称
const [licensePlate, setLicensePlate] = useState()//车牌号
const [numberOfAxles, setNumberOfAxles] = useState()//车轴数
const [overrunRateUpper, setOverrunRateUpper] = useState()//超限率上限
const [overrunRateFloor, setOverrunRateFloor] = useState()//超限率下限
const [testTime, setTestTime] = useState()//超限率下限
const ref = useRef()
useEffect(() => { ref.current.reload() }, [monitor,delet,modalVisible])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@ -45,31 +54,52 @@ const InForTable = (props) => {
const columns =
[
{
title: '检测点名称',
title: '区/县',
dataIndex: 'placeName',
fixed: 'left',
width: 120,
options: 1,
search: false,
backgroundColor: "#ffffff",
fieldProps: {
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入检测点名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
render: (dom, record) => {
return record.districtcounty
},
},
{
title: '车牌号',
title: '检测点名称',
// search: false,
dataIndex: 'containers1',
fixed: 'left',
width: 120,
render: (dom, record) => {
return record.address
return record.nameOfInspectionPoint
},
fieldProps: {
onChange: (value, cs) => {
setNameOfInspectionPoint(value.currentTarget.value)
},
placeholder: '请输入车牌号进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},{
title: '车牌号码',
// search: false,
dataIndex: 'containers444',
fixed: 'left',
width: 120,
render: (dom, record) => {
return record.licensePlate
},
fieldProps: {
onChange: (value, cs) => {
setLicensePlate(value.currentTarget.value)
},
placeholder: '请输入车牌号进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
@ -80,9 +110,12 @@ const InForTable = (props) => {
dataIndex: 'containers2',
width: 120,
render: (dom, record) => {
return record.address
return record.numberOfAxles
},
fieldProps: {
onChange: (value, cs) => {
setNumberOfAxles(value.currentTarget.value)
},
placeholder: '请输入车轴数进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
@ -95,20 +128,28 @@ const InForTable = (props) => {
//
width: 120,
render: (dom, record) => {
return record.address
return record.overrunRate
},
fieldProps: {
placeholder: '请输入超限率进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
// fieldProps: {
// placeholder: '请输入超限率进行搜索',
// getPopupContainer: (triggerNode) => triggerNode.parentNode,
// },
renderFormItem: (item, { type, defaultRender, formItemProps, fieldProps, ...rest }, form) => {
return <Input.Group >
<Row gutter={8}>
<Col span={8}>
<Input placeholder='输入超限率'/>
<Input
onChange={(value)=>{
setOverrunRateUpper(value.currentTarget.value)
}}
placeholder='输入超限率上限'/>
</Col>
<Col span={8}>
<Input placeholder='输入超限率'/>
<Input
onChange={(value)=>{
setOverrunRateFloor(value.currentTarget.value)
}}
placeholder='输入超限率下限'/>
</Col>
</Row>
</Input.Group>
@ -123,7 +164,7 @@ const InForTable = (props) => {
width: 120,
render: (dom, record) => {
return record.address
return record.overrunWeight
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -137,7 +178,7 @@ const InForTable = (props) => {
width: 120,
render: (dom, record) => {
return record.address
return record.grossVehicleWeight
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -151,7 +192,7 @@ const InForTable = (props) => {
width: 120,
render: (dom, record) => {
return record.address
return record.vehicleCargoWeightLimit
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -164,9 +205,12 @@ const InForTable = (props) => {
valueType: 'dateTime',
width: 120,
render: (dom, record) => {
return record.address
return record.testTime
},
fieldProps: {
onChange: (value, cs) => {
setTestTime(cs)
},
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
}, {
@ -178,7 +222,7 @@ const InForTable = (props) => {
width: 120,
render: (dom, record) => {
return record.address
return record.nameOfBusinessOwner
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -193,7 +237,7 @@ const InForTable = (props) => {
width: 140,
render: (dom, record) => {
return record.address
return record.businessAddress
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -208,7 +252,7 @@ const InForTable = (props) => {
width: 140,
render: (dom, record) => {
return record.address
return record.notifier
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -223,7 +267,7 @@ const InForTable = (props) => {
width: 140,
render: (dom, record) => {
return record.address
return record.notificationMethod
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -235,10 +279,10 @@ const InForTable = (props) => {
valueType: 'dateRange',
width: 140,
width: 240,
render: (dom, record) => {
return record.address
return record.notificationResults
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -253,7 +297,7 @@ const InForTable = (props) => {
width: 140,
render: (dom, record) => {
return record.address
return record.processingTime
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -268,7 +312,7 @@ const InForTable = (props) => {
width: 140,
render: (dom, record) => {
return record.address
return record.deductPoints
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -283,7 +327,23 @@ const InForTable = (props) => {
width: 140,
render: (dom, record) => {
return record.address
return record.fine
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
}
},
{
title: '备注',
search: false,
dataIndex: 'containers14',
valueType: 'dateRange',
width: 140,
render: (dom, record) => {
return record.remarks
},
fieldProps: {
getPopupContainer: (triggerNode) => triggerNode.parentNode,
@ -301,9 +361,18 @@ const InForTable = (props) => {
onClick={() => {
openModal('edit', record)
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"
onClick={() => {
const query = {
overspeedId: record.id
}
dispatch(delPurchase(query)).then((res) => {
setDelet(res)
})
}}
>编辑</Button><Button type="link"></Button></div>
>删除</Button></div>
}
},
@ -342,6 +411,7 @@ const InForTable = (props) => {
<Spin spinning={false}>
<div className='protable-transpor'>
<ProTable
actionRef={ref}
scroll={{ x: 800 }}
options={false}
ref={c => { finishedProductTable = c; }}
@ -355,20 +425,26 @@ const InForTable = (props) => {
},
}}
columns={columns}
dataSource={(counts || {}).rows || []}
dataSource={counts || []}
onReset={(v) => {
setNameOfInspectionPoint('')
setLicensePlate('')
setNumberOfAxles('')
setOverrunRateUpper('')
setOverrunRateFloor('')
setTestTime('')
}}
request={async (params) => {
const query = {
startDate: day[0],
endDate: day[1],
placeType: placeType,
regionId: regionId,
placeName: sitename,
limit: params.pageSize,
offset: ((params.current ? params.current : 1) - 1) * params.pageSize
nameOfInspectionPoint:nameOfInspectionPoint,
licensePlate:licensePlate,
numberOfAxles:numberOfAxles,
overrunRateUpper:overrunRateUpper,
overrunRateFloor:overrunRateFloor,
testTime:testTime
}
setRowSelected([]);
const res = await dispatch(getReportStatistic(query));
const res = await dispatch(getPurchase(query));
setCounts(res.payload.data)
return {
...res,
@ -390,15 +466,41 @@ const InForTable = (props) => {
>
</ProTable></div>
<UserModal
{modalVisible ? <UserModal
visible={modalVisible}
onVisibleChange={setModalVisible}
modalRecord={modalRecord}
typecard={typecard}
/>
rewkeys={'zhichao'}
data={data}
recortd={recortd}
setMonitor={setMonitor}
// sitename={sitename}
setRecortd={setRecortd}
/> : ''}
</Spin >
)
}
const data={
"districtcounty": "区/县",
"nameOfInspectionPoint": "检测点名称",
"licensePlate": "车牌号码",
"numberOfAxles": "车轴数",
"overrunRate": "超限率",
"overrunWeight": "超限重量",
"grossVehicleWeight": "车货总重",
"vehicleCargoWeightLimit": "车货限重",
"testTime": "检测时间",
"nameOfBusinessOwner": "经营业户名称",
"businessAddress": "经营业户地址",
"notifier": "通知人",
"notificationMethod": "通知方式",
"notificationResults": "通知结果",
"processingTime": "处理时间",
"deductPoints": "扣分",
"fine": "罚款",
"remarks": "备注"
}
function mapStateToProps(state) {
const { auth, depMessage } = state;
const pakData = (dep) => {

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

File diff suppressed because it is too large

35
web/client/src/sections/fillion/components/patrolTable.js

@ -126,7 +126,7 @@ const DetailList = (props) => {
dataIndex: 'userName',
align: 'center',
render: (text, record) => {
return record.user.name
return record?.user?.name || ''
}
}, {
title: '上报时间',
@ -254,6 +254,7 @@ const PatrolTable = (props) => {
const [record, setRecord] = useState();
const [dateRange, setDateRange] = useState();
const [detailVisible, setDetailVisible] = useState(false)
const [activeTabKey1, setActiveTabKey1] = useState('tab1');
const { RangePicker } = DatePicker;
@ -265,6 +266,11 @@ const PatrolTable = (props) => {
useEffect(() => {
if (record) {
queryData();
}
}, [record, dateRange])
const queryData = () => {
let query = { userId: record.id, reportType: 'patrol' }
if ((dateRange && dateRange instanceof Array)) {
query.startTime = moment(dateRange[0]).startOf('day').format('YYYY-MM-DD HH:mm:ss')
@ -272,7 +278,14 @@ const PatrolTable = (props) => {
}
dispatch(getReportList(query));
}
}, [record, dateRange])
useEffect(() => {
if (activeTabKey1 && activeTabKey1 == 'tab2') {
setRecord(null);
} else if (activeTabKey1 && activeTabKey1 == 'tab1') {
setRecord(userList[0]);
}
}, [activeTabKey1])
const handelRefresh = () => {
let query = { userId: record.id, reportType: 'patrol' }
@ -301,16 +314,28 @@ const PatrolTable = (props) => {
<DetailList reportList={reportList} record={record} loading={reportListLoading} dispatch={dispatch} handleOpen={handleOpen} handelRefresh={handelRefresh} />
</Card>
</div>],
tab2: <PatrolGis userId={(record ||{}).id} dispatch={dispatch} />
tab2: <PatrolGis userId={(record || {}).id} dispatch={dispatch} reportList={reportList} />
};
const [activeTabKey1, setActiveTabKey1] = useState('tab1');
const onTab1Change = (key) => {
setActiveTabKey1(key);
};
const handleChangeRecord = (newRecord) => {
let target = null;
if (!record || newRecord.id != record.id) {
target = newRecord;
}
setRecord(target);
}
return (
<div className='card-protable'>
<Card >
<PatrolNameList onChange={(record) => setRecord(record)} record={record} userList={userList} loading={userLoading} />
<PatrolNameList
onChange={(record) => handleChangeRecord(record)}
record={record}
userList={userList}
loading={userLoading} />
</Card>
<Card
style={{ flex: 1 }}

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

@ -121,7 +121,7 @@ const ProjectModal = (props) => {
label={newlys?.[0]?.name}
tooltip="最长为 24 位"
placeholder="请输入名称"
value={recordsay?.[0]?.value}
// value={recordsay?.[0]?.value}
rules={[{ required: true, message: "必填" }]}
/><ProFormText
name={newlys?.[1]?.type}
@ -129,7 +129,7 @@ const ProjectModal = (props) => {
label={newlys?.[1]?.name}
tooltip="最长为 24 位"
placeholder="请输入名称"
value={recordsay?.[1]?.value}
// value={recordsay?.[1]?.value}
rules={[{ required: true, message: "必填" }]}
/>
<ProFormSelect

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

File diff suppressed because it is too large

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

@ -4,17 +4,14 @@ import { Spin, Button, Popconfirm, Badge } from 'antd';
import ProTable from '@ant-design/pro-table';
import './protable.less'
import moment from 'moment';
import { getRoadway, getProject, putRoadway } from "../actions/infor"
import { getRoadway, getProject, delRoadway, delProject } from "../actions/infor"
import UserModal from './infor/details';
import ProjectModal from './project/project';
const TransporTationTable = (props) => {
const { dispatch, user, depData, depMessage, depLoading } = props
const [rowSelected, setRowSelected] = useState([])
// const [regionId, setRegionId] = useState()//区域id
// const [placeType, setPlaceType] = useState()//场所
// const [day, setDay] = useState([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])//日期
const [sitename, setSitename] = useState()//场所名称
const [sitename, setSitename] = useState()//桥梁名称
const [counts, setCounts] = useState()//shuju
const [modalVisible, setModalVisible] = useState(false);
const [modalVisibleyilan, setModalVisibleyilan] = useState(false);
@ -22,29 +19,10 @@ const TransporTationTable = (props) => {
const [typecard, setTypecard] = useState();
const [activeKey, setActiveKey] = useState('tab1');
const [recortd, setRecortd] = useState()
// const ref = useRef()
//请求数据
const requestRoadway = (name) => {
const query = {
level: name
}
setSitename(name)
setRowSelected([]);
dispatch(getRoadway(query)).then((res) => {
setCounts(res.payload.data)
});
}
// useEffect(()=>{ref.current.reload()},[counts])
//工程数据
const requestProject = () => {
const query = {
type: '道路'
}
setRowSelected([]);
dispatch(getProject(query)).then((res) => {
setCounts(res.payload.data)
})
}
const [whichofits, setWhichofits] = useState('xian')
const [delet, setDelet] = useState()
const ref = useRef()
useEffect(() => { ref.current.reload() }, [modalVisible, modalVisibleyilan, whichofits, delet])
//打开弹窗
const openModal = (type, record) => {
setModalVisible(true);
@ -91,9 +69,9 @@ const TransporTationTable = (props) => {
options: 1,
backgroundColor: "#ffffff",
fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入道路名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@ -1197,11 +1175,17 @@ const TransporTationTable = (props) => {
setRecortd(record)
openModal('edit', record)
setTypecard('111')
// sessionStorage.setItem('record', JSON.stringify(record))
// sessionStorage.setItem('newly', JSON.stringify(data))
}}
>编辑</Button><Button type="link"></Button></div>
>编辑</Button><Button type="link"
onClick={() => {
const query = {
roadId: record.id
}
dispatch(delRoadway(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
}
},
@ -1245,9 +1229,9 @@ const TransporTationTable = (props) => {
options: 1,
backgroundColor: "#ffffff",
fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入道路名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@ -2353,7 +2337,14 @@ const TransporTationTable = (props) => {
setRecortd(record)
}}
>编辑</Button><Button type="link"></Button></div>
>编辑</Button><Button type="link" onClick={() => {
const query = {
roadId: record.id
}
dispatch(delRoadway(query)).then((res) => {
setDelet(res)
})
}}>删除</Button></div>
}
},
@ -2398,9 +2389,9 @@ const TransporTationTable = (props) => {
options: 1,
backgroundColor: "#ffffff",
fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入道路名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@ -3506,7 +3497,15 @@ const TransporTationTable = (props) => {
setRecortd(record)
}}
>编辑</Button><Button type="link"></Button></div>
>编辑</Button><Button type="link" onClick={() => {
const query = {
roadId: record.id
}
dispatch(delRoadway(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
}
},
@ -3551,9 +3550,9 @@ const TransporTationTable = (props) => {
options: 1,
backgroundColor: "#ffffff",
fieldProps: {
// onChange: (value, cs) => {
// setSitename(value.currentTarget.value)
// },
onChange: (value, cs) => {
setSitename(value.currentTarget.value)
},
placeholder: '请输入项目名称进行搜索',
getPopupContainer: (triggerNode) => triggerNode.parentNode,
},
@ -3689,7 +3688,16 @@ const TransporTationTable = (props) => {
setTypecard('111')
setRecortd(record)
}}
>编辑</Button><Button type="link"></Button></div>
>编辑</Button><Button type="link"
onClick={() => {
const query = {
projectId: record.id
}
dispatch(delProject(query)).then((res) => {
setDelet(res)
})
}}
>删除</Button></div>
}
},
@ -3729,7 +3737,7 @@ const TransporTationTable = (props) => {
<Spin spinning={false}>
<div className='protable-transpor'>
<ProTable
// actionRef={ref}
actionRef={ref}
toolbar={{
multipleLine: true,
menu: {
@ -3738,18 +3746,26 @@ const TransporTationTable = (props) => {
items: [
{
key: 'tab1',
label: <span onClick={() => requestRoadway('县')}>县道{activeKey === 'tab1'}</span>,
label: <span onClick={() => {
setWhichofits('xian')
}}>县道{activeKey === 'tab1'}</span>,
},
{
key: 'tab2',
label: <span onClick={() => requestRoadway('乡')}>乡道{activeKey === 'tab2'}</span>,
label: <span onClick={() => {
setWhichofits('xiang')
}}>乡道{activeKey === 'tab2'}</span>,
},
{
key: 'tab3',
label: <span onClick={() => requestRoadway('村')}>村道{activeKey === 'tab3'}</span>,
label: <span onClick={() => {
setWhichofits('cun')
}}>村道{activeKey === 'tab3'}</span>,
}, {
key: 'tab4',
label: <span onClick={() => requestProject()}>工程一览{activeKey === 'tab4'}</span>,
label: <span onClick={() => {
setWhichofits('gongcheng')
}}>工程一览{activeKey === 'tab4'}</span>,
},
],
},
@ -3760,12 +3776,7 @@ const TransporTationTable = (props) => {
style={{ width: "100% ", overflow: "auto", height: '760px' }}
rowKey='id'
onReset={(v) => {
const { id } = depMessage[0]
// console.log(id)
// setRegionId(id)
// setPlaceType(-1)
// setDay([moment('2022-03-01').format('YYYY-MM-DD'), moment().format('YYYY-MM-DD')])
// setSitename('')
setSitename('')
}}
rowSelection={{
selectedRowKeys: rowSelected,
@ -3774,14 +3785,13 @@ const TransporTationTable = (props) => {
},
}}
columns={columns[activeKey]}
dataSource={counts || []}
request={async (params) => {
if (whichofits == 'xian') {
const query = {
level: '县'
level: '县',
road: sitename
}
setSitename('县')
setRowSelected([]);
const res = await dispatch(getRoadway(query));
// console.log(res)
@ -3791,6 +3801,44 @@ const TransporTationTable = (props) => {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
} if (whichofits == 'xiang') {
const query = {
level: '乡',
road: sitename
}
setRowSelected([]);
const res = await dispatch(getRoadway(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
} if (whichofits == 'cun') {
const query = {
level: '村',
road: sitename
}
setRowSelected([]);
const res = await dispatch(getRoadway(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
if (whichofits == 'gongcheng') {
const query = {
type: 'road',
// type:sitename
}
setRowSelected([]);
const res = await dispatch(getProject(query));
setCounts(res.payload.data)
return {
...res,
total: res.payload.data ? res.payload.data.count : 0
}
}
}}
search={{
defaultCollapsed: false,

4
web/client/src/sections/fillion/nav-item.js

@ -20,9 +20,9 @@ export function getNavItem(user, dispatch) {
<Menu.Item key="fillionoperational">
<Link to="/fillion/operational">运政管理</Link>
</Menu.Item>
<Menu.Item key="fillionenforce">
{/* <Menu.Item key="fillionenforce">
<Link to="/fillion/enforce">执法管理</Link>
</Menu.Item>
</Menu.Item> */}
<Menu.Item key="fillionmaintenance">
<Link to="/fillion/maintenance">养护管理</Link>
</Menu.Item>

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

@ -54,7 +54,7 @@ function Rightbottom(props) {
textStyle: {
color: '#fff',
},
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>公里`,
formatter: (values) => `${values.seriesName}<br /> ${values.marker} ${values.name}<b>${values.value}</b>`,
},
legend: {
orient: "vertical",

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

@ -83,7 +83,7 @@ const RNAKS = [FIRST, SECOND, THIRD]
<div className='build-right-center'>
<div className='build-right-center-top'>
<img src="/assets/images/quanju/gonglugongcheng.png"></img>
<div>在建公路工程数量</div>
<div>在建公路工程数量/</div>
<h2>{sundata}</h2>
</div>
<AutoRollComponent content={renderContent()}

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

@ -36,10 +36,10 @@ const Build = (props) => {
const requestbuildingnumber = async ()=>{
const res = await dispatch(getdaolutongji());
let alltype = Object.keys(res.payload.data?.roadType || {}).map((item)=>({name:item,value:Number(keepThreeNum(res.payload.data.roadType[item]))}))
console.log(alltype,'打他啊')
// console.log(alltype,'打他啊')
setdata(alltype.filter(item=>item.name==='县'||item.name==="乡"||item.name==='村'))
setbuildingnumber(res.payload.data)
console.log(res.payload.data,'哈哈哈')
// console.log(res.payload.data,'哈哈哈')
}
@ -118,6 +118,8 @@ const Build = (props) => {
<Module title={"各种状态公路数量统计"} style={{ width: "100%",
height:" 33%"
}} customize = {true}>
<div style={{height:"100%",position:"relative"}} >
<span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center"}}></span>
{buildingnumber&&buildingnumber.buildedRoad!==0&&totalgongli!==0?<div className='build-left-top'>
<div className='build-left-top-item'>
<div>
@ -137,6 +139,7 @@ const Build = (props) => {
<div>{buildingnumber?.buildedRoad || 0}</div>
</div>
</div>:<NoData/>}
</div>
</Module>
<Module title={"各乡镇道路分布统计"} style={{ width: "100%",
height:" 33%",marginTop:'3%'
@ -203,7 +206,7 @@ const Build = (props) => {
{safetyData&&sunsafetyData!==0?<RightBottom width='100%'
height='100%'
text='道路总公里'
total={sunsafetyData}
total={keepThreeNum(sundata)}
data={keepThreeNum(safetyData)}/>:<NoData/>}
</Module>
</div>

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

@ -178,7 +178,7 @@
align-items: center;
justify-content: center;
position: absolute;
left: 16%;
left: 15%;
top:38%;
h2{
font-size: 1.25rem;
@ -278,7 +278,7 @@
justify-content: center;
position: absolute;
align-items: center;
left: 19%;
left: 15%;
top:38%;
h2{
font-size: 1.25rem;

30
web/client/src/sections/quanju/containers/footer/guanli/LeftItem.js

@ -15,7 +15,7 @@ export default function LeftItem({datas}) {
textStyle: {
color: '#fff',
},
formatter: (values) => ` ${values.name}<b>${datas.processed}</b>`,
formatter: (values) => `${values.name}<b>${datas.processed}</b>`,
},
title: {
text: `${(datas.processed*100/datas.total).toFixed(2)}%`,
@ -78,6 +78,7 @@ export default function LeftItem({datas}) {
},
series: [{
type: 'bar',
showBackground: true,//这里只有显示背景才能出现背景灰色的线
data: [{
name: '已处理',
value: (datas.processed*100/datas.total).toFixed(2),
@ -97,37 +98,18 @@ export default function LeftItem({datas}) {
coordinateSystem: 'polar',
roundCap: true,
barWidth: 8,
barGap: '-100%', // 两环重叠
z: 2,
},{ // 灰色环
type: 'bar',
data: [{
value: 100,
itemStyle: {
color: '#092B7B ',
shadowColor: 'rgba(0, 0, 0, 0.2)',
shadowBlur: 5,
shadowOffsetY: 2
}
}],
coordinateSystem: 'polar',
roundCap: true,
barWidth: 8,
barGap: '-100%', // 两环重叠
z: 1
}]
},
]
}
chartInstance.setOption(option);
}, [])
return (
<div className='guanli-left-item'>
{/* <span style={{position:"absolute",width:"10%",color:"#FFF",backgroundColor:'rgba(216, 240, 255, 0.1)',right:"5%",textAlign:"center",top:"2%"}}>条</span> */}
<div className='guanli-left-item-left'>
<span>{datas.name}</span>
<div>{datas.total} <span></span></div>
<div>{datas.total} <span></span></div>
</div>
<div className='guanli-left-item-right'>
<span></span>

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

@ -14,11 +14,16 @@ const Guanli = (props) => {
const [rightitemlist,setrightitemlist] = useState()
const requestleftDatas = async()=>{
const res = await dispatch(getjiandmanage())
res.payload.data.sort((a,b)=>{
res.payload.data?.sort((a,b)=>{
return parseInt(b.total) - parseInt(a.total)
})
setleftDatas(res.payload.data)
console.log(res.payload.data,'哈哈哈')
// console.log(res.payload.data,'哈哈哈')
}
const data_string=(str)=> {
str.match('/([^.]*)$/g')
}
const requestRightDatas = async()=>{
const res = await dispatch(getjiandetail())
@ -28,12 +33,19 @@ const Guanli = (props) => {
let d = res.payload.data?.overSpeedList?.filter((item,index)=>{
return escape(item.processingTime).indexOf("%u")<0
})
// let d2 = d.sort((a,b)=>b.processingTime < a.processingTime ?-1:1)
let d2 = d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
d.map((item,index)=>{
if(parseInt(item.processingTime.match(/([^.]*)$/)[0])<10){
return item.processingTime = `${(item.processingTime.match(/^([^.]*)(.[^.]*)/)[0])}.0${parseInt(item.processingTime.match(/([^.]*)$/)[0])}`
}
// console.log(d3,'好评')
console.log(item.processingTime.match(/([^.]*)$/)[0],'kk')
})
d.sort((a, b) => b.processingTime.localeCompare(a.processingTime))
setrightDatas(res.payload.data)
setrightitemlist(d)
console.log(d,'对比的数据')
console.log(d2,'完美')
// console.log(d2,'完美')
console.log(res.payload.data,'嘿嘿嘿')
}
useEffect(()=>{
@ -45,7 +57,7 @@ const Guanli = (props) => {
const renderContent = () => {
return <div style={{height:"100%"}}>
{rightitemlist && rightitemlist.length!==0?rightitemlist?.map(({ id, licensePlate, overrunRate,fine,processingTime }, index) => {
if(index<30){
if(index<120){
return <div key={index} className='guanli-right-item'>
<span>{licensePlate}</span>
<span>{overrunRate}%</span>

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

@ -19,6 +19,7 @@
.guanli-left-item{
box-sizing: border-box;
width: 85%;
position: relative;
// height: 30%;
height: 24vh;
margin: 0 auto 3%;

18
web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js

@ -14,7 +14,10 @@ const Right = (props) => {
setList(res.payload.data.reportList.filter((item, index) => {
return item.projectType == "road"
}))
setNums(res.payload.data.processed)
setNums(res.payload.data.reportCount.filter((item, index) => {
return item.projectType == "road"
}))
console.log(res.payload.data);
})
}, [])
useEffect(() => {
@ -24,6 +27,7 @@ const Right = (props) => {
// const
})
}, [])
console.log("1211", nums);
const renderBody = () => {
return (
@ -59,13 +63,13 @@ const Right = (props) => {
<p style={{ width: "50%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", textAlign: "right", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["县"].toFixed(3)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}>公里</span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: (roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "40%", background: "url(/assets/images/leadership/zuo.png)", backgroundSize: "100% 100%", position: "absolute", top: "50%" }}>
{/* </div>
<div style={{ width: "15%", height: "20%", background: "url(/assets/images/leadership/center.png)", backgroundSize: "100% 100%", position: "absolute", top: "67%", left: "34%" }}> */}
<div style={{ width: (roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#fff", float: "left", marginTop: "5.6%" }}>
</div>
<div style={{ width: ((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", background: "url(/assets/images/leadership/you.png)", backgroundSize: "100% 100%", position: "absolute", right: "-1%", top: "70%" }}></div>
{/* <div style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</div> */}
<div style={{ width: ((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}></div>
</div>
<div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村道道路<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}></span></p>
@ -77,7 +81,7 @@ const Right = (props) => {
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums || []}</span><span style={{ marginLeft: "10%" }}></span></p>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : []}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
<Lun

12
web/client/src/sections/quanju/containers/footer/leadership/centerleft/handong.js

@ -9,11 +9,15 @@ const Right = (props) => {
const [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [roads, setRoads] = useState()
const [nums, setNums] = useState()
useEffect(() => {
const daolus = dispatch(getRoadmaintain()).then((res) => {
setList(res.payload.data.reportList.filter((item, index) => {
return item.projectType == "culvert"
}))
setNums(res.payload.data.reportCount.filter((item, index) => {
return item.projectType == "culvert"
}))
})
}, [])
useEffect(() => {
@ -59,16 +63,16 @@ const Right = (props) => {
<p style={{ width: "50%", position: "absolute", right: "0%", textAlign: "right", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["县"].toFixed(0)}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: (roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "40%", backgroundColor: "#fff", float: "left", marginTop: "4%" }}>
<div style={{ width: (roads?.["县"] / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#fff", float: "left", marginTop: "5.6%" }}>
</div>
{/* <div style={{ width: "15%", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</div> */}
<div style={{ width: ((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}></div>
<div style={{ width: ((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}></div>
</div>
<div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村涵洞<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(3)}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>乡村涵洞<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{(roads?.["乡"] + roads?.["村"]).toFixed(0)}</span><span style={{ marginLeft: "4%" }}></span></p>
<p style={{ position: "absolute", right: "0", color: "rgba(216,240,255,0.8)" }}>占比<span>{((roads?.["乡"] + roads?.["村"]) / (roads?.["乡"] + roads?.["村"] + roads?.["县"])).toFixed(4) * 100}</span><span>%</span></p>
</div>
</div>
@ -77,7 +81,7 @@ const Right = (props) => {
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>187</span><span style={{ marginLeft: "10%" }}></span></p>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>涵洞</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : []}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
<Lun

6
web/client/src/sections/quanju/containers/footer/leadership/centerleft/lunbo/bottomlunbo.js

@ -31,9 +31,9 @@ const Bottomlunbo = (props) => {
业户信息:
</div>
<div style={{ width: "40%", height: "60%", float: "left" }}>
<div style={{ width: "100%", height: "100%", position: "relative" }}>
<img src='/assets/images/leadership/di.png' style={{ width: "60%", marginLeft: "20%", marginTop: "15%" }} />
<p style={{ fontSize: "16px", color: "#FFFFFF", fontFamily: "PingFangSC-Medium, PingFang SC", position: "absolute", top: "90%", left: "33%" }}>出租车</p>
<div style={{ width: "100%", height: "90%", position: "relative", top: "60%" }}>
<img src='/assets/images/leadership/di.png' style={{ width: "60%", height: "100%", marginLeft: "20%" }} />
<p style={{ fontSize: "16px", color: "#FFFFFF", fontFamily: "PingFangSC-Medium, PingFang SC", position: "absolute", top: "10%", left: "33%" }}>出租车</p>
</div>
</div>
<Lunbotop

5
web/client/src/sections/quanju/containers/footer/leadership/centerleft/lunbo/style.less

@ -4,3 +4,8 @@
}
.hidden-scroll-bar-y::-webkit-scrollbar { width: 0 !important }
.huoyun{
overflow: hiddden;
text-overflow: ellipsis;
white-space: nowrap
}

7
web/client/src/sections/quanju/containers/footer/leadership/centerleft/lunbo/toplunbo.js

@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react'
import Lunbotop from "../../right/lunbo"
import { getyunzheng } from "../../../../../actions/example"
import "./style.less"
const Toplunbo = (props) => {
@ -30,9 +31,9 @@ const Toplunbo = (props) => {
height: "50%",
}}>
<div style={{ width: "40%", height: "60%", float: "left" }}>
<div style={{ width: "100%", height: "100%", position: "relative", top: "-30%" }}>
<img src='/assets/images/leadership/di.png' style={{ width: "60%", marginLeft: "20%" }} />
<p style={{ fontSize: "16px", color: "#FFFFFF", fontFamily: "PingFangSC-Medium, PingFang SC", position: "absolute", top: "20%", left: "33%" }}>危险货运</p>
<div style={{ width: "100%", height: "110%", position: "relative", top: "-30%" }}>
<img src='/assets/images/leadership/di.png' style={{ width: "60%", height: "100%", marginLeft: "20%" }} />
<p className='huoyun' style={{ fontSize: "16px", color: "#FFFFFF", fontFamily: "PingFangSC-Medium, PingFang SC", position: "absolute", top: "10%", left: "33%" }}>危险货运</p>
</div>
</div>
<Lunbotop

14
web/client/src/sections/quanju/containers/footer/leadership/centerleft/qiqoliang.js

@ -8,11 +8,15 @@ const Right = (props) => {
const [beijing, setBeijing] = useState()
const [list, setList] = useState([])
const [roads, setRoads] = useState()
const [nums, setNums] = useState()
useEffect(() => {
const daolus = dispatch(getRoadmaintain()).then((res) => {
setList(res.payload.data.reportList.filter((item, index) => {
return item.projectType == "bridge"
}))
setNums(res.payload.data.reportCount.filter((item, index) => {
return item.projectType == "bridge"
}))
})
}, [])
useEffect(() => {
@ -55,16 +59,16 @@ const Right = (props) => {
<div style={{ width: "100%", height: "43%", position: "relative", left: "1%" }}>
<div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ position: "absolute", color: "rgba(216,240,255,0.8)" }}>占比<span style={{ fontFamily: " PingFangSC-Regular, PingFang SC" }}>{(roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(4) * 100}</span>%</p>
<p style={{ width: "25%", position: "absolute", right: "1%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%" }}>{roads?.["大桥"]}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
<p style={{ width: "25%", position: "absolute", right: "0%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF", marginLeft: "10%", textAlign: "right" }}>{roads?.["大桥"]}<span style={{ color: "#F5FCFF", fontSize: "16px", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span><span style={{ fontSize: "18px", color: "rgba(216,240,255,0.8)", fontFamily: "PingFangSC-Regular, PingFang SC", marginLeft: "5%" }}></span></p>
</div>
<div style={{ width: "96%", position: "relative", left: "2%", height: "50%" }}>
<div style={{ width: (roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "40%", backgroundColor: "#fff", float: "left", marginTop: "4%" }}>
<div style={{ width: (roads?.["大桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#fff", float: "left", marginTop: "5.6%" }}>
</div>
<div style={{ width: (roads?.["中桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
<div style={{ width: (roads?.["中桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#df0001", float: "left", marginTop: "5.6%" }}>
</div>
<div style={{ width: (roads?.["小桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%" }}></div>
<div style={{ width: (roads?.["小桥"] / (roads?.["小桥"] + roads?.["中桥"] + roads?.["大桥"])).toFixed(2) * 100 + "%" || "", height: "20%", transform: "skewX(-45deg)", backgroundColor: "#18ABFF", float: "left", marginTop: "5.6%", borderRadius: "0 2% 2% 0" }}></div>
</div>
<div style={{ width: "96%", position: "relative", left: "2%" }}>
<p style={{ width: "50%", position: "absolute", color: "rgba(216,240,255,0.8)", fontSize: "18px" }}>中小桥梁<span style={{ marginLeft: "4%", fontFamily: "YouSheBiaoTiHei", fontSize: "24px", color: "#F5FCFF" }}>{roads?.["小桥"] + roads?.["中桥"]}</span><span style={{ marginLeft: "4%" }}></span></p>
@ -76,7 +80,7 @@ const Right = (props) => {
{/* <p>{title || []}</p> */}
<img src='/assets/images/quanju/icon.png' style={{ width: "24px", position: "absolute", left: "-1%", top: "23%" }} />
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "3%" }}>养护事件</span>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>道路</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>187</span><span style={{ marginLeft: "10%" }}></span></p>
<p style={{ position: "absolute", color: "#D8F0FF", fontSize: "14px", right: "6%" }}><span style={{ marginLeft: "-20%" }}>桥梁</span><span style={{ fontSize: "18px", fontFamily: "YouSheBiaoTiHei", color: "#ffffff", marginLeft: "10%" }}>{nums ? nums[0]?.count : []}</span><span style={{ marginLeft: "10%" }}></span></p>
{/* <img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} /> */}
</div>
<Lun

2
web/client/src/sections/quanju/containers/footer/leadership/left/echarts/lefttopecharts.js

@ -98,7 +98,7 @@ const Lefttopecharts = () => {
offsetCenter: [0, 46], // x, y,单位px
textStyle: {
color: "#fff",
fontSize: 14, //表盘上的标题文字大小
fontSize: "2vh", //表盘上的标题文字大小
fontWeight: 400,
fontFamily: "PingFangSC",
},

18
web/client/src/sections/quanju/containers/footer/leadership/left/left-top.js

@ -7,13 +7,17 @@ import request from 'superagent'
const Lefttop = () => {
const style = { height: "68%" }
useEffect(() => {
// return () => {
request('GET', '/search').then((success, failure) => {
console.log(success);
});
// };
}, [])
// useEffect(() => {
// // return () => {
// request.get('https://report.amap.com/ajax/districtRank.do?linksType=1&cityCode=360100')
// // .set({ 'cookie': 'user_unique_id=a185bbc78215de5101823ec9f8455ff7; SESSION=781150e0-bd25-4431-b3ac-267bb49075fd; UM_distinctid=1823ec9ec89ce5-08fca33c64505f-76492e29-1fa400-1823ec9ec8a1447; CNZZDATA1256662931=1445129462-1658907884-https%253A%252F%252Freport.amap.com%252F%7C1658907884' })
// .end((success, failure) => {
// console.log(success);
// }, err => {
// console.log(err)
// });
// // };
// }, [])
return (
<>
<Module style={style} title={"道路拥堵指数"} >

41
web/client/src/sections/quanju/containers/footer/leadership/right/hudong.js

@ -61,20 +61,41 @@ class ReactCarousel extends Component {
this.state.imgs.map((value, index) => {
return (
<li style={{ position: "relative", left: "8%", width: "100%", height: "100%" }} className={index === this.state.showIndex ? 'show' : ''}
<li style={{ position: "relative", left: "8%", width: "100%", height: "100%", top: "-5%", fontSize: "12px" }} className={index === this.state.showIndex ? 'show' : ''}
key={index}
>
<div style={{ width: "40%", height: "40%", backgroundColor: "red", position: "absolute", left: "-3%", top: "3%" }}>
<div style={{ width: "45%", height: "40%", backgroundColor: "red", position: "absolute", left: "-3%", top: "5%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[0]?.name}
</div>
{value[1]?.name ? <div style={{ width: "40%", height: "40%", backgroundColor: "#fff", position: "absolute", left: "45%", top: "3%" }}>
</div>
</div>
{value[1]?.name ? <div style={{ width: "45%", height: "40%", backgroundColor: "#fff", position: "absolute", left: "45%", top: "5%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[1]?.name}
</div>
</div>
</div> : ""}
{value[2]?.name ? <div style={{ width: "40%", height: "40%", backgroundColor: "bule", position: "absolute", left: "-3%", top: "50%" }}>
{value[2]?.name ? <div style={{ width: "45%", height: "40%", backgroundColor: "bule", position: "absolute", left: "-3%", top: "49%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[2]?.name}
</div>
</div>
</div> : ""}
{value[3]?.name ? <div style={{ width: "40%", height: "40%", backgroundColor: "pink", position: "absolute", left: "45%", top: "50%" }}>
{value[3]?.name ? <div style={{ width: "45%", height: "40%", backgroundColor: "pink", position: "absolute", left: "45%", top: "49%" }}>
<div style={{ width: "100%", height: "100%", position: "absolute", top: "80%" }}>
<div style={{ width: "100%", height: "20%", backgroundColor: "rgba(0,0,0,0.6)", overflow: "hiddden", textOverflow: "ellipsis", whiteSpace: "nowrap" }}>
<img src='/assets/images/leadership/weizhis.png' style={{ width: "6%", height: "80%", marginLeft: "3%", marginRight: "3%" }} />
{value[3]?.name}
</div>
</div>
</div> : ""}
{/* <div>{value[1].name}</div>
<div>{value[2].name}</div>
@ -97,8 +118,12 @@ class ReactCarousel extends Component {
</ul> */}
<div className="control" style={{ width: "100%", height: "10%" }}>
<span className="left" onClick={(e) => { this.previous(e) }}></span>
<span className="right" onClick={(e) => { this.next(e) }}></span>
<span style={{ position: "absolute", top: "86%", width: "3%", height: "8%" }} className="left" onClick={(e) => { this.previous(e) }}>
<img src='/assets/images/leadership/zuofanye.png' style={{ width: "100%", height: "100%" }} />
</span>
<span style={{ position: "absolute", top: "86%", width: "3%", height: "8%", right: "6%" }} className="right" onClick={(e) => { this.next(e) }}>
<img src='/assets/images/leadership/youofanye.png' style={{ width: "100%", height: "100%" }} />
</span>
</div>
</div>
</div>
@ -119,7 +144,7 @@ class ReactCarousel extends Component {
let { timer } = this.state;
timer = setInterval(() => {
this.next();
}, 300000);
}, 2000);
this.setState({
timer
})

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

@ -1,5 +1,6 @@
import React, { useState, useEffect } from 'react'
import Module from '../../../public/module'
import { Spin } from 'antd'
import Lun from "./lunbo"
import "./left.less"
import { getZhichaolist } from "../../../../actions/example"
@ -12,7 +13,8 @@ const Rightbottom = (props) => {
const [nums, setNums] = useState([])
useEffect(() => {
const zhichaolist = dispatch(getZhichaolist()).then((res) => {
setList(res.payload?.data?.overSpeedList)
setList(res.payload?.data?.overSpeedList.filter(item => /.*[\u4e00-\u9fa5_a-zA-Z]+.*$/.test(item.processingTime) == false
))
// console.log(res);
setNums(res.payload?.data?.processed)
})
@ -27,10 +29,10 @@ const Rightbottom = (props) => {
// console.log(beijing);
}}>
{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 == item.name ? "#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 == item.name ? "#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 == item.name ? "#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 == item.name ? "#FFFFFF" : "rgba(216,240,255,0.8000)", position: "absolute", left: "70%" }}>{item.processingTime ? item.processingTime : "--"}</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" }}>{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>
</li>
})
@ -41,6 +43,7 @@ const Rightbottom = (props) => {
return (
<>
<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}</span>
@ -49,14 +52,16 @@ const Rightbottom = (props) => {
<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>
<p style={{ width: "30%", fontSize: "12px", color: "#FFFFFF", height: "100%", textAlign: "center", position: "absolute", lineHeight: "3vh", left: "70%" }}>处理日期</p>
</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> */}
</Module>
</>
)

12
web/client/src/sections/quanju/containers/footer/leadership/right/right-top.js

@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import Module from '../../../public/module'
import { Radio, Select } from 'antd';
import { Radio, Select, Spin } from 'antd';
import Lunbo from "./lunbo"
import Huadong from './hudong';
import "./left.less"
@ -72,10 +72,14 @@ const Righttop = () => {
}
return (
<>
<Module style={style} title={"路面执法监控"}>
<div style={{ width: "100%", height: "65%" }}>
<div style={{ width: "100%", height: "65%", position: "relative" }}>
<p style={{ position: "absolute", left: "30%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>监控总数</p><p style={{ position: "absolute", left: "42%", fontSize: "24px", marginLeft: "1%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>129</p>
<p style={{ position: "absolute", left: "60%", top: "2%", fontSize: "14px", color: "#FFFFFF" }}>在线率</p><p style={{ position: "absolute", left: "68%", fontSize: "24px", marginLeft: "2%", top: "-0.5%", color: "#FFFFFF", fontFamily: "YouSheBiaoTiHei" }}>88.87%</p>
<div style={{ width: "100%", height: "10%", position: "relative" }}>
<img src='/assets/images/leadership/head.png' style={{ width: "15%", marginLeft: "5%" }} />
<div className='wy-rightTop' style={{ position: "absolute", right: "5%", top: "130%" }}>
<Select
size={size}
@ -105,6 +109,7 @@ const Righttop = () => {
<span style={{ position: "absolute", color: "#FFFFFF", fontSize: "24px", fontFamily: "YouSheBiaoTiHei", left: "10%" }}>离线详情</span>
<img src='/assets/images/leadership/zibiaoti.png' style={{ width: "95%", height: "34px", position: "absolute", top: "12px", left: "6%" }} />
</div>
{/* <Spin tip="Loading..." spinning={num ? true : false} style={{ width: "100%", height: "100%" }}> */}
<Lunbo
// canScroll={true}
content={renderBody()}
@ -112,8 +117,11 @@ const Righttop = () => {
divHeight={"100%"}
divId={"screen-slope"}
/>
{/* </Spin> */}
</div>
</Module>
</>
)
}

39
web/client/src/sections/quanju/containers/footer/operation/left.js

@ -10,6 +10,7 @@ const Left = (props) => {
const [treeData, setTreeData] = useState([])
const [treeDataList, setTreeDataList] = useState([])
const [expandedKeys, setExpandedKeys] = useState([]);
const [searchValue, setSearchValue] = useState('');
const [autoExpandParent, setAutoExpandParent] = useState(true);
const onExpand = (newExpandedKeys) => {
@ -20,6 +21,7 @@ const Left = (props) => {
useEffect(() => {
const { dispatch } = props
dispatch(getBusTierList())
}, [])
const { busTier } = props
const style = { height: "97%", marginTop: "3%" }
@ -35,10 +37,45 @@ const Left = (props) => {
setSearchValue(value);
setAutoExpandParent(true);
};
const loop = (treeData) =>
treeData.map((item) => {
const index = item.title.indexOf(searchValue);
const beforeStr = item.title.substr(0, index);
const afterStr = item.title.substr(index + searchValue.length);
const title =
index > -1 ? (
<span>
{beforeStr}
<span className="site-tree-search-value">{searchValue}</span>
{afterStr}
</span>
) : (
<span>{item.title}</span>
);
if (item.children && item.children.length > 0) {
const children = loop(item.children);
return {
...item,
title: index > -1 || children.length ? title : null,
children: children.length ? children : undefined
};
}
return index > -1
? {
...item,
title
}
: {
...item,
title: null
};
})
.filter((item) => !!item.title);
useEffect(() => {
let busTierList = []
let busTierOpen = []
let dataList = []
busTier && busTier.data && busTier.data.forEach((e, index) => {
if (index == 0) {
busTierOpen.push(e.name)
@ -115,7 +152,7 @@ const Left = (props) => {
onExpand={onExpand}
expandedKeys={expandedKeys}
autoExpandParent={autoExpandParent}
treeData={treeData}
treeData={loop(treeData)}
/> : <div style={{ width: '100%', color: '#fff', textAlign: 'center', marginTop: '90%' }}></div>
}

37
web/client/src/utils/webapi.js

@ -2,7 +2,6 @@
import { ProxyRequest } from "@peace/utils";
export const GodTransRequest = new ProxyRequest("_godTrans");
export const ApiTable = {
login: 'login',
logout: 'logout',
@ -45,23 +44,24 @@ export const ApiTable = {
//运政管理
getOperaTional: 'vehicle',
getSpecificVehicle: 'vehicle/specific',
getHouseholds: 'vehicle/business',
getOperaTional: 'vehicle', putOperaTional: 'vehicle',
getSpecificVehicle: 'vehicle/specific', putSpecificVehicle: 'vehicle/specific', delSpecificVehicle: 'vehicle/{vehicleId}/specific',
getHouseholds: 'vehicle/business', putHouseholds: 'vehicle/business', delHouseholds: 'vehicle/business/{businessId}',
getRoadway: 'road',
// 获取运政统计
getYunZheng: "transportation/statistic",
//桥梁管理
getBridge: 'bridge',
//工程数据
getProject: 'project',
//桥梁管理
getBridge: 'bridge',
putBridge: 'bridge',
delBridge: 'bridge/{bridgeId}',
//工程数据
getProject: 'project',
putProject: 'project',
delProject: 'project/{projectId}',
//道路数据
getRoadway: 'road',
putRoadway: 'road',
delRoadway: 'road/{roadId}',
//道路统计
getBgroadstatistics: "build/road_state",
@ -79,13 +79,30 @@ export const ApiTable = {
getBusTier: '/operation/car_level',
//获取路政列表
getHighways: 'road_manage',
getHighways: 'road_manage', putHighways: 'road_manage',
//获取道路养护统计及列表
getRoadMaintenance: 'conserve/statistic',
//获取宣传数据
getpropagata: 'publicity',
// <<<<<<< HEAD
// //公交信息
// getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
// getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
// =======
//公交信息
getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}',
getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}',
//治超管理
getPurchase: 'overspeed',
putPurchase: 'overspeed',
delPurchase: 'overspeed/{overspeedId}',
// >>>>>>> a3fe9bee43370f1e5ceb69dcdef1b9b7cbf9c84c
};

3805
web/log/development.txt

File diff suppressed because it is too large

2
web/package.json

@ -68,7 +68,7 @@
"@antv/g6": "^4.2.5",
"@fs/attachment": "^1.0.0",
"@peace/components": "0.0.35",
"@peace/utils": "^0.0.51",
"@peace/utils": "0.0.51",
"antd": "^4.19.2",
"antd-theme-generator": "^1.2.8",
"args": "^5.0.1",

Loading…
Cancel
Save