-
+
{{ item.facilityName }}
-
-
- {{ item.trafficClose }}次
-
-
+
+
{{ item.trafficRestriction }}次
+
+ {{ item.trafficClose }}次
+
-
-
-
+
@@ -51,42 +62,50 @@ import WgtTitle from "@screen/pages/perception/widgets/title";
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue";
import * as echarts from "echarts";
import chartsStatistics from "./assets/charts";
-import { tollStationAnalysis } from "@/api/event/governanceAnalysis"
-import StatsDialogVisible from "./StatsDialogVisible/index.vue"
+import { tollStationAnalysis } from "@/api/event/governanceAnalysis";
+import StatsDialogVisible from "./StatsDialogVisible/index.vue";
import icon from "./assets/icon.svg";
export default {
- name: 'RailWayDay',
+ name: "RailWayDay",
components: {
WgtTitle,
ButtonGradient,
- StatsDialogVisible
+ StatsDialogVisible,
},
data() {
return {
statsDialogVisible: false,
tollBoothsData: [],
maxRestrictionNum: null,
- maxCloseNum: null
- }
+ maxCloseNum: null,
+ };
},
- created() {
-
- },
+ created() {},
methods: {
handleStats() {
- this.statsDialogVisible = true
+ this.statsDialogVisible = true;
},
handleClose() {
- this.statsDialogVisible = false
+ this.statsDialogVisible = false;
},
getTollStationAnalysis() {
return tollStationAnalysis().then((response) => {
- this.tollBoothsData = response.data
- this.maxRestrictionNum = Math.max.apply(Math, this.tollBoothsData.map(item => { return item.trafficRestriction }))
- this.maxCloseNum = Math.max.apply(Math, this.tollBoothsData.map(item => { return item.trafficRestriction }))
- console.log("response", this.maxRestrictionNum, this.maxCloseNum)
+ this.tollBoothsData = response.data;
+ this.maxRestrictionNum = Math.max.apply(
+ Math,
+ this.tollBoothsData.map((item) => {
+ return item.trafficRestriction;
+ })
+ );
+ this.maxCloseNum = Math.max.apply(
+ Math,
+ this.tollBoothsData.map((item) => {
+ return item.trafficRestriction;
+ })
+ );
+ console.log("response", this.maxRestrictionNum, this.maxCloseNum);
// let facilityName = []
// let trafficRestriction = []
// let trafficClose = []
@@ -109,20 +128,18 @@ export default {
// chartsStatistics.yAxis[0].data = facilityName;
// chartsStatistics.series[0].data = trafficClose;
// chartsStatistics.series[1].data = trafficRestriction;
-
- })
- }
+ });
+ },
},
async mounted() {
- await this.getTollStationAnalysis()
+ await this.getTollStationAnalysis();
// const myChart = echarts.init(document.getElementById('auditAnalytics'));
// myChart.setOption(chartsStatistics);
-
},
-}
+};
-