var i=Math.pow;import{g as W,d as m,t as b,s as M,h as c,e as A}from"./livestockData-36ec0ae2-1784378651390.js";import{c as T}from"./data-ee410ed3-1784378651390.js";const e=(a,n=2)=>{const t=i(10,n);return Math.round((Number(a)||0)*t)/t},g=(a,n)=>a.reduce((t,u)=>t+(Number(u[n])||0),0),k=a=>e((Number(a)||0)/1e4,2),x=g(b,"value"),S=g(m,"yakCount"),d=A,o=e(c.grasslandArea/1e4,2),l=e(c.wetArea/1e4,2),r=177.92,P=e(o+l+r,2),N=e(d/Math.max(o,1),1),v=e(l/Math.max(P,1)*100,1),w=637.07,s=108.84,R=297.29,y=159.33,C=e(o+l,2),Y=e((R+s)*2e3/Math.max(C,1),2),I=[{key:"pasture-area",zh:"草场面积",name:"草场面积",value:C,unit:"万亩",decimals:2,icon:"area"},{key:"pasture-productivity",zh:"草场生产力",name:"草场生产力",value:Y,unit:"斤/亩",decimals:2,icon:"yield"},{key:"yak-stock",zh:"牦牛存栏",name:"牦牛存栏",value:d,unit:"头",decimals:0,icon:"stack"},{key:"today-outflow",zh:"今日出栏",name:"今日出栏",value:0,unit:"头",decimals:0,icon:"length"},{key:"county-overload-rate",zh:"超载率",name:"超载率",value:T.overloadRate,unit:"%",decimals:2,icon:"rate"}],j=[{key:"grassland",name:"草地面积",value:o,unit:"万亩",tone:"green"},{key:"wetland",name:"湿地面积",value:l,unit:"万亩",tone:"cyan"},{key:"woodland",name:"林地面积",value:r,unit:"万亩",tone:"mint"},{key:"yak-density",name:"草畜密度",value:N,unit:"头/万亩",tone:"gold"}],D=[{key:"grassland",name:"草地",value:o,unit:"万亩",color:"#24f6c4"},{key:"wetland",name:"湿地",value:l,unit:"万亩",color:"#32dcff"},{key:"woodland",name:"林地",value:r,unit:"万亩",color:"#8bf7ff"}],J=[{key:"basic-grassland",name:"基本草原",value:w,unit:"万亩",percent:e(w/Math.max(o,1)*100,1),note:"草地保护底盘"},{key:"wetland-yield",name:"湿地生产力",value:s,unit:"万吨",percent:e(s/Math.max(R+s,1)*100,1),note:"鲜草产能"},{key:"public-woodland",name:"公益林面积",value:y,unit:"万亩",percent:e(y/Math.max(r,1)*100,1),note:"林地保护占比"},{key:"wetland-rate",name:"湿地占比",value:v,unit:"%",percent:v,note:"林草湿结构"}],L=W.map(a=>{const n=m.find(z=>z.zoneName===a.zoneName)||{},t=k(a.grasslandArea),u=k(a.wetArea);return{key:a.zoneName,name:a.zoneName,grasslandArea:t,wetlandArea:u,yakCount:n.yakCount||0,resourceTotal:e(t+u,2),density:e((n.yakCount||0)/Math.max(t+u,1),1)}}).sort((a,n)=>n.yakCount-a.yakCount),O=m.map(a=>({key:a.zoneName,name:a.zoneName,value:a.yakCount,unit:"头",percent:e(a.yakCount/Math.max(S,1)*100,1)})).sort((a,n)=>n.value-a.value),p=b.map(a=>({key:a.label,name:a.label,value:a.value,unit:"头",yoy:a.yoy,percent:e(a.value/Math.max(x,1)*100,1)})),B=Math.max(...M.map(a=>Number(a.value)||0),1),V=M.map(a=>{const n=a.name.includes("储备")||a.name.includes("加工")?`${Number(a.capacity||0).toLocaleString("zh-CN")}吨`:"已接入";return{key:a.name,name:a.name,value:a.value,unit:a.unit,capacity:a.capacity,capacityNote:n,percent:e((Number(a.value)||0)/B*100,1)}});var f,h;const $=[{key:"flow-grassland",module:"林草湿",name:"草地面积分布完成乡镇归集",value:o,unit:"万亩",trend:"+0.8%"},{key:"flow-wetland",module:"林草湿",name:"湿地生产力指标进入总览",value:s,unit:"万吨",trend:"+1.2%"},{key:"flow-woodland",module:"林草湿",name:"公益林保护面积同步",value:y,unit:"万亩",trend:"89.6%"},{key:"flow-yak-town",module:"牦牛",name:"畜群结构总量同步",value:d,unit:"头",trend:"+2.4%"},{key:"flow-yak-density",module:"草畜",name:"草畜密度联动核算",value:N,unit:"头/万亩",trend:"联动"},{key:"flow-trade-1",module:"交易",name:"屠宰出栏流通记录入库",value:((f=p[0])==null?void 0:f.value)||0,unit:"头",trend:"+6%"},{key:"flow-trade-2",module:"交易",name:"活畜交易影响扣减存栏",value:((h=p[1])==null?void 0:h.value)||0,unit:"头",trend:"-3%"},{key:"flow-industry",module:"产业",name:"饲草储备与加工主体纳入画像",value:c.baseCount+c.projectCount,unit:"个",trend:"在线"}],q=[{key:"grassland",label:"草地",value:o,unit:"万亩",x:50,y:15,color:"#24f6c4"},{key:"wetland",label:"湿地",value:l,unit:"万亩",x:83,y:48,color:"#32dcff"},{key:"trade",label:"交易",value:x,unit:"头",x:68,y:72,color:"#8bf7ff"},{key:"yak",label:"牦牛",value:d,unit:"头",x:24,y:74,color:"#24f6c4"},{key:"woodland",label:"林地",value:r,unit:"万亩",x:16,y:35,color:"#8bf7ff"}];export{j as a,J as b,p as c,$ as d,q as e,I as h,D as r,V as s,L as t,O as y};
