import{A as e,r as s}from"./AuditDialog.vue_vue_type_style_index_1_lang-fa4dc086-1780912037814v=1.0.0.js";import{u as a}from"./useFormEdit-098e87f9-1780912037814v=1.0.0.js";import{d as t,r as l,s as o,a as i,b as u,c as d,w as r,k as n,e as p,j as c,l as f,f as v,H as m,h as _,t as g,E as h,_ as w}from"./index-d052b22f-1780912037814v=1.0.0.js";const y={class:"center"},b={class:"left"},S={key:0,class:"checkNum"},k={key:0,class:"right"},B={class:"btns"},P=w(t({__name:"AuditDialog",props:{progressList:{default:()=>[]},visible:{type:Boolean,default:!1},reviewId:{default:""},passStatus:{default:3},noPassStatus:{default:4},isShowProgress:{type:Boolean,default:!0},isShowPassBtn:{type:Boolean,default:!0},isShowNoPassBtn:{type:Boolean,default:!0},resourceCode:{},api:{}},emits:["update:visible","close","hanleSubmitCheck","reset"],setup(t,{emit:w}){const{updateMethod:P}=a(),x=l(""),C=t,V=w,j=o({get:()=>C.visible,set:e=>{V("close")}}),A=o((()=>`${C.reviewId}`.split(",").length)),I=()=>{V("close"),V("update:visible",!1)},N=async e=>{const a=1==e?C.passStatus:C.noPassStatus,t={review_id:C.reviewId,des:x.value,status:a,resource_code:C.resourceCode};let l=await P(C.api||s,t);200!==l.code&&h({type:"error",message:l.message}),x.value="",V("reset"),V("close"),V("update:visible",!1)};return(s,a)=>{const t=i("el-input"),l=i("el-form-item"),o=i("el-form"),h=i("el-button"),w=i("el-dialog");return u(),d(w,{width:"900px",title:"审核批复",modelValue:v(j),"onUpdate:modelValue":a[3]||(a[3]=e=>m(j)?j.value=e:null),"before-close":I},{footer:r((()=>[n("div",B,[p(h,{onClick:I},{default:r((()=>a[4]||(a[4]=[c("取消")]))),_:1}),C.isShowPassBtn?(u(),d(h,{key:0,type:"primary",onClick:a[1]||(a[1]=e=>N(1))},{default:r((()=>a[5]||(a[5]=[c("通过")]))),_:1})):f("v-if",!0),C.isShowNoPassBtn?(u(),d(h,{key:1,onClick:a[2]||(a[2]=e=>N(2))},{default:r((()=>a[6]||(a[6]=[c("驳回")]))),_:1})):f("v-if",!0)])])),default:r((()=>[p(o,null,{default:r((()=>[n("div",y,[n("div",b,[p(l,{label:"备注"},{default:r((()=>[p(t,{modelValue:v(x),"onUpdate:modelValue":a[0]||(a[0]=e=>m(x)?x.value=e:null),autosize:{minRows:9,maxRows:12},type:"textarea",placeholder:"请输入审批备注"},null,8,["modelValue"]),v(A)>1?(u(),_("div",S,"共"+g(v(A))+"条",1)):f("v-if",!0)])),_:1})]),1==v(A)&&s.isShowProgress?(u(),_("div",k,[p(e,{"progress-list":C.progressList},null,8,["progress-list"])])):f("v-if",!0)])])),_:1})])),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-e190a049"]]);export{P as A};
