|
@ -10,7 +10,7 @@ const props = defineProps({ |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
const solutionStyle = computed(() => { |
|
|
const solutionStyle = computed(() => { |
|
|
const difference = props.data.capacityUsed / props.data.capacityTotal |
|
|
|
|
|
|
|
|
const difference = (props.data.capacityTotal - props.data.capacityUsed) / props.data.capacityTotal |
|
|
const process = 100 - (difference * 100) |
|
|
const process = 100 - (difference * 100) |
|
|
const filter = difference > 0.4 ? 'hue-rotate(270deg) saturate(100) brightness(81%)' : difference > 0.1 ? 'hue-rotate(150deg) saturate(100)' : 'hue-rotate(120deg) saturate(100)' |
|
|
const filter = difference > 0.4 ? 'hue-rotate(270deg) saturate(100) brightness(81%)' : difference > 0.1 ? 'hue-rotate(150deg) saturate(100)' : 'hue-rotate(120deg) saturate(100)' |
|
|
return { |
|
|
return { |
|
@ -19,7 +19,7 @@ const solutionStyle = computed(() => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const percentage = computed(() => Number((props.data.capacityUsed / props.data.capacityTotal).toFixed(2)) * 100) |
|
|
|
|
|
|
|
|
const percentage = computed(() => Number(((props.data.capacityTotal - props.data.capacityUsed) / props.data.capacityTotal).toFixed(2)) * 100) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|