fix: 修复cahrt-alert-list页面全屏问题
This commit is contained in:
@@ -78,7 +78,7 @@
|
||||
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination" :append-to-body="false" pop-class="out-popper-fix" style="margin-top: 15px;"></Pagination>
|
||||
</div>
|
||||
<!--全屏-->
|
||||
<el-dialog class="nz-dialog table-chart-dialog" :title="$t('dashboard.panel.view')" :visible.sync="screenModal" width="96%" @close="screenDialogClose" :modal-append-to-body="false">
|
||||
<el-dialog class="nz-dialog table-chart-dialog" id="dialog-alert-massage" :title="$t('dashboard.panel.view')" :visible.sync="screenModal" width="96%" @close="screenDialogClose" :modal-append-to-body="false">
|
||||
<div slot="title">
|
||||
<span class="nz-dialog-title">{{data.name}}</span>
|
||||
<div class="float-right panel-calendar dialog-tool">
|
||||
|
||||
@@ -257,8 +257,7 @@ export default {
|
||||
type: {},
|
||||
// labelLoading:{},
|
||||
that: {},
|
||||
detailList: Boolean,
|
||||
alertTableDialog: Boolean
|
||||
detailList: Boolean
|
||||
},
|
||||
/* watch:{
|
||||
labelLoading: {
|
||||
@@ -333,8 +332,8 @@ export default {
|
||||
const self = this
|
||||
return function (position) {
|
||||
const clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
|
||||
const dialog = document.getElementsByClassName('el-dialog')[2] // 获取元素类名为 el-dialog的元素数组第二个
|
||||
const dialogHeight = dialog.clientHeight // 获取元素窗口
|
||||
const dialog = document.querySelector('#dialog-alert-massage .el-dialog')
|
||||
const dialogHeight = dialog.getBoundingClientRect()
|
||||
const leftOffSetView = this.detailList ? -80 : 10
|
||||
const topOffSetView = this.detailList ? 0 : 0
|
||||
const leftOffSet = this.detailList ? -80 : 10
|
||||
@@ -345,10 +344,10 @@ export default {
|
||||
left: `${position.left + position.width + leftOffSet}px`,
|
||||
top: `${position.top - elHeight + topOffSet}px`
|
||||
}
|
||||
} else if (dialogHeight && this.alertTableDialog) { // dialogHeight 为获取的元素窗口,this.alertTableDialog // 为了判断是alertMessageTable页面使用的组件
|
||||
} else if (dialogHeight) {
|
||||
return {
|
||||
left: `${position.left + position.width - 40}px`,
|
||||
top: `${position.top - 95}px`
|
||||
left: `${position.left + position.width + 10 - dialogHeight.x}px`,
|
||||
top: `${position.top - dialogHeight.y}px`
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user