应用资源详情bug

This commit is contained in:
851673013@qq.com 2022-07-04 10:38:50 +08:00
parent 5f0aec483b
commit e849f37f1e
5 changed files with 44 additions and 12 deletions

View File

@ -14,6 +14,7 @@
<!-- 导航 --> <!-- 导航 -->
<application-navigation <application-navigation
:dataList="dataList.data" :dataList="dataList.data"
:associatedComponents="associatedComponents"
:class="{ fixed: scrollTop >= 600 }" :class="{ fixed: scrollTop >= 600 }"
:selectNow="selectNow" :selectNow="selectNow"
></application-navigation> ></application-navigation>
@ -28,6 +29,7 @@
:dataList="dataList.data" :dataList="dataList.data"
id="application-associated-components" id="application-associated-components"
class="scrollBox" class="scrollBox"
v-if="false"
></application-associated-components> ></application-associated-components>
<!-- 关联能力 --> <!-- 关联能力 -->
<application-associated-ability <application-associated-ability

View File

@ -125,7 +125,6 @@
navList.value.filter((item) => item.name === list.value[0]) navList.value.filter((item) => item.name === list.value[0])
) )
if (navList.value.filter((item) => item.name === list.value[0])[0]) { if (navList.value.filter((item) => item.name === list.value[0])[0]) {
debugger
select.value = navList.value.filter( select.value = navList.value.filter(
(item) => item.name === list.value[0] (item) => item.name === list.value[0]
)[0].key )[0].key

View File

@ -46,7 +46,11 @@
}, },
}) })
} }
if (props.associatedComponents) { if (
props.associatedComponents[0].dataList.length > 0 ||
props.associatedComponents[1].dataList.length > 0 ||
props.associatedComponents[2].dataList.length > 0
) {
flag.value = true flag.value = true
dataFrom.value = props.associatedComponents dataFrom.value = props.associatedComponents
console.log('dataFrom.value', dataFrom.value) console.log('dataFrom.value', dataFrom.value)

View File

@ -32,10 +32,10 @@
name: '功能介绍', name: '功能介绍',
key: 'function-introduction', key: 'function-introduction',
}, },
{ // {
name: '关联组件', // name: '',
key: 'application-associated-components', // key: 'application-associated-components',
}, // },
{ {
name: '关联组件', name: '关联组件',
key: 'application-associated-ability', key: 'application-associated-ability',
@ -60,6 +60,7 @@
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
associatedComponents: { type: Array, default: null },
}) })
const select = ref('algorithm-display') const select = ref('algorithm-display')
const list = ref([]) const list = ref([])
@ -85,7 +86,17 @@
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联组件') {
if (
props.associatedComponents[0].dataList.length != 0 ||
props.associatedComponents[1].dataList.length != 0 ||
props.associatedComponents[2].dataList.length != 0
) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
select.value = navList.value.filter( select.value = navList.value.filter(
@ -122,7 +133,17 @@
navList.value.forEach((item) => { navList.value.forEach((item) => {
console.log(item) console.log(item)
if (list.value.indexOf(item.name) > -1) { if (list.value.indexOf(item.name) > -1) {
item.show = true if (item.name == '关联组件') {
if (
props.associatedComponents[0].dataList.length != 0 ||
props.associatedComponents[1].dataList.length != 0 ||
props.associatedComponents[2].dataList.length != 0
) {
item.show = true
}
} else {
item.show = true
}
} }
}) })
if (list.value.length > 0) { if (list.value.length > 0) {

View File

@ -73,9 +73,12 @@
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' || item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' || item.attrType === '服务商联系电话' ||
item.attrType === '服务商名' item.attrType.indexOf('服务商名') != -1
) { ) {
if (item.attrType === '服务商' || item.attrType === '服务商名') { if (
item.attrType === '服务商' ||
item.attrType.indexOf('服务商名') != -1
) {
dataFrom.value.content[1].childrenContent[0] = item dataFrom.value.content[1].childrenContent[0] = item
if (dataFrom.value.content[1].childrenContent[0].attrValue == '') { if (dataFrom.value.content[1].childrenContent[0].attrValue == '') {
dataFrom.value.content[1].childrenContent[0].attrValue = '------' dataFrom.value.content[1].childrenContent[0].attrValue = '------'
@ -121,9 +124,12 @@
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' || item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' || item.attrType === '服务商联系电话' ||
item.attrType === '服务商名' item.attrType.indexOf('服务商名') != -1
) { ) {
if (item.attrType === '服务商' || item.attrType === '服务商名') { if (
item.attrType === '服务商' ||
item.attrType.indexOf('服务商名') != -1
) {
dataFrom.value.content[1].childrenContent.push(item) dataFrom.value.content[1].childrenContent.push(item)
if ( if (
dataFrom.value.content[1].childrenContent[0].attrValue == '' dataFrom.value.content[1].childrenContent[0].attrValue == ''