Browse Source

卡片高度

dev
巴林闲侠 2 years ago
parent
commit
26558c05ac
  1. 1
      api/app/lib/controllers/report/index.js
  2. 19
      api/app/lib/schedule/zhidiao.js
  3. 3
      web/client/src/sections/quanju/containers/footer/operation/right.js

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

@ -451,7 +451,6 @@ async function spotCheck (ctx) {
} }
async function spotCheckDetail (ctx) { async function spotCheckDetail (ctx) {
const { models } = ctx.fs.dc const { models } = ctx.fs.dc
console.log('txc1', ctx.query)
const { startTime, endTime } = ctx.query const { startTime, endTime } = ctx.query
try { try {
const res = await models.ReportSpotCheck.findAll({ const res = await models.ReportSpotCheck.findAll({

19
api/app/lib/schedule/zhidiao.js

@ -22,15 +22,30 @@ module.exports = function (app, opts) {
Authorization: Authorization Authorization: Authorization
} }
}) })
if (busRunRes && busRunRes.length) {
if (app.fs.zhidiaoData) {
app.fs.zhidiaoData.busRun = busRunRes
} else {
app.fs.zhidiaoData = {
busRun: busRunRes
}
}
}
const busLineRes = await app.fs.zhidiaoRequest.get(`getLinePointList`, { const busLineRes = await app.fs.zhidiaoRequest.get(`getLinePointList`, {
header: { header: {
Authorization: Authorization Authorization: Authorization
} }
}) })
console.log(`定时获取BUS路线信息`); console.log(`定时获取BUS路线信息`);
if (busLineRes && busLineRes.length) {
if (app.fs.zhidiaoData) {
app.fs.zhidiaoData.busLine = busLineRes
} else {
app.fs.zhidiaoData = { app.fs.zhidiaoData = {
busLine: busLineRes, busLine: busLineRes
busRun: busRunRes }
}
} }
} catch (error) { } catch (error) {
console.error(error); console.error(error);

3
web/client/src/sections/quanju/containers/footer/operation/right.js

@ -49,14 +49,13 @@ const Right = ({ busRunTime }) => {
return true return true
} }
}) })
console.log(nextBusRunList);
setBusRunTimeList(nextBusRunList) setBusRunTimeList(nextBusRunList)
}, [queryStr, busRunTime]) }, [queryStr, busRunTime])
const style = { height: "97%", marginTop: "3%" } const style = { height: "97%", marginTop: "3%" }
const carouselContent = busRunTimeList.map((d, index) => { const carouselContent = busRunTimeList.map((d, index) => {
return ( return (
<div key={index} style={{ width: '100%', height: '40%' }} className='carCard'> <div key={index} style={{ width: '100%', }} className='carCard'>
<div className='busInformation'> <div className='busInformation'>
<img src='/assets/images/quanju/theBus.png' style={{ width: '15%', display: 'block', float: 'left' }} /> <img src='/assets/images/quanju/theBus.png' style={{ width: '15%', display: 'block', float: 'left' }} />
<span> <span>

Loading…
Cancel
Save