|
|
@ -1,35 +1,87 @@ |
|
|
|
<template> |
|
|
|
<div class="congestion"> |
|
|
|
<div class="board"> |
|
|
|
<ProgressBar class="keep-ratio" @selectItem="selectProgress" :dataList="dataList" :selectIndex="selectIndex" |
|
|
|
:reset="reset" /> |
|
|
|
<ProgressBar |
|
|
|
class="keep-ratio" |
|
|
|
@selectItem="selectProgress" |
|
|
|
:dataList="dataList" |
|
|
|
:selectIndex="selectIndex" |
|
|
|
:reset="reset" |
|
|
|
/> |
|
|
|
<div class="searchPanel"> |
|
|
|
<RadioGroup :options="[ |
|
|
|
<RadioGroup |
|
|
|
:options="[ |
|
|
|
{ key: '1', label: '菏泽' }, |
|
|
|
{ key: '3', label: '济南' }, |
|
|
|
]" v-model="direction" type="button" /> |
|
|
|
<el-select v-model="type" size="mini" class="selectRoad" placeholder="请选择" @change="changeType"> |
|
|
|
<el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"> |
|
|
|
]" |
|
|
|
v-model="direction" |
|
|
|
type="button" |
|
|
|
/> |
|
|
|
<el-select |
|
|
|
v-model="type" |
|
|
|
size="mini" |
|
|
|
class="selectRoad" |
|
|
|
placeholder="请选择" |
|
|
|
@change="changeType" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in typeOptions" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-model="quarter" size="medium" v-if="type == 'quarter'" class="selectRoad-medium" placeholder="请选择"> |
|
|
|
<el-option v-for="item in quarterOptions" :key="item.value" :label="item.label" :value="item.value" |
|
|
|
style="width: 140px"> |
|
|
|
<el-select |
|
|
|
v-model="quarter" |
|
|
|
size="medium" |
|
|
|
v-if="type == 'quarter'" |
|
|
|
class="selectRoad-medium" |
|
|
|
placeholder="请选择" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in quarterOptions" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
style="width: 140px" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-date-picker size="mini" v-if="type != 'quarter'" class="selectRoad" v-model="dateTime" style="width: 140px" |
|
|
|
:type="type == 'date' |
|
|
|
<el-date-picker |
|
|
|
size="mini" |
|
|
|
v-if="type != 'quarter'" |
|
|
|
class="selectRoad" |
|
|
|
v-model="dateTime" |
|
|
|
style="width: 140px" |
|
|
|
:type=" |
|
|
|
type == 'date' |
|
|
|
? 'date' |
|
|
|
: type == 'month' |
|
|
|
? 'month' |
|
|
|
: type == 'year' |
|
|
|
? 'year' |
|
|
|
: '' |
|
|
|
" placeholder="请选择" :clearable="false" /> |
|
|
|
|
|
|
|
<el-button type="primary" size="mini" class="btnSearch" @click="searchQuery" |
|
|
|
icon="el-icon-search">查询</el-button> |
|
|
|
<el-button class="btnReset" size="mini" icon="el-icon-refresh-left" @click="onReset">重置</el-button> |
|
|
|
" |
|
|
|
placeholder="请选择" |
|
|
|
:clearable="false" |
|
|
|
/> |
|
|
|
|
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
class="btnSearch" |
|
|
|
@click="searchQuery" |
|
|
|
icon="el-icon-search" |
|
|
|
>查询</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
class="btnReset" |
|
|
|
size="mini" |
|
|
|
icon="el-icon-refresh-left" |
|
|
|
@click="onReset" |
|
|
|
>重置</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -43,14 +95,28 @@ |
|
|
|
|
|
|
|
<div> |
|
|
|
<WgtTitle :title="'感知事件类型分析'"></WgtTitle> |
|
|
|
<Empty v-show="!chart2List || chart2List.length <= 0" text="暂无数据..."></Empty> |
|
|
|
<div v-show="chart2List || chart2List.length > 0" id="chart2" class="btnChart" /> |
|
|
|
<Empty |
|
|
|
v-show="!chart2List || chart2List.length <= 0" |
|
|
|
text="暂无数据..." |
|
|
|
></Empty> |
|
|
|
<div |
|
|
|
v-show="chart2List || chart2List.length > 0" |
|
|
|
id="chart2" |
|
|
|
class="btnChart" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div> |
|
|
|
<WgtTitle :title="'桩号范围内事件分析趋势'"></WgtTitle> |
|
|
|
<Empty v-show="!chart3List || chart3List.length <= 0" text="暂无数据..."></Empty> |
|
|
|
<div v-show="chart3List || chart3List.length > 0" id="chart3" class="btnChart" /> |
|
|
|
<Empty |
|
|
|
v-show="!chart3List || chart3List.length <= 0" |
|
|
|
text="暂无数据..." |
|
|
|
></Empty> |
|
|
|
<div |
|
|
|
v-show="chart3List || chart3List.length > 0" |
|
|
|
id="chart3" |
|
|
|
class="btnChart" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -65,7 +131,7 @@ import chart1 from "./assets/charts"; |
|
|
|
import chart2 from "./assets/charts2"; |
|
|
|
import chart3 from "./assets/charts3"; |
|
|
|
import ElQuarterPicker from "./ElQuarterPicker"; |
|
|
|
import moment from 'moment'; |
|
|
|
import moment from "moment"; |
|
|
|
import { |
|
|
|
getWarningTrend, |
|
|
|
getWarningSectionType, |
|
|
@ -204,7 +270,7 @@ export default { |
|
|
|
], |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { }, |
|
|
|
created() {}, |
|
|
|
methods: { |
|
|
|
selectProgress(item, index) { |
|
|
|
this.selectIndex = index; |
|
|
@ -255,18 +321,19 @@ export default { |
|
|
|
chart1.series[0].data = []; |
|
|
|
chart1.xAxis.data = []; |
|
|
|
|
|
|
|
|
|
|
|
//月份的单独处理 |
|
|
|
if (this.type == "month") { |
|
|
|
let daysInMonth = moment(this.dateTime, "YYYY-MM").daysInMonth(); |
|
|
|
let sData = {}; |
|
|
|
data.forEach(it => sData[parseInt(it.day.slice(-2))] = it.number) |
|
|
|
let pData = [] |
|
|
|
data.forEach( |
|
|
|
(it) => (sData[parseInt(it.day.slice(-2))] = it.number) |
|
|
|
); |
|
|
|
let pData = []; |
|
|
|
for (let index = 1; index <= daysInMonth; index++) { |
|
|
|
pData.push({ |
|
|
|
day: index, |
|
|
|
number: sData[index] || 0 |
|
|
|
}) |
|
|
|
number: sData[index] || 0, |
|
|
|
}); |
|
|
|
} |
|
|
|
data = pData; |
|
|
|
} |
|
|
@ -278,15 +345,15 @@ export default { |
|
|
|
3: [7, 8, 9], |
|
|
|
4: [10, 11, 12], |
|
|
|
}; |
|
|
|
let sData = {} |
|
|
|
data.forEach(it => sData[it.month] = it.number); |
|
|
|
let pData = [] |
|
|
|
let sData = {}; |
|
|
|
data.forEach((it) => (sData[it.month] = it.number)); |
|
|
|
let pData = []; |
|
|
|
for (let index = 0; index < 3; index++) { |
|
|
|
let month = quarterMap[this.quarter][index]; |
|
|
|
pData.push({ |
|
|
|
month: month, |
|
|
|
number: sData[month] || 0 |
|
|
|
}) |
|
|
|
number: sData[month] || 0, |
|
|
|
}); |
|
|
|
} |
|
|
|
data = pData; |
|
|
|
} |
|
|
@ -515,11 +582,11 @@ export default { |
|
|
|
// this.type = "date"; |
|
|
|
}, |
|
|
|
changeType() { |
|
|
|
if (this.type == 'date') { |
|
|
|
this.dateTime = moment(new Date()).format("YYYY-MM-DD") |
|
|
|
} |
|
|
|
if (this.type == "date") { |
|
|
|
this.dateTime = moment(new Date()).format("YYYY-MM-DD"); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
setTimeout(() => { |
|
|
|
this.$nextTick(() => { |
|
|
@ -569,28 +636,28 @@ export default { |
|
|
|
|
|
|
|
// 填充渐变颜色 |
|
|
|
// 颜色断点 |
|
|
|
// var gr = context.createLinearGradient(247, 63, 450, 0); |
|
|
|
// gr.addColorStop(1, 'rgba(92,197,255,0)'); |
|
|
|
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); |
|
|
|
// drawRoundRect(context, 267, 57, 140, 24, 12, gr) |
|
|
|
var gr = context.createLinearGradient(247, 63, 450, 0); |
|
|
|
gr.addColorStop(1, "rgba(92,197,255,0)"); |
|
|
|
gr.addColorStop(0, "rgba(92,197,255,0.5)"); |
|
|
|
drawRoundRect(context, 357, 98, 140, 24, 12, gr); |
|
|
|
|
|
|
|
// // 颜色断点 |
|
|
|
// var gr = context.createLinearGradient(247, 63, 450, 0); |
|
|
|
// gr.addColorStop(1, 'rgba(92,197,255,0)'); |
|
|
|
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); |
|
|
|
// drawRoundRect(context, 267, 108, 140, 24, 12, gr) |
|
|
|
var gr = context.createLinearGradient(247, 63, 450, 0); |
|
|
|
gr.addColorStop(1, "rgba(92,197,255,0)"); |
|
|
|
gr.addColorStop(0, "rgba(92,197,255,0.5)"); |
|
|
|
drawRoundRect(context, 357, 130, 140, 24, 12, gr); |
|
|
|
|
|
|
|
// // 颜色断点 |
|
|
|
// var gr = context.createLinearGradient(240, 63, 450, 0); |
|
|
|
// gr.addColorStop(1, 'rgba(92,197,255,0)'); |
|
|
|
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); |
|
|
|
// drawRoundRect(context, 267, 157, 140, 24, 12, gr) |
|
|
|
var gr = context.createLinearGradient(240, 63, 450, 0); |
|
|
|
gr.addColorStop(1, "rgba(92,197,255,0)"); |
|
|
|
gr.addColorStop(0, "rgba(92,197,255,0.5)"); |
|
|
|
drawRoundRect(context, 357, 162, 140, 24, 12, gr); |
|
|
|
|
|
|
|
// // 颜色断点 |
|
|
|
// var gr = context.createLinearGradient(240, 63, 450, 0); |
|
|
|
// gr.addColorStop(1, 'rgba(92,197,255,0)'); |
|
|
|
// gr.addColorStop(0, 'rgba(92,197,255,0.5)'); |
|
|
|
// drawRoundRect(context, 267, 208, 140, 24, 12, gr) |
|
|
|
var gr = context.createLinearGradient(240, 63, 450, 0); |
|
|
|
gr.addColorStop(1, "rgba(92,197,255,0)"); |
|
|
|
gr.addColorStop(0, "rgba(92,197,255,0.5)"); |
|
|
|
drawRoundRect(context, 357, 194, 140, 24, 12, gr); |
|
|
|
|
|
|
|
// // 颜色断点 |
|
|
|
// var gr = context.createLinearGradient(240, 63, 450, 0); |
|
|
@ -638,16 +705,21 @@ export default { |
|
|
|
justify-content: space-evenly; |
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
>div { |
|
|
|
> div { |
|
|
|
width: 33%; |
|
|
|
height: 470px; |
|
|
|
background: linear-gradient(180deg, |
|
|
|
background: linear-gradient( |
|
|
|
180deg, |
|
|
|
rgba(6, 66, 88, 0.2) 0%, |
|
|
|
#064258 100%); |
|
|
|
#064258 100% |
|
|
|
); |
|
|
|
border: 1px solid; |
|
|
|
border-image: linear-gradient(360deg, |
|
|
|
border-image: linear-gradient( |
|
|
|
360deg, |
|
|
|
rgba(55, 231, 255, 0.3), |
|
|
|
rgba(55, 231, 255, 0)) 1 1; |
|
|
|
rgba(55, 231, 255, 0) |
|
|
|
) |
|
|
|
1 1; |
|
|
|
} |
|
|
|
|
|
|
|
:nth-child(1) { |
|
|
@ -763,12 +835,54 @@ export default { |
|
|
|
</style> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today span, |
|
|
|
div.el-popover:has(> .el-date-picker) div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell, |
|
|
|
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span, |
|
|
|
div.el-picker-panel.el-date-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell, |
|
|
|
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today span, |
|
|
|
div.el-picker-panel.el-date-range-picker.el-popper div .el-picker-panel__body .el-picker-panel__content table tr td.today .cell { |
|
|
|
div.el-popover:has(> .el-date-picker) |
|
|
|
div |
|
|
|
.el-picker-panel__body |
|
|
|
.el-picker-panel__content |
|
|
|
table |
|
|
|
tr |
|
|
|
td.today |
|
|
|
span, |
|
|
|
div.el-popover:has(> .el-date-picker) |
|
|
|
div |
|
|
|
.el-picker-panel__body |
|
|
|
.el-picker-panel__content |
|
|
|
table |
|
|
|
tr |
|
|
|
td.today |
|
|
|
.cell, |
|
|
|
div.el-picker-panel.el-date-picker.el-popper |
|
|
|
div |
|
|
|
.el-picker-panel__body |
|
|
|
.el-picker-panel__content |
|
|
|
table |
|
|
|
tr |
|
|
|
td.today |
|
|
|
span, |
|
|
|
div.el-picker-panel.el-date-picker.el-popper |
|
|
|
div |
|
|
|
.el-picker-panel__body |
|
|
|
.el-picker-panel__content |
|
|
|
table |
|
|
|
tr |
|
|
|
td.today |
|
|
|
.cell, |
|
|
|
div.el-picker-panel.el-date-range-picker.el-popper |
|
|
|
div |
|
|
|
.el-picker-panel__body |
|
|
|
.el-picker-panel__content |
|
|
|
table |
|
|
|
tr |
|
|
|
td.today |
|
|
|
span, |
|
|
|
div.el-picker-panel.el-date-range-picker.el-popper |
|
|
|
div |
|
|
|
.el-picker-panel__body |
|
|
|
.el-picker-panel__content |
|
|
|
table |
|
|
|
tr |
|
|
|
td.today |
|
|
|
.cell { |
|
|
|
color: #fff; |
|
|
|
} |
|
|
|
</style> |
|
|
|