ifx: 门户详情 --资源key更改

This commit is contained in:
guoyue 2022-08-11 09:33:21 +08:00
parent 0b718307d8
commit 810e183611
2 changed files with 9 additions and 7 deletions

View File

@ -3,7 +3,7 @@
<div class="img" :style="{ 'background-image': `url(${abilityInfo.bgImg || ''})` }"></div>
<div class="list-box" v-if="abilityInfo.list.length">
<div class="list-item" v-for="(item, i) in abilityInfo.list" :key="i" :class="i % 2 == 0 ? 'one' : ''">
{{ item }}</div>
{{ (item || item === 0) ? item : '--' }}</div>
</div>
<div class="no-data" v-else>
<a-empty description="暂无数据" />
@ -15,8 +15,6 @@ const props = defineProps({
abilityInfo: { type: Object, default: () => { } },
})
console.log('abilityInfo------------>', props.abilityInfo);
</script>
<style lang="less" scoped>

View File

@ -80,21 +80,25 @@ const abilityList = ref([
{
name: '数据资源',
bgImg: require('../../assets/home/integration/sjzyDetail.png'),
list: []
list: [],
showTextKey: 'zyname',
},
{
name: '组件服务',
bgImg: require('../../assets/home/integration/zjfwDetail.png'),
list: []
list: [],
showTextKey: 'name',
},
{
name: '基础设施',
bgImg: require('../../assets/home/integration/jcssDetail.png'),
list: []
list: [],
showTextKey: 'channelName',
},
])
const imgUrl = ref('')
// --
const getIntegrationServicesDeatil = (id) => {
loadingPage.value = true
@ -110,7 +114,7 @@ const getIntegrationServicesDeatil = (id) => {
let fuseResourceList = detailInfoObj.value.fuseResourceList || []
abilityList.value.map(v => {
let list = fuseResourceList.filter(x => x.type == v.name) || [];
v.list = list.map(v => v.resource && v.resource.channelName) || []
v.list = list.map(x => x.resource && x.resource[v.showTextKey]) || []
})
let imgList = detailInfoObj.value.fuseAttrList.filter((val) => val.attrType == '服务图片') || []
imgUrl.value = imgList[0] && imgList[0].attrValue || ''