import{d as x,r as q,l as w,a as u,o as i,i as g,e as s,f as y,j as b,h as p,b as r,u as n,m as C,c as A,t as P,s as E,E as F,_ as I}from"./index-8184dd63-1780045603901v=1.0.0.js";import R from"./AuditProgress-a14e45d4-1780045603901v=1.0.0.js";import{u as $}from"./useFormEdit-20fecb8c-1780045603901v=1.0.0.js";import"./tabs-7d324d56-1780045603901v=1.0.0.js";const L={class:"center"},M={class:"left"},U={key:0,class:"checkNum"},j={key:0,class:"right"},z={class:"btns"},T=x({__name:"AuditDialog",props:{progressList:{type:Array,required:!0,default:()=>[]},visible:{type:Boolean,required:!0,default:!1},planIds:{type:[String,Number],required:!0,default:""},passStatus:{type:[String,Number],required:!0,default:3},noPassStatus:{type:[String,Number],required:!0,default:4},isShowProgress:{type:Boolean,required:!1,default:!0},isShowPassBtn:{type:Boolean,required:!1,default:!0},isShowNoPassBtn:{type:Boolean,required:!1,default:!0},api:{type:Function,required:!1}},emits:["update:visible","close","hanleSubmitCheck","reset"],setup(B,{emit:N}){const{updateMethod:h}=$(),a=q(""),t=B,o=N,m=w({get:()=>t.visible,set:_=>{o("close")}}),c=w(()=>`${t.planIds}`.split(",").length),S=()=>{o("close"),o("update:visible",!1)},k=async _=>{const e=_==1?t.passStatus:t.noPassStatus,f={audit_suggest:a.value,status:e,base_report_id:t.planIds},d=await h(t.api||E,f);d.code!==200&&F({type:"error",message:d.message}),a.value="",o("reset"),o("close"),o("update:visible",!1)};return(_,e)=>{const f=u("el-input"),d=u("el-form-item"),D=u("el-form"),v=u("el-button"),V=u("el-dialog");return i(),g(V,{class:"audit-dialog",width:"900px",title:"\u5BA1\u6838\u6279\u590D",modelValue:n(m),"onUpdate:modelValue":e[3]||(e[3]=l=>C(m)?m.value=l:null),"before-close":S},{footer:s(()=>[y("div",z,[t.isShowPassBtn?(i(),g(v,{key:0,type:"primary",onClick:e[1]||(e[1]=l=>k(1))},{default:s(()=>[...e[4]||(e[4]=[b("\u901A\u8FC7",-1)])]),_:1})):p("v-if",!0),t.isShowNoPassBtn?(i(),g(v,{key:1,onClick:e[2]||(e[2]=l=>k(2))},{default:s(()=>[...e[5]||(e[5]=[b("\u9A73\u56DE",-1)])]),_:1})):p("v-if",!0),r(v,{onClick:S},{default:s(()=>[...e[6]||(e[6]=[b("\u53D6\u6D88",-1)])]),_:1})])]),default:s(()=>[r(D,null,{default:s(()=>[y("div",L,[y("div",M,[r(d,{label:"\u5907\u6CE8"},{default:s(()=>[r(f,{modelValue:n(a),"onUpdate:modelValue":e[0]||(e[0]=l=>C(a)?a.value=l:null),autosize:{minRows:9,maxRows:12},type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6279\u5907\u6CE8"},null,8,["modelValue"]),n(c)>1?(i(),A("div",U,"\u5171"+P(n(c))+"\u6761",1)):p("v-if",!0)]),_:1})]),n(c)==1&&B.isShowProgress?(i(),A("div",j,[r(R,{"progress-list":t.progressList},null,8,["progress-list"])])):p("v-if",!0)])]),_:1})]),_:1},8,["modelValue"])}}});const O=I(T,[["__scopeId","data-v-030c8f8b"],["__file","D:/desktop/yunNan/vue-area-submit/src/views/components/AuditDialog.vue"]]);export{O as default};
