(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0dee3c"],{8828:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("Modal",{attrs:{width:600,"mask-closable":!1,title:"证件设置"},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[r("Form",{ref:"formValidate",staticStyle:{margin:"-30px 0 30px 0"},attrs:{model:e.selectTable,"label-position":"top"}},[r("FormItem",{attrs:{label:"开关",prop:"c_usershow",rules:[e.rule[1]]}},[r("RadioGroup",{model:{value:e.selectTable.c_usershow,callback:function(t){e.$set(e.selectTable,"c_usershow",t)},expression:"selectTable.c_usershow"}},[r("Radio",{attrs:{label:1}},[e._v("开启")]),r("Radio",{attrs:{label:0}},[e._v("关闭")])],1)],1),r("FormItem",{attrs:{label:"证件宽度",prop:"c_json.width",rules:[e.rule[0],{pattern:/^[0-9\.]{1,5}(px|em)$/,message:"格式应为数字和单位(px)"}]}},[r("Input",{staticStyle:{width:"100px"},attrs:{placeholder:""},model:{value:e.selectTable.c_json.width,callback:function(t){e.$set(e.selectTable.c_json,"width",t)},expression:"selectTable.c_json.width"}})],1),r("FormItem",{attrs:{label:"证件高度",prop:"c_json.height",rules:[e.rule[0],{pattern:/^[0-9\.]{1,5}(px|em)$/,message:"格式应为数字和单位(px)"}]}},[r("Input",{staticStyle:{width:"100px"},attrs:{placeholder:""},model:{value:e.selectTable.c_json.height,callback:function(t){e.$set(e.selectTable.c_json,"height",t)},expression:"selectTable.c_json.height"}})],1),r("FormItem",{attrs:{label:"证件图片",prop:"c_json.bgimg",rules:[e.rule[2],e.rule[3]]}},[r("itemImg",{attrs:{opt:{f_json:{name_disabled:!0,upload_ext:"jpeg,jpg,png",upload_quantity:[1,1],upload_width:[0,4e3],upload_height:[0,4e3],upload_size:[0,5120]}}},model:{value:e.selectTable.c_json.bgimg,callback:function(t){e.$set(e.selectTable.c_json,"bgimg",t)},expression:"selectTable.c_json.bgimg"}})],1)],1),r("template",{slot:"footer"},[r("Button",{attrs:{type:"primary",loading:e.loading},on:{click:function(t){return e.submitForm("formValidate")}}},[e._v("确认保存")])],1)],2)],1)},n=[],s=r("5412"),o=r.n(s),l=r("5959");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t,r,a,n,s,o){try{var l=e[s](o),c=l.value}catch(i){return void r(i)}l.done?t(c):Promise.resolve(c).then(a,n)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var s=e.apply(t,r);function o(e){p(s,a,n,o,l,"next",e)}function l(e){p(s,a,n,o,l,"throw",e)}o(void 0)}))}}var b={name:"card-edit",components:{itemImg:l["default"]},props:{data:Object},watch:{show:function(){this.$emit("close")}},data:function(){return{adminList:[],loading:!1,rule:[{required:!0,message:"必填项",trigger:"change"},{required:!0,type:"number",message:"必填项",trigger:"change"},{required:!0,type:"array",message:"必填项",trigger:"change"},{validator:function(e,t,r){if(!t.length)return r(),!1;r()},trigger:"change"}],show:!0,selectTable:{}}},created:function(){this.selectTable=this.JSONs(this.data)},methods:{submitForm:function(e){var t=this;this.$refs[e].validate(function(){var e=d(o.a.mark((function e(r){var a,n;return o.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r){e.next=16;break}return e.prev=1,t.loading=!0,a=JSON.stringify(t.selectTable.c_json),e.next=6,t.api.cardUpdate(i(i({},t.selectTable),{},{c_json:a,method:t.selectTable.id?"edit":"add"}));case 6:n=e.sent,t.$Message.success("操作成功"),t.$emit("getData",n),t.$emit("close"),e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](1);case 15:t.loading=!1;case 16:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}())}}},h=b,m=r("9ca4"),g=Object(m["a"])(h,a,n,!1,null,null,null);t["default"]=g.exports}}]);