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
1.4KB

  1. import{G as C,E as x,r as l,o as y,V as k,C as d,b as u,c as T,d as b,e as c,f as i,i as N,_ as D,k as E}from"./index-dd5fae99.js";const I={class:"userManageMenu"},B={class:"treeTitle flexItem"},M=E({name:"roleManage"}),V=Object.assign(M,{props:{defaultExpandAll:{type:Boolean,default:!0},defaultData:{type:Object,default:void 0},params:{type:Object,default:()=>({regionCode:330500,regionLevel:2})}},emits:["getTree"],setup(a,{emit:f}){const g=C(x.userStore).userInfo,o=a,r=l([]),s=f,p={label:"name"},_=t=>{console.log(t),s("getTree",{...t})},e=l();return y(async()=>{const t=await k(o.params);r.value=[t.data],o.defaultData?d(()=>{e.value&&e.value.setCurrentKey(o.defaultData.regionCode,!0),s("getTree",{...e.value.getCurrentNode()})}):d(()=>{e.value&&e.value.setCurrentKey(g.value.regionCode,!0),s("getTree",{...e.value.getCurrentNode()})})}),(t,n)=>{const v=u("svg-icon"),m=u("el-tree");return T(),b("div",I,[c("div",B,[i(v,{name:"location","svg-class":"svgIcon"}),n[0]||(n[0]=N(" ")),n[1]||(n[1]=c("span",{style:{"font-weight":"600"}},"区划选择",-1))]),i(m,{ref_key:"treeRef",ref:e,class:"tree",data:r.value,"node-key":"regionCode","highlight-current":!0,props:p,"default-expand-all":a.defaultExpandAll,"current-node-key":a.defaultData&&a.defaultData.code||void 0,"expand-on-click-node":!1,onNodeClick:_},null,8,["data","default-expand-all","current-node-key"])])}}}),j=D(V,[["__scopeId","data-v-d9abfe04"]]);export{j as E};