Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

index.af6ebbed.js 1.4KB

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