index.c24c74ad.js 4.4 KB

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