import{a as K,u as h,r as i,ah as $,e as z,cr as B,dV as C,dW as L,$ as w,o as r,c as m,v as b,p as t,q as n,x as _,n as o,F as g,A as k,y as R,P as D,aj as A,ak as M,E as j,i as O,k as G,l as W,m as H}from"./index.8d733f79.js";import{j as J}from"./collector.4eeb72e6.js";const Q={class:"subPage-content"},X={class:"nav"},Y={class:"details-wrap df-c"},ae={__name:"detailList",setup(Z){const u=K(),S=h(),v=i(),p=$({total:0,tableData:[],columns:[{prop:"pointName",label:"deviceMPoint",formatter:e=>`${e.deviceName}-${e.pointName}`},{prop:"factoryName",label:"belongTofactory"},{prop:"failCount",label:"notUpNum"},{prop:"failReasonDesc",label:"notUpReason"},{prop:"sensorSn",label:"linkSensor"},{prop:"linkTime",label:"linkTime"},{prop:"unlinkTime",label:"unlinkTime"},{prop:"sensorProductKeyName",label:"sensorProductKey"},{prop:"gatewayMac",label:"communicationGateway"}]}),l=$({factoryId:u.query.factoryId?+u.query.factoryId:"",productKey:"",failReason:"",dataType:u.query.dataType,startTime:u.query.startTime,endTime:u.query.endTime,pageNo:1,pageSize:10}),N=i([]),T=i([]),P=i([]),U=()=>{S.push("/alarm/dataAnomalyStatistics")};z(()=>{B().then(e=>{N.value=e.data}),C().then(e=>{T.value=e.data}),J().then(e=>{P.value=e.data}),d()});async function d(){const e=await L(l);p.total=e.data.totalElements,p.tableData=e.data.content}const E=()=>{var e;(e=v.value)==null||e.resetFields(),d()};return(e,s)=>{const q=w("Back"),F=M,f=j,y=O,c=G,V=W,I=H;return r(),m("div",Q,[b("div",X,[t(F,{color:"#0052D9",size:"24",onClick:U,style:{cursor:"pointer"}},{default:n(()=>[t(q)]),_:1}),b("span",null,_(e.$t("unReportedDetails")),1)]),b("div",Y,[t(I,{ref_key:"formRef",ref:v,model:o(l),inline:!0},{default:n(()=>[t(c,{label:e.$t("factory"),prop:"factoryId"},{default:n(()=>[t(y,{modelValue:o(l).factoryId,"onUpdate:modelValue":s[0]||(s[0]=a=>o(l).factoryId=a),placeholder:e.$t("factoryP"),clearable:"",filterable:""},{default:n(()=>[(r(!0),m(g,null,k(o(N),a=>(r(),R(f,{key:a.id,label:a.name,value:Number(a.id)},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(c,{label:e.$t("belongToProduct"),prop:"productKey"},{default:n(()=>[t(y,{modelValue:o(l).productKey,"onUpdate:modelValue":s[1]||(s[1]=a=>o(l).productKey=a),placeholder:e.$t("belongToProductP")},{default:n(()=>[(r(!0),m(g,null,k(o(P),a=>(r(),R(f,{key:a.productKey,label:a.name,value:a.productKey},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(c,{label:e.$t("notUpReason"),prop:"failReason"},{default:n(()=>[t(y,{modelValue:o(l).failReason,"onUpdate:modelValue":s[2]||(s[2]=a=>o(l).failReason=a),placeholder:e.$t("notUpReasonP")},{default:n(()=>[(r(!0),m(g,null,k(o(T),a=>(r(),R(f,{key:a.failReason,label:a.failReasonDesc,value:a.failReason},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),t(c,null,{default:n(()=>[t(V,{type:"primary",onClick:d},{default:n(()=>[D(_(e.$t("query")),1)]),_:1}),t(V,{onClick:E},{default:n(()=>[D(_(e.$t("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"]),t(o(A),{class:"f-h",columns:o(p).columns,tableData:o(p).tableData,total:o(p).total,pageNum:o(l).pageNo,"onUpdate:pageNum":s[3]||(s[3]=a=>o(l).pageNo=a),pageSize:o(l).pageSize,"onUpdate:pageSize":s[4]||(s[4]=a=>o(l).pageSize=a),onPagination:d},null,8,["columns","tableData","total","pageNum","pageSize"])])])}}};export{ae as default};
