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>
|
||||
<div
|
||||
id="bad-gas-info"
|
||||
:style="{ backgroundImage: 'url(' + getImageUrl(bgImage) + ')' }"
|
||||
@click="handleOpenChart"
|
||||
>
|
||||
:style="{ backgroundImage: 'url(' + getImageUrl(bgImage) + ')' }">
|
||||
<div class="title">有害气体</div>
|
||||
<div class="info-list">
|
||||
<gas-info-item
|
||||
v-for="item in badGasList"
|
||||
:key="item.equipmentId"
|
||||
:gasInfo="item"
|
||||
@click="handleOpenChart"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="digital-tunnel">
|
||||
<el-dialog
|
||||
v-model="isVisited"
|
||||
v-model="isBadGasVisited"
|
||||
title="有害气体监控数据"
|
||||
width="2175px"
|
||||
:modal="false"
|
||||
@@ -53,10 +52,10 @@ const props = defineProps({
|
||||
});
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(2);
|
||||
const isVisited = ref(false);
|
||||
const isBadGasVisited = ref(false);
|
||||
const badGasList = ref([]);
|
||||
let myEcharts = reactive({});
|
||||
const bgImage = computed(() => (isVisited.value ? "sp_active.png" : "bg.png"));
|
||||
const bgImage = computed(() => (isBadGasVisited.value ? "sp_active.png" : "bg.png"));
|
||||
watch(
|
||||
() => props.list,
|
||||
(now) => {
|
||||
@@ -130,10 +129,10 @@ const changeData = (item) => {
|
||||
};
|
||||
};
|
||||
const getBadGasChartInfo = () => {
|
||||
console.log('tunnnelid--------',props.tunnelId)
|
||||
getBadGasEchartsInfo(props.tunnelId).then(res => {
|
||||
let id =props.tunnelId
|
||||
getBadGasEchartsInfo(id).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
isVisited.value = true
|
||||
isBadGasVisited.value = true
|
||||
nextTick(() => {
|
||||
initChart(res.data.dates, res.data)
|
||||
})
|
||||
@@ -186,7 +185,6 @@ const initChart = (type, values) => {
|
||||
fontSize: 40,
|
||||
},
|
||||
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/>'
|
||||
for (let i = 0; i < params.length; i++) {
|
||||
res += `
|
||||
@@ -358,7 +356,6 @@ const initChart = (type, values) => {
|
||||
#bad-gas-info {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
width: 824px;
|
||||
height: 621px;
|
||||
top: 1441px;
|
||||
|
||||
Reference in New Issue
Block a user