NEZ-1077 fix: panel 输入搜索条件 ,没有符合条件chart nodata样式
This commit is contained in:
@@ -263,7 +263,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</draggable>
|
</draggable>
|
||||||
<!-- <el-row v-if="dataList.length === 0" class="noData"></el-row>-->
|
<!-- <el-row v-if="dataList.length === 0" class="noData"></el-row>-->
|
||||||
<div v-if="panelLoading" class="no-data">
|
<div v-if="chartListNoData" class="no-data">
|
||||||
<svg class="icon" aria-hidden="true">
|
<svg class="icon" aria-hidden="true">
|
||||||
<use xlink:href="#nz-icon-no-data-panel"></use>
|
<use xlink:href="#nz-icon-no-data-panel"></use>
|
||||||
</svg>
|
</svg>
|
||||||
@@ -304,7 +304,7 @@ export default {
|
|||||||
obj: Object,
|
obj: Object,
|
||||||
panelLock: { type: Boolean, default: false },
|
panelLock: { type: Boolean, default: false },
|
||||||
hasGroup: { type: Boolean, default: true },
|
hasGroup: { type: Boolean, default: true },
|
||||||
panelDataList: Array,
|
panelDataList: Array
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
@@ -333,7 +333,7 @@ export default {
|
|||||||
start: '',
|
start: '',
|
||||||
end: ''
|
end: ''
|
||||||
},
|
},
|
||||||
panelLoading: false,
|
chartListNoData: false,
|
||||||
extraMarginBottom: 0, // dom额外的margin
|
extraMarginBottom: 0, // dom额外的margin
|
||||||
panelId: '',
|
panelId: '',
|
||||||
timer: null,
|
timer: null,
|
||||||
@@ -548,13 +548,20 @@ export default {
|
|||||||
this.dataTotalListBak.forEach((item) => {
|
this.dataTotalListBak.forEach((item) => {
|
||||||
item.isLoaded = false
|
item.isLoaded = false
|
||||||
item.isHide = false
|
item.isHide = false
|
||||||
|
this.chartListNoData = false
|
||||||
chartListTmp.push(item)
|
chartListTmp.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dataTotalList = [...chartListTmp]
|
this.dataTotalList = [...chartListTmp]
|
||||||
this.dataList = [...this.dataTotalList]
|
this.dataList = [...this.dataTotalList]
|
||||||
|
let isAllHide = true
|
||||||
|
this.dataList.map(item => {
|
||||||
|
if (!item.isHide) {
|
||||||
|
isAllHide = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.chartListNoData = isAllHide
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.dataList.length > 0) {
|
if (this.dataList.length > 0) {
|
||||||
this.dataList.forEach((item, index) => {
|
this.dataList.forEach((item, index) => {
|
||||||
@@ -719,10 +726,10 @@ export default {
|
|||||||
// chart数据存在dataTotalListBak中
|
// chart数据存在dataTotalListBak中
|
||||||
if (response.data.list.length > 0) {
|
if (response.data.list.length > 0) {
|
||||||
this.dataTotalListBak = response.data.list
|
this.dataTotalListBak = response.data.list
|
||||||
this.panelLoading = false
|
this.chartListNoData = false
|
||||||
} else {
|
} else {
|
||||||
this.dataTotalListBak = response.data
|
this.dataTotalListBak = response.data
|
||||||
this.panelLoading = true
|
this.chartListNoData = true
|
||||||
}
|
}
|
||||||
let chartListTmp = []
|
let chartListTmp = []
|
||||||
// 查询条件带name
|
// 查询条件带name
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
</pick-time>
|
</pick-time>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot>
|
<template v-slot>
|
||||||
<log-tab ref="logDetail" v-loading="loading" :log-data="logData" :tab-index="9" @exportLog="exportLog" @limitChange="queryLogData"></log-tab>
|
<log-tab ref="logDetail" v-loading="loading" :loading="loading" :log-data="logData" :tab-index="9" @exportLog="exportLog" @limitChange="queryLogData"></log-tab>
|
||||||
<div v-loading="loading" v-if="!logData" style="height: 300px; width: 100%; display: flex; justify-content: center; align-items: center; color: #999;">No Data</div>
|
<!-- <div v-loading="loading" v-if="!logData" style="height: 300px; width: 100%; display: flex; justify-content: center; align-items: center; color: #999;">No Data</div>-->
|
||||||
</template>
|
</template>
|
||||||
</nz-bottom-data-list>
|
</nz-bottom-data-list>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
:height="mainTableHeight"
|
:height="mainTableHeight"
|
||||||
:now-time="nowTime"
|
:now-time="nowTime"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
|
:loading="tools.loading"
|
||||||
@del="del"
|
@del="del"
|
||||||
@edit="edit"
|
@edit="edit"
|
||||||
@showText="showText"
|
@showText="showText"
|
||||||
|
|||||||
@@ -111,6 +111,7 @@
|
|||||||
<alert-rule-table
|
<alert-rule-table
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
v-loading="tools.loading"
|
v-loading="tools.loading"
|
||||||
|
:loading="tools.loading"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title="tools.customTableTitle"
|
:custom-table-title="tools.customTableTitle"
|
||||||
:height="mainTableHeight"
|
:height="mainTableHeight"
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
<alert-silence-table
|
<alert-silence-table
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
v-loading="tools.loading"
|
v-loading="tools.loading"
|
||||||
|
:loading="tools.loading"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title="tools.customTableTitle"
|
:custom-table-title="tools.customTableTitle"
|
||||||
:height="mainTableHeight"
|
:height="mainTableHeight"
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
ref="dataDetail"
|
ref="dataDetail"
|
||||||
:orderByFa="orderBy"
|
:orderByFa="orderBy"
|
||||||
v-loading="tools.loading"
|
v-loading="tools.loading"
|
||||||
|
:loading="tools.loading"
|
||||||
:detailViewRightObj="detailViewRightObj"
|
:detailViewRightObj="detailViewRightObj"
|
||||||
:api="url"
|
:api="url"
|
||||||
:table-data="tableData"
|
:table-data="tableData"
|
||||||
|
|||||||
@@ -98,13 +98,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-if="!loading" slot="empty">
|
<template slot="empty">
|
||||||
<div class="right-no-data">
|
<div v-if="!loading" class="right-no-data">
|
||||||
<svg class="icon" aria-hidden="true">
|
<svg class="icon" aria-hidden="true">
|
||||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else> </div>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -77,13 +77,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-if="!loading" slot="empty">
|
<template slot="empty">
|
||||||
<div class="right-no-data">
|
<div v-if="!loading" class="right-no-data">
|
||||||
<svg class="icon" aria-hidden="true">
|
<svg class="icon" aria-hidden="true">
|
||||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else> </div>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -87,13 +87,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-if="!loading" slot="empty">
|
<template slot="empty">
|
||||||
<div class="right-no-data">
|
<div v-if="!loading" class="right-no-data">
|
||||||
<svg class="icon" aria-hidden="true">
|
<svg class="icon" aria-hidden="true">
|
||||||
<use xlink:href="#nz-icon-no-data-list"></use>
|
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else> </div>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
<chartTmplTable
|
<chartTmplTable
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
v-loading="tools.loading"
|
v-loading="tools.loading"
|
||||||
|
:loading="tools.loading"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title="tools.customTableTitle"
|
:custom-table-title="tools.customTableTitle"
|
||||||
:height="mainTableHeight"
|
:height="mainTableHeight"
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
<expr-tmpl-table
|
<expr-tmpl-table
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
v-loading="tools.loading"
|
v-loading="tools.loading"
|
||||||
|
:loading="tools.loading"
|
||||||
:api="url"
|
:api="url"
|
||||||
:custom-table-title="tools.customTableTitle"
|
:custom-table-title="tools.customTableTitle"
|
||||||
:height="mainTableHeight"
|
:height="mainTableHeight"
|
||||||
|
|||||||
@@ -110,6 +110,15 @@
|
|||||||
min-width="110px"
|
min-width="110px"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
|
<template slot="empty">
|
||||||
|
<div v-if="!tools.loading" class="right-no-data">
|
||||||
|
<svg class="icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||||
|
</svg>
|
||||||
|
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||||
|
</div>
|
||||||
|
<div v-else> </div>
|
||||||
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<pagination ref="Pagination" :append-to-body="false" :page-obj="pageObj" @pageNo='pageNo'
|
<pagination ref="Pagination" :append-to-body="false" :page-obj="pageObj" @pageNo='pageNo'
|
||||||
|
|||||||
@@ -82,7 +82,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div v-else class="chart-no-data">No Data</div>
|
<template>
|
||||||
|
<div v-if="!loading" class="right-no-data">
|
||||||
|
<svg class="icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#nz-icon-no-data-list"></use>
|
||||||
|
</svg>
|
||||||
|
<div style="font-size: 16px;color: #333333;font-weight: 400;">No results found</div>
|
||||||
|
</div>
|
||||||
|
<div v-else> </div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -98,7 +106,8 @@ export default {
|
|||||||
showSwitch: {
|
showSwitch: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
}
|
},
|
||||||
|
loading: Boolean
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tableTimeFormat () {
|
tableTimeFormat () {
|
||||||
@@ -559,6 +568,14 @@ export default {
|
|||||||
.log-table{
|
.log-table{
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
|
.right-no-data {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
margin-top: -35px;
|
||||||
|
margin-left: -50px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.log-table .nz-table2 {
|
.log-table .nz-table2 {
|
||||||
padding: 10px 0 0 0;
|
padding: 10px 0 0 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user