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. 30
      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); 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.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.lineJoin = 'round';
context.lineWidth = 5; context.lineWidth = 5;
//线 //()线
// context.moveTo(5, 0); // context.moveTo(5, 0);
// context.lineTo(5, height); // context.lineTo(5, height);
//线 //
//线
context.moveTo(35, 0); context.moveTo(35, 0);
context.lineTo(35, 50); context.lineTo(35, 40);
context.moveTo(35, 100); context.moveTo(35, 55);
context.lineTo(35, 95);
context.moveTo(35, 110);
context.lineTo(35, 150); context.lineTo(35, 150);
//线 //线
context.moveTo(75, 20); // context.moveTo(35, 0);
context.lineTo(75, 70); // context.lineTo(35, height);
context.moveTo(75, 120); //
context.lineTo(75, 170); //线
//线 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.moveTo(115, 0);
context.lineTo(115, 50); context.lineTo(115, 40);
context.moveTo(115, 100); context.moveTo(115, 55);
context.lineTo(115, 95);
context.moveTo(115, 110);
context.lineTo(115, 150); context.lineTo(115, 150);
//线
// context.moveTo(115, 0);
// context.lineTo(115, height);
//线 //线
// context.moveTo(width - 5, 0); // context.moveTo(width - 5, 0);
// context.lineTo(width - 5, height); // context.lineTo(width - 5, height);
context.stroke(); context.stroke();
//
// context.fillStyle = "red";
// context.fillRect(0, 0, width, height);
return canvasDir; return canvasDir;
} }

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

@ -3,35 +3,17 @@
<div class="PerceiveEvent"> <div class="PerceiveEvent">
<!-- <Video class="item-video" /> --> <!-- <Video class="item-video" /> -->
<div class="video-pic"> <div class="video-pic">
<Video <Video style="height: 100%; flex: 1" :showHeader="false" :url="dialogData.formData.videoList[0]"
style="height: 100%; flex: 1" videoType="mp4" />
:showHeader="false" <Carousel style="flex: 1; height: 100%" :pictures="dialogData.formData.pictures" />
:url="dialogData.formData.videoList[0]"
videoType="mp4"
/>
<Carousel
style="flex: 1; height: 100%"
:pictures="dialogData.formData.pictures"
/>
</div> </div>
<LineChart class="chart" /> <LineChart class="chart" />
<Form <Form class="form" v-loading="loading" v-model="data" ref="FormConfigRef" :formList="formList" column="1" />
class="form"
v-loading="loading"
v-model="data"
ref="FormConfigRef"
:formList="formList"
column="1"
/>
</div> </div>
<template #footer> <template #footer>
<Button>误报</Button> <Button @click.native="onDelete">误报</Button>
<Button <Button style="background-color: rgba(0, 179, 204, 0.3)" @click.native="obverseVisible = false">取消</Button>
style="background-color: rgba(0, 179, 204, 0.3)"
@click.native="obverseVisible = false"
>取消</Button
>
<Button @click.native="updateEvent" :loading="btnLoading">确定</Button> <Button @click.native="updateEvent" :loading="btnLoading">确定</Button>
</template> </template>
</Dialog> </Dialog>

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

Loading…
Cancel
Save