index-7d774f66.js 8.5 KB

1
  1. import{d as we,Y as Ce,K as Q,r as m,c8 as Ie,c9 as Ne,h as Ve,e as ee,l as Se,o as u,c as R,a as l,g as _,f as t,w as n,dF as ae,R as N,x as le,a4 as De,au as Pe,v as p,n as x,P as w,O as ze,t as T,F as Ue,j as Re,C as Te,V as Ke,A as Ae,E as Fe,i as Me,D as Oe,W as $e,X as je,G as qe,H as Be,I as Ee,_ as Ge,__tla as He}from"./index-00b1998d.js";import{_ as Le,__tla as We}from"./Echart-60d8c43f.js";import{_ as Xe,__tla as Ye}from"./ContentWrap-31b34b9c.js";import{_ as Ze,__tla as Je}from"./index-0fc7c908.js";import{D as Qe,S as K,__tla as ea}from"./Descendants-a61279d6.js";import{D as aa,__tla as la}from"./index-f8911e57.js";import{u as ta,__tla as ra}from"./useMessage-437e6444.js";import{__tla as na}from"./ContentWrap.vue_vue_type_script_setup_true_lang-d8a41a7a.js";import{__tla as oa}from"./el-card-fa7e872f.js";import{__tla as ia}from"./index-1e69ec9e.js";import{__tla as sa}from"./Dialog-5ff7ce4c.js";let te,ca=Promise.all([(()=>{try{return He}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Je}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return sa}catch{}})()]).then(async()=>{let A,F,M,O,$,j,q,B,E;A={key:0,class:"search-one"},F={style:{"text-align":"right"},class:"search-input"},M={key:1,class:"search-one"},O={style:{"text-align":"right"},class:"search-input"},$={style:{width:"100%",position:"relative"}},j=["src"],q=["onClick"],B=["onClick"],E={style:{display:"none"}},te=Ge(we({name:"SharePath",__name:"index",props:{userId:{type:Number,default:0}},setup(re){const ne=Ce(),oe=Q(()=>ne.getMobile),C=m(!1),v=re,{wsCache:ie}=Ie(),V=ie.get(Ne.USER),se=Q(()=>V.user.id===1);console.log(V.user.nickname&&V.user.id);const G=()=>{C.value=!C.value},S=()=>{C.value=!1},s=m(1),ce=a=>{s.value=a.paneName,s.value==1?h(i):(o.userId=v.userId||1,h(o))};ta(),Ve();const I=m(!0),H=m([]);let f=m([]);const L=m(0),i=ee({pageNo:1,pageSize:10,mobile:void 0,nickName:void 0}),de=m(),o=ee({userId:1,nickName:void 0,mobile:void 0,maxDepth:50}),h=async a=>{if(I.value=!0,s.value==1)try{const e=await aa.getDuserPage(a);H.value=e.list,L.value=e.total}finally{I.value=!1}else if(s.value==2)try{const e=await K.getSharePathPageTree(a);f.value=[P(e)],y.series[0].data=f.value,y={...y}}finally{I.value=!1}},W=m(),X=async(a,e)=>{W.value.open(a,e.userId,e.childrenCount)},k=()=>{i.pageNo=1,h(i)},D=()=>{if(!o.nickName&&!o.mobile)return h(o),!1;(async a=>{a.userId=void 0,a.maxDepth=5;const e=await K.getTreeByNameOrMobile(a);f.value=[P(e)],y.series[0].data=f.value,y={...y}})(o)},ue=()=>{i.mobile=void 0,i.nickName=void 0,k(),S()},pe=()=>{o.userId=v.userId||1,o.nickName=void 0,o.mobile=void 0,h(o),S()};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:100},leaves:{label:{position:"bottom",verticalAlign:"middle",align:"center",fontSize:14}},animationDurationUpdate:750,symbolSize:3}]};const P=a=>(a.name===null&&(a.name="\u672A\u547D\u540D\u8282\u70B9"),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=m(null),me=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 K.getSharePathPageTree(o);if(d&&d.children.length>0){const g=Y(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 Y(a,e){if(a.userId===e)return a;if(a.children&&a.children.length>0)for(let c of a.children){const d=Y(c,e);if(d)return d}return null}return Se(async()=>{v.userId&&(console.log("props.userId",v.userId),i.userId=v.userId,o.userId=v.userId),console.log("treeParams",o),await h(i)}),(a,e)=>{const c=Re,d=Te,g=Ke,U=Ae,_e=Fe,he=Me,fe=Oe,Z=$e,ye=je,b=qe,ge=Be,ve=Ze,J=Xe,ke=Le,be=Ee;return u(),R(Ue,null,[l(s)==1?(u(),R("div",A,[_("div",F,[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:N(k,["enter"])},{suffix:n(()=>[t(c,{class:"mr-5px",icon:"ep:search",onClick:k,style:{cursor:"pointer"}})]),append:n(()=>[t(d,{icon:l(ae),onClick:G},null,8,["icon"])]),_:1},8,["modelValue"])])])):(u(),R("div",M,[_("div",O,[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:N(D,["enter"])},{suffix:n(()=>[t(c,{class:"mr-5px",icon:"ep:search",onClick:D,style:{cursor:"pointer"}})]),append:n(()=>[t(d,{icon:l(ae),onClick:G},null,8,["icon"])]),_:1},8,["modelValue"])])])),_("div",$,[le(_("div",{class:"searchMore",style:Pe({width:l(oe)?"88.7%":"96%"})},[t(fe,{class:"-mb-15px",model:l(i),ref_key:"queryFormRef",ref:de,inline:!0,"label-width":"108px"},{default:n(()=>[l(s)==1?(u(),p(U,{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:N(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})):(u(),p(U,{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:N(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1})),t(he,null,{default:n(()=>[t(_e,null,{default:n(()=>[t(U,null,{default:n(()=>[t(d,{onClick:S},{default:n(()=>[x(" \u6536\u8D77 ")]),_:1}),l(s)==1?(u(),p(d,{key:0,onClick:k},{default:n(()=>[t(c,{icon:"ep:search",class:"mr-5px"}),x(" \u641C\u7D22 ")]),_:1})):(u(),p(d,{key:1,onClick:D},{default:n(()=>[t(c,{icon:"ep:search",class:"mr-5px"}),x(" \u641C\u7D22 ")]),_:1})),l(s)==1?(u(),p(d,{key:2,onClick:ue},{default:n(()=>[t(c,{icon:"ep:refresh",class:"mr-5px"}),x(" \u91CD\u7F6E ")]),_:1})):w("",!0),l(s)==2?(u(),p(d,{key:3,onClick:pe},{default:n(()=>[t(c,{icon:"ep:refresh",class:"mr-5px"}),x(" \u91CD\u7F6E ")]),_:1})):w("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],4),[[De,l(C)]])]),l(se)?(u(),p(ye,{key:2,modelValue:l(s),"onUpdate:modelValue":e[4]||(e[4]=r=>ze(s)?s.value=r:null),onTabClick:ce,class:"parent-tabs"},{default:n(()=>[t(Z,{label:"\u5217\u8868\u6A21\u5F0F",name:1}),t(Z,{label:"\u6811\u72B6\u56FE",name:2})]),_:1},8,["modelValue"])):w("",!0),l(s)==1?(u(),p(J,{key:3,style:{"margin-top":"10px",padding:"10px"}},{default:n(()=>[le((u(),p(ge,{data:l(H),stripe:!0,"show-overflow-tooltip":!0},{default:n(()=>[t(b,{label:"\u5934\u50CF",align:"center",prop:"ancName"},{default:n(r=>[_("span",null,[_("img",{src:r.row.avatar,style:{width:"50px",height:"50px","border-radius":"50%",border:"1px solid rgb(220, 223, 231)"}},null,8,j)])]),_:1}),t(b,{label:"\u7528\u6237\u6635\u79F0",align:"center",prop:"nickName"}),t(b,{label:"\u7528\u6237\u624B\u673A\u53F7",align:"center",prop:"mobile"}),t(b,{label:"\u63A8\u8350\u4EBA\u59D3\u540D",align:"center",prop:"ancNickName"}),t(b,{label:"\u76F4\u63A8\u4EBA\u5217\u8868",align:"center",prop:"descendantCount"},{default:n(r=>[_("span",{onClick:xe=>X(1,r.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},T(r.row.descendantCount),9,q)]),_:1}),t(b,{label:"\u540E\u4EE3\u5217\u8868",align:"center",prop:"childrenCount"},{default:n(r=>[_("span",{onClick:xe=>X(2,r.row),style:{cursor:"pointer",display:"inline-block",width:"100%"}},T(r.row.childrenCount),9,B)]),_:1})]),_:1},8,["data"])),[[be,l(I)]]),t(ve,{total:l(L),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=>h(l(i)))},null,8,["total","page","limit"])]),_:1})):w("",!0),l(s)==2?(u(),p(J,{key:4,style:{"margin-top":"10px",padding:"10px"}},{default:n(()=>[_("div",E,T(l(f)),1),t(ke,{height:650,onChartInit:me,options:l(y)},null,8,["options"])]),_:1})):w("",!0),t(Qe,{ref_key:"formRef",ref:W,onSuccess:h},null,512)],64)}}}),[["__scopeId","data-v-20dfdeaa"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/sharepath/index.vue"]])});export{ca as __tla,te as default};