Merge pull request '邓洁 : 修复有害气体弹窗问题' (#165) from dengjie into dev
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/165
This commit is contained in:
@@ -1,21 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
id="bad-gas-info"
|
id="bad-gas-info"
|
||||||
:style="{ backgroundImage: 'url(' + getImageUrl(bgImage) + ')' }"
|
:style="{ backgroundImage: 'url(' + getImageUrl(bgImage) + ')' }">
|
||||||
@click="handleOpenChart"
|
|
||||||
>
|
|
||||||
<div class="title">有害气体</div>
|
<div class="title">有害气体</div>
|
||||||
<div class="info-list">
|
<div class="info-list">
|
||||||
<gas-info-item
|
<gas-info-item
|
||||||
v-for="item in badGasList"
|
v-for="item in badGasList"
|
||||||
:key="item.equipmentId"
|
:key="item.equipmentId"
|
||||||
:gasInfo="item"
|
:gasInfo="item"
|
||||||
|
@click="handleOpenChart"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="digital-tunnel">
|
<div class="digital-tunnel">
|
||||||
<el-dialog
|
<el-dialog
|
||||||
v-model="isVisited"
|
v-model="isBadGasVisited"
|
||||||
title="有害气体监控数据"
|
title="有害气体监控数据"
|
||||||
width="2175px"
|
width="2175px"
|
||||||
:modal="false"
|
:modal="false"
|
||||||
@@ -53,10 +52,10 @@ const props = defineProps({
|
|||||||
});
|
});
|
||||||
const timeList = ref(["年", "月", "日"]);
|
const timeList = ref(["年", "月", "日"]);
|
||||||
const selectTimeButton = ref(2);
|
const selectTimeButton = ref(2);
|
||||||
const isVisited = ref(false);
|
const isBadGasVisited = ref(false);
|
||||||
const badGasList = ref([]);
|
const badGasList = ref([]);
|
||||||
let myEcharts = reactive({});
|
let myEcharts = reactive({});
|
||||||
const bgImage = computed(() => (isVisited.value ? "sp_active.png" : "bg.png"));
|
const bgImage = computed(() => (isBadGasVisited.value ? "sp_active.png" : "bg.png"));
|
||||||
watch(
|
watch(
|
||||||
() => props.list,
|
() => props.list,
|
||||||
(now) => {
|
(now) => {
|
||||||
@@ -130,10 +129,10 @@ const changeData = (item) => {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
const getBadGasChartInfo = () => {
|
const getBadGasChartInfo = () => {
|
||||||
console.log('tunnnelid--------',props.tunnelId)
|
let id =props.tunnelId
|
||||||
getBadGasEchartsInfo(props.tunnelId).then(res => {
|
getBadGasEchartsInfo(id).then(res => {
|
||||||
if (res?.code === 1000) {
|
if (res?.code === 1000) {
|
||||||
isVisited.value = true
|
isBadGasVisited.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
initChart(res.data.dates, res.data)
|
initChart(res.data.dates, res.data)
|
||||||
})
|
})
|
||||||
@@ -186,7 +185,6 @@ const initChart = (type, values) => {
|
|||||||
fontSize: 40,
|
fontSize: 40,
|
||||||
},
|
},
|
||||||
formatter: (params)=> {
|
formatter: (params)=> {
|
||||||
console.log(params)
|
|
||||||
let res = ` <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: -30px">${params[0].name}</div>` + '<br/>'
|
let res = ` <div style="font-size: 52px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #EFEEEE;margin-bottom: -30px">${params[0].name}</div>` + '<br/>'
|
||||||
for (let i = 0; i < params.length; i++) {
|
for (let i = 0; i < params.length; i++) {
|
||||||
res += `
|
res += `
|
||||||
@@ -358,7 +356,6 @@ const initChart = (type, values) => {
|
|||||||
#bad-gas-info {
|
#bad-gas-info {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 100;
|
|
||||||
width: 824px;
|
width: 824px;
|
||||||
height: 621px;
|
height: 621px;
|
||||||
top: 1441px;
|
top: 1441px;
|
||||||
|
|||||||
Reference in New Issue
Block a user