import{_ as C,a as M,u as N,r as p,ah as q,J as b,ai as I,Z as w,o as H,y as F,q as a,v as l,p as s,P as m,x as u,n as o,db as J,s as L,bM as R,k as j,ak as z,j as O,m as A,l as P,bv as Z,D as G}from"./index.8d733f79.js";import{E as K}from"./el-image.a7c44d35.js";import"./el-image-viewer.42b4b63f.js";import{i as Q,r as W}from"./multiDiagnosis.8917b8b6.js";import"./throttle.04d7163a.js";const X={style:{padding:"10px","background-color":"#06315E","border-radius":"6px"},class:"df"},ee={style:{flex:"0 0 60%"}},te={style:{flex:"0 0 40%"}},se={style:{gap:"10px","margin-top":"6px",flex:"1",height:"0"}},oe={class:"image-wrapper"},ae={class:"zoom-mask"},le={class:"dialog-footer"},re={__name:"screenshotDialog",setup(ne,{expose:k}){var h,v;const{proxy:c}=G();M(),N();const D="./",r=p(!1),f=p(),e=q({createBy:((h=b.session.getJSON("userInfo"))==null?void 0:h.name)||((v=b.session.getJSON("userInfo"))==null?void 0:v.username),screenshotTime:I().format("YYYY-MM-DD HH:mm:ss"),startTime:"",endTime:"",dataRange:"",images:"",screenshotType:null,remarks:""}),T=p(),g=w(()=>`${D}/equipment-web/file/downloadImage?fileId=${e.images}`);function V(n,t){r.value=!0,f.value=n,e.screenshotTime=I().format("YYYY-MM-DD HH:mm:ss"),e.remarks="",e.deviceId=t.deviceId,e.factoryId=t.factoryId,e.images=t.images,e.dataRange=t.dataRange,e.screenshotType=t.screenshotType,e.startTime=R().atlasTimeRange[0],e.endTime=R().atlasTimeRange[1],t.oldImg&&(T.value=t.oldImg.sort,e.oldId=t.oldImg.id)}const E=async()=>{!c.$refs.formRef||await c.$refs.formRef.validate((n,t)=>{n?(f.value==="add"?Q:W)(e).then(_=>{r.value=!1,c.$modal.msgSuccess(_.msg)}):console.log("error submit!",t)})},$=w(()=>({dataRange:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u4F8B\u540D\u79F0",trigger:"blur"}],remarks:[{required:!0,message:"\u8BF7\u8F93\u5165\u622A\u56FE\u8BF4\u660E",trigger:"blur"}]})),S=()=>{c.$refs.formRef.resetFields()};return k({showDialog:V}),(n,t)=>{const i=j,_=K,Y=z,y=O,U=A,x=P,B=Z;return H(),F(B,{title:"\u622A\u56FE\u4FE1\u606F\u786E\u8BA4",modelValue:o(r),"onUpdate:modelValue":t[3]||(t[3]=d=>L(r)?r.value=d:null),width:"800px","align-center":!0,onClosed:S,"append-to-body":"",class:"screenshot_dialog"},{footer:a(()=>[l("div",le,[s(x,{onClick:t[2]||(t[2]=d=>r.value=!1)},{default:a(()=>[m(u(n.$t("cancel")),1)]),_:1}),s(x,{type:"primary",onClick:E},{default:a(()=>[m(u(n.$t("confirm")),1)]),_:1})])]),default:a(()=>[s(U,{ref:"formRef",model:o(e),rules:o($),"label-width":"80",class:"df-c",style:{height:"100%"},"label-position":"left"},{default:a(()=>[l("div",X,[l("div",ee,[s(i,{label:"\u622A\u56FE\u4EBA:"},{default:a(()=>[m(u(o(e).createBy),1)]),_:1})]),l("div",te,[s(i,{label:"\u622A\u56FE\u65F6\u95F4:"},{default:a(()=>[m(u(o(e).screenshotTime),1)]),_:1})])]),l("div",se,[s(i,{label:"\u622A\u56FE\u5185\u5BB9:",class:"item-topLabel"},{default:a(()=>[l("div",oe,[s(_,{src:o(g),fit:"contain",style:{width:"100%","max-height":"580px"},"preview-src-list":[o(g)],"initial-index":0,"preview-teleported":""},null,8,["src","preview-src-list"]),l("div",ae,[s(Y,null,{default:a(()=>[s(o(J))]),_:1})])])]),_:1}),s(i,{label:"\u56FE\u4F8B\u540D\u79F0:",class:"item-topLabel",prop:"dataRange"},{default:a(()=>[s(y,{type:"textarea",modelValue:o(e).dataRange,"onUpdate:modelValue":t[0]||(t[0]=d=>o(e).dataRange=d),maxlength:"300",rows:"4","show-word-limit":"",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u56FE\u4F8B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),s(i,{label:"\u622A\u56FE\u8BF4\u660E:",class:"item-topLabel",prop:"remarks",style:{"margin-top":"14px"}},{default:a(()=>[s(y,{type:"textarea",modelValue:o(e).remarks,"onUpdate:modelValue":t[1]||(t[1]=d=>o(e).remarks=d),maxlength:"300",rows:"4","show-word-limit":"",placeholder:"\u8BF7\u8F93\u5165\u622A\u56FE\u8BF4\u660E"},null,8,["modelValue"])]),_:1})])]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}},_e=C(re,[["__scopeId","data-v-1694da49"]]);export{_e as default};
