From 14101bd42ce17dfb9d951d0738abe9d303fb3fe5 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 11 十二月 2023 10:41:39 +0800 Subject: [PATCH] 机器开机率、人员技能比饼图优化 --- src/views/cockpitPage/components/StatisticalBox.vue | 59 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/views/cockpitPage/components/StatisticalBox.vue b/src/views/cockpitPage/components/StatisticalBox.vue index f456aaa..851656a 100644 --- a/src/views/cockpitPage/components/StatisticalBox.vue +++ b/src/views/cockpitPage/components/StatisticalBox.vue @@ -2,14 +2,17 @@ <div class="statistical-box"> <div v-for="item in allList" class="all-bg"> <div class="box"> - <div class="commom-title">{{ item.title }}</div> + <div class="commom-title">{{ item.label }}</div> <div + v-if="item.label == '鐗╂枡涓嶈冻/寰呮帓绋�'" + class="commom-value redColor" + > + {{ item.value }}/{{ item.value1 }} + </div> + <div + v-else class="commom-value" - :class=" - item.title == '寤舵湡浜や粯' || item.title == '鐗╂枡涓嶈冻' - ? 'redColor' - : '' - " + :class="item.label == '寤舵湡浜や粯' ? 'redColor' : ''" > {{ item.value }} </div> @@ -21,18 +24,40 @@ <script> export default { components: {}, - props: {}, - data() { - return { - allList: [ - { title: "寮�鏈哄彴鏁�", value: 200 }, - { title: "鎬讳骇閲�", value: 1200 }, - { title: "鐢熶骇宸ュ崟鏁�", value: 200 }, - { title: "寤舵湡浜や粯", value: 20 }, - { title: "鐗╂枡涓嶈冻", value: 10 }, - { title: "璁″垝杈炬垚鐜�", value: 2 }, + props: { + allList: { + type: Array, + default: () => [ + { + value: 200, + label: "寮�鏈哄彴鏁�", + }, + { + value: 1200, + label: "鎬讳骇閲�", + }, + { + value: 200, + label: "鐢熶骇宸ュ崟鏁�", + }, + { + value: 20, + label: "寤舵湡浜や粯", + }, + { + value: 10, + value1: 0, + label: "鐗╂枡涓嶈冻/寰呮帓绋� ", + }, + { + value: 2, + label: "璁″垝杈炬垚鐜�", + }, ], - }; + }, + }, + data() { + return {}; }, mounted() {}, watch: {}, -- Gitblit v1.8.0