【详情】guid和没数据的不显示,弹框详情固定高度

dianlixunjian
Zhufu 2024-06-21 15:20:24 +08:00
parent a7d2846604
commit 51e2868d9b
2 changed files with 33 additions and 31 deletions

View File

@ -11,23 +11,21 @@
'word-break': 'break-all'
}">
<template v-for="(item, index) in tab.children" :key="index">
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
<a-image
v-if="item.infoShowValue"
width="100px"
height="100px"
:src="`${item.componentProps.server}/${item.infoShowValue}`"
></a-image>
<div v-else style="opacity: 0.3; user-select: none;">{{"(暂无)"}}</div>
</a-descriptions-item>
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
<img v-if="item.infoShowValue" style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
<div v-else style="opacity: 0.3; user-select: none;">{{"(暂无)"}}</div>
</a-descriptions-item>
<a-descriptions-item v-else :label="item.label">
<div v-if="item.infoShowValue">{{ item.infoShowValue}}</div>
<div v-else style="opacity: 0.3; user-select: none;">{{"(暂无)"}}</div>
</a-descriptions-item>
<template v-if="item.infoShowValue">
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
<a-image
width="100px"
height="100px"
:src="`${item.componentProps.server}/${item.infoShowValue}`"
></a-image>
</a-descriptions-item>
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
<img style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
</a-descriptions-item>
<a-descriptions-item v-else :label="item.label">
<div>{{ item.infoShowValue}}</div>
</a-descriptions-item>
</template>
</template>
</a-descriptions>
</a-tab-pane>
@ -43,17 +41,19 @@
'word-break': 'break-all'
}">
<template v-for="(item, index) in showList" :key="index">
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
<a-image
width="100px"
height="100px"
:src="`${item.componentProps.server}/${item.infoShowValue}`"
></a-image>
</a-descriptions-item>
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
<img v-if="item.infoShowValue" style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
</a-descriptions-item>
<a-descriptions-item v-else :label="item.label">{{ item.infoShowValue }}</a-descriptions-item>
<template v-if="item.infoShowValue">
<a-descriptions-item v-if="item.component === 'ImageUpload'" :label="item.label">
<a-image
width="100px"
height="100px"
:src="`${item.componentProps.server}/${item.infoShowValue}`"
></a-image>
</a-descriptions-item>
<a-descriptions-item v-else-if="item.component === 'VideoUpload'" :label="item.label">
<img style="width: 100px; height: 100px; cursor: pointer;" src="./video.png" @click="handlePreview(item)" alt="">
</a-descriptions-item>
<a-descriptions-item v-else :label="item.label">{{ item.infoShowValue }}</a-descriptions-item>
</template>
</template>
</a-descriptions>
<a-table v-if="subTableData" :columns="columns" :data-source="props.data.infoUseSubTableData" :pagination="false"></a-table>
@ -113,7 +113,7 @@ onMounted(() => {
...childItem,
infoShowValue: getOptionLabel(childItem)
})
}else{
}else if(childItem.component !== 'InputGuid'){
showList.value[tabIndex].children.push({
...childItem,
infoShowValue: props.data.infoUseMainTableData[childItem.field]
@ -155,7 +155,7 @@ onMounted(() => {
key: child.field,
})
})
}else{
}else if(item.component !== 'InputGuid'){
showList.value.push({
...item,
infoShowValue: props.data.infoUseMainTableData[item.field]

View File

@ -1042,6 +1042,8 @@
z-index: 999;
}
.content{
padding: 30px;
padding: 30px;
height: 750px;
overflow: auto;
}
</style>