diff --git a/front/src/views/capabilityCloud/components/ComponentServices.vue b/front/src/views/capabilityCloud/components/ComponentServices.vue index 4e0f6215..799722d6 100644 --- a/front/src/views/capabilityCloud/components/ComponentServices.vue +++ b/front/src/views/capabilityCloud/components/ComponentServices.vue @@ -393,15 +393,14 @@ //组件服务数量接口 const NumberOfComponentServices = () => { assemblerBaseStatic().then((res) => { - snum.value[0].num = res.data.data[0].amount res.data.data.map((item, index) => { - if (index != 0) { - servicesSnum.value.map((servicesSnumitem, servicesSnumindex) => { - if (servicesSnumitem.type == item.type) { - servicesSnum.value[servicesSnumindex].amount = item.amount - } - }) - } + servicesSnum.value.map((servicesSnumitem, servicesSnumindex) => { + if (servicesSnumitem.type == item.type) { + servicesSnum.value[servicesSnumindex].amount = item.amount + } else if (item.type == '上架总数') { + snum.value[0].num = item.amount + } + }) }) }) }