NEZ-727 fix: 部分二级列表搜索异常问题

This commit is contained in:
chenjinsong
2021-06-07 17:31:17 +08:00
parent fca38e7e3b
commit acc1e2a94a
7 changed files with 25 additions and 30 deletions

View File

@@ -193,7 +193,7 @@
flex: auto;
height: calc(100% - 58px);
.el-table {
.el-table:not(.chart-table) {
position: absolute;
width: calc(100% - 40px);
border: 1px solid $--right-box-border-color;
@@ -313,10 +313,10 @@
border-right: none !important;
}
/* 最后一列用box-shadow模拟边框 */
.el-table:not(.no-operation).el-table--border .el-table__body-wrapper td:nth-last-child(2) {
.el-table:not(.no-operation):not(.chart-table).el-table--border .el-table__body-wrapper td:nth-last-child(2) {
box-shadow: 1px 0 $--right-box-border-color;
}
.el-table:not(.no-operation).el-table--border .el-table__header-wrapper th:nth-last-child(3) {
.el-table:not(.no-operation):not(.chart-table).el-table--border .el-table__header-wrapper th:nth-last-child(3) {
border-right: none !important;
box-shadow: 1px 0 $--right-box-border-color;
}
@@ -333,7 +333,7 @@
border-right: none !important;
}
}
.el-table--border::after, .el-table--group::after {
.el-table--border:not(.chart-table)::after, .el-table--group:not(.chart-table)::after {
width: 0;
}
}

View File

@@ -53,7 +53,7 @@
</el-dropdown>
</div>
<div class="mt-10 table-container" v-cloak v-show="firstShow">
<el-table :id="'tableContainer'+chartIndex" ref="tableContainer" :height="tableHeight"
<el-table :id="'tableContainer'+chartIndex" ref="tableContainer" :height="tableHeight" class="chart-table"
:data="seriesItem" border tooltip-effect="light" v-cloak
@sort-change="tableDataSort" >
<el-table-column :label="$t('dashboard.panel.chartTableColumn.time')" min-width="100" prop="time"

View File

@@ -17,7 +17,7 @@
<i class="nz-icon-gear nz-icon"></i>
</button>
</div>
<div class="top-tool-right" v-else>
<div v-else class="top-tool-right">
<slot name="top-tool-right"></slot>
</div>
</div>

View File

@@ -8,6 +8,7 @@
:tabs="tabs"
:targetTab="targetTab"
@changeTab="changeTab"
@search="search"
class="full-width-height"
v-loading="tools.loading"
>
@@ -309,6 +310,7 @@ export default {
}
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
this.$set(this.searchLabel, 'state', this.state)
if (this.searchTime && this.searchTime.length > 1) {
this.$set(this.searchLabel, 'startAt', this.timezoneToUtcTimeStr(this.searchTime[0]))
this.$set(this.searchLabel, 'endAt', this.timezoneToUtcTimeStr(this.searchTime[1]))
@@ -332,7 +334,7 @@ export default {
} else if (this.from === fromRoute.dc) {
this.searchLabel.dcIds = this.obj.id
}
this.$get(this.url + '?state=' + this.state, this.searchLabel).then(response => {
this.$get(this.url, this.searchLabel).then(response => {
this.tools.loading = false
if (response.code === 200) {
this.nowTime = this.utcTimeToTimezoneStr(response.time)
@@ -576,7 +578,9 @@ export default {
if (orderBy) {
this.$set(this.searchLabel, 'orderBy', orderBy)
}
this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop = 0
if (this.$refs.dataTable) {
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
}
this.getTableData()
},
fillProject (module) {

View File

@@ -69,40 +69,29 @@ export default {
searchMsg: { // 给搜索框子组件传递的信息
zheze_none: true,
searchLabelList: [{
id: 1,
name: 'ID',
type: 'input',
label: 'id',
label: 'ids',
disabled: false
}, {
name: this.$t('overall.name'),
type: 'input',
label: 'name',
disabled: false
}, {
id: 20,
name: 'SN',
type: 'input',
label: 'sn',
disabled: false
}, {
id: 21,
name: 'Host',
name: 'IP',
type: 'input',
label: 'host',
label: 'manageIp',
disabled: false
}, {
id: 22,
name: this.$t('asset.state'),
type: 'select',
label: 'assetState',
disabled: false
}, {
id: 23,
name: 'pingStatus',
type: 'select',
label: 'pingStatus',
disabled: false
}, {
id: 23,
name: this.$t('asset.cabinet'),
type: 'input',
label: 'cabinetName',
type: 'assetState',
label: 'stateIds',
disabled: false
}]
},

View File

@@ -7,6 +7,7 @@
:search-msg="searchMsg"
:tabs="tabs"
:targetTab="targetTab"
@search="search"
@changeTab="changeTab"
class="full-width-height"
>

View File

@@ -745,7 +745,8 @@ export default {
select () {
const objectInfo = {}
this.change_sreach_show = true
this.name = '', this.id = ''
this.name = ''
this.id = ''
if (this.input_sreach != '') {
this.select_list[this.sreach_num].val = this.input_sreach
this.input_sreach = ''