|
- import V from"./ruleFormCom-3884fe85.js";import{r as B,c as y}from"./reviewMeeting-39e99ddc.js";import{a5 as R,r as u,a6 as T,x as b,B as I,C as _,b as v,c as E,L as F,h as r,f as m,i as x,a0 as N}from"./index-dd5fae99.js";import h from"./avoidCom-77fdb977.js";import"./expertStore-7d1ebc1f.js";import"./addExpertDialog-0b06a511.js";import"./index-4950cfb0.js";import"./unitManage-104cfe86.js";const A={__name:"RefillDialogCopy",props:R({detailData:Object,mettingDetail:Object},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:R(["refresh"],["update:modelValue"]),setup(l,{emit:C}){const d=u(),f=u(),p=u(),i=u([{}]),n=T(l,"modelValue"),D=b();async function k(){p.value.validate(async(o,e)=>{console.log(o),o&&(console.log("sad"),await w())})}async function w(){d.value.handleParmas();const o={meetingId:D.query.id,avoidRule:f.value.getAvoidRule(),randomRules:d.value.handleParmas()},e=await B({meetingBasicInfo:{name:l.mettingDetail.meetingName,startTime:l.mettingDetail.startTime,endTime:l.mettingDetail.endTime},expertInviteRule:o}),a=o.randomRules.reduce((t,s)=>t+s.count,0);console.log(a),e.data.canInvite<a?N.confirm("当前可邀请专家数量不足,是否继续邀请?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(async()=>{console.log("继续"),await y(o),n.value=!1,g("refresh")}):(await y(o),n.value=!1,g("refresh"))}const g=C;return I(()=>n.value,(o,e)=>{if(o){const a=[];l.detailData.randomRules.forEach(t=>{let s={};t.formEditJson&&(s=JSON.parse(t.formEditJson)),a.push({...s,id:t.id})}),_(()=>{i.value=a,console.log(i),f.value.setNewData(l.detailData)})}}),(o,e)=>{const a=v("el-form"),t=v("el-button"),s=v("el-dialog");return E(),F(s,{"model-value":n.value,title:"续抽",width:"840px","destroy-on-close":"",onClose:e[2]||(e[2]=c=>n.value=!1)},{footer:r(()=>[m(t,{type:"primary",size:"small",onClick:k},{default:r(()=>e[3]||(e[3]=[x(" 确定 ")])),_:1}),m(t,{size:"small",onClick:e[1]||(e[1]=c=>n.value=!1)},{default:r(()=>e[4]||(e[4]=[x(" 关闭 ")])),_:1})]),default:r(()=>[m(a,{ref_key:"ruleFormRef",ref:p,model:i.value},{default:r(()=>[m(V,{ref_key:"ruleFormComRef",ref:d,modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=c=>i.value=c)},null,8,["modelValue"]),m(h,{ref_key:"avoidConRef",ref:f},null,512)]),_:1},8,["model"])]),_:1},8,["model-value"])}}};export{A as default};
|