import{a as L,u as N,Z as V,bM as r,o as w,y as g,q as p,n as b,t as x,p as u,P as $,x as E,C as S,cG as _,cH as B,cp as D,cq as P,D as q}from"./index.8d733f79.js";import{E as A}from"./el-input-number.60463ef8.js";import{z as M}from"./deviceAnalysis.ce7ce4e7.js";import"./index.28f6da25.js";const H={__name:"customTable1",props:{tableList:Array,customLabel:String,pointId:String,deviceId:String,tabId:String},emits:["rowClick","rowSelect"],setup(c,{expose:h,emit:m}){const l=c,{proxy:d}=q();L(),N(),console.log(999,l);const C=V(()=>r().addInCaseStatus);function R({row:e,rowIndex:t}){e.index=l.tableList.length-1-t}const I=e=>{d.$refs.tableRef.setCurrentRow(e)},k=e=>{m("rowClick",e)},f=(e,t)=>{m("rowSelect",e,t)},T=()=>{let e;r().atlasSampleTime&&(e=l.tableList.find(t=>t.time===r().atlasSampleTime)),e||(e=l.tableList[0]),setTimeout(()=>{d.$refs.tableRef.setCurrentRow(e),m("rowClick",e,"init"),setTimeout(()=>{const t=document.querySelector(".current-row");t&&t.scrollIntoView({block:"center",inline:"nearest"})},100)},200)},y=()=>{var t;const e=l.tabId;if(r().atlasCheckList.length){const o=r().atlasCheckList.find(s=>s.pointId===l.pointId);o[e]&&((t=o[e])==null?void 0:t.length)&&o[e].forEach(s=>{const i=l.tableList.find(a=>a.time===s);i&&setTimeout(()=>{d.$refs.tableRef.toggleRowSelection(i,!0)},0)})}},v=(e,t)=>{console.log(e.target.value,t);const o={deviceId:Number(l.deviceId),pointId:Number(l.pointId),rotateSpeed:e.target.value?Number(e.target.value):null,samplingTime:t.time,rotateSpeedTime:t.rotateSpeedTime};M(o).then(s=>{})};return h({setCurrentRow1:I,selectDefaultPoint:T,toggleSelection:y}),(e,t)=>{const o=D,s=A,i=P;return w(),g(i,{ref:"tableRef",data:c.tableList,"row-class-name":R,size:"small","highlight-current-row":"",height:"100%",onRowClick:k,onSelect:f,onSelectAll:f},{default:p(()=>[b(C)?(w(),g(o,{key:0,type:"selection",width:"30"})):x("",!0),u(o,{label:e.$t("collectTime"),prop:"time",width:"100"},{default:p(a=>[$(E(a.row.time.slice(2,16)),1)]),_:1},8,["label"]),u(o,{label:c.customLabel||e.$t("rms"),prop:"value",width:"60","show-overflow-tooltip":""},null,8,["label"]),u(o,{label:e.$t("rotate"),prop:"rotateSpeed",width:"80"},{default:p(a=>[u(s,{style:{height:"24px"},class:"input-number",modelValue:a.row.rotateSpeed,"onUpdate:modelValue":n=>a.row.rotateSpeed=n,step:.01,onMousewheel:t[0]||(t[0]=S(()=>{},["prevent"])),max:99999,min:0,controls:!1,onKeydown:t[1]||(t[1]=n=>b(_)(n,2)),onPaste:t[2]||(t[2]=n=>b(B)(n,2)),onBlur:n=>v(n,a.row),onClick:t[3]||(t[3]=S(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","step","onBlur"])]),_:1},8,["label"])]),_:1},8,["data"])}}};export{H as default};
