已经完成自适应高度的预警

This commit is contained in:
yanyizhou
2021-11-24 11:02:49 +08:00
parent 221cadb3c1
commit 569469b865
+22 -12
View File
@@ -113,11 +113,12 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div class="content" style="height: 100%"> <div class="content">
<!-- <el-divider content-position="left" class="dynamic-child-title">实施日期预警</el-divider>--> <!-- <el-divider content-position="left" class="dynamic-child-title">实施日期预警</el-divider>-->
<el-table <el-table
:data="newItems" :data="newItems"
height="335px" style="overflow-y: auto;"
:height="warningTableHeight"
border border
:resizable="false" :resizable="false"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}" :header-cell-style="{background: '#f8f8f9', color: '#515a6e'}"
@@ -369,6 +370,7 @@ export default {
name: "standardWarning", name: "standardWarning",
data() { data() {
return { return {
warningTableHeight: '',
applyArcticOptions: [], // 适用车型下拉框 applyArcticOptions: [], // 适用车型下拉框
isShowBtn: true, isShowBtn: true,
activeName: "STANDARD", //tab 默认选中值 activeName: "STANDARD", //tab 默认选中值
@@ -764,9 +766,14 @@ export default {
}, },
watch: {}, watch: {},
mounted() { mounted() {
this.height = $(".content").height() * 1.8; this.warningTableHeight = $(window).height()*0.54
window.onresize = () => { window.onresize = () => {
this.height = $(".content").height() * 1.8; this.warningTableHeight = $(window).height()*0.54;
};
// alert(this.warningTableHeight)
this.height = $(".content").height();
window.onresize = () => {
this.height = $(".content").height();
}; };
//从数据库中查询下拉框数据 //从数据库中查询下拉框数据
this.$http.get("sys/dictype/getDicTypeListCode", {}, { this.$http.get("sys/dictype/getDicTypeListCode", {}, {
@@ -1055,6 +1062,17 @@ export default {
// } // }
} }
.content {
padding-bottom: 10px;
height: calc(~'100% - 40px');
/deep/ .el-button--mini {
padding: 5px 7px;
font-size: 8px;
}
}
.dynamic-loop-container { .dynamic-loop-container {
position: relative; position: relative;
min-height: 160px; min-height: 160px;
@@ -1134,15 +1152,7 @@ export default {
} }
} }
.content {
padding-bottom: 10px;
height: calc(~'100% - 40px');
/deep/ .el-button--mini {
padding: 5px 7px;
font-size: 8px;
}
}
} }
::v-deep { ::v-deep {