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