优化详情展示

main
刘妍 2025-04-29 11:22:42 +08:00
parent 7b57ec7539
commit 6cfb03a85c
1 changed files with 17 additions and 6 deletions

View File

@ -71,11 +71,16 @@
</div> </div>
<!-- 详情 --> <!-- 详情 -->
<div class="data-detail" v-if="showTable == 'detail'"> <div class="data-detail" v-if="showTable == 'detail'">
<a-descriptions title="详情" :column="columnVal"> <div class="detail-content">
<a-descriptions-item v-for="(item, index) in detailData" :key="index" :label="item.label">{{ <a-descriptions title="详情" :column="columnVal">
item.value <a-descriptions-item
}}</a-descriptions-item> v-for="(item, index) in detailData"
</a-descriptions> :key="index"
:label="item.label"
>{{ item.value }}</a-descriptions-item
>
</a-descriptions>
</div>
<div class="detail-button"> <div class="detail-button">
<a-button type="primary" @click="showTable = 'edit'"> 编辑 </a-button> <a-button type="primary" @click="showTable = 'edit'"> 编辑 </a-button>
<a-button type="primary" @click="showTable = ''" danger> 关闭 </a-button> <a-button type="primary" @click="showTable = ''" danger> 关闭 </a-button>
@ -338,7 +343,7 @@
selectVal.value = record; selectVal.value = record;
formState.value = record; formState.value = record;
showTable.value = 'detail'; showTable.value = 'detail';
detailData.value = [];
for (const key in record) { for (const key in record) {
for (var i = 0; i < headData.value.length; i++) { for (var i = 0; i < headData.value.length; i++) {
if (headData.value[i].dataIndex == key) { if (headData.value[i].dataIndex == key) {
@ -558,10 +563,16 @@
position: absolute; position: absolute;
bottom: 30px; bottom: 30px;
right: 40px; right: 40px;
background-color: @component-background;
button { button {
margin-left: 10px; margin-left: 10px;
} }
} }
.detail-content{
overflow-y: scroll;
height: 80vh;
}
} }
.data-edit { .data-edit {
position: absolute; position: absolute;