From 68ddce31302e6b64aac34a27a5fee2355ca69264 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Mon, 4 Jul 2022 17:15:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/detailsAll/ApplicationDetails.vue | 14 +- .../src/views/detailsAll/BusinessDetails.vue | 3 + .../views/detailsAll/DeveloperComponents.vue | 27 ++-- front/src/views/detailsAll/LayerService.vue | 1 + .../Algorithm/AlgorithmAssociatedAbility.vue | 36 ++++-- .../ApplicationAssociatedAbility.vue | 120 ++++++++++-------- .../Application/ApplicationNavigation.vue | 26 ++-- .../Business/BusinessAssociatedAbility.vue | 56 +++++--- .../Business/BusinessNavigation.vue | 8 +- .../Developer/DeveloperAssociatedAbility.vue | 59 ++++++--- .../Developer/DeveloperNavigation.vue | 31 ++--- 11 files changed, 232 insertions(+), 149 deletions(-) diff --git a/front/src/views/detailsAll/ApplicationDetails.vue b/front/src/views/detailsAll/ApplicationDetails.vue index 5589ab37..bd5f757d 100644 --- a/front/src/views/detailsAll/ApplicationDetails.vue +++ b/front/src/views/detailsAll/ApplicationDetails.vue @@ -33,7 +33,8 @@ > @@ -84,11 +85,8 @@ import { useRouter } from 'vue-router' import { updateVisits, selectOne, queryPartAppByKeyId } from '@/api/home' import mybus from '@/myplugins/mybus' - const associatedComponents = ref([ - { type: '组件服务', dataList: [] }, - { type: '数据资源', dataList: [] }, - { type: '基础设施', dataList: [] }, - ]) + const associatedComponents = ref([{ type: '组件服务', dataList: [] }]) + let loading = ref(true) const router = useRouter() const scrollTop = ref(0) const domArr = ref([]) @@ -164,7 +162,9 @@ type: item.type, } queryPartAppByKeyId(queryPartAppByKeyIdParams).then((res) => { - associatedComponents.value[index].dataList = res.data.data + associatedComponents.value[0].dataList = res.data.data + debugger + loading.value = false }) }) } else if (obj) { diff --git a/front/src/views/detailsAll/BusinessDetails.vue b/front/src/views/detailsAll/BusinessDetails.vue index 00a0434f..c630e25c 100644 --- a/front/src/views/detailsAll/BusinessDetails.vue +++ b/front/src/views/detailsAll/BusinessDetails.vue @@ -18,6 +18,7 @@ > { associatedComponents.value[index].dataList = res.data.data + loading.value = false }) }) } else if (obj) { diff --git a/front/src/views/detailsAll/DeveloperComponents.vue b/front/src/views/detailsAll/DeveloperComponents.vue index 2047bcbd..cd9fcbe3 100644 --- a/front/src/views/detailsAll/DeveloperComponents.vue +++ b/front/src/views/detailsAll/DeveloperComponents.vue @@ -12,7 +12,7 @@ @@ -24,6 +24,7 @@ > { if (id) { + let queryPartAppByKeyIdParams = { + keyId: id, + } + queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => { + associatedComponents.value[0].dataList = res.data.data + debugger + loading.value = false + }) selectOne(id).then((res) => { // console.clear() dataList.data = res.data.data @@ -147,20 +156,18 @@ }) } }) - associatedComponents.value.map((item, index) => { - let queryPartAppByKeyIdParams = { - keyId: id, - } - queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => { - associatedComponents.value[index].dataList = res.data.data - }) - }) + associatedComponents.value.map((item, index) => {}) } else if (obj) { dataList.data = obj console.log('预览==============', obj) } } init(id) + const associatedComponentsFunction = () => { + if (associatedComponents.value[0].dataList.length > 0) { + return associatedComponents.value + } + } onBeforeUnmount(() => { mybus.off('flyToView') }) diff --git a/front/src/views/detailsAll/LayerService.vue b/front/src/views/detailsAll/LayerService.vue index 2411a090..7906c466 100644 --- a/front/src/views/detailsAll/LayerService.vue +++ b/front/src/views/detailsAll/LayerService.vue @@ -154,6 +154,7 @@ keyId: id, } queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => { + debugger associatedComponents.value[index].dataList = res.data.data }) }) diff --git a/front/src/views/detailsAll/components/Algorithm/AlgorithmAssociatedAbility.vue b/front/src/views/detailsAll/components/Algorithm/AlgorithmAssociatedAbility.vue index 023501d8..a39683c2 100644 --- a/front/src/views/detailsAll/components/Algorithm/AlgorithmAssociatedAbility.vue +++ b/front/src/views/detailsAll/components/Algorithm/AlgorithmAssociatedAbility.vue @@ -8,13 +8,19 @@ :key="dataListitem.id" @click="switchFunction(dataListitem.id)" > -
- {{ dataListitem.name }} -
-
-
- {{ dataListitem.description }} + + +
+ {{ dataListitem.name }}
+
+
+ + +
+ {{ dataListitem.description }} +
+
@@ -40,7 +46,7 @@ // id: id, // }, // }) - window.open(window.SITE_CONFIG.previewUrl+ '#/details?id=' + id) + window.open(window.SITE_CONFIG.previewUrl + '#/details?id=' + id) // alert(id) } console.log('这个是空值', props.associatedComponents[0]) @@ -85,21 +91,29 @@ .application-associated-ability-main { margin-top: 0.4rem; width: 13.3rem; - display: flex; - justify-content: space-around; + display: grid; + grid-template-columns: repeat(4, 25%); .associated-ability-card { width: 3.2rem; + height: 2.78rem; display: flex; flex-direction: column; align-items: center; border: 1px solid #e4e6f5; border-radius: 0.1rem; padding-bottom: 0.3rem; + margin-right: 0.2rem; + margin-top: 0.2rem; cursor: pointer; .associated-ability-card-title { + width: 2.2rem; padding-top: 0.3rem; font-size: 0.22rem; text-align: center; + display: -webkit-box; + overflow: hidden; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; } .associated-ability-card-content { width: 100%; @@ -111,6 +125,10 @@ margin-right: 0.15rem; margin-top: 0.15rem; text-align: center; + display: -webkit-box; + overflow: hidden; + -webkit-line-clamp: 5; + -webkit-box-orient: vertical; } } } diff --git a/front/src/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue b/front/src/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue index e73ed586..91e0360b 100644 --- a/front/src/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue +++ b/front/src/views/detailsAll/components/Application/ApplicationAssociatedAbility.vue @@ -1,25 +1,28 @@