Merge remote-tracking branch 'origin/dev-3.1' into dev-3.1.1_theme

# Conflicts:
#	nezha-fronted/src/components/common/labelFilter/clickSearch.vue
This commit is contained in:
chenjinsong
2021-11-01 18:32:30 +08:00
3 changed files with 126 additions and 8 deletions

View File

@@ -75,7 +75,7 @@
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination" :append-to-body="false" pop-class="out-popper-fix" style="margin-top: 15px;"></Pagination> <Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination" :append-to-body="false" pop-class="out-popper-fix" style="margin-top: 15px;"></Pagination>
</div> </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"> <div slot="title">
<span class="nz-dialog-title">{{data.name}}</span> <span class="nz-dialog-title">{{data.name}}</span>
<div class="float-right panel-calendar dialog-tool"> <div class="float-right panel-calendar dialog-tool">

View File

@@ -257,8 +257,7 @@ export default {
type: {}, type: {},
// labelLoading:{}, // labelLoading:{},
that: {}, that: {},
detailList: Boolean, detailList: Boolean
alertTableDialog: Boolean
}, },
data () { data () {
return { return {
@@ -296,8 +295,8 @@ export default {
const self = this const self = this
return function (position) { return function (position) {
const clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight const clientHeight = (document.body.clientHeight < document.documentElement.clientHeight) ? document.body.clientHeight : document.documentElement.clientHeight
const dialog = document.getElementsByClassName('el-dialog')[2] // 获取元素类名为 el-dialog的元素数组第二个 const dialog = document.querySelector('#dialog-alert-massage .el-dialog')
const dialogHeight = dialog.clientHeight // 获取元素窗口 const dialogHeight = dialog.getBoundingClientRect()
const leftOffSetView = this.detailList ? -80 : 10 const leftOffSetView = this.detailList ? -80 : 10
const topOffSetView = this.detailList ? 0 : 0 const topOffSetView = this.detailList ? 0 : 0
const leftOffSet = this.detailList ? -80 : 10 const leftOffSet = this.detailList ? -80 : 10
@@ -308,10 +307,10 @@ export default {
left: `${position.left + position.width + leftOffSet}px`, left: `${position.left + position.width + leftOffSet}px`,
top: `${position.top - elHeight + topOffSet}px` top: `${position.top - elHeight + topOffSet}px`
} }
} else if (dialogHeight && this.alertTableDialog) { // dialogHeight 为获取的元素窗口,this.alertTableDialog // 为了判断是alertMessageTable页面使用的组件 } else if (dialogHeight) {
return { return {
left: `${position.left + position.width - 40}px`, left: `${position.left + position.width + 10 - dialogHeight.x}px`,
top: `${position.top - 95}px` top: `${position.top - dialogHeight.y}px`
} }
} else { } else {
return { return {

View File

@@ -373,3 +373,122 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
.arrow-down {
transform: rotate(0);
transition: all linear .2s;
}
.arrow-down.arrow-up {
transform: rotate(180deg);
}
.nz-label-search {
line-height: 40px;
margin: 6px 0;
.el-input__inner {
width: 60px;
}
}
.search-box__container {
/*display: flex;*/
flex-direction: column;
justify-content: center;
/*padding: 15px 0 15px 17px;*/
box-sizing: border-box;
border: 1px solid $--right-box-border-color;
background-color: #FFFFFF;
overflow-x: hidden;
overflow-y: auto;
}
.search-title {
width: 130px;
font-size: 14px;
color: #666666;
letter-spacing: 0;
font-weight: 600;
overflow: hidden;
height: 100%;
line-height: 40px;
padding-left: 20px;
box-sizing: border-box;
background: #F9F9F9;
}
.search-content-box--copy {
position: fixed;
visibility: hidden;
}
.search-content-box-height.search-content-box {
min-height: 31px;
}
.search-content-box,.search-content-box-height {
border-bottom: 1px solid $--primary-border-color;
display: flex;
align-items: center;
flex-wrap: wrap;
position: relative;
padding: 0;
box-sizing: border-box;
/*line-height: 40px;*/
/deep/ .el-checkbox__label {
max-width: 150px;
text-overflow: ellipsis;
white-space: nowrap;
overflow-x: hidden;
vertical-align: text-bottom;
}
}
.search-content-box {
background: #F9F9F9;
align-items: unset;
.search-title{
/*flex: 1;*/
}
}
.search-content-box:last-of-type{
border-bottom: none;
}
.search-items {
display: flex;
flex: 1;
flex-wrap: wrap;
box-sizing: border-box;
padding-left: 15px;
padding-right: 80px;
background: #FFFFFF;
&.search-items--checkbox .el-skeleton {
height: 28px;
line-height: 40px;
}
&.search-items--dropdown .el-skeleton {
height: 28px;
line-height: 40px;
}
.el-checkbox{
line-height: 40px;
}
}
.more.search-items{
.el-checkbox{
line-height: 40px;
}
}
.search-more {
position: absolute;
right: 4px;
height: 22px;
line-height: 22px;
padding: 0 8px;
font-size: 12px;
color: #333333;
box-sizing: border-box;
border: 1px solid $--primary-border-color;
border-radius: 2px;
cursor: pointer;
i {
color: #999;
font-size: 12px;
}
}
</style>