(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-481899e4"],{"2f99":function(t,e,i){"use strict";i("f700")},bda7:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("div",{staticClass:"filter-item"},[i("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"daterange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.datepicker,callback:function(e){t.datepicker=e},expression:"datepicker"}})],1),i("div",{staticClass:"filter-item"},[i("el-select",{attrs:{filterable:"",placeholder:"类型"},model:{value:t.listQuery.type,callback:function(e){t.$set(t.listQuery,"type",e)},expression:"listQuery.type"}},[i("el-option",{attrs:{label:"选择类型",value:""}}),i("el-option",{attrs:{label:"用户ID",value:"1"}}),i("el-option",{attrs:{label:"订单ID",value:"2"}}),i("el-option",{attrs:{label:"订单编号",value:"3"}}),i("el-option",{attrs:{label:"交易单号",value:"4"}}),i("el-option",{attrs:{label:"商品ID",value:"5"}})],1)],1),i("div",{staticClass:"filter-item"},[i("el-input",{staticStyle:{width:"350px"},attrs:{placeholder:"请输入关键词搜索","prefix-icon":"el-icon-search"},model:{value:t.listQuery.keyword,callback:function(e){t.$set(t.listQuery,"keyword",e)},expression:"listQuery.keyword"}})],1),i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.search}},[t._v("搜索")]),i("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-refresh"},on:{click:t.refresh}},[t._v("刷新")])],1),i("div",{staticClass:"padding-lg margin-top back-white"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.list,border:"",fit:"","highlight-current-row":""}},[i("el-table-column",{attrs:{label:"ID",sortable:"custom",align:"center",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[i("span",[t._v(t._s(a.id))])]}}])}),i("el-table-column",{attrs:{label:"操作用户",width:"100",property:"username",align:"center"}}),i("el-table-column",{attrs:{label:"操作内容",width:"200",property:"title",align:"center"}}),i("el-table-column",{attrs:{label:"操作内容详情",property:"content",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[i("div",[i("div",{ref:"content",class:{"content-collapse":!a.isExpanded},staticStyle:{"text-align":"left"},domProps:{innerHTML:t._s(a.content)}}),t.isOverTwoLines(a)?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.toggleExpand(a)}}},[t._v(" "+t._s(a.isExpanded?"收起":"展开")+" ")]):t._e()],1)]}}])}),i("el-table-column",{attrs:{label:"操作IP",width:"200",property:"ip",align:"center"}}),i("el-table-column",{attrs:{label:"操作时间",width:"200",property:"createtime",align:"center"}})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},pagination:t.getList}})],1),i("copyright")],1)},l=[],s=i("7f70"),n=(i("9ca6"),i("5c41"),i("0c43"),i("6994"),i("8327")),r=i("333d"),o={name:"OperLog",components:{Pagination:r["a"]},data:function(){return{list:null,total:0,listLoading:!0,dialogFormVisible:!1,listQuery:{page:1,type:"",startTime:"",endTime:"",keyword:"",limit:10},datepicker:""}},computed:Object(s["a"])({},Object(n["b"])(["config"])),created:function(){this.getList()},methods:{refresh:function(){this.getList()},search:function(){this.listQuery.page=1,this.getList()},getList:function(){var t=this;this.listLoading=!0,this.datepicker&&(this.listQuery.startTime=this.datepicker[0],this.listQuery.endTime=this.datepicker[1]),this.api.get("auth/getOperLog",this.listQuery).then((function(e){t.listLoading=!1,1==e.code?(t.list=e.data.list.map((function(t){return Object(s["a"])(Object(s["a"])({},t),{},{isExpanded:!1})})),t.total=e.data.total):t.$util.error(e.message||e.msg||"数据异常")}))},toggleExpand:function(t){t.isExpanded=!t.isExpanded},isOverTwoLines:function(t){var e=document.createElement("div");e.style.width="100%",e.style.position="absolute",e.style.visibility="hidden",e.style.lineHeight="20px",e.innerHTML=t.content,document.body.appendChild(e);var i=e.offsetHeight;return document.body.removeChild(e),i>40}}},c=o,d=(i("2f99"),i("3d7a")),u=Object(d["a"])(c,a,l,!1,null,null,null);e["default"]=u.exports},f700:function(t,e,i){}}]);