邓洁 : 打开弹窗时背景更改
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="bad-gas-info">
|
||||
<div id="bad-gas-info" :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"/>
|
||||
@@ -38,7 +38,11 @@ const selectTimeButton = ref(0);
|
||||
const isVisited = ref(false);
|
||||
const badGasList = ref([])
|
||||
let myEcharts = reactive({});
|
||||
|
||||
const bgImage = computed(() =>
|
||||
isVisited.value
|
||||
? "sp_active.png"
|
||||
: "bg.png"
|
||||
);
|
||||
watch(() => props.list, (now) => {
|
||||
badGasList.value.forEach(item => {
|
||||
now.forEach(newItem => {
|
||||
@@ -90,6 +94,9 @@ const handleOpenChart = () => {
|
||||
initChart()
|
||||
})
|
||||
}
|
||||
const getImageUrl = (name) => {
|
||||
return new URL(`../../../assets/images/badGasInfo/${name}`, import.meta.url).href
|
||||
}
|
||||
/**
|
||||
* 初始化echarts实例方法
|
||||
*/
|
||||
@@ -213,7 +220,7 @@ const initChart = () => {
|
||||
height: 621px;
|
||||
top: 1441px;
|
||||
right: 72px;
|
||||
background-image: url(@/assets/images/badGasInfo/bg.png);
|
||||
background-image: url(../../../assets/images/badGasInfo/bg.png);
|
||||
|
||||
|
||||
.title {
|
||||
|
||||
Reference in New Issue
Block a user