diff --git a/api/app/lib/controllers/data/vehicle.js b/api/app/lib/controllers/data/vehicle.js
index 554e4e5a..4ba183a5 100644
--- a/api/app/lib/controllers/data/vehicle.js
+++ b/api/app/lib/controllers/data/vehicle.js
@@ -26,7 +26,6 @@ async function get(ctx) {
}
}
const vehicleRes = await models.Statistic.findAll(findOption)
- console.log('vehicleRes', vehicleRes)
ctx.status = 200;
ctx.body = {
vehicleRes: vehicleRes.filter(item => item.dataValues.name === '标志牌' || item.dataValues.name === '养护责任牌')
diff --git a/api/app/lib/models/report.js b/api/app/lib/models/report.js
index adb7d806..00a2c074 100644
--- a/api/app/lib/models/report.js
+++ b/api/app/lib/models/report.js
@@ -163,7 +163,7 @@ module.exports = dc => {
handleState: {
type: DataTypes.STRING,
allowNull: true,
- defaultValue: null,
+ defaultValue: '已处理',
comment: null,
primaryKey: false,
field: "handle_state",
diff --git a/scripts/1.3.0/schema/6.update_report.sql b/scripts/1.3.0/schema/6.update_report.sql
deleted file mode 100644
index da99eb71..00000000
--- a/scripts/1.3.0/schema/6.update_report.sql
+++ /dev/null
@@ -1,4 +0,0 @@
-alter table report
- add handle_opinions varchar(1024);
-
-comment on column report.handle_opinions is '处理意见';
\ No newline at end of file
diff --git a/scripts/1.3.1/schema/4.update_report.sql b/scripts/1.3.1/schema/4.update_report.sql
index eefe3537..51ab0ebc 100644
--- a/scripts/1.3.1/schema/4.update_report.sql
+++ b/scripts/1.3.1/schema/4.update_report.sql
@@ -1,6 +1,13 @@
ALTER TABLE "public"."report"
- ADD COLUMN "handle_advice" varchar(1024);
+ ADD COLUMN "handle_advice" varchar(1024)
+ add handle_opinions varchar(1024);
COMMENT ON COLUMN "public"."report"."handle_state" IS '待处理 / 已指派 / 已处理 / 不处理';
-COMMENT ON COLUMN "public"."report"."handle_advice" IS '管理员处理意见';
\ No newline at end of file
+COMMENT ON COLUMN "public"."report"."handle_advice" IS '管理员处理意见';
+
+comment on column report.handle_opinions is '处理意见';
+
+
+
+
diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js
index f32c0e89..1f9b43bb 100644
--- a/web/client/src/sections/fillion/components/bridgeTable.js
+++ b/web/client/src/sections/fillion/components/bridgeTable.js
@@ -39,6 +39,12 @@ const BrideTable = (props) => {
setDelet(res)
})
}
+ useEffect(async () => {
+ const res = await dispatch(getBridge())
+ setSmallBridge(res.payload.data?.filter(item => item.bridgeClassification === '小桥'))
+ setMiddleBridge(res.payload.data?.filter(item => item.bridgeClassification === '中桥'))
+ setBigBridge(res.payload.data?.filter(item => item.bridgeClassification === '大桥'))
+ }, [])
const deldatas = (id) => { // 工程
const query = {
projectId: id
@@ -1813,9 +1819,7 @@ const BrideTable = (props) => {
setRowSelected([]);
const res = await dispatch(getBridge(query));
// console.log(res)
- setSmallBridge(res.payload.data?.filter(item => item.bridgeClassification === '小桥'))
- setMiddleBridge(res.payload.data?.filter(item => item.bridgeClassification === '中桥'))
- setBigBridge(res.payload.data?.filter(item => item.bridgeClassification === '大桥'))
+
setCounts(res.payload.data)
return {
...res,
diff --git a/web/client/src/sections/fillion/components/highwaysTable.js b/web/client/src/sections/fillion/components/highwaysTable.js
index 2d19929a..248e503c 100644
--- a/web/client/src/sections/fillion/components/highwaysTable.js
+++ b/web/client/src/sections/fillion/components/highwaysTable.js
@@ -91,15 +91,14 @@ const TransporTationTable = (props) => {
width: 160,
fixed: 'right',
render: (dom, record) => {
- console.log('record', record.id === null)
- return
+ disabled={editAble}
+ >编辑) : null}
}
},
diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js
index 99e35d15..6fabd4b7 100644
--- a/web/client/src/sections/fillion/components/transportationTable.js
+++ b/web/client/src/sections/fillion/components/transportationTable.js
@@ -76,6 +76,20 @@ const TransporTationTable = (props) => {
setDelet(res)
})
}
+ useEffect(async () => {
+ console.log('whichofits', whichofits)
+ let query = {}
+ if (whichofits === '县') {
+ query.level = '县'
+ } else if (whichofits === '乡') {
+ query.level = '乡'
+ } else if (whichofits === '村') {
+ query.level = '村'
+ }
+ const res = await dispatch(getRoadway(query))
+ const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
+ setRoadData(uniqueArray)
+ }, [whichofits])
const columns = {
tab1: [
{
@@ -3823,8 +3837,7 @@ const TransporTationTable = (props) => {
}
setRowSelected([]);
const res = await dispatch(getRoadway(query));
- const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
- setRoadData(uniqueArray)
+
setCounts(departmentInfo ? res.payload.data.filter((item) => {
return item.townshipCode === departmentInfo.areaCode
}) : res.payload.data)
@@ -3840,8 +3853,6 @@ const TransporTationTable = (props) => {
}
setRowSelected([]);
const res = await dispatch(getRoadway(query));
- const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
- setRoadData(uniqueArray)
setCounts(departmentInfo ? res.payload.data.filter((item) => {
return item.townshipCode === departmentInfo.areaCode
}) : res.payload.data)
@@ -3856,8 +3867,6 @@ const TransporTationTable = (props) => {
}
setRowSelected([]);
const res = await dispatch(getRoadway(query))
- const uniqueArray = [...new Set(res.payload.data?.map(item => item.routeName))];
- setRoadData(uniqueArray)
setCounts(departmentInfo ? res.payload.data.filter((item) => {
return item.townshipCode === departmentInfo.areaCode
}) : res.payload.data)
@@ -3883,7 +3892,7 @@ const TransporTationTable = (props) => {
search={{
defaultCollapsed: false,
optionRender: (searchConfig, formProps, dom) => [
- {`共有${whichofits}道:${roadData.length || 0}条`},
+ {`共有${whichofits}道:${roadData.length || 0}条`},
...dom.reverse(),
{ props.exports(rowSelected, grade, differentiate) }}
disabled={user?.username !== 'SuperAdmin' && user?.userResources?.filter(i => i.resourceId === 'ROADMANAGE')[0].isshow === "true" ? true : ''}
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
index 8ef8046d..9d8f5b47 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/daolu.js
@@ -38,6 +38,7 @@ const Right = (props) => {
// const
})
}, [])
+ const roadMile = 2481.2
const renderBody = () => {
return (
@@ -117,8 +118,7 @@ const Right = (props) => {
{/*
*/}
- 乡村道道路2481.2公里
-
+ 乡村道道路{roadMile}公里
{/* 乡村道道路{isNaN((roads?.["乡"] + roads?.["村"]).toFixed(3)) ? "" : (roads?.["乡"] + roads?.["村"]).toFixed(3)}公里
*/}
占比{((2481.2 / 2689) * 100).toFixed(2)}%
diff --git a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js
index eb227e7b..7049020d 100644
--- a/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js
+++ b/web/client/src/sections/quanju/containers/footer/leadership/centerleft/top.js
@@ -28,7 +28,7 @@ const Leftcenter = (props) => {
{/* */}
- {
+
{
onClick("daolu")
}} >
{
@@ -37,14 +37,14 @@ const Leftcenter = (props) => {
-
+
+
2689
道路统计公里
{/*
{isNaN((list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)) ? "" : (list?.["县"] + list?.["乡"] + list?.["村"]).toFixed(3)}
*/}
-
2689
-
{
+ {/*
{
onClick("handong")
}} >
{
@@ -57,8 +57,8 @@ const Leftcenter = (props) => {
涵洞统计个
{isNaN((culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)) ? "" : (culvert?.["县"] + culvert?.["乡"] + culvert?.["村"]).toFixed(0)}
-
-
{
+
*/}
+
{
onClick("qiaoliang")
}} >
{
@@ -68,8 +68,8 @@ const Leftcenter = (props) => {
-
桥梁统计座
165
+
桥梁统计座
{/*
{isNaN((bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])) ? "" : (bridge?.["小桥"] + bridge?.["中桥"] + bridge?.["大桥"])}
*/}
diff --git a/web/client/src/sections/quanju/containers/footer/operation/right.js b/web/client/src/sections/quanju/containers/footer/operation/right.js
index f1ce70d2..4bbd5c84 100644
--- a/web/client/src/sections/quanju/containers/footer/operation/right.js
+++ b/web/client/src/sections/quanju/containers/footer/operation/right.js
@@ -30,16 +30,55 @@ const Right = ({ busRunTime }) => {
const [queryStr, setQueryStr] = useState('')
useEffect(() => {
- setBusRunTimeList(
- queryStr ?
- busRunTime.filter(b => {
- return b?.busNoChar?.indexOf(queryStr) > -1
- })
- : busRunTime
- )
+ let repeatCarNo = []
+ let nextBusRunList = queryStr ?
+ busRunTime.filter(b => {
+ let queryMatch = b?.busNoChar?.indexOf(queryStr) > -1
+ if (repeatCarNo.some(c => c == b.busNoChar.trim())) {
+ return false
+ } else {
+ repeatCarNo.push(b.busNoChar.trim())
+ return queryMatch && true
+ }
+ })
+ : busRunTime.filter(b => {
+ if (repeatCarNo.some(c => c == b.busNoChar.trim())) {
+ return false
+ } else {
+ repeatCarNo.push(b.busNoChar.trim())
+ return true
+ }
+ })
+ console.log(nextBusRunList);
+ setBusRunTimeList(nextBusRunList)
}, [queryStr, busRunTime])
const style = { height: "97%", marginTop: "3%" }
+ const carouselContent = busRunTimeList.map((d, index) => {
+ return (
+
+
+
+
+ 车辆牌照
+ {d.busNoChar}
+ 调度状态
+ {busWillRun.find(w => w.value == d.willRun)?.text || '--'}
+
+
+ 发车时间
+ {d.lastDepTime}
+
+
+ 司机
+ {d.employeeName}
+ 工号
+ {d.opNo}
+
+
+
+ )
+ })
return (
{
/>
-
- {
- busRunTimeList.map((d, index) => {
- return (
+ {
+ carouselContent.length > 3 ?
+
+ {
+ carouselContent
+ }
+ {/* {
+ dataLists.map((data, index) => (
- 车辆牌照
- {d.busNoChar}
- 调度状态
- {busWillRun.find(w => w.value == d.willRun)?.text || '--'}
-
-
- 发车时间
- {d.lastDepTime}
-
-
- 司机
- {d.employeeName}
- 工号
- {d.opNo}
+ 所属线路
+ {data.route}
+ 车辆牌照号
+ {data.plate}
+
- )
- })
- }
- {/* {
- dataLists.map((data, index) => (
-
-
-
-
- 所属线路
- {data.route}
- 车辆牌照号
- {data.plate}
-
-
-
-
- ))
- } */}
-
+ ))
+ } */}
+
+ :
+ carouselContent
+ }
+
diff --git a/web/client/src/sections/quanju/containers/public/olMap.js b/web/client/src/sections/quanju/containers/public/olMap.js
index 721ebc81..4d50a3be 100644
--- a/web/client/src/sections/quanju/containers/public/olMap.js
+++ b/web/client/src/sections/quanju/containers/public/olMap.js
@@ -4,6 +4,7 @@ import request from 'superagent'
import Hua from '../footer/leadership/centerleft/hudong'
import moment from 'moment';
import { OlMapRequest } from '$utils'
+import { useRef } from 'react';
export const busWillRun = [
{ text: '非运营', value: '0' },
@@ -17,16 +18,25 @@ export const busWillRun = [
{ text: '检车', value: '8' },
]
+const codeMap = {
+ x: 'gpsxd',
+ y: 'gpsyd',
+ c: 'gpscd',
+}
const OlMap = (props) => {
- const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList, tab, busRunTime, busLine } = props
+ const { dispatch, actions, user, olMapArcgisHost, olMapGeoDataHost, patrolList, roadProjectList, tab, busRunTime, busLine, projectList } = props
const [olMapOpenData, setOlMapOpenData] = useState([])
const [olMap, setOlMap] = useState()
+ const [curClickCoordinate, setCurClickCoordinate] = useState([])
const [pointItem, setPointItem] = useState({})
//
const [busRunData, setBusRunData] = useState([])
+ //
+ const curTab = useRef(tab)
useEffect(() => {
+ curTab.current = tab
setOlMapOpenData([])
setPointItem({})
if (olMap) {
@@ -79,6 +89,10 @@ const OlMap = (props) => {
olMapTool.closeOverlay('pointClickOpen')
olMapTool.removeGeometryLayer('geometry0')
+ setCurClickCoordinate(p.coordinate)
+ if (curTab.current == 'build') {
+ return
+ }
// 请求路线坐标
request.post(`${olMapGeoDataHost || 'http://36.2.6.32:8811'}/geoserver-pg/rest/bufferSearch`)
.type('form')
@@ -201,11 +215,6 @@ const OlMap = (props) => {
})
// 请求路线坐标
if (d.code_road) {
- let codeMap = {
- x: 'gpsxd',
- y: 'gpsyd',
- c: 'gpscd',
- }
let roadCodeStart = d.code_road[0]
let layerName = codeMap[roadCodeStart.toLowerCase()]
if (layerName) {
@@ -425,34 +434,35 @@ const OlMap = (props) => {
useEffect(() => {
if (busLine && olMap && tab == 'operation') {
- olMap.addGeometryLayer({
- features: [
- {
- name: 'busLine',
- attributes: {
- },
- geometry: busLine.map(b => {
- return [b.pointLng, b.pointLat]
- }),
- // geometry: [115.944220000000, 28.545380000000],
- geometryType: 'LineString',
- style: { stroke: { width: 5, color: '#9933FF' } },
- selectStyle: { stroke: { width: 8, color: '#9933FF' } },
- },
- ],
- style: { stroke: { width: 5, color: '#9933FF' } },
- selectStyle: { stroke: { width: 8, color: '#9933FF' } },
- layerName: 'geometry_bus_line'
- });
if (busLine.length) {
olMap.closeOverlay('clickOpen')
+ busRunData.forEach((d, index) => {
+ olMap.removeGeometryLayer('geometry_bus_' + index)
+ })
+ olMap.addGeometryLayer({
+ features: [
+ {
+ name: 'busLine',
+ attributes: {
+ },
+ geometry: busLine.map(b => {
+ return [b.pointLng, b.pointLat]
+ }),
+ // geometry: [115.944220000000, 28.545380000000],
+ geometryType: 'LineString',
+ style: { stroke: { width: 5, color: '#9933FF' } },
+ selectStyle: { stroke: { width: 8, color: '#9933FF' } },
+ },
+ ],
+ style: { stroke: { width: 5, color: '#9933FF' } },
+ selectStyle: { stroke: { width: 8, color: '#9933FF' } },
+ layerName: 'geometry_bus_line'
+ });
olMap.setCenter([
(busLine[0].pointLng + busLine[busLine.length - 1].pointLng) / 2,
(busLine[0].pointLat + busLine[busLine.length - 1].pointLat) / 2
])
- busRunData.forEach((d, index) => {
- olMap.removeGeometryLayer('geometry_bus_' + index)
- })
+
} else {
drawBusRunPoint()
}
@@ -461,6 +471,103 @@ const OlMap = (props) => {
}
}, [busLine, olMap, tab])
+ useEffect(async () => {
+ if (olMap) {
+ if (tab == 'build') {
+ const roadRes = await Promise.all(projectList.map((d, index) => {
+ let roadCodeStart = d.roadCodeStart ? d.roadCodeStart[0] : 'N'
+ let layerName = codeMap[roadCodeStart.toLowerCase()]
+ if (layerName) {
+ return request.post(`${olMapGeoDataHost || 'http://36.2.6.32:8811'}/geoserver-pg/rest/search`)
+ .type('form')
+ .send({
+ params: `{"layerName":"${layerName}","filter":"(roadcode = '${d.roadCodeStart}')","spatialFilter":"","isReturnGeometry":"true","orderByFields":"roadcode, roadstart asc","spatialRel":"INTERSECTS","pageNum":1,"pageSize":99}`
+ })
+ } else {
+ return new Promise(resolve => setTimeout(() => resolve(), 0));
+ }
+ }))
+
+ let renderIndex = 0
+ for (let res of roadRes) {
+ if (res) {
+ if (res.status == 200 && res.body && res.body.code == 1) {
+ const data = res.body.data
+ const { datalist } = data
+ if (datalist?.list?.length) {
+ let dataIndex = 0
+ for (let d of datalist.list) {
+ const corData = projectList[renderIndex]
+ olMap.addGeometryJMLayer({
+ features: [
+ {
+ geometry: d.shape,
+ geometryType: 'LineString',
+ // geometryType: 'Point',
+ attributes: {
+ callbackParams: {},
+ callback: (p, x) => {
+ let extent = p?.selected[0]?.values_?.geometry?.flatCoordinates
+ let coordinate = []
+ if (extent && extent.length) {
+ let coordinateIndex = Math.ceil((extent.length - 1) / 2)
+ if (coordinateIndex % 2) {
+ coordinateIndex -= 1
+ }
+ coordinate = [extent[coordinateIndex], extent[coordinate + 1]]
+ }
+ if (coordinate.length) {
+ setOlMapOpenData([{
+ n: '项目名称',
+ v: corData.entryName
+ }, {
+ n: '项目规模(公里)',
+ v: corData.projectMileage
+ }, {
+ n: '项目投资(万元)',
+ v: corData.investment
+ }, {
+ n: '业主单位',
+ v: corData.buildUnit,
+ }, {
+ n: '施工单位',
+ v: corData.constructionUnit
+ }, {
+ n: '开工日期',
+ v: corData.startTime ? moment(corData.startTime).format('YYYY-MM-DD') : ''
+ },])
+ olMap.addOverlay('clickOpen', {
+ id: 'clickOpen',
+ offset: [0, 4], // 偏移
+ position: coordinate, // 坐标
+ // position: [115.944220000000, 28.545380000000],
+ autoPan: true,
+ autoPanMargin: 100,
+ positioning: 'top-right'
+ })
+ }
+ }
+ },
+ },
+ ],
+ style: { stroke: { width: 5, color: '#9933FF' } },
+ selectStyle: { stroke: { width: 8, color: '#9933FF' } },
+ layerName: 'geometry_build_road_' + renderIndex
+ });
+ }
+ }
+ }
+ }
+ renderIndex++
+ }
+ } else {
+ projectList.forEach((d, index) => {
+ olMap.removeGeometryLayer('geometry_build_road_' + index)
+ })
+ }
+ }
+ }, [projectList, olMap, tab])
+
const isRoadProject = pointItem.report_type == 'road'
// const isBusPoint = pointItem.busNoChar
return (
@@ -624,7 +731,7 @@ const OlMap = (props) => {
}
function mapStateToProps (state) {
- const { auth, global, busRunTime, busLine } = state;
+ const { auth, global, busRunTime, busLine, projectList } = state;
return {
user: auth.user,
actions: global.actions,
@@ -632,6 +739,7 @@ function mapStateToProps (state) {
olMapGeoDataHost: global.olMapGeoDataHost,
busRunTime: busRunTime.data || [],
busLine: busLine.data || [],
+ projectList: projectList.data || []
};
}