50 changed files with 2758 additions and 877 deletions
@ -0,0 +1,61 @@ |
|||||
|
import request from "@/utils/request"; |
||||
|
|
||||
|
// 发布渠道列表
|
||||
|
export function getChannelsList(pageNum, pageSize, data) { |
||||
|
return request({ |
||||
|
url: `/business/channels/list?pageNum=${pageNum}&pageSize=${pageSize}`, |
||||
|
method: "post", |
||||
|
data, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 导出发布渠道列表
|
||||
|
export function getChannelsExport() { |
||||
|
return request({ |
||||
|
url: "/business/channels/export", |
||||
|
method: "post", |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 获取发布渠道详情
|
||||
|
export function getChannels(id) { |
||||
|
return request({ |
||||
|
url: "/business/channels/" + id, |
||||
|
method: "get", |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 新增发布渠道
|
||||
|
export function addChannels(data) { |
||||
|
return request({ |
||||
|
url: "/business/channels", |
||||
|
method: "post", |
||||
|
data, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 修改发布渠道
|
||||
|
export function editChannels(data) { |
||||
|
return request({ |
||||
|
url: "/business/channels", |
||||
|
method: "put", |
||||
|
data, |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 删除发布渠道
|
||||
|
export function delChannels(id) { |
||||
|
return request({ |
||||
|
url: "/business/channels/" + id, |
||||
|
method: "delete", |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 发布渠道修改状态
|
||||
|
export function updateEnabledChannels(data) { |
||||
|
return request({ |
||||
|
url: "business/channels/updateEnabled", |
||||
|
method: "post", |
||||
|
data, |
||||
|
}); |
||||
|
} |
||||
@ -0,0 +1,36 @@ |
|||||
|
<template> |
||||
|
<div ref="ele" class="comp_box"> |
||||
|
<slot></slot> |
||||
|
<ul class="sub_menu"> |
||||
|
<li>菜单一</li> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default{ |
||||
|
name:"ContextMenu", |
||||
|
data(){ |
||||
|
return { |
||||
|
} |
||||
|
}, |
||||
|
computed:{ |
||||
|
}, |
||||
|
watch:{ |
||||
|
}, |
||||
|
mounted(){ |
||||
|
this.$refs["ele"].addEventListener("contextmenu", this.showMenu) |
||||
|
}, |
||||
|
methods:{ |
||||
|
showMenu(e){ |
||||
|
e.preventDefault(); |
||||
|
e.stopPropagation(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.comp_box{ |
||||
|
position: relative; border: 1px solid #f00; |
||||
|
.sub_menu{ position: absolute; z-index: 9999;border: 1px solid #0f0; left: 0; top:0; } |
||||
|
} |
||||
|
</style> |
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1,184 @@ |
|||||
|
<template> |
||||
|
<Dialog v-model="modelVisible" :title="title" width="910px"> |
||||
|
<div class="DeviceControlDialog"> |
||||
|
<div class="headSearch"> |
||||
|
<p>时间范围:</p> |
||||
|
<el-radio-group v-model="radio1" @input="onChangeRadio"> |
||||
|
<el-radio-button label="1">日</el-radio-button> |
||||
|
<el-radio-button label="2">月度</el-radio-button> |
||||
|
<el-radio-button label="3">年度</el-radio-button> |
||||
|
</el-radio-group> |
||||
|
<el-date-picker style="width:140px;" v-model="time" :type="pickerType" placeholder="请选择" :format="valueFormat" |
||||
|
value-format="yyyy-MM-dd" :clearable="false" @change="initData"> |
||||
|
</el-date-picker> |
||||
|
</div> |
||||
|
<div v-if="chartVisible" class='chart LineChart' ref="LineChartRef" /> |
||||
|
</div> |
||||
|
</Dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import * as echarts from "echarts"; |
||||
|
import { lineChartOption } from "./chart" |
||||
|
import Dialog from "@screen/components/Dialog/index.vue"; |
||||
|
import request from "@/utils/request"; |
||||
|
import { throttle } from "lodash" |
||||
|
import { Message } from "element-ui"; |
||||
|
|
||||
|
export default { |
||||
|
name: "DeviceControlDialog", |
||||
|
components: { |
||||
|
Dialog, |
||||
|
}, |
||||
|
model: { |
||||
|
prop: "visible", |
||||
|
event: "update:value", |
||||
|
}, |
||||
|
props: { |
||||
|
visible: Boolean, |
||||
|
deviceName: String, |
||||
|
btnType: Number, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
submitting: false, |
||||
|
chartVisible: true, |
||||
|
title: '气温变化趋势', |
||||
|
pickerType: 'date', |
||||
|
valueFormat: 'yyyy-MM-dd', |
||||
|
radio1: '1', |
||||
|
time: '' |
||||
|
}; |
||||
|
}, |
||||
|
computed: { |
||||
|
modelVisible: { |
||||
|
get() { |
||||
|
return this.visible; |
||||
|
}, |
||||
|
set(val) { |
||||
|
this.$emit("update:value", val); |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
watch: { |
||||
|
visible: { |
||||
|
immediate: true, |
||||
|
handler(bool) { |
||||
|
if (bool) { |
||||
|
if (this.btnType == 1) { |
||||
|
this.title = '气温变化趋势' |
||||
|
} else { |
||||
|
this.title = '能见度变化趋势' |
||||
|
} |
||||
|
this.initData(); |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.time = new Date().format('yyyy-MM-dd') |
||||
|
}, |
||||
|
methods: { |
||||
|
async initData() { |
||||
|
console.log('ll', this.radio1, this.time) |
||||
|
|
||||
|
let lastPath = 'deviceHour' |
||||
|
if (this.pickerType == 'date') { |
||||
|
lastPath = 'deviceHour' |
||||
|
} else if (this.pickerType == 'month') { |
||||
|
lastPath = 'deviceDay' |
||||
|
} else if (this.pickerType == 'year') { |
||||
|
lastPath = 'deviceYears' |
||||
|
} |
||||
|
|
||||
|
let qsData = await request({ |
||||
|
url: `/dc/system/meteorologicalDetector/${lastPath}?deviceName=${this.deviceName}&specificDate=${this.time}`, |
||||
|
method: "get", |
||||
|
}) |
||||
|
if (qsData.code !== 200) { |
||||
|
return Message.error('查询气象变化趋势数据失败'); |
||||
|
} |
||||
|
let times = [], datas = []; |
||||
|
qsData.rows.forEach(item => { |
||||
|
if (lastPath == 'deviceHour') { |
||||
|
times.push(item.timeSlot); |
||||
|
} else if (lastPath == 'deviceDay') { |
||||
|
times.push(new Date(item.date).format('dd')); |
||||
|
} else if (lastPath == 'deviceYears') { |
||||
|
times.push(new Date(item.month).format('MM')); |
||||
|
} |
||||
|
|
||||
|
datas.push(this.btnType == 1 ? item.avgTemperature : item.avgVisibility) |
||||
|
}) |
||||
|
// console.log('datas',datas) |
||||
|
|
||||
|
if (lastPath == 'deviceHour') { |
||||
|
lineChartOption.xAxis.name = '时' |
||||
|
} else if (lastPath == 'deviceDay') { |
||||
|
lineChartOption.xAxis.name = '日' |
||||
|
} else if (lastPath == 'deviceYears') { |
||||
|
lineChartOption.xAxis.name = '月' |
||||
|
} |
||||
|
lineChartOption.xAxis.data = times; |
||||
|
lineChartOption.yAxis.name = this.btnType == 1 ? '℃' : '米'; |
||||
|
lineChartOption.series[0].name = this.btnType == 1 ? '温度(℃)' : '能见度(米)' |
||||
|
lineChartOption.series[0].data = datas; |
||||
|
|
||||
|
const chartIns = echarts.init(this.$refs.LineChartRef); |
||||
|
chartIns.setOption(lineChartOption); |
||||
|
}, |
||||
|
async handleSubmit() { |
||||
|
this.$refs.DeviceParam?.handleSubmit(); |
||||
|
}, |
||||
|
onChangeRadio(value) { |
||||
|
this.time = ''; |
||||
|
if (value == '1') { |
||||
|
this.pickerType = 'date' |
||||
|
this.valueFormat = 'yyyy-MM-dd' |
||||
|
} else if (value == '2') { |
||||
|
this.pickerType = 'month' |
||||
|
this.valueFormat = 'yyyy-MM' |
||||
|
} else if (value == '3') { |
||||
|
this.pickerType = 'year' |
||||
|
this.valueFormat = 'yyyy' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.DeviceControlDialog { |
||||
|
width: 860px; |
||||
|
max-height: 78vh; |
||||
|
height: 410px; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
gap: 15px; |
||||
|
|
||||
|
.headSearch { |
||||
|
display: flex; |
||||
|
|
||||
|
p { |
||||
|
margin-right: 10px; |
||||
|
} |
||||
|
|
||||
|
::v-deep { |
||||
|
.el-input__prefix { |
||||
|
top: -5px |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.tips { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
|
||||
|
.LineChart { |
||||
|
flex: 1; |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,114 @@ |
|||||
|
import * as echarts from "echarts"; |
||||
|
|
||||
|
export const lineChartOption = { |
||||
|
color: ["#2AD9FD"], |
||||
|
xAxis: { |
||||
|
name: "时", |
||||
|
type: "category", |
||||
|
// boundaryGap: ["15%", "15%"],
|
||||
|
nameTextStyle: { |
||||
|
color: "#2AD9FD", |
||||
|
align: "right", |
||||
|
fontSize: 15, |
||||
|
padding: [0, -15, 0, 0], |
||||
|
}, |
||||
|
boundaryGap: false, |
||||
|
data: ['00:00','02:00','04:00','06:00'], |
||||
|
axisTick: { |
||||
|
show: false, |
||||
|
}, |
||||
|
axisLabel: { |
||||
|
color: "#fff", |
||||
|
fontSize: 12, |
||||
|
}, |
||||
|
axisLine: { |
||||
|
lineStyle: { |
||||
|
color: "#668598", |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
yAxis: { |
||||
|
name: "辆", |
||||
|
type: "value", |
||||
|
nameTextStyle: { |
||||
|
color: "#2AD9FD", |
||||
|
// align: "right",
|
||||
|
fontSize: 15, |
||||
|
// padding: [0, -15, 0, 0],
|
||||
|
}, |
||||
|
// nameGap: 24,
|
||||
|
splitLine: { |
||||
|
lineStyle: { |
||||
|
type: [6, 9], |
||||
|
color: "rgba(255,255,255, .3)", |
||||
|
// dashOffset: [10, 10],
|
||||
|
// cap: 21,
|
||||
|
// width: 2
|
||||
|
}, |
||||
|
}, |
||||
|
axisLabel: { |
||||
|
color: "#fff", |
||||
|
fontSize: 12, |
||||
|
formatter: "{value}", |
||||
|
}, |
||||
|
}, |
||||
|
grid: { |
||||
|
left: 33, |
||||
|
top: 33, |
||||
|
bottom: 24, |
||||
|
right: 36, |
||||
|
}, |
||||
|
tooltip: { |
||||
|
trigger: "axis", |
||||
|
backgroundColor: "rgba(0,0,0,0.36)", |
||||
|
borderWidth: 0, |
||||
|
textStyle: { |
||||
|
color: "#fff", |
||||
|
}, |
||||
|
formatter: "{b}:{c}", |
||||
|
// formatter: function([axisData]) {
|
||||
|
// console.log(axisData)
|
||||
|
// let str = axisData.name + ' ' + axisData.data + '辆</br>';
|
||||
|
// // params.forEach(item => {
|
||||
|
// // if (item.seriesName === '供温' || item.seriesName === '回温') {
|
||||
|
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' ℃' + '</br>';
|
||||
|
// // } else if (item.seriesName === '压力值(Mpa)') {
|
||||
|
// // // 柱状图渐变时设置marker
|
||||
|
// // item.marker = '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:#6C50F3;"></span>';
|
||||
|
// // str += item.marker + item.seriesName + ' : ' + item.data.value + ' m';
|
||||
|
// // }
|
||||
|
// // });
|
||||
|
// return str;
|
||||
|
// }
|
||||
|
}, |
||||
|
legend: { |
||||
|
textStyle: { |
||||
|
color: '#2AD9FD' |
||||
|
} |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
data: [1,2,3,4], |
||||
|
type: "line", |
||||
|
showSymbol: false, |
||||
|
smooth: true, |
||||
|
name: '温度(℃)', |
||||
|
lineStyle: { |
||||
|
color: "#2AD9FD", |
||||
|
}, |
||||
|
areaStyle: { |
||||
|
opacity: 0.8, |
||||
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
||||
|
{ |
||||
|
offset: 0, |
||||
|
color: "rgb(90, 227, 255, .9)", |
||||
|
}, |
||||
|
{ |
||||
|
offset: 1, |
||||
|
color: "rgba(42,217,253,0)", |
||||
|
}, |
||||
|
]), |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
@ -0,0 +1,218 @@ |
|||||
|
<template> |
||||
|
<Dialog v-model="obverseVisible" title="气象设备" width="470px"> |
||||
|
<div class="MeteorologicalDetection"> |
||||
|
<Video class="video-stream" :pileNum="dialogData.stakeMark" /> |
||||
|
<ElTabs v-model="activeName" @tab-click="handleClickTabs" class="tabs"> |
||||
|
<ElTabPane label="基本信息" name="first"> |
||||
|
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" /> |
||||
|
</ElTabPane> |
||||
|
<ElTabPane label="气象情况" name="second"> |
||||
|
<Descriptions labelWidth="104px" :list="weatherList" :data="weatherData" style="gap: 14px" /> |
||||
|
</ElTabPane> |
||||
|
</ElTabs> |
||||
|
</div> |
||||
|
|
||||
|
<template #footer> |
||||
|
<Button @click.native="deviceControlVisible = true; btnType = 1">气温变化趋势</Button> |
||||
|
<Button @click.native="deviceControlVisible = true; btnType = 2">能见度变化趋势</Button> |
||||
|
</template> |
||||
|
|
||||
|
<!-- 设备操作弹窗 --> |
||||
|
<DeviceControlDialog v-model="deviceControlVisible" :deviceName="dialogData.deviceName" :btnType="btnType" /> |
||||
|
|
||||
|
</Dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Dialog from "@screen/components/Dialog/index.vue"; |
||||
|
import Descriptions from "@screen/components/Descriptions.vue"; |
||||
|
import Button from "@screen/components/Buttons/Button.vue"; |
||||
|
import { |
||||
|
getRoadInfoByStakeMark, |
||||
|
getProduct, |
||||
|
getMeteorologicalDetector |
||||
|
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; |
||||
|
import Video from "@screen/components/Video"; |
||||
|
import DeviceControlDialog from "./components/DeviceControlDialog.vue"; |
||||
|
|
||||
|
import request from "@/utils/request"; |
||||
|
import { dialogDelayVisible } from "./../mixin"; |
||||
|
import LineChart from "../../LineChart/index.vue"; |
||||
|
|
||||
|
// 疲劳唤醒弹窗 |
||||
|
export default { |
||||
|
name: "MeteorologicalDetection", |
||||
|
mixins: [dialogDelayVisible], |
||||
|
components: { |
||||
|
Dialog, |
||||
|
Descriptions, |
||||
|
Video, |
||||
|
DeviceControlDialog, |
||||
|
Button, |
||||
|
LineChart, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
activeName: "first", |
||||
|
deviceControlVisible: false, |
||||
|
data: { |
||||
|
deviceType: "行车诱导", |
||||
|
deviceStation: "k094+079", |
||||
|
roadName: "G35济泽高速", |
||||
|
direction: "1", |
||||
|
deviceState: "0", |
||||
|
deviceVendors: "XXX厂家", |
||||
|
}, |
||||
|
btnType: 1, |
||||
|
weatherData: {}, |
||||
|
list: [ |
||||
|
{ |
||||
|
label: "设备名称", |
||||
|
key: "deviceName", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备桩号", |
||||
|
key: "stakeMark", |
||||
|
}, |
||||
|
{ |
||||
|
label: "道路名称", |
||||
|
key: "roadName", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备方向", |
||||
|
key: "direction", |
||||
|
enum: "CameraDirectionEnum", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备状态", |
||||
|
key: "deviceState", |
||||
|
enum: "DeviceTypeEnum", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备厂商", |
||||
|
key: "manufacturer", |
||||
|
}, |
||||
|
], |
||||
|
weatherList: [ |
||||
|
{ |
||||
|
label: "路面状态", |
||||
|
key: "remoteRoadSurfaceStatus", |
||||
|
enum: "remoteRoadSurfaceStatus", |
||||
|
}, |
||||
|
{ |
||||
|
label: "路表温度(℃)", |
||||
|
key: "remoteRoadSurfaceTemperature", |
||||
|
}, |
||||
|
{ |
||||
|
label: "下雨类型", |
||||
|
key: "precipitationType", |
||||
|
enum: "precipitationType", |
||||
|
}, |
||||
|
{ |
||||
|
label: "雨量(mm)", |
||||
|
key: "rainfall", |
||||
|
}, |
||||
|
{ |
||||
|
label: "能见度类型", |
||||
|
key: "visibilityType", |
||||
|
enum: "visibilityType", |
||||
|
}, |
||||
|
{ |
||||
|
label: "能见度(km)", |
||||
|
key: "visibility", |
||||
|
}, |
||||
|
{ |
||||
|
label: "温度(℃)", |
||||
|
key: "temperature", |
||||
|
}, |
||||
|
{ |
||||
|
label: "湿度", |
||||
|
key: "humidity", |
||||
|
}, |
||||
|
{ |
||||
|
label: "风向", |
||||
|
key: "windDirection", |
||||
|
}, |
||||
|
{ |
||||
|
label: "风速(m/s)", |
||||
|
key: "windSpeed", |
||||
|
}, |
||||
|
{ |
||||
|
label: "水膜厚度(mm)", |
||||
|
key: "waterFilmlceSnowValue", |
||||
|
}, |
||||
|
{ |
||||
|
label: "大气压力(hPa)", |
||||
|
key: "atmosphericPressure", |
||||
|
}, |
||||
|
{ |
||||
|
label: "时间", |
||||
|
key: "createTime", |
||||
|
gridColumn: 2, |
||||
|
}, |
||||
|
] |
||||
|
}; |
||||
|
}, |
||||
|
async created() { |
||||
|
this.data = { ...this.dialogData }; |
||||
|
|
||||
|
getProduct(this.dialogData.productId).then((data) => { |
||||
|
this.dialogData.brand = data.brand; |
||||
|
}); |
||||
|
|
||||
|
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); |
||||
|
|
||||
|
if (roadInfo) this.$set(this.data, "roadName", roadInfo.roadName); |
||||
|
|
||||
|
const weatherInfo = await getMeteorologicalDetector(this.dialogData.deviceName) |
||||
|
this.weatherData = { ...weatherInfo } |
||||
|
}, |
||||
|
methods: { |
||||
|
handleClickTabs() { }, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.MeteorologicalDetection { |
||||
|
width: 420px; |
||||
|
color: #fff; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
gap: 12px; |
||||
|
// padding-bottom: 24px; |
||||
|
|
||||
|
.camera-video { |
||||
|
flex: 1.5; |
||||
|
} |
||||
|
|
||||
|
.tabs { |
||||
|
flex: 1; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
|
||||
|
::v-deep { |
||||
|
.el-tabs__content { |
||||
|
flex: 1; |
||||
|
|
||||
|
.el-tab-pane { |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
margin-top: 12px; |
||||
|
display: flex; |
||||
|
gap: 9px; |
||||
|
align-items: center; |
||||
|
justify-content: end; |
||||
|
|
||||
|
>div { |
||||
|
font-size: 16px; |
||||
|
padding: 6px 12px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,55 @@ |
|||||
|
<template> |
||||
|
<Dialog v-model="modelVisible" title="设备操作" width="600px"> |
||||
|
<div class="DeviceControlDialog"> |
||||
|
<DeviceParams :dialogData="dialogData" /> |
||||
|
</div> |
||||
|
</Dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Dialog from "@screen/components/Dialog/index.vue"; |
||||
|
import DeviceParams from "./DeviceParams.vue"; |
||||
|
|
||||
|
export default { |
||||
|
name: "DeviceControlDialog", |
||||
|
components: { |
||||
|
Dialog, |
||||
|
DeviceParams, |
||||
|
}, |
||||
|
model: { |
||||
|
prop: "visible", |
||||
|
event: "update:value", |
||||
|
}, |
||||
|
props: { |
||||
|
visible: Boolean, |
||||
|
dialogData: { |
||||
|
type: Object, |
||||
|
default: () => ({}), |
||||
|
}, |
||||
|
}, |
||||
|
computed: { |
||||
|
modelVisible: { |
||||
|
get() { |
||||
|
return this.visible; |
||||
|
}, |
||||
|
set(val) { |
||||
|
this.$emit("update:value", val); |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.DeviceControlDialog { |
||||
|
width: 510px; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
gap: 15px; |
||||
|
min-height: 360px; |
||||
|
|
||||
|
.tips { |
||||
|
font-size: 12px; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,199 @@ |
|||||
|
<template> |
||||
|
<div class='DeviceParams'> |
||||
|
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div> |
||||
|
<Descriptions :list="devicesList" style="gap: 18px;" column="5"> |
||||
|
<template v-for="item in devicesList.slice(0, -1)" #[`content-${getSlotKey(item.key)}`]="{ data }"> |
||||
|
<span>{{ data.text }}</span> |
||||
|
<Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state" |
||||
|
@change="(value) => handleSwitcherChange(value, data)" /> |
||||
|
<ElTag style="margin-left: 20px;" v-else effect="dark" :type="data.state ? '' : 'info'">{{ data.state ? '开' : |
||||
|
'关' }} |
||||
|
</ElTag> |
||||
|
</template> |
||||
|
</Descriptions> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Descriptions from '@screen/components/Descriptions.vue'; |
||||
|
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; |
||||
|
|
||||
|
import request from "@/utils/request"; |
||||
|
import { Message } from 'element-ui'; |
||||
|
import { confirm } from "@screen/utils/common"; |
||||
|
|
||||
|
export default { |
||||
|
name: 'DeviceParams', |
||||
|
components: { |
||||
|
Descriptions, |
||||
|
Switcher |
||||
|
}, |
||||
|
props: { |
||||
|
dialogData: { |
||||
|
type: Object, |
||||
|
default: () => ({}) |
||||
|
}, |
||||
|
disabled: Boolean |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
secondLoading: true, |
||||
|
devicesList: [], |
||||
|
activeOption: { |
||||
|
active: { |
||||
|
text: "开" |
||||
|
}, |
||||
|
unActive: { |
||||
|
text: "关" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
|
||||
|
Promise.all([this.getAc(), this.getDc()]).then(res => { |
||||
|
// if (result.code != 200) return; |
||||
|
|
||||
|
let ac = res[0].data; |
||||
|
let dc = res[1].data; |
||||
|
let deviceInfo = _.merge({}, ac, dc); |
||||
|
|
||||
|
const typeMap = { |
||||
|
ac: '220v', |
||||
|
dc: '12v', |
||||
|
} |
||||
|
for (const key in deviceInfo.formatValue) { |
||||
|
// electricity 电流 |
||||
|
// voltage 电压 |
||||
|
if (key.includes('electricity')) { |
||||
|
const args = key.match(/[a-z]+|[0-9]+$/g); |
||||
|
|
||||
|
const type = args[0], num = args.slice(-1)[0], prefix = args.slice(0, 2).join('_'); |
||||
|
// console.log(type , num , prefix , "+++=========="); //dc 2 dc_out |
||||
|
this.devicesList.push( |
||||
|
{ |
||||
|
label: `支路${num} (${typeMap[type]}) 电压`, |
||||
|
key: `${prefix}_voltage_${num}`, |
||||
|
text: deviceInfo.formatValue[`${prefix}_voltage_${num}`], |
||||
|
gridColumn: 3 |
||||
|
}, |
||||
|
{ |
||||
|
label: '电流', |
||||
|
key: `${prefix}_electricity_${num}`, |
||||
|
text: deviceInfo.formatValue[key], |
||||
|
gridColumn: 2, |
||||
|
state: deviceInfo.value[key] > 0 |
||||
|
} |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
this.devicesList.push( |
||||
|
{ |
||||
|
label: '风扇', |
||||
|
key: `fan_status`, |
||||
|
// key: `aa_electricity_1`, |
||||
|
text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-', |
||||
|
gridColumn: 2, |
||||
|
state: (deviceInfo.formatValue['fan_status'] === '0') |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
label: '温度', |
||||
|
key: `temperature`, |
||||
|
text: deviceInfo.formatValue['temperature'] ? `${deviceInfo.formatValue['temperature']} °C` : '-', |
||||
|
gridColumn: 2 |
||||
|
}, |
||||
|
{ |
||||
|
label: '箱门', |
||||
|
key: `door_status`, |
||||
|
text: { 0: '关闭', 1: '打开' }[deviceInfo.formatValue['door_status']] || '-', |
||||
|
gridColumn: 1 |
||||
|
}, |
||||
|
{ |
||||
|
label: '湿度', |
||||
|
key: `humidity`, |
||||
|
text: deviceInfo.formatValue['humidity'] ? `${deviceInfo.formatValue['humidity']} %` : '-', |
||||
|
gridColumn: 2 |
||||
|
}, |
||||
|
{ |
||||
|
label: '市电掉电', |
||||
|
key: `power_status`, |
||||
|
text: { 0: '正常', 1: '掉电' }[deviceInfo.formatValue['power_status']] || '-', |
||||
|
gridColumn: 2 |
||||
|
}, |
||||
|
) |
||||
|
// this.data = result.rows; |
||||
|
// this.total = result.total; |
||||
|
}) |
||||
|
.finally(() => { |
||||
|
this.secondLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
getAc() { |
||||
|
return request({ |
||||
|
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1ac`, |
||||
|
method: "get", |
||||
|
params: {} |
||||
|
}) |
||||
|
}, |
||||
|
getDc() { |
||||
|
return request({ |
||||
|
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1dc`, |
||||
|
method: "get", |
||||
|
params: {} |
||||
|
}) |
||||
|
}, |
||||
|
async handleSwitcherChange(value, data) { |
||||
|
let str = data.state ? "关闭" : "开启"; |
||||
|
let deviceName = ""; |
||||
|
if (data.key.includes("fan")) { |
||||
|
str += "风扇?"; |
||||
|
deviceName = "fan_out_en"; |
||||
|
} else { |
||||
|
str += "该支路?" |
||||
|
deviceName = data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en"; //dc_out_2_en ac_out_2_en; |
||||
|
} |
||||
|
data.state = value; |
||||
|
const isContinue = await confirm({ message: `${str}` }) |
||||
|
.catch(() => { |
||||
|
data.state = !value; |
||||
|
}); |
||||
|
|
||||
|
if (!isContinue) return; |
||||
|
|
||||
|
// https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc= |
||||
|
request({ |
||||
|
url: `/business/device/functions/${this.dialogData.iotDeviceId}/${102}`, |
||||
|
method: "POST", |
||||
|
data: { |
||||
|
deviceName, |
||||
|
// 开关:1=打开,0=关闭 |
||||
|
value: value ? 1 : 0 |
||||
|
} |
||||
|
}) |
||||
|
.then(result => { |
||||
|
if (result.code != 200) { |
||||
|
Message.error("操作失败"); |
||||
|
data.state = !value; |
||||
|
return; |
||||
|
}; |
||||
|
Message.success("操作成功"); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
data.state = !value; |
||||
|
Message.error("操作失败"); |
||||
|
}) |
||||
|
}, |
||||
|
getSlotKey(key) { |
||||
|
return key.includes('electricity') || key.includes('fan') ? key : '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss' scoped> |
||||
|
.DeviceParams { |
||||
|
height: 100%; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,166 @@ |
|||||
|
<template> |
||||
|
<div class='DeviceParams'> |
||||
|
<div class="no-data" v-if="!devicesList.length" v-loading="secondLoading">暂无设备参数</div> |
||||
|
<Descriptions :list="devicesList" style="gap: 18px;" column="5"> |
||||
|
<template v-for="item in devicesList" #[`content-${item.key}`]="{ data }"> |
||||
|
<span style="font-size: 15px;font-weight: 400;color: #3de8ff;">{{ data.text }}</span> |
||||
|
<Switcher v-if="!disabled" class="switcher" :activeOption="activeOption" :value="data.state" |
||||
|
@change="(value) => handleSwitcherChange(value, data)" /> |
||||
|
<ElTag style="margin-left: 20px;" v-else effect="dark" :type="data.state ? '' : 'info'">{{ data.state ? '开' : |
||||
|
'关' }} |
||||
|
</ElTag> |
||||
|
</template> |
||||
|
</Descriptions> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Descriptions from '@screen/components/Descriptions.vue'; |
||||
|
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; |
||||
|
import { cloneDeep } from 'lodash'; |
||||
|
import request from "@/utils/request"; |
||||
|
import { Message } from 'element-ui'; |
||||
|
import { confirm } from "@screen/utils/common"; |
||||
|
import { batchFunctions } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; |
||||
|
import { multiResultShow } from "@screen/utils/common"; |
||||
|
|
||||
|
export default { |
||||
|
name: 'DeviceParams', |
||||
|
components: { |
||||
|
Descriptions, |
||||
|
Switcher |
||||
|
}, |
||||
|
props: { |
||||
|
dialogData: { |
||||
|
type: Object, |
||||
|
default: () => ({}) |
||||
|
}, |
||||
|
disabled: Boolean, |
||||
|
isMultiControl: Boolean, |
||||
|
selectItems: { |
||||
|
type: Array, |
||||
|
default: () => [] |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
secondLoading: true, |
||||
|
devicesList: [ |
||||
|
{ |
||||
|
labelHidden: true, |
||||
|
text: `支路1 (220v): `, |
||||
|
key: `ac_out_1_en`, |
||||
|
// text: deviceInfo.formatValue[`${prefix}_voltage_${num}`], |
||||
|
gridColumn: 1, |
||||
|
state: 0 |
||||
|
}, |
||||
|
{ |
||||
|
labelHidden: true, |
||||
|
text: `支路2 (220v): `, |
||||
|
key: `ac_out_2_en`, |
||||
|
// text: deviceInfo.formatValue[`${prefix}_voltage_${num}`], |
||||
|
gridColumn: 1, |
||||
|
state: 0 |
||||
|
}, |
||||
|
{ |
||||
|
labelHidden: true, |
||||
|
text: `支路1 (12v): `, |
||||
|
key: `dc_out_1_en`, |
||||
|
// text: deviceInfo.formatValue[`${prefix}_voltage_${num}`], |
||||
|
gridColumn: 1, |
||||
|
state: 0 |
||||
|
}, |
||||
|
{ |
||||
|
labelHidden: true, |
||||
|
text: `支路2 (12v): `, |
||||
|
key: `dc_out_2_en`, |
||||
|
// text: deviceInfo.formatValue[`${prefix}_voltage_${num}`], |
||||
|
gridColumn: 1, |
||||
|
state: 0 |
||||
|
}, |
||||
|
{ |
||||
|
labelHidden: true, |
||||
|
text: '风扇:', |
||||
|
key: `fan_out_en`, |
||||
|
// text: { 0: '正常', 1: '开' }[deviceInfo.formatValue['fan_status']] || '-', |
||||
|
gridColumn: 1, |
||||
|
state: 0 |
||||
|
}, |
||||
|
], |
||||
|
activeOption: { |
||||
|
active: { |
||||
|
text: "开" |
||||
|
}, |
||||
|
unActive: { |
||||
|
text: "关" |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
|
||||
|
}, |
||||
|
methods: { |
||||
|
async handleSwitcherChange(value, data) { |
||||
|
let str = data.state ? "关闭" : "开启"; |
||||
|
let deviceName = data.key; |
||||
|
str += `${data.text.replace(":", "")}?`; |
||||
|
// if (data.key.includes("fan")) { |
||||
|
// str += "风扇?"; |
||||
|
// deviceName = "fan_out_en"; |
||||
|
// } else { |
||||
|
// str += "该支路?" |
||||
|
// deviceName = data.key.match(/^[a-z]+_out|[0-9]+/g).join("_") + "_en"; //dc_out_2_en ac_out_2_en; |
||||
|
// } |
||||
|
data.state = value; |
||||
|
|
||||
|
if (!this.selectItems.length) { |
||||
|
setTimeout(() => { data.state = !value; }, 10); |
||||
|
return Message.error("请至少选择一个设备!"); |
||||
|
} |
||||
|
const selectItems = this.selectItems.map(item => JSON.parse(item)); |
||||
|
|
||||
|
const isContinue = await confirm({ message: `${str}` }) |
||||
|
.catch(() => { |
||||
|
data.state = !value; |
||||
|
}); |
||||
|
|
||||
|
if (!isContinue) return; |
||||
|
|
||||
|
batchFunctions( |
||||
|
{ |
||||
|
"devices": selectItems, |
||||
|
"functions": [ |
||||
|
{ |
||||
|
"functionId": "102", |
||||
|
"params": { |
||||
|
deviceName, |
||||
|
// 开关:1=打开,0=关闭 |
||||
|
value: value ? 1 : 0 |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}) |
||||
|
.then(result => { |
||||
|
multiResultShow(result.data, item => item.result.code == 200, "操作"); |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
data.state = !value; |
||||
|
Message.error("操作失败"); |
||||
|
}) |
||||
|
}, |
||||
|
getSlotKey(key) { |
||||
|
return key.includes('electricity') || key.includes('fan') ? key : '' |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss' scoped> |
||||
|
.DeviceParams { |
||||
|
height: 100%; |
||||
|
padding-right: 9px; |
||||
|
padding-left: 14px; |
||||
|
margin-top: 15px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,195 @@ |
|||||
|
<template> |
||||
|
<Dialog v-model="obverseVisible" title="远端机" width="600px"> |
||||
|
<Video class="video-stream" :pileNum="dialogData.stakeMark" /> |
||||
|
|
||||
|
<div class="RemoteMachine"> |
||||
|
<ElTabs v-model="activeName" class="tabs"> |
||||
|
<ElTabPane label="基本信息" name="first"> |
||||
|
<!-- {{ dialogData }} --> |
||||
|
<Descriptions :list="list" :data="data" style="gap: 18px" /> |
||||
|
</ElTabPane> |
||||
|
<ElTabPane label="设备参数" name="second"> |
||||
|
<DeviceParams disabled :dialogData="dialogData" /> |
||||
|
</ElTabPane> |
||||
|
<ElTabPane label="在线率统计" name="third"> |
||||
|
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" /> |
||||
|
</ElTabPane> |
||||
|
</ElTabs> |
||||
|
</div> |
||||
|
<template #footer> |
||||
|
<Button v-if="activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true"> |
||||
|
设备操作 |
||||
|
</Button> |
||||
|
<Button v-else-if="activeName != 'first'" style="background-color: #bbb"> |
||||
|
设备离线 |
||||
|
</Button> |
||||
|
</template> |
||||
|
|
||||
|
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" /> |
||||
|
</Dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Dialog from "@screen/components/Dialog/index.vue"; |
||||
|
import Button from "@screen/components/Buttons/Button.vue"; |
||||
|
import Descriptions from "@screen/components/Descriptions.vue"; |
||||
|
import Video from "@screen/components/Video"; |
||||
|
import LineChart from "../../LineChart/index.vue"; |
||||
|
import DeviceParams from "./components/DeviceParams.vue"; |
||||
|
import DeviceControlDialog from "./components/DeviceControlDialog.vue"; |
||||
|
|
||||
|
import request from "@/utils/request"; |
||||
|
|
||||
|
import { |
||||
|
getRoadInfoByStakeMark, |
||||
|
getProduct, |
||||
|
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; |
||||
|
import { dialogDelayVisible } from "./../mixin"; |
||||
|
|
||||
|
// 广播发布 |
||||
|
export default { |
||||
|
name: "RemoteMachine", |
||||
|
mixins: [dialogDelayVisible], |
||||
|
components: { |
||||
|
Dialog, |
||||
|
Descriptions, |
||||
|
LineChart, |
||||
|
Video, |
||||
|
Button, |
||||
|
DeviceParams, |
||||
|
DeviceControlDialog, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
activeName: "first", |
||||
|
releaseVisible: false, |
||||
|
deviceControlVisible: false, |
||||
|
data: { |
||||
|
deviceName: "LH24", |
||||
|
roadName: "G35济泽高速", |
||||
|
stakeMark: "k094+079", |
||||
|
direction: "1", |
||||
|
organizationName: "山东高速济南发展公司", |
||||
|
brand: "XXX厂家", |
||||
|
deviceState: "0", |
||||
|
}, |
||||
|
list: [ |
||||
|
{ |
||||
|
label: "设备名称", |
||||
|
key: "deviceName", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备桩号", |
||||
|
key: "stakeMark", |
||||
|
}, |
||||
|
{ |
||||
|
label: "道路名称", |
||||
|
key: "roadName", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备方向", |
||||
|
key: "direction", |
||||
|
enum: "CameraDirectionEnum", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备状态", |
||||
|
key: "deviceState", |
||||
|
// enum: "DeviceTypeEnum", |
||||
|
visible: false, |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备状态", |
||||
|
key: "deviceStateLiteral", |
||||
|
// enum: "DeviceTypeEnum", |
||||
|
}, |
||||
|
{ |
||||
|
label: "设备厂商", |
||||
|
key: "manufacturer", |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
async created() { |
||||
|
if (this.dialogData) { |
||||
|
this.data = { |
||||
|
...this.dialogData, |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
let deviceInfo = await this.getDeviceInfo(); |
||||
|
this.data = { |
||||
|
roadName: null, |
||||
|
deviceStateLiteral: deviceInfo?.data.formatValue.deviceState, |
||||
|
...this.data |
||||
|
}; |
||||
|
|
||||
|
getProduct(this.dialogData.productId).then((data) => { |
||||
|
this.dialogData.brand = data.brand; |
||||
|
}); |
||||
|
|
||||
|
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); |
||||
|
|
||||
|
if (roadInfo) this.data.roadName = roadInfo.roadName; |
||||
|
console.log('this.data', this.data) |
||||
|
}, |
||||
|
methods: { |
||||
|
async getDeviceInfo() { |
||||
|
return request({ |
||||
|
url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || "10.0.36.143-1883" |
||||
|
}/3`, |
||||
|
method: "get", |
||||
|
params: {}, |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
div.switcher { |
||||
|
font-size: 12px; |
||||
|
padding: 2px; |
||||
|
} |
||||
|
</style> |
||||
|
<style lang="scss" scoped> |
||||
|
.RemoteMachine { |
||||
|
width: 510px; |
||||
|
// height: 240px; |
||||
|
color: #fff; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
|
||||
|
.camera-video { |
||||
|
flex: 1.5; |
||||
|
} |
||||
|
|
||||
|
.tabs { |
||||
|
flex: 1; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
|
||||
|
::v-deep { |
||||
|
.el-tabs__content { |
||||
|
flex: 1; |
||||
|
|
||||
|
.el-tab-pane { |
||||
|
height: 100%; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
margin-top: 12px; |
||||
|
display: flex; |
||||
|
gap: 9px; |
||||
|
align-items: center; |
||||
|
justify-content: end; |
||||
|
|
||||
|
>div { |
||||
|
font-size: 16px; |
||||
|
padding: 6px 12px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -1,76 +1,74 @@ |
|||||
<template> |
<template> |
||||
<div class='congestion'> |
<div class="congestion"> |
||||
<WgtTitle :title="'近一年交通组成特征指数最大值'"></WgtTitle> |
<WgtTitle :title="'近一年交通组成特征指数最大值'"></WgtTitle> |
||||
<div class="board"> |
<div class="board"> |
||||
<div class="charts keep-ratio " id="composeFeatures"></div> |
<div class="charts keep-ratio" id="composeFeatures"></div> |
||||
</div> |
|
||||
</div> |
</div> |
||||
</template> |
</div> |
||||
|
</template> |
||||
|
|
||||
<script> |
<script> |
||||
|
import WgtTitle from "../../../../../widgets/title"; |
||||
|
import * as echarts from "echarts"; |
||||
|
import chartsStatistics from "./assets/charts"; |
||||
|
export default { |
||||
|
name: "ComposeFeatures", |
||||
|
components: { |
||||
|
WgtTitle, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
myChart: null, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
import WgtTitle from '../../../../../widgets/title' |
created() {}, |
||||
import * as echarts from "echarts"; |
methods: { |
||||
import chartsStatistics from "./assets/charts"; |
reiszeChart() { |
||||
export default { |
this.$nextTick(() => { |
||||
name: 'ComposeFeatures', |
if (this.myChart) { |
||||
components: { |
this.myChart.resize(); |
||||
WgtTitle |
} |
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
myChart:null, |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
reiszeChart(){ |
|
||||
this.$nextTick(() => { |
|
||||
if ( this.myChart ) { |
|
||||
this.myChart.resize(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
update(){ |
|
||||
|
|
||||
}, |
|
||||
mounted() { |
|
||||
setTimeout(() => { |
|
||||
this.$nextTick(() => { |
|
||||
this.myChart = echarts.init(document.getElementById('composeFeatures')); |
|
||||
this.myChart.setOption(chartsStatistics); |
|
||||
}); |
|
||||
}); |
}); |
||||
}, |
}, |
||||
} |
}, |
||||
</script> |
update() {}, |
||||
|
mounted() { |
||||
|
setTimeout(() => { |
||||
|
this.$nextTick(() => { |
||||
|
this.myChart = echarts.init(document.getElementById("composeFeatures")); |
||||
|
this.myChart.setOption(chartsStatistics); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
<style lang='scss' scoped> |
<style lang="scss" scoped> |
||||
.congestion { |
.congestion { |
||||
|
width: 100%; |
||||
|
.board { |
||||
|
// height: 150px; |
||||
|
flex: 1; |
||||
width: 100%; |
width: 100%; |
||||
.board{ |
padding: 0px 20px; |
||||
height:150px; |
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%); |
||||
width: 100%; |
border-radius: 5px 5px 5px 5px; |
||||
padding: 0px 20px; |
opacity: 1; |
||||
background: linear-gradient(180deg, rgba(6,66,88,0.2) 0%, #064258 100%); |
border: 1px solid; |
||||
border-radius: 5px 5px 5px 5px; |
border-image: linear-gradient( |
||||
opacity: 1; |
360deg, |
||||
border: 1px solid; |
rgba(55, 231, 255, 0.3), |
||||
border-image: linear-gradient(360deg, rgba(55, 231, 255,0.3), rgba(55, 231, 255, 0)) 1 1; |
rgba(55, 231, 255, 0) |
||||
display: flex; |
) |
||||
justify-content: space-between; |
1 1; |
||||
align-items: center; |
display: flex; |
||||
|
justify-content: space-between; |
||||
} |
align-items: center; |
||||
} |
} |
||||
.charts { |
} |
||||
height:120px; |
.charts { |
||||
width: 100%; |
height: 120px; |
||||
} |
width: 100%; |
||||
|
} |
||||
</style> |
</style> |
||||
|
|
||||
|
|||||
@ -1,76 +1,74 @@ |
|||||
<template> |
<template> |
||||
<div class='congestion'> |
<div class="congestion"> |
||||
<WgtTitle :title="'近一年拥挤度最大值'"></WgtTitle> |
<WgtTitle :title="'近一年拥挤度最大值'"></WgtTitle> |
||||
<div class="board"> |
<div class="board"> |
||||
<div class="charts keep-ratio " id="Crowding"></div> |
<div class="charts keep-ratio" id="Crowding"></div> |
||||
</div> |
|
||||
</div> |
</div> |
||||
</template> |
</div> |
||||
|
</template> |
||||
|
|
||||
<script> |
<script> |
||||
|
import WgtTitle from "../../../../../widgets/title"; |
||||
|
import * as echarts from "echarts"; |
||||
|
import chartsStatistics from "./assets/charts"; |
||||
|
export default { |
||||
|
name: "Crowding", |
||||
|
components: { |
||||
|
WgtTitle, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
myChart: null, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
import WgtTitle from '../../../../../widgets/title' |
created() {}, |
||||
import * as echarts from "echarts"; |
methods: { |
||||
import chartsStatistics from "./assets/charts"; |
reiszeChart() { |
||||
export default { |
this.$nextTick(() => { |
||||
name: 'Crowding', |
if (this.myChart) { |
||||
components: { |
this.myChart.resize(); |
||||
WgtTitle |
} |
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
myChart:null, |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
reiszeChart(){ |
|
||||
this.$nextTick(() => { |
|
||||
if ( this.myChart ) { |
|
||||
this.myChart.resize(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
update(){ |
|
||||
|
|
||||
}, |
|
||||
mounted() { |
|
||||
setTimeout(() => { |
|
||||
this.$nextTick(() => { |
|
||||
this.myChart = echarts.init(document.getElementById('Crowding')); |
|
||||
this.myChart.setOption(chartsStatistics); |
|
||||
}); |
|
||||
}); |
}); |
||||
}, |
}, |
||||
} |
}, |
||||
</script> |
update() {}, |
||||
|
mounted() { |
||||
|
setTimeout(() => { |
||||
|
this.$nextTick(() => { |
||||
|
this.myChart = echarts.init(document.getElementById("Crowding")); |
||||
|
this.myChart.setOption(chartsStatistics); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
<style lang='scss' scoped> |
<style lang="scss" scoped> |
||||
.congestion { |
.congestion { |
||||
|
width: 100%; |
||||
|
.board { |
||||
|
// height: 150px; |
||||
|
flex: 1; |
||||
width: 100%; |
width: 100%; |
||||
.board{ |
padding: 0px 20px; |
||||
height:150px; |
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%); |
||||
width: 100%; |
border-radius: 5px 5px 5px 5px; |
||||
padding: 0px 20px; |
opacity: 1; |
||||
background: linear-gradient(180deg, rgba(6,66,88,0.2) 0%, #064258 100%); |
border: 1px solid; |
||||
border-radius: 5px 5px 5px 5px; |
border-image: linear-gradient( |
||||
opacity: 1; |
360deg, |
||||
border: 1px solid; |
rgba(55, 231, 255, 0.3), |
||||
border-image: linear-gradient(360deg, rgba(55, 231, 255,0.3), rgba(55, 231, 255, 0)) 1 1; |
rgba(55, 231, 255, 0) |
||||
display: flex; |
) |
||||
justify-content: space-between; |
1 1; |
||||
align-items: center; |
display: flex; |
||||
|
justify-content: space-between; |
||||
} |
align-items: center; |
||||
} |
} |
||||
.charts { |
} |
||||
height:120px; |
.charts { |
||||
width: 100%; |
height: 120px; |
||||
} |
width: 100%; |
||||
|
} |
||||
</style> |
</style> |
||||
|
|
||||
|
|||||
@ -1,374 +1,411 @@ |
|||||
<template> |
<template> |
||||
<div class='congestion'> |
<div class="congestion"> |
||||
<WgtTitle :title="'道路指标情况'"></WgtTitle> |
<WgtTitle :title="'道路指标情况'"></WgtTitle> |
||||
<div class="board"> |
<div class="board"> |
||||
<div id="roadChart1" class="keep-ratio" > |
<div id="roadChart1" class="keep-ratio"></div> |
||||
|
<div id="roadChart2" class="keep-ratio"></div> |
||||
</div> |
<div id="roadChart3" class="keep-ratio"></div> |
||||
<div id="roadChart2" class="keep-ratio" > |
|
||||
|
|
||||
</div> |
|
||||
<div id="roadChart3" class="keep-ratio" > |
|
||||
|
|
||||
</div> |
|
||||
</div> |
|
||||
</div> |
</div> |
||||
</template> |
</div> |
||||
|
</template> |
||||
<script> |
|
||||
import WgtTitle from '../../../../../widgets/title' |
<script> |
||||
import chartsStatistics from './assets/chart1'; |
import WgtTitle from "../../../../../widgets/title"; |
||||
import chartsStatistics2 from './assets/chart2'; |
import chartsStatistics from "./assets/chart1"; |
||||
import chartsStatistics3 from './assets/chart3'; |
import chartsStatistics2 from "./assets/chart2"; |
||||
import * as echarts from "echarts"; |
import chartsStatistics3 from "./assets/chart3"; |
||||
|
import * as echarts from "echarts"; |
||||
export default { |
|
||||
name: 'RoadIndicators', |
export default { |
||||
components: { |
name: "RoadIndicators", |
||||
WgtTitle |
components: { |
||||
}, |
WgtTitle, |
||||
data() { |
}, |
||||
return { |
data() { |
||||
tableData: [{ |
return { |
||||
date: '2023-12-31 13:00:00', |
tableData: [ |
||||
name: '2640.78m', |
{ |
||||
address: 'K100+000-K110+000' |
date: "2023-12-31 13:00:00", |
||||
},{ |
name: "2640.78m", |
||||
date: '2023-12-31 13:00:00', |
address: "K100+000-K110+000", |
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
},{ |
|
||||
date: '2023-12-31 13:00:00', |
|
||||
name: '2640.78m', |
|
||||
address: 'K100+000-K110+000' |
|
||||
}, |
}, |
||||
] |
{ |
||||
} |
date: "2023-12-31 13:00:00", |
||||
}, |
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
created() { |
}, |
||||
|
{ |
||||
}, |
date: "2023-12-31 13:00:00", |
||||
methods: { |
name: "2640.78m", |
||||
selectItem(index){ |
address: "K100+000-K110+000", |
||||
this.selectIndex = index; |
}, |
||||
}, |
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
{ |
||||
|
date: "2023-12-31 13:00:00", |
||||
|
name: "2640.78m", |
||||
|
address: "K100+000-K110+000", |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
|
created() {}, |
||||
|
methods: { |
||||
|
selectItem(index) { |
||||
|
this.selectIndex = index; |
||||
}, |
}, |
||||
mounted() { |
}, |
||||
|
mounted() { |
||||
setTimeout(() => { |
setTimeout(() => { |
||||
this.$nextTick(() => { |
this.$nextTick(() => { |
||||
var myChart = echarts.init(document.getElementById('roadChart1')); |
var myChart = echarts.init(document.getElementById("roadChart1")); |
||||
myChart.setOption(chartsStatistics); |
myChart.setOption(chartsStatistics); |
||||
var myChart2 = echarts.init(document.getElementById('roadChart2')); |
var myChart2 = echarts.init(document.getElementById("roadChart2")); |
||||
myChart2.setOption(chartsStatistics2); |
myChart2.setOption(chartsStatistics2); |
||||
var myChart3 = echarts.init(document.getElementById('roadChart3')); |
var myChart3 = echarts.init(document.getElementById("roadChart3")); |
||||
myChart3.setOption(chartsStatistics3); |
myChart3.setOption(chartsStatistics3); |
||||
}); |
|
||||
}); |
}); |
||||
}, |
}); |
||||
} |
}, |
||||
</script> |
}; |
||||
|
</script> |
||||
<style lang='scss' scoped> |
|
||||
|
<style lang="scss" scoped> |
||||
.showClass { |
.showClass { |
||||
color:#00EBC1; |
color: #00ebc1; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table .cell { |
::v-deep .el-table .cell { |
||||
padding-left:0px !important; |
padding-left: 0px !important; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table .el-table__header-wrapper th { |
::v-deep .el-table .el-table__header-wrapper th { |
||||
background-color: #064258 !important; |
background-color: #064258 !important; |
||||
color:#00D1FF; |
color: #00d1ff; |
||||
border-color: #064258 !important; |
border-color: #064258 !important; |
||||
border:0px !important; |
border: 0px !important; |
||||
font-size:12px !important; |
font-size: 12px !important; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table { |
::v-deep .el-table { |
||||
border:0px !important; |
border: 0px !important; |
||||
background-color: transparent; |
background-color: transparent; |
||||
font-size:12px !important; |
font-size: 12px !important; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table__body-wrapper { |
::v-deep .el-table__body-wrapper { |
||||
background-color: #064258; |
background-color: #064258; |
||||
color: #fff; |
color: #fff; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table tr:hover td { |
::v-deep .el-table tr:hover td { |
||||
background: #1b2528 !important; |
background: #1b2528 !important; |
||||
color:#00D1FF; |
color: #00d1ff; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table tr:nth-child(odd) td{ |
::v-deep .el-table tr:nth-child(odd) td { |
||||
background-color: #13272F ; |
background-color: #13272f; |
||||
border:0px !important; |
border: 0px !important; |
||||
} |
} |
||||
::v-deep .el-table tr:nth-child(even) td{ |
::v-deep .el-table tr:nth-child(even) td { |
||||
border:0px !important; |
border: 0px !important; |
||||
} |
} |
||||
|
|
||||
::v-deep .el-table tr { |
::v-deep .el-table tr { |
||||
background-color: #133242 !important; |
background-color: #133242 !important; |
||||
border-collapse:0; |
border-collapse: 0; |
||||
border:0px !important; |
border: 0px !important; |
||||
background-color: transparent !important; |
background-color: transparent !important; |
||||
} |
} |
||||
|
|
||||
.congestion { |
.congestion { |
||||
display: inline-flex; |
display: inline-flex; |
||||
|
width: 100%; |
||||
|
// height: 188px; |
||||
|
flex-direction: column; |
||||
|
|
||||
|
.board { |
||||
|
// height: 150px; |
||||
|
flex: 1; |
||||
width: 100%; |
width: 100%; |
||||
height: 188px; |
padding: 0px 0px; |
||||
flex-direction: column; |
border-radius: 5px 5px 5px 5px; |
||||
|
opacity: 1; |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
flex-direction: row; |
||||
|
margin-top: 20px; |
||||
|
|
||||
|
background: linear-gradient(180deg, rgba(6, 66, 88, 0) 0%, #064258 93%); |
||||
|
|
||||
|
> div { |
||||
|
display: inline-flex; |
||||
|
width: 33%; |
||||
|
height: 100%; |
||||
|
position: relative; |
||||
|
top: -10px; |
||||
|
} |
||||
|
|
||||
.board{ |
.warningList { |
||||
height: 150px; |
display: inline-flex; |
||||
|
flex-direction: column; |
||||
width: 100%; |
width: 100%; |
||||
padding: 0px 0px; |
height: calc(100% - 40px); |
||||
border-radius: 5px 5px 5px 5px; |
|
||||
opacity: 1; |
|
||||
display: flex; |
|
||||
justify-content: space-between; |
|
||||
align-items: center; |
|
||||
flex-direction: row; |
|
||||
margin-top:20px; |
|
||||
|
|
||||
background: linear-gradient(180deg, rgba(6,66,88,0) 0%, #064258 93%); |
|
||||
|
|
||||
> div { |
> div { |
||||
display: inline-flex; |
display: inline-flex; |
||||
width:33%; |
width: 100%; |
||||
height:100%; |
height: 138px; |
||||
position: relative; |
background: #133242; |
||||
top:-10px; |
border-radius: 2px 2px 2px 2px; |
||||
} |
opacity: 1; |
||||
|
border: 1px solid; |
||||
.warningList { |
border-image: linear-gradient( |
||||
display: inline-flex; |
360deg, |
||||
flex-direction: column; |
rgba(55, 231, 255, 1), |
||||
width:100%; |
rgba(55, 231, 255, 0) |
||||
height:calc(100% - 40px); |
) |
||||
|
1 1; |
||||
>div { |
overflow: hidden; |
||||
|
margin-top: 20px; |
||||
|
padding: 23px 29px; |
||||
|
font-size: 14px; |
||||
|
font-family: PingFang SC, PingFang SC; |
||||
|
font-weight: 400; |
||||
|
color: #37e7ff; |
||||
|
|
||||
|
> .left-w { |
||||
|
display: inline-flex; |
||||
|
width: 40%; |
||||
|
height: 100%; |
||||
|
flex-direction: column; |
||||
|
|
||||
|
.left-row { |
||||
|
margin: 2px; |
||||
display: inline-flex; |
display: inline-flex; |
||||
width:100%; |
width: 100%; |
||||
height:138px; |
height: 30px; |
||||
background: #133242; |
flex-direction: row; |
||||
border-radius: 2px 2px 2px 2px; |
|
||||
opacity: 1; |
|
||||
border: 1px solid; |
|
||||
border-image: linear-gradient(360deg, rgba(55, 231, 255, 1), rgba(55, 231, 255, 0)) 1 1; |
|
||||
overflow: hidden; |
|
||||
margin-top:20px; |
|
||||
padding:23px 29px; |
|
||||
font-size: 14px; |
|
||||
font-family: PingFang SC, PingFang SC; |
|
||||
font-weight: 400; |
|
||||
color: #37E7FF; |
|
||||
|
|
||||
>.left-w { |
|
||||
display: inline-flex; |
|
||||
width:40%; |
|
||||
height:100%; |
|
||||
flex-direction: column; |
|
||||
|
|
||||
.left-row { |
|
||||
margin:2px; |
|
||||
display: inline-flex; |
|
||||
width:100%; |
|
||||
height:30px; |
|
||||
flex-direction: row; |
|
||||
|
|
||||
>.value { |
|
||||
color:#fff; |
|
||||
} |
|
||||
|
|
||||
.org { |
|
||||
font-size: 14px; |
|
||||
font-family: PangMenZhengDao; |
|
||||
font-weight: 400; |
|
||||
color: #F4A125 |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
} |
|
||||
|
|
||||
>.right-w { |
|
||||
margin-left:30px; |
|
||||
display: inline-flex; |
|
||||
width:100%; |
|
||||
height:100%; |
|
||||
flex-direction: column; |
|
||||
|
|
||||
.right-row { |
> .value { |
||||
margin-bottom: 10px; |
color: #fff; |
||||
} |
|
||||
|
|
||||
.right-text { |
|
||||
color:#fff; |
|
||||
} |
|
||||
} |
} |
||||
|
|
||||
} |
.org { |
||||
} |
font-size: 14px; |
||||
|
font-family: PangMenZhengDao; |
||||
.weaterMain { |
font-weight: 400; |
||||
display: inline-flex; |
color: #f4a125; |
||||
flex-direction: row; |
|
||||
width:100%; |
|
||||
height: 40px; |
|
||||
|
|
||||
|
|
||||
.buttons { |
|
||||
width:100%; |
|
||||
height:38px; |
|
||||
>div { |
|
||||
display: inline-flex; |
|
||||
width:10%; |
|
||||
height:35px; |
|
||||
justify-content: center; |
|
||||
align-items: center; |
|
||||
font-size: 12px; |
|
||||
font-family: PangMenZhengDao; |
|
||||
font-weight: 800; |
|
||||
color: #FFFFFF; |
|
||||
z-index: 9; |
|
||||
} |
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
>div::after { |
> .right-w { |
||||
content: ""; |
margin-left: 30px; |
||||
position: absolute; |
display: inline-flex; |
||||
display: inline-flex; |
width: 100%; |
||||
width: 55px; |
height: 100%; |
||||
height: 36px; |
flex-direction: column; |
||||
background: linear-gradient(180deg, #6557D7 0%, rgba(101,87,216,0) 100%); |
|
||||
border-radius: 50%; |
|
||||
opacity: 1; |
|
||||
z-index:-1; |
|
||||
} |
|
||||
|
|
||||
.redSel::after { |
.right-row { |
||||
background: linear-gradient(180deg, #E73A14 0%, rgba(240,92,9,0) 100%); |
margin-bottom: 10px; |
||||
} |
} |
||||
|
|
||||
.yelSel::after { |
.right-text { |
||||
background: linear-gradient(180deg, #FFFA79 0%, rgba(255,208,137,0) 100%); |
color: #fff; |
||||
} |
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
.bluSel::after { |
.weaterMain { |
||||
background: linear-gradient(180deg, #121ADE 0%, rgba(40,18,228,0) 100%); |
display: inline-flex; |
||||
} |
flex-direction: row; |
||||
|
width: 100%; |
||||
|
height: 40px; |
||||
|
|
||||
.orgSel::after{ |
.buttons { |
||||
background: linear-gradient(180deg, #FFA623 0%, rgba(255,173,53,0) 100%); |
width: 100%; |
||||
} |
height: 38px; |
||||
|
> div { |
||||
|
display: inline-flex; |
||||
|
width: 10%; |
||||
|
height: 35px; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
font-size: 12px; |
||||
|
font-family: PangMenZhengDao; |
||||
|
font-weight: 800; |
||||
|
color: #ffffff; |
||||
|
z-index: 9; |
||||
} |
} |
||||
|
|
||||
.weaterTitle::after { |
> div::after { |
||||
content: ""; |
content: ""; |
||||
position: absolute; |
position: absolute; |
||||
top:0px; |
display: inline-flex; |
||||
left:0px; |
width: 55px; |
||||
width:100%; |
height: 36px; |
||||
height:2px; |
background: linear-gradient( |
||||
background: linear-gradient(90deg, rgba(189,255,246,0) 0%, #BDFFF6 52%, rgba(189,255,246,0) 100%); |
180deg, |
||||
border-radius: 0px 0px 0px 0px; |
#6557d7 0%, |
||||
opacity: 1; |
rgba(101, 87, 216, 0) 100% |
||||
|
); |
||||
|
border-radius: 50%; |
||||
|
opacity: 1; |
||||
|
z-index: -1; |
||||
} |
} |
||||
.weaterTitle::before { |
|
||||
content: ""; |
.redSel::after { |
||||
position: absolute; |
background: linear-gradient( |
||||
top:38px; |
180deg, |
||||
left:0px; |
#e73a14 0%, |
||||
width:100%; |
rgba(240, 92, 9, 0) 100% |
||||
height:2px; |
); |
||||
background: linear-gradient(90deg, rgba(189,255,246,0) 0%, #BDFFF6 52%, rgba(189,255,246,0) 100%); |
|
||||
border-radius: 0px 0px 0px 0px; |
|
||||
opacity: 1; |
|
||||
} |
} |
||||
|
|
||||
.weaterTitle { |
.yelSel::after { |
||||
position: relative; |
background: linear-gradient( |
||||
display: inline-flex; |
180deg, |
||||
width: 277px; |
#fffa79 0%, |
||||
height: 38px; |
rgba(255, 208, 137, 0) 100% |
||||
background: linear-gradient(269deg, rgba(55,231,255,0) 6%, rgba(55,231,255,0.6) 50%, rgba(55,231,255,0) 92%); |
); |
||||
border-radius: 0px 0px 0px 0px; |
} |
||||
opacity: 1; |
|
||||
justify-content: center; |
|
||||
align-items: center; |
|
||||
|
|
||||
>span.text { |
|
||||
display: inline-flex; |
|
||||
font-size: 16px; |
|
||||
font-family: PangMenZhengDao; |
|
||||
font-weight: 400; |
|
||||
color: #FFFFFF; |
|
||||
} |
|
||||
|
|
||||
|
.bluSel::after { |
||||
|
background: linear-gradient( |
||||
|
180deg, |
||||
|
#121ade 0%, |
||||
|
rgba(40, 18, 228, 0) 100% |
||||
|
); |
||||
|
} |
||||
|
|
||||
.num { |
.orgSel::after { |
||||
display: inline-flex; |
background: linear-gradient( |
||||
justify-content: center; |
180deg, |
||||
align-items: center; |
#ffa623 0%, |
||||
font-size: 22px; |
rgba(255, 173, 53, 0) 100% |
||||
font-family: PangMenZhengDao; |
); |
||||
font-weight: 400; |
|
||||
color: #D9001B; |
|
||||
} |
|
||||
} |
} |
||||
} |
} |
||||
|
|
||||
} |
.weaterTitle::after { |
||||
} |
content: ""; |
||||
.charts { |
position: absolute; |
||||
height:180px; |
top: 0px; |
||||
|
left: 0px; |
||||
|
width: 100%; |
||||
|
height: 2px; |
||||
|
background: linear-gradient( |
||||
|
90deg, |
||||
|
rgba(189, 255, 246, 0) 0%, |
||||
|
#bdfff6 52%, |
||||
|
rgba(189, 255, 246, 0) 100% |
||||
|
); |
||||
|
border-radius: 0px 0px 0px 0px; |
||||
|
opacity: 1; |
||||
|
} |
||||
|
.weaterTitle::before { |
||||
|
content: ""; |
||||
|
position: absolute; |
||||
|
top: 38px; |
||||
|
left: 0px; |
||||
width: 100%; |
width: 100%; |
||||
|
height: 2px; |
||||
|
background: linear-gradient( |
||||
|
90deg, |
||||
|
rgba(189, 255, 246, 0) 0%, |
||||
|
#bdfff6 52%, |
||||
|
rgba(189, 255, 246, 0) 100% |
||||
|
); |
||||
|
border-radius: 0px 0px 0px 0px; |
||||
|
opacity: 1; |
||||
} |
} |
||||
|
|
||||
</style> |
.weaterTitle { |
||||
|
position: relative; |
||||
|
display: inline-flex; |
||||
|
width: 277px; |
||||
|
height: 38px; |
||||
|
background: linear-gradient( |
||||
|
269deg, |
||||
|
rgba(55, 231, 255, 0) 6%, |
||||
|
rgba(55, 231, 255, 0.6) 50%, |
||||
|
rgba(55, 231, 255, 0) 92% |
||||
|
); |
||||
|
border-radius: 0px 0px 0px 0px; |
||||
|
opacity: 1; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
|
||||
|
> span.text { |
||||
|
display: inline-flex; |
||||
|
font-size: 16px; |
||||
|
font-family: PangMenZhengDao; |
||||
|
font-weight: 400; |
||||
|
color: #ffffff; |
||||
|
} |
||||
|
|
||||
|
.num { |
||||
|
display: inline-flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
font-size: 22px; |
||||
|
font-family: PangMenZhengDao; |
||||
|
font-weight: 400; |
||||
|
color: #d9001b; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.charts { |
||||
|
height: 180px; |
||||
|
width: 100%; |
||||
|
} |
||||
|
</style> |
||||
|
|||||
@ -1,76 +1,76 @@ |
|||||
<template> |
<template> |
||||
<div class='congestion'> |
<div class="congestion"> |
||||
<WgtTitle :title="'近一年饱和度最大值'"></WgtTitle> |
<WgtTitle :title="'近一年饱和度最大值'"></WgtTitle> |
||||
<div class="board"> |
<div class="board"> |
||||
<div class="charts keep-ratio " id="temperatureTrend"></div> |
<div class="charts keep-ratio" id="temperatureTrend"></div> |
||||
</div> |
|
||||
</div> |
</div> |
||||
</template> |
</div> |
||||
|
</template> |
||||
|
|
||||
<script> |
<script> |
||||
|
import WgtTitle from "../../../../../widgets/title"; |
||||
|
import * as echarts from "echarts"; |
||||
|
import chartsStatistics from "./assets/charts"; |
||||
|
export default { |
||||
|
name: "SaturationMax", |
||||
|
components: { |
||||
|
WgtTitle, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
myChart: null, |
||||
|
}; |
||||
|
}, |
||||
|
|
||||
import WgtTitle from '../../../../../widgets/title' |
created() {}, |
||||
import * as echarts from "echarts"; |
methods: { |
||||
import chartsStatistics from "./assets/charts"; |
reiszeChart() { |
||||
export default { |
this.$nextTick(() => { |
||||
name: 'SaturationMax', |
if (this.myChart) { |
||||
components: { |
this.myChart.resize(); |
||||
WgtTitle |
} |
||||
}, |
|
||||
data() { |
|
||||
return { |
|
||||
myChart:null, |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
created() { |
|
||||
|
|
||||
}, |
|
||||
methods: { |
|
||||
reiszeChart(){ |
|
||||
this.$nextTick(() => { |
|
||||
if ( this.myChart ) { |
|
||||
this.myChart.resize(); |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
}, |
|
||||
update(){ |
|
||||
|
|
||||
}, |
|
||||
mounted() { |
|
||||
setTimeout(() => { |
|
||||
this.$nextTick(() => { |
|
||||
this.myChart = echarts.init(document.getElementById('temperatureTrend')); |
|
||||
this.myChart.setOption(chartsStatistics); |
|
||||
}); |
|
||||
}); |
}); |
||||
}, |
}, |
||||
} |
}, |
||||
</script> |
update() {}, |
||||
|
mounted() { |
||||
|
setTimeout(() => { |
||||
|
this.$nextTick(() => { |
||||
|
this.myChart = echarts.init( |
||||
|
document.getElementById("temperatureTrend") |
||||
|
); |
||||
|
this.myChart.setOption(chartsStatistics); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
<style lang='scss' scoped> |
<style lang="scss" scoped> |
||||
.congestion { |
.congestion { |
||||
|
width: 100%; |
||||
|
.board { |
||||
|
// height: 150px; |
||||
|
flex: 1; |
||||
width: 100%; |
width: 100%; |
||||
.board{ |
padding: 0px 20px; |
||||
height:150px; |
background: linear-gradient(180deg, rgba(6, 66, 88, 0.2) 0%, #064258 100%); |
||||
width: 100%; |
border-radius: 5px 5px 5px 5px; |
||||
padding: 0px 20px; |
opacity: 1; |
||||
background: linear-gradient(180deg, rgba(6,66,88,0.2) 0%, #064258 100%); |
border: 1px solid; |
||||
border-radius: 5px 5px 5px 5px; |
border-image: linear-gradient( |
||||
opacity: 1; |
360deg, |
||||
border: 1px solid; |
rgba(55, 231, 255, 0.3), |
||||
border-image: linear-gradient(360deg, rgba(55, 231, 255,0.3), rgba(55, 231, 255, 0)) 1 1; |
rgba(55, 231, 255, 0) |
||||
display: flex; |
) |
||||
justify-content: space-between; |
1 1; |
||||
align-items: center; |
display: flex; |
||||
|
justify-content: space-between; |
||||
} |
align-items: center; |
||||
} |
} |
||||
.charts { |
} |
||||
height:120px; |
.charts { |
||||
width: 100%; |
height: 120px; |
||||
} |
width: 100%; |
||||
|
} |
||||
</style> |
</style> |
||||
|
|
||||
|
|||||
Loading…
Reference in new issue