You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
12 KiB
1 lines
12 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b8dd39a"],{"3f4f":function(t,e,a){},9256:function(t,e,a){"use strict";a("99af"),a("4160"),a("caad"),a("4fad"),a("d3b7"),a("159b");var n=a("5530"),i=a("bc3a"),s=a.n(i),r=a("5c96"),o=a("5657");a("27ae");function l(t,e){"ECONNABORTED"===t.code?Object(r["Message"])({message:"请求超时"}):t.response&&t.response.data?Object(r["Message"])({message:t.response.data}):t.message&&Object(r["Message"])({message:t.message}),e(t)}function c(t,e){t.data.isError&&(4e4===t.data.code||40001===t.data.code||40002===t.data.code||40003===t.data.code||40005===t.data.code||40006===t.data.code||40008===t.data.code?r["MessageBox"].alert(t.data.msg,"提醒",{confirmButtonText:"确定",callback:function(){window.location.hash="/login"}}):r["Message"].error(t.data.msg)),e(t)}s.a.interceptors.request.use((function(t){var e=!1!==t.headers["X-isToken"]||t.headers["X-isToken"],a=o["a"].get("TOKEN","");a&&e&&(t.headers.token="Bearer "+a);var n="ceres_admin_web",i="ceres_admin_web";return t.headers["Authorization"]="Basic ".concat("".concat(n,":").concat(i)),t}),(function(t){return Promise.reject(t)})),s.a.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)}));var u=function(t){console.log(t,"opts");var e={ts:Date.now()},a=t.method.toUpperCase(),i={method:a,url:"".concat("https://pos.admin.api.lotus-wallet.com").concat(t.url),responseType:t.responseType||"",timeout:2e4},r=["PUT","POST","PATCH"];r.includes(a)?i.data=t.data||{}:i.params=Object(n["a"])(Object(n["a"])({},e),t.data||{}),t.formData&&(i.transformRequest=[function(t){var e=new FormData;return t&&Object.entries(t).forEach((function(t){e.append(t[0],t[1])})),e}]);var o=new Promise((function(t,e){s()(i).then((function(e){c(e,t)})).catch((function(t){l(t,e)}))}));return o};e["a"]=u},9406:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"main"},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:24,xs:24}},[a("div",{staticClass:"app-container user-container"},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"user-wrapper"},[a("div",{staticClass:"user-header"},[a("img",{attrs:{src:t.avatar,alt:"avatar"}})]),a("div",{staticClass:"user-info"},[a("div",{staticClass:"random-message"},[t._v(t._s(t.welcomeMessage))]),a("div",{staticClass:"user-dept"},[a("span",[t._v(t._s(t.user.workDescribe?t.user.workDescribe:t.$t("common.workDescribe")))])]),a("div",{staticClass:"user-login-info"},[t._v(" "+t._s(t.$t("common.lastLoginTime"))+": "),a("span",{attrs:{id:"last-login-time"}},[t._v(t._s(t.user.lastLoginTime?t.user.lastLoginTime:t.$t("common.firstLogin")))])])])])]),a("el-col",{attrs:{sm:12,xs:24}},[a("div",{staticClass:"user-visits"},[a("el-row",{staticStyle:{"margin-bottom":".7rem"}},[a("el-col",{attrs:{offset:4,span:4}},[t._v(t._s(t.$t("common.todayIp")))]),a("el-col",{attrs:{offset:4,span:4}},[t._v(t._s(t.$t("common.todayVisit")))]),a("el-col",{attrs:{offset:4,span:4}},[t._v(t._s(t.$t("common.TotalVisit")))])],1),a("el-row",[a("el-col",{staticClass:"num",attrs:{offset:4,span:4}},[a("el-link",{attrs:{type:"primary"}},[a("countTo",{attrs:{duration:3e3,"end-val":t.todayIp,"start-val":0}})],1)],1),a("el-col",{staticClass:"num",attrs:{offset:4,span:4}},[a("el-link",{attrs:{type:"primary"}},[a("countTo",{attrs:{duration:3e3,"end-val":t.todayVisit,"start-val":0}})],1)],1),a("el-col",{staticClass:"num",attrs:{offset:4,span:4}},[a("el-link",{attrs:{type:"primary"}},[a("countTo",{attrs:{duration:3e3,"end-val":t.totalVisit,"start-val":0}})],1)],1)],1)],1)])],1)],1)])],1)],1)},i=[],s=(a("99af"),a("b0c0"),a("a9e3"),a("313e")),r=a.n(s),o=a("ec1b"),l=a.n(o),c=a("ed08"),u={data:function(){return{$_sidebarElm:null}},mounted:function(){var t=this;this.__resizeHandler=Object(c["a"])((function(){t.chart&&t.chart.resize()}),100),window.addEventListener("resize",this.__resizeHandler),this.$_sidebarElm=document.getElementsByClassName("sidebar-container")[0],this.$_sidebarElm&&this.$_sidebarElm.addEventListener("transitionend",this.$_sidebarResizeHandler)},beforeDestroy:function(){window.removeEventListener("resize",this.__resizeHandler),this.$_sidebarElm&&this.$_sidebarElm.removeEventListener("transitionend",this.$_sidebarResizeHandler)},methods:{$_sidebarResizeHandler:function(t){"width"===t.propertyName&&this.__resizeHandler()}}},d=a("9256"),m={getVisitList:"/dashboard/visit"},h={getVisitList:function(t){return Object(d["a"])({method:"GET",url:m.getVisitList,data:t})}},p={name:"Dashboard",components:{countTo:l.a},mixins:[u],data:function(){return{welcomeMessage:"",todayIp:0,todayVisit:0,totalVisit:0,chart:null,projects:[{name:"SpringBoot",des:"Spring Boot 2.1.2",avatar:"F"},{name:"SpringCloud",des:"Spring Cloud Greenwich.RELEASE",avatar:"F"},{name:"Spring Cloud alibaba",des:"SpringCloudAlibaba2.1.0.RELEASE & nacos & seata & Sentinel",avatar:"S"},{name:"Mybatis-Plus",des:"Mybatis-plus 3.2.0:Mybatis 增强组件",avatar:"F"},{name:"J2cache",des:"J2cache2.7.8: 二级缓存框架",avatar:"F"},{name:"文件存储API",des:"封装文件接口,实现本地存储、阿里云、FastDFS存储的配置化",avatar:"F"}]}},computed:{user:function(){return this.$store.state.account.user},avatar:function(){return a("fd89")}},mounted:function(){this.welcomeMessage=this.welcome()},methods:{welcome:function(){var t=new Date,e=t.getHours(),a=e<6||e<=11?this.$t("common.goodMorning"):e<=13||e<=18?this.$t("common.goodAfternoon"):this.$t("common.goodEvening"),n=[this.$t("common.randomMessage.a"),this.$t("common.randomMessage.b"),this.$t("common.randomMessage.c"),this.$t("common.randomMessage.d"),this.$t("common.randomMessage.e"),this.$t("common.randomMessage.f"),this.$t("common.randomMessage.g"),this.$t("common.randomMessage.h"),this.$t("common.randomMessage.i")],i=Math.floor(Math.random()*n.length);return"".concat(a,", ").concat(this.user.name,", ").concat(n[i])},initIndexData:function(){var t=this;h.getVisitList({}).then((function(e){var a=e.data,n=a.data;t.todayIp=Number(n.todayIp),t.totalVisit=Number(n.totalVisitCount),t.todayVisit=Number(n.todayVisitCount);var i=[],s=[],o=[];for(var l in n.lastTenVisitCount)for(var c in n.lastTenVisitCount[l])s.push(c),i.push(n.lastTenVisitCount[l][c]),o.push(n.lastTenUserVisitCount[l][c]);t.chart=r.a.init(document.getElementById("visit-count-chart"));var u={backgroundColor:"#FFF",title:{text:t.$t("common.visitTitle")+"\n",textStyle:{fontSize:14}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:[t.$t("common.you"),t.$t("common.total")],top:"18"},grid:{left:"3%",right:"5%",bottom:"3%",containLabel:!0,show:!1},toolbox:{feature:{dataView:{show:!1,readOnly:!1}}},xAxis:{type:"category",boundaryGap:!0,splitLine:{show:!1},data:s,axisLine:{lineStyle:{color:"#333"}}},yAxis:[{type:"value",splitLine:{lineStyle:{type:"dashed",color:"#DDD"}},axisLine:{show:!1,lineStyle:{color:"#333"}},nameTextStyle:{color:"#999"},splitArea:{show:!1}}],series:[{name:t.$t("common.you"),type:"bar",barWidth:"25%",color:"rgb(0, 227, 150)",data:o},{name:t.$t("common.total"),type:"bar",barWidth:"25%",color:"rgb(0, 143, 251)",data:i}]};t.chart.setOption(u)}))}}},f=p,v=(a("c038"),a("2877")),b=Object(v["a"])(f,n,i,!1,null,"12b5e988",null);e["default"]=b.exports},c038:function(t,e,a){"use strict";var n=a("3f4f"),i=a.n(n);i.a},ec1b:function(t,e,a){!function(e,a){t.exports=a()}(0,(function(){return function(t){function e(n){if(a[n])return a[n].exports;var i=a[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var a={};return e.m=t,e.c=a,e.i=function(t){return t},e.d=function(t,a,n){e.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=2)}([function(t,e,a){var n=a(4)(a(1),a(5),null,null);t.exports=n.exports},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(3);e.default={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator:function(t){return t>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default:function(t,e,a,n){return a*(1-Math.pow(2,-10*t/n))*1024/1023+e}}},data:function(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown:function(){return this.startVal>this.endVal}},watch:{startVal:function(){this.autoplay&&this.start()},endVal:function(){this.autoplay&&this.start()}},mounted:function(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start:function(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=(0,n.requestAnimationFrame)(this.count)},pauseResume:function(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause:function(){(0,n.cancelAnimationFrame)(this.rAF)},resume:function(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,(0,n.requestAnimationFrame)(this.count)},reset:function(){this.startTime=null,(0,n.cancelAnimationFrame)(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count:function(t){this.startTime||(this.startTime=t),this.timestamp=t;var e=t-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.localStartVal-this.startVal)*(e/this.localDuration),this.countDown?this.printVal=this.printVal<this.endVal?this.endVal:this.printVal:this.printVal=this.printVal>this.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e<this.localDuration?this.rAF=(0,n.requestAnimationFrame)(this.count):this.$emit("callback")},isNumber:function(t){return!isNaN(parseFloat(t))},formatNumber:function(t){t=t.toFixed(this.decimals),t+="";var e=t.split("."),a=e[0],n=e.length>1?this.decimal+e[1]:"",i=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;i.test(a);)a=a.replace(i,"$1"+this.separator+"$2");return this.prefix+a+n+this.suffix}},destroyed:function(){(0,n.cancelAnimationFrame)(this.rAF)}}},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(0),i=function(t){return t&&t.__esModule?t:{default:t}}(n);e.default=i.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("count-to",i.default)},function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=0,i="webkit moz ms o".split(" "),s=void 0,r=void 0;if("undefined"==typeof window)e.requestAnimationFrame=s=function(){},e.cancelAnimationFrame=r=function(){};else{e.requestAnimationFrame=s=window.requestAnimationFrame,e.cancelAnimationFrame=r=window.cancelAnimationFrame;for(var o=void 0,l=0;l<i.length&&(!s||!r);l++)o=i[l],e.requestAnimationFrame=s=s||window[o+"RequestAnimationFrame"],e.cancelAnimationFrame=r=r||window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"];s&&r||(e.requestAnimationFrame=s=function(t){var e=(new Date).getTime(),a=Math.max(0,16-(e-n)),i=window.setTimeout((function(){t(e+a)}),a);return n=e+a,i},e.cancelAnimationFrame=r=function(t){window.clearTimeout(t)})}e.requestAnimationFrame=s,e.cancelAnimationFrame=r},function(t,e){t.exports=function(t,e,a,n){var i,s=t=t||{},r=typeof t.default;"object"!==r&&"function"!==r||(i=t,s=t.default);var o="function"==typeof s?s.options:s;if(e&&(o.render=e.render,o.staticRenderFns=e.staticRenderFns),a&&(o._scopeId=a),n){var l=Object.create(o.computed||null);Object.keys(n).forEach((function(t){var e=n[t];l[t]=function(){return e}})),o.computed=l}return{esModule:i,exports:s,options:o}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",[t._v("\n "+t._s(t.displayValue)+"\n")])},staticRenderFns:[]}}])}))}}]); |