Authored by 王涛

Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'

柱线图悬浮提示不添加title



See merge request !68
@@ -191,21 +191,29 @@ export default { @@ -191,21 +191,29 @@ export default {
191 seriesUsageValueData.push(item.usageValue) 191 seriesUsageValueData.push(item.usageValue)
192 192
193 }) 193 })
194 - series.push({  
195 - type:'bar',  
196 - name:'使用量',  
197 - data:seriesUsageValueData  
198 - })  
199 - series.push({  
200 - type:'line',  
201 - name:'容量',  
202 - data:seriesCapacityData  
203 - })  
204 - series.push({  
205 - type:'line',  
206 - name:'使用率',  
207 - data:seriesUsageRateData  
208 - }) 194 + if(seriesUsageValueData.length>0){
  195 + series.push({
  196 + type:'bar',
  197 + name:'使用量',
  198 + data:seriesUsageValueData
  199 + })
  200 + }
  201 +
  202 + if(seriesCapacityData.length>0){
  203 + series.push({
  204 + type:'line',
  205 + name:'容量',
  206 + data:seriesCapacityData
  207 + })
  208 + }
  209 + if(seriesUsageRateData.length>0){
  210 + series.push({
  211 + type:'line',
  212 + name:'使用率',
  213 + data:seriesUsageRateData
  214 + })
  215 + }
  216 +
209 }else{ 217 }else{
210 xAxisList=[] 218 xAxisList=[]
211 series = [{ 219 series = [{
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 <el-tooltip v-model="visible" :manual="true" placement="right-start"> 20 <el-tooltip v-model="visible" :manual="true" placement="right-start">
21 <template #content> 21 <template #content>
22 <div class="basic-tbody-all basic-border-nowrap" :style="wrapStyle"> 22 <div class="basic-tbody-all basic-border-nowrap" :style="wrapStyle">
23 - <el-row class="basic-item" v-if="item.isDisplay=='1' && (titleName?index>=0:index>0)" v-for="(item,index) in informationDataAll" :key="index"> 23 + <el-row class="basic-item" v-if="(item.isDisplay=='1' || !item.isDisplay) && (titleName?index>=0:index>0)" v-for="(item,index) in informationDataAll" :key="index">
24 <el-col :style="[lineHeightStyle]" v-if="(titleName?index>=0:index>0)" class="basic-border basic-item-title basic-flex" :span="10"> 24 <el-col :style="[lineHeightStyle]" v-if="(titleName?index>=0:index>0)" class="basic-border basic-item-title basic-flex" :span="10">
25 {{ item.name }} 25 {{ item.name }}
26 </el-col> 26 </el-col>
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 </el-row> 29 </el-row>
30 </div> 30 </div>
31 </template> 31 </template>
32 - <i class="el-icon-info"@mouseenter="visible = true"/> 32 + <i class="el-icon-info"@mouseenter="informationDataAll.length>2?visible = true:visible = false"/>
33 </el-tooltip> 33 </el-tooltip>
34 <el-tooltip 34 <el-tooltip
35 class="box-item" 35 class="box-item"
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 </el-row> 43 </el-row>
44 </div> 44 </div>
45 <div class="basic-tbody basic-border-wrap" :style="wrapStyle"> 45 <div class="basic-tbody basic-border-wrap" :style="wrapStyle">
46 - <el-row class="basic-item" :style="itemStyle" v-if="item.isDisplay=='1' && (titleName?index>=0:index>0)" v-for="(item,index) in informationData" :key="index"> 46 + <el-row class="basic-item" :style="itemStyle" v-if="(item.isDisplay=='1' || !item.isDisplay) && (titleName?index>=0:index>0)" v-for="(item,index) in informationData" :key="index">
47 <!-- <el-col :style="headStyle" v-if="attrKey.attrKeyVal.indexOf(item.nameCode)>0 && index>0" class="basic-border basic-item-title basic-flex backColor" :span="10">--> 47 <!-- <el-col :style="headStyle" v-if="attrKey.attrKeyVal.indexOf(item.nameCode)>0 && index>0" class="basic-border basic-item-title basic-flex backColor" :span="10">-->
48 <el-col :style="[headStyle,borderStlye,lineHeightStyle]" v-if="(titleName?index>=0:index>0)" class="basic-border basic-item-title basic-flex backColor" :span="10"> 48 <el-col :style="[headStyle,borderStlye,lineHeightStyle]" v-if="(titleName?index>=0:index>0)" class="basic-border basic-item-title basic-flex backColor" :span="10">
49 {{ item.name }} 49 {{ item.name }}
@@ -393,7 +393,8 @@ export default { @@ -393,7 +393,8 @@ export default {
393 fontSize: optionsSetup.tipFontSize 393 fontSize: optionsSetup.tipFontSize
394 }, 394 },
395 formatter:function (param) { 395 formatter:function (param) {
396 - let kpiName=optionsSetup.titleText; 396 + // let kpiName=optionsSetup.titleText;
  397 + let kpiName='';
397 // 鼠标悬浮线上提示 398 // 鼠标悬浮线上提示
398 // 顶部提示 399 // 顶部提示
399 let tips = '<table>'; 400 let tips = '<table>';
@@ -413,7 +413,8 @@ export default { @@ -413,7 +413,8 @@ export default {
413 name: 'L', 413 name: 'L',
414 type: 'line', 414 type: 'line',
415 data: data.map(function (item) { 415 data: data.map(function (item) {
416 - return item.l + base; 416 + // return item.l + base;
  417 + return item.l ;
417 }), 418 }),
418 lineStyle: { 419 lineStyle: {
419 opacity: 0 420 opacity: 0
@@ -437,7 +438,8 @@ export default { @@ -437,7 +438,8 @@ export default {
437 { 438 {
438 type: 'line', 439 type: 'line',
439 data: data.map(function (item) { 440 data: data.map(function (item) {
440 - return item.value + base; 441 + // return item.value + base;
  442 + return item.value ;
441 }), 443 }),
442 itemStyle: { 444 itemStyle: {
443 color: arrColor[0] 445 color: arrColor[0]
@@ -459,11 +461,18 @@ export default { @@ -459,11 +461,18 @@ export default {
459 } 461 }
460 let toolTip=this.options.tooltip; 462 let toolTip=this.options.tooltip;
461 toolTip.formatter=function (params) { 463 toolTip.formatter=function (params) {
  464 + console.log("*****",params)
462 return ( 465 return (
463 params[2].name + 466 params[2].name +
464 - '<br />' +  
465 - ((params[2].value - base) * 100).toFixed(1) +  
466 - '%' 467 + '<br /><div style="text-align: left;">' +
  468 + '<div>预测最大值:'+(Number(params[1].value)+Number(params[0].value)) +'%</div>' +
  469 + // '<br />' +
  470 + // ((params[2].value - base) * 100).toFixed(1) +
  471 + '<div>实际值:'+params[2].value +'%</div>' +
  472 + // '<br />' +
  473 + '<div>预测最小值:'+params[0].value +'%</div></div>'
  474 +
  475 +
467 ); 476 );
468 } 477 }
469 478
@@ -211,6 +211,10 @@ export default { @@ -211,6 +211,10 @@ export default {
211 flagStr=flagArr.join(',') 211 flagStr=flagArr.join(',')
212 } 212 }
213 this.$store.commit('CHANGE_PROGRESS',flagStr) 213 this.$store.commit('CHANGE_PROGRESS',flagStr)
  214 + }else {
  215 + let name='';
  216 + this.progressData=[{name:name,rate:0}];
  217 +
214 } 218 }
215 }); 219 });
216 }, 220 },