Commit 8314e707 authored by 刘扬琳's avatar 刘扬琳

Merge branch 'master' of http://10.102.1.182/xinkong/holo-web

parents b9d24683 ce71b617
{
"type": "FeatureCollection",
"name": "hd_506_rxhdm_jinan",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "id": 3, "lkid": "13NF80B5QN0", "ldid": "13NED0B5Q9013NF80B5QN00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "6" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.085764876598944, 36.641938744435201 ], [ 117.085808605274266, 36.641966908666767 ], [ 117.085896062624911, 36.641804593753278 ], [ 117.085851592785602, 36.641777911849694 ], [ 117.085764876598944, 36.641938744435201 ] ] ] } },
{ "type": "Feature", "properties": { "id": 4, "lkid": "13NF80B5QN0", "ldid": "13NDT0B5Q9013NF80B5QN00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "4" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.086029286851826, 36.64188797470198 ], [ 117.086061057668942, 36.641860344208411 ], [ 117.085927479865049, 36.641770803043158 ], [ 117.085896618497884, 36.641799776187341 ], [ 117.086029286851826, 36.64188797470198 ] ] ] } },
{ "type": "Feature", "properties": { "id": 5, "lkid": "13NF80B5QN0", "ldid": "13NGH0B5RC013NF80B5QN00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "2" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.085955170452976, 36.642071042207149 ], [ 117.086081909495022, 36.641920585917475 ], [ 117.086038180819699, 36.641890198193941 ], [ 117.085912182941641, 36.642042877975584 ], [ 117.085955170452976, 36.642071042207149 ] ] ] } },
{ "type": "Feature", "properties": { "id": 6, "lkid": "13NF80B5QN0", "ldid": "13NDG0B5RI013NF80B5QN00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "1" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.085791558502535, 36.642014343162032 ], [ 117.085885686329078, 36.642078083265048 ], [ 117.08590625362973, 36.642042877975584 ], [ 117.085810828766242, 36.641978026126594 ], [ 117.085791558502535, 36.642014343162032 ] ] ] } },
{ "type": "Feature", "properties": { "id": 7, "lkid": "13NGH0B5RC0", "ldid": "13NF80B5QN013NGH0B5RC00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "6" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.089742889016421, 36.644046985400635 ], [ 117.089832940441028, 36.643876147101274 ], [ 117.089776241395896, 36.643858729747542 ], [ 117.089687301717277, 36.644026973972942 ], [ 117.089742889016421, 36.644046985400635 ] ] ] } },
{ "type": "Feature", "properties": { "id": 8, "lkid": "13NGH0B5RC0", "ldid": "13NEH0B5RJ013NGH0B5RC00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "1" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.089728992191667, 36.644133331005293 ], [ 117.090074374610325, 36.644240058619644 ], [ 117.090088456726093, 36.644192438833379 ], [ 117.089742333143434, 36.644088675874983 ], [ 117.089728992191667, 36.644133331005293 ] ] ] } },
{ "type": "Feature", "properties": { "id": 9, "lkid": "13NGH0B5RC0", "ldid": "13NI00B5RM013NGH0B5RC00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "3" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.090092162546057, 36.644186694812468 ], [ 117.090147008681214, 36.644201518092238 ], [ 117.090219642752089, 36.644001403815331 ], [ 117.09016776127288, 36.643982874715618 ], [ 117.090092162546057, 36.644186694812468 ] ] ] } },
{ "type": "Feature", "properties": { "id": 10, "lkid": "13NGH0B5RC0", "ldid": "13NEP0B5QJ013NGH0B5RC00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "5" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.089835534514989, 36.643863176731472 ], [ 117.090156458522031, 36.643976574821721 ], [ 117.09017424645775, 36.643932846146399 ], [ 117.089856281976495, 36.64381924068428 ], [ 117.089835534514989, 36.643863176731472 ] ] ] } },
{ "type": "Feature", "properties": { "id": 11, "lkid": "13NI00B5RM0", "ldid": "13NG40B5SK013NI00B5RM00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "1" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.094459100766571, 36.645095361862438 ], [ 117.09483487090877, 36.645113890962151 ], [ 117.094832647416794, 36.645081279746655 ], [ 117.09445317145466, 36.645059785990988 ], [ 117.094459100766571, 36.645095361862438 ] ] ] } },
{ "type": "Feature", "properties": { "id": 12, "lkid": "13NI00B5RM0", "ldid": "13NID0B5RM013NI00B5RM00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "3" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.094813377153116, 36.645053486097076 ], [ 117.09487415260017, 36.645058674245 ], [ 117.094870446780234, 36.644878571395779 ], [ 117.094809671333167, 36.644877089067805 ], [ 117.094813377153116, 36.645053486097076 ] ] ] } },
{ "type": "Feature", "properties": { "id": 13, "lkid": "13NID0B5RM0", "ldid": "13NH20B5RH013NID0B5RM00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "3" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.096205283123595, 36.645072756360797 ], [ 117.096264576242675, 36.645071274032823 ], [ 117.0962630939147, 36.644891171183602 ], [ 117.096203800795607, 36.644892653511583 ], [ 117.096205283123595, 36.645072756360797 ] ] ] } },
{ "type": "Feature", "properties": { "id": 14, "lkid": "13NID0B5RM0", "ldid": "13NHC0B5R4013NID0B5RM00", "rxhdkd": null, "rxhdcd": null, "ecgj": null, "bz": null, "dirtype": "4" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 117.095744279122712, 36.644894135839557 ], [ 117.096191201007812, 36.644886724199672 ], [ 117.09620898894353, 36.644867453935973 ], [ 117.095770961026304, 36.64487264208389 ], [ 117.095744279122712, 36.644894135839557 ] ] ] } }
]
}
\ No newline at end of file
......@@ -111,6 +111,8 @@ export function addOrUpdateLightLayers(map, geo) {
type: "symbol",
source: "lightLayerText",
layout: {
"text-allow-overlap": true,
"text-ignore-placement": true,
"text-field": ["get", "remainTime"],
"text-size": 14,
"text-pitch-alignment": "map",
......@@ -131,7 +133,7 @@ export function addOrUpdateLightLayers(map, geo) {
"rgba(255, 179, 0, 0.5)",
"green",
"rgba(48, 255, 141, 0.5)",
"rgba(255,255,255,1)", // 默认值,如果没有匹配到上述枚举值
"rgba(255,255,255,0)", // 默认值,如果没有匹配到上述枚举值
],
},
},
......@@ -140,6 +142,41 @@ export function addOrUpdateLightLayers(map, geo) {
}
}
// 更新等待行人区域灯态
export function addOrUpdateWaitingPolygons(map, geo){
if (!map.getSource("waitingLayer")) {
map.addSource("waitingLayer", {
type: "geojson",
data: geo,
});
} else {
map.getSource("waitingLayer").setData(geo);
}
if (!map.getLayer("waitingLayer")) {
map.addLayer(
{
id: "waitingLayer",
type: "fill",
source: "waitingLayer",
paint: {
"fill-color": [
"match",
["get", "state"], // 属性字段名称
'red',
"rgba(231, 63, 50,0.4)",
'green',
'rgba(35, 148, 67,0.4)',
'yellow',
'rgba(251, 194, 29,0.4)',
"rgba(255,255,255,1)",
], // 默认值,如果没有匹配到上述枚举值]
},
},
"vehicle3D"
);
}
}
// 检测器layer
export function addOrUpdateDetetorA(map, geo) {
if (!map.getSource("detetorsA")) {
......
......@@ -78,7 +78,7 @@ service.interceptors.response.use(
console.log("axios response...", res);
// 未设置状态码则默认成功状态
const code = res.data.code || 200;
const code = res.status || 200;
// 二进制数据则直接返回
if (
res.request.responseType === "blob" ||
......
......@@ -26,7 +26,7 @@
class="p__chart p__chartHeight"
></div>
<div
v-show="VisInclude('b1') && false"
v-show="VisInclude('b1')"
id="p2_unbalanceIndexCompare"
class="p__chart p__chartHeight"
></div>
......
<template>
<div v-show="titleShow && false">
<div v-show="titleShow">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通信号分析</span>
<p class="p__p" id="p__p3">
<span v-show="VisInclude('c1')"
......
<template>
<div v-show="titleShow && false">
<div v-show="titleShow">
<span class="p__span">&nbsp;&nbsp;&nbsp;路口交通组织分析</span>
<p class="p__p" id="p__p5_1">
<!-- {{ timeRange }}期间,{{ crossName }}路口{{ laneOrgSuggestVal }}。 -->
......
......@@ -72,7 +72,7 @@
header-cell-class-name="tab-table-header-cell"
:data="jkTableData"
height="100%"
style="width:100%"
style="width: 100%"
>
<el-table-column min-width="50" label="进口指标">
<template slot-scope="scope">
......@@ -163,7 +163,7 @@
<div class="tab">
<div class="tab-row top">
<el-table
height="100%"
height="100%"
class="crossDetail-table1"
cell-class-name="custom-table-cell"
header-row-class-name="tab-table-header"
......@@ -277,8 +277,9 @@
:label="`${dirDic[item.dir]}进口`"
:name="item.dir"
>
<el-table height="100%"
style="width:100%"
<el-table
height="100%"
style="width: 100%"
class="crossDetail-table1"
cell-class-name="custom-table-cell"
header-row-class-name="tab-table-header"
......@@ -677,7 +678,7 @@ export default {
this.roadOptions = match[0].laneList.filter((item) => {
return matchArr.includes(item.laneNo);
});
this.activeName2 = match[0].laneList[0].laneNo;
this.activeName2 = this.roadOptions[0]?.laneNo;
},
roadTrafficFlowChart(content) {
console.log("ccccccccc", content, this.activeName1);
......@@ -1581,20 +1582,23 @@ export default {
this.roadTables.push(res.content[i]);
if (i == 0) this.activeName1 = res.content[i].dir;
}
let match = this.roadTurnMap.filter((item) => {
return Number(item.dir) === Number(this.roadTables[0].dir);
});
let matchTable = this.roadTables.filter((item) => {
return Number(item.dir) === Number(this.roadTables[0].dir);
});
let matchArr = [];
for (let row of matchTable[0].list) {
matchArr.push(Number(row.laneNo));
if (this.roadTables.length) {
let match = this.roadTurnMap.filter((item) => {
return Number(item.dir) === Number(this.roadTables[0].dir);
});
let matchTable = this.roadTables.filter((item) => {
return Number(item.dir) === Number(this.roadTables[0].dir);
});
let matchArr = [];
for (let row of matchTable[0].list) {
matchArr.push(Number(row.laneNo));
}
this.roadOptions = match[0].laneList.filter((item) => {
return matchArr.includes(item.laneNo);
});
this.activeName2 = this.roadOptions[0]?.laneNo;
}
this.roadOptions = match[0].laneList.filter((item) => {
return matchArr.includes(item.laneNo);
});
this.activeName2 = match[0].laneList[0].laneNo;
Promise.all([
roadTimeBetw({ ...this.sendData, type: "2" }),
roadTimeBetw({ ...this.sendData, type: "1" }),
......
......@@ -149,6 +149,7 @@ let map,
lastFrameTime = null,
noTrackMsg = null,
stopLineData = [],
waitGeo = null,
radarModels = {},
radarModelTypes = {},
radarTimers = [],
......@@ -250,6 +251,12 @@ export default {
stopLineData = result.content;
});
});
fetch("waitPolygons.json").then((res) => {
res.json().then((result) => {
console.log("wait", result);
waitGeo = result;
});
});
equip_camera().then((res) => {
this.cameraData = res.content;
});
......@@ -949,7 +956,8 @@ export default {
this.currentNearestCrossId = nearestCrossId;
this.closeWs("callLight").then(() => {
let socket = initWs({
url: `${ws_config.CROSS_CONTROL}${nearestCrossId},holo-web`,
// url: `${ws_config.CROSS_CONTROL}${nearestCrossId},holo-web`,
url: `ws://10.102.1.182:9100/utc/signalStatus/13NF80B5QN0,stateMonitor`,
callback: this.callLight,
name: "callLight",
});
......@@ -1683,6 +1691,7 @@ export default {
// 可关闭弹框关闭事件
callLight(msg) {
let lightResults = [];
let waitResultFeatures = []
for (let crossLight of msg) {
let dirsLights = crossLight.dirLampGroupMapList;
for (let singleDirLight of dirsLights) {
......@@ -1830,26 +1839,26 @@ export default {
strightGreenTime = singleDirLight.turnList[i].remainTime;
}
// 右转设绿
if (singleDirLight.turnList[i].turn == "3") {
singleDirLight.turnList[i].color = "green";
rightGreenFlag = true;
}
if (
singleDirLight.turnList[i].turn == "20" ||
singleDirLight.turnList[i].turn == "4"
) {
singleDirLight.turnList.splice(i, 1);
i = i - 1;
}
// if (singleDirLight.turnList[i].turn == "3") {
// singleDirLight.turnList[i].color = "green";
// rightGreenFlag = true;
// }
// if (
// singleDirLight.turnList[i].turn == "20" ||
// singleDirLight.turnList[i].turn == "4"
// ) {
// singleDirLight.turnList.splice(i, 1);
// i = i - 1;
// }
}
// 若无右转则补全
if (!rightGreenFlag) {
singleDirLight.turnList.push({
color: "green",
countDown: strightGreenTime,
turn: "3",
});
}
// if (!rightGreenFlag) {
// singleDirLight.turnList.push({
// color: "green",
// countDown: strightGreenTime,
// turn: "3",
// });
// }
// 停止线对应的转向数组 只有属于此数组的才视为合法转向灯
let stopLineTurns = stopLine.turntype.split(',')
for (let i = 0; i < singleDirLight.turnList.length; i++) {
......@@ -1867,11 +1876,22 @@ export default {
lightNumSplitMap[stopLineTurns.length][i]
],
ts: `${singleDirLight.turnList[i].turn}${singleDirLight.turnList[i].color}`,
lightAngle: stopLineAngle,
lightAngle: stopLineAngle - 90,
});
}
}
}
console.log('w',waitGeo);
let targetWait = waitGeo.features.find(wait => {
return (wait.properties.lkid == crossLight.crossId && wait.properties.dirtype == singleDirLight.dir)
})
if(targetWait){
let currentWaiting = singleDirLight.turnList.find(item =>{
return item.turn == '20'
})
let color = currentWaiting?.color.replace('Flash','') || 'white'
waitResultFeatures.push(turf.polygon(targetWait.geometry.coordinates,{state:color}))
}
}
}
let features = [];
......@@ -1880,6 +1900,8 @@ export default {
}
let geo = turf.featureCollection(features);
mapTools.addOrUpdateLightLayers(map, geo);
let waitG = turf.featureCollection(waitResultFeatures)
mapTools.addOrUpdateWaitingPolygons(map, waitG);
},
actionFinished(id) {
this.dialogVisible[id] = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment