Files
aiot-platform-ui/apps/web-antd/dist/js/area-stay-chart-J3uP__dy.js
lzh b651e9ae25
All checks were successful
Web UI CI/CD / build-and-deploy (push) Successful in 8s
chore: build and deploy web-antd
2026-04-07 13:03:22 +08:00

2 lines
1.8 KiB
JavaScript

import{bu as d,am as b,ac as g}from"./bootstrap-dXw-kJha.js";import{f as v}from"./data-DcmDNjV_.js";import{u as S,_ as w}from"./use-echarts-CLApA62n.js";import{m as E,b9 as N,aa as A,w as C,ad as l,b2 as f,ae as M,ac as R,bL as $,j as m,u as n}from"../jse/index-index-CZKOWp-q.js";const I={class:"area-stay-chart bg-card"},k={key:0,class:"chart-empty"},B=E({__name:"area-stay-chart",props:{data:{}},setup(u){const r=u,i=N(),{renderEcharts:p}=S(i),o=A(()=>r.data.length>0);function h(){const s=r.data;if(s.length===0)return{};const a=s.slice(0,10),c=a.map(t=>t.fullAreaName||t.areaName).toReversed(),y=a.map(t=>Math.round(t.totalStaySeconds/60)).toReversed();return{tooltip:{trigger:"axis",axisPointer:{type:"shadow"},formatter(t){const x=t[0],_=a.length-1-x.dataIndex,e=a[_];return e?`${e.fullAreaName||e.areaName}<br/>停留: ${v(e.totalStaySeconds)}<br/>进出: ${e.visitCount}`:""}},grid:{left:"8px",right:"8px",bottom:"3%",top:"8%",containLabel:!1},xAxis:{type:"value",show:!1},yAxis:{type:"category",data:c,show:!1},series:[{type:"bar",data:y,barMaxWidth:24,barMinWidth:18,itemStyle:{borderRadius:[0,4,4,0],color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#597ef7"},{offset:1,color:"#85a5ff"}]}},label:{show:!0,position:"insideLeft",color:"#fff",fontSize:11,textShadowColor:"rgba(0,0,0,0.3)",textShadowBlur:2,formatter(t){return`${c[t.dataIndex]} ${t.value}m`}}}]}}return C(()=>r.data,()=>{o.value&&p(h())},{immediate:!0,deep:!0}),(s,a)=>(f(),l("div",I,[a[0]||(a[0]=M("div",{class:"chart-title"},"区域停留分布",-1)),o.value?R("",!0):(f(),l("div",k,[m(n(d),{description:"暂无数据",image:n(d).PRESENTED_IMAGE_SIMPLE},null,8,["image"])])),$(m(n(w),{ref_key:"chartRef",ref:i,height:"260px",width:"100%"},null,512),[[b,o.value]])]))}}),j=g(B,[["__scopeId","data-v-f237a30e"]]);export{j as default};