"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[5174],{5174:function(t,e,a){a.r(e),a.d(e,{default:function(){return m}});var n=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{background:"white"}},[e("el-form",{ref:"form",staticClass:"g-pa-md",attrs:{inline:!0,model:t.form,"label-width":"auto"},nativeOn:{submit:function(t){t.preventDefault()}}},[e("el-form-item",{attrs:{label:"统计维度"}},[e("el-select",{model:{value:t.form.dimension,callback:function(e){t.$set(t.form,"dimension",e)},expression:"form.dimension"}},t._l(t.dimensions,(function([t,a]){return e("el-option",{key:t,attrs:{label:a,value:t}})})),1)],1),e("el-form-item",{attrs:{label:"日期"}},[e("el-date-picker",{attrs:{type:"daterange","start-placeholder":"开始日期","end-placeholder":"结束日期","value-format":"yyyy-MM-dd",clearable:""},model:{value:t.form.createDate,callback:function(e){t.$set(t.form,"createDate",e)},expression:"form.createDate"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSearch()}}},[t._v("查询")])],1)],1),e("div",{staticClass:"g-relative-position"},[e("el-tabs",{staticClass:"g-mt-xl",attrs:{type:"card"},on:{"tab-click":t.handleTabClick},model:{value:t.activeTabs,callback:function(e){t.activeTabs=e},expression:"activeTabs"}},[e("el-tab-pane",{key:0,attrs:{name:"10"}},[e("span",{attrs:{slot:"label"},slot:"label"},[e("span",[t._v("争议打标用户记录")])]),e("div",{attrs:{id:"myMiddleChart"}})]),e("el-tab-pane",{key:1,attrs:{name:"20"}},[e("span",{attrs:{slot:"label"},slot:"label"},[e("span",[t._v("订单支付类型判定记录")])]),e("div",{attrs:{id:"paymentControlChart"}})])],1)],1)],1)},r=[],i=a(9677),s=a(17422),o=a.n(s),l={data(){return{dimensions:i.KQ,form:{dimension:1,createDate:this.getDefaultDateRange()},activeTabs:"10",middleChartExtend:{xAxis:{type:"category",data:[]},yAxis:{type:"value"},series:[{data:[],type:"line"}]},paymentChartExtend:{tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"}}},legend:{data:["Card & Local","Card","SUM"]},xAxis:[{type:"category",data:[],axisPointer:{type:"shadow"}}],yAxis:[{type:"value",name:"",axisLabel:{formatter:"{value}"}},{type:"value",name:"",axisLabel:{formatter:"{value}"}}],series:[{name:"Card & Local",type:"bar",tooltip:{valueFormatter:function(t){return t}},data:[]},{name:"Card",type:"bar",tooltip:{valueFormatter:function(t){return t}},data:[]},{name:"SUM",type:"line",tooltip:{valueFormatter:function(t){return t}},data:[]}]}}},mounted(){this.onSearch()},methods:{getDimension:i.Dj,getDefaultDateRange(){const t=new Date,e=new Date;return e.setDate(e.getDate()-7),[e,t]},handleTabClick(){this.onSearch()},async onSearch(){const t={...this.handleParams()};if(10===parseInt(this.activeTabs)){const e=await this.$store.dispatch({type:"riskControlCenter/queryDisputeRisk",payload:t});e&&(this.middleChartExtend.xAxis.data=e.xaxis,this.middleChartExtend.series[0].data=e.yaxis,this.drawMiddleChart())}else if(20===parseInt(this.activeTabs)){const e=await this.$store.dispatch({type:"riskControlCenter/queryPaymentRisk",payload:t});e&&(this.paymentChartExtend.xAxis[0].data=e.xaxis,this.paymentChartExtend.series[0].data=e.bothSeries,this.paymentChartExtend.series[1].data=e.cardSeries,this.paymentChartExtend.series[2].data=e.sumSeries,this.drawPaymentChart())}},drawPaymentChart(){this.myMiddleChartObj=this.$echarts.init(document.getElementById("paymentControlChart"),null,{height:"600px"}),this.myMiddleChartObj.setOption(this.paymentChartExtend,!0)},drawMiddleChart(){this.myMiddleChartObj=this.$echarts.init(document.getElementById("myMiddleChart"),null,{height:"600px"}),this.myMiddleChartObj.setOption(this.middleChartExtend,!0)},handleParams(){const t={...this.form},{createDate:e}=t;return e&&e.length>0&&(t.startDate=e[0],t.endDate=o()(e[1]).hour(23).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss"),delete t.createDate),t}}},d=l,u=a(81656),c=(0,u.A)(d,n,r,!1,null,null,null),m=c.exports},9677:function(t,e,a){a.d(e,{BS:function(){return r},Df:function(){return m},Dj:function(){return b},Dq:function(){return f},Hk:function(){return i},KQ:function(){return y},R5:function(){return d},Sd:function(){return o},Z:function(){return s},bM:function(){return n},iw:function(){return l},lW:function(){return u},m2:function(){return h},rK:function(){return c},te:function(){return p}});const n=new Map([[4,"待审核"],[1,"通过"],[2,"驳回"],[3,"无效"]]),r=t=>n.get(t),i=new Map([[0,"待审核"],[1,"通过"],[2,"待用户上传"],[3,"驳回"],[4,"已上传待审核"]]),s=t=>i.get(t),o=new Map([[0,"全部"],[1,"黑名单"],[2,"风控系统"],[3,"三方风控"]]),l=t=>o.get(t),d=new Map([[1,"黑名单"],[2,"风控系统"],[3,"三方风控"]]),u=t=>d.get(t),c=new Map([[1,"用户ID"]]),m=t=>c.get(t),h=new Map([[1,"通过"],[0,"拒绝"]]),p=new Map([[1,"有效"],[0,"无效"]]),f=t=>p.get(t),y=new Map([[1,"订单号"],[2,"用户ID"],[3,"设备号"]]),b=t=>y.get(t)}}]);