import{_ as P,r as d,o as c,c as r,v as i,x as E,p as x,q as T,P as k,F as S,A as b,y as L,S as p,d5 as N,l as R,a0 as V,a1 as w}from"./index.8d733f79.js";import{E as A}from"./el-empty.a60dbc90.js";import{g as C,u as F,c as M}from"./multiDiagnosis.8917b8b6.js";import O from"./screenshotItem.4c5c059c.js";import"./el-image.a7c44d35.js";import"./el-image-viewer.42b4b63f.js";import"./throttle.04d7163a.js";const U=u=>(V("data-v-07568562"),u=u(),w(),u),W={class:"tab-pane-container"},$={class:"toolbar"},q={class:"device-path"},z=U(()=>i("span",{class:"label"},"\u8BBE\u5907\u8D8B\u52BF\u8DEF\u5F84:",-1)),H={class:"value"},Y={class:"actions"},j={class:"scroll-container"},G={class:"category-title"},J={key:0,class:"grid-layout"},K={__name:"tabPane3",setup(u,{expose:I}){const h={TREND:1,WAVEFORM:2},g=d(""),_=d([{type:h.TREND,title:"\u8D8B\u52BF\u56FE",imgList:[]},{type:h.WAVEFORM,title:"\u6CE2\u5F62\u3001\u9891\u8C31\u3001\u5305\u7EDC\u8C31\u56FE",imgList:[]}]),o=d([]),l=d(null),f=d([]),m=e=>{o.value=[],l.value=e,g.value=e.allParentName,C({deviceId:e.deviceId||e.id,factoryId:e.factoryId}).then(t=>{const s=t.data||[];f.value=s.map(a=>a.id),_.value.forEach(a=>{a.imgList=s.filter(n=>n.screenshotType===a.type)})})},B=(e,t)=>{if(t)o.value.includes(e)||o.value.push(e);else{const s=o.value.indexOf(e);s>-1&&o.value.splice(s,1)}},D=e=>{F({id:e.id,dataRange:e.dataRange,remarks:e.remarks}).then(()=>{p.success("\u4FEE\u6539\u6210\u529F"),_.value.forEach(t=>{const s=t.imgList.findIndex(a=>a.id===e.id);s!==-1&&(t.imgList[s]={...e})})})},y=e=>{const t=e==="all",s=t?"\u662F\u5426\u786E\u8BA4\u5220\u9664\u6240\u6709\u56FE\u7247?":"\u662F\u5426\u786E\u8BA4\u5220\u9664\u9009\u4E2D\u7684\u56FE\u7247?";N.confirm(s,"\u63D0\u793A",{type:"warning",confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"}).then(()=>{const a=t?f.value:o.value;if(!a.length){p.warning("\u6CA1\u6709\u53EF\u5220\u9664\u7684\u56FE\u7247");return}M({deviceId:l.value.deviceId,factoryId:l.value.factoryId,screenshotIds:a}).then(n=>{p.success(n.msg||"\u5220\u9664\u6210\u529F"),l.value&&m(l.value)})}).catch(()=>{})};return I({initData:m}),(e,t)=>{const s=R,a=A;return c(),r("div",W,[i("div",$,[i("div",q,[z,i("span",H,E(g.value),1)]),i("div",Y,[x(s,{type:"danger",onClick:t[0]||(t[0]=n=>y("all"))},{default:T(()=>[k("\u6E05\u7A7A")]),_:1}),x(s,{type:"danger",onClick:t[1]||(t[1]=n=>y("selected")),disabled:!o.value.length},{default:T(()=>[k(" \u5220\u9664 ")]),_:1},8,["disabled"])])]),i("div",j,[(c(!0),r(S,null,b(_.value,n=>(c(),r("div",{key:n.type,class:"category-section"},[i("div",G,E(n.title),1),n.imgList.length>0?(c(),r("div",J,[(c(!0),r(S,null,b(n.imgList,v=>(c(),L(O,{key:v.id,item:v,selected:o.value.includes(v.id),onToggle:B,onUpdate:D},null,8,["item","selected"]))),128))])):(c(),L(a,{key:1,description:"\u6682\u65E0\u56FE\u7247","image-size":60}))]))),128))])])}}},ne=P(K,[["__scopeId","data-v-07568562"]]);export{ne as default};
