Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
hui 8 months ago
parent
commit
5a4dd74141
  1. 2629
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/data/lcz.json
  2. 51
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue
  3. 34
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue
  4. 17
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

2629
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/data/lcz.json

File diff suppressed because it is too large

51
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/AMapContainer/index.vue

@ -98,12 +98,9 @@ export default {
let jhgsPl2 = drawJHPath(this.AMap, lczDatas, 1, 60);
//,
this.aMapIns.on('zoomend', () => {
this.aMapIns.on('zoomchange', () => {
this.aMapIns.getZoom() > 19.5 ? this.aMapIns.add(jhgsPl2) : this.aMapIns.remove(jhgsPl2);
});
this.aMapIns.on('zoomstart', () => {
this.aMapIns.remove(jhgsPl2);
});
});
@ -160,34 +157,48 @@ export default {
context.lineJoin = 'round';
context.lineWidth = 5;
//线
//()线
// context.moveTo(5, 0);
// context.lineTo(5, height);
//线
//
//线
context.moveTo(35, 0);
context.lineTo(35, 50);
context.moveTo(35, 100);
context.lineTo(35, 40);
context.moveTo(35, 55);
context.lineTo(35, 95);
context.moveTo(35, 110);
context.lineTo(35, 150);
//线
context.moveTo(75, 20);
context.lineTo(75, 70);
context.moveTo(75, 120);
context.lineTo(75, 170);
//线
//线
// context.moveTo(35, 0);
// context.lineTo(35, height);
//
//线
context.moveTo(75, 0);
context.lineTo(75, 40);
context.moveTo(75, 55);
context.lineTo(75, 95);
context.moveTo(75, 110);
context.lineTo(75, 150);
//线
// context.moveTo(75, 0);
// context.lineTo(75, height);
//
//线
context.moveTo(115, 0);
context.lineTo(115, 50);
context.moveTo(115, 100);
context.lineTo(115, 40);
context.moveTo(115, 55);
context.lineTo(115, 95);
context.moveTo(115, 110);
context.lineTo(115, 150);
//线
// context.moveTo(115, 0);
// context.lineTo(115, height);
//线
// context.moveTo(width - 5, 0);
// context.lineTo(width - 5, height);
context.stroke();
//
// context.fillStyle = "red";
// context.fillRect(0, 0, width, height);
return canvasDir;
}

34
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue

@ -3,35 +3,17 @@
<div class="PerceiveEvent">
<!-- <Video class="item-video" /> -->
<div class="video-pic">
<Video
style="height: 100%; flex: 1"
:showHeader="false"
:url="dialogData.formData.videoList[0]"
videoType="mp4"
/>
<Carousel
style="flex: 1; height: 100%"
:pictures="dialogData.formData.pictures"
/>
<Video style="height: 100%; flex: 1" :showHeader="false" :url="dialogData.formData.videoList[0]"
videoType="mp4" />
<Carousel style="flex: 1; height: 100%" :pictures="dialogData.formData.pictures" />
</div>
<LineChart class="chart" />
<Form
class="form"
v-loading="loading"
v-model="data"
ref="FormConfigRef"
:formList="formList"
column="1"
/>
<Form class="form" v-loading="loading" v-model="data" ref="FormConfigRef" :formList="formList" column="1" />
</div>
<template #footer>
<Button>误报</Button>
<Button
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="obverseVisible = false"
>取消</Button
>
<Button @click.native="onDelete">误报</Button>
<Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="obverseVisible = false">取消</Button>
<Button @click.native="updateEvent" :loading="btnLoading">确定</Button>
</template>
</Dialog>
@ -203,7 +185,7 @@ export default {
this.getDetails();
this.getVehicleTypeList();
},
async mounted() {},
async mounted() { },
beforeDestroy() {
clearInterval(this.interval);
},
@ -255,7 +237,7 @@ export default {
})
);
})
.catch((err) => {});
.catch((err) => { });
},
convertSecToHHmmss(sec) {
let currentTime = moment.duration(sec, "seconds");

17
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js

@ -343,9 +343,10 @@ export class MarkerCluster {
const findIndex = this.data.findIndex(
(removeData) => removeData === item
);
let { stakeMark } = item.extData;
let { stakeMark, direction } = item.extData;
stakeMark = upperFirst(stakeMark); //统一格式 大写K
const existNode = graphInstance.getCellById(stakeMark);
const id = `${stakeMark}_${direction || ""}`;
const existNode = graphInstance.getCellById(id);
const lnglat = item.lnglat;
if (lnglat) {
const { lat, lng } = getLatAndLng(lnglat);
@ -357,10 +358,10 @@ export class MarkerCluster {
window.graphInstance.removeNode(existNode.id);
else {
//更新节点
const updateNode = graphInstance.getCellById(stakeMark);
const updateNode = graphInstance.getCellById(id);
updateNode.updateData(getDataConf(lngLatArr, item.extData));
}
} else window.graphInstance.removeNode(stakeMark);
} else window.graphInstance.removeNode(id);
}
}
if (findIndex > -1) this.data.splice(findIndex, 1);
@ -482,9 +483,10 @@ export function marksAddInGraph(data) {
export function addInGraphHandle(data) {
const graphInstance = window.graphInstance;
const extData = data[0].extData;
console.log(extData, "extData");
const { item: eventItem } = data[0].config;
if (eventItem.id.match("./事件专题")) {
let { stakeMark, lang } = extData;
let { stakeMark, lang, direction } = extData;
stakeMark = upperFirst(stakeMark); //统一格式 大写K
const distance =
(Number(
@ -496,7 +498,8 @@ export function addInGraphHandle(data) {
const node = { shape: "custom-html", effect: ["data"] };
node.data = getDataConf(data, extData);
const existNode = graphInstance.getCellById(stakeMark);
const id = `${stakeMark}_${direction || ""}`;
const existNode = graphInstance.getCellById(id);
if (existNode) {
existNode.updateData(node.data);
} else {
@ -508,7 +511,7 @@ export function addInGraphHandle(data) {
height: 20,
...node,
zIndex: 1,
id: stakeMark,
id: id,
});
// }, 0);
}

Loading…
Cancel
Save