Commit 8ca44d69 authored by 徐一鸣's avatar 徐一鸣

超管-云资源管理主页仪表图颜色规则调整

parent 57d4562f
......@@ -1494,10 +1494,22 @@ export default {
},
getDashboardOption(item) {
let percent = Math.round((item.value / item.total) * 100) || 0;
let colors = ["#515fe7", "#e7ecfd"];
let colors = [];
if (this.level == 2) {
if (percent >= 80) {
colors = ["#e3606d", "#f6d0d0"];
} else {
colors = ["#515fe7", "#e7ecfd"];
}
} else {
if (percent >= 80) {
colors = ["#e3606d", "#f6d0d0"];
} else if (percent >= 60) {
colors = ["#ef9535", "#fcefd8"];
} else {
colors = ["#515fe7", "#e7ecfd"];
}
}
return {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment