邓洁: 传感器数据监控
This commit is contained in:
@@ -60,8 +60,9 @@ let myEcharts = reactive({});
|
||||
const isVisited = ref(false);
|
||||
const eleData = ref([])
|
||||
const electricityConsumptionMonthly = ref()
|
||||
const monthlySavings = ref(55555)
|
||||
const valueA = ref(electricityConsumptionMonthly.value);
|
||||
const monthlySavings = ref(5)
|
||||
const length = ref(null);
|
||||
const valueA = ref();
|
||||
const valueB = ref(monthlySavings.value);
|
||||
const bgImage = computed(() =>
|
||||
isVisited.value
|
||||
@@ -70,6 +71,7 @@ const bgImage = computed(() =>
|
||||
);
|
||||
watch(() => props.eleData, (now) => {
|
||||
getBasicData(now.frequencyChangerList)
|
||||
// setValue()
|
||||
}, {deep: true});
|
||||
watch(() => props.list, (now) => {
|
||||
eleData.value.forEach(item => {
|
||||
@@ -84,7 +86,23 @@ watch(() => props.list, (now) => {
|
||||
}
|
||||
})
|
||||
})
|
||||
// setValue()
|
||||
}, {deep: true});
|
||||
onMounted(()=>{
|
||||
// setValue()
|
||||
})
|
||||
const setValue=()=> {
|
||||
let width = (electricityConsumptionMonthly.value * length.value.offsetHeight) / 10000;
|
||||
console.log('width',electricityConsumptionMonthly.value,width)
|
||||
valueA.value.style.height = `${width}px`;
|
||||
// let flag = (params.wp.point * length.value.offsetWidth) / params.wp.max;
|
||||
// point.value.style.left = `${flag}px`;
|
||||
// if (width >= flag) {
|
||||
// value.value.style.background = "#F53839";
|
||||
// } else {
|
||||
// value.value.style.background = "#60DDDE";
|
||||
// }
|
||||
}
|
||||
const getBasicData = (data) => {
|
||||
let tranObj = {}
|
||||
let tranArr = []
|
||||
|
||||
Reference in New Issue
Block a user