import P from"./AuditProgress-f54e974b.js";import{u as N}from"./useFormEdit-3c660b22.js";import{p as E}from"./plan-2fedc155.js";import{d as I,p as F,f as w,i as n,a as i,z as v,m as s,j as g,v as y,l as p,k as u,e as d,a4 as C,c as b,t as R,_ as $}from"./index-deffec86.js";import"./tabs-96386b59.js";const z={class:"center"},L={class:"left"},U={key:0,class:"checkNum"},j={key:0,class:"right"},M={class:"btns"},T=I({__name:"AuditDialog",props:{progressList:{default:()=>[]},visible:{type:Boolean,default:!1},planIds:{default:""},passStatus:{default:3},noPassStatus:{default:4},isShowProgress:{type:Boolean,default:!0},isShowPassBtn:{type:Boolean,default:!0},isShowNoPassBtn:{type:Boolean,default:!0},api:{}},emits:["update:visible","close","hanleSubmitCheck","reset"],setup(S,{emit:h}){const{updateMethod:V}=N(),l=F(""),t=S,o=h,m=w({get:()=>t.visible,set:r=>{o("close")}}),_=w(()=>`${t.planIds}`.split(",").length),k=()=>{o("close"),o("update:visible",!1)},B=async r=>{const e=r==1?t.passStatus:t.noPassStatus,c={review_comments:l.value,status:e,plan_ids:t.planIds,activity_ids:t.planIds,event_activity_type:2,plan_type:2};await V(t.api||E,c),l.value="",o("reset"),o("close"),o("update:visible",!1)};return(r,e)=>{const c=n("el-input"),x=n("el-form-item"),A=n("el-form"),f=n("el-button"),D=n("el-dialog");return i(),v(D,{class:"audit-dialog",width:"900px",title:"\u5BA1\u6838\u6279\u590D",modelValue:d(m),"onUpdate:modelValue":e[3]||(e[3]=a=>C(m)?m.value=a:null),"before-close":k},{footer:s(()=>[g("div",M,[t.isShowPassBtn?(i(),v(f,{key:0,type:"primary",onClick:e[1]||(e[1]=a=>B(1))},{default:s(()=>e[4]||(e[4]=[y("\u901A\u8FC7")])),_:1})):p("v-if",!0),t.isShowNoPassBtn?(i(),v(f,{key:1,onClick:e[2]||(e[2]=a=>B(2))},{default:s(()=>e[5]||(e[5]=[y("\u9A73\u56DE")])),_:1})):p("v-if",!0),u(f,{onClick:k},{default:s(()=>e[6]||(e[6]=[y("\u53D6\u6D88")])),_:1})])]),default:s(()=>[u(A,null,{default:s(()=>[g("div",z,[g("div",L,[u(x,{label:"\u5907\u6CE8"},{default:s(()=>[u(c,{modelValue:d(l),"onUpdate:modelValue":e[0]||(e[0]=a=>C(l)?l.value=a:null),autosize:{minRows:9,maxRows:12},type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u5907\u6CE8"},null,8,["modelValue"]),d(_)>1?(i(),b("div",U,"\u5171"+R(d(_))+"\u6761",1)):p("v-if",!0)]),_:1})]),d(_)==1&&r.isShowProgress?(i(),b("div",j,[u(P,{"progress-list":t.progressList},null,8,["progress-list"])])):p("v-if",!0)])]),_:1})]),_:1},8,["modelValue"])}}});const O=$(T,[["__scopeId","data-v-2604c227"]]);export{O as default};
