|
|
@ -1,13 +1,27 @@ |
|
|
|
<template> |
|
|
|
<Dialog v-model="modelVisible" title="收费站管制统计" style="width: 100%;"> |
|
|
|
<Dialog v-model="modelVisible" title="收费站管制统计" style="width: 100%"> |
|
|
|
<div class="search"> |
|
|
|
<InputSearch :formList="searchFormList" @handleSearch="handleSearch" style="width: 502px;" /> |
|
|
|
<InputSearch |
|
|
|
:formList="searchFormList" |
|
|
|
@handleSearch="handleSearch" |
|
|
|
style="width: 502px" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="StatsDetail"> |
|
|
|
<el-table key="table1" v-if="searchType == 2" :data="tableData" style="width: 100%" |
|
|
|
:span-method="arraySpanMethod"> |
|
|
|
<el-table-column prop="controlCauseName" label="封闭原因" width="150" align="center"> |
|
|
|
<el-table |
|
|
|
key="table1" |
|
|
|
v-if="searchType == 2 && controlType == 1" |
|
|
|
:data="tableData" |
|
|
|
style="width: 100%" |
|
|
|
:span-method="arraySpanMethod" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
prop="controlCauseName" |
|
|
|
label="封闭原因" |
|
|
|
width="150" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="causeTypeName" label="" align="center"> |
|
|
|
</el-table-column> |
|
|
@ -15,70 +29,216 @@ |
|
|
|
<el-table-column label="目标时段" width="120" align="center"> |
|
|
|
<el-table-column prop="num" label="站次" width="120" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="numRatio" label="占比(%)" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="numRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="去年同期时间段" align="center"> |
|
|
|
<el-table-column prop="lastYearNum" label="站次" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearNum" |
|
|
|
label="站次" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastYearNumRatio" label="占比(%)" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearNumRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="yearNumRatio" label="同比(%)" align="center"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="yearNumRatio" |
|
|
|
label="同比(%)" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="封闭时长" align="center"> |
|
|
|
<el-table-column label="目标时段" width="120" align="center"> |
|
|
|
<el-table-column prop="minuteTime" label="时长(分钟)" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="minuteTime" |
|
|
|
label="时长(分钟)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="timeRatio" label="占比(%)" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="timeRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="去年同期时间段" align="center"> |
|
|
|
<el-table-column prop="lastYearTime" label="时长(分钟)" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearTime" |
|
|
|
label="时长(分钟)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastYearTimeRatio" label="占比(%)" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearTimeRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="yearTimeRatio" label="同比(%)" align="center"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="yearTimeRatio" |
|
|
|
label="同比(%)" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-table key="table2" v-else :data="facilityTableData" style="width: 100%"> |
|
|
|
<el-table-column prop="facilityName" label="" width="150" align="center"> |
|
|
|
<el-table |
|
|
|
key="table2" |
|
|
|
v-else-if="searchType == 2 && controlType == 2" |
|
|
|
:data="tableData" |
|
|
|
style="width: 100%" |
|
|
|
:span-method="arraySpanMethod" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
prop="controlCauseName" |
|
|
|
label="限行原因" |
|
|
|
width="150" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="causeTypeName" label="" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="限行站次" align="center"> |
|
|
|
<el-table-column label="目标时段" width="120" align="center"> |
|
|
|
<el-table-column prop="num" label="站次" width="120" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="numRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="去年同期时间段" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearNum" |
|
|
|
label="站次" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearNumRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="yearNumRatio" |
|
|
|
label="同比(%)" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="限行时长" align="center"> |
|
|
|
<el-table-column label="目标时段" width="120" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="minuteTime" |
|
|
|
label="时长(分钟)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="timeRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="去年同期时间段" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearTime" |
|
|
|
label="时长(分钟)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="lastYearTimeRatio" |
|
|
|
label="占比(%)" |
|
|
|
width="120" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="yearTimeRatio" |
|
|
|
label="同比(%)" |
|
|
|
align="center" |
|
|
|
></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-table |
|
|
|
key="table3" |
|
|
|
v-else |
|
|
|
:data="facilityTableData" |
|
|
|
style="width: 100%" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
prop="facilityName" |
|
|
|
label="" |
|
|
|
width="150" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="facilityClose" label="封闭" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="facilityRestriction" label="限行" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="facilityInterval" label="间隔放行" align="center"> |
|
|
|
<el-table-column |
|
|
|
prop="facilityInterval" |
|
|
|
label="间隔放行" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="total" label="合计" align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
</div> |
|
|
|
</Dialog> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import Dialog from "@screen/components/Dialog/index"; |
|
|
|
import InputSearch from '@screen/components/InputSearch/index.vue'; |
|
|
|
import InputSearch from "@screen/components/InputSearch/index.vue"; |
|
|
|
import Table from "@screen/components/Table.vue"; |
|
|
|
import { selectTollStation } from "@/api/event/governanceAnalysis" |
|
|
|
import { selectTollStation } from "@/api/event/governanceAnalysis"; |
|
|
|
import options from "../assets/charts"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
export default { |
|
|
|
name: 'StatsDetail', |
|
|
|
name: "StatsDetail", |
|
|
|
components: { |
|
|
|
Dialog, |
|
|
|
InputSearch, |
|
|
|
Table |
|
|
|
Table, |
|
|
|
}, |
|
|
|
model: { |
|
|
|
prop: 'visible', |
|
|
|
event: 'update:value' |
|
|
|
prop: "visible", |
|
|
|
event: "update:value", |
|
|
|
}, |
|
|
|
props: { |
|
|
|
visible: Boolean |
|
|
|
visible: Boolean, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -93,6 +253,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
searchType: 1, |
|
|
|
controlType: 1, |
|
|
|
facilityIds: [], |
|
|
|
facilityTableData: [], |
|
|
|
searchFormList: [ |
|
|
@ -104,7 +265,7 @@ export default { |
|
|
|
type: "RadioGroup", |
|
|
|
default: 1, |
|
|
|
options: { |
|
|
|
type: 'circle', |
|
|
|
type: "circle", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
key: 1, |
|
|
@ -113,9 +274,9 @@ export default { |
|
|
|
{ |
|
|
|
key: 2, |
|
|
|
label: "原因", |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "事件类型:", |
|
|
@ -123,23 +284,25 @@ export default { |
|
|
|
required: true, |
|
|
|
isAlone: true, |
|
|
|
type: "RadioGroup", |
|
|
|
visible: data => { |
|
|
|
visible: (data) => { |
|
|
|
if (data.searchType == 2) { |
|
|
|
return true |
|
|
|
return true; |
|
|
|
} |
|
|
|
}, |
|
|
|
default: 1, |
|
|
|
options: { |
|
|
|
type: 'circle', |
|
|
|
options: [{ |
|
|
|
type: "circle", |
|
|
|
options: [ |
|
|
|
{ |
|
|
|
key: 1, |
|
|
|
label: "收费站封闭", |
|
|
|
}, |
|
|
|
{ |
|
|
|
key: 2, |
|
|
|
label: "收费站限行", |
|
|
|
}] |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "选择站点:", |
|
|
@ -148,11 +311,11 @@ export default { |
|
|
|
type: "Select", |
|
|
|
options: { |
|
|
|
multiple: true, |
|
|
|
options: [] |
|
|
|
options: [], |
|
|
|
}, |
|
|
|
visible: data => { |
|
|
|
visible: (data) => { |
|
|
|
if (data.searchType == 1) { |
|
|
|
return true |
|
|
|
return true; |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -168,12 +331,11 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
valueFormat: "yyyy-MM-dd", |
|
|
|
type: "daterange" |
|
|
|
} |
|
|
|
type: "daterange", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
modelVisible: { |
|
|
@ -181,9 +343,9 @@ export default { |
|
|
|
return this.visible; |
|
|
|
}, |
|
|
|
set(val) { |
|
|
|
this.$emit('update:value', val) |
|
|
|
} |
|
|
|
} |
|
|
|
this.$emit("update:value", val); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
@ -194,45 +356,42 @@ export default { |
|
|
|
url: `/business/facility/query`, |
|
|
|
method: "get", |
|
|
|
}), |
|
|
|
]) |
|
|
|
.then((res) => { |
|
|
|
if (res[0].status === 'fulfilled' && res[0].value.code == 200) { |
|
|
|
this.searchFormList[2].options.options = res[0].value.data.map(item => ({ |
|
|
|
]).then((res) => { |
|
|
|
if (res[0].status === "fulfilled" && res[0].value.code == 200) { |
|
|
|
this.searchFormList[2].options.options = res[0].value.data.map( |
|
|
|
(item) => ({ |
|
|
|
key: item.id, |
|
|
|
label: item.facilityName, |
|
|
|
})) |
|
|
|
this.facilityIds = res[0].value.data.map(item => item.id) |
|
|
|
}) |
|
|
|
); |
|
|
|
this.facilityIds = res[0].value.data.map((item) => item.id); |
|
|
|
// this.searchFormList[2].default = res[0].value.data.map(item => item.id) |
|
|
|
|
|
|
|
let date = moment().format('YYYY-MM-DD') |
|
|
|
let date = moment().format("YYYY-MM-DD"); |
|
|
|
let data = { |
|
|
|
searchType: 1, |
|
|
|
facilityId: this.facilityIds, |
|
|
|
date: [date + " 00:00:00", date + " 23:59:59"] |
|
|
|
} |
|
|
|
this.getSelectTollStation(data) |
|
|
|
date: [date + " 00:00:00", date + " 23:59:59"], |
|
|
|
}; |
|
|
|
this.getSelectTollStation(data); |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
handleSearch(data) { |
|
|
|
this.getSelectTollStation(data) |
|
|
|
this.getSelectTollStation(data); |
|
|
|
}, |
|
|
|
arraySpanMethod({ row, column, rowIndex, columnIndex }) { |
|
|
|
|
|
|
|
if (this.searchType == 2) { |
|
|
|
|
|
|
|
if (!row.causeTypeName) { |
|
|
|
if (columnIndex === 0) { |
|
|
|
return [1, 2]; |
|
|
|
} |
|
|
|
else if (columnIndex === 1) { |
|
|
|
} else if (columnIndex === 1) { |
|
|
|
return [0, 0]; |
|
|
|
} |
|
|
|
}; |
|
|
|
if (row.controlCauseName === '恶劣天气') { |
|
|
|
} |
|
|
|
if (row.controlCauseName === "恶劣天气") { |
|
|
|
if (columnIndex === 0) { |
|
|
|
console.log(this.weatherNum.length) |
|
|
|
console.log(this.weatherNum.length); |
|
|
|
if (rowIndex === 0) { |
|
|
|
return [this.weatherNum.length, 1]; |
|
|
|
} else if (rowIndex <= this.weatherNum.length) { |
|
|
@ -258,27 +417,25 @@ export default { |
|
|
|
// else if (rowIndex === 8) { |
|
|
|
// return [0, 0]; |
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
// this.weatherNum = 0 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
getSelectTollStation(data) { |
|
|
|
let startTime = "" |
|
|
|
let endTime = "" |
|
|
|
let startTime = ""; |
|
|
|
let endTime = ""; |
|
|
|
if (data) { |
|
|
|
startTime = data.date[0] + ' 00:00:00' |
|
|
|
endTime = data.date[1] + ' 23:59:59' |
|
|
|
startTime = data.date[0] + " 00:00:00"; |
|
|
|
endTime = data.date[1] + " 23:59:59"; |
|
|
|
} else { |
|
|
|
startTime = new Date("2024-01-01 11:12:21") |
|
|
|
startTime = new Date("2024-01-26 11:12:36") |
|
|
|
startTime = new Date("2024-01-01 11:12:21"); |
|
|
|
startTime = new Date("2024-01-26 11:12:36"); |
|
|
|
} |
|
|
|
|
|
|
|
var formData = new FormData(); |
|
|
|
this.searchType = data.searchType |
|
|
|
this.searchType = data.searchType; |
|
|
|
this.controlType = data.controlType; |
|
|
|
if (data.searchType == 1) { |
|
|
|
formData.append("facilityId", data.facilityId); |
|
|
|
} else { |
|
|
@ -287,38 +444,36 @@ export default { |
|
|
|
formData.append("searchType", data.searchType); |
|
|
|
formData.append("startTime", startTime); |
|
|
|
formData.append("endTime", endTime); |
|
|
|
let weatherData = [] |
|
|
|
let otherData = [] |
|
|
|
let weatherData = []; |
|
|
|
let otherData = []; |
|
|
|
selectTollStation(formData).then((res) => { |
|
|
|
if (data.searchType == 2) { |
|
|
|
this.weatherNum = [] |
|
|
|
res.data.forEach(item => { |
|
|
|
this.weatherNum = []; |
|
|
|
res.data.forEach((item) => { |
|
|
|
if (item.causeTypeName) { |
|
|
|
this.weatherNum.push(item.causeTypeName) |
|
|
|
weatherData.push(item) |
|
|
|
this.weatherNum.push(item.causeTypeName); |
|
|
|
weatherData.push(item); |
|
|
|
} else { |
|
|
|
otherData.push(item) |
|
|
|
otherData.push(item); |
|
|
|
} |
|
|
|
}); |
|
|
|
this.tableData = weatherData.concat(otherData) |
|
|
|
this.tableData = weatherData.concat(otherData); |
|
|
|
} else { |
|
|
|
res.data.forEach((item) => { |
|
|
|
item.total = item.facilityClose + item.facilityRestriction + item.facilityInterval |
|
|
|
}) |
|
|
|
this.facilityTableData = res.data |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
item.total = |
|
|
|
item.facilityClose + |
|
|
|
item.facilityRestriction + |
|
|
|
item.facilityInterval; |
|
|
|
}); |
|
|
|
this.facilityTableData = res.data; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getFacilityList() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
this.getFacilityList(); |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
@ -332,12 +487,11 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .is-scrolling-none { |
|
|
|
background: #0B6581; |
|
|
|
|
|
|
|
background: #0b6581; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table__empty-text { |
|
|
|
color: #3AE0F8; |
|
|
|
color: #3ae0f8; |
|
|
|
} |
|
|
|
|
|
|
|
.StatsDetail { |
|
|
@ -349,40 +503,44 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.el-table { |
|
|
|
border: 1px solid #07AEC6; |
|
|
|
background: #0B6581; |
|
|
|
border: 1px solid #07aec6; |
|
|
|
background: #0b6581; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table .el-table__header-wrapper th, |
|
|
|
.el-table .el-table__fixed-header-wrapper th { |
|
|
|
background: #0B6581; |
|
|
|
border: 1px solid #07AEC6; |
|
|
|
background: #0b6581; |
|
|
|
border: 1px solid #07aec6; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table th.el-table__cell > .cell { |
|
|
|
color: #3DE8FF; |
|
|
|
color: #3de8ff; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table thead.is-group th.el-table__cell { |
|
|
|
background: #0B6581; |
|
|
|
border: 1px solid #07AEC6; |
|
|
|
background: #0b6581; |
|
|
|
border: 1px solid #07aec6; |
|
|
|
} |
|
|
|
|
|
|
|
// ::v-deep .el-table th.el-table__cell.is-leaf, |
|
|
|
::v-deep .el-table td.el-table__cell { |
|
|
|
border: 1px solid #07AEC6; |
|
|
|
background: #1B586D; |
|
|
|
border: 1px solid #07aec6; |
|
|
|
background: #1b586d; |
|
|
|
color: #fff; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table tr { |
|
|
|
border: 1px solid #07AEC6; |
|
|
|
background-color: #0B6581; |
|
|
|
border: 1px solid #07aec6; |
|
|
|
background-color: #0b6581; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell { |
|
|
|
background: #1B586D; |
|
|
|
border: 1px solid #07AEC6; |
|
|
|
::v-deep |
|
|
|
.el-table--enable-row-hover |
|
|
|
.el-table__body |
|
|
|
tr:hover |
|
|
|
> td.el-table__cell { |
|
|
|
background: #1b586d; |
|
|
|
border: 1px solid #07aec6; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-table::before, |
|
|
|