import P from"./AuditProgress-a527d7ab.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 B,i as n,a as u,z as v,m as s,j as g,v as y,l as p,k as i,e as d,a4 as w,c as C,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=B({get:()=>t.visible,set:r=>{o("close")}}),_=B(()=>`${t.planIds}`.split(",").length),b=()=>{o("close"),o("update:visible",!1)},k=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};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 u(),v(D,{class:"audit-dialog",width:"900px",title:"\u5BA1\u6838\u6279\u590D",modelValue:d(m),"onUpdate:modelValue":e[3]||(e[3]=a=>w(m)?m.value=a:null),"before-close":b},{footer:s(()=>[g("div",M,[t.isShowPassBtn?(u(),v(f,{key:0,type:"primary",onClick:e[1]||(e[1]=a=>k(1))},{default:s(()=>e[4]||(e[4]=[y("\u901A\u8FC7")])),_:1})):p("v-if",!0),t.isShowNoPassBtn?(u(),v(f,{key:1,onClick:e[2]||(e[2]=a=>k(2))},{default:s(()=>e[5]||(e[5]=[y("\u9A73\u56DE")])),_:1})):p("v-if",!0),i(f,{onClick:b},{default:s(()=>e[6]||(e[6]=[y("\u53D6\u6D88")])),_:1})])]),default:s(()=>[i(A,null,{default:s(()=>[g("div",z,[g("div",L,[i(x,{label:"\u5907\u6CE8"},{default:s(()=>[i(c,{modelValue:d(l),"onUpdate:modelValue":e[0]||(e[0]=a=>w(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?(u(),C("div",U,"\u5171"+R(d(_))+"\u6761",1)):p("v-if",!0)]),_:1})]),d(_)==1&&r.isShowProgress?(u(),C("div",j,[i(P,{"progress-list":t.progressList},null,8,["progress-list"])])):p("v-if",!0)])]),_:1})]),_:1},8,["modelValue"])}}});const O=$(T,[["__scopeId","data-v-53b659bd"]]);export{O as default};
