"use strict";(self["webpackChunkvoghion_vue_admin"]=self["webpackChunkvoghion_vue_admin"]||[]).push([[38190],{38190:function(t,e,n){n.r(e),n.d(e,{default:function(){return u}});var a=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-input",{staticStyle:{width:"256px"},attrs:{clearable:""},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSearch(1)}}},[t._v("查询")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.insert()}}},[t._v("新增")])],1)],1),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"row-key":"id",data:t.dataSource.records}},[e("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"name",label:"名称"}}),e("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"type",label:"类型"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("span",[t._v(t._s(t.getWhitelistTypes(n.row.type)))])]}}])}),e("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"createTime",label:"创建时间"}}),e("el-table-column",{attrs:{"header-align":"center",align:"center",prop:"actions",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.deleteRecord(n.row)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"g-pagination-container"},[e("el-pagination",{attrs:{"current-page":t.dataSource.pageNow,"page-sizes":[20,50,100],"page-size":t.dataSource.pageSize,layout:"sizes, prev, pager, next, jumper",background:"",total:t.dataSource.rowCount},on:{"size-change":function(e){return t.fetchDataSource(null,e)},"current-change":function(e){return t.fetchDataSource(e)}}})],1),e("el-dialog",{attrs:{visible:t.insertModal,title:"新增",width:"30%","close-on-click-modal":!1,"destroy-on-close":!0,"show-close":!1},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-button",{on:{click:t.closeModifyStatusModal}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.insertHandle()}}},[t._v("确 定")])]},proxy:!0}])},[e("el-form",{staticClass:"g-mt-md",attrs:{model:t.insertForm,"label-width":"80px"}},[e("el-form-item",{attrs:{label:"名称"}},[e("el-input",{staticStyle:{width:"256px"},attrs:{placeholder:"请填写用户ID",clearable:""},model:{value:t.insertForm.name,callback:function(e){t.$set(t.insertForm,"name",e)},expression:"insertForm.name"}})],1)],1)],1)],1)},r=[],o=n(9677),i={data(){return{whitelistTypes:o.rK,form:{},insertForm:{},insertModal:!1,loading:!1,dataSource:{records:[],pageNow:1,pageSize:20}}},mounted(){this.onSearch(1)},methods:{getWhitelistTypes:o.Df,async insertHandle(){const t={...this.insertForm};await this.$store.dispatch({type:"riskControlCenter/insertWhitelist",payload:t}),this.onSearch(1),this.insertModal=!1},async deleteRecord(t){const e={id:t.id};await this.$store.dispatch({type:"riskControlCenter/deleteWhitelist",payload:e}),this.onSearch(1)},onSearch(t){this.fetchDataSource(t)},async fetchDataSource(t,e){this.loading=!0;const n={pageNow:t||this.dataSource.pageNow,pageSize:e||this.dataSource.pageSize,...this.handleParams()},a=await this.$store.dispatch({type:"riskControlCenter/queryWhitelistPage",payload:n});a&&(this.dataSource=a),this.loading=!1},handleParams(){const t={...this.form};return t},insert(){this.insertModal=!0,this.form.name=""},closeModifyStatusModal(){this.insertModal=!1}}},l=i,s=n(81656),c=(0,s.A)(l,a,r,!1,null,null,null),u=c.exports},9677:function(t,e,n){n.d(e,{BS:function(){return r},Df:function(){return p},Dj:function(){return y},Dq:function(){return m},Hk:function(){return o},KQ:function(){return g},R5:function(){return c},Sd:function(){return l},Z:function(){return i},bM:function(){return a},iw:function(){return s},lW:function(){return u},m2:function(){return f},rK:function(){return d},te:function(){return h}});const a=new Map([[4,"待审核"],[1,"通过"],[2,"驳回"],[3,"无效"]]),r=t=>a.get(t),o=new Map([[0,"待审核"],[1,"通过"],[2,"待用户上传"],[3,"驳回"],[4,"已上传待审核"]]),i=t=>o.get(t),l=new Map([[0,"全部"],[1,"黑名单"],[2,"风控系统"],[3,"三方风控"]]),s=t=>l.get(t),c=new Map([[1,"黑名单"],[2,"风控系统"],[3,"三方风控"]]),u=t=>c.get(t),d=new Map([[1,"用户ID"]]),p=t=>d.get(t),f=new Map([[1,"通过"],[0,"拒绝"]]),h=new Map([[1,"有效"],[0,"无效"]]),m=t=>h.get(t),g=new Map([[1,"订单号"],[2,"用户ID"],[3,"设备号"]]),y=t=>g.get(t)}}]);