import{T as f}from"./TableV2Empty-b6abe229.js";import{c as T}from"./index-d6ee182a.js";import{u as C,r as a,B as D,o as x,C as b,f as s,G as I,a as d,c as K,g as r,w as h,H as S,k as M}from"./index-ad591d72.js";import{_ as B}from"./_plugin-vue_export-helper-c27b6911.js";import"./request-2786ead7.js";import"./axios-4a70c6fc.js";const G={class:"tablev2-container shadow"},z=25,E={__name:"chipData",setup(H){const{t,locale:p}=C();a(""),a("");const i=a(!1),n=a(null),o=a([{key:"index",dataKey:"ID",title:t("equipmentManagement.index"),align:"center",width:50},{key:"ChipCode",dataKey:"ChipCode",title:t("data.ChipCode"),align:"center",width:120},{key:"TimeStamp",dataKey:"TimeStamp",title:t("data.TimeStamp"),align:"left",width:246},{key:"MachineId",dataKey:"MachineId",title:t("data.MachineId"),align:"center",width:84},{key:"SourceType",dataKey:"SourceType",title:t("data.SourceType"),align:"center",width:100},{key:"SocketGetTime",dataKey:"SocketGetTime",title:t("data.SocketGetTime"),align:"left",width:246},{key:"DeviceIp",dataKey:"DeviceIp",title:t("data.DeviceIp"),align:"center",width:120}]);D(()=>p.value,()=>{o.value=o.value.map(e=>({title:t(`data.${e.key}`),key:e.key,dataKey:e.dataKey,align:e.align,width:e.width}))});const c=a([]),l=a(0),u=({rowIndex:e})=>{if(e===l.value)return"highlight-row"},_={onClick(e){l.value=e.rowIndex}},m=()=>{i.value=!0,T().then(e=>{c.value=e.ChipData,i.value=!1})};return x(()=>{m()}),b(()=>{n.value.scrollToTop(25*l.value)}),(e,N)=>{const y=s("el-table-v2"),v=s("el-auto-resizer"),g=I("loading");return d(),K("div",G,[r(v,null,{default:h(({height:w,width:k})=>[S((d(),M(y,{fixed:"","element-loading-text":"","element-loading-background":"rgba(122, 122, 122, 0.8)","row-event-handlers":_,ref_key:"myTable",ref:n,"row-key":"index","row-class":u,columns:o.value,data:c.value,"header-height":44,"row-height":z,width:k,height:w,style:{cursor:"pointer"}},{empty:h(()=>[r(f)]),_:2},1032,["columns","data","width","height"])),[[g,i.value]])]),_:1})])}}},J=B(E,[["__scopeId","data-v-b6f0a882"]]);export{J as default};
