Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / standard_condition.0130d08e.js
import{_ as c}from"./barChart.0f07440b.js";import{_ as p,o,c as x,l as y,n as g}from"./index.82404a61.js";const h={class:"standard_condition"},v={__name:"standard_condition",props:{data:{type:Object,default:()=>({})}},setup(d){const r=d,{data:e}=r,i=e.targetyAxis.map(t=>t*1>0?t:0),a=e.realityyAxis.map(t=>t*1>0?t:0),s={xAxisData:e.xaxis,yAxisOption:{min:0,max:Math.ceil(Math.max(...i,...a)/100)*100||10},seriesData:[{type:"bar",name:"\u76EE\u6807",barWidth:16,barMinHeight:2,itemStyle:{color:"#5470c6"},label:{show:!0,color:"black",position:"top",distance:0,fontWeight:"bold"},data:i},{type:"bar",name:"\u8BBE\u8BA1",barWidth:16,barMinHeight:2,barGap:"60%",itemStyle:{color:"#91cc75"},label:{show:!0,color:"black",position:"top",distance:0,fontWeight:"bold"},data:a}]},l=t=>{const n=t[0].dataIndex;return`<div style="margin: 0px 0 0;line-height:1;min-width: 140px">
          <div>${t[0].axisValue}</div>
          <div style="margin-top:10px">
            <div style="display: flex;align-items: center;justify-content: space-between">
              <div style="display: flex;align-items: center;">
                <span style="background-color: ${t[0].color};width:10px;height:10px;margin-right:5px;border-radius: 50%"></span>
                <span>${t[0].seriesName}</span>
              </div>
              <div style="color:#666;font-weight:900;font-size:14px">${t[0].value}</div>
            </div>
          </div>
          <div style="margin-top:10px">
            <div style="display: flex;align-items: center;justify-content: space-between">
              <div style="display: flex;align-items: center;">
                <span style="background-color: ${t[1].color};width:10px;height:10px;margin-right:5px;border-radius: 50%"></span>
                <span>${t[1].seriesName}</span>
              </div>
              <div style="color:#666;font-weight:900;font-size:14px">${t[1].value}</div>
            </div>
          </div>
          <div style="margin-top:10px">
            <div style="display: flex;align-items: center;justify-content: space-between">
              <div style="display: flex;align-items: center;">
                <span style="background-color: #fac858;width:10px;height:10px;margin-right:5px;border-radius: 50%"></span>
                <span>\u662F\u5426\u8FBE\u6807</span>
              </div>
              <div style="color:#666;font-weight:900;font-size:14px">${e.resultyAxis[n]}</div>
            </div>
          </div>
        </div>`};return(t,n)=>(o(),x("div",h,[s.xAxisData.length?(o(),y(c,{key:0,echartData:s,yAxisName:"\u767E\u5206\u6BD4/%",tooltipFormatter:l,ref:"barChartRef"},null,512)):g("",!0)]))}},f=p(v,[["__scopeId","data-v-cd5b7c7c"]]);export{f as default};