Merge branch 'codeCheck' of https://git.mesalab.cn/nezha/nezha-fronted into codeCheck
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
animation: 150,
|
animation: 150,
|
||||||
handle: '.chart-title'
|
handle: '.chart-title'
|
||||||
}" >
|
}" >
|
||||||
<div class="chartBox" v-for="(item, index) in dataList" :key="item.id" :id="'chart-' + item.id" :name="item.title" :class="{'drag-disabled': !draggable}">
|
<div v-for="(item, index) in dataList" :key="item.id" :id="'chart-' + item.id" :name="item.title" :class="{'drag-disabled': !draggable,'chartBox':true}" v-show="!item.isHide">
|
||||||
<line-chart-block v-if="item.type === 'line' || item.type === 'bar' ||item.type == 'stackArea' || item.type === 4" :key="'inner' + item.id"
|
<line-chart-block v-if="item.type === 'line' || item.type === 'bar' ||item.type == 'stackArea' || item.type === 4" :key="'inner' + item.id"
|
||||||
:ref="'editChart'+item.id"
|
:ref="'editChart'+item.id"
|
||||||
@on-refresh-data="refreshChart"
|
@on-refresh-data="refreshChart"
|
||||||
@@ -406,20 +406,25 @@
|
|||||||
this.getData(this.filter);
|
this.getData(this.filter);
|
||||||
},
|
},
|
||||||
searchCharts(searchName){
|
searchCharts(searchName){
|
||||||
this.dataList = [];
|
// this.dataList = [];
|
||||||
this.dataTotalList = [];
|
// this.dataTotalList = [];
|
||||||
|
|
||||||
let chartListTmp = [];
|
let chartListTmp = [];
|
||||||
if(searchName && searchName.trim()!==''){
|
if(searchName && searchName.trim()!==''){
|
||||||
this.dataTotalListBak.forEach((item)=>{
|
this.dataTotalListBak.forEach((item)=>{
|
||||||
if(item.title.indexOf(searchName)>-1){
|
if(item.title.indexOf(searchName)>-1){
|
||||||
item.isLoaded = false;
|
item.isLoaded = false;
|
||||||
|
item.isHide=false;
|
||||||
|
chartListTmp.push(item);
|
||||||
|
}else{
|
||||||
|
item.isLoaded = false;
|
||||||
|
item.isHide=true;
|
||||||
chartListTmp.push(item);
|
chartListTmp.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.dataTotalListBak.forEach((item)=>{
|
this.dataTotalListBak.forEach((item)=>{
|
||||||
item.isLoaded = false;
|
item.isLoaded = false;
|
||||||
|
item.isHide=false;
|
||||||
chartListTmp.push(item);
|
chartListTmp.push(item);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1468,8 +1473,10 @@
|
|||||||
setChartSize(item, index) {
|
setChartSize(item, index) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let chartBox = document.getElementById("chart-" + item.id);
|
let chartBox = document.getElementById("chart-" + item.id);
|
||||||
|
if(chartBox){
|
||||||
chartBox.style.width = `${(item.span / 12) * 100}%`;
|
chartBox.style.width = `${(item.span / 12) * 100}%`;
|
||||||
chartBox.style.height = `${item.height}px`;
|
chartBox.style.height = `${item.height}px`;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getNewTime(time, num) {
|
getNewTime(time, num) {
|
||||||
|
|||||||
Reference in New Issue
Block a user