Merge branch 'codeCheck' of https://git.mesalab.cn/nezha/nezha-fronted into codeCheck
This commit is contained in:
@@ -325,7 +325,6 @@
|
||||
}
|
||||
},
|
||||
clickLegend(legendName,index){
|
||||
console.log('cur index',index,legendName)
|
||||
//点击图表某一个legend,图表只显示当前点击的曲线或柱状图,其它隐藏,再次点击已选中的legend ,显示全部
|
||||
let curIsGrey=this.isGrey[index];
|
||||
if(this.echartStore){
|
||||
@@ -462,7 +461,6 @@
|
||||
if ( chartInfo.type === 4) {//line,bar
|
||||
this.chartType = 'line';
|
||||
}
|
||||
console.log('chartData',chartInfo,legend,dataArg)
|
||||
let minTime = null;
|
||||
let maxTime = null;
|
||||
if(dataArg.length>0 && dataArg[0].data
|
||||
@@ -953,7 +951,6 @@
|
||||
//console.log("11____00",sumHeight,divHeight,legendDiv)
|
||||
self.$refs.screenShowArea.style.height = `${sumHeight - divHeight - self.screenTitleHeight}px`;
|
||||
self.echartModalStore.resize({height: (sumHeight - divHeight - self.screenTitleHeight)});//图表的高度
|
||||
console.log(self.seriesItemScreen,self.seriesItemArrScreen);
|
||||
self.echartModalStore.off('finished');
|
||||
})
|
||||
}, 100);
|
||||
@@ -1261,7 +1258,6 @@
|
||||
}
|
||||
let step = bus.getStep(startTime,endTime);
|
||||
if (type === 'list') { // 普通模式,主控台使用
|
||||
console.info(this.data);
|
||||
axiosArr = this.data.elements.map((ele) => {
|
||||
const filterItem = ele;
|
||||
let query = encodeURIComponent(filterItem.expression);
|
||||
@@ -1527,7 +1523,7 @@
|
||||
})
|
||||
},
|
||||
findLegendOptions:function(){
|
||||
if((!this.data.param.legendValue) || Object.keys(this.data.param.legendValue)<1) return false;
|
||||
if(!this.data.param||!this.data.param.legendValue || Object.keys(this.data.param.legendValue)<1) return false;
|
||||
let legendOptions= this.data.param.legendValue;
|
||||
let onVal=Object.keys(legendOptions).find(item=>{return legendOptions[item] == 'on'});
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
size="small"
|
||||
value-key="name"
|
||||
v-if="!editChart.id"
|
||||
@input="inputPanel"
|
||||
popper-class="chart-box-autocomplete no-style-class"
|
||||
>
|
||||
</el-autocomplete>
|
||||
@@ -376,6 +377,7 @@
|
||||
// 是否为编辑已有信息
|
||||
isedit: false,
|
||||
//productId: 0,//不需要这个参数,可以删除
|
||||
isInputPanel:false,
|
||||
panelId: 0,
|
||||
panelName: '',
|
||||
selectFirstPanel: false,
|
||||
@@ -1103,19 +1105,26 @@
|
||||
this.legends = [];
|
||||
this.elementIds = [];
|
||||
},
|
||||
inputPanel:function(){
|
||||
this.isInputPanel=true;
|
||||
},
|
||||
/*panel搜索建议*/
|
||||
panelSuggestion(queryString, callback) {
|
||||
let data = [];
|
||||
if (!queryString) {
|
||||
data = this.panelData;
|
||||
} else {
|
||||
for (let i = 0; i < this.panelData.length; i++) {
|
||||
if (this.panelData[i].name.toLowerCase().indexOf(queryString.toLowerCase()) != -1) {
|
||||
data.push(this.panelData[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
callback(data);
|
||||
if(!this.isInputPanel){
|
||||
callback(JSON.parse(JSON.stringify(this.panelData)));
|
||||
}else{
|
||||
let data = [];
|
||||
if (!queryString) {
|
||||
data = this.panelData;
|
||||
} else {
|
||||
for (let i = 0; i < this.panelData.length; i++) {
|
||||
if (this.panelData[i].name.toLowerCase().indexOf(queryString.toLowerCase()) != -1) {
|
||||
data.push(this.panelData[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
callback(data);
|
||||
}
|
||||
},
|
||||
|
||||
//preview -start
|
||||
@@ -1272,7 +1281,7 @@
|
||||
deep: true,
|
||||
immediate: true,
|
||||
handler(n) {
|
||||
console.info((JSON.parse(JSON.stringify(n))))
|
||||
// console.info((JSON.parse(JSON.stringify(n))))
|
||||
let panel = this.panelData.find(p => {
|
||||
return p.name == n.panelName;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user