From 8ca44d69cb1cdd2919c37ef5a12d113eca0984eb Mon Sep 17 00:00:00 2001 From: xuyiming Date: Thu, 9 Jul 2020 09:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=A1-=E4=BA=91=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=B8=BB=E9=A1=B5=E4=BB=AA=E8=A1=A8=E5=9B=BE?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=A7=84=E5=88=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/workbench/fwgl/fwglList.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/pages/workbench/fwgl/fwglList.vue b/src/pages/workbench/fwgl/fwglList.vue index 0c1f21e..fccd788 100644 --- a/src/pages/workbench/fwgl/fwglList.vue +++ b/src/pages/workbench/fwgl/fwglList.vue @@ -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 (percent >= 80) { - colors = ["#e3606d", "#f6d0d0"]; + 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 { -- 2.26.0