Browse Source

一类交调功能调整

develop
lau572 2 months ago
parent
commit
fdc951a0e3
  1. 7
      ruoyi-ui/src/common/menuData.js
  2. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/index.vue
  3. 89
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/data.js
  4. 83
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/index.vue
  5. 0
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/survey/charts.js
  6. 41
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/survey/data.js
  7. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/survey/index.vue

7
ruoyi-ui/src/common/menuData.js

@ -55,10 +55,15 @@ export default [
name: "siteAdministration",
component: "perception/trafficSurvey/siteAdministration/index.vue",
}, {
title: "综合查询",
title: "站点查询",
path: "/perception/trafficSurvey/comprehensiveQuery",
name: "comprehensiveQuery",
component: "perception/trafficSurvey/comprehensiveQuery/index.vue",
}, {
title: "综合查询",
path: "/perception/trafficSurvey/survey",
name: "survey",
component: "perception/trafficSurvey/survey/index.vue",
}
]
}

5
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/index.vue

@ -7,9 +7,6 @@
<el-tab-pane label="交通流统计" name="second" class="tab_con">
<TrafficFlowStatistics />
</el-tab-pane>
<el-tab-pane label="一类交调站" name="survey" class="tab_con">
<TrafficSurvey />
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -17,14 +14,12 @@
<script>
import TrafficFlowAnalysis from "./analysis/index.vue";
import TrafficFlowStatistics from "./statistics/index.vue";
import TrafficSurvey from "./survey/index.vue";
export default {
name: "TrafficFlow",
components: {
TrafficFlowAnalysis,
TrafficFlowStatistics,
TrafficSurvey
},
data() {
return {

89
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/data.js

@ -44,19 +44,6 @@ export const deviceList = [
]
export const searchFormList = [
{
label: "时间:",
key: "date",
type: "datePicker",
required: true,
default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
options: {
type: "datetime",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
},
{
label: "时间类型:",
key: "type",
@ -78,10 +65,64 @@ export const searchFormList = [
{
key: "3",
label: "年",
},
{
key: "4",
label: "日期范围",
}
],
},
},
{
label: "时间:",
key: "date",
type: "datePicker",
required: true,
default: moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
options: {
type: "datetime",
format: "yyyy-MM-dd HH:mm:ss",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
visible: (data) => {
if (data.type !== "4") {
return true;
}
},
},
{
label: "日期范围:",
key: "timeRange",
type: "datePicker",
required: true,
default:[moment().format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')],
options: {
format: "yyyy-MM-dd HH:mm:ss",
type: "daterange",
valueFormat: "yyyy-MM-dd HH:mm:ss",
pickerOptions: {
/*disabledDate(time) {
return time.getTime() > Date.now()
},*/
onPick({ maxDate, minDate }){
//限制60天范围
if (minDate) {
const end = new Date(minDate.getTime() + 60 * 24 * 60 * 60 * 1000);
const start = new Date(minDate.getTime() - 60 * 24 * 60 * 60 * 1000);
this.disabledDate = (time) => {
return time.getTime() > end.getTime() || time.getTime() < start.getTime();
};
}
},
},
},
visible: (data) => {
if (data.type === "4") {
return true;
}
},
},
{
label: "方向:",
key: "direction",
@ -124,7 +165,27 @@ export const searchFormList = [
],
},
},
{
label: "车型:",
key: "carType",
type: "RadioGroup",
required: true,
isAlone: true,
default:'1',
options: {
activeColor: "linear-gradient(180deg, #37E7FF 0%, #009BCC 100%)",
options: [
{
key: "1",
label: "小类",
},
{
key: "2",
label: "大类",
}
],
},
},
// {
// label: "方向:",
// key: "direction",

83
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/comprehensiveQuery/index.vue

@ -36,8 +36,8 @@
<div style="height: 40%;" >
<div id="tableChart" style="height: 95%;width: 100%"></div>
</div>
<!--车流量 不分方向-->
<Table v-if="queryForm.dataType == '1' && queryForm.direction == '2'" style="width:85vw" :data="tableData" :key="tableKey" height="50%" >
<!--车流量 不分方向 小类-->
<Table v-if="queryForm.dataType == '1' && queryForm.direction == '2' && queryForm.carType == '1'" style="width:85vw" :data="tableData" :key="tableKey" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn prop="trafficNumberOfInAndSmall" align="center" label="中小客车" />
<ElTableColumn prop="busTrafficVolume" align="center" label="大客车" />
@ -50,9 +50,16 @@
<!-- <ElTableColumn prop="tractorTrafficVolume" align="center" label="拖拉机" />-->
<ElTableColumn prop="trafficVolume" align="center" label="合计" />
</Table>
<!--车流量 不分方向 大类-->
<Table v-if="queryForm.dataType == '1' && queryForm.direction == '2' && queryForm.carType == '2'" style="width:85vw" :data="tableData" :key="tableKey" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn prop="bus" align="center" label="客车" />
<ElTableColumn prop="goodsCar" align="center" label="货车" />
<ElTableColumn prop="trafficVolume" align="center" label="合计" />
</Table>
<!--车流量 分方向-->
<Table v-if="queryForm.dataType == '1' && queryForm.direction == '1'" style="width:85vw" :data="tableData" :key="tableKey" height="50%" >
<!--车流量 分方向 小类-->
<Table v-if="queryForm.dataType == '1' && queryForm.direction == '1' && queryForm.carType == '1'" style="width:85vw" :data="tableData" :key="tableKey" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn align="center" label="中小客车" >
<ElTableColumn prop="trafficNumberOfInAndSmallHZ" align="center" label="菏泽" ></ElTableColumn>
@ -96,9 +103,26 @@
</ElTableColumn>
<ElTableColumn align="center" label="总计车流量" prop="allTrafficVolume" ></ElTableColumn>
</Table>
<!--车流量 分方向 大类-->
<Table v-if="queryForm.dataType == '1' && queryForm.direction == '1' && queryForm.carType == '2'" style="width:85vw" :data="tableData" :key="tableKey" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn align="center" label="客车" >
<ElTableColumn prop="busHZ" align="center" label="菏泽" ></ElTableColumn>
<ElTableColumn prop="busJN" align="center" label="济南" ></ElTableColumn>
</ElTableColumn>
<ElTableColumn align="center" label="货车" >
<ElTableColumn prop="goodsCarHZ" align="center" label="菏泽" ></ElTableColumn>
<ElTableColumn prop="goodsCarJN" align="center" label="济南" ></ElTableColumn>
</ElTableColumn>
<ElTableColumn align="center" label="合计" >
<ElTableColumn prop="trafficVolumeHZ" align="center" label="菏泽" ></ElTableColumn>
<ElTableColumn prop="trafficVolumeJN" align="center" label="济南" ></ElTableColumn>
</ElTableColumn>
<ElTableColumn align="center" label="总计车流量" prop="allTrafficVolume" ></ElTableColumn>
</Table>
<!--车速 不分方向-->
<Table v-if="queryForm.dataType == '2' && queryForm.direction == '2'" style="width:85vw" :data="tableData" :key="tableKey" v-loading="loading" height="50%" >
<!--车速 不分方向 小类-->
<Table v-if="queryForm.dataType == '2' && queryForm.direction == '2' && queryForm.carType == '1'" style="width:85vw" :data="tableData" :key="tableKey" v-loading="loading" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn prop="inAndSmallAverageVehicleSpeed" align="center" label="中小客车" />
<ElTableColumn prop="averageSpeedOfBus" align="center" label="大客车" />
@ -111,9 +135,16 @@
<!-- <ElTableColumn prop="averageSpeedOfTractor" align="center" label="拖拉机" />-->
<ElTableColumn prop="avgSpeed" align="center" label="车速平均" />
</Table>
<!--车速 不分方向 大类-->
<Table v-if="queryForm.dataType == '2' && queryForm.direction == '2' && queryForm.carType == '2'" style="width:85vw" :data="tableData" :key="tableKey" v-loading="loading" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn prop="busVehicleSpeed" align="center" label="客车" />
<ElTableColumn prop="goodsCarVehicleSpeed" align="center" label="货车" />
<ElTableColumn prop="avgSpeed" align="center" label="车速平均" />
</Table>
<!--车速 分方向-->
<Table v-if="queryForm.dataType == '2' && queryForm.direction == '1'" style="width:85vw" :data="tableData" :key="tableKey" v-loading="loading" height="50%" >
<!--车速 分方向 小类-->
<Table v-if="queryForm.dataType == '2' && queryForm.direction == '1' && queryForm.carType == '1'" style="width:85vw" :data="tableData" :key="tableKey" v-loading="loading" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn align="center" label="中小客车" >
<ElTableColumn prop="inAndSmallAverageVehicleSpeedHZ" align="center" label="菏泽" />
@ -145,20 +176,23 @@
<ElTableColumn prop="averageSpeedOfExtraLargeTrucksJN" align="center" label="济南" />
</ElTableColumn>
<!-- <ElTableColumn align="center" label="集装箱车" >
<ElTableColumn prop="averageSpeedOfContainerTruckHZ" align="center" label="菏泽" />
<ElTableColumn prop="averageSpeedOfContainerTruckJN" align="center" label="济南" />
<ElTableColumn align="center" label="车速平均" >
<ElTableColumn prop="avgSpeedHZ" align="center" label="菏泽" />
<ElTableColumn prop="avgSpeedJN" align="center" label="济南" />
</ElTableColumn>
<ElTableColumn align="center" label="摩托车" >
<ElTableColumn prop="averageSpeedOfMotorcycleHZ" align="center" label="菏泽" />
<ElTableColumn prop="averageSpeedOfMotorcycleJN" align="center" label="济南" />
</Table>
<!--车速 分方向 大类-->
<Table v-if="queryForm.dataType == '2' && queryForm.direction == '1' && queryForm.carType == '2'" style="width:85vw" :data="tableData" :key="tableKey" v-loading="loading" height="50%" >
<ElTableColumn prop="time" align="center" min-width="140" label="时间"></ElTableColumn>
<ElTableColumn align="center" label="客车" >
<ElTableColumn prop="busVehicleSpeedHZ" align="center" label="菏泽" />
<ElTableColumn prop="busVehicleSpeedJN" align="center" label="济南" />
</ElTableColumn>
<ElTableColumn align="center" label="拖拉机" >
<ElTableColumn prop="averageSpeedOfTractorHZ" align="center" label="菏泽" />
<ElTableColumn prop="averageSpeedOfTractorJN" align="center" label="济南" />
</ElTableColumn>-->
<ElTableColumn align="center" label="货车" >
<ElTableColumn prop="goodsCarVehicleSpeedHZ" align="center" label="菏泽" />
<ElTableColumn prop="goodsCarVehicleSpeedJN" align="center" label="济南" />
</ElTableColumn>
<ElTableColumn align="center" label="车速平均" >
<ElTableColumn prop="avgSpeedHZ" align="center" label="菏泽" />
@ -276,6 +310,7 @@
date:moment(new Date()).format("YYYY-MM-DD HH:mm:ss"),
type:'1',
dataType:'1',
carType:'1',
},
modelVisible:false,
loading:false,
@ -320,6 +355,10 @@
this.queryForm.type = data.type;
this.queryForm.dataType = data.dataType;
this.queryForm.direction = data.direction;
this.queryForm.carType = data.carType;
this.queryForm.startTime = data.timeRange[0];
this.queryForm.endTime = data.timeRange[1];
this.initData();
},
initData(){
@ -347,7 +386,7 @@
//
if (this.queryForm.dataType == '1'){
tableChartsOptions.yAxis[0].name = '流量'
dataList = this.tableData.slice(0,this.tableData.length - 3);
dataList = this.tableData.slice(0,this.tableData.length - 4);
tableChartsOptions.xAxis.data = dataList.map(item => item.time.slice(item.time.length - 2,item.time.length))
if (this.queryForm.direction == '1'){
tableChartsOptions.series = [
@ -511,7 +550,7 @@
},
onExport(){
const self = this;
this.$confirm("是否确认导出综合查询内容?", "警告", {
this.$confirm("是否确认导出站点查询内容?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
@ -532,7 +571,7 @@
let link = document.createElement("a");
link.style.display = "none";
link.href = url;
link.setAttribute("download", "综合查询.xlsx");
link.setAttribute("download", "站点查询.xlsx");
document.body.appendChild(link);
link.click();
URL.revokeObjectURL(link.href); // URL

0
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/survey/charts.js → ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/survey/charts.js

41
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/survey/data.js → ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/survey/data.js

@ -3,10 +3,11 @@ export const searchFormList = [
{
label: "时间类型:",
key: "type",
type: "select",
type: "RadioGroup",
default: "day",
required: true,
isAlone: true,
options: {
clearable: true,
options: [
{
key: "day",
@ -20,9 +21,45 @@ export const searchFormList = [
key: "year",
label: "年",
},
{
key: "range",
label: "日期范围",
},
],
},
},
{
label: "日期范围:",
key: "timeRange",
type: "datePicker",
required: true,
default:[moment().format('YYYY-MM-DD'),moment().format('YYYY-MM-DD')],
options: {
format: "yyyy-MM-dd",
type: "daterange",
valueFormat: "yyyy-MM-dd",
pickerOptions: {
/*disabledDate(time) {
return time.getTime() > Date.now()
},*/
onPick({ maxDate, minDate }){
//限制60天范围
if (minDate) {
const end = new Date(minDate.getTime() + 60 * 24 * 60 * 60 * 1000);
const start = new Date(minDate.getTime() - 60 * 24 * 60 * 60 * 1000);
this.disabledDate = (time) => {
return time.getTime() > end.getTime() || time.getTime() < start.getTime();
};
}
},
},
},
visible: (data) => {
if (data.type == "range") {
return true;
}
},
},
{
label: "日期:",
key: "startTime",

28
ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/survey/index.vue → ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficSurvey/survey/index.vue

@ -37,6 +37,7 @@
<template slot-scope="scope">
<span v-if="scope.row.direction == '1'">菏泽</span>
<span v-if="scope.row.direction == '3'">济南</span>
<span v-if="scope.row.direction == '2'">合计</span>
</template>
</ElTableColumn>
<ElTableColumn v-for="item in columnList" :label="item.label" :prop="item.key" min-width="80" align="center" header-align="center" />
@ -58,7 +59,7 @@ import InputSearch from "@screen/components/InputSearch/index.vue";
import { searchFormList } from "./data";
import { delay, exportFile, confirm } from "@screen/utils/common";
import Button from "@screen/components/Buttons/Button.vue";
import Form from "@screen/components/FormConfig";
import Form from "@screen/components/FormConfig/index";
import Dialog from "@screen/components/Dialog/index.vue";
import { mapState } from "vuex";
import moment from 'moment';
@ -67,7 +68,7 @@ import chartOptions from "./charts";
export default {
name: 'survey',
name: 'Survey',
components: {
ButtonGradient,
Pagination,
@ -129,7 +130,12 @@ export default {
this.$refs.searchComp.handleResetForm();
},
handleSearch(data) {
data.timestamp = data.startTime + " 00:00:01";
if (data.type == 'range'){
data.timestamp = data.timeRange[0] + " 00:00:01";
data.endTime = data.timeRange[1] + " 23:59:59";
} else {
data.timestamp = data.startTime + " 00:00:01";
}
this.searchData = { ...data };
this.initData();
},
@ -141,7 +147,7 @@ export default {
handleExport() {
exportFile({
url: "/trafficSurveyData/dcTrafficSurveyData/export",
filename: "一类交调站",
filename: "综合查询",
data: this.searchData,
});
},
@ -180,14 +186,18 @@ export default {
let legendData = []
const stakeMarkMap = new Map();
data.rowList.forEach(item => {
stakeMarkMap.set(item.stakeMark, item);
if (item.direction != '2'){
stakeMarkMap.set(item.stakeMark, item);
}
});
data.rowList.forEach(item => {
const stakeMark = item.stakeMark;
if (!stakeMarkMap[stakeMark]) {
stakeMarkMap[stakeMark] = [];
if (item.direction != '2') {
const stakeMark = item.stakeMark;
if (!stakeMarkMap[stakeMark]) {
stakeMarkMap[stakeMark] = [];
}
stakeMarkMap[stakeMark].push(item);
}
stakeMarkMap[stakeMark].push(item);
});
stakeMarkMap.keys().forEach((stakeMark,index) =>{
Loading…
Cancel
Save