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

  1. import{d as C,C as x,B as y,r as l,o as k,D as T,L as d,c as u,e as D,f as N,g as c,h as i,j as b,_ as B}from"./index.69f54c6b.js";const E={class:"userManageMenu"},I={class:"treeTitle flexItem"},h=C({name:"roleManage"}),j=Object.assign(h,{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=x(y.userStore).userInfo,o=a,r=l([]),s=f,p={label:"name"},_=t=>{console.log(t),s("getTree",{...t})},e=l();return k(async()=>{const t=await T(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 D(),N("div",E,[c("div",I,[i(v,{name:"location","svg-class":"svgIcon"}),n[0]||(n[0]=b("\xA0")),n[1]||(n[1]=c("span",{style:{"font-weight":"600"}},"\u533A\u5212\u9009\u62E9",-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"])])}}}),L=B(j,[["__scopeId","data-v-d9abfe04"]]);export{L as E};