diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue index f67ac56..b390ecc 100644 --- a/src/components/content/usedEle/UsedEle.vue +++ b/src/components/content/usedEle/UsedEle.vue @@ -60,7 +60,7 @@ let myEcharts = reactive({}); const isVisited = ref(false); const eleData = ref([]) const electricityConsumptionMonthly = ref() -const monthlySavings = ref(5) +const monthlySavings = ref(4000) const length = ref(null); const valueA = ref(); const valueB = ref(monthlySavings.value); @@ -71,7 +71,7 @@ const bgImage = computed(() => ); watch(() => props.eleData, (now) => { getBasicData(now.frequencyChangerList) - setValue() + setValueA() }, {deep: true}); watch(() => props.list, (now) => { eleData.value.forEach(item => { @@ -86,18 +86,18 @@ watch(() => props.list, (now) => { } }) }) - setValue() + setValueA() }, {deep: true}); onMounted(()=>{ setValueA() setValueB() }) const setValueA=()=> { - let width = (5000 * length.value.offsetHeight) / 10000; + let width = (electricityConsumptionMonthly.value * length.value.offsetHeight) / 10000; valueA.value.style.height = `${width}px`; } const setValueB=()=> { - let width = (8000 * length.value.offsetHeight) / 10000; + let width = (4000 * length.value.offsetHeight) / 10000; valueB.value.style.height = `${width}px`; } const getBasicData = (data) => {