1 |
- import{d as Ie,y as Ve,e as ee,r as m,bD as Ne,bE as De,P as Se,x as ae,b as Ue,o as d,c as w,a,B as _,f as l,A as r,aC as le,a4 as x,k as te,v as Pe,aG as ze,F as T,D as I,C as y,a2 as V,aD as Ke,a1 as Te,E as A,_ as Ae,J as Ee,a8 as Me,U as Oe,H as Re,K as We,V as Be,a9 as Fe,aa as Je,W as Le,X as $e,Y as je,__tla as qe}from"./index-f65577b8.js";import{_ as Ge,__tla as He}from"./Echart.vue_vue_type_script_setup_true_lang-70530aeb.js";import{_ as Xe,__tla as Ye}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{_ as Ze,__tla as Qe}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{_ as ea,S as E,__tla as aa}from"./Descendants.vue_vue_type_script_setup_true_lang-037c5b52.js";import{D as la,__tla as ta}from"./index-b72e3f32.js";import{u as na,__tla as ra}from"./useMessage-4dbf0ae4.js";import{_ as oa}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ia}from"./el-card-ab53e6aa.js";import{__tla as sa}from"./index-1896261a.js";import{__tla as ca}from"./Dialog-bd3317a7.js";let ne,ua=Promise.all([(()=>{try{return qe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ca}catch{}})()]).then(async()=>{let M,O,R,W,B,F,J,L,$;M={key:0,class:"search-one"},O={style:{"text-align":"right"},class:"search-input"},R={key:1,class:"search-one"},W={style:{"text-align":"right"},class:"search-input"},B={style:{width:"100%",position:"relative"}},F=["src"],J=["onClick"],L=["onClick"],$={style:{display:"none"}},ne=oa(Ie({name:"SharePath",__name:"index",props:{userId:{type:Number,default:0}},setup(re){const oe=Ve(),ie=ee(()=>oe.getMobile),N=m(!1),k=re,{wsCache:se}=Ne(),U=se.get(De.USER),ce=ee(()=>U.user.id===1);console.log(U.user.nickname&&U.user.id);const j=()=>{N.value=!N.value},P=()=>{N.value=!1},c=m(1),ue=t=>{c.value=t.paneName,c.value==1?f(o):(i.userId=k.userId||1,f(i))};na(),Se();const D=m(!0),q=m([]);let g=m([]);const G=m(0),o=ae({pageNo:1,pageSize:10,mobile:void 0,nickName:void 0,username:void 0}),de=m(),i=ae({userId:1,nickName:void 0,mobile:void 0,maxDepth:50,username:void 0}),f=async t=>{if(D.value=!0,c.value==1)try{const e=await la.getDuserPage(t);q.value=e.list,G.value=e.total}finally{D.value=!1}else if(c.value==2)try{const e=await E.getSharePathPageTree(t);g.value=[z(e)],b.series[0].data=g.value,b={...b}}finally{D.value=!1}},H=m(),X=async(t,e)=>{H.value.open(t,e.userId,e.childrenCount)};function pe(t){t.preventDefault()}const v=(t=void 0)=>{t.preventDefault(),o.pageNo=1,f(o)},S=t=>{if(t.preventDefault(),!i.nickName&&!i.mobile)return f(i),!1;(async e=>{e.userId=void 0,e.maxDepth=5;const s=await E.getTreeByNameOrMobile(e);g.value=[z(s)],b.series[0].data=g.value,b={...b}})(i)},me=()=>{o.mobile=void 0,o.nickName=void 0,o.username=void 0,v(),P()},_e=()=>{i.userId=k.userId||1,i.nickName=void 0,i.mobile=void 0,f(i),P()};let b={tooltip:{trigger:"item",triggerOn:"mousemove",formatter:function(t){return`${t.data.nickname}`}},dataZoom:{type:"inside"},series:[{type:"tree",data:[],left:"2%",right:"2%",top:"8%",bottom:"20%",orient:"vertical",initialTreeDepth:1e8,expandAndCollapse:!0,label:{position:"bottom",verticalAlign:"middle",align:"center",fontSize:14,padding:10,formatter:function(t){return`${t.data.nickname}`}},zoom:1,roam:!0,scaleLimit:{min:.1,max:100},leaves:{label:{position:"bottom",verticalAlign:"middle",align:"center",fontSize:14}},animationDurationUpdate:750,symbolSize:3}]};const z=t=>(t.name===null&&(t.name="\u672A\u547D\u540D\u8282\u70B9"),t.children&&t.children.length>0?(t.children=t.children.map(e=>z(e)),t.children.sort((e,s)=>e.sort-s.sort)):t.children=[],t),K=m(null),fe=t=>{K.value=t,K.value&&K.value.on("click",function(e){e.componentType==="series"&&(e.data.children.length||async function(s){if(!s.userId)return;i.userId=s.userId;let u=await E.getSharePathPageTree(i);if(u&&u.children.length>0){const p=Y(g.value[0],s.userId);p?p.children=u.children:console.log("\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u8282\u70B9")}console.log(g.value[0])}(e.data))})};function Y(t,e){if(t.userId===e)return t;if(t.children&&t.children.length>0)for(let s of t.children){const u=Y(s,e);if(u)return u}return null}return Ue(async()=>{k.userId&&(console.log("props.userId",k.userId),o.userId=k.userId,i.userId=k.userId),console.log("treeParams",i),await f(o)}),(t,e)=>{const s=Ae,u=Ee,p=Me,C=Oe,he=Re,ye=We,ge=Be,Z=Fe,ve=Je,h=Le,be=$e,ke=Ze,Q=Xe,xe=Ge,Ce=je;return d(),w(T,null,[a(c)==1?(d(),w("div",M,[_("div",O,[l(p,{modelValue:a(o).mobile,"onUpdate:modelValue":e[0]||(e[0]=n=>a(o).mobile=n),placeholder:"\u7528\u6237\u624B\u673A\u53F7",clearable:"",onKeyup:x(v,["enter"])},{suffix:r(()=>[l(s,{class:"mr-5px",icon:"ep:search",onClick:v,style:{cursor:"pointer"}})]),append:r(()=>[l(u,{icon:a(le),onClick:j},null,8,["icon"])]),_:1},8,["modelValue"])])])):(d(),w("div",R,[_("div",W,[l(p,{modelValue:a(i).mobile,"onUpdate:modelValue":e[1]||(e[1]=n=>a(i).mobile=n),placeholder:"\u7528\u6237\u624B\u673A\u53F7",clearable:"",onKeyup:x(S,["enter"])},{suffix:r(()=>[l(s,{class:"mr-5px",icon:"ep:search",onClick:S,style:{cursor:"pointer"}})]),append:r(()=>[l(u,{icon:a(le),onClick:j},null,8,["icon"])]),_:1},8,["modelValue"])])])),_("div",B,[te(_("div",{class:"searchMore",style:ze({width:a(ie)?"88.7%":"96%"})},[l(ge,{class:"-mb-15px",model:a(o),ref_key:"queryFormRef",ref:de,inline:!0,"label-width":"108px",onSubmit:Ke(pe,["prevent"])},{default:r(()=>[a(c)==1?(d(),w(T,{key:0},[l(C,{label:"\u7528\u6237\u6635\u79F0",prop:"name"},{default:r(()=>[l(p,{modelValue:a(o).nickName,"onUpdate:modelValue":e[2]||(e[2]=n=>a(o).nickName=n),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",clearable:"",onKeyup:x(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),l(C,{label:"\u7528\u6237\u540D",prop:"username"},{default:r(()=>[l(p,{modelValue:a(o).username,"onUpdate:modelValue":e[3]||(e[3]=n=>a(o).username=n),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",clearable:"",onKeyup:x(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})],64)):(d(),w(T,{key:1},[l(C,{label:"\u7528\u6237\u6635\u79F0",prop:"mobile"},{default:r(()=>[l(p,{modelValue:a(i).nickName,"onUpdate:modelValue":e[4]||(e[4]=n=>a(i).nickName=n),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",clearable:"",onKeyup:x(S,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),l(C,{label:"\u7528\u6237\u540D",prop:"name"},{default:r(()=>[l(p,{modelValue:a(o).username,"onUpdate:modelValue":e[5]||(e[5]=n=>a(o).username=n),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u540D",clearable:"",onKeyup:x(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})],64)),l(ye,null,{default:r(()=>[l(he,null,{default:r(()=>[l(C,null,{default:r(()=>[l(u,{onClick:P},{default:r(()=>[I(" \u6536\u8D77 ")]),_:1}),a(c)==1?(d(),y(u,{key:0,onClick:v},{default:r(()=>[l(s,{icon:"ep:search",class:"mr-5px"}),I(" \u641C\u7D22 ")]),_:1})):(d(),y(u,{key:1,onClick:S},{default:r(()=>[l(s,{icon:"ep:search",class:"mr-5px"}),I(" \u641C\u7D22 ")]),_:1})),a(c)==1?(d(),y(u,{key:2,onClick:me},{default:r(()=>[l(s,{icon:"ep:refresh",class:"mr-5px"}),I(" \u91CD\u7F6E ")]),_:1})):V("",!0),a(c)==2?(d(),y(u,{key:3,onClick:_e},{default:r(()=>[l(s,{icon:"ep:refresh",class:"mr-5px"}),I(" \u91CD\u7F6E ")]),_:1})):V("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],4),[[Pe,a(N)]])]),a(ce)?(d(),y(ve,{key:2,modelValue:a(c),"onUpdate:modelValue":e[6]||(e[6]=n=>Te(c)?c.value=n:null),onTabClick:ue,class:"parent-tabs"},{default:r(()=>[l(Z,{label:"\u5217\u8868\u6A21\u5F0F",name:1}),l(Z,{label:"\u6811\u72B6\u56FE",name:2})]),_:1},8,["modelValue"])):V("",!0),a(c)==1?(d(),y(Q,{key:3,style:{"margin-top":"10px",padding:"10px"}},{default:r(()=>[te((d(),y(be,{data:a(q),stripe:!0,"show-overflow-tooltip":!0},{default:r(()=>[l(h,{label:"\u5934\u50CF",align:"center",prop:"ancName"},{default:r(n=>[_("span",null,[_("img",{src:n.row.avatar,style:{width:"50px",height:"50px","border-radius":"50%",border:"1px solid rgb(220, 223, 231)"}},null,8,F)])]),_:1}),l(h,{label:"\u7528\u6237\u6635\u79F0",align:"center",prop:"nickName"}),l(h,{label:"\u7528\u6237\u540D",align:"center",prop:"username"}),l(h,{label:"\u7528\u6237\u624B\u673A\u53F7",align:"center",prop:"mobile"}),l(h,{label:"\u63A8\u8350\u4EBA\u59D3\u540D",align:"center",prop:"ancNickName"}),l(h,{label:"\u63A8\u8350\u4EBA\u7528\u6237\u540D",align:"center",prop:"ancUsername"}),l(h,{label:"\u76F4\u63A8\u4EBA\u5217\u8868",align:"center",prop:"descendantCount"},{default:r(n=>[_("span",{onClick:we=>X(1,n.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},A(n.row.descendantCount),9,J)]),_:1}),l(h,{label:"\u540E\u4EE3\u5217\u8868",align:"center",prop:"childrenCount"},{default:r(n=>[_("span",{onClick:we=>X(2,n.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},A(n.row.childrenCount),9,L)]),_:1})]),_:1},8,["data"])),[[Ce,a(D)]]),l(ke,{total:a(G),page:a(o).pageNo,"onUpdate:page":e[7]||(e[7]=n=>a(o).pageNo=n),limit:a(o).pageSize,"onUpdate:limit":e[8]||(e[8]=n=>a(o).pageSize=n),onPagination:e[9]||(e[9]=n=>f(a(o)))},null,8,["total","page","limit"])]),_:1})):V("",!0),a(c)==2?(d(),y(Q,{key:4,style:{"margin-top":"10px",padding:"10px"}},{default:r(()=>[_("div",$,A(a(g)),1),l(xe,{height:650,onChartInit:fe,options:a(b)},null,8,["options"])]),_:1})):V("",!0),l(ea,{ref_key:"formRef",ref:H,onSuccess:f},null,512)],64)}}}),[["__scopeId","data-v-f36f7b43"]])});export{ua as __tla,ne as default};
|