No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

2 líneas
6.1KB

  1. import G from"./addExpertDialog.9ff9dc6b.js";import{_ as j}from"./index.ce78f549.js";import{b,r as L,c as s,e as m,f as g,h as o,i as a,g as d,j as _,F as k,H as h,G as w,t as V,k as N,L as H}from"./index.88314652.js";import"./expertStore.71b9aeda.js";import"./unitManage.f0f6d1ad.js";const J={class:"flex flex-col items-start"},q={class:"flex flex-col items-start"};const le={__name:"avoidCom",setup(K,{expose:T}){const l=b({expertInviteRule:{inviteType:1,randomRules:[{expertDicts:[],expertTags:[]}],appointRule:{},avoidRule:{avoidUnitIdList:[{organizationCode:"GO_ff70e47bae684fdba0d64f4acab85661",name:"\u676D\u5DDE\u5B81\u8FBE\u79D1\u6280\u6709\u9650\u516C\u53F8"},{organizationCode:"GO_13e5ef6615ae4b1293c4811b58e52955",name:"\u53D1\u6539\u59D4"},{organizationCode:"GO_c50ee049114146dd80a8e1bb82812cd9",name:"\u59D4\u9886\u5BFC"}],avoidOrgIdList:[],expertIds:[],avoidType:3}},meetingBasicInfo:{isInnerProject:!0}});T({getAvoidRule:U,setNewData:e=>{H(()=>{if(l.expertInviteRule.avoidRule.avoidType=e.avoidInfo.avoidType,e.avoidInfo.experts&&Array.isArray(e.avoidInfo.experts)&&(l.expertInviteRule.avoidRule.expertIds=e.avoidInfo.experts.map(t=>({...t,userId:t.expertId,expertName:t.name}))),e.avoidInfo.avoidUnitIds&&Array.isArray(e.avoidInfo.avoidUnitIds)){const t=[];e.avoidInfo.avoidUnitIds.forEach((u,R)=>{t.push({organizationCode:u,name:e.avoidInfo.avoidUnits[R]})}),l.expertInviteRule.avoidRule.avoidUnitIdList=t}e.avoidInfo.weekInviteCount&&(l.expertInviteRule.avoidRule.weekInviteCount=e.avoidInfo.weekInviteCount)})}});function U(){const e=JSON.parse(JSON.stringify(l));return e.expertInviteRule.avoidRule.avoidUnitIdList=e.expertInviteRule.avoidRule.avoidUnitIdList.map(t=>t.organizationCode),e.expertInviteRule.avoidRule.expertIds=e.expertInviteRule.avoidRule.expertIds.map(t=>t.userId),e.expertInviteRule.avoidRule}const I=L(),r=b({visible:!1,data:[]}),B=()=>{var e;I.value=2,r.visible=!0,r.data=((e=l.expertInviteRule.avoidRule)==null?void 0:e.expertIds)||[]},O=e=>{l.expertInviteRule.avoidRule.avoidUnitIdList.splice(e,1)},z=e=>{I.value===1?l.expertInviteRule.appointRule.expertIdList=e.map(t=>({id:t.userId,name:t.expertName})):l.expertInviteRule.avoidRule.expertIds=e,r.visible=!1},i=b({unitVisible:!1,showCheckbox:!1,data:void 0}),D=()=>{i.unitVisible=!0,i.showCheckbox=!0,i.defaultProps={children:"children",label:"title",value:"key",isLeaf:"isLeaf"},i.type="UNIT",i.data=l.expertInviteRule.avoidRule.avoidUnitIdList&&l.expertInviteRule.avoidRule.avoidUnitIdList.map(e=>({key:e.organizationCode,title:e.name}))||[]},f=L(),Q=()=>{f.value="\u56DE\u907F\u6761\u7EBF",i.defaultProps={children:"records",label:"businessStripName",value:"businessStripCode",isLeaf:"isLeaf"},i.type="LINE",i.unitVisible=!0,i.showCheckbox=!0,i.data=l.expertInviteRule.avoidRule.avoidOrgIdList&&l.expertInviteRule.avoidRule.avoidOrgIdList.map(e=>e)||[]},S=e=>{l.expertInviteRule.avoidRule.expertIds.splice(l.expertInviteRule.avoidRule.expertIds.indexOf(e),1)},F=e=>{f.value==="\u56DE\u907F\u6761\u7EBF"?l.expertInviteRule.avoidRule.avoidOrgIdList=e.map(t=>t):l.expertInviteRule.avoidRule.avoidUnitIdList=e.map(t=>({organizationCode:t.key,name:t.title}))},P=()=>{f.value=void 0,i.unitVisible=!1},W=e=>{l.expertInviteRule.avoidRule.avoidOrgIdList.splice(e,1)};return(e,t)=>{const u=s("el-option"),R=s("el-select"),x=s("el-form-item"),p=s("el-col"),v=s("el-row"),C=s("el-button"),y=s("el-tag"),$=s("el-input-number"),E=s("el-card");return m(),g(k,null,[o(G,{visible:r.visible,"org-code":r.orgCode,data:r.data,"select-expert-type":I.value,onGetUserData:z,onClose:t[0]||(t[0]=n=>r.visible=!1)},null,8,["visible","org-code","data","select-expert-type"]),o(j,{visible:i.unitVisible,"show-checkbox":i.showCheckbox,"default-data":i.data,title:f.value,type:i.type,"default-props":i.defaultProps,onClose:P,onGetSelectUnit:F},null,8,["visible","show-checkbox","default-data","title","type","default-props"]),o(E,{shadow:"never"},{header:a(()=>t[4]||(t[4]=[d("div",{class:"card-header"},[d("span",null,"\u56DE\u907F\u4FE1\u606F")],-1)])),default:a(()=>[o(v,null,{default:a(()=>[o(p,null,{default:a(()=>[o(x,{label:"\u90E8\u95E8\u3001\u6761\u7EBF\u56DE\u907F\u89C4\u5219",prop:"avoidRule.avoidType"},{default:a(()=>[o(R,{modelValue:l.expertInviteRule.avoidRule.avoidType,"onUpdate:modelValue":t[1]||(t[1]=n=>l.expertInviteRule.avoidRule.avoidType=n)},{default:a(()=>[o(u,{value:1,label:"\u56DE\u907F\u5355\u4F4D"}),o(u,{value:2,label:"\u56DE\u907F\u6761\u7EBF"}),o(u,{value:3,label:"\u4E0D\u56DE\u907F"})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o(v,{gutter:20},{default:a(()=>[o(p,{span:12},{default:a(()=>[o(x,{label:"\u56DE\u907F\u5355\u4F4D"},{default:a(()=>[d("div",J,[o(C,{type:"primary",size:"small",icon:"Plus",onClick:D},{default:a(()=>t[5]||(t[5]=[_(" \u6DFB\u52A0\u56DE\u907F\u5355\u4F4D ")])),_:1}),d("p",null,[(m(!0),g(k,null,h(l.expertInviteRule.avoidRule.avoidUnitIdList,(n,c)=>(m(),w(y,{key:c,class:"mr-8",closable:"",onClose:A=>O(c)},{default:a(()=>[_(V(n.name),1)]),_:2},1032,["onClose"]))),128))])])]),_:1})]),_:1})]),_:1}),o(v,{gutter:20},{default:a(()=>[o(p,{span:12},{default:a(()=>[o(x,{label:"\u56DE\u907F\u4E13\u5BB6"},{default:a(()=>[d("div",q,[o(C,{type:"primary",class:"button-new-tag ml-1",size:"small",icon:"Plus",onClick:B},{default:a(()=>t[6]||(t[6]=[_(" \u6DFB\u52A0\u56DE\u907F\u4E13\u5BB6 ")])),_:1}),d("p",null,[(m(!0),g(k,null,h(l.expertInviteRule.avoidRule.expertIds,n=>(m(),w(y,{key:n,class:"mx-1",closable:"","disable-transitions":!1,onClose:c=>S(n)},{default:a(()=>[_(V(n.expertName),1)]),_:2},1032,["onClose"]))),128))])])]),_:1})]),_:1})]),_:1}),o(v,{gutter:20},{default:a(()=>[o(p,{span:12},{default:a(()=>[N("",!0),N("",!0)]),_:1})]),_:1}),o(v,{gutter:20},{default:a(()=>[o(p,{span:24},{default:a(()=>[o(x,{label:"\u4E00\u5468\u5185\u53C2\u4E0E"},{default:a(()=>[o($,{modelValue:l.expertInviteRule.avoidRule.weekInviteCount,"onUpdate:modelValue":t[3]||(t[3]=n=>l.expertInviteRule.avoidRule.weekInviteCount=n),placeholder:"\u8BF7\u8F93\u5165",min:0,controls:!1,style:{width:"100px !important"}},null,8,["modelValue"]),t[8]||(t[8]=d("div",{style:{fontSize:"14px",color:"#666666",lineHeight:"2em"}},"\u6B21\u7684\u4E13\u5BB6\u4E0D\u518D\u62BD\u53D6",-1))]),_:1})]),_:1})]),_:1})]),_:1})],64)}}};export{le as default};