(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-376207b6"],{2199:function(t,e,a){},"5c13":function(t,e,a){"use strict";a("2199")},8380:function(t,e,a){"use strict";a.r(e);var i,s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"xq-statistics-page"},[i("mescroll-vue",{ref:"wordListBox",staticClass:"customerBoxmescroll",attrs:{down:t.mescrollDown,up:t.mescrollUp},on:{init:t.mescrollInit}},[i("div",{staticClass:"xq-header-box"},[i("statisticstop",{attrs:{orgName:t.totalObj.org_name,type:t.activeIndex},on:{switchDate:t.switchDate}})],1),i("div",{staticClass:"xq-callup-main"},[i("div",{staticClass:"xq-callup-item mb0 radius10"},[i("div",{staticClass:"xq-measure-total flex align-center justify-between"},[i("div",{staticClass:"xq-total-left flex align-center"},[i("div",{staticClass:"xq-total-icon"},[i("img",{attrs:{src:a("25e0"),width:"100%",height:"100%",alt:""}})]),i("span",{staticClass:"font30 color384855 ml10"},[t._v("无忧数量")])]),i("div",{staticClass:"xq-total-right flex align-center justify-end"},[i("span",{staticClass:"color2476FE font32 fontw700"},[t._v(t._s(t.totalObj.count))])])]),i("div",{staticClass:"xq-callupall-content"},t._l(t.showFieldArr,(function(e,a){return i("div",{directives:[{name:"show",rawName:"v-show",value:!e.hidden,expression:"!item.hidden"}],key:a},[i("span",{staticClass:"font36"},[t._v(t._s(t.totalObj.count?t.totalObj.count:0))]),i("span",{staticClass:"mt10 xq-block ellipsis color89A0B7 font24"},[t._v(t._s(e.name))])])})),0)]),i("div",{staticClass:"xq-filter-box flex align-center"},[i("div",{on:{click:function(e){return t.sortFunc("count")}}},[i("span",{class:{"xq-active-filter":t.wechatCountACtive}},[t._v("无忧数量排序")]),i("div",{staticClass:"flex-column align-center justify-center ml5"},[i("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang upicon",class:{sortActive:"count"==t.filterObj.field&&"count asc"==t.filterObj.order}}),i("i",{staticClass:"iconfont icon-shixinjiantou-xiangshang-copy downicon",class:{sortActive:"count"==t.filterObj.field&&"count desc"==t.filterObj.order}})])])]),t._l(t.orgArr,(function(e,a){return i("div",{key:e.id,staticClass:"xq-callup-item",class:{"xq-active-border":t.activeItem==e.id},on:{click:function(a){return t.jumpWechatPage(e,"depart")}}},[i("div",{staticClass:"xq-callupall-header flex align-center justify-between font28 color384855"},[i("div",{staticClass:"flex align-center"},[i("div",{staticClass:"xq-vertical"}),i("span",{staticClass:"ml10 font28"},[t._v(t._s(e.name))]),i("span",{staticClass:"font24 color89A0B7 ml10"},[t._v("总"+t._s(e.employee_count)+"人")])]),i("div",{staticClass:"flex align-center justify-end"},[i("span",{staticClass:"color2476FE font24 fontw600"},[t._v("无忧数量:"+t._s(e.count))]),i("van-icon",{attrs:{name:"arrow",color:"#2476FE",size:"16"}})],1)]),i("div",{staticClass:"xq-callupall-content"},t._l(t.showFieldArr,(function(a,s){return i("div",{directives:[{name:"show",rawName:"v-show",value:!a.hidden,expression:"!f.hidden"}],key:s},[i("span",{staticClass:"font36"},[t._v(t._s(e[a.field]))]),i("span",{staticClass:"mt10 xq-block ellipsis color89A0B7 font24"},[t._v(t._s(a.name))])])})),0)])})),t._l(t.employeeArr,(function(e,s){return i("div",{key:e.id,staticClass:"xq-callup-item",class:{"xq-active-border":t.activeItem==e.id},on:{click:function(a){return t.jumpWechatPage(e,"employee")}}},[i("div",{staticClass:"xq-callupall-header flex align-center justify-between font28 color384855"},[i("div",{staticClass:"flex align-center"},[i("div",{staticClass:"xq-staff-avatar"},[e.user.headimgurl?[i("img",{attrs:{src:e.user.headimgurl,width:"100%",height:"100%",alt:""}})]:[i("img",{attrs:{src:a("ee87"),width:"100%",height:"100%",alt:""}})]],2),i("span",[t._v(t._s(e.name))])]),i("div",{staticClass:"flex align-center justify-end"},[i("span",{staticClass:"color2476FE font24 fontw600"},[t._v("无忧数量:"+t._s(e.count))]),i("van-icon",{attrs:{name:"arrow",color:"#2476FE",size:"16"}})],1)]),i("div",{staticClass:"xq-callupall-content"},t._l(t.showFieldArr,(function(a,s){return i("div",{directives:[{name:"show",rawName:"v-show",value:!a.hidden,expression:"!f.hidden"}],key:s},[i("span",{staticClass:"font36"},[t._v(t._s(e[a.field]))]),i("span",{staticClass:"mt10 xq-block ellipsis color89A0B7 font24"},[t._v(t._s(a.name))])])})),0)])})),i("nonedata",{attrs:{len:t.datalength,datashow:t.datashow}})],2)]),i("van-calendar",{attrs:{"allow-same-day":"","min-date":t.minDate,"max-date":t.maxDate,type:"range",color:"#249EFB","default-date":t.defaultDate},on:{confirm:t.onConfirm,opened:t.calendarOpened},model:{value:t.showCalendar,callback:function(e){t.showCalendar=e},expression:"showCalendar"}}),i("wzhload",{directives:[{name:"show",rawName:"v-show",value:t.loadFlag,expression:"loadFlag"}]})],1)},n=[],r=a("d0afc"),o=a("f3f3"),l=a("fc11"),c=(a("6d73"),a("473d")),d=(a("b0c0"),a("e9c4"),a("d3b7"),a("3ca3"),a("ddb0"),a("159b"),a("b64b"),a("99af"),a("4f8e")),u=a("5a0c"),f=a.n(u),h=a("8d6b"),m=a("a92e"),b=a("5880"),p=a("d0af"),j={components:(i={},Object(l["a"])(i,c["a"].name,c["a"]),Object(l["a"])(i,"MescrollVue",h["a"]),Object(l["a"])(i,"nonedata",m["a"]),Object(l["a"])(i,"statisticstop",p["a"]),i),data:function(){return{showCalendar:!1,loadFlag:!1,datashow:!1,activeIndex:"0",activeItem:null,scrollPosition:0,minDate:new Date(2018,0,1),maxDate:new Date,totalObj:{},orgArr:[],employeeArr:[],filterObj:{org_id:"",employee_id:"",order:"",field:"",start_time:"",end_time:""},tab:[{name:"今日",type:"0"},{name:"近一周",type:"1"},{name:"近一月",type:"2"},{name:"其他时间",type:"3"}],showFieldArr:[{name:"无忧数量",field:"count"}],mescroll:null,mescrollDown:{},mescrollUp:{auto:!1,callback:this.getFuncList,onScroll:this.onScroll,page:{num:0,size:10},htmlLoading:"",htmlNodata:"",noMoreSize:0}}},computed:Object(o["a"])(Object(o["a"])({},Object(b["mapState"])({jumpNewPage:function(t){return t.jumpNewPage}})),{},{datalength:function(){return this.orgArr.length+this.employeeArr.length},defaultDate:function(){return[new Date(this.filterObj.start_time),new Date(this.filterObj.end_time)]},wechatCountACtive:function(){return"count"==this.filterObj.field&&("count asc"==this.filterObj.order||"count desc"==this.filterObj.order)},orderActive:function(){return"count"==this.filterObj.field&&("count asc"==this.filterObj.order||"count desc"==this.filterObj.order)}}),mounted:function(){this.initPageData()},activated:function(){this.initPageData()},methods:Object(o["a"])(Object(o["a"])({},Object(b["mapMutations"])(["setJumpNewPage"])),{},{onScroll:function(t,e,a){this.scrollPosition=e},initPageData:function(){var t=this;this.filterObj=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{start_time:f()(new Date).format("YYYY/MM/DD"),end_time:f()(new Date).format("YYYY/MM/DD")});var e=this.$route.query;this.filterObj.org_id=e.orgid?e.orgid:"";var a=this.getSessionStorage();this.jumpNewPage?this.$nextTick((function(){t.setJumpNewPage(!1),t.switchDate({type:e.dateType||"0"},"jump",e),t.mescroll.scrollTo(0,500)})):a.orgid?(this.scrollPosition=a.position,this.orgArr=a.orgArr,this.employeeArr=a.employeeArr,this.totalObj=a.totalObj,this.filterObj=a.filterObj,this.activeItem=a.itemId,this.activeIndex=a.dateIndex,this.$nextTick((function(){t.mescroll.scrollTo(parseInt(a.position||0),0)}))):this.mescroll.resetUpScroll()},calendarOpened:function(){var t=document.querySelector(".van-calendar__body").scrollTop;document.querySelector(".van-calendar__body").scrollTop=t-1},switchDate:function(t,e,a){switch(this.activeIndex=t.type,t.type){case"0":this.filterObj=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{start_time:f()(new Date).format("YYYY/MM/DD"),end_time:f()(new Date).format("YYYY/MM/DD")}),this.mescroll.resetUpScroll();break;case"1":this.filterObj=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{start_time:this.utils.getCurrentWeekFirstDay(),end_time:this.utils.getCurrentWeekLastDay()}),this.mescroll.resetUpScroll();break;case"2":this.filterObj=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{start_time:this.utils.getmonthfirstday(),end_time:this.utils.getmonthlastday()}),this.mescroll.resetUpScroll();break;case"3":if("jump"==e){var i=a.start_time,s=a.end_time;this.filterObj=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{start_time:i,end_time:s}),this.mescroll.resetUpScroll()}else this.showCalendar=!0;break;default:this.mescroll.resetUpScroll();break}},getWeekDate:function(){var t=new Date,e=t.getTime()-5184e5,a=f()(new Date(e)).format("YYYY/MM/DD"),i=f()(t).format("YYYY/MM/DD");return{start_time:a,end_time:i}},getMonthDate:function(){var t=new Date,e=t.getTime()-2592e6,a=f()(new Date(e)).format("YYYY/MM/DD"),i=f()(t).format("YYYY/MM/DD");return{start_time:a,end_time:i}},onConfirm:function(t){var e=Object(r["a"])(t,2),a=e[0],i=e[1];this.filterObj=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{start_time:f()(a).format("YYYY/MM/DD"),end_time:f()(i).format("YYYY/MM/DD")}),this.mescroll.resetUpScroll(),this.showCalendar=!1},sortFunc:function(t){this.filterObj.field=t,"count asc"==this.filterObj.order?this.filterObj.order="count desc":this.filterObj.order="count asc",this.mescroll.resetUpScroll()},setSessionStorage:function(){var t={position:this.scrollPosition,orgArr:this.orgArr,employeeArr:this.employeeArr,totalObj:this.totalObj,filterObj:this.filterObj,orgid:this.filterObj.org_id||"0",itemId:this.activeItem,dateIndex:this.activeIndex};sessionStorage.setItem("sellcard#".concat(this.filterObj.org_id),JSON.stringify(t))},getSessionStorage:function(){var t=sessionStorage.getItem("sellcard#".concat(this.filterObj.org_id))?JSON.parse(sessionStorage.getItem("sellcard#".concat(this.filterObj.org_id))):{};return t},jumpWechatPage:function(t,e){if(this.activeItem=t.id,this.setSessionStorage(),this.setJumpNewPage(!0),"depart"==e){var i=(new Date).getTime();this.$$router.addRoute({path:"/".concat(i),name:"".concat(i),component:function(){return a.e("chunk-3a8857d0").then(a.bind(null,"6fe7"))},meta:{title:"无忧统计|".concat(t.name)}}),this.$router.push({path:"/".concat(i),query:{orgid:t.id,type:"depart",dateType:this.activeIndex,start_time:this.filterObj.start_time,end_time:this.filterObj.end_time}})}else this.$router.push({path:"/sellcardCus",query:{eid:t.id,type:"employee",dateType:this.activeIndex,start_time:this.filterObj.start_time,end_time:this.filterObj.end_time,name:t.name,orgName:this.totalObj.org_name}})},mescrollInit:function(t){this.mescroll=t},getFuncList:function(t,e){var a=this;a.loadFlag=!0,a.datashow=!1,1===t.num&&(this.topfun(t),this.orgfun(t)),this.employeefun(t,e)},topfun:function(t){var e=this,a=Object(o["a"])({},this.filterObj);Object.keys(a).forEach((function(t){a[t]||delete a[t]})),Object(d["x"])(a).then((function(t){"0"==t.data.code&&(e.totalObj=t.data.data)}))},orgfun:function(){var t=this,e=Object(o["a"])({},this.filterObj);Object.keys(e).forEach((function(t){e[t]||delete e[t]})),Object(d["y"])(e).then((function(e){"0"==e.data.code&&(t.orgArr=e.data.data)}))},employeefun:function(t,e){var a=this,i=this,s=Object(o["a"])(Object(o["a"])({},this.filterObj),{},{page:t.num,limit:10});Object.keys(s).forEach((function(t){s[t]||delete s[t]})),Object(d["w"])(s).then((function(s){"0"==s.data.code&&(1===t.num?a.employeeArr=s.data.data:a.employeeArr=a.employeeArr.concat(s.data.data),i.$nextTick((function(){e.endSuccess(s.data.data.length)}))),i.loadFlag=!1,i.datashow=!0}))}})},v=j,g=(a("5c13"),a("2877")),O=Object(g["a"])(v,s,n,!1,null,"4ec48fc9",null);e["default"]=O.exports}}]);