From 227eb726705b12b5fab80ad6bbd69c063e39922b Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Tue, 19 Jul 2022 19:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E4=BA=91=E5=9B=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ComponentServices.vue | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) 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 + } + }) }) }) }