import{b as $,u as E,a as I,J as R,ah as g,r as z,e as P,dP as V,$ as q,o as B,c as w,v as u,p as a,q as n,x as m,n as s,s as L,P as p,aj as Y,ak as M,k as U,l as F,m as H}from"./index.8d733f79.js";import{E as J}from"./el-date-picker-panel.089dbe6d.js";import"./panel-time-pick.b2dd8e75.js";import"./index.28f6da25.js";const j={class:"subPage-content"},O={class:"nav"},A={class:"details-wrap df-c"},x={__name:"selfCheckList",setup(G){$();const f=E(),y=I(),k=[new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)],h=R.session.getJSON("enums").factorySelfCheckStatus,i=g({total:0,tableData:[],columns:[{prop:"createTime",label:"selfCheckTime"},{prop:"progress",label:"selfCheckProgress",formatter:e=>`${h.find(l=>l.key===e.progress).desc}${e.failedReason?`(${e.failedReason})`:""}`},{label:"selfCheckResult",type:"action",fixed:"right"}]}),t=g({factoryId:y.query.factoryId,startTime:"",endTime:"",pageNo:1,pageSize:10}),r=z([]),C=()=>{f.push("/system/factory")};P(()=>{c()});async function c(){t.startTime=r.value[0],t.endTime=r.value[1];const e=await V(t);i.total=e.data.totalElements,i.tableData=e.data.content}const b=()=>{r.value=[],t.startTime="",t.endTime="",c()},T=e=>{f.push({path:"/system/factory/selfCheckResultList",query:{factoryId:e.factoryId,factoryName:y.query.factoryName,selfCheckId:e.id,createTime:e.createTime,sensorCount:e.sensorCount}})};return(e,l)=>{const v=q("Back"),D=M,N=J,_=U,d=F,S=H;return B(),w("div",j,[u("div",O,[a(D,{color:"#0052D9",size:"24",onClick:C,style:{cursor:"pointer"}},{default:n(()=>[a(v)]),_:1}),u("span",null,m(e.$t("selfCheckList")),1)]),u("div",A,[a(S,{model:s(t),inline:!0},{default:n(()=>[a(_,{label:e.$t("createTime"),prop:"time"},{default:n(()=>[a(N,{modelValue:s(r),"onUpdate:modelValue":l[0]||(l[0]=o=>L(r)?r.value=o:null),type:"datetimerange","start-placeholder":e.$t("startTime"),"end-placeholder":e.$t("endTime"),"value-format":"YYYY-MM-DD HH:mm:ss","default-time":k,clearable:!1},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),a(_,null,{default:n(()=>[a(d,{type:"primary",onClick:c},{default:n(()=>[p(m(e.$t("query")),1)]),_:1}),a(d,{onClick:b},{default:n(()=>[p(m(e.$t("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),a(s(Y),{class:"f-h",columns:s(i).columns,tableData:s(i).tableData,total:s(i).total,pageNum:s(t).pageNo,"onUpdate:pageNum":l[1]||(l[1]=o=>s(t).pageNo=o),pageSize:s(t).pageSize,"onUpdate:pageSize":l[2]||(l[2]=o=>s(t).pageSize=o),onPagination:c},{action:n(({scope:o})=>[a(d,{link:"",type:"primary",onClick:K=>T(o.row),disabled:o.row.progress==="processing"||o.row.progress==="failed"},{default:n(()=>[p(m(e.$t("view")),1)]),_:2},1032,["onClick","disabled"])]),_:1},8,["columns","tableData","total","pageNum","pageSize"])])])}}};export{x as default};
