fix:project endpoint 列表,点击 详情页面 点击 state 报错
This commit is contained in:
@@ -131,20 +131,6 @@
|
|||||||
@on-drag-chart="editChartForDrag"
|
@on-drag-chart="editChartForDrag"
|
||||||
@on-edit-chart-block="editData"
|
@on-edit-chart-block="editData"
|
||||||
></chart-alert-list>
|
></chart-alert-list>
|
||||||
<!--<vis-network-->
|
|
||||||
<!--v-if="item.type === 'topology'"-->
|
|
||||||
<!--@on-refresh-data="refreshChart"-->
|
|
||||||
<!--@on-search-data="searchData"-->
|
|
||||||
<!--@on-remove-chart-block="removeChart"-->
|
|
||||||
<!--@on-duplicate-chart-block="duplicateChart"-->
|
|
||||||
<!--@on-drag-chart="editChartForDrag"-->
|
|
||||||
<!--@on-edit-chart-block="editData"-->
|
|
||||||
<!--:panel-id="filter.panelId"-->
|
|
||||||
<!--:chart-data="item"-->
|
|
||||||
<!--:chart-index="index"-->
|
|
||||||
<!-->-->
|
|
||||||
|
|
||||||
<!--</vis-network>-->
|
|
||||||
</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>
|
||||||
|
|||||||
@@ -1244,7 +1244,7 @@
|
|||||||
this.clearChart();
|
this.clearChart();
|
||||||
},
|
},
|
||||||
findLegendOptions:function(){
|
findLegendOptions:function(){
|
||||||
if((!this.chart.param.legendValue) || Object.keys(this.chart.param.legendValue)<1) return false;
|
if((!this.chart.param) || (!this.chart.param.legendValue) || Object.keys(this.chart.param.legendValue)<1) return false;
|
||||||
let legendOptions= this.chart.param.legendValue;
|
let legendOptions= this.chart.param.legendValue;
|
||||||
let onVal=Object.keys(legendOptions).find(item=>{return legendOptions[item] == 'on'});
|
let onVal=Object.keys(legendOptions).find(item=>{return legendOptions[item] == 'on'});
|
||||||
|
|
||||||
|
|||||||
@@ -746,7 +746,6 @@
|
|||||||
let chartUnit=chartInfo.unit;
|
let chartUnit=chartInfo.unit;
|
||||||
chartUnit=chartUnit?chartUnit:2;
|
chartUnit=chartUnit?chartUnit:2;
|
||||||
let unit=chartDataFormat.getUnit(chartUnit);
|
let unit=chartDataFormat.getUnit(chartUnit);
|
||||||
// console.log(unit);
|
|
||||||
let flag=JSON.stringify(value).length>JSON.stringify(chartDataFormat.Interval(maxValue,copies,unit.type)).length;
|
let flag=JSON.stringify(value).length>JSON.stringify(chartDataFormat.Interval(maxValue,copies,unit.type)).length;
|
||||||
if(dot===0&&flag){
|
if(dot===0&&flag){
|
||||||
dot=1;
|
dot=1;
|
||||||
@@ -909,7 +908,6 @@
|
|||||||
let divHeight = legendDiv.offsetHeight;
|
let divHeight = legendDiv.offsetHeight;
|
||||||
let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
let sumHeight = Math.floor(screenHeight*0.99*0.8);//margin-top:1vh; dailog:80%
|
let sumHeight = Math.floor(screenHeight*0.99*0.8);//margin-top:1vh; dailog:80%
|
||||||
//console.log("11____00",sumHeight,divHeight,legendDiv)
|
|
||||||
self.$refs.screenShowArea.style.height = `${sumHeight - divHeight - self.screenTitleHeight}px`;
|
self.$refs.screenShowArea.style.height = `${sumHeight - divHeight - self.screenTitleHeight}px`;
|
||||||
self.echartModalStore.resize({height: (sumHeight - divHeight - self.screenTitleHeight)});//图表的高度
|
self.echartModalStore.resize({height: (sumHeight - divHeight - self.screenTitleHeight)});//图表的高度
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@@ -933,7 +931,6 @@
|
|||||||
let divHeight = legendDiv.offsetHeight;
|
let divHeight = legendDiv.offsetHeight;
|
||||||
let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
let sumHeight = Math.floor(screenHeight*0.99*0.8);//margin-top:1vh; dailog:80%
|
let sumHeight = Math.floor(screenHeight*0.99*0.8);//margin-top:1vh; dailog:80%
|
||||||
//console.log("11____00",sumHeight,divHeight,legendDiv)
|
|
||||||
self.$refs.screenShowArea.style.height = `${sumHeight - divHeight - self.screenTitleHeight}px`;
|
self.$refs.screenShowArea.style.height = `${sumHeight - divHeight - self.screenTitleHeight}px`;
|
||||||
self.echartModalStore.resize({height: (sumHeight - divHeight - self.screenTitleHeight)});//图表的高度
|
self.echartModalStore.resize({height: (sumHeight - divHeight - self.screenTitleHeight)});//图表的高度
|
||||||
self.echartModalStore.off('finished');
|
self.echartModalStore.off('finished');
|
||||||
@@ -1415,7 +1412,6 @@
|
|||||||
this.divFirstShow = true;
|
this.divFirstShow = true;
|
||||||
},
|
},
|
||||||
dealLegendAlias:function(legend,expression){
|
dealLegendAlias:function(legend,expression){
|
||||||
// console.log(legend,expression,'123123');
|
|
||||||
if(/\{\{.+\}\}/.test(expression)){
|
if(/\{\{.+\}\}/.test(expression)){
|
||||||
let labelValue=expression.replace(/(\{\{.+?\}\})/g,function(i){
|
let labelValue=expression.replace(/(\{\{.+?\}\})/g,function(i){
|
||||||
let label=i.substr(i.indexOf('{{')+2,i.indexOf('}}')-i.indexOf('{{')-2);
|
let label=i.substr(i.indexOf('{{')+2,i.indexOf('}}')-i.indexOf('{{')-2);
|
||||||
@@ -1454,8 +1450,6 @@
|
|||||||
loadMore(){
|
loadMore(){
|
||||||
this.seriesItemArr=this.seriesItem;
|
this.seriesItemArr=this.seriesItem;
|
||||||
this.legendListMore=this.legendList;
|
this.legendListMore=this.legendList;
|
||||||
//console.log(this.seriesItem,'irate(mysql_global_status_commands_total[5m])>0');
|
|
||||||
//console.log(this.data);
|
|
||||||
let chartInfo=this.data;
|
let chartInfo=this.data;
|
||||||
let dataArg=this.seriesItem;
|
let dataArg=this.seriesItem;
|
||||||
let maxValueCopies = this.getMaxValue(dataArg,chartInfo);
|
let maxValueCopies = this.getMaxValue(dataArg,chartInfo);
|
||||||
@@ -1513,7 +1507,6 @@
|
|||||||
let divHeight = legendDiv.offsetHeight;
|
let divHeight = legendDiv.offsetHeight;
|
||||||
let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
let screenHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
||||||
let sumHeight = Math.floor(screenHeight*0.99*0.8);//margin-top:1vh; dailog:80%
|
let sumHeight = Math.floor(screenHeight*0.99*0.8);//margin-top:1vh; dailog:80%
|
||||||
//console.log("11____00",sumHeight,divHeight,legendDiv)
|
|
||||||
this.$refs.screenShowArea.style.height = `${sumHeight - divHeight - this.screenTitleHeight}px`;
|
this.$refs.screenShowArea.style.height = `${sumHeight - divHeight - this.screenTitleHeight}px`;
|
||||||
this.echartModalStore.resize({height: (sumHeight - divHeight - this.screenTitleHeight)});//图表的高度
|
this.echartModalStore.resize({height: (sumHeight - divHeight - this.screenTitleHeight)});//图表的高度
|
||||||
})
|
})
|
||||||
@@ -1672,7 +1665,6 @@
|
|||||||
dot++;
|
dot++;
|
||||||
}
|
}
|
||||||
let copies=chartDataFormat.copies(oldValue,unit.type);
|
let copies=chartDataFormat.copies(oldValue,unit.type);
|
||||||
// console.log(oldValue,copies,maxValue);
|
|
||||||
let oldDot=2;
|
let oldDot=2;
|
||||||
if(maxValue<=1){
|
if(maxValue<=1){
|
||||||
oldDot=dot>6?6:dot;
|
oldDot=dot>6?6:dot;
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
// console.log(vm.$t('overall.exportAll'));
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -361,7 +361,6 @@
|
|||||||
// model.label=this.form.lineName;
|
// model.label=this.form.lineName;
|
||||||
model.name=this.form.lineName;
|
model.name=this.form.lineName;
|
||||||
model.width = parseInt(model.width) || 4;
|
model.width = parseInt(model.width) || 4;
|
||||||
console.log(this.form.type);
|
|
||||||
if(!this.form.type){
|
if(!this.form.type){
|
||||||
model.smooth={
|
model.smooth={
|
||||||
enabled:false,
|
enabled:false,
|
||||||
|
|||||||
@@ -351,7 +351,7 @@
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
handleAvatarSuccess(file,res){
|
handleAvatarSuccess(file,res){
|
||||||
console.log(res);
|
|
||||||
},
|
},
|
||||||
upload() {
|
upload() {
|
||||||
let form = new FormData();
|
let form = new FormData();
|
||||||
|
|||||||
@@ -662,7 +662,6 @@
|
|||||||
x:e.layerX,
|
x:e.layerX,
|
||||||
y:e.layerY,
|
y:e.layerY,
|
||||||
};
|
};
|
||||||
console.log();
|
|
||||||
if(e.path[0].nodeName!=='CANVAS'){
|
if(e.path[0].nodeName!=='CANVAS'){
|
||||||
this.expressionsInfoShow=false;
|
this.expressionsInfoShow=false;
|
||||||
this.$refs['network'].removeEventListener('mousemove',this.modelTopMouseMoveEdge);
|
this.$refs['network'].removeEventListener('mousemove',this.modelTopMouseMoveEdge);
|
||||||
|
|||||||
@@ -283,17 +283,14 @@
|
|||||||
let arr1=[];
|
let arr1=[];
|
||||||
if(!arr){return arr1}
|
if(!arr){return arr1}
|
||||||
arr.forEach((item)=>{
|
arr.forEach((item)=>{
|
||||||
console.log(item);
|
|
||||||
item.from=item.source;
|
item.from=item.source;
|
||||||
item.to=item.target;
|
item.to=item.target;
|
||||||
item.label='';
|
item.label='';
|
||||||
item.title='title';
|
item.title='title';
|
||||||
console.log(item.expressions);
|
|
||||||
item.expressions.forEach((item1,index)=>{
|
item.expressions.forEach((item1,index)=>{
|
||||||
this.$get('/prom/api/v1/query?query=' + item1.metric).then(res=>{
|
this.$get('/prom/api/v1/query?query=' + item1.metric).then(res=>{
|
||||||
// item.value=res.data.result[0].value;i
|
// item.value=res.data.result[0].value;i
|
||||||
item1.value=res.data.result;
|
item1.value=res.data.result;
|
||||||
console.log(res);
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -306,7 +303,6 @@
|
|||||||
// item.dataFlow='right'
|
// item.dataFlow='right'
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
console.log(arr);
|
|
||||||
return arr
|
return arr
|
||||||
},
|
},
|
||||||
dealImg(url) {
|
dealImg(url) {
|
||||||
|
|||||||
Reference in New Issue
Block a user