Browse Source

治超分页

release_0.0.4
巴林闲侠 2 years ago
parent
commit
6ac5abb48a
  1. 2
      api/app/lib/controllers/data/overspeed.js
  2. 2
      api/app/lib/controllers/overview/conserve.js

2
api/app/lib/controllers/data/overspeed.js

@ -43,7 +43,7 @@ async function overspeedGet (ctx) {
if (testTime) {
findOption.where.testTime = testTime
}
const overspeedRes = await models.Overspeed.findAll(findOption)
const overspeedRes = await models.Overspeed.findAndCountAll(findOption)
ctx.status = 200;
ctx.body = overspeedRes

2
api/app/lib/controllers/overview/conserve.js

@ -10,7 +10,7 @@ async function statistic (ctx) {
where: {
reportType: 'conserve',
},
attributes: ['id', 'road', 'time', 'projectType', 'projectType'],
attributes: ['id', 'road', 'time', 'projectType', 'projectType', 'roadSectionStart', 'roadSectionEnd'],
include: [{
model: models.User,
attributes: ['name']

Loading…
Cancel
Save