Merge pull request '邓洁: 修改用电量' (#185) from dengjie into dev

Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/185
This commit is contained in:
odjbin
2023-12-24 10:09:07 +00:00

View File

@@ -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) => {