From 5c49318d5bde4066eaabbae0e216a1df3f5594fe Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Fri, 15 Dec 2023 16:58:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=B7=AF=E6=AE=B5api?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/data/road.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/app/lib/controllers/data/road.js b/api/app/lib/controllers/data/road.js index e95ae7d1..b12d1a67 100644 --- a/api/app/lib/controllers/data/road.js +++ b/api/app/lib/controllers/data/road.js @@ -1,7 +1,7 @@ 'use strict'; const roadKeyMap = require('./road.json') -async function importIn (ctx) { +async function importIn(ctx) { // 数据导入 try { const models = ctx.fs.dc.models; @@ -32,7 +32,7 @@ async function importIn (ctx) { } } -async function get (ctx) { +async function get(ctx) { try { const models = ctx.fs.dc.models; const { codePrefix, level, road, sectionStart, sectionEnd, alterId } = ctx.query; @@ -86,14 +86,14 @@ async function get (ctx) { } } -async function getRoadSection (ctx) { +async function getRoadSection(ctx) { try { const models = ctx.fs.dc.models; const { level, road, sectionStart, sectionEnd } = ctx.query; let findOption = { where: {}, order: [['id', 'DESC']], - attributes: ['id', 'routeName', 'startingPlaceName', 'stopPlaceName', 'routeCode', 'sectionNo'] + attributes: ['id', 'routeName', 'startingPlaceName', 'stopPlaceName', 'routeCode', 'sectionNo', 'level'] } if (level) { @@ -129,7 +129,7 @@ async function getRoadSection (ctx) { } } -async function edit (ctx) { +async function edit(ctx) { try { const models = ctx.fs.dc.models; const data = ctx.request.body; @@ -155,7 +155,7 @@ async function edit (ctx) { } } -async function del (ctx) { +async function del(ctx) { try { const models = ctx.fs.dc.models; const { roadId } = ctx.params; @@ -176,7 +176,7 @@ async function del (ctx) { } } -async function getVillageList (ctx) { +async function getVillageList(ctx) { try { const models = ctx.fs.dc.models; const { } = ctx.query;