2 lines
4.3 KiB
JavaScript
2 lines
4.3 KiB
JavaScript
var H=Object.defineProperty,V=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var y=(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)&&y(t,e,o[e]);if(A)for(var e of A(o))W.call(o,e)&&y(t,e,o[e]);return t},v=(t,o)=>V(t,k(o));var $=(t,o,e)=>new Promise((x,d)=>{var n=s=>{try{r(e.next(s))}catch(l){d(l)}},p=s=>{try{r(e.throw(s))}catch(l){d(l)}},r=s=>s.done?x(s.value):Promise.resolve(s.value).then(n,p);r((e=e.apply(t,o)).next())});import{a as R,e5 as J,r as E,s as T,f as b,ac as X,H as L,bc as N,J as Y,k as c,aA as h,o as _,h as S,p as u,x as D,i as a,t as m,F as I,aD as M,j as Q,l as j,aB as g}from"./index.cd4314d7.js";import z from"./SBYXZT.6b9eb99f.js";import O from"./QXSZ.60147130.js";import q from"./SZJCSJ.9ea6e9d4.js";import P from"./TRJCSJ.d3632e7f.js";import G from"./BasicChart.8860227e.js";import{u as K}from"./visualization.fa00b5d5.js";import{s as U}from"./other.06ac4844.js";import{_ as tt}from"./model-close-icon.706a0490.js";import"./Box.ee46389c.js";import"./useVContext.563b1b3b.js";import"./index.d919ab4c.js";import"./lodash.16477d38.js";import"./useECharts.7ae6cef3.js";import"./colors.d19e85ff.js";import"./dateUtil.8ab29df5.js";const w=400,et=280,ot=R({components:{[J.name]:J,SBYXZT:z,QXSZ:O,SZJCSJ:q,TRJCSJ:P,BasicChart:G},props:{baseId:{type:[String,Number]},visible:{type:Boolean},baseData:{type:Object,default:()=>{}}},setup(t,{attrs:o}){const e=E(!1),x=K(),d=T({data:E({})}),n=E([]),p=b(()=>c(n).length>=2?2:c(n).length),r=b(()=>(w+10)*c(p)+(w+10)*2+60);function s(){return $(this,null,function*(){const i=yield U(t.baseId);n.value=i.crops,d.data=i,p.value})}const l=b(()=>x.getYear),B=()=>document.body.querySelector(".modelRef"),C=b(()=>v(f(f({},o),c(t)),{visible:c(e)}));return X(()=>{e.value=!!t.visible}),L(()=>c(e),i=>{i&&s()}),v(f({getContainer:B,cropsList:n,getBindValue:C},N(d)),{boxWidth:w,boxHeight:et,modelWidth:r,year:l,modelVisible:e})}}),at={class:"modelRef"},st=a("img",{class:"w-22px h-22px inline text-0",src:tt,alt:"",srcset:""},null,-1),it={class:"relative -mt-6px h-30px flex items-center"},nt={class:"flex items-center"},rt=a("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"},ct={class:"mx-20px"},ht={class:"bg-[#1D2D35] mt-14px p-10px"},ut={class:"flex"},mt={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=h("BasicChart"),r=h("SBYXZT"),s=h("QXSZ"),l=h("SZJCSJ"),B=h("TRJCSJ"),C=h("a-modal");return _(),S("div",at,[u(C,g(t.getBindValue,{bodyStyle:{background:"#233741",color:"#fff"},destroyOnClose:"",width:t.modelWidth,getContainer:t.getContainer}),{closeIcon:D(()=>[st]),default:D(()=>[a("div",null,[a("div",it,[a("div",nt,[rt,a("span",lt,m(t.year)+"\u5E74",1)]),a("div",dt,m(t.baseData.name),1)]),a("div",pt,[a("span",null,"\u603B\u9762\u79EF\uFF1A"+m(t.data.areas)+" \u4EA9",1),a("span",ct,"\u5C31\u4E1A\u4EBA\u6570\uFF1A"+m(t.data.workforce)+" \u4EBA",1),a("span",null,"\u603B\u4EA7\u503C\uFF1A"+m(t.data.cultivated)+" \xA5",1)]),a("div",ht,[a("div",ut,[t.cropsList.length?(_(),S("div",mt,[(_(!0),S(I,null,M(t.cropsList,(i,F)=>(_(),Q(p,{headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`,key:i.id,data:i,index:F},null,8,["width","height","data","index"]))),128))])):j("",!0),a("div",gt,[u(r,g(t.getBindValue,{headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`}),null,16,["width","height"]),u(s,g({headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`},t.getBindValue),null,16,["width","height"]),u(l,g({headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`},t.getBindValue),null,16,["width","height"]),u(B,g({headHeight:"34.5px",width:`${t.boxWidth}px`,height:`${t.boxHeight}px`},t.getBindValue),null,16,["width","height"])])])])])]),_:1},16,["width","getContainer"])])}var kt=Y(ot,[["render",xt]]);export{kt as default};
|