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