(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0df842"],{"89f1":function(e,t,a){"use strict";a.r(t);var o,r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-dialog",{attrs:{fullscreen:"","hide-overlay":"",transition:"dialog-bottom-transition"},model:{value:e.thisValue,callback:function(t){e.thisValue=t},expression:"thisValue"}},[a("v-card",[a("v-toolbar",{attrs:{id:"core-toolbar",app:"",color:"dark",prominent:""}},[a("div",{staticClass:"v-toolbar-title"},[a("v-toolbar-title",{staticClass:"white--text font-weight-light"},[e._v("新增管理员")])],1),a("v-spacer"),a("v-toolbar-items",[a("v-btn",{attrs:{icon:"",dark:""},on:{click:function(t){e.thisValue=!1}}},[a("v-icon",[e._v("el-icon-close")])],1)],1)],1),a("v-card-text",[a("v-container",[a("div",{staticStyle:{height:"60px"}}),a("v-form",{ref:"form",model:{value:e.valid,callback:function(t){e.valid=t},expression:"valid"}},[a("v-text-field",{attrs:{label:"登录账号",rules:[function(e){return!!e||"登录账号必填"}],required:"",placeholder:"输入4-12个字符",counter:12},model:{value:e.formData.admin_name,callback:function(t){e.$set(e.formData,"admin_name",t)},expression:"formData.admin_name"}}),a("v-text-field",{attrs:{label:"登录密码",rules:[function(e){return!!e||"登录密码必填"}],required:"",placeholder:"输入6-14个字符",counter:14,type:"password"},model:{value:e.formData.admin_pwd,callback:function(t){e.$set(e.formData,"admin_pwd",t)},expression:"formData.admin_pwd"}}),a("v-text-field",{attrs:{label:"确认密码",rules:[function(e){return!!e||"确认密码必填"}],required:"",counter:14,type:"password"},model:{value:e.formData.admin_pwd2,callback:function(t){e.$set(e.formData,"admin_pwd2",t)},expression:"formData.admin_pwd2"}}),a("v-select",{attrs:{items:e.roles,rules:[function(e){return!!e||"请选择一个角色"}],required:"",label:"选择一个角色*","item-text":"role_name","item-value":"id"},model:{value:e.formData.role_id,callback:function(t){e.$set(e.formData,"role_id",t)},expression:"formData.role_id"}}),a("v-divider"),a("v-text-field",{attrs:{label:"姓名"},model:{value:e.formData.realname,callback:function(t){e.$set(e.formData,"realname",t)},expression:"formData.realname"}}),a("v-text-field",{attrs:{label:"手机号"},model:{value:e.formData.tel_number,callback:function(t){e.$set(e.formData,"tel_number",t)},expression:"formData.tel_number"}}),a("v-btn",{attrs:{color:"dark",loading:e.loading},on:{click:function(t){return e.doEdit()}}},[e._v("确认添加")])],1)],1)],1)],1)],1)},l=[],i={props:{value:{type:Boolean,required:!0,default:!1}},data:function(){return{thisValue:this.value,loading:!1,roles:[],valid:!0,formData:{admin_name:"",admin_pwd:"",admin_pwd2:"",role_id:"",tel_number:"",realname:""}}},watch:{value:function(e){this.thisValue=e},thisValue:function(e){this.$emit("change",e)}},mounted:function(){o=this,o.getRoleData()},methods:{getRoleData:function(){this.$post("role/list",{status:1,sorts:"sort asc",currentPage:1,pageSize:100},function(e){0===e.errno&&(o.roles=e.data.data)})},doEdit:function(){this.$refs.form.validate()&&(this.formData.admin_pwd==this.formData.admin_pwd2?(this.loading=!0,this.$post("admin/add",this.formData,function(e){o.loading=!1,0==e.errno&&(o.$message({showClose:!0,message:e.errmsg,type:"success"}),o.thisValue=!1,o.$emit("changemsg",e))})):o.$message({showClose:!0,message:"密码不一致",type:"error"}))}}},n=i,s=a("6691"),d=Object(s["a"])(n,r,l,!1,null,null,null);t["default"]=d.exports}}]);
//# sourceMappingURL=chunk-2d0df842.9ebef57e.js.map