import{_ as z,ah as k,r as v,e as F,cr as P,o as m,c,p as r,q as n,n as l,F as g,A as y,y as x,s as L,P as N,x as V,aj as M,E as R,i as B,k as Y,l as q,m as w,D as I}from"./index.8d733f79.js";import{E as H}from"./el-date-picker-panel.089dbe6d.js";import{J as h}from"./collector.4eeb72e6.js";import{c as j}from"./common.d6f7c05a.js";import"./panel-time-pick.b2dd8e75.js";import"./index.28f6da25.js";const A={class:"page-content"},J={__name:"index",setup(O){const{proxy:D}=I(),E=[new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)],p=k({total:0,tableData:[],columns:[{prop:"factoryName",label:"factoryName"},{prop:"name",label:"taskName"},{prop:"recordType",label:"belonging",formatter:a=>{var t;return(t=b.find(u=>u.key===a.recordType))==null?void 0:t.desc}},{prop:"upgradeTime",label:"upgradeTaskCreateTime"},{prop:"finishTime",label:"upgradeTaskEndTime"},{prop:"spentTimeMills",label:"upgradeTaskTakeTime",formatter:a=>j.formatDuration(a.spentTimeMills)},{prop:"doneCount",label:"upgradeTaskProgress",formatter:a=>`${a.doneCount}/${a.totalCount}`},{prop:"status",label:"upgradeTaskStatus"}]}),o=k({pageNo:1,pageSize:10,factoryName:"",status:"",recordType:"",upgradeTimeE:"",upgradeTimeS:""}),s=v([]),_=v([]),S=[{key:"\u5DF2\u7ED3\u675F",desc:"\u5DF2\u7ED3\u675F"},{key:"\u6267\u884C\u4E2D",desc:"\u6267\u884C\u4E2D"}],b=[{key:0,desc:"\u4E91\u7AEF"},{key:1,desc:"\u672C\u5730"}];F(()=>{P().then(a=>{_.value=a.data}),i()});async function i(){console.log(222,s.value),o.upgradeTimeS=s.value.length?s.value[0]:"",o.upgradeTimeE=s.value.length?s.value[1]:"";const a=await h(o);p.total=a.data.totalElements,p.tableData=a.data.content}const $=()=>{var a;(a=D.$refs.formRef)==null||a.resetFields(),o.pageNo=1,o.pageSize=10,s.value=[],i()};return(a,t)=>{const u=R,f=B,d=Y,U=H,T=q,C=w;return m(),c("div",A,[r(C,{ref:"formRef",model:l(o),inline:!0},{default:n(()=>[r(d,{label:a.$t("factory"),prop:"factoryName"},{default:n(()=>[r(f,{modelValue:l(o).factoryName,"onUpdate:modelValue":t[0]||(t[0]=e=>l(o).factoryName=e),placeholder:a.$t("factoryP"),clearable:"",filterable:""},{default:n(()=>[(m(!0),c(g,null,y(l(_),e=>(m(),x(u,{key:e.id,label:e.name,value:e.name},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),r(d,{label:"\u9879\u76EE\u5F52\u5C5E",prop:"recordType"},{default:n(()=>[r(f,{modelValue:l(o).recordType,"onUpdate:modelValue":t[1]||(t[1]=e=>l(o).recordType=e),clearable:""},{default:n(()=>[(m(),c(g,null,y(b,e=>r(u,{key:e.key,label:e.desc,value:e.key},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),r(d,{label:"\u5347\u7EA7\u4EFB\u52A1\u72B6\u6001",prop:"status"},{default:n(()=>[r(f,{modelValue:l(o).status,"onUpdate:modelValue":t[2]||(t[2]=e=>l(o).status=e),clearable:""},{default:n(()=>[(m(),c(g,null,y(S,e=>r(u,{key:e.key,label:e.desc,value:e.key},null,8,["label","value"])),64))]),_:1},8,["modelValue"])]),_:1}),r(d,{label:"\u5347\u7EA7\u4EFB\u52A1\u521B\u5EFA\u65F6\u95F4"},{default:n(()=>[r(U,{modelValue:l(s),"onUpdate:modelValue":t[3]||(t[3]=e=>L(s)?s.value=e:null),type:"datetimerange","range-separator":"-","start-placeholder":a.$t("startTime"),"end-placeholder":a.$t("endTime"),"value-format":"YYYY-MM-DD HH:mm:ss","default-time":E},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1}),r(d,null,{default:n(()=>[r(T,{type:"primary",onClick:t[4]||(t[4]=e=>i())},{default:n(()=>[N(V(a.$t("query")),1)]),_:1}),r(T,{onClick:$},{default:n(()=>[N(V(a.$t("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),r(l(M),{class:"f-h",columns:l(p).columns,tableData:l(p).tableData,total:l(p).total,pageNum:l(o).pageNo,"onUpdate:pageNum":t[5]||(t[5]=e=>l(o).pageNo=e),pageSize:l(o).pageSize,"onUpdate:pageSize":t[6]||(t[6]=e=>l(o).pageSize=e),onPagination:i},null,8,["columns","tableData","total","pageNum","pageSize"])])}}},ee=z(J,[["__scopeId","data-v-6805b2a3"]]);export{ee as default};
