You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
2.4KB

  1. import V from"./ruleFormCom.a9a84950.js";import{r as T,c as y}from"./reviewMeeting.f2a98bd0.js";import{a4 as R,r as u,a5 as B,x as b,J as I,L as _,c as v,e as E,G as F,i as r,h as m,j as x,$ as N}from"./index.88314652.js";import $ from"./avoidCom.f91ae8ca.js";import"./expertStore.71b9aeda.js";import"./addExpertDialog.9ff9dc6b.js";import"./index.ce78f549.js";import"./unitManage.f0f6d1ad.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:D}){const d=u(),f=u(),p=u(),i=u([{}]),n=B(l,"modelValue"),C=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:C.query.id,avoidRule:f.value.getAvoidRule(),randomRules:d.value.handleParmas()},e=await T({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("\u5F53\u524D\u53EF\u9080\u8BF7\u4E13\u5BB6\u6570\u91CF\u4E0D\u8DB3\uFF0C\u662F\u5426\u7EE7\u7EED\u9080\u8BF7\uFF1F","\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(async()=>{console.log("\u7EE7\u7EED"),await y(o),n.value=!1,g("refresh")}):(await y(o),n.value=!1,g("refresh"))}const g=D;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:"\u7EED\u62BD",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(" \u786E\u5B9A ")])),_:1}),m(t,{size:"small",onClick:e[1]||(e[1]=c=>n.value=!1)},{default:r(()=>e[4]||(e[4]=[x(" \u5173\u95ED ")])),_: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($,{ref_key:"avoidConRef",ref:f},null,512)]),_:1},8,["model"])]),_:1},8,["model-value"])}}};export{A as default};