|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7cc4723d"],{"125c":function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"home"},[o("div",{staticClass:"stat"},[o("div",{staticClass:"stat-user"},[o("div",{staticClass:"stat-user__title"},[t._v(" 后台管理系统模板 ")]),o("div",{staticClass:"stat-user__detail"},[o("p",[t._v("欢迎您,"+t._s(t.username))]),o("p",[t._v("当前时间:"+t._s(t.nowTime))])]),o("img",{staticClass:"stat-user__portrait",attrs:{src:"portrait.jpg",alt:""}})]),o("div",{staticClass:"stat-info"},t._l(t.stat,(function(e,i){return o("el-row",{key:i,attrs:{gutter:20}},t._l(e,(function(e,i){return o("el-col",{key:i,attrs:{span:8}},[o("div",{staticClass:"stat-info__item"},[o("div",{staticClass:"stat-info__icon",style:{"background-color":e.bgColor}},[o("i",{class:e.icon})]),o("div",{staticClass:"stat-info__detail"},[o("p",{staticClass:"stat-info__total"},[t._v(t._s(e.total))]),o("p",{staticClass:"stat-info__title"},[t._v(t._s(e.title))])])])])})),1)})),1)]),o("el-row",{staticClass:"margin-t-20 list",attrs:{gutter:20}},[o("el-col",{attrs:{span:12}},[o("el-card",[o("div",{attrs:{slot:"header"},slot:"header"},[o("span",{staticStyle:{cursor:"pointer"},on:{click:t.openTodoList}},[o("i",{staticClass:"el-icon-tickets margin-r-5"}),t._v("待办事项")]),o("i",{staticClass:"el-icon-plus",attrs:{title:"新增"},on:{click:t.addNewTodoItem}})]),t._l(t.todoList.slice(0,10),(function(e,i){return o("p",{key:i},[o("el-checkbox",{on:{change:function(o){return t.changeSatus(e)}},model:{value:e.status,callback:function(o){t.$set(e,"status",o)},expression:"item.status"}}),t._v(" "),o("span",{class:{active:e.status}},[t._v(t._s(e.content))])],1)}))],2)],1),o("el-col",{attrs:{span:12}},[o("el-card",[o("div",{attrs:{slot:"header"},slot:"header"},[o("span",[o("i",{staticClass:"el-icon-news margin-r-5"}),t._v("最新消息")])]),t._l(t.latestNewList,(function(e,i){return o("p",{key:i},[o("span",{staticClass:"latest-new-list__time"},[o("i",{staticClass:"el-icon-time margin-r-5"}),t._v(t._s(e.time)+":")]),o("span",[t._v(t._s(e.title))])])})),o("span",[t._v("more")])],2)],1)],1),o("el-dialog",{attrs:{title:"待办事项",visible:t.todoListDialog,width:"770px"},on:{"update:visible":function(e){t.todoListDialog=e}}},[o("el-tabs",{model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[o("el-tab-pane",{attrs:{label:"待办事项",name:"first"}},[o("div",{staticClass:"todolist-box"},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.todoList.filter((function(t){return!t.status}))}},[o("el-table-column",{attrs:{type:"index",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-checkbox",{on:{change:function(o){return t.changeSatus(e.row)}},model:{value:e.row.status,callback:function(o){t.$set(e.row,"status",o)},expression:"scope.row.status"}})]}}])}),o("el-table-column",{attrs:{prop:"createTime",label:"创建时间",width:"180","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{prop:"content",label:"内容",width:"420","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{label:"操作",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(o){return t.removeTodoList(e.row)}}})]}}])})],1)],1)]),o("el-tab-pane",{attrs:{label:"已完成",name:"second"}},[o("div",{staticClass:"todolist-box"},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.todoList.filter((function(t){return t.status}))}},[o("el-table-column",{attrs:{type:"index",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-checkbox",{on:{change:function(o){return t.changeSatus(e.row)}},model:{value:e.row.status,callback:function(o){t.$set(e.row,"status",o)},expression:"scope.row.status"}})]}}])}),o("el-table-column",{attrs:{prop:"completeTime",label:"完成时间",width:"180","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{prop:"content",label:"内容",width:"420","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{label:"操作",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",type:"danger",icon:"el-icon-delete",circle:""},on:{click:function(o){return t.removeTodoList(e.row)}}})]}}])})],1)],1)]),o("el-tab-pane",{attrs:{label:"回收站",name:"thrid"}},[o("div",{staticClass:"todolist-box"},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.delTodoList}},[o("el-table-column",{attrs:{type:"index",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-checkbox",{attrs:{disabled:""},model:{value:e.row.status,callback:function(o){t.$set(e.row,"status",o)},expression:"scope.row.status"}})]}}])}),o("el-table-column",{attrs:{prop:"createTime",label:"创建时间",width:"180","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{prop:"content",label:"内容",width:"110","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{prop:"completeTime",label:"完成时间",width:"180","show-overflow-tooltip":""}}),o("el-table-column",{attrs:{label:"操作",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",type:"success",plain:""},on:{click:function(o){return t.recoverTodoList(e.row)}}},[t._v("还原")]),o("el-button",{attrs:{size:"mini",type:"danger",plain:""},on:{click:function(o){return t.deleteTodoList(e.row)}}},[t._v("彻底删除")])]}}])})],1)],1)])],1)],1)],1)},n=[];o("4de4"),o("99af"),o("bbd5"),o("ac1f"),o("466d");function a(){var t=navigator.userAgent.toLocaleLowerCase(),e=null;if(null!=t.match(/msie/)||null!=t.match(/trident/))e="IE";else if(null!=t.match(/firefox/))e="firefox";else if(null!=t.match(/ucbrowser/))e="UC";else if(null!=t.match(/opera/)||null!=t.match(/opr/))e="opera";else if(null!=t.match(/bidubrowser/))e="baidu";else if(null!=t.match(/metasr/))e="sougou";else if(null!=t.match(/tencenttraveler/)||null!=t.match(/qqbrowse/))e="QQ";else if(null!=t.match(/maxthon/))e="maxthon";else if(null!=t.match(/chrome/)){var o=s("type","application/vnd.chromium.remoting-viewer");e=o?"360":"chrome"}else e=null!=t.match(/safari/)?"Safari":"others";return e}function s(t,e){var o=navigator.mimeTypes;for(var i in o)if(o[i][t]===e)return!0;return!1}function r(){var t=navigator.userAgent.toLocaleLowerCase(),e="win32"===navigator.platform||"windows"===navigator.platform,o="mac68k"===navigator.platform||"macppc"===navigator.platform||"macintosh"===navigator.platform||"macintel"===navigator.platform;if(o)return"Mac";var i="x11"===navigator.platform&&!e&&!o;if(i)return"Unix";var n=String(navigator.platform).indexOf("linux")>-1;if(n)return"Linux";if(e){var a=t.indexOf("windows nt 5.0")>-1||t.indexOf("windows 2000")>-1;if(a)return"Win2000";var s=t.indexOf("windows nt 5.1")>-1||t.indexOf("windows xp")>-1;if(s)return"WinXP";var r=t.indexOf("windows nt 5.2")>-1||t.indexOf("windows 2003")>-1;if(r)return"Win2003";var l=t.indexOf("windows nt 6.0")>-1||t.indexOf("windows vista")>-1;if(l)return"WinVista";var c=t.indexOf("windows nt 6.1")>-1||t.indexOf("windows 7")>-1;if(c)return"Win7"}return t.indexOf("android")>-1?"Android":t.indexOf("iphone")>-1?"iPhone":t.indexOf("symbianos")>-1?"SymbianOS":t.indexOf("windows phone")>-1?"Windows Phone":t.indexOf("ipad")>-1?"iPad":t.indexOf("ipod")>-1?"iPod":"others"}for(var l=[],c=0;c<10;c++)l.push({time:new Date((new Date).getTime()+24*c*3600*1e3).Format("yyyy-MM-dd"),title:"今日的最新新闻来咯~~~"});var u={name:"Home",data:function(){return{stat:[[{icon:"el-icon-service",title:"公司总员工数",total:198397,bgColor:"#ebcc6f"},{icon:"el-icon-location-outline",title:"客户分布区域",total:19,bgColor:"#3acaa9"},{icon:"el-icon-star-off",title:"收货好评",total:190857,bgColor:"#67c4ed"}],[{icon:"el-icon-edit-outline",title:"历史订单数",total:9397,bgColor:"#af84cb"},{icon:"el-icon-share",title:"产品总转发数量",total:9097,bgColor:"#67c4ed"},{icon:"el-icon-goods",title:"产品总数",total:397,bgColor:"#ebcc6f"}]],username:localStorage.getItem("username"),nowTime:(new Date).Format("yyyy-MM-dd hh:mm:ss"),todoList:[],delTodoList:[],latestNewList:l,visitorInfo:{ip:"",area:"",brower:"",os:""},todoListDialog:!1,activeName:"first"}},methods:{setNowTime:function(){var t=this;setInterval((function(){t.nowTime=(new Date).Format("yyyy-MM-dd hh:mm:ss")}),1e3)},getTodoList:function(){var t=this;this.$axios.get("/api/home/getTodoList").then((function(e){var o=e.data;o.success?(t.todoList=o.data.filter((function(t){return!t.delState})),t.delTodoList=o.data.filter((function(t){return t.delState}))):t.$message.warning("获取待办事项列表失败!")})).catch((function(e){console.log(e),t.$message.error("获取待办事项失败!")}))},addNewTodoItem:function(){var t=this;this.$prompt("请输入待办事项主题","新增待办事项",{confirmButtonText:"确定",cancelButtonText:"取消"}).then((function(e){var o=e.value;t.doAddTodoList(o)})).catch((function(){t.$message({type:"info",message:"取消新增待办事项"})}))},doAddTodoList:function(t){var e=this;this.$axios.post("/api/home/addTodoList",{content:t}).then((function(t){var o=t.data;o.success?(e.$message.success("新增待办事项成功!"),e.getTodoList()):e.$message.warning("新增待办事项失败!")})).catch((function(t){console.log(t),e.$message.error("新增待办事项失败!")}))},removeTodoList:function(t){var e=this;this.$confirm("是否删除本条记录?","提示",{comfirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){e.$axios.post("/api/home/removeTodoList",t).then((function(t){var o=t.data;o.success?(e.$message.success("移除成功"),e.getTodoList()):e.$message.warning("移除失败")})).catch((function(t){console.log(t),e.$message.error("移除失败")}))})).catch((function(){}))},recoverTodoList:function(t){var e=this;this.$axios.post("/api/home/recoverTodoList",t).then((function(t){var o=t.data;o.success?(e.$message.success("还原成功"),e.getTodoList()):e.$message.warning("还原失败")})).catch((function(t){console.log(t),e.$message.error("还原失败")}))},deleteTodoList:function(t){var e=this;this.$confirm("是否彻底删除本条记录?","提示",{comfirmButtonText:"确定",cancelButtonText:"取消"}).then((function(){e.$axios.post("/api/home/deleteTodoList",t).then((function(t){var o=t.data;o.success?(e.$message.success("删除成功"),e.getTodoList()):e.$message.warning("删除失败")})).catch((function(t){console.log(t),e.$message.error("删除失败")}))})).catch((function(){}))},changeSatus:function(t){var e=this;this.$axios.post("/api/home/updateTodoList",t).then((function(t){var o=t.data;o.success?e.getTodoList():e.$message.warning("修改失败")})).catch((function(t){console.log(t),e.$message.error("修改失败")}))},openTodoList:function(){this.todoListDialog=!0},getVisitorInfo:function(){this.visitorInfo.ip=sessionStorage.getItem("ip"),this.visitorInfo.area=sessionStorage.getItem("area"),this.visitorInfo.brower=a(),this.visitorInfo.os=r(),console.log("ip: ".concat(this.visitorInfo.ip,",地区:").concat(this.visitorInfo.area,",\n 浏览器:").concat(this.visitorInfo.brower,",操作系统:").concat(this.visitorInfo.os))}},mounted:function(){this.setNowTime(),this.getVisitorInfo(),this.getTodoList()}},d=u,f=(o("7659"),o("5abe"),o("2877")),m=Object(f["a"])(d,i,n,!1,null,"05a4154c",null);e["default"]=m.exports},"466d":function(t,e,o){"use strict";var i=o("d784"),n=o("825a"),a=o("50c4"),s=o("577e"),r=o("1d80"),l=o("8aa5"),c=o("14c3");i("match",(function(t,e,o){return[function(e){var o=r(this),i=void 0==e?void 0:e[t];return void 0!==i?i.call(e,o):new RegExp(e)[t](s(o))},function(t){var i=n(this),r=s(t),u=o(e,i,r);if(u.done)return u.value;if(!i.global)return c(i,r);var d=i.unicode;i.lastIndex=0;var f,m=[],h=0;while(null!==(f=c(i,r))){var v=s(f[0]);m[h]=v,""===v&&(i.lastIndex=l(r,a(i.lastIndex),d)),h++}return 0===h?null:m}]}))},"4de4":function(t,e,o){"use strict";var i=o("23e7"),n=o("b727").filter,a=o("1dde"),s=a("filter");i({target:"Array",proto:!0,forced:!s},{filter:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},"5abe":function(t,e,o){"use strict";o("bcd2")},7659:function(t,e,o){"use strict";o("a791")},"99af":function(t,e,o){"use strict";var i=o("23e7"),n=o("d039"),a=o("e8b5"),s=o("861d"),r=o("7b0b"),l=o("50c4"),c=o("8418"),u=o("65f0"),d=o("1dde"),f=o("b622"),m=o("2d00"),h=f("isConcatSpreadable"),v=9007199254740991,p="Maximum allowed index exceeded",w=m>=51||!n((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),g=d("concat"),b=function(t){if(!s(t))return!1;var e=t[h];return void 0!==e?!!e:a(t)},x=!w||!g;i({target:"Array",proto:!0,forced:x},{concat:function(t){var e,o,i,n,a,s=r(this),d=u(s,0),f=0;for(e=-1,i=arguments.length;e<i;e++)if(a=-1===e?s:arguments[e],b(a)){if(n=l(a.length),f+n>v)throw TypeError(p);for(o=0;o<n;o++,f++)o in a&&c(d,f,a[o])}else{if(f>=v)throw TypeError(p);c(d,f++,a)}return d.length=f,d}})},a791:function(t,e,o){},bcd2:function(t,e,o){}}]);
|