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 + } + }) } }) })