From b7bc0ca3800c0f9d83a9d00a078a55cd0f353bdd Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Wed, 2 Aug 2023 21:47:59 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=20=E8=BF=90=E8=90=A5=E5=A4=A7=E5=B1=8F-?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B7=A6=E4=BE=A7=E6=9F=90=E5=85=AC=E4=BA=A4?= =?UTF-8?q?=E6=9F=A5=E7=9C=8BGIS=E5=B1=95=E7=A4=BA=E4=BA=86=E5=85=B7?= =?UTF-8?q?=E4=BD=93=E8=BD=A6=E8=BE=86=E7=9A=84=E5=BC=B9=E6=A1=86=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/report/index.js | 20 +++++++++---------- .../footer/conserve/right/right-top.js | 5 ++++- .../quanju/containers/public/olMap.js | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/api/app/lib/controllers/report/index.js b/api/app/lib/controllers/report/index.js index 478529e3..b9c217a7 100644 --- a/api/app/lib/controllers/report/index.js +++ b/api/app/lib/controllers/report/index.js @@ -2,7 +2,7 @@ const { QueryTypes } = require('sequelize'); const moment = require('moment'); -async function reportList(ctx) { +async function reportList (ctx) { try { const models = ctx.fs.dc.models; const { limit, page, startTime, endTime, keyword, userId, reportType, isTop, asc, projectType, handleState = '', performerId = '', codeRoad } = ctx.query @@ -114,7 +114,7 @@ async function reportList(ctx) { } ) AS NR left join "user" on "user".id = NR.user_id - WHERE NEWINDEX = 1; + WHERE NEWINDEX = 1 order by id desc; ` reportRes = await sequelize.query(sqlStr, { type: QueryTypes.SELECT }); if (reportType == 'road') { @@ -146,7 +146,7 @@ async function reportList(ctx) { } } -async function reportPosition(ctx) { +async function reportPosition (ctx) { try { const models = ctx.fs.dc.models; const { startTime, endTime, userId, reportType } = ctx.query @@ -196,7 +196,7 @@ async function reportPosition(ctx) { } } -async function reportDetail(ctx) { +async function reportDetail (ctx) { try { const models = ctx.fs.dc.models; const { reportId } = ctx.params @@ -218,7 +218,7 @@ async function reportDetail(ctx) { } } -async function reportHandle(ctx) { +async function reportHandle (ctx) { try { const { models } = ctx.fs.dc; @@ -248,7 +248,7 @@ async function reportHandle(ctx) { } } -async function createReport(ctx) { +async function createReport (ctx) { try { const { userId } = ctx.fs.api const models = ctx.fs.dc.models; @@ -270,7 +270,7 @@ async function createReport(ctx) { } } -async function deleteReport(ctx) { +async function deleteReport (ctx) { try { const models = ctx.fs.dc.models; const { reportId } = ctx.params; @@ -293,7 +293,7 @@ async function deleteReport(ctx) { // TODO 小程序填写道路名称的时候的道路筛选 是一起都返回 还是不断传关键字搜索返回 -async function spotPrepare(ctx) { +async function spotPrepare (ctx) { try { const { models } = ctx.fs.dc; const sequelize = ctx.fs.dc.orm; @@ -365,7 +365,7 @@ async function spotPrepare(ctx) { } } -async function spotCheck(ctx) { +async function spotCheck (ctx) { const transaction = await ctx.fs.dc.orm.transaction(); try { const { models } = ctx.fs.dc; @@ -442,7 +442,7 @@ async function spotCheck(ctx) { } } } -async function spotCheckDetail(ctx) { +async function spotCheckDetail (ctx) { const { models } = ctx.fs.dc console.log('txc1', ctx.query) const { startTime, endTime } = ctx.query diff --git a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js index 022daf63..c6be0020 100644 --- a/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js +++ b/web/client/src/sections/quanju/containers/footer/conserve/right/right-top.js @@ -48,7 +48,10 @@ const RightTop = (props) => { useEffect(() => { dispatch(getRoadmaintain()).then((res) => { setRoadmaintainList(res.payload.data.reportList.filter((item, index) => { - return item.projectType == "road" || item.projectType == "countyRoad" || item.projectType == "villageRoad" || item.projectType == "rusticRoad" + return item.projectType == "road" + || item.projectType == "countyRoad" + || item.projectType == "villageRoad" + || item.projectType == "rusticRoad" })) }) }, []) diff --git a/web/client/src/sections/quanju/containers/public/olMap.js b/web/client/src/sections/quanju/containers/public/olMap.js index 5a34110c..e615b9c3 100644 --- a/web/client/src/sections/quanju/containers/public/olMap.js +++ b/web/client/src/sections/quanju/containers/public/olMap.js @@ -393,6 +393,7 @@ const OlMap = (props) => { layerName: 'geometry_bus_line' }); if (busLine.length) { + olMapTool.closeOverlay('clickOpen') olMap.setCenter([ (busLine[0].pointLng + busLine[busLine.length - 1].pointLng) / 2, (busLine[0].pointLat + busLine[busLine.length - 1].pointLat) / 2