import{b as U,u as C,ah as V,r as k,J as _,e as D,cr as K,bN as z,o as s,c as i,p as n,q as r,n as l,F as y,A as b,y as v,P as L,x as S,aj as J,E as q,i as B,k as R,j,l as A,m as M,D as G}from"./index.8d733f79.js";import{r as H}from"./reportAnalysis.c518059d.js";import{h as Q}from"./deviceType.30ac56e5.js";const W={class:"page-content"},ee={__name:"index",setup(X){U();const{proxy:$}=G();C();const d=V({total:0,tableData:[],columns:[{prop:"deviceName",label:"deviceName"},{prop:"deviceCode",label:"deviceCode"},{prop:"deviceType",label:"deviceType"},{prop:"diagnosisConclusion",label:"diagnosisConclusion"},{prop:"follow",label:"isFollow",formatter:a=>JSON.parse(sessionStorage.getItem("enums")).yesOrNo.find(t=>JSON.parse(t.key)===a.follow).desc},{prop:"importantLevel",label:"importantLevel"},{prop:"devicePath",label:"devicePath",width:200}]}),o=V({factoryId:"",deviceName:"",productKey:"",follow:"",importantLevel:"",queryType:3,pageNo:1,pageSize:10}),g=k([]),N=k([]),I=_.session.getJSON("enums").yesOrNo,O=_.session.getJSON("enums").importantLevel;let c=null;D(()=>{u(),c=setInterval(u,5*60*1e3),P(),T()});async function u(){const a=await H(o);d.total=a.data.totalElements,d.tableData=a.data.content}async function P(){const a=await K();g.value=a.data}const T=async()=>{const a=await Q();a.data.length&&(N.value=a.data)},h=()=>{$.$refs.formRef.resetFields(),u()};return z(()=>{c&&(clearInterval(c),c=null)}),(a,t)=>{const m=q,f=B,p=R,F=j,w=A,E=M;return s(),i("div",W,[n(E,{ref:"formRef",model:l(o),inline:!0,"label-width":"68px"},{default:r(()=>[n(p,{label:a.$t("belongTofactory"),prop:"factoryId"},{default:r(()=>[n(f,{modelValue:l(o).factoryId,"onUpdate:modelValue":t[0]||(t[0]=e=>l(o).factoryId=e),placeholder:a.$t("belongTofactoryP"),clearable:"",filterable:""},{default:r(()=>[(s(!0),i(y,null,b(l(g),e=>(s(),v(m,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(p,{label:a.$t("deviceName"),prop:"deviceName"},{default:r(()=>[n(F,{modelValue:l(o).deviceName,"onUpdate:modelValue":t[1]||(t[1]=e=>l(o).deviceName=e),placeholder:a.$t("deviceNameP"),maxlength:"20",style:{width:"236px"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),n(p,{label:a.$t("deviceType"),prop:"productKey"},{default:r(()=>[n(f,{modelValue:l(o).productKey,"onUpdate:modelValue":t[2]||(t[2]=e=>l(o).productKey=e),filterable:"",placeholder:a.$t("deviceTypeP"),clearable:""},{default:r(()=>[(s(!0),i(y,null,b(l(N),e=>(s(),v(m,{key:e.productKey,label:e.name,value:e.productKey},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(p,{label:a.$t("isFollow"),prop:"follow"},{default:r(()=>[n(f,{modelValue:l(o).follow,"onUpdate:modelValue":t[3]||(t[3]=e=>l(o).follow=e),placeholder:a.$t("isFollowP"),clearable:""},{default:r(()=>[(s(!0),i(y,null,b(l(I),e=>(s(),v(m,{key:e.key,label:e.desc,value:e.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(p,{label:a.$t("importantLevel"),prop:"importantLevel"},{default:r(()=>[n(f,{modelValue:l(o).importantLevel,"onUpdate:modelValue":t[4]||(t[4]=e=>l(o).importantLevel=e),placeholder:a.$t("importantLevelP"),clearable:""},{default:r(()=>[(s(!0),i(y,null,b(l(O),e=>(s(),v(m,{key:e.key,label:e.desc,value:e.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),n(p,null,{default:r(()=>[n(w,{type:"primary",onClick:u},{default:r(()=>[L(S(a.$t("query")),1)]),_:1}),n(w,{onClick:h},{default:r(()=>[L(S(a.$t("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),n(l(J),{class:"f-h",columns:l(d).columns,tableData:l(d).tableData,total:l(d).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:u},null,8,["columns","tableData","total","pageNum","pageSize"])])}}};export{ee as default};
