Authored by wangtao

Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/anji-plus-re…

…port into master-500-dev
... ... @@ -186,10 +186,15 @@ export default {
let seriesUsageValueData=[];//使用量
dataData.map(item=>{
xAxisList.push(item.periodVal);
if(item.capacityValue || item.capacityValue==0){
seriesCapacityData.push(item.capacityValue)
}
if(item.usageRate || item.usageRate==0){
seriesUsageRateData.push(item.usageRate)
}
if(item.usageValue || item.usageValue==0){
seriesUsageValueData.push(item.usageValue)
}
})
if(seriesUsageValueData.length>0){
series.push({
... ... @@ -197,6 +202,12 @@ export default {
name:'使用量',
data:seriesUsageValueData
})
}else{
series.push({
type:'bar',
name:'',
data:seriesUsageValueData
})
}
if(seriesCapacityData.length>0){
... ... @@ -205,6 +216,12 @@ export default {
name:'容量',
data:seriesCapacityData
})
}else{
series.push({
type:'line',
name:'',
data:seriesCapacityData
})
}
if(seriesUsageRateData.length>0){
series.push({
... ... @@ -212,6 +229,12 @@ export default {
name:'使用率',
data:seriesUsageRateData
})
}else{
series.push({
type:'line',
name:'',
data:seriesUsageRateData
})
}
}else{
... ...
... ... @@ -46,6 +46,14 @@ export const monitorCustomBarLineChart = {
placeholder: '',
value: false,
},
{
type: 'el-input-text',
label: '下拉列表联动kpi',
name: 'vuexFlagKpiId',
required: false,
placeholder: '',
value: '',
},
[
{
name: '折线设置',
... ...
... ... @@ -27,6 +27,14 @@ export const monitorSelectOption = {
value: '请选择',
},
{
type: 'el-input-text',
label: '全部的值',
name: 'allValue',
required: false,
placeholder: '',
value: 'disk-all',
},
{
type: 'el-switch',
label: '是否可清空',
name: 'clearable',
... ...
... ... @@ -48,6 +48,22 @@ export const monitorTreeShape = {
},
{
type: 'el-input-text',
label: '业务二级页不同类型相关页面编码',
name: 'serviceSecondCode',
required: false,
placeholder: '',
value: 'service_capacity_analysis_second,service_capacity_analysis_second_mem,service_capacity_analysis_second_tps',
},
{
type: 'el-input-text',
label: '业务三级页不同类型相关页面编码',
name: 'serviceTertiaryCode',
required: false,
placeholder: '',
value: 'service_capacity_analysis_tertiary,service_capacity_analysis_tertiary,service_capacity_analysis_tertiary_tps',
},
{
type: 'el-input-text',
label: '资源系统相关页面编码',
name: 'resourceCode',
required: false,
... ... @@ -56,6 +72,22 @@ export const monitorTreeShape = {
},
{
type: 'el-input-text',
label: '资源二级页不同类型相关页面编码',
name: 'resourceSecondCode',
required: false,
placeholder: '',
value: 'resource_capacity_analysis,service_capacity_analysis_second_mem,service_capacity_analysis_second_tps',
},
{
type: 'el-input-text',
label: '资源三级页不同类型相关页面编码',
name: 'resourceTertiaryCode',
required: false,
placeholder: '',
value: 'service_capacity_analysis_tertiary,service_capacity_analysis_tertiary,service_capacity_analysis_tertiary_tps',
},
{
type: 'el-input-text',
label: '字树节点',
name: 'propsChildren',
required: false,
... ...
... ... @@ -194,12 +194,16 @@ export default {
if(this.optionsData.dataType=="dynamicData"){
//改变参下拉列表,重新加载动态数据--待测
let flag='';
if(val){
flag=val.join(",");
let kpiId='';
if(val && val.length>0){
kpiId=val[0];
flag=val[1].join(",");
}
if(this.optionsSetup.vuexFlagKpiId==kpiId){
this.optionsData.dynamicData.contextData.flag=flag;
}
}
}
},
deep:true
... ...
<template>
<div :style="styleObj">
<v-chart :options="options" autoresize/>
<v-chart v-if="hackReset" :options="options" autoresize/>
</div>
</template>
... ... @@ -16,6 +16,7 @@ export default {
},
data() {
return {
hackReset:true,
options: {
grid: {},
/*legend: {
... ... @@ -95,7 +96,8 @@ export default {
handler(val){
if(this.optionsSetup.isVuex){
let optionsData=this.optionsData;
/* if(this.optionsData.dataType=="dynamicData"){
/* this.hackReset=false;
if(this.optionsData.dataType=="dynamicData"){
//改变参数值-月季度年,重新加载动态数据--待测
this.optionsData.dynamicData.contextData.dataScope=val;
// this.editorOptions();
... ... @@ -362,6 +364,7 @@ export default {
},
//静态数据
staticDataFn(val) {
this.hackReset=true;
this.setSeriesData(val)
},
... ... @@ -428,7 +431,7 @@ export default {
name: 'U',
type: 'line',
data: data.map(function (item) {
return item.u - item.l;
return Number(item.u) - Number(item.l);
}),
lineStyle: {
opacity: 0
... ... @@ -466,7 +469,7 @@ export default {
return (
params[2].name +
'<br /><div style="text-align: left;">' +
'<div>预测最大值:'+(Number(params[1].value)+Number(params[0].value)) +unit+'</div>' +
'<div>预测最大值:'+(Number(params[1].value)+Number(params[0].value)).toFixed(2) +unit+'</div>' +
// '<br />' +
// ((params[2].value - base) * 100).toFixed(1) +
'<div>实际值:'+params[2].value +unit+'</div>' +
... ... @@ -492,11 +495,13 @@ export default {
},
getEchartData(val, optionsSetup) {
const data = this.queryEchartsData(val);
this.hackReset=false;
data.then(res => {
this.renderingFn(optionsSetup, res);
});
},
renderingFn(optionsSetup, val) {
this.hackReset=true;
this.setSeriesData(val.series)
}
}
... ...
... ... @@ -139,7 +139,7 @@ export default {
//选项是否加全部
pushAll(){
if(this.optionsSetUp.isAll){
this.selectOption.unshift({label:'全部',value:null})
this.selectOption.unshift({label:'全部',value:this.optionsSetUp.allValue})
}
},
//select的change事件
... ... @@ -148,7 +148,14 @@ export default {
if(!this.optionsSetUp.multiple){
data.push(val);
}
this.$store.commit('SELECT_VAL_ARR', data);
let kpiId='';
if(this.optionsData.dynamicData && this.optionsData.dynamicData.contextData.kpiId){
kpiId=this.optionsData.dynamicData.contextData.kpiId
}
let param=[
kpiId,data
]
this.$store.commit('SELECT_VAL_ARR', param);
},
handlerData() {
... ...
... ... @@ -190,7 +190,6 @@ export default {
getEchartData(val) {
const data = this.queryEchartsData(val);
data.then(res => {
console.log("&&&&",res)
if(res && res.length>0){
if(res[0].code==0){
this.systemData=res[0].data;
... ...
... ... @@ -136,25 +136,63 @@ export default {
let srcName=origin+'/#/bigscreen/viewer?reportCode=';
// serviceCode,resourceCode
let codeArr=[];
let codeArrSecond=[];
let codeArrTertiary=[];
if(this.activeName=='bos'){
codeArr=this.optionsSetup.serviceCode.split(',');
codeArrSecond=this.optionsSetup.serviceSecondCode?this.optionsSetup.serviceSecondCode.split(','):[];
codeArrTertiary=this.optionsSetup.serviceTertiaryCode?this.optionsSetup.serviceTertiaryCode.split(','):[];
}else{
codeArr=this.optionsSetup.resourceCode.split(',');
codeArrSecond=this.optionsSetup.resourceSecondCode?this.optionsSetup.resourceSecondCode.split(','):[];
codeArrTertiary=this.optionsSetup.resourceTertiaryCode?this.optionsSetup.resourceTertiaryCode.split(','):[];
}
// if(level>0){
if(data.propType){
if(data.propType=='busType'){
srcName+=codeArr[0];
}else if(data.propType=='resType'){
if(data.isOracle==1){
srcName+=codeArrSecond[0];
}else if(data.isOracle==2){
srcName+=codeArrSecond[1];
}else if(data.isOracle==3){
srcName+=codeArrSecond[2];
}else{
srcName+=codeArr[1];
}
}else if(data.propType=='res'){
if(data.isOracle==1){
srcName+=codeArrTertiary[0];
}else if(data.isOracle==2){
srcName+=codeArrTertiary[1];
}else if(data.isOracle==3){
srcName+=codeArrTertiary[2];
}else{
srcName+=codeArr[2];
}
}else{
if(data.isOracle==1){
srcName+=codeArrSecond[0];
}else if(data.isOracle==2){
srcName+=codeArrSecond[1];
}else if(data.isOracle==3){
srcName+=codeArrSecond[2];
}else{
srcName+=codeArr[0];
}
}
}else{
if(data.isOracle==1){
srcName+=codeArrSecond[0];
}else if(data.isOracle==2){
srcName+=codeArrSecond[1];
}else if(data.isOracle==3){
srcName+=codeArrSecond[2];
}else{
srcName+=codeArr[0];
}
}
/*if(data.id==1){
srcName+='service_capacity_analysis';
... ...