fix : 修复用电量弹窗
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="used-ele" :style="{ backgroundColor: bgImage }" @click="handleOpenChart">
|
||||
<div id="used-ele" :style="{ backgroundColor: bgImage }" @click="handleOpenChart(fanList)">
|
||||
<!-- <div v-if="electricityConsumptionMonthly===0&&monthlySavings===0" class="showNull ">-->
|
||||
<!-- <div class="loading" v-if="loading===0"></div>-->
|
||||
<!-- {{ loading === 0 ? '加载中...' : '暂无数据~' }}-->
|
||||
@@ -142,10 +142,10 @@ watch(() => props.eleData, (now) => {
|
||||
if (now) {
|
||||
let fanObj = {}
|
||||
now.frequencyChangerList.forEach(item => {
|
||||
if (item.equipmentId === 22 || item.equipmentId === 23) {
|
||||
if (item.equipmentType === 'frequency1' || item.equipmentType === "frequency2") {
|
||||
fanObj = {
|
||||
value: item.equipmentId,
|
||||
label: changeNum(item.equipmentId)
|
||||
label: changeNum(item.equipmentId, item.equipmentType)
|
||||
}
|
||||
}
|
||||
fanList.value.push(fanObj)
|
||||
@@ -224,11 +224,11 @@ const shrinkScreen = () => {
|
||||
initChart(chartData.dates, chartData.consumptionValues, chartData.saveElectricityValues, dataZoomTop)
|
||||
})
|
||||
}
|
||||
const changeNum = (item) => {
|
||||
switch (item) {
|
||||
case 22:
|
||||
const changeNum = (item,equipmentType) => {
|
||||
switch (equipmentType) {
|
||||
case 'frequency1':
|
||||
return '一号风机';
|
||||
case 23:
|
||||
case 'frequency2':
|
||||
return '二号风机';
|
||||
}
|
||||
}
|
||||
@@ -327,12 +327,12 @@ const getFanInfo = (equipmentId, type = 'month', time = '', flag) => {
|
||||
loadingText.value = '加载中...'
|
||||
})
|
||||
}
|
||||
const handleOpenChart = () => {
|
||||
const handleOpenChart = (list) => {
|
||||
monthValue.value = ''
|
||||
selectTimeButton.value = 1
|
||||
isVisited.value = true
|
||||
openEquipmentId.value = fanList.value[0].value
|
||||
chooseChartFan.value = fanList.value[0].value
|
||||
openEquipmentId.value = list[0].value
|
||||
chooseChartFan.value = list[0].value
|
||||
nextTick(() => {
|
||||
if (chooseMonthRef.value) {
|
||||
chooseMonthRef.value.clearData()
|
||||
|
||||
Reference in New Issue
Block a user