[update 87469] 首页完善

This commit is contained in:
danshihao
2024-08-06 16:14:20 +08:00
parent e8cf4f5098
commit a4ac52a99c
3 changed files with 48 additions and 1 deletions
+2
View File
@@ -112,6 +112,8 @@ export default {
@media screen and (max-width: 1366px) {
.all-wrapper {
height: calc(100vh - 60px - 8px - 20px + 200px);
// 友情链接部分减少了12像素
grid-template-rows: 56px 180px minmax(200px, auto) 168px;
}
/deep/ .top-wrapper {
.left-p {
@@ -108,4 +108,22 @@ export default {
white-space: nowrap;
}
}
// 1366屏幕
@media screen and (max-width: 1366px) {
@itemSize: 52px;
.content-wrapper {
grid-gap: calc((100% - (6 * @itemSize)) / 5);
}
.content-div > span {
.icon-img {
width: @itemSize;
height: @itemSize;
}
p {
width: @itemSize;
}
}
}
</style>
@@ -16,6 +16,7 @@
:columns="showColumns"
:dataSource="dataSource"
:pagination="ipagination"
:components="components"
@change="handleTableChange"
:loading="loading">
<template slot="text" slot-scope="text">
@@ -316,6 +317,11 @@ export default {
showSizeChanger: true,
total: 0
},
components: {
header: {
cell: this.initHeader(this.columns)
}
},
url: {
list: '/laws/localTool/standardEarlyWarning/newModelImplementation'
}
@@ -327,6 +333,27 @@ export default {
// this.loadData(1)
},
methods: {
// 自定义渲染表头(表头换行影响高度)
initHeader () {
return (h, props, children, abc) => {
// 获取列的key值和特性
const { key, ...restProps } = props
const col = this.columns.find(col => col.dataIndex === key)
if (col) {
return (
<th {...restProps}>
<a-tooltip overlay-class-name="tooltip-style">
<template slot="title">{col.title}</template>
<div class="table-text">{col.title}</div>
</a-tooltip>
</th>
)
}
return (
<th {...restProps}>{children}</th>
)
}
},
// 获取标准状态
getStandardStateStyle (row) {
let color = ''
@@ -413,7 +440,7 @@ export default {
this.dataSource = []
this.warningTab = value
this.showColumns = this.columns.filter(col => col.show ? col.show() : true).map(item => {
return Object.assign({}, item, { show: undefined })
return Object.assign({}, item, { show: undefined, ellipsis: true })
})
this.loadData(1)
},