chunk-d1eabb1c.ece23a65.js 9.1 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-d1eabb1c"],{"0b65":function(t,e,a){"use strict";e.a={shortcuts:[{text:"今天",value:function(){var t=new Date,e=new Date;return e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),[e,t]}},{text:"昨天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),[e,t]}},{text:"最近7天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-6))),[e,t]}},{text:"最近30天",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-29))),[e,t]}},{text:"上月",value:function(){var t=new Date,e=new Date,a=new Date(e.getFullYear(),e.getMonth(),0).getDate();return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth()-1,a))),[e,t]}},{text:"本月",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),[e,t]}},{text:"本年",value:function(){var t=new Date,e=new Date;return e.setTime(e.setTime(new Date((new Date).getFullYear(),0,1))),[e,t]}}]}},"61f7":function(t,e,a){"use strict";function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function r(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(a,!0).forEach((function(e){i(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function o(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in a)if(new RegExp("(".concat(n,")")).test(e)){var r=a[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?r:s(r))}return e}function s(t){return("00"+t).substr(t.length)}a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return u})),a.d(e,"b",(function(){return d}));var l={min:"%s最小长度为:min",max:"%s最大长度为:max",length:"%s长度必须为:length",range:"%s长度为:range",pattern:"$s格式错误"},c=function(t,e){t.message=function(t){return e.replace("%s",t||"")}};function u(t){return r({required:!0,message:t,type:"string"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function d(t){return f.pattern(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,t)}c(u,"请输入%s"),c(d,"%s格式不正确");var f=Object.keys(l).reduce((function(t,e){return t[e]=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o="range"===e?{min:t[0],max:t[1]}:i({},e,t);return r({message:a.replace(":".concat(e),"range"===e?"".concat(t[0],"-").concat(t[1]):t),type:"string"},o,{},n)},c(t[e],l[e]),t}),{})},fc59:function(t,e,a){"use strict";a.r(e);var n=a("a34a"),r=a.n(n),i=a("2f62"),o=a("0b65"),s=a("8593"),l=a("61f7");function c(t,e,a,n,r,i,o){try{var s=t[i](o),l=s.value}catch(t){return void a(t)}s.done?e(l):Promise.resolve(l).then(n,r)}function u(t){return function(){var e=this,a=arguments;return new Promise((function(n,r){var i=t.apply(e,a);function o(t){c(i,n,r,o,s,"next",t)}function s(t){c(i,n,r,o,s,"throw",t)}o(void 0)}))}}function d(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function f(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var m={name:"systemLog",filters:{formatDate:function(t){if(0!==t){var e=new Date(1e3*t);return Object(l.a)(e,"yyyy-MM-dd hh:mm")}}},data:function(){return{fromList:{title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},timeVal:[],options:o.a,formValidate:{limit:20,page:1,pages:"",data:"",path:"",ip:"",admin_id:""},loading:!1,tabList:[],total:0,columns4:[{title:"ID",key:"id",width:80},{title:"ID/名称",slot:"nickname",minWidth:100},{title:"链接",key:"path",minWidth:300},{title:"行为",key:"page",minWidth:150},{title:"操作ip",key:"ip",minWidth:150},{title:"类型",key:"type",minWidth:100},{title:"操作时间",slot:"add_time",minWidth:150}],dataList:[]}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?d(a,!0).forEach((function(e){f(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):d(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(i.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){this.getSearchAdmin(),this.getList()},methods:{onchangeTime:function(t){this.timeVal=t,this.formValidate.data=this.timeVal[0]?this.timeVal.join("-"):"",this.formValidate.page=1},selectChange:function(t){this.formValidate.data=t,this.timeVal=[],this.formValidate.page=1,this.getList()},getSearchAdmin:function(){var t=this;Object(s.S)().then(function(){var e=u(r.a.mark((function e(a){return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.dataList=a.data.info;case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$Message.error(e.msg)}))},getList:function(){var t=this;this.loading=!0,Object(s.Z)(this.formValidate).then(function(){var e=u(r.a.mark((function e(a){var n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.tabList=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},userSearchs:function(){this.formValidate.page=1,this.getList()}}},p=a("2877"),g=Object(p.a)(m,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[a("div",{staticClass:"new_card_pd"},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,inline:"","label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:t.fromList.title+":"}},[a("DatePicker",{staticClass:"input-add",attrs:{editable:!1,value:t.timeVal,format:"yyyy/MM/dd",type:"datetimerange",placement:"bottom-start",placeholder:"自定义时间",options:t.options},on:{"on-change":t.onchangeTime}})],1),a("FormItem",{attrs:{label:"名称:"}},[a("Select",{staticClass:"input-add",attrs:{clearable:""},model:{value:t.formValidate.admin_id,callback:function(e){t.$set(t.formValidate,"admin_id",e)},expression:"formValidate.admin_id"}},t._l(t.dataList,(function(e,n){return a("Option",{key:n,attrs:{value:e.id}},[t._v(t._s(e.real_name))])})),1)],1),a("FormItem",{attrs:{label:"链接:"}},[a("Input",{staticClass:"input-add",attrs:{placeholder:"请输入链接",clearable:""},model:{value:t.formValidate.path,callback:function(e){t.$set(t.formValidate,"path",e)},expression:"formValidate.path"}})],1),a("FormItem",{attrs:{label:"IP:"}},[a("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入IP",clearable:""},model:{value:t.formValidate.ip,callback:function(e){t.$set(t.formValidate,"ip",e)},expression:"formValidate.ip"}}),a("Button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("div",{staticClass:"table_box"}),a("Table",{ref:"selection",attrs:{columns:t.columns4,data:t.tabList,loading:t.loading,"no-data-text":"暂无数据","highlight-row":"","no-filtered-data-text":"暂无筛选结果"},scopedSlots:t._u([{key:"nickname",fn:function(e){var n=e.row;return[a("span",[t._v(t._s(n.admin_id+" / "+n.admin_name))])]}},{key:"add_time",fn:function(e){var n=e.row;return[a("span",[t._v(" "+t._s(t._f("formatDate")(n.add_time)))])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"1a1a2b2b",null);e.default=g.exports}}]);