webpackJsonp([59],{dGD6:function(e,t){},pCxR:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("Dd8w"),o=a.n(r),n=a("oxYm"),l=a("NTL1"),i=a("AKaA"),s={name:"customerLog",mixins:[n.a],props:{memberId:{type:String,default:""}},data:function(){return{tableLoading:!1,tableData:[],logPageParam:{pageSize:20,currentPage:1},totalCount:0}},created:function(){this.getLogPage()},methods:{getLogPage:function(){var e=this;this.tableLoading=!0,Object(i.a)(l.a.logPage,o()({},this.logPageParam,{memberId:this.memberId||this.$route.query.memberId})).then(function(t){if(e.tableLoading=!1,0!==t.data.errorCode)return checkFalse(t.data.message),!1;e.tableData=t.data.result.page.result||[],e.tableData=e.tableData.map(function(e){return"string"==typeof e.operRemark&&(e.operRemark=e.operRemark.replace(/\n/g," <br />")),e}),e.totalCount=t.data.result.page.totalCount}).catch(function(t){e.tableLoading=!1,checkStatus(t)}).finally(function(t){return e.count++})},handleSizeChange:function(e){this.logPageParam.pageSize=e,this.logPageParam.currentPage=1,this.getLogPage()},handleCurrentChange:function(e){this.logPageParam.currentPage=e,this.getLogPage()},handleSearch:function(){this.logPageParam.currentPage=1,this.getLogPage()},goLink:function(e){console.log(this.memberId,"this.memberId"),e&&this.$router.push({path:e,query:{memberId:this.memberId}})}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{padding:"20px"}},[a("div",{staticClass:"logTop"},[a("el-cascader",{staticStyle:{width:"260px"},attrs:{placeholder:"全部类型/全部事由",options:e.options,filterable:""}}),e._v(" "),a("el-date-picker",{staticStyle:{width:"256px","margin-left":"10px"},attrs:{type:"daterange","range-separator":"~","start-placeholder":"创建开始日期","end-placeholder":"创建结束日期","default-time":["00:00:00","23:59:59"],"picker-options":e.pickerOptions(),"value-format":"yyyy-MM-dd"},on:{change:e.handleSearch},model:{value:e.dateDefault,callback:function(t){e.dateDefault=t},expression:"dateDefault"}}),e._v(" "),e.memberId?e._e():a("p",{staticClass:"font14 tip-p"},[e._v("展示近一年的日志")])],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"createTime",label:"时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n        "+e._s(e._f("formatTime")(t.row.createTime))+"\n      ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"operType",label:"日志类型"}}),e._v(" "),a("el-table-column",{attrs:{prop:"operReason",label:"事由"}}),e._v(" "),a("el-table-column",{attrs:{prop:"operContent",label:"日志详情","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"operRemark",label:"备注","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",{domProps:{innerHTML:e._s(r.operRemark)}})]}}])}),e._v(" "),e.memberId?a("el-table-column",{attrs:{prop:"",label:"操作",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(t){return e.goLink("/customerLog")}}},[e._v("查看")])]}}])}):e._e()],1),e._v(" "),e.totalCount>0?a("div",{staticClass:"page mTop20"},[a("dm-pagination",{attrs:{background:"","current-page":e.logPageParam.currentPage,"page-sizes":[20,40,60,80],"page-size":e.logPageParam.pageSize,layout:"total, sizes, prev, pager, next",total:e.totalCount},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1)},staticRenderFns:[]};var u=a("VU/8")(s,c,!1,function(e){a("dGD6")},"data-v-3d56a84e",null);t.default=u.exports}});