1 |
- import{d as fe,Y as ye,K as ge,r as p,h as ve,e as J,l as ke,o as d,c as U,a as l,g as m,f as t,w as r,dD as W,R as C,x as X,a4 as be,au as xe,v as _,n as x,P as N,t as K,F as we,j as Ie,C as Ce,V as Ne,A as Ve,E as Se,i as Pe,D as ze,G as De,H as Ue,I as Ke,_ as Te,__tla as Ae}from"./index-6d7b82ba.js";import{_ as Re,__tla as Me}from"./Echart-fb809070.js";import{_ as Be,__tla as Ee}from"./ContentWrap-1ba5c8ca.js";import{_ as Fe,__tla as Oe}from"./index-a786614b.js";import{D as Ze,S as T,__tla as $e}from"./Descendants-f580d4c1.js";import{D as je,__tla as qe}from"./index-5a6892f1.js";import{u as Ge,__tla as He}from"./useMessage-be161634.js";import{__tla as Le}from"./ContentWrap.vue_vue_type_script_setup_true_lang-68bb15fa.js";import{__tla as Qe}from"./el-card-1a4b93b1.js";import{__tla as Ye}from"./index-e37504b6.js";import{__tla as Je}from"./Dialog-78181bae.js";let ee,We=Promise.all([(()=>{try{return Ae}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return $e}catch{}})(),(()=>{try{return qe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Je}catch{}})()]).then(async()=>{let A,R,M,B,E,F,O,Z,$;A={key:0,class:"search-one"},R={style:{"text-align":"right"},class:"search-input"},M={key:1,class:"search-one"},B={style:{"text-align":"right"},class:"search-input"},E={style:{width:"100%",position:"relative"}},F=["src"],O=["onClick"],Z=["onClick"],$={style:{display:"none"}},ee=Te(fe({name:"SharePath",__name:"index",props:{userId:{type:Number,default:0}},setup(ae){const le=ye(),te=ge(()=>le.getMobile),w=p(!1),b=ae,j=()=>{w.value=!w.value},V=()=>{w.value=!1},u=p(1);Ge(),ve();const I=p(!0),q=p([]);let h=p([]);const G=p(0),o=J({pageNo:1,pageSize:10,mobile:void 0,nickName:void 0}),re=p(),i=J({userId:1,nickName:void 0,mobile:void 0,maxDepth:50}),g=async a=>{if(I.value=!0,u.value==1)try{const e=await je.getDuserPage(a);q.value=e.list,G.value=e.total}finally{I.value=!1}else if(u.value==2)try{const e=await T.getSharePathPageTree(a);h.value=[P(e)],f.series[0].data=h.value,f={...f}}finally{I.value=!1}},H=p(),L=async(a,e)=>{H.value.open(a,e.userId,e.childrenCount)},v=()=>{o.pageNo=1,g(o)},S=()=>{if(!i.nickName&&!i.mobile)return g(i),!1;(async a=>{a.userId=void 0,a.maxDepth=5;const e=await T.getTreeByNameOrMobile(a);h.value=[P(e)],f.series[0].data=h.value,f={...f}})(i)},ne=()=>{o.mobile=void 0,o.nickName=void 0,v(),V()},oe=()=>{i.userId=b.userId||1,i.nickName=void 0,i.mobile=void 0,g(i),V()};let f={tooltip:{trigger:"item",triggerOn:"mousemove",formatter:function(a){return`${a.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(a){return`${a.data.nickname}`}},zoom:1,roam:!0,scaleLimit:{min:.1,max:5},leaves:{label:{position:"bottom",verticalAlign:"middle",align:"center",fontSize:14}},animationDurationUpdate:750,symbolSize:10}]};const P=a=>(a.name===null&&(a.name="\u672A\u547D\u540D\u8282\u70B9"),a.symbol="circle",a.children&&a.children.length>0?(a.children=a.children.map(e=>P(e)),a.children.sort((e,s)=>e.sort-s.sort)):a.children=[],a),z=p(null),ie=a=>{z.value=a,z.value&&z.value.on("click",function(e){e.componentType==="series"&&(e.data.children.length||async function(s){if(!s.userId)return;i.userId=s.userId;let c=await T.getSharePathPageTree(i);if(c&&c.children.length>0){const y=Q(h.value[0],s.userId);y?y.children=c.children:console.log("\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u8282\u70B9")}console.log(h.value[0])}(e.data))})};function Q(a,e){if(a.userId===e)return a;if(a.children&&a.children.length>0)for(let s of a.children){const c=Q(s,e);if(c)return c}return null}return ke(async()=>{b.userId&&(console.log("props.userId",b.userId),o.userId=b.userId,i.userId=b.userId),console.log("treeParams",i),await g(o)}),(a,e)=>{const s=Ie,c=Ce,y=Ne,D=Ve,se=Se,ce=Pe,de=ze,k=De,ue=Ue,pe=Fe,Y=Be,me=Re,_e=Ke;return d(),U(we,null,[l(u)==1?(d(),U("div",A,[m("div",R,[t(y,{modelValue:l(o).mobile,"onUpdate:modelValue":e[0]||(e[0]=n=>l(o).mobile=n),placeholder:"\u7528\u6237\u624B\u673A\u53F7",clearable:"",onKeyup:C(v,["enter"])},{suffix:r(()=>[t(s,{class:"mr-5px",icon:"ep:search",onClick:v,style:{cursor:"pointer"}})]),append:r(()=>[t(c,{icon:l(W),onClick:j},null,8,["icon"])]),_:1},8,["modelValue"])])])):(d(),U("div",M,[m("div",B,[t(y,{modelValue:l(i).mobile,"onUpdate:modelValue":e[1]||(e[1]=n=>l(i).mobile=n),placeholder:"\u7528\u6237\u624B\u673A\u53F7",clearable:"",onKeyup:C(S,["enter"])},{suffix:r(()=>[t(s,{class:"mr-5px",icon:"ep:search",onClick:S,style:{cursor:"pointer"}})]),append:r(()=>[t(c,{icon:l(W),onClick:j},null,8,["icon"])]),_:1},8,["modelValue"])])])),m("div",E,[X(m("div",{class:"searchMore",style:xe({width:l(te)?"88.7%":"96%"})},[t(de,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:re,inline:!0,"label-width":"108px"},{default:r(()=>[l(u)==1?(d(),_(D,{key:0,label:"\u7528\u6237\u6635\u79F0",prop:"name"},{default:r(()=>[t(y,{modelValue:l(o).nickName,"onUpdate:modelValue":e[2]||(e[2]=n=>l(o).nickName=n),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",clearable:"",onKeyup:C(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})):(d(),_(D,{key:1,label:"\u7528\u6237\u6635\u79F0",prop:"mobile"},{default:r(()=>[t(y,{modelValue:l(i).nickName,"onUpdate:modelValue":e[3]||(e[3]=n=>l(i).nickName=n),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",clearable:"",onKeyup:C(v,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})),t(ce,null,{default:r(()=>[t(se,null,{default:r(()=>[t(D,null,{default:r(()=>[t(c,{onClick:V},{default:r(()=>[x(" \u6536\u8D77 ")]),_:1}),l(u)==1?(d(),_(c,{key:0,onClick:v},{default:r(()=>[t(s,{icon:"ep:search",class:"mr-5px"}),x(" \u641C\u7D22 ")]),_:1})):(d(),_(c,{key:1,onClick:S},{default:r(()=>[t(s,{icon:"ep:search",class:"mr-5px"}),x(" \u641C\u7D22 ")]),_:1})),l(u)==1?(d(),_(c,{key:2,onClick:ne},{default:r(()=>[t(s,{icon:"ep:refresh",class:"mr-5px"}),x(" \u91CD\u7F6E ")]),_:1})):N("",!0),l(u)==2?(d(),_(c,{key:3,onClick:oe},{default:r(()=>[t(s,{icon:"ep:refresh",class:"mr-5px"}),x(" \u91CD\u7F6E ")]),_:1})):N("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],4),[[be,l(w)]])]),l(u)==1?(d(),_(Y,{key:2,style:{"margin-top":"10px",padding:"10px"}},{default:r(()=>[X((d(),_(ue,{data:l(q),stripe:!0,"show-overflow-tooltip":!0},{default:r(()=>[t(k,{label:"\u5934\u50CF",align:"center",prop:"ancName"},{default:r(n=>[m("span",null,[m("img",{src:n.row.avatar,style:{width:"50px",height:"50px","border-radius":"50%",border:"1px solid rgb(220, 223, 231)"}},null,8,F)])]),_:1}),t(k,{label:"\u7528\u6237\u6635\u79F0",align:"center",prop:"nickName"}),t(k,{label:"\u7528\u6237\u624B\u673A\u53F7",align:"center",prop:"mobile"}),t(k,{label:"\u63A8\u8350\u4EBA\u59D3\u540D",align:"center",prop:"ancNickName"}),t(k,{label:"\u76F4\u63A8\u4EBA\u5217\u8868",align:"center",prop:"descendantCount"},{default:r(n=>[m("span",{onClick:he=>L(1,n.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},K(n.row.descendantCount),9,O)]),_:1}),t(k,{label:"\u540E\u4EE3\u5217\u8868",align:"center",prop:"childrenCount"},{default:r(n=>[m("span",{onClick:he=>L(2,n.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},K(n.row.childrenCount),9,Z)]),_:1})]),_:1},8,["data"])),[[_e,l(I)]]),t(pe,{total:l(G),page:l(o).pageNo,"onUpdate:page":e[4]||(e[4]=n=>l(o).pageNo=n),limit:l(o).pageSize,"onUpdate:limit":e[5]||(e[5]=n=>l(o).pageSize=n),onPagination:e[6]||(e[6]=n=>g(l(o)))},null,8,["total","page","limit"])]),_:1})):N("",!0),l(u)==2?(d(),_(Y,{key:3,style:{"margin-top":"10px",padding:"10px"}},{default:r(()=>[m("div",$,K(l(h)),1),t(me,{height:650,onChartInit:ie,options:l(f)},null,8,["options"])]),_:1})):N("",!0),t(Ze,{ref_key:"formRef",ref:H,onSuccess:g},null,512)],64)}}}),[["__scopeId","data-v-20dfdeaa"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/sharepath/index.vue"]])});export{We as __tla,ee as default};
|