dengyinhuan 1 year ago
parent
commit
7810a12f03
  1. 9
      api/app/lib/models/project.js
  2. 2
      scripts/1.3.1/schema/3.alert_project.sql
  3. 2
      web/client/src/sections/fillion/actions/infor.js
  4. 13
      web/client/src/sections/fillion/components/patrolTable.js
  5. 5
      web/client/src/sections/fillion/components/project/project.js
  6. 2
      web/client/src/sections/quanju/containers/footer/build/Rightcenter.js
  7. 85
      web/client/src/sections/quanju/containers/footer/build/index.js
  8. 8
      web/client/src/sections/quanju/containers/footer/build/style.less
  9. 92
      web/client/src/sections/quanju/containers/footer/operation/right.js
  10. 28
      web/client/src/sections/quanju/containers/public/olMap.js

9
api/app/lib/models/project.js

@ -141,6 +141,15 @@ module.exports = dc => {
primaryKey: false, primaryKey: false,
field: "qutity_unit", field: "qutity_unit",
autoIncrement: false autoIncrement: false
},
roadCodeStart: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "开始的路段编码",
primaryKey: false,
field: "road_code_start",
autoIncrement: false
} }
}, { }, {
tableName: "project", tableName: "project",

2
scripts/1.3.1/schema/3.alert_project.sql

@ -0,0 +1,2 @@
alter table project
add road_code_start varchar(1024);

2
web/client/src/sections/fillion/actions/infor.js

@ -142,7 +142,7 @@ export function getProject(query) {
actionType: 'GET_PROJECT', actionType: 'GET_PROJECT',
url: ApiTable.getProject, url: ApiTable.getProject,
msg: { error: '获取工程信息失败' }, msg: { error: '获取工程信息失败' },
reducer: { name: 'projectList' }
}); });
} }
export function putProject(query) { export function putProject(query) {

13
web/client/src/sections/fillion/components/patrolTable.js

@ -95,7 +95,6 @@ const DetailForm = (props) => {
]; ];
const changeBoolean = (bool) => { const changeBoolean = (bool) => {
//console.log('bool', bool)
return bool ? '无异常' : '有异常' return bool ? '无异常' : '有异常'
} }
const renderContent = (data) => { const renderContent = (data) => {
@ -616,7 +615,6 @@ const PatrolNameList = (props) => {
} }
} }
// console.log('selectedKeys', selectedKeys, selected, selectedNodes, node)
}; };
@ -816,14 +814,12 @@ const PatrolTable = (props) => {
} }
} }
useEffect(() => { useEffect(() => {
console.log(anspectionNotificationPhoneList, '数据');
let phoneList = [] let phoneList = []
if (anspectionNotificationPhoneList && anspectionNotificationPhoneList.length) { if (anspectionNotificationPhoneList && anspectionNotificationPhoneList.length) {
phoneList = anspectionNotificationPhoneList.map(e => { phoneList = anspectionNotificationPhoneList.map(e => {
return e.phone return e.phone
}) })
} }
console.log(phoneList, '789789789789');
setPhoneList(phoneList) setPhoneList(phoneList)
}, [anspectionNotificationPhoneList]) }, [anspectionNotificationPhoneList])
@ -834,7 +830,6 @@ const PatrolTable = (props) => {
const handleOk = () => { const handleOk = () => {
// setIsModalOpen(false); // setIsModalOpen(false);
form.validateFields().then(values => { form.validateFields().then(values => {
console.log(values, '----------');
dispatch(addAnspectionNotificationPhone(values)).then(res => { dispatch(addAnspectionNotificationPhone(values)).then(res => {
if (res.success) { if (res.success) {
setIsModalOpen(false); setIsModalOpen(false);
@ -864,7 +859,10 @@ const PatrolTable = (props) => {
sm: { span: 20, offset: 4 }, sm: { span: 20, offset: 4 },
}, },
}; };
let routerUrl = window.location.href
routerUrl = routerUrl.substring(routerUrl.length - 14)
console.log(routerUrl, '=========');
return ( return (
<div className='card-protable'> <div className='card-protable'>
<Card > <Card >
@ -910,7 +908,10 @@ const PatrolTable = (props) => {
: '' : ''
} }
<Button style={{ marginLeft: 20 }}>查询</Button> <Button style={{ marginLeft: 20 }}>查询</Button>
<Button onClick={() => { showModal() }} style={{ float: 'right', marginRight: 30 }}> 短信提醒</Button> {
routerUrl == 'patrol_anomaly' ? <Button onClick={() => { showModal() }} style={{ float: 'right', marginRight: 30 }}> 短信提醒</Button> : ''
}
{/* <Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button> */} {/* <Button style={{ marginLeft: 20 }} onClick={handleExport} >导出</Button> */}
</div> : '' </div> : ''

5
web/client/src/sections/fillion/components/project/project.js

@ -15,7 +15,8 @@ const data = {
"designUnit": "设计单位", "designUnit": "设计单位",
"constructionControlUnit": "监理单位", "constructionControlUnit": "监理单位",
//"startTime": "开工时间", //"startTime": "开工时间",
//"remark": "备注" //"remark": "备注",
"roadCodeStart": "起点路段编码",
} }
const ProjectModal = (props) => { const ProjectModal = (props) => {
const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet, getData } = props const { visible, onVisibleChange, typecard, rewkeys, recortd, dispatch, setRecortd, setDelet, getData } = props
@ -214,7 +215,7 @@ const ProjectModal = (props) => {
</Spin> </Spin>
) )
} }
function mapStateToProps(state) { function mapStateToProps (state) {
const { depMessage } = state; const { depMessage } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {

2
web/client/src/sections/quanju/containers/footer/build/Rightcenter.js

@ -27,7 +27,6 @@ const THIRD = "linear-gradient(360deg, rgba(148, 148, 255, 0.1) 0%, rgba(148, 14
const OTHER = "linear-gradient(360deg, rgba(28, 96, 253, 0) 0%, rgba(28, 96, 253, 0.2) 100%)" const OTHER = "linear-gradient(360deg, rgba(28, 96, 253, 0) 0%, rgba(28, 96, 253, 0.2) 100%)"
let TOTALS = data?.map(({ name, total }, index) => { let TOTALS = data?.map(({ name, total }, index) => {
let max = Math.max(...data.map(item=>item.total)) let max = Math.max(...data.map(item=>item.total))
// console.log(data.map(item=>item.total),'好朋友吗')
return { return {
name, name,
value: total, value: total,
@ -38,7 +37,6 @@ let new_TOTALS = TOTALS && TOTALS.length > 10 ? TOTALS.slice(0, 10) : TOTALS
function Cell(props) { function Cell(props) {
const { name, rank, value, percent, style = {},cebg } = props const { name, rank, value, percent, style = {},cebg } = props
let bg = RNAKS[rank] || OTHER let bg = RNAKS[rank] || OTHER
// console.log(percent,'百分比')
return <div style={{ return <div style={{
width: "100%", height: 34, display: "flex", justifyContent: 'center', width: "100%", height: 34, display: "flex", justifyContent: 'center',
alignItems: "center", marginTop: 7, marginBottom: 7, alignItems: "center", marginTop: 7, marginBottom: 7,

85
web/client/src/sections/quanju/containers/footer/build/index.js

@ -13,9 +13,11 @@ import AutoRollComponent from './AutoRollComponent'
import './style.less' import './style.less'
import { getdaolutongji, getxuanchuan } from '../../../actions/example' import { getdaolutongji, getxuanchuan } from '../../../actions/example'
import { Carousel } from 'antd'; import { Carousel } from 'antd';
import { getProject } from '../../../../fillion/actions/infor'
// import { number } from 'echarts'; // import { number } from 'echarts';
const Build = (props) => { const Build = (props) => {
const { dispatch } = props const { dispatch, projectList } = props
let data1 = [ let data1 = [
{ name: "县", value: 207 }, { name: "县", value: 207 },
{ name: "乡", value: 729 }, { name: "乡", value: 729 },
@ -26,8 +28,6 @@ const Build = (props) => {
// {name: '二级公路', value: 17}, // {name: '二级公路', value: 17},
// {name: '三级公路', value: 17}, // {name: '三级公路', value: 17},
// {name: '四级公路', value: 30}, // {name: '四级公路', value: 30},
// ] // ]
const [buildingnumber, setbuildingnumber] = useState(0) const [buildingnumber, setbuildingnumber] = useState(0)
const [data, setdata] = useState([]) const [data, setdata] = useState([])
@ -43,22 +43,17 @@ const Build = (props) => {
const requestbuildingnumber = async () => { const requestbuildingnumber = async () => {
const res = await dispatch(getdaolutongji()); const res = await dispatch(getdaolutongji());
let alltype = Object.keys(res.payload.data?.roadType || {}).map((item) => ({ name: item, value: Number(keepThreeNum(res.payload.data.roadType[item])) })) let alltype = Object.keys(res.payload.data?.roadType || {}).map((item) => ({ name: item, value: Number(keepThreeNum(res.payload.data.roadType[item])) }))
// console.log(alltype,'打他啊')
setdata(alltype.filter(item => item.name === '县' || item.name === "乡" || item.name === '村')) setdata(alltype.filter(item => item.name === '县' || item.name === "乡" || item.name === '村'))
setbuildingnumber(res.payload.data) setbuildingnumber(res.payload.data)
console.log(res.payload.data, '哈哈哈')
} }
//获取宣传栏数据 //获取宣传栏数据
const requestxuanchuanlan = async () => { const requestxuanchuanlan = async () => {
const res = await dispatch(getxuanchuan()); const res = await dispatch(getxuanchuan());
// setdata(alltype.filter(item=>item.name!=='null')) // setdata(alltype.filter(item=>item.name!=='null'))
setxuandata(res.payload.data || []) setxuandata(res.payload.data || [])
console.log(res.payload.data, '宣传栏数据')
} }
let t1 = Object.values(buildingnumber?.townRoad || {}) let t1 = Object.values(buildingnumber?.townRoad || {})
let totalgongli = t1.length !== 0 ? t1.reduce((x, y) => x + y.mileage, 0) : 0 //乡镇道路占比总公里数 let totalgongli = t1.length !== 0 ? t1.reduce((x, y) => x + y.mileage, 0) : 0 //乡镇道路占比总公里数
@ -86,7 +81,6 @@ const Build = (props) => {
return b.number - a.number return b.number - a.number
}) })
list = list.filter(item => item.name !== "其他") list = list.filter(item => item.name !== "其他")
// console.log(list,'红红火')
//道路等级数据 //道路等级数据
let alldengji = Object.keys(buildingnumber?.roadLevel || {}).map((item) => ({ name: item, value: Number(keepThreeNum(buildingnumber.roadLevel[item])) })) let alldengji = Object.keys(buildingnumber?.roadLevel || {}).map((item) => ({ name: item, value: Number(keepThreeNum(buildingnumber.roadLevel[item])) }))
@ -95,10 +89,8 @@ const Build = (props) => {
onlineproject = onlineproject.sort((a, b) => { onlineproject = onlineproject.sort((a, b) => {
return b.total - a.total return b.total - a.total
}) })
//console.log('onlineproject', onlineproject)
let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0) let sunonlineproject = onlineproject?.reduce((x, y) => x + y.total, 0)
let buildingCount = buildingnumber?.buildingCount let buildingCount = buildingnumber?.buildingCount
//console.log('projectAll', projectAll)
//let projectAll= //let projectAll=
let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路') let safetyData = alldengji?.filter(item => item.name === '一级公路' || item.name === '二级公路' || item.name === '三级公路' || item.name === '四级公路' || item.name === '等外公路')
let sundata = data?.reduce((x, y) => x + y.value, 0) let sundata = data?.reduce((x, y) => x + y.value, 0)
@ -107,10 +99,13 @@ const Build = (props) => {
useEffect(() => { useEffect(() => {
requestbuildingnumber(); requestbuildingnumber();
requestxuanchuanlan() requestxuanchuanlan()
dispatch(getProject())
}, []) }, [])
useEffect(() => { useEffect(() => {
lunbo.current.goTo(lunboindex) lunbo.current.goTo(lunboindex)
}, [lunboindex]) }, [lunboindex])
const rendercontent = () => { const rendercontent = () => {
return (<div className='build-left-center-content'> return (<div className='build-left-center-content'>
{list.map(({ name, number, gongli }, index) => <div className='build-left-center-item' key={index}> {list.map(({ name, number, gongli }, index) => <div className='build-left-center-item' key={index}>
@ -128,8 +123,6 @@ const Build = (props) => {
// "enable": true // "enable": true
// } // }
// ] // ]
// console.log(localStorage.getItem("qndmn"), '七牛')
// console.log(xuandata, "宣传")
let videos = [] let videos = []
if (xuandata && xuandata.length) { if (xuandata && xuandata.length) {
@ -143,7 +136,7 @@ const Build = (props) => {
} }
} }
} }
console.log(lunboindex)
return ( return (
<> <>
<div className='bgbuild-left'> <div className='bgbuild-left'>
@ -174,11 +167,13 @@ const Build = (props) => {
</div> : <NoData />} </div> : <NoData />}
</div> </div>
</Module> </Module>
<Module title={"各乡镇现有道路统计"} style={{ {/* <Module title={""} style={{
width: "100%", width: "100%",
height: " 33%", marginTop: '3%' height: " 33%", marginTop: '3%'
}} customize={true}> }} customize={true}>
{totalcount && totalcount !== 0 ? <div className='build-left-center'> {
totalcount && totalcount !== 0 ?
<div className='build-left-center'>
<div className='build-left-center-top'> <div className='build-left-center-top'>
<div> <div>
<img src='/assets/images/quanju/gonglugongli.png'></img> <img src='/assets/images/quanju/gonglugongli.png'></img>
@ -202,7 +197,45 @@ const Build = (props) => {
</div> </div>
<AutoRollComponent content={rendercontent()} containerStyle={{ position: "relative", height: "50%", }} <AutoRollComponent content={rendercontent()} containerStyle={{ position: "relative", height: "50%", }}
divHeight={"100%"} divId={"chart"} /> divHeight={"100%"} divId={"chart"} />
</div> : <NoData />} </div>
: <NoData />
}
</Module> */}
<Module title={"在建项目列表"} style={{
width: "100%",
height: " 33%", marginTop: '3%'
}} customize={true}>
{
totalcount && totalcount !== 0 ?
<div className='build-left-center' style={{ padding: 12 }}>
<div className='build-left-center'>
<div className='build-left-center-titile'>
<span>项目名称</span>
<span>项目规模(公里)</span>
<span>项目投资(万元)</span>
</div>
<AutoRollComponent content={
<div className='build-left-center-content'>
{
projectList.map((p, index) => {
return (
<div className='build-left-center-item' key={index}>
<span className='ellipsis' title={p.entryName}>{p.entryName}</span>
<span>{p.projectMileage}</span>
<span>{p.investment}</span>
</div>
)
})
}
</div>
}
containerStyle={{ position: "relative", height: "85%", }}
divHeight={"100%"} divId={"chart"}
/>
</div>
</div>
: <NoData />
}
</Module> </Module>
<Module title={"道路统计"} style={{ <Module title={"道路统计"} style={{
width: "100%", width: "100%",
@ -231,17 +264,13 @@ const Build = (props) => {
<Carousel dots={false} ref={lunbo} key={lunboindex}> <Carousel dots={false} ref={lunbo} key={lunboindex}>
{/* { {/* {
videos.map((v, i) => { videos.map((v, i) => {
console.log('first')
return i == lunboMsg.current.index ? return i == lunboMsg.current.index ?
<video src={`${localStorage.getItem("qndmn")}/${v}`} key={Math.random()} autoPlay={i == lunboMsg.current.index} onEnded={() => { <video src={`${localStorage.getItem("qndmn")}/${v}`} key={Math.random()} autoPlay={i == lunboMsg.current.index} onEnded={() => {
console.log('end', i + 1, videos.length)
if (i == videos.length - 1) { if (i == videos.length - 1) {
setlunboindex(0) setlunboindex(0)
lunboMsg.current.index = 0 lunboMsg.current.index = 0
lunbo.current.goTo(1) lunbo.current.goTo(1)
} else { } else {
console.log('first222', i + 1)
setlunboindex(i + 1) setlunboindex(i + 1)
lunboMsg.current.index = i + 1 lunboMsg.current.index = i + 1
lunbo.current.next() lunbo.current.next()
@ -256,23 +285,16 @@ const Build = (props) => {
if (item.video && item.video !== null && item.video.length !== 0) { if (item.video && item.video !== null && item.video.length !== 0) {
return item.video.map((i, index) => { return item.video.map((i, index) => {
// console.log(i,'视频')
console.log(index1, 'index1')
if (index1 === lunboindex) { if (index1 === lunboindex) {
// lunbo.current.goTo(lunboindex)
console.log("自动播放", index1)
return <video src={`${localStorage.getItem("qndmn")}/${i}`} autoPlay={true} ref={lunbovideo} onEnded={() => { return <video src={`${localStorage.getItem("qndmn")}/${i}`} autoPlay={true} ref={lunbovideo} onEnded={() => {
if (index1 < xuandata.filter(i => i.enable).length - 1) { if (index1 < xuandata.filter(i => i.enable).length - 1) {
// console.log(index1,xuandata,'触发了')
setlunboindex(lunboindex + 1) setlunboindex(lunboindex + 1)
} else { } else {
// console.log(index1,xuandata,'触发了')
setlunboindex(0) setlunboindex(0)
} }
}}></video> }}></video>
} else { } else {
// console.log("不自动播放",index1)
return <video src={`${localStorage.getItem("qndmn")}/${i}`} autoPlay={false} ></video> return <video src={`${localStorage.getItem("qndmn")}/${i}`} autoPlay={false} ></video>
} }
}) })
@ -307,8 +329,8 @@ const Build = (props) => {
</> </>
) )
} }
function mapStateToProps(state) { function mapStateToProps (state) {
const { auth, depMessage } = state; const { auth, depMessage, projectList } = state;
const pakData = (dep) => { const pakData = (dep) => {
return dep.map((d) => { return dep.map((d) => {
return { return {
@ -325,6 +347,7 @@ function mapStateToProps(state) {
depMessage: depMessage.data || [], depMessage: depMessage.data || [],
depLoading: depMessage.isRequesting, depLoading: depMessage.isRequesting,
depData, depData,
projectList: projectList.data || []
}; };
} }
export default connect(mapStateToProps)(Build); export default connect(mapStateToProps)(Build);

8
web/client/src/sections/quanju/containers/footer/build/style.less

@ -158,6 +158,14 @@
height: 28px; height: 28px;
align-items: center; align-items: center;
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 144px;
display: inline-block;
}
&:hover { &:hover {
background: linear-gradient(270deg, rgba(0, 124, 230, 0) 0%, rgba(0, 70, 200, 0.8700) 100%); background: linear-gradient(270deg, rgba(0, 124, 230, 0) 0%, rgba(0, 70, 200, 0.8700) 100%);
} }

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

@ -1,8 +1,13 @@
import React, { useState } from 'react' import React, { useState } from 'react'
import { Carousel } from 'antd'; import { Carousel, Input } from 'antd';
import Module from '../../public/module' import Module from '../../public/module'
import AutoRollComponent from '../build/AutoRollComponent'
import { useEffect } from 'react';
import { connect } from 'react-redux';
import { busWillRun } from '../../public/olMap'
const Right = () => { let queryTimeout = null
const Right = ({ busRunTime }) => {
const [dataLists, setDataList] = useState([ const [dataLists, setDataList] = useState([
{ {
route: '147', route: '147',
@ -21,19 +26,86 @@ const Right = () => {
plate: '赣APJ337' plate: '赣APJ337'
} }
]) ])
const [busRunTimeList, setBusRunTimeList] = useState(busRunTime)
const [queryStr, setQueryStr] = useState('')
useEffect(() => {
setBusRunTimeList(
queryStr ?
busRunTime.filter(b => {
return b?.busNoChar?.indexOf(queryStr) > -1
})
: busRunTime
)
}, [queryStr, busRunTime])
const style = { height: "97%", marginTop: "3%" } const style = { height: "97%", marginTop: "3%" }
return ( return (
<div style={{ position: 'absolute', right: 0, width: "23%", height: "100%", marginRight: "1%", }}> <div style={{ position: 'absolute', right: 0, width: "23%", height: "100%", marginRight: "1%", }}>
<Module style={style} customize={true} title={"车辆视频监控"}> <Module style={style} customize={true}
// title={"车辆视频监控"}
title={"公交运营信息"}
>
<div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}> <div style={{ width: '90%', height: '96%', margin: '2% 5%', overflow: 'hidden' }}>
<div style={{ border: '1px solid rgba(10, 114, 255, 1)', backgroundColor: 'rgba(10, 114, 255, 0.1)' }}>
<img src='/assets/images/quanju/search.png' style={{ width: '5%', margin: '0 1.5% 1% 3.5%' }} />
<Input
style={{
width: '90%',
background: 'none',
backgroundColor: 'none',
color: 'rgba(216, 240, 255, 0.8)',
border: 'none',
boxShadow: 'none',
}}
placeholder="请输入车牌号"
onChange={(e) => {
if (queryTimeout) {
clearTimeout(queryTimeout)
}
queryTimeout = setTimeout(() => {
setQueryStr(e.target.value)
}, 600)
}}
/>
</div>
<Carousel <Carousel
autoplay autoplay
infinite infinite
autoplaySpeed={300000} // autoplaySpeed={300000}
autoplaySpeed={1000 * 3}
vertical={true} vertical={true}
slidesToShow={4} slidesToShow={4}
> >
{ {
busRunTimeList.map((b, i) => {
return (
<div key={index} style={{ width: '100%', height: '40%' }}>
<div className='busInformation'>
<img src='/assets/images/quanju/theBus.png' style={{ width: '15%', display: 'block', float: 'left' }} />
<span>
<h3>车辆牌照</h3>
<h5>{d.busNoChar}</h5>
<h3>调度状态</h3>
<h4>{busWillRun.find(w => w.value == d.willRun)?.text || '--'}</h4>
</span>
<span>
<h3>发车时间</h3>
<h4>{d.lastDepTime}</h4>
</span>
<span>
<h3>司机</h3>
<h5>{d.employeeName}</h5>
<h3>工号</h3>
<h4>{d.opNo}</h4>
</span>
</div>
</div>
)
})
}
{/* {
dataLists.map((data, index) => ( dataLists.map((data, index) => (
<div key={index} style={{ width: '100%', height: '40%' }}> <div key={index} style={{ width: '100%', height: '40%' }}>
<div className='busInformation'> <div className='busInformation'>
@ -61,11 +133,19 @@ const Right = () => {
</div> </div>
</div> </div>
)) ))
} } */}
</Carousel> </Carousel>
</div> </div>
</Module> </Module>
</div> </div>
) )
} }
export default Right
function mapStateToProps (state) {
const { busRunTime, } = state;
return {
busRunTime: busRunTime.data || [],
};
}
export default connect(mapStateToProps)(Right);

28
web/client/src/sections/quanju/containers/public/olMap.js

@ -5,9 +5,21 @@ import Hua from '../footer/leadership/centerleft/hudong'
import moment from 'moment'; import moment from 'moment';
import { OlMapRequest } from '$utils' import { OlMapRequest } from '$utils'
export const busWillRun = [
{ text: '非运营', value: '0' },
{ text: '运营', value: '1' },
{ text: '维修', value: '2' },
{ text: '保养', value: '3' },
{ text: '专车', value: '4' },
{ text: '机动车', value: '5' },
{ text: '包车', value: '6' },
{ text: '班车', value: '7' },
{ text: '检车', value: '8' },
]
const OlMap = (props) => { 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 } = props
console.log(patrolList)
const [olMapOpenData, setOlMapOpenData] = useState([]) const [olMapOpenData, setOlMapOpenData] = useState([])
const [olMap, setOlMap] = useState() const [olMap, setOlMap] = useState()
const [pointItem, setPointItem] = useState({}) const [pointItem, setPointItem] = useState({})
@ -188,7 +200,6 @@ const OlMap = (props) => {
positioning: 'top-right' positioning: 'top-right'
}) })
// 请求路线坐标 // 请求路线坐标
console.log(d.code_road);
if (d.code_road) { if (d.code_road) {
let codeMap = { let codeMap = {
x: 'gpsxd', x: 'gpsxd',
@ -205,7 +216,6 @@ const OlMap = (props) => {
}) })
.then(res => { .then(res => {
if (res.status == 200 && res.body && res.body.code == 1) { if (res.status == 200 && res.body && res.body.code == 1) {
console.log(res);
const data = res.body.data const data = res.body.data
const { datalist } = data const { datalist } = data
if (datalist?.list?.length) { if (datalist?.list?.length) {
@ -365,17 +375,7 @@ const OlMap = (props) => {
}, { }, {
n: '调度状态', n: '调度状态',
v: d.willRun, v: d.willRun,
map: [ map: busWillRun,
{ text: '非运营', value: '0' },
{ text: '运营', value: '1' },
{ text: '维修', value: '2' },
{ text: '保养', value: '3' },
{ text: '专车', value: '4' },
{ text: '机动车', value: '5' },
{ text: '包车', value: '6' },
{ text: '班车', value: '7' },
{ text: '检车', value: '8' },
],
}, { }, {
n: '实际发车时间', n: '实际发车时间',
v: d.lastDepTime v: d.lastDepTime

Loading…
Cancel
Save