fix: alertLabel页面增加判断,区分alertMessage页面,和chart-alert-lis全屏t页面
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
:fromPath="'/alertList'"
|
||||
style="height: calc(100% - 50px)"
|
||||
:showOption="false"
|
||||
:chart-alert-list="true"
|
||||
></alertMessageTable>
|
||||
<Pagination :pageObj="screenPageObj" @pageNo='screenPageNo' @pageSize='screenPageSize' ref="Pagination" ></Pagination>
|
||||
<loading :ref="'localLoadingScreen'+chartIndex"></loading>
|
||||
|
||||
@@ -257,7 +257,8 @@ export default {
|
||||
type: {},
|
||||
// labelLoading:{},
|
||||
that: {},
|
||||
detailList: Boolean
|
||||
detailList: Boolean,
|
||||
alertTableDialog: Boolean
|
||||
},
|
||||
/* watch:{
|
||||
labelLoading: {
|
||||
@@ -332,24 +333,28 @@ 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.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
|
||||
const topOffSet = this.detailList ? 70 : 0
|
||||
const leftOffSet = this.detailList ? -80 : 20
|
||||
const topOffSet = this.detailList ? 45 : 0
|
||||
const elHeight = self.type === 'asset' ? 318 : (self.type === 'project' ? 70 : 70)
|
||||
if (position.top + elHeight > clientHeight) {
|
||||
console.log(leftOffSet, topOffSet)
|
||||
return {
|
||||
left: `${position.left + position.width + leftOffSet}px`,
|
||||
top: `${position.top - elHeight + topOffSet}px`
|
||||
}
|
||||
} else if (dialogHeight) {
|
||||
return {
|
||||
left: `${position.left + position.width + 10 - dialogHeight.x}px`,
|
||||
top: `${position.top - dialogHeight.y}px`
|
||||
} else if (this.alertTableDialog) {
|
||||
const dialog = document.querySelector('#dialog-alert-massage .el-dialog')
|
||||
const dialogHeight = dialog.getBoundingClientRect()
|
||||
if (dialogHeight) {
|
||||
return {
|
||||
left: `${position.left + position.width + 10 - dialogHeight.x}px`,
|
||||
top: `${position.top - dialogHeight.y}px`
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(leftOffSetView, topOffSetView)
|
||||
return {
|
||||
left: `${position.left + position.width + leftOffSetView}px`,
|
||||
top: `${position.top + topOffSetView}px`
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
:id="scope.row[item.label].id"
|
||||
:that="scope.row[item.label]"
|
||||
:type="item.label"
|
||||
:alert-table-dialog="true"
|
||||
:alert-table-dialog="chartAlertList"
|
||||
></alertLabel>
|
||||
</span>
|
||||
</template>
|
||||
@@ -163,7 +163,8 @@ export default {
|
||||
default: true
|
||||
},
|
||||
alertMessageTabNew: Boolean,
|
||||
loading: Boolean
|
||||
loading: Boolean,
|
||||
chartAlertList: Boolean
|
||||
},
|
||||
mixins: [table, bus],
|
||||
data () {
|
||||
|
||||
Reference in New Issue
Block a user