Commit b9f88096 authored by ninglx's avatar ninglx

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

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