diff --git a/nezha-fronted/src/assets/img/loading.gif b/nezha-fronted/src/assets/img/loading.gif new file mode 100644 index 000000000..afc7e556c Binary files /dev/null and b/nezha-fronted/src/assets/img/loading.gif differ diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 04624ed90..25f4147cb 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -22,7 +22,8 @@ @on-refresh-data="refreshChart" @on-remove-chart-block="removeChart" @on-edit-chart-block="editData" - :panel-id="filter.panelId" + :panel-id="filter.panelId" + :chart-index="index" :editChartId="'editChartId' + item.id"> @@ -163,11 +165,13 @@ export default { }else { this.dataList = this.dataTotalList; } - if (this.dataList.length > 0 && this.$refs.editChart) { - this.$refs.editChart.forEach((item) => { - item.showLoad();//之后要实现 - }); - } + this.$nextTick(() => { + if (this.dataList.length > 0 && this.$refs.editChart) { + this.$refs.editChart.forEach((item, i) => { + item.showLoad(this.dataList[i]);//之后要实现 + }); + } + }); this.dataSetFirst(this.dataList); } }); @@ -211,10 +215,10 @@ export default { startTime = this.filter.start_time; endTime = this.filter.end_time; } - } else if(filterType==='searchTime'){ + } else if(filterType==='showFullScreen'){//全屏时间查询 startTime = this.filter.start_time; endTime = this.filter.end_time; - this.$parent.refreshTime(startTime,endTime); + //this.$parent.refreshTime(startTime,endTime);全屏查询,不更新panel列表的时间条件 }else { startTime = this.filter.start_time; endTime = this.filter.end_time; @@ -324,23 +328,44 @@ export default { } }); if (chartItem.type === 'table') {//表格 - this.$refs.editChart[index].setData(chartItem, tableData, - this.filter.panelId, this.filter); + if(filterType==='showFullScreen'){//table的全屏查询 + this.$refs.editChart[index].setData(chartItem, tableData, + this.filter.panelId, this.filter,filterType); + }else { + this.$refs.editChart[index].setData(chartItem, tableData, + this.filter.panelId, this.filter); + } + } else if (chartItem.type === 'line' || chartItem.type === 'bar' || chartItem.type === 4) { if (series.length && chartItem.type === 4) {//曲线汇总 //series.push(sumData);//后续需要 } - this.$refs.editChart[index].setData(chartItem, series, - this.filter.panelId, this.filter,legend); + if(filterType==='showFullScreen'){//table的全屏查询 + this.$refs.editChart[index].setData(chartItem, series, + this.filter.panelId, this.filter,legend,filterType); + }else { + this.$refs.editChart[index].setData(chartItem, series, + this.filter.panelId, this.filter,legend); + } } } else { const type = chartItem.type; if (type === 'table') { - this.$refs.editChart[index].setData(chartItem, [], this.filter.panelId, - this.filter); + if(filterType==='showFullScreen'){//table的全屏查询 + this.$refs.editChart[index].setData(chartItem, [], this.filter.panelId, + this.filter,filterType); + }else { + this.$refs.editChart[index].setData(chartItem, [], this.filter.panelId, + this.filter); + } } else if (type === 'line' || type === 'bar' || chartItem.type === 4) { - this.$refs.editChart[index].setData(chartItem, [], this.filter.panelId, - this.filter); + if(filterType==='showFullScreen'){//table的全屏查询 + this.$refs.editChart[index].setData(chartItem, [], this.filter.panelId, + this.filter,filterType); + }else { + this.$refs.editChart[index].setData(chartItem, [], this.filter.panelId, + this.filter); + } } } }).catch((error) => { @@ -397,7 +422,7 @@ export default { } this.dataList.forEach((item, index) => { if (item.id === chartId) { - this.getChartData(item, index, 'searchTime'); + this.getChartData(item, index, 'showFullScreen'); } }); } diff --git a/nezha-fronted/src/components/charts/chart-table.scss b/nezha-fronted/src/components/charts/chart-table.scss index efc9ac482..42274ee9c 100644 --- a/nezha-fronted/src/components/charts/chart-table.scss +++ b/nezha-fronted/src/components/charts/chart-table.scss @@ -7,6 +7,9 @@ .clearfix{ margin-bottom: 20px; } +.loading-font{ + color:#232f3e !important; +} .dialog-tool { margin-right: 40px; } diff --git a/nezha-fronted/src/components/charts/chart-table.vue b/nezha-fronted/src/components/charts/chart-table.vue index 28487160d..cab62355a 100644 --- a/nezha-fronted/src/components/charts/chart-table.vue +++ b/nezha-fronted/src/components/charts/chart-table.vue @@ -2,68 +2,63 @@ @import './chart-table.scss'; + + diff --git a/nezha-fronted/src/components/page/dashboard/chartMetric.vue b/nezha-fronted/src/components/page/dashboard/chartMetric.vue index 5d53b9f24..baaf24ac3 100644 --- a/nezha-fronted/src/components/page/dashboard/chartMetric.vue +++ b/nezha-fronted/src/components/page/dashboard/chartMetric.vue @@ -24,7 +24,7 @@ } .symbol-area { position: relative; - height: 135px; + height: 100px; } .symbol-equal { position: absolute; @@ -48,9 +48,8 @@ color: #666; } .li-list-part-label-val-list { - height: 170px; + height: 176px; border: 1px solid #dcdfe6; - margin-top: 33px; border-radius: 4px; padding: 0px 0 10px 15px; } @@ -149,7 +148,6 @@ -
{{elementInfo.metric}}
-
{{elementInfo.metric}}
{