import{a as R,u as V,r as b,ah as w,o as C,y as k,q as s,v as E,p as a,P as m,x as c,n as u,s as B,d4 as F,j as S,k as x,m as N,l as P,bv as q,D as U}from"./index.8d733f79.js";const j={class:"dialog-footer"},M={__name:"closeDefect",props:{status:{type:String,default:""}},emits:["handleReslove"],setup(f,{expose:p,emit:_}){const g=f,{proxy:r}=U();R(),V();const t=b(!1),l=w({alarmId:"",defectId:"",closeIllustration:""});function I(e){t.value=!0,l.alarmId=e.alarmId,l.defectId=e.defectId}const v=async()=>{!r.$refs.formRef||await r.$refs.formRef.validate((e,o)=>{e?F({...l,status:g.status}).then(n=>{n.code===200&&(r.$modal.msgSuccess(n.msg),t.value=!1,_("handleReslove"))}):console.log("error submit!",o)})},h=()=>{r.$refs.formRef.resetFields()};return p({showDialog:I}),(e,o)=>{const n=S,$=x,y=N,i=P,D=q;return C(),k(D,{title:e.$t("closeAlarm"),modelValue:u(t),"onUpdate:modelValue":o[2]||(o[2]=d=>B(t)?t.value=d:null),width:"500px","align-center":!0,onClosed:h,"append-to-body":""},{footer:s(()=>[E("div",j,[a(i,{onClick:o[1]||(o[1]=d=>t.value=!1)},{default:s(()=>[m(c(e.$t("cancel")),1)]),_:1}),a(i,{type:"primary",onClick:v},{default:s(()=>[m(c(e.$t("confirm")),1)]),_:1})])]),default:s(()=>[a(y,{ref:"formRef",model:u(l),"label-position":"top"},{default:s(()=>[a($,{label:e.$t("handleDesc"),prop:"closeIllustration",rules:[{required:!0,message:e.$t("handleDescP"),trigger:"blur"}]},{default:s(()=>[a(n,{modelValue:u(l).closeIllustration,"onUpdate:modelValue":o[0]||(o[0]=d=>u(l).closeIllustration=d),maxlength:"2000",rows:"3","show-word-limit":"",type:"textarea",placeholder:e.$t("handleDescP")},null,8,["modelValue","placeholder"])]),_:1},8,["label","rules"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"])}}};export{M as default};
