Merge branch 'master-500-dev' of http://113.200.75.45:82/monitor_v3/anji-plus-re…
…port into master-500-dev
Showing
10 changed files
with
142 additions
and
18 deletions
@@ -186,10 +186,15 @@ export default { | @@ -186,10 +186,15 @@ export default { | ||
186 | let seriesUsageValueData=[];//使用量 | 186 | let seriesUsageValueData=[];//使用量 |
187 | dataData.map(item=>{ | 187 | dataData.map(item=>{ |
188 | xAxisList.push(item.periodVal); | 188 | xAxisList.push(item.periodVal); |
189 | - seriesCapacityData.push(item.capacityValue) | ||
190 | - seriesUsageRateData.push(item.usageRate) | ||
191 | - seriesUsageValueData.push(item.usageValue) | ||
192 | - | 189 | + if(item.capacityValue || item.capacityValue==0){ |
190 | + seriesCapacityData.push(item.capacityValue) | ||
191 | + } | ||
192 | + if(item.usageRate || item.usageRate==0){ | ||
193 | + seriesUsageRateData.push(item.usageRate) | ||
194 | + } | ||
195 | + if(item.usageValue || item.usageValue==0){ | ||
196 | + seriesUsageValueData.push(item.usageValue) | ||
197 | + } | ||
193 | }) | 198 | }) |
194 | if(seriesUsageValueData.length>0){ | 199 | if(seriesUsageValueData.length>0){ |
195 | series.push({ | 200 | series.push({ |
@@ -197,6 +202,12 @@ export default { | @@ -197,6 +202,12 @@ export default { | ||
197 | name:'使用量', | 202 | name:'使用量', |
198 | data:seriesUsageValueData | 203 | data:seriesUsageValueData |
199 | }) | 204 | }) |
205 | + }else{ | ||
206 | + series.push({ | ||
207 | + type:'bar', | ||
208 | + name:'', | ||
209 | + data:seriesUsageValueData | ||
210 | + }) | ||
200 | } | 211 | } |
201 | 212 | ||
202 | if(seriesCapacityData.length>0){ | 213 | if(seriesCapacityData.length>0){ |
@@ -205,6 +216,12 @@ export default { | @@ -205,6 +216,12 @@ export default { | ||
205 | name:'容量', | 216 | name:'容量', |
206 | data:seriesCapacityData | 217 | data:seriesCapacityData |
207 | }) | 218 | }) |
219 | + }else{ | ||
220 | + series.push({ | ||
221 | + type:'line', | ||
222 | + name:'', | ||
223 | + data:seriesCapacityData | ||
224 | + }) | ||
208 | } | 225 | } |
209 | if(seriesUsageRateData.length>0){ | 226 | if(seriesUsageRateData.length>0){ |
210 | series.push({ | 227 | series.push({ |
@@ -212,6 +229,12 @@ export default { | @@ -212,6 +229,12 @@ export default { | ||
212 | name:'使用率', | 229 | name:'使用率', |
213 | data:seriesUsageRateData | 230 | data:seriesUsageRateData |
214 | }) | 231 | }) |
232 | + }else{ | ||
233 | + series.push({ | ||
234 | + type:'line', | ||
235 | + name:'', | ||
236 | + data:seriesUsageRateData | ||
237 | + }) | ||
215 | } | 238 | } |
216 | 239 | ||
217 | }else{ | 240 | }else{ |
@@ -46,6 +46,14 @@ export const monitorCustomBarLineChart = { | @@ -46,6 +46,14 @@ export const monitorCustomBarLineChart = { | ||
46 | placeholder: '', | 46 | placeholder: '', |
47 | value: false, | 47 | value: false, |
48 | }, | 48 | }, |
49 | + { | ||
50 | + type: 'el-input-text', | ||
51 | + label: '下拉列表联动kpi', | ||
52 | + name: 'vuexFlagKpiId', | ||
53 | + required: false, | ||
54 | + placeholder: '', | ||
55 | + value: '', | ||
56 | + }, | ||
49 | [ | 57 | [ |
50 | { | 58 | { |
51 | name: '折线设置', | 59 | name: '折线设置', |
@@ -27,6 +27,14 @@ export const monitorSelectOption = { | @@ -27,6 +27,14 @@ export const monitorSelectOption = { | ||
27 | value: '请选择', | 27 | value: '请选择', |
28 | }, | 28 | }, |
29 | { | 29 | { |
30 | + type: 'el-input-text', | ||
31 | + label: '全部的值', | ||
32 | + name: 'allValue', | ||
33 | + required: false, | ||
34 | + placeholder: '', | ||
35 | + value: 'disk-all', | ||
36 | + }, | ||
37 | + { | ||
30 | type: 'el-switch', | 38 | type: 'el-switch', |
31 | label: '是否可清空', | 39 | label: '是否可清空', |
32 | name: 'clearable', | 40 | name: 'clearable', |
@@ -48,6 +48,22 @@ export const monitorTreeShape = { | @@ -48,6 +48,22 @@ export const monitorTreeShape = { | ||
48 | }, | 48 | }, |
49 | { | 49 | { |
50 | type: 'el-input-text', | 50 | type: 'el-input-text', |
51 | + label: '业务二级页不同类型相关页面编码', | ||
52 | + name: 'serviceSecondCode', | ||
53 | + required: false, | ||
54 | + placeholder: '', | ||
55 | + value: 'service_capacity_analysis_second,service_capacity_analysis_second_mem,service_capacity_analysis_second_tps', | ||
56 | + }, | ||
57 | + { | ||
58 | + type: 'el-input-text', | ||
59 | + label: '业务三级页不同类型相关页面编码', | ||
60 | + name: 'serviceTertiaryCode', | ||
61 | + required: false, | ||
62 | + placeholder: '', | ||
63 | + value: 'service_capacity_analysis_tertiary,service_capacity_analysis_tertiary,service_capacity_analysis_tertiary_tps', | ||
64 | + }, | ||
65 | + { | ||
66 | + type: 'el-input-text', | ||
51 | label: '资源系统相关页面编码', | 67 | label: '资源系统相关页面编码', |
52 | name: 'resourceCode', | 68 | name: 'resourceCode', |
53 | required: false, | 69 | required: false, |
@@ -56,6 +72,22 @@ export const monitorTreeShape = { | @@ -56,6 +72,22 @@ export const monitorTreeShape = { | ||
56 | }, | 72 | }, |
57 | { | 73 | { |
58 | type: 'el-input-text', | 74 | type: 'el-input-text', |
75 | + label: '资源二级页不同类型相关页面编码', | ||
76 | + name: 'resourceSecondCode', | ||
77 | + required: false, | ||
78 | + placeholder: '', | ||
79 | + value: 'resource_capacity_analysis,service_capacity_analysis_second_mem,service_capacity_analysis_second_tps', | ||
80 | + }, | ||
81 | + { | ||
82 | + type: 'el-input-text', | ||
83 | + label: '资源三级页不同类型相关页面编码', | ||
84 | + name: 'resourceTertiaryCode', | ||
85 | + required: false, | ||
86 | + placeholder: '', | ||
87 | + value: 'service_capacity_analysis_tertiary,service_capacity_analysis_tertiary,service_capacity_analysis_tertiary_tps', | ||
88 | + }, | ||
89 | + { | ||
90 | + type: 'el-input-text', | ||
59 | label: '字树节点', | 91 | label: '字树节点', |
60 | name: 'propsChildren', | 92 | name: 'propsChildren', |
61 | required: false, | 93 | required: false, |
@@ -194,10 +194,14 @@ export default { | @@ -194,10 +194,14 @@ export default { | ||
194 | if(this.optionsData.dataType=="dynamicData"){ | 194 | if(this.optionsData.dataType=="dynamicData"){ |
195 | //改变参下拉列表,重新加载动态数据--待测 | 195 | //改变参下拉列表,重新加载动态数据--待测 |
196 | let flag=''; | 196 | let flag=''; |
197 | - if(val){ | ||
198 | - flag=val.join(","); | 197 | + let kpiId=''; |
198 | + if(val && val.length>0){ | ||
199 | + kpiId=val[0]; | ||
200 | + flag=val[1].join(","); | ||
201 | + } | ||
202 | + if(this.optionsSetup.vuexFlagKpiId==kpiId){ | ||
203 | + this.optionsData.dynamicData.contextData.flag=flag; | ||
199 | } | 204 | } |
200 | - this.optionsData.dynamicData.contextData.flag=flag; | ||
201 | } | 205 | } |
202 | } | 206 | } |
203 | 207 |
1 | <template> | 1 | <template> |
2 | <div :style="styleObj"> | 2 | <div :style="styleObj"> |
3 | - <v-chart :options="options" autoresize/> | 3 | + <v-chart v-if="hackReset" :options="options" autoresize/> |
4 | </div> | 4 | </div> |
5 | </template> | 5 | </template> |
6 | 6 | ||
@@ -16,6 +16,7 @@ export default { | @@ -16,6 +16,7 @@ export default { | ||
16 | }, | 16 | }, |
17 | data() { | 17 | data() { |
18 | return { | 18 | return { |
19 | + hackReset:true, | ||
19 | options: { | 20 | options: { |
20 | grid: {}, | 21 | grid: {}, |
21 | /*legend: { | 22 | /*legend: { |
@@ -95,7 +96,8 @@ export default { | @@ -95,7 +96,8 @@ export default { | ||
95 | handler(val){ | 96 | handler(val){ |
96 | if(this.optionsSetup.isVuex){ | 97 | if(this.optionsSetup.isVuex){ |
97 | let optionsData=this.optionsData; | 98 | let optionsData=this.optionsData; |
98 | - /* if(this.optionsData.dataType=="dynamicData"){ | 99 | + /* this.hackReset=false; |
100 | + if(this.optionsData.dataType=="dynamicData"){ | ||
99 | //改变参数值-月季度年,重新加载动态数据--待测 | 101 | //改变参数值-月季度年,重新加载动态数据--待测 |
100 | this.optionsData.dynamicData.contextData.dataScope=val; | 102 | this.optionsData.dynamicData.contextData.dataScope=val; |
101 | // this.editorOptions(); | 103 | // this.editorOptions(); |
@@ -362,6 +364,7 @@ export default { | @@ -362,6 +364,7 @@ export default { | ||
362 | }, | 364 | }, |
363 | //静态数据 | 365 | //静态数据 |
364 | staticDataFn(val) { | 366 | staticDataFn(val) { |
367 | + this.hackReset=true; | ||
365 | this.setSeriesData(val) | 368 | this.setSeriesData(val) |
366 | 369 | ||
367 | }, | 370 | }, |
@@ -428,7 +431,7 @@ export default { | @@ -428,7 +431,7 @@ export default { | ||
428 | name: 'U', | 431 | name: 'U', |
429 | type: 'line', | 432 | type: 'line', |
430 | data: data.map(function (item) { | 433 | data: data.map(function (item) { |
431 | - return item.u - item.l; | 434 | + return Number(item.u) - Number(item.l); |
432 | }), | 435 | }), |
433 | lineStyle: { | 436 | lineStyle: { |
434 | opacity: 0 | 437 | opacity: 0 |
@@ -466,7 +469,7 @@ export default { | @@ -466,7 +469,7 @@ export default { | ||
466 | return ( | 469 | return ( |
467 | params[2].name + | 470 | params[2].name + |
468 | '<br /><div style="text-align: left;">' + | 471 | '<br /><div style="text-align: left;">' + |
469 | - '<div>预测最大值:'+(Number(params[1].value)+Number(params[0].value)) +unit+'</div>' + | 472 | + '<div>预测最大值:'+(Number(params[1].value)+Number(params[0].value)).toFixed(2) +unit+'</div>' + |
470 | // '<br />' + | 473 | // '<br />' + |
471 | // ((params[2].value - base) * 100).toFixed(1) + | 474 | // ((params[2].value - base) * 100).toFixed(1) + |
472 | '<div>实际值:'+params[2].value +unit+'</div>' + | 475 | '<div>实际值:'+params[2].value +unit+'</div>' + |
@@ -492,11 +495,13 @@ export default { | @@ -492,11 +495,13 @@ export default { | ||
492 | }, | 495 | }, |
493 | getEchartData(val, optionsSetup) { | 496 | getEchartData(val, optionsSetup) { |
494 | const data = this.queryEchartsData(val); | 497 | const data = this.queryEchartsData(val); |
498 | + this.hackReset=false; | ||
495 | data.then(res => { | 499 | data.then(res => { |
496 | this.renderingFn(optionsSetup, res); | 500 | this.renderingFn(optionsSetup, res); |
497 | }); | 501 | }); |
498 | }, | 502 | }, |
499 | renderingFn(optionsSetup, val) { | 503 | renderingFn(optionsSetup, val) { |
504 | + this.hackReset=true; | ||
500 | this.setSeriesData(val.series) | 505 | this.setSeriesData(val.series) |
501 | } | 506 | } |
502 | } | 507 | } |
@@ -139,7 +139,7 @@ export default { | @@ -139,7 +139,7 @@ export default { | ||
139 | //选项是否加全部 | 139 | //选项是否加全部 |
140 | pushAll(){ | 140 | pushAll(){ |
141 | if(this.optionsSetUp.isAll){ | 141 | if(this.optionsSetUp.isAll){ |
142 | - this.selectOption.unshift({label:'全部',value:null}) | 142 | + this.selectOption.unshift({label:'全部',value:this.optionsSetUp.allValue}) |
143 | } | 143 | } |
144 | }, | 144 | }, |
145 | //select的change事件 | 145 | //select的change事件 |
@@ -148,7 +148,14 @@ export default { | @@ -148,7 +148,14 @@ export default { | ||
148 | if(!this.optionsSetUp.multiple){ | 148 | if(!this.optionsSetUp.multiple){ |
149 | data.push(val); | 149 | data.push(val); |
150 | } | 150 | } |
151 | - this.$store.commit('SELECT_VAL_ARR', data); | 151 | + let kpiId=''; |
152 | + if(this.optionsData.dynamicData && this.optionsData.dynamicData.contextData.kpiId){ | ||
153 | + kpiId=this.optionsData.dynamicData.contextData.kpiId | ||
154 | + } | ||
155 | + let param=[ | ||
156 | + kpiId,data | ||
157 | + ] | ||
158 | + this.$store.commit('SELECT_VAL_ARR', param); | ||
152 | 159 | ||
153 | }, | 160 | }, |
154 | handlerData() { | 161 | handlerData() { |
@@ -190,7 +190,6 @@ export default { | @@ -190,7 +190,6 @@ export default { | ||
190 | getEchartData(val) { | 190 | getEchartData(val) { |
191 | const data = this.queryEchartsData(val); | 191 | const data = this.queryEchartsData(val); |
192 | data.then(res => { | 192 | data.then(res => { |
193 | - console.log("&&&&",res) | ||
194 | if(res && res.length>0){ | 193 | if(res && res.length>0){ |
195 | if(res[0].code==0){ | 194 | if(res[0].code==0){ |
196 | this.systemData=res[0].data; | 195 | this.systemData=res[0].data; |
@@ -136,24 +136,62 @@ export default { | @@ -136,24 +136,62 @@ export default { | ||
136 | let srcName=origin+'/#/bigscreen/viewer?reportCode='; | 136 | let srcName=origin+'/#/bigscreen/viewer?reportCode='; |
137 | // serviceCode,resourceCode | 137 | // serviceCode,resourceCode |
138 | let codeArr=[]; | 138 | let codeArr=[]; |
139 | + let codeArrSecond=[]; | ||
140 | + let codeArrTertiary=[]; | ||
139 | if(this.activeName=='bos'){ | 141 | if(this.activeName=='bos'){ |
140 | codeArr=this.optionsSetup.serviceCode.split(','); | 142 | codeArr=this.optionsSetup.serviceCode.split(','); |
143 | + codeArrSecond=this.optionsSetup.serviceSecondCode?this.optionsSetup.serviceSecondCode.split(','):[]; | ||
144 | + codeArrTertiary=this.optionsSetup.serviceTertiaryCode?this.optionsSetup.serviceTertiaryCode.split(','):[]; | ||
141 | }else{ | 145 | }else{ |
142 | codeArr=this.optionsSetup.resourceCode.split(','); | 146 | codeArr=this.optionsSetup.resourceCode.split(','); |
147 | + codeArrSecond=this.optionsSetup.resourceSecondCode?this.optionsSetup.resourceSecondCode.split(','):[]; | ||
148 | + codeArrTertiary=this.optionsSetup.resourceTertiaryCode?this.optionsSetup.resourceTertiaryCode.split(','):[]; | ||
143 | } | 149 | } |
144 | // if(level>0){ | 150 | // if(level>0){ |
145 | if(data.propType){ | 151 | if(data.propType){ |
146 | if(data.propType=='busType'){ | 152 | if(data.propType=='busType'){ |
147 | srcName+=codeArr[0]; | 153 | srcName+=codeArr[0]; |
148 | }else if(data.propType=='resType'){ | 154 | }else if(data.propType=='resType'){ |
149 | - srcName+=codeArr[1]; | 155 | + if(data.isOracle==1){ |
156 | + srcName+=codeArrSecond[0]; | ||
157 | + }else if(data.isOracle==2){ | ||
158 | + srcName+=codeArrSecond[1]; | ||
159 | + }else if(data.isOracle==3){ | ||
160 | + srcName+=codeArrSecond[2]; | ||
161 | + }else{ | ||
162 | + srcName+=codeArr[1]; | ||
163 | + } | ||
150 | }else if(data.propType=='res'){ | 164 | }else if(data.propType=='res'){ |
151 | - srcName+=codeArr[2]; | 165 | + if(data.isOracle==1){ |
166 | + srcName+=codeArrTertiary[0]; | ||
167 | + }else if(data.isOracle==2){ | ||
168 | + srcName+=codeArrTertiary[1]; | ||
169 | + }else if(data.isOracle==3){ | ||
170 | + srcName+=codeArrTertiary[2]; | ||
171 | + }else{ | ||
172 | + srcName+=codeArr[2]; | ||
173 | + } | ||
152 | }else{ | 174 | }else{ |
153 | - srcName+=codeArr[0]; | 175 | + if(data.isOracle==1){ |
176 | + srcName+=codeArrSecond[0]; | ||
177 | + }else if(data.isOracle==2){ | ||
178 | + srcName+=codeArrSecond[1]; | ||
179 | + }else if(data.isOracle==3){ | ||
180 | + srcName+=codeArrSecond[2]; | ||
181 | + }else{ | ||
182 | + srcName+=codeArr[0]; | ||
183 | + } | ||
154 | } | 184 | } |
155 | }else{ | 185 | }else{ |
156 | - srcName+=codeArr[0]; | 186 | + if(data.isOracle==1){ |
187 | + srcName+=codeArrSecond[0]; | ||
188 | + }else if(data.isOracle==2){ | ||
189 | + srcName+=codeArrSecond[1]; | ||
190 | + }else if(data.isOracle==3){ | ||
191 | + srcName+=codeArrSecond[2]; | ||
192 | + }else{ | ||
193 | + srcName+=codeArr[0]; | ||
194 | + } | ||
157 | } | 195 | } |
158 | 196 | ||
159 | /*if(data.id==1){ | 197 | /*if(data.id==1){ |

2.61 KB
-
Please register or login to post a comment