数通互联化工云平台
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
1.6 KiB

4 months ago
import{d as U,r as o,bf as m,w as g,Y as w,h as f,a as l,c as i,b as d,$ as h,q as u,e as N,H as v,t as R,a1 as O,aG as P,at as V,p as B,m as A,_ as D}from"./index-e450010e.js";const E=e=>(B("data-v-0042d06b"),e=e(),A(),e),q=E(()=>u("div",{class:"image-slot"},[v("Loading"),u("span",{class:"dot"},"...")],-1)),G={class:"image-slot"},H=U({__name:"orgusertree",props:{roleId:{type:String,default:""},systemRoleUSerTreeList:{type:String,default:""}},emits:["checkedOrgPeopleStrSun"],setup(e,{expose:y,emit:S}){const s=e,c=o(m),r=o(!1),_=o([]),k=S;o(s.roleId);const n=o([]),T={children:"child",label:"name"};g(()=>s.systemRoleUSerTreeList,()=>{r.value=!0,s.systemRoleUSerTreeList!=null&&s.systemRoleUSerTreeList!=""&&(_.value=JSON.parse(s.systemRoleUSerTreeList),r.value=!1)});function b(){n.value=c.value.getCheckedNodes(!1,!1).map(a=>a.id),r.value=!1}return g(()=>n.value,()=>{k("checkedOrgPeopleStrSun",n.value)}),y({setupCurrent:a=>{c.value.setCheckedKeys(a,!0)}}),(a,K)=>{const p=O,x=P,C=m,I=V;return w((l(),i(C,{ref_key:"userTreeRef",ref:c,"node-key":"id",data:f(_),"show-checkbox":"",props:T,"expand-on-click-node":!0,"check-on-click-node":!0,onCheckChange:b},{default:d(({node:L,data:t})=>[t.isman==1?(l(),i(p,{key:0,"icon-class":"tree",class:"svgbox"})):h("",!0),t.isman!=1?(l(),i(x,{key:1,src:t.icon!=""?t.icon:t.iconbase64,class:"img_box"},{placeholder:d(()=>[q]),error:d(()=>[u("div",G,[N(p,{"icon-class":"role",style:{}})])]),_:2},1032,["src"])):h("",!0),v(" "+R(L.label),1)]),_:1},8,["data"])),[[I,f(r)]])}}});const Y=D(H,[["__scopeId","data-v-0042d06b"]]);export{Y as default};