Browse Source

首页气象云图\实时路况位置调整

develop
lau572 4 months ago
parent
commit
49cbaf41e1
  1. 44
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeTraffic/index.vue

44
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeTraffic/index.vue

@ -7,7 +7,7 @@
</el-tooltip> </el-tooltip>
<div class="radarControlBox" v-if="silderVisible"> <div class="radarControlBox" v-if="silderVisible">
<button class="radarButton" @click="play">{{isPlay?'暂停':'播放'}}</button> <button class="radarButton" @click="play">{{isPlay?'暂停':'播放'}}</button>
<el-slider <el-slider
ref="slider" ref="slider"
tooltip-class="radarSliderTooltip" tooltip-class="radarSliderTooltip"
@ -76,11 +76,11 @@ export default {
this.dialogVisibleCamera = bool; this.dialogVisibleCamera = bool;
}, },
drawThumbail(list){ drawThumbail(list){
this.nodeList.forEach(e => { this.nodeList.forEach(e => {
window.graphInstance.removeNode(e) window.graphInstance.removeNode(e)
}); });
this.nodeList = [] this.nodeList = []
list.forEach(e => { list.forEach(e => {
const id = e.event_id; const id = e.event_id;
@ -96,10 +96,10 @@ export default {
xB = (xB- 54.394) * window.canvasRatio + window.canvasWidth * window.offsetRatio; xB = (xB- 54.394) * window.canvasRatio + window.canvasWidth * window.offsetRatio;
window.graphInstance.addNode({ window.graphInstance.addNode({
id:id, id:id,
x: xA, x: xA,
y: e.dir_code==='DOWN'?60:120, y: e.dir_code==='DOWN'?60:120,
width: (xB-xA), width: (xB-xA),
height: 8, height: 8,
zIndex:0, zIndex:0,
attrs: { attrs: {
body: { body: {
@ -117,11 +117,11 @@ export default {
this.nodeList.push(id) this.nodeList.push(id)
} }
}); });
}, },
formatTooltip(val) { formatTooltip(val) {
if(this.marks[val]){ if(this.marks[val]){
return this.marks[val]; return this.marks[val];
} else { } else {
@ -162,13 +162,13 @@ export default {
this.isPlay = false; this.isPlay = false;
setTimeout(() => { setTimeout(() => {
Vue.prototype.mapIns.addPointByArr( {pointList:[]}, 'lineLayer', true); Vue.prototype.mapIns.addPointByArr( {pointList:[]}, 'lineLayer', true);
Vue.prototype.mapIns.removeLayerByName('lineLayer'); Vue.prototype.mapIns.removeLayerByName('lineLayer');
Vue.prototype.mapIns.addPointByArr( {pointList:[]}, 'lineLayer_camera', true); Vue.prototype.mapIns.addPointByArr( {pointList:[]}, 'lineLayer_camera', true);
Vue.prototype.mapIns.removeLayerByName('lineLayer_camera'); Vue.prototype.mapIns.removeLayerByName('lineLayer_camera');
window.graphInstance.removeNode('roadError') window.graphInstance.removeNode('roadError')
}, 200); }, 200);
this.silderVisible = false; this.silderVisible = false;
} else { } else {
this.$root.$emit('layer-clear'); this.$root.$emit('layer-clear');
@ -199,7 +199,7 @@ export default {
const style = { const style = {
color: '#9fe4fe' color: '#9fe4fe'
} }
const now = moment().format('HH:mm'); const now = moment().format('HH:mm');
let marks = {}; let marks = {};
@ -221,7 +221,7 @@ export default {
}) })
// //
for(let ei of e.filteredDevices){ for(let ei of e.filteredDevices){
if(!ei.longitude){continue} if(!ei.longitude){continue}
if(ei.otherConfig){ if(ei.otherConfig){
@ -243,11 +243,11 @@ export default {
aryDevices.push({ aryDevices.push({
type: 'event', type: 'event',
longitude: parseFloat(ei.longitude), longitude: parseFloat(ei.longitude),
latitude: parseFloat(ei.latitude), latitude: parseFloat(ei.latitude),
iconUrl: iconUrl, iconUrl: iconUrl,
offset: [0,-48], offset: [0,-48],
size: [42,100], size: [42,100],
GGoffsetX: 0, GGoffsetX: 0,
GGoffsetY: -5, GGoffsetY: -5,
GGimgOffset:[0,0], GGimgOffset:[0,0],
GGimgsize:[42,103], GGimgsize:[42,103],
@ -300,7 +300,7 @@ export default {
// }); // });
// this.lnglats[idx] = _.cloneDeep(aryLine); // this.lnglats[idx] = _.cloneDeep(aryLine);
// this.lnglatsNode[idx] = res.data; // this.lnglatsNode[idx] = res.data;
}) })
} }
}, },
@ -322,10 +322,10 @@ export default {
} }
Vue.prototype.mapIns.addLineByArr( Vue.prototype.mapIns.addLineByArr(
this.lnglats[this.timeTick] this.lnglats[this.timeTick]
); );
},100) },100)
} }
}, },
}; };
@ -335,7 +335,7 @@ export default {
.radarControlBox{ .radarControlBox{
position: absolute; position: absolute;
display: flex; display: flex;
bottom: 25%; right:28%; bottom: 28%; right:30% !important;
} }
.radarSliderTooltip .el-tooltip { .radarSliderTooltip .el-tooltip {
display: block; display: block;

Loading…
Cancel
Save