Commit b9f88096 authored by ninglx's avatar ninglx

wj-smartcity 事件查询 溢出&停车事件查询接口对接联调

parent a9a27aa4
......@@ -158,13 +158,13 @@ export default {
{ label: "平均车身间距", prop: "vehheadDist" },
{ label: "85位速度", prop: "v85" },
{ label: "车辆总和", prop: "allVehiceleFlow" },
{ label: "平均空间占有率", prop: "vehicleNumsRatioMean" },
{ label: "平均空间占有率(%)", prop: "vehicleNumsRatioMean" },
{ label: "最大排队长度", prop: "queueLength" },
{ label: "平均停车次数", prop: "stopTimes" },
{ label: "平均延误", prop: "delayTime" },
],
laneTableColumn2: [
{ label: "时间", prop: "windowEndTime" },
{ label: "时间", prop: "windowStartTime" },
{ label: "方向", prop: "fRidDirTranslate" },
{ label: "总流量", prop: "allFlow" },
{ label: "平均速度", prop: "avgSpeed" },
......
......@@ -51,10 +51,12 @@
:row-class-name="getRowClassName"
style="width: 100%"
>
<el-table-column align="center" label="序号" show-overflow-tooltip>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
</template>
<el-table-column
align="center"
label="序号"
prop="index"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
align="center"
......@@ -62,7 +64,8 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
<!-- {{ occupancyValue(scope.row.xxx) }} -->
异常停车
</template>
</el-table-column>
<el-table-column
......@@ -71,7 +74,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.startTime) }}
</template>
</el-table-column>
<el-table-column
......@@ -80,7 +83,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.endTime) }}
</template>
</el-table-column>
<el-table-column
......@@ -89,12 +92,12 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.duration) }}
</template>
</el-table-column>
<el-table-column align="center" label="位置" show-overflow-tooltip>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.placeDesc) }}
</template>
</el-table-column>
<el-table-column
......@@ -130,7 +133,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.plateNo) }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" show-overflow-tooltip>
......@@ -156,10 +159,10 @@
:row-class-name="getRowClassName"
style="width: 100%"
>
<el-table-column align="center" label="序号" show-overflow-tooltip>
<template slot-scope="scope">
<el-table-column align="center" prop="index" label="序号" show-overflow-tooltip>
<!-- <template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
</template>
</template> -->
</el-table-column>
<el-table-column
align="center"
......@@ -167,7 +170,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.time) }}
</template>
</el-table-column>
<el-table-column
......@@ -190,7 +193,7 @@
</el-table-column>
<el-table-column align="center" label="位置" show-overflow-tooltip>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(`${scope.row.dirName&&(scope.row.dirName+'进口')}`) }}
</template>
</el-table-column>
<el-table-column
......@@ -199,7 +202,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.laneSort) }}
</template>
</el-table-column>
<el-table-column
......@@ -208,7 +211,7 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.overflowNums) }}
</template>
</el-table-column>
<el-table-column
......@@ -217,16 +220,16 @@
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.speed) }}
</template>
</el-table-column>
<el-table-column
align="center"
label="空间占有率"
label="空间占有率(%)"
show-overflow-tooltip
>
<template slot-scope="scope">
{{ occupancyValue(scope.row.xxx) }}
{{ occupancyValue(scope.row.vehicleNumsRatio) }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" show-overflow-tooltip>
......@@ -241,11 +244,16 @@
</template>
<script>
import { getHoloEventList, initLaneSort } from "@/dao/optApi";
import {
getHoloEventList,
initLaneSort,
getLaneSnapshotIndex,
} from "@/dao/optApi";
import { occupancyValue } from "../../../utils";
export default {
name: "eventData",
props: ["crossData"],
data() {
return {
dateTimeRange: [],
......@@ -259,10 +267,10 @@ export default {
};
},
mounted() {
if (time_config.dataQuery_snapshotTime) {
if (time_config.homepage_eventTime) {
this.dateTimeRange = [
new Date(time_config.dataQuery_snapshotTime[0]),
new Date(time_config.dataQuery_snapshotTime[1]),
new Date(time_config.homepage_eventTime[0]),
new Date(time_config.homepage_eventTime[1]),
];
} else {
this.dateTimeRange = [
......@@ -276,6 +284,10 @@ export default {
},
methods: {
exportLaneExcel() {
if(!this.eventTypeValue) {
this.$message('请选择要导出数据的事件类型')
return
}
// excel导出下载
// exportLane({
// "crossId": this.crossData.crossId,
......@@ -299,12 +311,33 @@ export default {
},
occupancyValue,
getData() {
// 停车事件
getHoloEventList({
crossId: this.crossData.id,
crossId: this.crossData.crossId,
end: this.dateTimeRange[1].toLocaleString().replaceAll("/", "-"),
start: this.dateTimeRange[0].toLocaleString().replaceAll("/", "-"),
types: "401,",
}).then((res) => {
console.log("event list...", res);
this.stopTableData = res.content.map((item, index) => {
item.index = index + 1;
return item;
});
});
// 溢出事件
getLaneSnapshotIndex({
crossId: this.crossData.crossId,
end: this.dateTimeRange[1].toLocaleString().replaceAll("/", "-"),
start: this.dateTimeRange[0].toLocaleString().replaceAll("/", "-"),
// end: '2024-06-24 18:00:00',
// start: '2024-06-24 00:00:00',
overFlow: true
}).then((res) => {
console.log("溢出 (复用快照", res);
this.overTableData = res.content.map((item,index) =>{
item.index = index+1
return item
})
});
},
getRowClassName(e) {
......@@ -382,6 +415,7 @@ export default {
}
.custom-table-container {
flex: 1;
margin-bottom: 8px;
}
}
.eventDataContainer {
......
......@@ -39,7 +39,7 @@ export default {
tabs: [
{'1': '周期数据'},
{'2': '快照数据'},
// {'3': '事件数据'},
{'3': '事件数据'},
],
}
},
......
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