This commit is contained in:
姚宇浩 2024-09-11 13:56:09 +08:00
parent 7985cf0211
commit 0ee367788d
2 changed files with 56 additions and 52 deletions

View File

@ -49,51 +49,53 @@
<span>状态</span><img :src="lampImages[data.character.zt]" />
</div>
</div>
<el-table
:data="data.tableData"
height="100%"
:key="tableKey"
:header-cell-style="{ background: '#008FCD' }"
@row-click="handleRowClick"
>
<template v-for="item in data.columns" :key="item.label">
<el-table-column
v-if="item.type === 'slot'"
:show-overflow-tooltip="true"
:label="item.label"
:property="item.property"
:width="item.width || ''"
:align="item.align || 'center'"
>
<template #default="scope">
<!-- 状态 -->
<div v-if="item.property == 'zt'">
<div v-for="index in 3" :key="index">
<img
style="width: 30px; height: 30px"
v-if="scope.row.zt == index"
:src="lampImages[index]"
alt="状态"
/>
<div class="table_zt">
<el-table
:data="data.tableData"
height="100%"
:key="tableKey"
:header-cell-style="{ background: '#008FCD' }"
@row-click="handleRowClick"
>
<template v-for="item in data.columns" :key="item.label">
<el-table-column
v-if="item.type === 'slot'"
:show-overflow-tooltip="true"
:label="item.label"
:property="item.property"
:width="item.width || ''"
:align="item.align || 'center'"
>
<template #default="scope">
<!-- 状态 -->
<div v-if="item.property == 'zt'">
<div v-for="index in 3" :key="index">
<img
style="width: 30px; height: 30px"
v-if="scope.row.zt == index"
:src="lampImages[index]"
alt="状态"
/>
</div>
</div>
</div>
<!-- <slot
<!-- <slot
:name="item.property"
:currentCol="item"
:currentData="scope.row"
></slot> -->
</template>
</el-table-column>
<el-table-column
v-else
:property="item.property"
:label="item.label"
:show-overflow-tooltip="true"
:width="item.width || ''"
:align="item.align || 'center'"
/>
</template>
</el-table>
</template>
</el-table-column>
<el-table-column
v-else
:property="item.property"
:label="item.label"
:show-overflow-tooltip="true"
:width="item.width || ''"
:align="item.align || 'center'"
/>
</template>
</el-table>
</div>
</div>
<div class="pagePart">
@ -311,6 +313,7 @@ const handle = (current) => {
border: none;
--el-table-text-color: #fff;
--el-table-header-text-color: #fff;
--el-table-border-color: none !important;
}
// :deep(.el-table th) {
@ -382,4 +385,5 @@ const handle = (current) => {
height: 19px;
}
}
</style>

View File

@ -2956,23 +2956,23 @@ onMounted(() => {
<style lang="scss" scoped>
//
:deep(.el-table) {
background: rgba(32, 64, 115, 1) !important ;
background: rgba(32, 64, 115, 1) ;
color: #ffffff;
--el-table-tr-bg-color: none;
--el-table-header-bg-color: none;
--el-table-header-text-color: none;
border: 1px solid #7aceff;
}
.table {
:deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
border: none !important;
padding-left: 10px !important;
text-align: center;
}
}
:deep(.el-table td.el-table__cell) {
padding: 13px 0px;
// border: 1px solid #7aceff;
}
// .table {
// :deep(.el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf) {
// border: none !important;
// padding-left: 10px !important;
// text-align: center;
// }
// }
// :deep(.el-table td.el-table__cell) {
// padding: 13px 0px;
// }
:deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
background-color: #2f4b74;