20.867ddd3674efc67913c4.1706754571694+.js 7.0 KB

1
  1. webpackJsonp([20],{"3ZNL":function(t,e){e.endianness=function(){return"LE"},e.hostname=function(){return"undefined"!=typeof location?location.hostname:""},e.loadavg=function(){return[]},e.uptime=function(){return 0},e.freemem=function(){return Number.MAX_VALUE},e.totalmem=function(){return Number.MAX_VALUE},e.cpus=function(){return[]},e.type=function(){return"Browser"},e.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},e.networkInterfaces=e.getNetworkInterfaces=function(){return{}},e.arch=function(){return"javascript"},e.platform=function(){return"browser"},e.tmpdir=e.tmpDir=function(){return"/tmp"},e.EOL="\n",e.homedir=function(){return"/"}},N9BK:function(t,e){},NdzF:function(t,e){},OLJT:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("mvHQ"),i=a.n(n),s=a("uL0Z"),r=a("XLwt"),o=a.n(r),c=(a("3ZNL"),{data:function(){var t=this;return{dataMount:{},page:0,page_size:10,list:[],chartType:"recently",echartsOptions:{xAxis:{type:"category",splitLine:{show:!1},axisLine:{lineStyle:{color:"#909399"}},axisLabel:{textStyle:{color:"#303133"}},data:[]},yAxis:{type:"value",show:!1},grid:{left:"1%",top:"15%",right:"1%",bottom:"15%"},series:[{data:[],type:"line",itemStyle:{normal:{color:"#26A2FF"}},lineStyle:{color:"#26A2FF"},symbol:"circle",label:{normal:{show:!0,position:"top",formatter:function(e,a){if("month"===t.chartType){var n=t.monthDataY;Math.max.apply(null,n),Math.min.apply(null,n);return 0==n[e.dataIndex]?"无":"第"+n[e.dataIndex]+"名"}if("week"===t.chartType){var i=t.weekDataY;return 0==i[e.dataIndex]?"无":"第"+i[e.dataIndex]+"名"}if("recently"===t.chartType){var s=t.recentDataY;return 0==s[e.dataIndex]?"无":"第"+s[e.dataIndex]+"名"}},color:"#909399"}}}]},monthDataY:[],weekDataY:[],recentDataY:[],myour:{},exectly:{}}},components:{EventItem:s.a},computed:{formParams:function(){return this.$route.query.formParams},mySelf:function(){return this.$route.query.mySelf},group_id:function(){return this.$route.query.group_id}},mounted:function(){this.lodaPerson()},methods:{loadMore:function(t){if(!this.enabledLoadpage2)return t(),!1;this.page+=1,this.lodData()},loadTop:function(t){this.page=0,this.enabledLoadpage2=!1,this.list=[],this.lodData()},lodData:function(){var t=this,e=this;e.loading=!0,e.exectly=JSON.parse(this.formParams),delete e.exectly.page,delete e.exectly.page_size,e.exectly.page=e.page,e.exectly.page_size=e.page_size;var a=e.exectly;this.$axiosKq("post","/ad/statistics/employee/event",a).then(function(a){1==a.data.code&&(0==t.page&&(e.list=[]),e.list=e.list.concat(a.data.data.list)),setTimeout(function(){e.$refs.list_scroller.finishPullToRefresh()},500),a.data.data.list.length<10&&e.$refs.list_scroller.finishInfinite(a.data.data.list.length<10),e.loading=!1,e.$toast.clear(),e.$nextTick(function(){e.enabledLoadpage2=!0})})},lodaPerson:function(){var t=this;this.myour=JSON.parse(this.mySelf),this.$axiosKq("get","/ad/statistics/employee/rank",{group_id:this.group_id}).then(function(e){if(1==e.data.code){var a=e.data.data,n=void 0===a?{}:a;t.dataMount=n,t.daliyX=t.dataMount.daily.x,t.monthDataY=t.dataMount.monthly.y,t.weekDataY=t.dataMount.weekly.y,t.recentDataY=t.dataMount.daily.y,t.drawLineChart(),t.switchChartType()}})},dataToRenderData:function(t){var e=Math.max.apply(null,t),a=Math.min.apply(null,t);return t.map(function(t){return 0==t?0:e+a-t+10})},switchChartType:function(t){if(this.chartType=t,void 0==this.chartType&&(this.chartType="recently",t="recently"),"recently"===t){this.echartsOptions.xAxis.data=this.dataMount.daily.x;var e=JSON.parse(i()(this.dataMount.daily.y)),a=this.dataToRenderData(e);this.echartsOptions.series[0].data=a}else if("week"===t){this.echartsOptions.xAxis.data=this.dataMount.weekly.x;var n=this.dataMount.weekly.y,s=this.dataToRenderData(n);this.echartsOptions.series[0].data=s}else if("month"===t){this.echartsOptions.xAxis.data=this.dataMount.monthly.x;var r=this.dataMount.monthly.y,c=this.dataToRenderData(r);this.echartsOptions.series[0].data=c}o.a.init(document.getElementById("main")).setOption(this.echartsOptions)},drawLineChart:function(){setTimeout(function(){},100)}}}),l={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"RankItemDetail"},[a("van-nav-bar",{attrs:{title:"考勤积分明细","left-text":"返回","left-arrow":""},on:{"click-left":t.$route_back}}),t._v(" "),a("div",{staticClass:"itemHeader"},[""!=t.myour.img_url?a("img",{staticClass:"avatar",attrs:{src:t.myour.img_url,alt:""}}):a("img",{staticClass:"avatar",attrs:{src:"static/images/head_default.png",alt:""}}),t._v(" "),a("div",{staticClass:"info"},[a("div",{staticClass:"name"},[t._v(t._s(t.myour.name))])]),t._v(" "),a("div",{staticClass:"pointWrapper"},[a("div",{staticClass:"point",class:{deduct:!1}},[t._v("\n "+t._s(t.myour.point)+"\n "),a("span",{staticStyle:{"font-size":"0.2rem"}},[t._v("B分")])]),t._v(" "),""==t.myour.rank?a("div",{staticClass:"times"},[t._v("暂无排名")]):a("div",{staticClass:"times"},[t._v("第"+t._s(t.myour.rank)+"名")])])]),t._v(" "),a("scroller",{ref:"list_scroller",staticClass:"scrollAll",attrs:{onInfinite:t.loadMore,refreshText:"下拉刷新",noDataText:"已经到底了",onRefresh:t.loadTop}},[a("div",{staticClass:"rankTip"},[t._v("考勤分排名")]),t._v(" "),a("div",{staticClass:"tabs"},[a("div",{staticClass:"tab",class:{active:"recently"==t.chartType},on:{click:function(e){return t.switchChartType("recently")}}},[t._v("近7天")]),t._v(" "),a("div",{staticClass:"tab",class:{active:"week"==t.chartType},on:{click:function(e){return t.switchChartType("week")}}},[t._v("近4周")]),t._v(" "),a("div",{staticClass:"tab",class:{active:"month"==t.chartType},on:{click:function(e){return t.switchChartType("month")}}},[t._v("近12月")])]),t._v(" "),a("div",{staticClass:"chartWrapper"},[a("div",{staticStyle:{width:"100%",height:"100%"},attrs:{id:"main"}})]),t._v(" "),a("div",{staticStyle:{margin:"0.2rem 0 0.2rem 0.32rem","font-size":"0.28rem",color:"#909399"}},[t._v("积分事件")]),t._v(" "),a("event-item",{ref:"jifen",attrs:{list:t.list}}),t._v(" "),a("div",{staticStyle:{"padding-bottom":"1rem"}})],1)],1)},staticRenderFns:[]};var d=a("VU/8")(c,l,!1,function(t){a("NdzF")},"data-v-90241d2a",null);e.default=d.exports},uL0Z:function(t,e,a){"use strict";var n={props:{list:{type:Array}},data:function(){return{}},created:function(){},methods:{}},i={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t._l(t.list,function(e){return a("div",{staticClass:"eventPoint"},[a("div",{staticClass:"event"},[t._v("\n "+t._s(e.remark)+"\n "),e.point<0?a("span",{staticClass:"point green"},[t._v(t._s(e.point)+" B分")]):t._e(),t._v(" "),e.point>0?a("span",{staticClass:"low red"},[t._v("+"+t._s(e.point)+" B分")]):t._e()]),t._v(" "),a("div",{staticClass:"desc"},[a("span",{staticClass:"descItem"},[t._v("时间:"+t._s(e.event_date))]),t._v(" "),a("span",{staticClass:"descItem"},[t._v(t._s(e.event_name))])])])}),t._v(" "),0==t.list.length?a("van-empty",{attrs:{description:"暂无数据"}}):t._e()],2)},staticRenderFns:[]};var s=a("VU/8")(n,i,!1,function(t){a("N9BK")},"data-v-2c3da416",null);e.a=s.exports}});