index.6dc0a906.js 4.9 KB

1
  1. import{b as e,f as a,g as l,h as n,j as t,w as o,i as u,Z as d,X as s,a4 as i,a5 as r,o as p,F as v,v as m,y as c,_ as g,$ as h,a0 as w,m as b,a2 as x,a3 as f,c as C}from"./vendor.fceb02b1.js";/* empty css *//* empty css */import{s as y}from"./index.e2e9e653.js";const V={class:"bg-white py-[10px] px-[10px] relative"},_={class:"pl-[20px] flex items-center h-[80px] relative mb-[20px] shadow rounded-[6px] shadow-blue-500"},H=c("查询"),Y={class:"relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]"},$={__name:"index",setup(c){const $=e(window.innerHeight-260+"px"),z=e(window.innerHeight-260+"px"),k=e(window.innerHeight-260+"px"),U=e([]),j=e();let M=e(),I=e();const D=e(),T=async()=>{const e=await y.get(`/meterinfo/equipmentMonth?windId=${j.value}${"all"===q.value?"":"&id="+q.value}&startTime=${new Date(M.value).getTime()}&endTime=${new Date(I.value).getTime()}&page=${S.value}&perPage=${Z.value}`);console.log("66",e),e.data.calculating.forEach((e=>{e.date=e.date.slice(0,7)})),D.value=e.data.calculating,F.value=e.data.totalItems,console.log("123",D.value)},E=e([]),q=e("all"),F=e();let S=e(1),Z=e(19);const K=e=>{Z.value=e,T()},L=e=>{S.value=e,T()},P=e([]),W=e(),X=e=>{var a=new Date,l=a.getFullYear(),n=a.getMonth()+1;return a.getDate(),n>=1&&n<=9&&(n="0"+n),1==e?l+"-"+n:2==e?l+"-"+n:void 0};return a((()=>{k.value=window.innerHeight-260+"px",z.value=window.innerHeight-260+"px",$.value=window.innerHeight-260+"px",window.addEventListener("resize",(()=>{k.value=window.innerHeight-260+"px",z.value=window.innerHeight-260+"px",$.value=window.innerHeight-260+"px"})),(async()=>{const e=await y.get("/meter/allStation");console.log(e),P.value=e.data})(),M.value=X(1),I.value=X(2)})),(e,a)=>{const c=g,$=h,z=s,k=w,X=b,A=x,B=f,G=i,J=r;return p(),l("div",V,[n("div",_,[t(z,{label:"场站类型",class:"!mb-0"},{default:o((()=>[t($,{modelValue:W.value,"onUpdate:modelValue":a[0]||(a[0]=e=>W.value=e),class:"w-[150px]",onChange:a[1]||(a[1]=e=>(async()=>{const e=await y.get(`/meter/infoall?stationId=${W.value}`);console.log(e),U.value=e.data.fdc,fenval.value="all",mingval.value="all"})(W.value)),placeholder:"请选择","popper-class":"select"},{default:o((()=>[(p(!0),l(v,null,m(P.value,(e=>(p(),C(c,{key:e.nemCode,value:e.nemCode,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),t(z,{label:"场站",class:"!mb-0 ml-3"},{default:o((()=>[t($,{modelValue:j.value,"onUpdate:modelValue":a[2]||(a[2]=e=>j.value=e),class:"w-[150px]",onChange:a[3]||(a[3]=e=>(async()=>{console.log("123",j.value);const e=await y.get(`/meter/getEquipmentId?windId=${j.value}`);console.log(e),E.value=e.data.type,q.value="all"})(j.value)),clearable:"",placeholder:"请选择","popper-class":"select"},{default:o((()=>[(p(!0),l(v,null,m(U.value,(e=>(p(),C(c,{key:e.nemCode,value:e.nemCode,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),t(z,{label:"风机编号",class:"!mb-0 ml-2"},{default:o((()=>[t($,{modelValue:q.value,"onUpdate:modelValue":a[4]||(a[4]=e=>q.value=e),class:"w-[200px]",onChange:a[5]||(a[5]=a=>e.ChangZhanChange1(q.value)),placeholder:"请选择","popper-class":"select"},{default:o((()=>[t(c,{label:"全选",value:"all"}),(p(!0),l(v,null,m(E.value,(e=>(p(),C(c,{key:e.nemCode,value:e.nemCode,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),t(z,{label:"开始",class:"!mb-0 ml-2"},{default:o((()=>[t(k,{modelValue:u(M),"onUpdate:modelValue":a[6]||(a[6]=e=>d(M)?M.value=e:M=e),onChange:a[7]||(a[7]=e=>{return a=u(M),console.log(a),void(M.value=a);var a}),type:"month","value-format":"YYYY-MM",placeholder:"选择日期"},null,8,["modelValue"])])),_:1}),t(z,{label:"结束",class:"!mb-0"},{default:o((()=>[t(k,{modelValue:u(I),"onUpdate:modelValue":a[8]||(a[8]=e=>d(I)?I.value=e:I=e),onChange:a[9]||(a[9]=e=>{return a=u(I),console.log(a),void(I.value=a);var a}),type:"month","value-format":"YYYY-MM",placeholder:"选择日期"},null,8,["modelValue"])])),_:1}),t(z,{class:"!mb-0 ml-3"},{default:o((()=>[t(X,{type:"primary",onClick:T},{default:o((()=>[H])),_:1})])),_:1})]),n("div",Y,[n("div",null,[t(G,{"max-height":"650px"},{default:o((()=>[t(B,{data:D.value,height:"650",style:{width:"100% ,height:650px"},border:!0},{default:o((()=>[t(A,{prop:"date",label:"时间",align:"center",width:"250",resizable:""}),t(A,{prop:"name",label:"风机编号",align:"center",width:"250"}),t(A,{prop:"rdl",label:"月电量(万KWh)",align:"center",width:"200"})])),_:1},8,["data"])])),_:1})]),n("div",null,[t(J,{"current-page":u(S),"onUpdate:current-page":a[10]||(a[10]=e=>d(S)?S.value=e:S=e),"page-size":u(Z),"onUpdate:page-size":a[11]||(a[11]=e=>d(Z)?Z.value=e:Z=e),"page-sizes":[19,30,50,100],small:e.small,disabled:e.disabled,background:e.background,layout:"total, sizes, prev, pager, next, jumper",total:F.value,onSizeChange:K,onCurrentChange:L},null,8,["current-page","page-size","small","disabled","background","total"])])])])}}};export default $;