import{_ as d,d as m,bt as f,w as _,z as h,r as y,o as r,G as v,C,c as n,F as b,D as g,B as k,L as R,l as x}from"./index.js";import{h as w}from"./index.84fc395c.js";const E=["onClick"],L={key:1,class:"text-center pt-[10x] select-none"},N=m({__name:"role-list",props:{currentRole:{type:Object,required:!0},companyNo:{type:String,required:!0}},emits:["changeCurrentRole"],setup(a,{emit:c}){const s=a,u=f(),e=_([]);async function p(){const{code:l,data:i,message:o}=await w({size:1e3,level:2,companyNo:s.companyNo});u({code:l,message:o,handler:()=>{e.value=i.list,c("changeCurrentRole",x(e)[0])}})}return h(()=>s.companyNo,()=>{!s.companyNo||p()},{immediate:!0}),(l,i)=>{const o=y("ElScrollbar");return r(),v(o,{class:"border-r border-#dcdfe6"},{default:C(()=>[e.value.length>0?(r(!0),n(b,{key:0},g(e.value,t=>(r(),n("div",{class:k(["px-1 py-0.5 m-1.5 hover:color-blue hover:bg-#f7f7f7 cursor-pointer duration-200",a.currentRole.id===t.id&&"color-blue bg-#f7f7f7"]),key:t.id,onClick:()=>c("changeCurrentRole",t)},R(t.role_name),11,E))),128)):(r(),n("p",L,"\u6682\u65E0\u6570\u636E"))]),_:1})}}});var q=d(N,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/interest/processPermission/components/role-list.vue"]]);export{q as default};
