1234567 |
- webpackJsonp([6],{"19Fi":function(t,e){},DpTP: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])])}}),b=(i("nsOR"),i("WMi1")),x=(i("iQ6B"),i("H6W6")),C=(i("n90r"),i("dJne")),k=(i("PEgo"),i("HNZ3")),B=(i("ssJA"),i("prsZ")),L=i("CC1l"),S=i("vLgD"),A=i("TIfe"),E=i("e81K"),T=i("J7VH");i("7+uW").a.use(n.a).use(s.a).use(f).use(y).use(b.a).use(x.a).use(C.a).use(k.a).use(B.a);var D={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:""}},components:{share:E.a,qrcode:T.a,EmployeeSelector:L.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;Object(S.a)("post","/api/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;this.$dialog.confirm({message:"是否删除"+t.name+"管理者?",title:"提示"}).then(function(){var i={employee_id:t.id,dept_id:e.pid};Object(S.a)("DELETE","/api/department/manage",i).then(function(t){1==t.data.code&&(e.$toast.success("删除成功"),e.get_dept_info(e.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://oa.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}),Object(S.a)("get","/api/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(),Object(S.a)("get","/api/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(),Object(S.a)("get","/api/employee/index",{dept_id:t,page_size:2e4},"v2").then(function(t){1==t.data.code?(e.showDom=!0,e.employee_list=t.data.data.list,e.$nextTick(function(){e.$refs.scroller_com.createPageIndex()})):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;Object(S.a)("get","/api/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)})}},keep_alive_update:{update_dept_list:function(t,e){"edit"==e.type?(t.dept_list[e.id].name=e.name,t.dept_info.name=e.name):t.refresh(function(){})},company_info:function(t,e){t.company_info.name=e.name,t.company_info.logo_url=e.logo_url},employee_list:function(t,e){for(var i in t.employee_list)t.employee_list[i].id==e.id&&(t.employee_list[i].name=e.name)},del_dept_info:function(t,e){t.back(),t.refresh(function(){self.get_department_list(),self.get_employee_list(),self.ifApp()})},add_employee:function(t,e){t.refresh(function(){})},del_employee:function(t,e){for(var i in t.employee_list)t.employee_list[i].id==e.id&&(t.employee_list.splice(i,1),t.employee_count.all=t.employee_count.all-1)},update_new_employee:function(t,e){t.new_employee()}},created:function(){this.getRole_noe=Object(A.i)(),this.new_employee()},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.getRole_noe&&(t.push({text:"微信邀请",value:"wechat",icon:"static/images/wechat_invite.png"}),t.push({text:"二维码邀请",value:"qrcode",icon:"static/images/qrcode_invite.png"})),this.options=t):this.options=t}},M={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:{title:"组织架构"}},[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(" "),this.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:{"on-refresh":t.refresh}},[i("van-search",{staticClass:"scroller-blur",attrs:{placeholder:"请输入搜索姓名",disabled:!0},on:{click:t.parent_click}}),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":this.getRole_noe,label:t.employee_count.all+"人"},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":this.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(" "),this.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)],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 I=i("VU/8")(D,M,!1,function(t){i("NQL8")},"data-v-85a5d3d4",null);e.default=I.exports},J7VH:function(t,e,i){"use strict";var n=i("mvHQ"),s=i.n(n),o=i("Z1I5"),a=i("vLgD"),r={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:o.a},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://oa.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;Object(a.a)("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(),o=t.offsetHeight,a=t.offsetWidth,r=plus.webview.currentWebview(),l=new plus.nativeObj.Bitmap("qrcode");r.draw(l,function(){var t=l.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("截屏绘制图片失败:"+s()(t))},{clip:{top:n.top+0+"px",left:n.left+0+"px",height:o+"px",width:a+"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(),o=t.offsetHeight,a=t.offsetWidth,r=window.innerHeight,l=window.innerWidth,c=Math.ceil(n.top/r*100)+"%",h=Math.ceil(n.left/l*100)+"%",u=Math.floor(a/l*100)-1+"%",d=Math.floor(o/r*100)-1+"%",p=plus.webview.currentWebview(),_=new plus.nativeObj.Bitmap("qrcode");p.draw(_,function(){_.save("_doc/canvas_share.jpg",{clip:{top:c,left:h,width:u,height:d},overwrite:!0},function(t){e(t.target),i.close_show=!0},function(t){i.close_show=!0,i.$toast("图片保存失败")})},function(t){console.log("截屏绘制图片失败:"+s()(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")}}},l={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("qrcode-vue",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"qrcode_box",attrs:{value:t.url,size:252,level:"H"}}),t._v(" "),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】,扫描上方二维码快速加入企业")])],1),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 c=i("VU/8")(r,l,!1,function(t){i("19Fi")},"data-v-ef54ff6e",null);e.a=c.exports},LpdB:function(t,e){},NQL8:function(t,e){},Z1I5:function(t,e,i){"use strict";
- /*!
- * qrcode.vue v1.7.0
- * A Vue component to generate QRCode.
- * © 2017-2019 @scopewu(https://github.com/scopewu)
- * MIT License.
- */var n={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8};function s(t){this.mode=n.MODE_8BIT_BYTE,this.data=t}s.prototype={getLength:function(t){return this.data.length},write:function(t){for(var e=0;e<this.data.length;e++)t.put(this.data.charCodeAt(e),8)}};var o=s,a={L:1,M:0,Q:3,H:2};function r(t,e){this.totalCount=t,this.dataCount=e}r.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r.getRSBlocks=function(t,e){var i=r.getRsBlockTable(t,e);if(void 0==i)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+e);for(var n=i.length/3,s=new Array,o=0;o<n;o++)for(var a=i[3*o+0],l=i[3*o+1],c=i[3*o+2],h=0;h<a;h++)s.push(new r(l,c));return s},r.getRsBlockTable=function(t,e){switch(e){case a.L:return r.RS_BLOCK_TABLE[4*(t-1)+0];case a.M:return r.RS_BLOCK_TABLE[4*(t-1)+1];case a.Q:return r.RS_BLOCK_TABLE[4*(t-1)+2];case a.H:return r.RS_BLOCK_TABLE[4*(t-1)+3];default:return}};var l=r;function c(){this.buffer=new Array,this.length=0}c.prototype={get:function(t){var e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(var i=0;i<e;i++)this.putBit(1==(t>>>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 h=c,u={glog:function(t){if(t<1)throw new Error("glog("+t+")");return u.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return u.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},d=0;d<8;d++)u.EXP_TABLE[d]=1<<d;for(d=8;d<256;d++)u.EXP_TABLE[d]=u.EXP_TABLE[d-4]^u.EXP_TABLE[d-5]^u.EXP_TABLE[d-6]^u.EXP_TABLE[d-8];for(d=0;d<255;d++)u.LOG_TABLE[u.EXP_TABLE[d]]=d;var p=u;function _(t,e){if(void 0==t.length)throw new Error(t.length+"/"+e);for(var i=0;i<t.length&&0==t[i];)i++;this.num=new Array(t.length-i+e);for(var n=0;n<t.length-i;n++)this.num[n]=t[n+i]}_.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),i=0;i<this.getLength();i++)for(var n=0;n<t.getLength();n++)e[i+n]^=p.gexp(p.glog(this.get(i))+p.glog(t.get(n)));return new _(e,0)},mod:function(t){if(this.getLength()-t.getLength()<0)return this;for(var e=p.glog(this.get(0))-p.glog(t.get(0)),i=new Array(this.getLength()),n=0;n<this.getLength();n++)i[n]=this.get(n);for(n=0;n<t.getLength();n++)i[n]^=p.gexp(p.glog(t.get(n))+e);return new _(i,0).mod(t)}};var f=_,m=0,g=1,v=2,w=3,y=4,b=5,x=6,C=7,k={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;k.getBCHDigit(e)-k.getBCHDigit(k.G15)>=0;)e^=k.G15<<k.getBCHDigit(e)-k.getBCHDigit(k.G15);return(t<<10|e)^k.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;k.getBCHDigit(e)-k.getBCHDigit(k.G18)>=0;)e^=k.G18<<k.getBCHDigit(e)-k.getBCHDigit(k.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return k.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,i){switch(t){case m:return(e+i)%2==0;case g:return e%2==0;case v:return i%3==0;case w:return(e+i)%3==0;case y:return(Math.floor(e/2)+Math.floor(i/3))%2==0;case b:return e*i%2+e*i%3==0;case x:return(e*i%2+e*i%3)%2==0;case C:return(e*i%3+(e+i)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new f([1],0),i=0;i<t;i++)e=e.multiply(new f([1,p.gexp(i)],0));return e},getLengthInBits:function(t,e){if(1<=e&&e<10)switch(t){case n.MODE_NUMBER:return 10;case n.MODE_ALPHA_NUM:return 9;case n.MODE_8BIT_BYTE:case n.MODE_KANJI:return 8;default:throw new Error("mode:"+t)}else if(e<27)switch(t){case n.MODE_NUMBER:return 12;case n.MODE_ALPHA_NUM:return 11;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 10;default:throw new Error("mode:"+t)}else{if(!(e<41))throw new Error("type:"+e);switch(t){case n.MODE_NUMBER:return 14;case n.MODE_ALPHA_NUM:return 13;case n.MODE_8BIT_BYTE:return 16;case n.MODE_KANJI:return 12;default:throw new Error("mode:"+t)}}},getLostPoint:function(t){for(var e=t.getModuleCount(),i=0,n=0;n<e;n++)for(var s=0;s<e;s++){for(var o=0,a=t.isDark(n,s),r=-1;r<=1;r++)if(!(n+r<0||e<=n+r))for(var l=-1;l<=1;l++)s+l<0||e<=s+l||0==r&&0==l||a==t.isDark(n+r,s+l)&&o++;o>5&&(i+=3+o-5)}for(n=0;n<e-1;n++)for(s=0;s<e-1;s++){var c=0;t.isDark(n,s)&&c++,t.isDark(n+1,s)&&c++,t.isDark(n,s+1)&&c++,t.isDark(n+1,s+1)&&c++,0!=c&&4!=c||(i+=3)}for(n=0;n<e;n++)for(s=0;s<e-6;s++)t.isDark(n,s)&&!t.isDark(n,s+1)&&t.isDark(n,s+2)&&t.isDark(n,s+3)&&t.isDark(n,s+4)&&!t.isDark(n,s+5)&&t.isDark(n,s+6)&&(i+=40);for(s=0;s<e;s++)for(n=0;n<e-6;n++)t.isDark(n,s)&&!t.isDark(n+1,s)&&t.isDark(n+2,s)&&t.isDark(n+3,s)&&t.isDark(n+4,s)&&!t.isDark(n+5,s)&&t.isDark(n+6,s)&&(i+=40);var h=0;for(s=0;s<e;s++)for(n=0;n<e;n++)t.isDark(n,s)&&h++;return i+=10*(Math.abs(100*h/e/e-50)/5)}},B=k;function L(t,e){this.typeNumber=t,this.errorCorrectLevel=e,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var S=L.prototype;S.addData=function(t){var e=new o(t);this.dataList.push(e),this.dataCache=null},S.isDark=function(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(t+","+e);return this.modules[t][e]},S.getModuleCount=function(){return this.moduleCount},S.make=function(){if(this.typeNumber<1){var t=1;for(t=1;t<40;t++){for(var e=l.getRSBlocks(t,this.errorCorrectLevel),i=new h,n=0,s=0;s<e.length;s++)n+=e[s].dataCount;for(s=0;s<this.dataList.length;s++){var o=this.dataList[s];i.put(o.mode,4),i.put(o.getLength(),B.getLengthInBits(o.mode,t)),o.write(i)}if(i.getLengthInBits()<=8*n)break}this.typeNumber=t}this.makeImpl(!1,this.getBestMaskPattern())},S.makeImpl=function(t,e){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++)this.modules[i][n]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=L.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)},S.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)},S.getBestMaskPattern=function(){for(var t=0,e=0,i=0;i<8;i++){this.makeImpl(!0,i);var n=B.getLostPoint(this);(0==i||t>n)&&(t=n,e=i)}return e},S.createMovieClip=function(t,e,i){var n=t.createEmptyMovieClip(e,i);this.make();for(var s=0;s<this.modules.length;s++)for(var o=1*s,a=0;a<this.modules[s].length;a++){var r=1*a;this.modules[s][a]&&(n.beginFill(0,100),n.moveTo(r,o),n.lineTo(r+1,o),n.lineTo(r+1,o+1),n.lineTo(r,o+1),n.endFill())}return n},S.setupTimingPattern=function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0);for(var e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)},S.setupPositionAdjustPattern=function(){for(var t=B.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var i=0;i<t.length;i++){var n=t[e],s=t[i];if(null==this.modules[n][s])for(var o=-2;o<=2;o++)for(var a=-2;a<=2;a++)this.modules[n+o][s+a]=-2==o||2==o||-2==a||2==a||0==o&&0==a}},S.setupTypeNumber=function(t){for(var e=B.getBCHTypeNumber(this.typeNumber),i=0;i<18;i++){var n=!t&&1==(e>>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}},S.setupTypeInfo=function(t,e){for(var i=this.errorCorrectLevel<<3|e,n=B.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},S.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<t.length&&(l=1==(t[o]>>>s&1)),B.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}}},L.PAD0=236,L.PAD1=17,L.createData=function(t,e,i){for(var n=l.getRSBlocks(t,e),s=new h,o=0;o<i.length;o++){var a=i[o];s.put(a.mode,4),s.put(a.getLength(),B.getLengthInBits(a.mode,t)),a.write(s)}var r=0;for(o=0;o<n.length;o++)r+=n[o].dataCount;if(s.getLengthInBits()>8*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(L.PAD0,8),s.getLengthInBits()>=8*r));)s.put(L.PAD1,8);return L.createBytes(s,n)},L.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<e.length;r++){var l=e[r].dataCount,c=e[r].totalCount-l;n=Math.max(n,l),s=Math.max(s,c),o[r]=new Array(l);for(var h=0;h<o[r].length;h++)o[r][h]=255&t.buffer[h+i];i+=l;var u=B.getErrorCorrectPolynomial(c),d=new f(o[r],u.getLength()-1).mod(u);a[r]=new Array(u.getLength()-1);for(h=0;h<a[r].length;h++){var p=h+d.getLength()-a[r].length;a[r][h]=p>=0?d.get(p):0}}var _=0;for(h=0;h<e.length;h++)_+=e[h].totalCount;var m=new Array(_),g=0;for(h=0;h<n;h++)for(r=0;r<e.length;r++)h<o[r].length&&(m[g++]=o[r][h]);for(h=0;h<s;h++)for(r=0;r<e.length;r++)h<a[r].length&&(m[g++]=a[r][h]);return m};var A=L;var E={props:{value:{type:String,required:!0,default:""},className:{type:String,default:""},size:{type:[Number,String],default:100,validator:function(t){return!0!==isNaN(Number(t))}},level:{type:String,default:"L",validator:function(t){return["L","Q","M","H"].indexOf(t)>-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,r=e>>>0,l=new A(-1,a[i]);l.addData(function(t){for(var e="",i=0;i<t.length;i++){var n=t.charCodeAt(i);n<128?e+=String.fromCharCode(n):n<2048?(e+=String.fromCharCode(192|n>>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)),l.make();var c=l.modules,h=r/c.length,u=r/c.length,d=window.devicePixelRatio||1;if("svg"===o)this.numCells=c.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("")}(c);else{var p=this.$refs["qrcode-vue"],_=p.getContext("2d");p.height=p.width=r*d,_.scale(d,d),c.forEach(function(t,e){t.forEach(function(t,i){_.fillStyle=t?s:n;var o=Math.ceil((i+1)*h)-Math.floor(i*h),a=Math.ceil((e+1)*u)-Math.floor(e*u);_.fillRect(Math.round(i*h),Math.round(e*u),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"},[])])}};e.a=E},e81K: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("LpdB")},"data-v-7676e937",null);e.a=o.exports},gJIh:function(t,e){},tAII:function(t,e){}});
|