webpackJsonp([11],{Eg0l:function(t,e,i){"use strict";var n={name:"share",model:{prop:"share_data",event:"share_data_update"},props:{share_data:{type:Object},isShowQQ:{type:Boolean,default:!1}},data:function(){return{data:{},plus:{},shares:[]}},created:function(){var t=this;if(window.plus){t.plus=plus;try{plus.share.getServices(function(e){t.shares=e},function(t){alert("获取分享服务列表失败:"+t.message)})}catch(t){return!1}}},methods:{a:function(){this.$emit("successFx",!0)},query_share:function(t,e){var i=this;if(this.$emit("share",{type:e}),"qq"==t.id){var n=i.share_data.href;try{t.send({content:i.share_data.content,title:i.share_data.title,href:n,thumbs:this.share_data.thumbs,extra:{scene:e}},function(t){i.$emit("successFx",!0)},function(t){})}catch(t){return!1}}if("weixin"==t.id){var s=i.share_data.href;try{t.send({content:i.share_data.content,title:i.share_data.title,href:s,thumbs:this.share_data.thumbs,type:this.share_data.type,extra:{scene:e}},function(t){i.$emit("successFx",!0)},function(t){})}catch(t){return!1}}}}},s={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"shareBox"},[i("div",[i("h4",{on:{click:function(e){return t.a()}}},[t._v("分享到")]),t._v(" "),i("van-grid",{attrs:{square:"",border:!1}},[t._l(t.shares,function(e,n){return"weixin"==e.id?i("van-grid-item",{key:n,attrs:{icon:"photo-o",text:"微信朋友"},on:{click:function(i){return t.query_share(e,"WXSceneSession")}}},[i("icon",{attrs:{slot:"icon",name:"weixin"},slot:"icon"})],1):t._e()}),t._v(" "),t._l(t.shares,function(e,n){return"weixin"==e.id?i("van-grid-item",{key:n+1,attrs:{icon:"photo-o",text:"微信朋友圈"},on:{click:function(i){return t.query_share(e,"WXSceneTimeline")}}},[i("icon",{attrs:{slot:"icon",name:"pyq"},slot:"icon"})],1):t._e()}),t._v(" "),t._l(t.shares,function(e,n){return"qq"==e.id&&t.isShowQQ?i("van-grid-item",{key:n+1,attrs:{icon:"photo-o",text:"QQ"},on:{click:function(i){return t.query_share(e,"WXSceneTimeline")}}},[i("icon",{attrs:{slot:"icon",name:"qq"},slot:"icon"})],1):t._e()})],2)],1)])},staticRenderFns:[]};var o=i("VU/8")(n,s,!1,function(t){i("I3KH")},"data-v-0d36b2fa",null);e.a=o.exports},I3KH:function(t,e){},Mnta:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i("4yKu");var n=i("wolx"),s=(i("3ab0"),i("bHMa")),o=(i("nsZj"),i("tAII"),i("o69Z")),a=i("vQ9b"),r=i("RP/J"),l=i("JOBW"),c=i("vwLT"),h=i("1SJR"),u=i("5Fm4");var d=Object(o.b)("index-bar"),p=d[0],_=d[1],f=p({mixins:[c.a,Object(h.b)("vanIndexBar"),Object(u.a)(function(t){this.scroller||(this.scroller=Object(l.d)(this.$el)),t(this.scroller,"scroll",this.onScroll)})],props:{zIndex:[Number,String],highlightColor:String,sticky:{type:Boolean,default:!0},stickyOffsetTop:{type:Number,default:0},indexList:{type:Array,default:function(){for(var t=[],e="A".charCodeAt(0),i=0;i<26;i++)t.push(String.fromCharCode(e+i));return t}}},data:function(){return{activeAnchorIndex:null}},computed:{sidebarStyle:function(){if(Object(o.e)(this.zIndex))return{zIndex:this.zIndex+1}},highlightStyle:function(){var t=this.highlightColor;if(t)return{color:t}}},watch:{indexList:function(){this.$nextTick(this.onScroll)},activeAnchorIndex:function(t){t&&this.$emit("change",t)}},methods:{onScroll:function(){var t=this;if(!Object(a.a)(this.$el)){var e=Object(l.c)(this.scroller),i=this.getScrollerRect(),n=this.children.map(function(e){return e.getRect(t.scroller,i)}),s=this.getActiveAnchorIndex(e,n);this.activeAnchorIndex=this.indexList[s],this.sticky&&this.children.forEach(function(o,a){if(a===s||a===s-1){var r=o.$el.getBoundingClientRect();o.left=r.left,o.width=r.width}else o.left=null,o.width=null;if(a===s)o.active=!0,o.top=Math.max(t.stickyOffsetTop,n[a].top-e)+i.top;else if(a===s-1){var l=n[s].top-e;o.active=l>0,o.top=l+i.top-n[a].height}else o.active=!1})}},getScrollerRect:function(){return this.scroller.getBoundingClientRect?this.scroller.getBoundingClientRect():{top:0,left:0}},getActiveAnchorIndex:function(t,e){for(var i=this.children.length-1;i>=0;i--){var n=i>0?e[i-1].height:0;if(t+(this.sticky?n+this.stickyOffsetTop:0)>=e[i].top)return i}return-1},onClick:function(t){this.scrollToElement(t.target)},onTouchMove:function(t){if(this.touchMove(t),"vertical"===this.direction){Object(r.c)(t);var e=t.touches[0],i=e.clientX,n=e.clientY,s=document.elementFromPoint(i,n);if(s){var o=s.dataset.index;this.touchActiveIndex!==o&&(this.touchActiveIndex=o,this.scrollToElement(s))}}},scrollTo:function(t){var e=this.children.filter(function(e){return String(e.index)===t});e[0]&&(e[0].scrollIntoView(),this.sticky&&this.stickyOffsetTop&&Object(l.g)(Object(l.b)()-this.stickyOffsetTop),this.$emit("select",e[0].index))},scrollToElement:function(t){var e=t.dataset.index;this.scrollTo(e)},onTouchEnd:function(){this.active=null}},render:function(){var t=this,e=arguments[0],i=this.indexList.map(function(i){var n=i===t.activeAnchorIndex;return e("span",{class:_("index",{active:n}),style:n?t.highlightStyle:null,attrs:{"data-index":i}},[i])});return e("div",{class:_()},[e("div",{class:_("sidebar"),style:this.sidebarStyle,on:{click:this.onClick,touchstart:this.touchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[i]),this.slots("default")])}}),m=(i("gJIh"),i("V+2B")),g=Object(o.b)("index-anchor"),v=g[0],w=g[1],y=v({mixins:[Object(h.a)("vanIndexBar",{indexKey:"childrenIndex"})],props:{index:[Number,String]},data:function(){return{top:0,left:null,rect:{top:0,height:0},width:null,active:!1}},computed:{sticky:function(){return this.active&&this.parent.sticky},anchorStyle:function(){if(this.sticky)return{zIndex:""+this.parent.zIndex,left:this.left?this.left+"px":null,width:this.width?this.width+"px":null,transform:"translate3d(0, "+this.top+"px, 0)",color:this.parent.highlightColor}}},mounted:function(){var t=this.$el.getBoundingClientRect();this.rect.height=t.height},methods:{scrollIntoView:function(){this.$el.scrollIntoView()},getRect:function(t,e){var i=this.$el.getBoundingClientRect();return this.rect.height=i.height,t===window||t===document.body?this.rect.top=i.top+Object(l.b)():this.rect.top=i.top+Object(l.c)(t)-e.top,this.rect}},render:function(){var t,e=arguments[0],i=this.sticky;return e("div",{style:{height:i?this.rect.height+"px":null}},[e("div",{style:this.anchorStyle,class:[w({sticky:i}),(t={},t[m.b]=i,t)]},[this.slots("default")||this.index])])}}),x=(i("nsOR"),i("WMi1")),b=(i("iQ6B"),i("H6W6")),C=(i("n90r"),i("dJne")),k=(i("PEgo"),i("HNZ3")),B=(i("ssJA"),i("prsZ")),S=i("dOd5"),L=i("TIfe"),E=i("Eg0l"),A=i("mvHQ"),T=i.n(A),D={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8};function M(t){this.mode=D.MODE_8BIT_BYTE,this.data=t}M.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e>>7-t%8&1)},put:function(t,e){for(var i=0;i>>e-i-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};for(var N=R,q={glog:function(t){if(t<1)throw new Error("glog("+t+")");return q.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return q.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},j=0;j<8;j++)q.EXP_TABLE[j]=1<=0;)e^=Y.G15<=0;)e^=Y.G18<>>=1;return e},getPatternPosition:function(t){return Y.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,i){switch(t){case F:return(e+i)%2==0;case W:return e%2==0;case K:return i%3==0;case X:return(e+i)%3==0;case G:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case Q:return e*i%2+e*i%3==0;case J:return(e*i%2+e*i%3)%2==0;case V:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new z([1],0),i=0;i5&&(i+=3+o-5)}for(n=0;n=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=tt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},et.setupPositionProbePattern=function(t,e){for(var i=-1;i<=7;i++)if(!(t+i<=-1||this.moduleCount<=t+i))for(var n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+i][e+n]=0<=i&&i<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==i||6==i)||2<=i&&i<=4&&2<=n&&n<=4)},et.getBestMaskPattern=function(){for(var t=0,e=0,i=0;i<8;i++){this.makeImpl(!0,i);var n=Z.getLostPoint(this);(0==i||t>n)&&(t=n,e=i)}return e},et.createMovieClip=function(t,e,i){var n=t.createEmptyMovieClip(e,i);this.make();for(var s=0;s>i&1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=n}for(i=0;i<18;i++){n=!t&&1==(e>>i&1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=n}},et.setupTypeInfo=function(t,e){for(var i=this.errorCorrectLevel<<3|e,n=Z.getBCHTypeInfo(i),s=0;s<15;s++){var o=!t&&1==(n>>s&1);s<6?this.modules[s][8]=o:s<8?this.modules[s+1][8]=o:this.modules[this.moduleCount-15+s][8]=o}for(s=0;s<15;s++){o=!t&&1==(n>>s&1);s<8?this.modules[8][this.moduleCount-s-1]=o:s<9?this.modules[8][15-s-1+1]=o:this.modules[8][15-s-1]=o}this.modules[this.moduleCount-8][8]=!t},et.mapData=function(t,e){for(var i=-1,n=this.moduleCount-1,s=7,o=0,a=this.moduleCount-1;a>0;a-=2)for(6==a&&a--;;){for(var r=0;r<2;r++)if(null==this.modules[n][a-r]){var l=!1;o>>s&1)),Z.getMask(e,n,a-r)&&(l=!l),this.modules[n][a-r]=l,-1==--s&&(o++,s=7)}if((n+=i)<0||this.moduleCount<=n){n-=i,i=-i;break}}},tt.PAD0=236,tt.PAD1=17,tt.createData=function(t,e,i){for(var n=P.getRSBlocks(t,e),s=new N,o=0;o8*r)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*r+")");for(s.getLengthInBits()+4<=8*r&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*r||(s.put(tt.PAD0,8),s.getLengthInBits()>=8*r));)s.put(tt.PAD1,8);return tt.createBytes(s,n)},tt.createBytes=function(t,e){for(var i=0,n=0,s=0,o=new Array(e.length),a=new Array(e.length),r=0;r=0?d.get(p):0}}var _=0;for(h=0;h-1}},background:{type:String,default:"#fff"},foreground:{type:String,default:"#000"},renderAs:{type:String,required:!1,default:"canvas",validator:function(t){return["canvas","svg"].indexOf(t)>-1}}},data:function(){return{numCells:0,fgPath:""}},updated:function(){this.render()},mounted:function(){this.render()},methods:{render:function(){var t=this.value,e=this.size,i=this.level,n=this.background,s=this.foreground,o=this.renderAs,a=e>>>0,r=new it(-1,O[i]);r.addData(function(t){for(var e="",i=0;i>6),e+=String.fromCharCode(128|63&n)):n<55296||n>=57344?(e+=String.fromCharCode(224|n>>12),e+=String.fromCharCode(128|n>>6&63),e+=String.fromCharCode(128|63&n)):(i++,n=65536+((1023&n)<<10|1023&t.charCodeAt(i)),e+=String.fromCharCode(240|n>>18),e+=String.fromCharCode(128|n>>12&63),e+=String.fromCharCode(128|n>>6&63),e+=String.fromCharCode(128|63&n))}return e}(t)),r.make();var l=r.modules,c=a/l.length,h=a/l.length,u=window.devicePixelRatio||1;if("svg"===o)this.numCells=l.length,this.fgPath=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=[];return t.forEach(function(t,n){var s=null;t.forEach(function(o,a){if(!o&&null!==s)return i.push("M".concat(s+e," ").concat(n+e,"h").concat(a-s,"v1H").concat(s+e,"z")),void(s=null);if(a!==t.length-1)o&&null===s&&(s=a);else{if(!o)return;null===s?i.push("M".concat(a+e,",").concat(n+e," h1v1H").concat(a+e,"z")):i.push("M".concat(s+e,",").concat(n+e," h").concat(a+1-s,"v1H").concat(s+e,"z"))}})}),i.join("")}(l);else{var d=this.$refs["qrcode-vue"],p=d.getContext("2d");d.height=d.width=a*u,p.scale(u,u),l.forEach(function(t,e){t.forEach(function(t,i){p.fillStyle=t?s:n;var o=Math.ceil((i+1)*c)-Math.floor(i*c),a=Math.ceil((e+1)*h)-Math.floor(e*h);p.fillRect(Math.round(i*c),Math.round(e*h),o,a)})})}}},render:function(t){var e=this.className,i=this.value,n=this.level,s=this.background,o=this.foreground,a=this.size,r=this.renderAs,l=this.numCells,c=this.fgPath;return t("div",{class:this.class||e,attrs:{value:i,level:n,background:s,foreground:o}},["svg"===r?t("svg",{attrs:{height:a,width:a,shapeRendering:"crispEdges",viewBox:"0 0 ".concat(l," ").concat(l)},style:{width:a+"px",height:a+"px"}},[t("path",{attrs:{fill:s,d:"M0,0 h".concat(l,"v").concat(l,"H0z")}}),t("path",{attrs:{fill:o,d:c}})]):t("canvas",{attrs:{height:a,width:a},style:{width:a+"px",height:a+"px"},ref:"qrcode-vue"},[])])}},st={props:{show:{type:Boolean,default:!1},logo:{type:String,default:"static/images/default_company_logo.png"}},name:"share",data:function(){return{close_show:!0,qr:"",company_info:this.$userInfo().company_info,user_info:this.$userInfo(),shares:[],iShare:!1,isApple:!0,newshow:!1,url:"",logo_url:"",no_radius:!1}},components:{QrcodeVue:nt},watch:{show:function(t){this.newshow=t}},created:function(){var t=this;window.plus&&window.plus.share.getServices(function(e){t.shares=e},function(t){alert("获取分享服务列表失败:"+t.message)}),t.$nextTick(function(){t.get_shares_url(),t.create_img_com()})},methods:{create_img_com:function(){var t=this,e=document.querySelectorAll(".qrcode_box canvas").item(0);null==e?setTimeout(function(){t.create_img_com()},100):this.qr=e.toDataURL("image/png",1)},get_shares_url:function(){this.url="https://new.gdy.g107.com/m/#/invite_reg?site_id="+this.user_info.site_id+"&employee_id="+this.user_info.id+"&company_name="+this.company_info.name+"&employee_name="+this.user_info.name+"&company_logo_url="+this.company_info.logo_url},createObjectURL:function(t){return window.URL?window.URL.createObjectURL(t):window.webkitURL.createObjectURL(t)},getImage:function(t){if(!t)return!1;var e=this;this.$axiosUser("get",t,{responseType:"blob"}).then(function(t){e.logo_url=e.createObjectURL(t.data)})},share_img:function(){var t=this;t.create_img(t.$refs.sharebox,function(e){t.query_share(t.shares,e)})},download_img:function(){var t=this;setTimeout(function(){t.create_img(t.$refs.sharebox,function(e){window.plus&&window.plus.gallery.save(e,function(){t.$toast({message:"图片已保存到相册",icon:"certificate"})},function(e){t.$toast.fail("图片保存失败")})})},200)},create_img:function(t,e){"Android"==window.plus.os.name?this.create_img_android(t,e):this.create_img_ios(t,e)},create_img_ios:function(t,e){var i=this;i.close_show=!1,i.$nextTick(function(){setTimeout(function(){var n=t.getBoundingClientRect(),s=t.offsetHeight,o=t.offsetWidth,a=plus.webview.currentWebview(),r=new plus.nativeObj.Bitmap("qrcode");a.draw(r,function(){var t=r.toBase64Data(),n=new plus.nativeObj.Bitmap("bitblmap");n.loadBase64Data(t,function(){n.save("_doc/canvas_share.jpg",{overwrite:!0},function(t){i.close_show=!0,e("_doc/canvas_share.jpg")},function(){i.close_show=!0,i.$toast("图片保存失败")})},function(){i.close_show=!0,i.$toast("图片保存失败")})},function(t){i.close_show=!0,console.log("截屏绘制图片失败:"+T()(t))},{clip:{top:n.top+0+"px",left:n.left+0+"px",height:s+"px",width:o+"px"}})},200)})},create_img_android:function(t,e){document.body.style.width="100%";var i=this;i.close_show=!1,i.$nextTick(function(){setTimeout(function(){var n=t.getBoundingClientRect(),s=t.offsetHeight,o=t.offsetWidth,a=window.innerHeight,r=window.innerWidth,l=Math.ceil(n.top/a*100)+"%",c=Math.ceil(n.left/r*100)+"%",h=Math.floor(o/r*100)-1+"%",u=Math.floor(s/a*100)-1+"%",d=plus.webview.currentWebview(),p=new plus.nativeObj.Bitmap("qrcode");d.draw(p,function(){p.save("_doc/canvas_share.jpg",{clip:{top:l,left:c,width:h,height:u},overwrite:!0},function(t){e(t.target),i.close_show=!0},function(t){i.close_show=!0,i.$toast("图片保存失败")})},function(t){console.log("截屏绘制图片失败:"+T()(t))})},200)})},query_share:function(t,e){var i=e;"Android"==window.plus.os.name&&(i=window.plus.io.convertLocalFileSystemURL(i)),t[0].send({pictures:[i],type:"image",extra:{scene:"WXSceneSession"}},function(){self.$toast({message:"已分享",icon:"certificate"})},function(t){alert("分享失败:"+t.message)})},colseButton:function(){this.closeDialog()},closeDialog:function(){this.newshow=!1,this.$emit("changeShow")}}},ot={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("van-dialog",{staticClass:"no_radius",attrs:{"get-container":"body",beforeClose:t.colseButton,showConfirmButton:!1,"close-on-click-overlay":!0},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[i("div",[i("div",{ref:"sharebox"},[i("van-icon",{directives:[{name:"show",rawName:"v-show",value:t.close_show,expression:"close_show"}],staticStyle:{position:"absolute",right:"0",top:"0",padding:"0.25rem"},attrs:{name:"cross"},on:{click:t.colseButton}}),t._v(" "),i("div",{staticClass:"title"},[i("div",{staticStyle:{"margin-right":"0.24rem"}},[i("van-image",{attrs:{width:"1.02rem",heigth:"1.02rem",src:t.logo,fit:"contain"}})],1),t._v(" "),i("div",{staticStyle:{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",width:"100%"}},[i("div",{staticStyle:{"font-size":"20px",color:"#303133"}},[t._v(t._s(t.company_info.name))]),t._v(" "),i("div",{staticStyle:{"font-size":"14px",color:"#000000"}},[t._v("扫一扫,快速加入我们")])])]),t._v(" "),i("div",{staticStyle:{"text-align":"center"}},[i("div",{staticStyle:{"text-align":"center"}},[i("div",{staticClass:"qrcode_box"},[""!=t.qr?i("img",{staticStyle:{width:"4.5rem"},attrs:{src:t.qr}}):t._e()]),t._v(" "),i("div",{staticStyle:{"font-size":"0.24rem",color:"#D2691E","text-align":"center"}},[t._v("使用【功道云APP】,扫描上方二维码快速加入企业")])]),t._v(" "),i("div",{staticStyle:{height:"0.32rem"}})])],1),t._v(" "),i("div",{staticStyle:{"text-align":"center"}},[i("div",{staticClass:"getDonload"},[i("div",{staticStyle:{float:"left"},on:{click:t.download_img}},[i("icon",{staticClass:"download_qrcode",attrs:{name:"download_qrcode"}}),t._v(" "),i("div",[t._v("下载二维码")])],1),t._v(" "),i("div",{staticStyle:{float:"right"},on:{click:function(e){return t.share_img()}}},[i("icon",{staticClass:"share_qrcode",attrs:{name:"share_qrcode"}}),t._v(" "),i("div",[t._v("分享二维码")])],1)])])])])},staticRenderFns:[]};var at=i("VU/8")(st,ot,!1,function(t){i("Wnew")},"data-v-7b1dbf9b",null).exports;i("7+uW").a.use(n.a).use(s.a).use(f).use(y).use(x.a).use(b.a).use(C.a).use(k.a).use(B.a);var rt={name:"department",data:function(){return{show_dept_selector:!1,bar_height:"",show_search_popup_:!0,showDom:!1,pid_list_arr:[],list:[],dept_list:[],dept_info:{},showDepart:!1,company_info:{},employee_list:[],employee_count:{},keyword:"",owner_id:0,user_info:this.$userInfo(),employee_map:this.$getEmployeeMap(),pid:0,pid_list:[],options:[],share_data:{type:"",title:"",content:"",thumbs:"",href:""},shares:[],show:!1,qrcode_popup_show:!1,search_result:!1,search_result_list:[],isApp:!!window.plus,show_qrcode:!1,show_search_popup:!1,search_show:!1,db:null,new_employee_num:0,showHelp:!1,getRole_noe:"",total:0}},props:{isHide:{type:Boolean,default:!1}},components:{share:E.a,qrcode:at,EmployeeSelector:S.a},watch:{keyword:function(t){if(""===t)this.search_result_list=[],this.search_show=!1;else{var e=[];for(var i in this.employee_list)"-1"!=this.employee_list[i].name.indexOf(t)&&e.push(this.employee_list[i]);e.length>0?this.search_result_list=e:(this.search_result_list=[],this.search_show=!0)}}},methods:{routeBack:function(){this.$route.query.isHome?this.$router.replace({name:"home"}):this.$route_back()},move_confirm:function(t){var e=this;if(0==t.employee.length)return!1;this.$axiosUser("post","/api/pro/department/manage/add",{employee_id:t.employee[0].id,dept_id:e.pid}).then(function(t){1==t.data.code&&(e.$toast.success("添加成功"),e.get_dept_info(e.pid))})},closeManager:function(t){var e=this,i=this;this.$dialog.confirm({message:"是否删除"+t.name+"管理者?",title:"提示"}).then(function(){var n={employee_id:t.id,dept_id:i.pid};e.$axiosUser("DELETE","/api/pro/department/manage",n).then(function(t){1==t.data.code&&(i.$toast.success("删除成功"),i.get_dept_info(i.pid))})}).catch(function(){})},parent_click:function(){this.show_search_popup=!0,document.querySelectorAll(".search_popup input").item(0).focus()},close_search_popup:function(){this.show_search_popup=!1,this.keyword="",this.search_show=!1},edit_site_info:function(){return!!this.getRole_noe&&this.$router.push({name:"company_info"})},back_by_index:function(t,e){return 0==t?(this.pid=this.pid_list[t],this.pid_list.splice(t,100),this.pid_list_arr.splice(t,100),this.get_employee_list(this.pid),void this.get_department_list()):t!=this.pid_list.length&&(this.pid=this.pid_list[t],this.pid_list.splice(t,100),this.pid_list_arr.splice(t,100),this.get_employee_list(e.id),this.get_department_list(e.id),void this.get_dept_info(this.pid))},getContainer:function(){return document.body},showLoading:function(){this.$toast.loading({mask:!0,type:"spinner",message:"加载中..."})},refresh:function(t){this.get_employee_list(this.pid),this.get_department_list(),setTimeout(function(){t()},200)},back:function(){var t=this.pid_list_arr,e=t.slice(0,t.length-1);this.pid_list_arr=e,0==e.length?this.pid=0:(this.pid=e[e.length-1].id,this.get_dept_info(this.pid)),this.get_employee_list(this.pid)},show_child:function(t){this.pid=t.id,this.pid_list_arr.push(t),this.pid_list.push(t.pid),this.get_dept_info(t.id),this.get_employee_list(t.id)},get_share_data:function(){var t="_www/static/images/defalut_custmer_headicon.png";window.plus&&"Android"==window.plus.os.name&&(t=window.plus.io.convertLocalFileSystemURL(t)),this.share_data.type="web",this.share_data.title=this.user_info.name+"邀请你加入",this.share_data.content="我们的同事都在用功道云,点击立即申请加入",this.share_data.thumbs=[t],this.share_data.href="https://new.gdy.g107.com/m/#/invite_reg?site_id="+this.user_info.site_id+"&employee_id="+this.user_info.id+"&company_name="+this.company_info.name+"&employee_name="+this.user_info.name},get_department_list:function(){var t=this,e=this;this.$toast.loading({message:"加载中...",forbidClick:!0}),this.$axiosUser("get","/api/pro/department/index").then(function(t){1==t.data.code?(e.showDom=!0,e.dept_list=t.data.data.list,e.company_info=t.data.data.company,e.employee_count=t.data.data.count,window.plus&&plus.share.getServices(function(t){e.shares=t,e.get_share_data()},function(t){alert("获取分享服务列表失败:"+t.message)}),e.$toast.clear()):e.$toast(t.data.msg)}).finally(function(){t.show_qrcode=!0})},plus_menu:function(t){switch(t){case"add_dept_btn":var e={};this.pid_list_arr.length>0?(e=this.pid_list_arr.slice(-1),this.$router.push({name:"dept",query:{type:"add",parent_id:e[0].id}})):this.$router.push({name:"dept",query:{type:"add"}});break;case"add_employee":this.$router.push({name:"employee_add"});break;case"wechat":this.show_share();break;default:this.qrcode_popup_show=!0}},query_share:function(t){if("weixin"==t.id){var e="_www/static/images/logo.png";window.plus&&"Android"==plus.os.name&&(e=plus.io.convertLocalFileSystemURL(e)),t.send({extra:{scene:"WXSceneSession"},type:"web",title:this.user_info.name+"邀请你加入"+this.company_info.name,content:"我们的同事都在用功道云,点击立即申请加入",thumbs:[e],href:"https://g107.com/#/site_id="+this.user_info.site_id+"&employee_id="+this.user_info.id+"&company_name="+this.company_info.name},function(){alert("分享成功!")},function(t){alert("分享失败:"+t.message)})}},edit_dept:function(t){if(!this.getRole_noe)return!1;this.$router.push({name:"dept",query:{type:"edit",id:t.id}})},get_dept_info:function(t){var e=this;e.showLoading(),this.$axiosUser("get","/api/pro/department/info",{id:t},"v2").then(function(t){1==t.data.code?(0==t.data.data.manager.length?e.showDepart=!1:e.showDepart=!0,e.dept_info=t.data.data,e.$toast.clear()):e.$toast.clear()})},get_employee_list:function(t){var e=this;this.showLoading(),this.$axiosUser("get","/api/pro/employee/index",{dept_id:t,page_size:2e4,status:1,account_id:0},"v2").then(function(t){1==t.data.code?(e.showDom=!0,e.employee_list=t.data.data.list,e.total=t.data.data.total):e.$toast(t.data.msg)}).finally(function(){e.$toast.clear()})},edit_employee:function(t){this.$router.push({name:"employee_edit",query:{id:t.id}})},employee_info:function(t){this.$router.push({name:"employee_info",query:{id:t.id}})},show_share:function(){this.show=!0},ifApp:function(){window.plus&&(this.isApp=!0)},new_employee:function(){var t=this;this.$axiosUser("get","/api/pro/join/index",{status:0,page:1}).then(function(e){1==e.data.code?e.data.data.total>0&&(t.new_employee_num=e.data.data.total):t.$toast(e.data.msg)})}},created:function(){this.getRole_noe=Object(L.f)(),this.new_employee(),this.refresh(function(){})},activated:function(){this.refresh(function(){})},mounted:function(){window.plus&&(this.bar_height=window.plus.navigator.getStatusbarHeight());var t=[];this.getRole_noe&&t.push({text:"添加部门",value:"add_dept_btn",icon:"static/images/dept_add.png"}),this.getRole_noe&&t.push({text:"添加人员",value:"add_employee",icon:"static/images/employee_add.png"}),window.plus,this.options=t}},lt={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"department_box",staticStyle:{height:"100%"}},[i("van-nav-bar",{staticClass:"headerbar no-down-icon",attrs:{"left-text":"组织架构"}},[t.isHide?t._e():[t.pid>0?i("template",{slot:"left"},[i("div",{on:{click:t.back}},[i("van-icon",{attrs:{name:"arrow-left"}}),i("span",{staticClass:"van-nav-bar__text"},[t._v("返回")])],1)]):t._e(),t._v(" "),0==t.pid?i("template",{slot:"left"},[i("div",{on:{click:function(e){return t.routeBack()}}},[i("van-icon",{attrs:{name:"arrow-left"}}),i("span",{staticClass:"van-nav-bar__text"},[t._v("返回")])],1)]):t._e()],t._v(" "),t.getRole_noe?i("template",{slot:"right"},[i("van-dropdown-menu",{staticClass:"department_right_nav",attrs:{duration:"0.3",text:"text"}},[i("van-dropdown-item",{attrs:{title:"+",options:t.options},on:{change:t.plus_menu}})],1)],1):t._e()],2),t._v(" "),i("div",{staticClass:"work_body_com"},[i("scroller",{ref:"scroller_com",attrs:{isInitRefresh:!1,"on-refresh":t.refresh}},[i("div",{staticStyle:{padding:"0.2rem 0.32rem","background-color":"#fff"},on:{click:t.parent_click}},[i("div",{staticStyle:{"background-color":"#f7f8fa","border-radius":"0.04rem",color:"#c8c9cc",padding:"0.12rem 0.32rem"}},[i("van-icon",{attrs:{name:"search"}}),t._v(" 请输入搜索姓名")],1)]),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.pid_list_arr.length>0,expression:"pid_list_arr.length > 0"}],staticClass:"dept_path"},[i("a",{attrs:{href:"javascript:void(0);"},on:{click:function(e){return t.back_by_index(0)}}},[t._v("全公司")]),t._v(" "),t._l(t.pid_list_arr,function(e,n){return i("a",{key:n,attrs:{href:"javascript:void(0);"},on:{click:function(i){return t.back_by_index(n+1,e)}}},[i("van-icon",{attrs:{name:"arrow"}}),t._v("\n "+t._s(e.name)+"\n ")],1)})],2),t._v(" "),i("div",[i("van-cell-group",{directives:[{name:"show",rawName:"v-show",value:0==t.pid,expression:"pid==0"}],attrs:{border:!1}},[i("van-cell",{staticClass:"company_info",attrs:{"label-class":"employee_count",title:t.company_info.name,border:!1,clickable:"","is-link":t.getRole_noe,label:t.total+"人"},on:{click:t.edit_site_info}},[i("template",{slot:"icon"},[i("img",{staticClass:"company_dept_img",attrs:{src:t.company_info.logo_url?t.company_info.logo_url:"static/images/default_company_logo.png"}})])],2)],1),t._v(" "),i("van-cell-group",{directives:[{name:"show",rawName:"v-show",value:0!=t.pid,expression:"pid != 0"}],attrs:{border:!1}},[i("van-cell",{staticClass:"company_info2",attrs:{"is-link":t.getRole_noe,title:t.dept_info.name,center:"",border:!1,clickable:""},on:{click:function(e){return t.edit_dept(t.dept_info)}}},[i("template",{slot:"icon"},[i("img",{staticClass:"company_dept_img",attrs:{src:"static/images/e66f.jpg"}})])],2)],1),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:0!=t.pid,expression:"pid != 0"}]},[i("div",{staticClass:"fontColorC",staticStyle:{padding:"0 0.32rem","font-size":"0.28rem"}},[t._v("管理员")]),t._v(" "),i("div",{staticClass:"manager flex-box flex-v-ce"},[t.showDepart?i("div",{staticClass:"flex-box flex-v-ce flex-1 flex-d-wrap",staticStyle:{"padding-right":"0.2rem"}},t._l(t.dept_info.manager,function(e,n){return i("van-tag",{key:n,staticStyle:{"margin-right":"5px","margin-top":"5px"},attrs:{closeable:"",size:"medium",type:"primary"},on:{close:function(i){return t.closeManager(e)}}},[t._v(t._s(e.name))])}),1):i("div",{staticClass:"flex-1",staticStyle:{color:"#F56C6C","font-size":"14px"}},[t._v("管理员未设置")]),t._v(" "),i("van-button",{attrs:{icon:"plus",type:"info",size:"small",plain:""},on:{click:function(e){t.show_dept_selector=!0}}})],1),t._v(" "),i("div",{staticClass:"fontColorC",staticStyle:{"text-align":"center","font-size":"12px"}},[t._v("只能选择直属部门的员工作为部门管理员")])]),t._v(" "),i("van-cell-group",[(t.isApp,t._e()),t._v(" "),t.getRole_noe?i("van-cell",{staticClass:"new_employee_cell employee_cell",attrs:{"is-link":"",title:"新成员",to:{name:"new_employee"}}},[i("template",{slot:"default"},[i("van-tag",{directives:[{name:"show",rawName:"v-show",value:t.new_employee_num>0,expression:"new_employee_num > 0"}],staticClass:"tag",class:t.new_employee_num>9?"num10":"num9",attrs:{round:"",type:"danger",size:"medium"}},[t._v(t._s(t.new_employee_num))])],1),t._v(" "),i("template",{slot:"icon"},[i("icon",{staticClass:"message_newmember",attrs:{name:"message_newmember"}})],1)],2):t._e()],1),t._v(" "),i("van-cell-group",[t._l(t.dept_list,function(e,n){return i("van-cell",{directives:[{name:"show",rawName:"v-show",value:e.pid==t.pid,expression:"item.pid == pid"}],key:n,staticClass:"employee_cell",attrs:{"is-link":"",title:e.name+" ("+e.count+")"},on:{click:function(i){return t.show_child(e)}}},[i("template",{slot:"icon"},[i("icon",{staticClass:"message_department",attrs:{name:"message_department"}})],1)],2)}),t._v(" "),t.user_info.id==t.owner_id&&0==t.pid_list?i("van-cell",{staticClass:"employee_cell",attrs:{"is-link":"",title:"加入申请",to:"/join_review"}},[i("template",{slot:"icon"},[i("img",{staticClass:"employee_cell_head_img",attrs:{src:"static/images/join_review.jpg"}})])],2):t._e()],2),t._v(" "),t._l(t.employee_list,function(e,n){return i("div",{key:n,staticClass:"employee_item",class:{"letter-first":0==n||n>0&&t.employee_list[n-1].letter_index!=e.letter_index}},[0==n?i("div",{staticClass:"pageIndexBtn pageIndexBtnText",attrs:{"data-pageindex":e.letter_index}},[t._v(t._s(e.letter_index))]):t._e(),t._v(" "),n>0&&t.employee_list[n-1].letter_index!=e.letter_index?i("div",{staticClass:"pageIndexBtn pageIndexBtnText",attrs:{"data-pageindex":e.letter_index}},[t._v(t._s(e.letter_index))]):t._e(),t._v(" "),i("van-cell",{staticClass:"employee_cell",attrs:{title:e.name},on:{click:function(i){return t.employee_info(e)}}},[i("template",{slot:"label"},[e.post?i("span",{staticStyle:{"font-size":"0.24rem","margin-top":"5px"}},[t._v(t._s(e.post))]):t._e()]),t._v(" "),i("template",{slot:"icon"},[e.img_url?i("img",{staticClass:"imgUrl",attrs:{src:e.img_url,width:"30",height:"30"}}):i("div",{staticClass:"imgUrl",staticStyle:{background:"#238DFA",color:"#fff"}},[t._v(t._s(e.name.substring(e.name.length-2)))])]),t._v(" "),i("template",{slot:"right-icon"},[2==e.status?i("span",{staticClass:"red flex-box flex-h-ce",staticStyle:{"font-size":"0.28rem"}},[t._v("已离职")]):t._e(),t._v(" "),0==e.status||1==e.status&&0==e.account_id?i("span",{staticClass:"blue flex-box flex-h-ce",staticStyle:{"font-size":"0.28rem"}},[t._v("邀请加入")]):t._e()])],2)],1)}),t._v(" "),0==t.employee_list.length&&0==t.dept_list.length&&t.showDom?i("div",[i("van-row",{staticClass:"c",attrs:{type:"flex",justify:"space-around"}},[i("van-col",{attrs:{span:"24"}},[i("div",{staticStyle:{margin:"0.5rem 0 0.3rem 0","text-align":"center"}},[i("img",{staticStyle:{width:"2.5rem",height:"2.5rem"},attrs:{src:"static/images/noPeople.png"}})]),t._v(" "),i("p",{staticClass:"text_center"},[t._v("暂无部门和人员")]),t._v(" "),i("p",{staticClass:"text_center"},[t._v("点击右上方的+")]),t._v(" "),i("p",{staticClass:"text_center"},[t._v("先加部门后加人")])])],1)],1):t._e()],2)])],1),t._v(" "),i("van-popup",{staticClass:"search_popup",class:{show_search_popup:t.show_search_popup},staticStyle:{width:"100vw",height:"100vh"},attrs:{duration:0,position:"right","get-container":"body",overlay:!1},model:{value:t.show_search_popup_,callback:function(e){t.show_search_popup_=e},expression:"show_search_popup_"}},[i("div",{style:"padding-top:"+t.bar_height+"px;background-color: #26A2FF;"}),t._v(" "),i("van-nav-bar",{staticClass:"headerbar no-down-icon",attrs:{title:"通讯录","left-text":"返回","left-arrow":""},on:{"click-left":t.close_search_popup}}),t._v(" "),i("van-search",{ref:"search1",staticClass:"scroller-blur",attrs:{placeholder:"请输入搜索姓名"},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}}),t._v(" "),i("div",{staticClass:"search_list"},t._l(t.search_result_list,function(e,n){return i("div",{key:n,staticClass:"employee_item",class:{"letter-first":0==n||n>0&&t.search_result_list[n-1].letter_index!=e.letter_index}},[i("van-cell",{staticClass:"employee_cell",attrs:{title:e.name},on:{click:function(i){return t.employee_info(e)}}},[i("template",{slot:"icon"},[e.img_url?i("img",{staticClass:"imgUrl",attrs:{src:e.img_url,width:"30",height:"30"}}):i("div",{staticClass:"imgUrl",staticStyle:{background:"#238DFA",color:"#fff"}},[t._v(t._s(e.name.substring(e.name.length-2)))])]),t._v(" "),i("template",{slot:"right-icon"},[i("van-tag",{directives:[{name:"show",rawName:"v-show",value:e.employee_detail.manage_dept_ids.length>0,expression:"item.employee_detail.manage_dept_ids.length>0"}],attrs:{plain:""}},[t._v("管理员")]),t._v(" "),i("van-tag",{directives:[{name:"show",rawName:"v-show",value:0==e.status||2==e.status,expression:"item.status == 0 || item.status == 2"}],attrs:{plain:""}},[t._v(t._s(0==e.status?"未加入":"离职"))])],1)],2)],1)}),0),t._v(" "),i("noData",{directives:[{name:"show",rawName:"v-show",value:t.search_show,expression:"search_show"}],model:{value:t.search_result_list,callback:function(e){t.search_result_list=e},expression:"search_result_list"}})],1),t._v(" "),i("van-action-sheet",{attrs:{"get-container":"boby",title:"邀请成员"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[i("share",{attrs:{share_data:t.share_data}})],1),t._v(" "),t.show_qrcode?i("qrcode",{attrs:{show:t.qrcode_popup_show,logo:t.company_info.logo_url},on:{changeShow:function(e){t.qrcode_popup_show=!1}}}):t._e(),t._v(" "),i("EmployeeSelector",{attrs:{deptId:t.pid,multi:!1,visible:t.show_dept_selector},on:{confirm:t.move_confirm,"update:visible":function(e){t.show_dept_selector=e}}})],1)},staticRenderFns:[]};var ct=i("VU/8")(rt,lt,!1,function(t){i("yCvx")},"data-v-5612a575",null);e.default=ct.exports},Wnew:function(t,e){},gJIh:function(t,e){},tAII:function(t,e){},yCvx:function(t,e){}});