1 |
- import{d as ye,Y as ge,K as ve,r as p,h as ke,e as Q,l as be,o as u,c as z,a as l,g as v,f as t,w as n,dE as X,R as w,x as Y,a4 as xe,v as m,n as b,P as N,au as Ce,O as we,t as A,F as Ne,j as Ie,C as Ve,V as Se,A as De,E as Pe,i as Ue,D as ze,W as Ae,X as Te,G as Ke,H as Me,I as Oe,_ as Re,__tla as $e}from"./index-f1cc1c55.js";import{_ as Be,__tla as Ee}from"./Echart-599c5119.js";import{_ as Fe,__tla as We}from"./ContentWrap-2aa288df.js";import{_ as Ze,__tla as je}from"./index-bacb2026.js";import{D as qe,S as T,__tla as Ge}from"./Descendants-9867bfd4.js";import{D as He,__tla as Le}from"./index-cf0ef48b.js";import{u as Qe,__tla as Xe}from"./useMessage-783f03a2.js";import{__tla as Ye}from"./ContentWrap.vue_vue_type_script_setup_true_lang-c58960ae.js";import{__tla as Je}from"./el-card-d3c15d89.js";import{__tla as ea}from"./index-109ae4f4.js";import{__tla as aa}from"./Dialog-5f2c9397.js";let J,la=Promise.all([(()=>{try{return $e}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return je}catch{}})(),(()=>{try{return Ge}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Je}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return aa}catch{}})()]).then(async()=>{let K,M,O,R,$,B,E;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"},$=["onClick"],B=["onClick"],E={style:{display:"none"}},J=Re(ye({name:"SharePath",__name:"index",props:{userId:{type:Number,default:0}},setup(ee){const ae=ge(),le=ve(()=>ae.getMobile),x=p(!1),I=ee,F=()=>{x.value=!x.value},V=()=>{x.value=!1},s=p(1),te=a=>{s.value=a.paneName,s.value==1?_(o):(i.userId=1,_(i))};Qe(),ke();const C=p(!0),W=p([]);let h=p([]);const Z=p(0),o=Q({pageNo:1,pageSize:10,mobile:void 0,nickName:void 0}),ne=p(),i=Q({userId:1,nickName:void 0,mobile:void 0,maxDepth:50}),_=async a=>{if(C.value=!0,s.value==1)try{const e=await He.getDuserPage(a);W.value=e.list,Z.value=e.total}finally{C.value=!1}else if(s.value==2)try{const e=await T.getSharePathPageTree(a);h.value=[D(e)],f.series[0].data=h.value,f={...f}}finally{C.value=!1}},j=p(),q=async(a,e)=>{j.value.open(a,e.userId,e.childrenCount)},g=()=>{o.pageNo=1,_(o)},S=()=>{if(!i.nickName&&!i.mobile)return _(i),!1;(async a=>{a.userId=void 0,a.maxDepth=5;const e=await T.getTreeByNameOrMobile(a);h.value=[D(e)],f.series[0].data=h.value,f={...f}})(i)},re=()=>{o.mobile=void 0,o.nickName=void 0,g(),V()},oe=()=>{i.userId=1,i.nickName=void 0,i.mobile=void 0,_(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%",symbol:"emptyCircle",orient:"vertical",initialTreeDepth:1e8,expandAndCollapse:!0,label:{position:"top",verticalAlign:"middle",align:"right",fontSize:14,formatter:function(a){return`${a.data.nickname}`}},zoom:1,roam:!0,scaleLimit:{min:.1,max:5},leaves:{label:{position:"bottom",verticalAlign:"middle",align:"center"}},animationDurationUpdate:750}]};const D=a=>(a.name===null&&(a.name="\u672A\u547D\u540D\u8282\u70B9"),a.hasSon&&(a.symbol="circle"),a.children&&a.children.length>0?a.children=a.children.map(e=>D(e)):a.children=[],a),P=p(null),ie=a=>{P.value=a,P.value&&P.value.on("click",function(e){e.componentType==="series"&&(e.data.children.length||async function(d){i.userId=d.userId;let c=await T.getSharePathPageTree(i);if(c&&c.children.length>0){const y=G(h.value[0],d.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 G(a,e){if(a.userId===e)return a;if(a.children&&a.children.length>0)for(let d of a.children){const c=G(d,e);if(c)return c}return null}return be(async()=>{I.userId&&(o.userId=I.userId,i.userId=I.userId),await _(o)}),(a,e)=>{const d=Ie,c=Ve,y=Se,U=De,se=Pe,ce=Ue,ue=ze,H=Ae,de=Te,k=Ke,pe=Me,me=Ze,L=Fe,_e=Be,he=Oe;return u(),z(Ne,null,[l(s)==1?(u(),z("div",K,[v("div",M,[t(y,{modelValue:l(o).mobile,"onUpdate:modelValue":e[0]||(e[0]=r=>l(o).mobile=r),placeholder:"\u7528\u6237\u624B\u673A\u53F7",clearable:"",onKeyup:w(g,["enter"])},{suffix:n(()=>[t(d,{class:"mr-5px",icon:"ep:search",onClick:g,style:{cursor:"pointer"}})]),append:n(()=>[t(c,{icon:l(X),onClick:F},null,8,["icon"])]),_:1},8,["modelValue"])])])):(u(),z("div",O,[v("div",R,[t(y,{modelValue:l(i).mobile,"onUpdate:modelValue":e[1]||(e[1]=r=>l(i).mobile=r),placeholder:"\u7528\u6237\u624B\u673A\u53F7",clearable:"",onKeyup:w(S,["enter"])},{suffix:n(()=>[t(d,{class:"mr-5px",icon:"ep:search",onClick:S,style:{cursor:"pointer"}})]),append:n(()=>[t(c,{icon:l(X),onClick:F},null,8,["icon"])]),_:1},8,["modelValue"])])])),Y(v("div",{class:"searchMore",style:Ce({width:l(le)?"88.7%":"96%"})},[t(ue,{class:"-mb-15px",model:l(o),ref_key:"queryFormRef",ref:ne,inline:!0,"label-width":"108px"},{default:n(()=>[l(s)==1?(u(),m(U,{key:0,label:"\u7528\u6237\u6635\u79F0",prop:"name"},{default:n(()=>[t(y,{modelValue:l(o).nickName,"onUpdate:modelValue":e[2]||(e[2]=r=>l(o).nickName=r),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",clearable:"",onKeyup:w(g,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})):(u(),m(U,{key:1,label:"\u7528\u6237\u6635\u79F0",prop:"mobile"},{default:n(()=>[t(y,{modelValue:l(i).nickName,"onUpdate:modelValue":e[3]||(e[3]=r=>l(i).nickName=r),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u6635\u79F0",clearable:"",onKeyup:w(g,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})),t(ce,null,{default:n(()=>[t(se,null,{default:n(()=>[t(U,null,{default:n(()=>[t(c,{onClick:V},{default:n(()=>[b(" \u6536\u8D77 ")]),_:1}),l(s)==1?(u(),m(c,{key:0,onClick:g},{default:n(()=>[t(d,{icon:"ep:search",class:"mr-5px"}),b(" \u641C\u7D22 ")]),_:1})):(u(),m(c,{key:1,onClick:S},{default:n(()=>[t(d,{icon:"ep:search",class:"mr-5px"}),b(" \u641C\u7D22 ")]),_:1})),l(s)==1?(u(),m(c,{key:2,onClick:re},{default:n(()=>[t(d,{icon:"ep:refresh",class:"mr-5px"}),b(" \u91CD\u7F6E ")]),_:1})):N("",!0),l(s)==2?(u(),m(c,{key:3,onClick:oe},{default:n(()=>[t(d,{icon:"ep:refresh",class:"mr-5px"}),b(" \u91CD\u7F6E ")]),_:1})):N("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],4),[[xe,l(x)]]),t(de,{modelValue:l(s),"onUpdate:modelValue":e[4]||(e[4]=r=>we(s)?s.value=r:null),onTabClick:te,class:"parent-tabs"},{default:n(()=>[t(H,{label:"\u5217\u8868\u6A21\u5F0F",name:1}),t(H,{label:"\u6811\u72B6\u56FE",name:2})]),_:1},8,["modelValue"]),l(s)==1?(u(),m(L,{key:2,style:{"margin-top":"10px",padding:"10px"}},{default:n(()=>[Y((u(),m(pe,{data:l(W),stripe:!0,"show-overflow-tooltip":!0},{default:n(()=>[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=>[v("span",{onClick:fe=>q(1,r.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},A(r.row.descendantCount),9,$)]),_:1}),t(k,{label:"\u540E\u4EE3\u5217\u8868",align:"center",prop:"childrenCount"},{default:n(r=>[v("span",{onClick:fe=>q(2,r.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},A(r.row.childrenCount),9,B)]),_:1})]),_:1},8,["data"])),[[he,l(C)]]),t(me,{total:l(Z),page:l(o).pageNo,"onUpdate:page":e[5]||(e[5]=r=>l(o).pageNo=r),limit:l(o).pageSize,"onUpdate:limit":e[6]||(e[6]=r=>l(o).pageSize=r),onPagination:e[7]||(e[7]=r=>_(l(o)))},null,8,["total","page","limit"])]),_:1})):N("",!0),l(s)==2?(u(),m(L,{key:3,style:{"margin-top":"10px",padding:"10px"}},{default:n(()=>[v("div",E,A(l(h)),1),t(_e,{height:650,onChartInit:ie,options:l(f)},null,8,["options"])]),_:1})):N("",!0),t(qe,{ref_key:"formRef",ref:j,onSuccess:_},null,512)],64)}}}),[["__scopeId","data-v-20dfdeaa"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/sharepath/index.vue"]])});export{la as __tla,J as default};
|