index.0b277730.js 6.2 KB

1
  1. import{b as e,f as l,g as a,h as t,j as n,w as o,X as u,Y as d,o as s,F as i,v as p,i as r,Z as v,y as m,_ as c,$ as g,a0 as b,m as w,a1 as h,a2 as x,a3 as f,a4 as y,a5 as C,c as _}from"./vendor.fceb02b1.js";/* empty css *//* empty css *//* empty css */import{s as V}from"./index.e2e9e653.js";const $={class:"bg-white py-[10px] px-[10px] relative"},k={class:"pl-[20px] flex items-center h-[80px] relative mb-[20px] shadow rounded-[6px] shadow-blue-500"},z=m("查询"),H={class:"relative shadow rounded-[6px] shadow-blue-500 px-[10px] pt-[20px] pb-[10px]"},j={__name:"index",setup(m){const j=e(window.innerHeight-260+"px"),T=e(window.innerHeight-260+"px"),U=e(window.innerHeight-260+"px"),D=e([]),I=e(),M=e([new Date(2023,5,1),new Date(2023,5,1)]),Y=e(),F=async()=>{console.log("js",E.value);const e=await V.get(`/meterinfo/bottom?windId=${I.value}${"all"===E.value?"":"&meterType="+E.value}${"all"===Z.value?"":"&meterClass="+Z.value}${"all"===P.value?"":"&name="+P.value}&startTime=${new Date(M.value[0]).getTime()}&endTime=${new Date(M.value[1]).getTime()}&page=${X.value}&perPage=${q.value}`);console.log("66",e),e.data.bottom.forEach((e=>{e.date=e.date.slice(0,10),e.startCode=e.startCode.toFixed(4),e.endCode=e.endCode.toFixed(4),e.rdl=e.rdl.toFixed(2)})),Y.value=e.data.bottom,W.value=e.data.totalItems,console.log("123",Y.value)},B=e([]),E=e("all"),S=e([]),Z=e("all"),L=e([]),P=e("all"),W=e();let X=e(1),q=e(19);const A=e=>{q.value=e,F()},G=e=>{X.value=e,F()},J=e([]),K=e();return l((()=>{U.value=window.innerHeight-260+"px",T.value=window.innerHeight-260+"px",j.value=window.innerHeight-260+"px",window.addEventListener("resize",(()=>{U.value=window.innerHeight-260+"px",T.value=window.innerHeight-260+"px",j.value=window.innerHeight-260+"px"})),(async()=>{const e=await V.get("/meter/allStation");console.log(e),J.value=e.data})()})),(e,l)=>{const m=c,j=g,T=u,U=b,N=w,O=h,Q=x,R=f,ee=y,le=C,ae=d;return s(),a("div",$,[t("div",k,[n(T,{label:"场站类型",class:"!mb-0"},{default:o((()=>[n(j,{modelValue:K.value,"onUpdate:modelValue":l[0]||(l[0]=e=>K.value=e),class:"w-[150px]",onChange:l[1]||(l[1]=e=>(async()=>{const e=await V.get(`/meter/infoall?stationId=${K.value}`);console.log(e),D.value=e.data.fdc,Z.value="all",P.value="all"})(K.value)),placeholder:"请选择","popper-class":"select"},{default:o((()=>[(s(!0),a(i,null,p(J.value,(e=>(s(),_(m,{key:e.nemCode,value:e.nemCode,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),n(T,{label:"场站",class:"!mb-0 ml-3"},{default:o((()=>[n(j,{modelValue:I.value,"onUpdate:modelValue":l[2]||(l[2]=e=>I.value=e),class:"w-[150px]",onChange:l[3]||(l[3]=e=>(async()=>{console.log("123",I.value);const e=await V.get(`/meter/getMeterTypeBottom?windId=${I.value}`);console.log("996",e),B.value=e.data.type,E.value="all",Z.value="all",P.value="all"})(I.value)),clearable:"",placeholder:"请选择","popper-class":"select"},{default:o((()=>[(s(!0),a(i,null,p(D.value,(e=>(s(),_(m,{key:e.nemCode,value:e.nemCode,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),n(T,{label:"时间",class:"!mb-0 ml-3"},{default:o((()=>[n(U,{modelValue:M.value,"onUpdate:modelValue":l[4]||(l[4]=e=>M.value=e),type:"daterange","start-placeholder":"开始","end-placeholder":"结束",format:"YYYY-MM-DD "},null,8,["modelValue"])])),_:1}),n(T,{class:"!mb-0 ml-3"},{default:o((()=>[n(N,{type:"primary",onClick:F},{default:o((()=>[z])),_:1})])),_:1})]),t("div",H,[n(ae,{gutter:10},{default:o((()=>[n(O,{span:4},{default:o((()=>[t("div",null,[n(T,{label:"类型",class:"!mb-0 ml-2"},{default:o((()=>[n(j,{modelValue:E.value,"onUpdate:modelValue":l[5]||(l[5]=e=>E.value=e),class:"w-[150px]",onChange:l[6]||(l[6]=e=>(async()=>{const e=await V.get(`/meter/getMeterTypeBottom?windId=${I.value}&type=${E.value}`);console.log(e),S.value=e.data.type,Z.value="all",P.value="all"})(E.value)),placeholder:"请选择","popper-class":"select"},{default:o((()=>[n(m,{label:"全部",value:"all"}),(s(!0),a(i,null,p(B.value,(e=>(s(),_(m,{key:e.index,value:e.name,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),n(T,{label:"分类",class:"mt-5 ml-2"},{default:o((()=>[n(j,{modelValue:Z.value,"onUpdate:modelValue":l[7]||(l[7]=e=>Z.value=e),class:"w-[150px]",onChange:l[8]||(l[8]=e=>(async()=>{const e=await V.get(`/meter/getMeterTypeBottom?windId=${I.value}&type=${E.value}&meterClass=${Z.value}`);console.log("555",e),L.value=e.data.type,P.value="all"})(Z.value)),placeholder:"请选择","popper-class":"select"},{default:o((()=>[n(m,{label:"全部",value:"all"}),(s(!0),a(i,null,p(S.value,(e=>(s(),_(m,{key:e.index,value:e.name,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),n(T,{label:"名称",class:"mt-5 ml-2"},{default:o((()=>[n(j,{modelValue:P.value,"onUpdate:modelValue":l[9]||(l[9]=e=>P.value=e),class:"w-[150px]",onChange:l[10]||(l[10]=l=>e.ChangZhanChange3(P.value)),placeholder:"请选择","popper-class":"select"},{default:o((()=>[n(m,{label:"全部",value:"all"}),(s(!0),a(i,null,p(L.value,(e=>(s(),_(m,{key:e.index,value:e.name,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1})])])),_:1}),n(O,{span:20},{default:o((()=>[t("div",null,[n(ee,{"max-height":"650px"},{default:o((()=>[n(R,{data:Y.value,height:"650",style:{width:"100% ,height:650px"},border:!0},{default:o((()=>[n(Q,{prop:"date",label:"时间",align:"center",width:"250",resizable:""}),n(Q,{prop:"name",label:"类型",align:"center",width:"250"}),n(Q,{prop:"startCode",label:"起码",align:"right",width:"200",resizable:""}),n(Q,{prop:"endCode",label:"止码",align:"right",width:"200"}),n(Q,{prop:"rdl",label:"日电量(kW/h)",align:"right",width:"200"}),n(Q,{prop:"nemCode",label:"编码",align:"center",width:"350"})])),_:1},8,["data"])])),_:1})]),t("div",null,[n(le,{"current-page":r(X),"onUpdate:current-page":l[11]||(l[11]=e=>v(X)?X.value=e:X=e),"page-size":r(q),"onUpdate:page-size":l[12]||(l[12]=e=>v(q)?q.value=e:q=e),"page-sizes":[19,30,50,100],small:e.small,disabled:e.disabled,background:e.background,layout:"total, sizes, prev, pager, next, jumper",total:W.value,onSizeChange:A,onCurrentChange:G},null,8,["current-page","page-size","small","disabled","background","total"])])])),_:1})])),_:1})])])}}};export default j;