Browse Source

修改

master
huxinglu 4 years ago
parent
commit
56d959d80a
5 changed files with 22 additions and 12 deletions
  1. +7
    -0
      src/api/main/index.js
  2. +14
    -11
      src/views/command/index.vue
  3. +1
    -0
      src/views/main/index.vue
  4. +0
    -1
      static/driver.json
  5. BIN
      static/video-js.swf

+ 7
- 0
src/api/main/index.js View File

type type
} }
}) })
},
getWaterDriver(){
return axios({
url: '/api/index/water/driver',
method: 'GET',
params:{}
})
} }
} }

+ 14
- 11
src/views/command/index.vue View File

import askLeft from './ask/askLeft' import askLeft from './ask/askLeft'
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
import api from '@/api/main/index' import api from '@/api/main/index'
import driver from 'static/driver.json'
import problemDetailWin from './problem/problemDetailWin' import problemDetailWin from './problem/problemDetailWin'
import hpDetailWin from './ask/hpDetailWin' import hpDetailWin from './ask/hpDetailWin'
import qualityLeft from './quality/qualityLeft' import qualityLeft from './quality/qualityLeft'
map: {}, map: {},
center: {}, center: {},
barHeight: document.body.clientHeight > 1050 ? 2.42 : 2.06, barHeight: document.body.clientHeight > 1050 ? 2.42 : 2.06,
driverDataList:[],
nameMarkList: [], nameMarkList: [],
routersMarker:[], routersMarker:[],
polygonList: [], polygonList: [],
routesClick(driverId) { routesClick(driverId) {
this.clearRoutersMarker() this.clearRoutersMarker()
this.checkDriver(driverId) this.checkDriver(driverId)
const {data} = driver
let child = data.find(item => item.id == driverId)
let child = this.driverDataList.find(item => item.id == driverId)
if (child&&child.mapInfo&&child.mapInfo.length>0) { if (child&&child.mapInfo&&child.mapInfo.length>0) {
this.initRouters(child) this.initRouters(child)
} else { } else {
this.checkDriver(marker.childData.dirverId) this.checkDriver(marker.childData.dirverId)
}, },
getDriver() { getDriver() {
const {data} = driver
data.map(item => {
let polygons = this.returnDriver(item)
if (polygons) {
this.driverList.push(polygons)
}
})
api.getWaterDriver({}).then(res => {
this.driverDataList=res.data?res.data:[]
res.data.map(item => {
let polygons = this.returnDriver(item)
if (polygons) {
this.driverList.push(polygons)
}
})
}).catch(e => {
});
}, },
returnDriver(item) { returnDriver(item) {
let me = this let me = this
let polygons = null; let polygons = null;
var bounds = item.mapInfo;
var bounds = item.pointList;
if (bounds && bounds.length > 0) { if (bounds && bounds.length > 0) {
let path = [] let path = []
for (let i = 0, l = bounds.length; i < l; i++) { for (let i = 0, l = bounds.length; i < l; i++) {
}); });
polygons.name = item.name polygons.name = item.name
polygons.id = item.id polygons.id = item.id
polygons.driverArea=item.driverArea
polygons.on('click', function () { polygons.on('click', function () {
me.driverId = this.id me.driverId = this.id
me.checkDriver(this.id) me.checkDriver(this.id)

+ 1
- 0
src/views/main/index.vue View File

position: absolute; position: absolute;
top: 0rem; top: 0rem;
width: 100%; width: 100%;
height: 1.04rem;
} }


.box-header-title { .box-header-title {

+ 0
- 1
static/driver.json
File diff suppressed because it is too large
View File


BIN
static/video-js.swf View File


Loading…
Cancel
Save