import{r as v,a as V,u as $,ah as _,e as w,cr as C,e6 as z,cE as F,o as d,c as y,p as o,q as n,n as a,F as T,A as U,y as b,P as m,x as u,aH as q,aj as B,E as L,i as R,k as j,j as x,l as A,m as H}from"./index.8d733f79.js";const M={class:"page-content"},K={__name:"index",setup(O){const f=v();V();const N=$(),s=_({total:0,tableData:[],columns:[{prop:"deviceName",label:"deviceName"},{prop:"showCode",label:"deviceCode"},{prop:"deviceTypeName",label:"deviceType"},{prop:"devicePath",label:"devicePath"},{prop:"diagnosisTime",label:"newDiagnosisTime"},{label:"action",type:"action",fixed:"right"}]}),l=_({factoryId:"",deviceName:"",pageNo:1,pageSize:10}),g=v([]);w(()=>{C().then(e=>{g.value=e.data}),r()});async function r(){const e=await z(l);s.total=e.data.totalElements,s.tableData=e.data.content}const D=()=>{var e;(e=f.value)==null||e.resetFields(),r()},h=e=>{N.push({path:"/alarm/intelligentDiagnosis/detailList",query:{deviceId:e.deviceId,deviceName:e.deviceName}})};return(e,i)=>{const k=L,E=R,c=j,P=x,p=A,I=H,S=F("hasPermi");return d(),y("div",M,[o(I,{ref_key:"formRef",ref:f,model:a(l),inline:!0},{default:n(()=>[o(c,{label:e.$t("factory"),prop:"factoryId"},{default:n(()=>[o(E,{modelValue:a(l).factoryId,"onUpdate:modelValue":i[0]||(i[0]=t=>a(l).factoryId=t),placeholder:e.$t("factoryP"),clearable:"",filterable:""},{default:n(()=>[(d(!0),y(T,null,U(a(g),t=>(d(),b(k,{key:t.id,label:t.name,value:Number(t.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),o(c,{label:e.$t("deviceName"),prop:"deviceName"},{default:n(()=>[o(P,{modelValue:a(l).deviceName,"onUpdate:modelValue":i[1]||(i[1]=t=>a(l).deviceName=t),placeholder:e.$t("deviceNameP"),maxlength:"20",style:{width:"236px"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o(c,null,{default:n(()=>[o(p,{type:"primary",onClick:r},{default:n(()=>[m(u(e.$t("query")),1)]),_:1}),o(p,{onClick:D},{default:n(()=>[m(u(e.$t("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),o(a(B),{class:"f-h",columns:a(s).columns,tableData:a(s).tableData,total:a(s).total,pageNum:a(l).pageNo,"onUpdate:pageNum":i[2]||(i[2]=t=>a(l).pageNo=t),pageSize:a(l).pageSize,"onUpdate:pageSize":i[3]||(i[3]=t=>a(l).pageSize=t),onPagination:r},{action:n(({scope:t})=>[q((d(),b(p,{link:"",type:"primary",onClick:G=>h(t.row)},{default:n(()=>[m(u(e.$t("diagnosisDetail")),1)]),_:2},1032,["onClick"])),[[S,["alarm_intelligentDiagnosis_view"]]])]),_:1},8,["columns","tableData","total","pageNum","pageSize"])])}}};export{K as default};
