import{_ as A,a as G,u as j,r as d,ah as T,o as v,c as B,p as a,q as l,v as s,P as p,x as n,n as c,s as C,F as P,A as H,y as J,da as K,db as Q,ay as X,k as Y,bn as Z,ak as ee,c5 as oe,c0 as te,l as se,bv as ae,a0 as le,a1 as ne,D as ce}from"./index.8d733f79.js";import{E as re}from"./el-image.a7c44d35.js";import"./el-image-viewer.42b4b63f.js";import{g as ie}from"./multiDiagnosis.8917b8b6.js";import de from"./screenshotDialog.ea6cee2d.js";import"./throttle.04d7163a.js";const g=_=>(le("data-v-3386a8ce"),_=_(),ne(),_),_e={class:"tit"},pe=g(()=>s("div",{class:"image-slot"},[p(" \u52A0\u8F7D\u4E2D"),s("span",{class:"dot"},"...")],-1)),ue={class:"image-slot error"},fe={class:"zoom-mask"},me={class:"footer-info"},ve={class:"info-row"},ge=g(()=>s("span",{class:"label"},"\u622A\u56FE\u4EBA:",-1)),he=["title"],we={class:"info-row"},ye=g(()=>s("span",{class:"label"},"\u622A\u56FE\u65F6\u95F4:",-1)),Ie=["title"],ke={class:"dialog-footer"},be={__name:"repalceDialog",setup(_,{expose:N}){const{proxy:h}=ce();G(),j();const r=d(!1),w=d(),y=d(),u=d([]),i=d(),I=T({}),k=T({}),b=(e,t)=>{t&&(I[e]=t,X(()=>U(e)))},U=e=>{const t=I[e];t&&(k[e]=t.scrollWidth>t.clientWidth)},R=e=>k[e]||!1,x=e=>{e.stopPropagation()},z="./",D=e=>`${z}/equipment-web/file/downloadImage?fileId=${e}`;let E;function F(e){r.value=!0,i.value="",E=e,y.value=e.allParentName,w.value=e.screenshotType===1?"\u8D8B\u52BF\u56FE":"\u6CE2\u5F62\u3001\u9891\u8C31\u3001\u5305\u7EDC\u56FE",ie({deviceId:e.deviceId,factoryId:e.factoryId,screenshotType:e.screenshotType}).then(t=>{u.value=t.data||[]})}const L=()=>{if(!i.value){h.$modal.msgError("\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u5F20\u56FE\u7247\u7528\u4E8E\u66F4\u6362\u3002");return}r.value=!1;const e=u.value.find(t=>t.id===i.value);h.$refs.screenshotDialogRef.showDialog("replace",{...E,oldImg:e})};return N({showDialog:F}),(e,t)=>{const f=Y,$=Z,V=ee,q=re,M=oe,O=te,S=se,W=ae;return v(),B(P,null,[a(W,{title:"\u622A\u56FE\u66FF\u6362\u9009\u62E9",modelValue:c(r),"onUpdate:modelValue":t[2]||(t[2]=o=>C(r)?r.value=o:null),width:"88%","align-center":!0,"append-to-body":"",class:"replace_dialog"},{footer:l(()=>[s("div",ke,[a(S,{onClick:t[1]||(t[1]=o=>r.value=!1)},{default:l(()=>[p(n(e.$t("cancel")),1)]),_:1}),a(S,{type:"primary",onClick:L},{default:l(()=>[p(n(e.$t("confirm")),1)]),_:1})])]),default:l(()=>[s("div",null,[a(f,{label:"\u8BBE\u5907\u8D8B\u52BF\u8DEF\u5F84:"},{default:l(()=>[p(n(c(y)),1)]),_:1}),s("div",_e,n(c(w)),1),a(O,{modelValue:c(i),"onUpdate:modelValue":t[0]||(t[0]=o=>C(i)?i.value=o:null),style:{display:"flex","flex-wrap":"wrap"}},{default:l(()=>[(v(!0),B(P,null,H(c(u),o=>(v(),J(M,{key:o.id,value:o.id,class:"ss-radio"},{default:l(()=>[a(f,{label:"\u56FE\u4F8B\u540D\u79F0:",class:"compact-item"},{default:l(()=>[a($,{content:o.dataRange||"-",disabled:!R(`dataRange-${o.id}`),placement:"top","popper-class":"screenshot-item-tooltip"},{default:l(()=>[s("div",{class:"text-overflow",ref_for:!0,ref:m=>b(`dataRange-${o.id}`,m)},n(o.dataRange||"-"),513)]),_:2},1032,["content","disabled"])]),_:2},1024),a(f,{label:"\u622A\u56FE\u8BF4\u660E:",class:"compact-item"},{default:l(()=>[a($,{content:o.remarks||"-",disabled:!R(`remarks-${o.id}`),placement:"top","popper-class":"screenshot-item-tooltip"},{default:l(()=>[s("div",{class:"text-overflow",ref_for:!0,ref:m=>b(`remarks-${o.id}`,m)},n(o.remarks||"-"),513)]),_:2},1032,["content","disabled"])]),_:2},1024),s("div",{class:"image-wrapper",onClick:x,onMousedown:x},[a(q,{class:"image",src:D(o.images),"preview-src-list":[D(o.images)],fit:"contain","preview-teleported":!0,loading:"lazy"},{placeholder:l(()=>[pe]),error:l(()=>[s("div",ue,[a(V,null,{default:l(()=>[a(c(K))]),_:1})])]),_:2},1032,["src","preview-src-list"]),s("div",fe,[a(V,null,{default:l(()=>[a(c(Q))]),_:1})])],32),s("div",me,[s("div",ve,[ge,s("span",{class:"value",title:o.updateBy},n(o.updateBy),9,he)]),s("div",we,[ye,s("span",{class:"value",title:o.screenshotTime},n(o.screenshotTime),9,Ie)])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]),a(de,{ref:"screenshotDialogRef"},null,512)],64)}}},Se=A(be,[["__scopeId","data-v-3386a8ce"]]);export{Se as default};
