From 111aa1669265fde6062d4cb15bc5f0792441f44f Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Wed, 29 Jun 2022 10:06:00 +0800 Subject: [PATCH] bug269 --- .../components/ComponentServices.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/front/src/views/capabilityCloud/components/ComponentServices.vue b/front/src/views/capabilityCloud/components/ComponentServices.vue index 45b9d294..32fdaf2e 100644 --- a/front/src/views/capabilityCloud/components/ComponentServices.vue +++ b/front/src/views/capabilityCloud/components/ComponentServices.vue @@ -127,7 +127,12 @@ let dataclick = ref('total') let dataList = ref([]) let timeSwitchindex = ref('周') - let servicesSnum = ref([]) + let servicesSnum = ref([ + { amount: '', type: '智能算法' }, + { amount: '', type: '图层服务' }, + { amount: '', type: '开发组件' }, + { amount: '', type: '业务组件' }, + ]) let callTheTrendData = ref({ time: [], snum: [] }) //年月切换 const timeSwitch = (name) => { @@ -302,7 +307,11 @@ snum.value[0].num = res.data.data[0].amount res.data.data.map((item, index) => { if (index != 0) { - servicesSnum.value.push(item) + servicesSnum.value.map((servicesSnumitem, servicesSnumindex) => { + if (servicesSnumitem.type == item.type) { + servicesSnum.value[servicesSnumindex].amount = item.amount + } + }) } }) })