1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-da71bec6"],{"6e15":function(t,n,e){"use strict";e.r(n);var i,a=function(){var t=this,n=t.$createElement,i=t._self._c||n;return i("div",{staticClass:"address-warpper"},[i("p",{staticClass:"pt-12 w-11/12 mx-auto font-bold text-center",staticStyle:{padding:"10px 0"}},[t._v(" 通讯录 ")]),i("div",{staticClass:"menu"},[i("span",{on:{click:function(n){return t.updateDeptPath(-1)}}},[t._v("通讯录")]),t._l(t.deptpath,(function(n,e){return i("span",{key:e},[i("van-icon",{attrs:{name:"arrow"}}),i("span",{on:{click:function(n){return t.updateDeptPath(e)}}},[t._v(t._s(n.name))])],1)}))],2),i("div",{staticClass:"address-box"},[i("van-index-bar",{attrs:{"index-list":(t.deptchild&&0!=t.deptchild.length?["部"]:[]).concat(t.admins.map((function(n){return t.pinyinFirst(n.username)[0]})).filter((function(t,n,e){return e.indexOf(t,0)===n})).sort())}},[t.deptchild&&0!=t.deptchild.length?i("van-index-anchor",{staticStyle:{"background-color":"rgba(244, 244, 244, 100)"},attrs:{index:"部"}},[t._v(" 部门 ")]):t._e(),i("van-cell-group",t._l(t.deptchild,(function(n,a){return i("van-cell",{key:a,staticClass:"dept-cell",attrs:{size:"large",icon:e("ed4c"),"is-link":""},on:{click:function(e){return t.inDept(n)}},scopedSlots:t._u([{key:"title",fn:function(){return[i("span",{staticStyle:{"margin-left":"6px","line-height":"40px"}},[t._v(t._s(n.name))])]},proxy:!0},{key:"icon",fn:function(){return[i("van-image",{attrs:{src:e("ed4c"),width:"40px",height:"40px"}})]},proxy:!0}],null,!0)})})),1),t._l(t.admins.map((function(n){return t.pinyinFirst(n.username)[0]})).filter((function(t,n,e){return e.indexOf(t,0)===n})).sort(),(function(n,e){return[i("van-cell-group",{key:e},[i("van-index-anchor",{staticStyle:{"background-color":"rgba(244, 244, 244, 100)"},attrs:{index:n}}),t._l(t.admins.filter((function(e){return t.pinyinFirst(e.username)[0]===n})),(function(n,e){return i("van-cell",{key:e,staticClass:"dept-cell",attrs:{title:n.username},scopedSlots:t._u([{key:"title",fn:function(){return[i("span",{staticStyle:{"margin-left":"6px","line-height":"40px"}},[t._v(t._s(n.username))])]},proxy:!0},{key:"icon",fn:function(){return[i("van-image",{attrs:{src:n.headimgurl?n.headimgurl:"https://image.nczyzs.com/zhiyuan-logo.png",width:"35px",height:"35px"}})]},proxy:!0}],null,!0)},[[i("span",[t._v(t._s(n.phone)+" "),n.phone?i("a",{attrs:{href:"tel:"+n.phone}},[i("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1):t._e()])]],2)}))],2)]}))],2)],1)])},s=[],o=e("d696"),d=(e("8af3"),e("2fc4")),c=(e("2a09"),e("0f27")),r=(e("c510"),e("da1a")),l=e("6923"),u={components:(i={},Object(o["a"])(i,c["a"].name,c["a"]),Object(o["a"])(i,d["a"].name,d["a"]),i),name:"Address",data:function(){return{depts:[],deptpath:[],deptnow:{},deptchild:[],admins:[]}},mounted:function(){this.loadDepts()},created:function(){console.log("created")},activated:function(){console.log("activated")},deactivated:function(){console.log("deactivated")},methods:{pinyinFirst:l["a"],loadDepts:function(){var t=this;this.$store.commit("loading/showLoading"),Object(r["l"])({tree:1}).then((function(n){t.$store.commit("loading/hideLoading"),t.depts=n.data,t.updateDeptPath(-1)})).catch((function(){t.$store.commit("loading/hideLoading")}))},updateDeptPath:function(t){t<0?(this.deptpath=[],this.deptnow={},this.deptchild=this.depts):(this.deptnow=this.deptpath[t],this.deptchild=this.deptnow.children,this.deptpath=this.deptpath.slice(0,t+1)),-1!=t||this.$store.getters.userinfo.dept_id?this.loadAdmins():this.admins=[]},inDept:function(t){this.deptpath.push(t),this.deptnow=t,this.deptchild=t.children,this.loadAdmins()},loadAdmins:function(){var t=this;this.$store.commit("loading/showLoading"),Object(r["k"])({dept_id:this.deptnow.id?this.deptnow.id:this.$store.getters.userinfo.dept_id,state:1}).then((function(n){t.$store.commit("loading/hideLoading"),t.admins=n.data.list})).catch((function(){t.$store.commit("loading/hideLoading")}))}}},p=u,h=(e("8b24"),e("cba8")),f=Object(h["a"])(p,a,s,!1,null,"6b8884c4",null);n["default"]=f.exports},"8b24":function(t,n,e){"use strict";e("feda")},ed4c:function(t,n){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAAz1BMVEXw8vQAAACJr+Pv8fT////w8vT////y9fXz8/Pw8vTx8/Ty8vbw8vTy8vLr7/OLsOPu8vXy8vT29vbw8vXw8vT////4+Pjx8vXw8vTv8fPx8/Xw8/Xt8POlwefw9PXx8vXk6vLu8PSgvubp7fLT3u/c5fHO3O6RtOTY4vDD1OyUtuWPs+Ti6fKpw+iiv+fh6PHL2u7b5PCTtuS1y+re5vHI1+2WuOXx9PXl6/Ly9PWYueW90OuyyurG1u2sxumOsuS3zeqdu+awx+m/0uy6zus9STjlAAAARXRSTlP/AP//ArcBTyuJ6Dr3FP//TGEbrO4JIrD78fj2//+dy///////////////////////////////yv+d//////////////+yB9ymAAABvUlEQVR4nI2U13aDMAyGFRsySAMZzSIhk2yy92xG3/+ZaoORoU3PQVeAP6Rfw4IYmlIs5Rp7zTS1fSNXKiryBCElnyhXAa1aTuQR86FMVq1IhFtFzWZCUDyZ+gwj3D5TybiElHSh9pcBqBXSbkgOxdPqxzsG4ENNc18cShb+YRhVSHpQJvU2loiYYuohpmQDmrsbh/5Sn1UYlFf9d+rcB4TsFu0QpeZjoCSwPvMp4Wac60GoklCgWPbf9JfLEDK2Q67KRShhL1odARlroL0WaquWIId/zFcCIlOA73UXD3JwxGfn5Hu6QfsysdFVA5oy/aeAJiOYW+SMSTZBQ4jaYw+aHeh2RdaYowamTKO+2HGm49Ahy2GEnswgRPX+wyBWr96zDDLe4HczEE7vzwxXt2UfttZCVlSTwvUR64lnq1FXb0loz/ITsa5fPsP6d9WHfaQaWMwlltIVP9QvW1lM0RZ6CzLEeOn909BjWFtEg1soSHTG6Q4srwiswWJU7IAiN94GHpMlP+GjIoauNwlDzwPcZy7Eh84fXxo2zN8b30gXIdqVinY5I13zaAsj2uqJuMTEOjw2+TpsHsPr8AdPJCYPID7z0QAAAABJRU5ErkJggg=="},feda:function(t,n,e){}}]);
|