2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
var H=Object.defineProperty,V=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var A=(t,o,e)=>o in t?H(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,f=(t,o)=>{for(var e in o||(o={}))Z.call(o,e)&&A(t,e,o[e]);if(y)for(var e of y(o))W.call(o,e)&&A(t,e,o[e]);return t},B=(t,o)=>V(t,k(o));var $=(t,o,e)=>new Promise((x,d)=>{var n=a=>{try{r(e.next(a))}catch(l){d(l)}},p=a=>{try{r(e.throw(a))}catch(l){d(l)}},r=a=>a.done?x(a.value):Promise.resolve(a.value).then(n,p);r((e=e.apply(t,o)).next())});import{Modal as J}from"ant-design-vue";import R from"./SBYXZT.4091a168.js";import T from"./QXSZ.92c194bc.js";import X from"./SZJCSJ.67c3facc.js";import L from"./TRJCSJ.cf971343.js";import N from"./BasicChart.a44618c3.js";import{u as Q}from"./visualization.dd6465e6.js";import{s as Y}from"./other.ed2ccd93.js";import{_ as I}from"./model-close-icon.706a0490.js";import{d as M,r as E,q as j,e as b,J as q,E as z,an as O,_ as P,j as h,P as c,o as _,f as S,m,s as F,h as s,t as u,F as G,S as K,i as U,k as tt,Q as g}from"./index.7edff3d4.js";import"./Box.fcbd33fd.js";import"./useVContext.fe0bcac3.js";import"./DownOutlined.98d2a288.js";import"./index.d25b2990.js";import"./lodash.fc76c926.js";import"./useECharts.d100ee71.js";import"./colors.d19e85ff.js";import"./dateUtil.1fb2b991.js";const w=400,et=280,ot=M({components:{[J.name]:J,SBYXZT:R,QXSZ:T,SZJCSJ:X,TRJCSJ:L,BasicChart:N},props:{baseId:{type:[String,Number]},visible:{type:Boolean},baseData:{type:Object,default:()=>{}}},setup(t,{attrs:o}){const e=E(!1),x=Q(),d=j({data:E({})}),n=E([]),p=b(()=>h(n).length>=2?2:h(n).length),r=b(()=>(w+10)*h(p)+(w+10)*2+60);function a(){return $(this,null,function*(){const i=yield Y(t.baseId);n.value=i.crops,d.data=i,p.value})}const l=b(()=>x.getYear),C=()=>document.body.querySelector(".modelRef"),v=b(()=>B(f(f({},o),h(t)),{visible:h(e)}));return q(()=>{e.value=!!t.visible}),z(()=>h(e),i=>{i&&a()}),B(f({getContainer:C,cropsList:n,getBindValue:v},O(d)),{boxWidth:w,boxHeight:et,modelWidth:r,year:l,modelVisible:e})}}),st={class:"modelRef"},at=s("img",{class:"w-22px h-22px inline text-0",src:I,alt:"",srcset:""},null,-1),it={class:"relative -mt-6px h-30px flex items-center"},nt={class:"flex items-center"},rt=s("span",{class:"block w-8px h-8px bg-[#6CCDDA] rounded-full mr-10px"},null,-1),lt={class:"bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-18px"},dt={class:"absolute top-0 left-40px right-40px bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] text-24px text-center"},pt={class:"text-center bg-clip-text text-transparent bg-gradient-to-t from-[#76E9F0] to-[#A7E6EE] mt-6px text-15px font-bold"},ht={class:"mx-20px"},ct={class:"bg-[#1D2D35] mt-14px p-10px"},mt={class:"flex"},ut={key:0,class:"grid grid-cols-2 gap-10px flex-1 mr-10px"},gt={class:"grid grid-cols-2 gap-10px flex-1"};function xt(t,o,e,x,d,n){const p=c("BasicChart"),r=c("SBYXZT"),a=c("QXSZ"),l=c("SZJCSJ"),C=c("TRJCSJ"),v=c("a-modal");return _(),S("div",st,[m(v,g(t.getBindValue,{bodyStyle:{background:"#233741",color:"#fff"},destroyOnClose:"",width:t.modelWidth,getContainer:t.getContainer}),{closeIcon:F(()=>[at]),default:F(()=>[s("div",null,[s("div",it,[s("div",nt,[rt,s("span",lt,u(t.year)+"\u5E74",1)]),s("div",dt,u(t.baseData.name),1)]),s("div",pt,[s("span",null,"\u603B\u9762\u79EF\uFF1A"+u(t.data.areas)+" \u4EA9",1),s("span",ht,"\u5C31\u4E1A\u4EBA\u6570\uFF1A"+u(t.data.workforce)+" \u4EBA",1),s("span",null,"\u603B\u4EA7\u503C\uFF1A"+u(t.data.cultivated)+" \xA5",1)]),s("div",ct,[s("div",mt,[t.cropsList.length?(_(),S("div",ut,[(_(!0),S(G,null,K(t.cropsList,(i,D)=>(_(),U(p,{headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`,key:i.id,data:i,index:D},null,8,["width","height","data","index"]))),128))])):tt("",!0),s("div",gt,[m(r,g(t.getBindValue,{headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`}),null,16,["width","height"]),m(a,g({headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`},t.getBindValue),null,16,["width","height"]),m(l,g({headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`},t.getBindValue),null,16,["width","height"]),m(C,g({headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`},t.getBindValue),null,16,["width","height"])])])])])]),_:1},16,["width","getContainer"])])}var Wt=P(ot,[["render",xt]]);export{Wt as default};
|