Newer
Older
Nanping_sponge_JXKH / spongePerformanceDist / assets / chart.a395940c.js
import{_ as w}from"./barChart.0f07440b.js";import{_ as D,r as n,y as k,al as A,e as m,o as c,c as B,f as p,w as x,m as C,h as a,l as _,n as h,G as S}from"./index.82404a61.js";const N={class:"chart-box-nopx"},M={__name:"chart",props:{title:{type:String,default:"\u9879\u76EE\u5E74\u5F84\u6D41\u603B\u91CF\u63A7\u5236\u7387\u8BC4\u4EF7\u7EDF\u8BA1"},data:{type:Array,default:()=>[]}},setup(i){const t=i,o=n(0),f=new Map([[0,"#5470c6"],[1,"#91cc75"],[2,"#fac858"],[3,"#73c0de"]]),s=k(()=>({xAxisData:t.data.map(e=>e.name),seriesData:[{type:"bar",name:"\u9879\u76EE\u4E2A\u6570",colorBy:"data",selectedMode:"single",barWidth:30,data:t.data.map((e,l)=>({...e,itemStyle:{color:f.get(l)}}))}]})),u=n(!1),g=n([{name1:"xxxx",name2:"xxxx",name3:"xxxx",name4:"xxxx"}]),b=[{prop:"name1",label:"name1"},{prop:"name2",label:"name2"},{prop:"name3",label:"name3"},{prop:"name4",label:"name4"}],r=n(!1);A(()=>t.title,()=>{o.value++});const y=e=>{console.log(e),r.value=e.params.fromAction==="select"};return(e,l)=>{const d=m("card"),v=m("new-table");return c(),B(S,null,[p(d,{header:t.title,class:"card-nopx card1-nopx"},{default:x(()=>[C("div",N,[a(s).xAxisData.length?(c(),_(w,{key:0,echartData:a(s),yAxisName:"\u6570\u91CF",ref:"barChartRef",legend:{show:!1},grid:{left:"3%",right:"7%",top:"15%",bottom:"3%",containLabel:!0},refresh:a(o),event:"selectchanged",onSelectchangedCallback:y},null,8,["echartData","refresh"])):h("",!0)])]),_:1},8,["header"]),a(r)?(c(),_(d,{key:0,header:"\u8868\u683C\u6570\u636E",class:"card-nopx card2-nopx"},{default:x(()=>[p(v,{class:"table-nopx",data:a(g),columns:b,loading:a(u),"max-height":300},null,8,["data","loading"])]),_:1})):h("",!0)],64)}}},F=D(M,[["__scopeId","data-v-3edf9a7c"]]);export{F as default};