(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4efe194b"],{"35a2":function(t,e,a){"use strict";a("a264")},"7bc2":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("div",{staticClass:"app-form margin-top levelEdit"},[a("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[a("div",{staticClass:"app-form-group"},[a("div",{staticClass:"app-form-ti"},[t._v("基础设置")]),a("div",{staticClass:"padding-top-lg"},[1==t.config.admin_id?a("el-form-item",{attrs:{label:"账号角色",prop:"role_id"}},[a("el-select",{attrs:{placeholder:"选择角色"},model:{value:t.form.role_id,callback:function(e){t.$set(t.form,"role_id",e)},expression:"form.role_id"}},[a("el-option",{attrs:{value:0,label:"选择角色"}}),t._l(t.rolelist,(function(t,e){return a("el-option",{key:e,attrs:{value:t.id,label:t.name}})}))],2)],1):t._e(),a("el-form-item",{attrs:{label:"用户昵称",prop:"nickname"}},[a("el-input",{staticClass:"form-input",model:{value:t.form.nickname,callback:function(e){t.$set(t.form,"nickname",e)},expression:"form.nickname"}})],1),a("el-form-item",{attrs:{label:"登录账号",prop:"username"}},[a("el-input",{staticClass:"form-input",model:{value:t.form.username,callback:function(e){t.$set(t.form,"username",e)},expression:"form.username"}})],1),a("el-form-item",{attrs:{label:"到期时间",prop:"dqtime"}},[a("el-date-picker",{staticClass:"form-input",attrs:{type:"datetime",placeholder:"选择日期","value-format":"yyyy-MM-dd HH:mm:ss",clearable:""},model:{value:t.form.dqtime,callback:function(e){t.$set(t.form,"dqtime",e)},expression:"form.dqtime"}})],1),a("el-form-item",{attrs:{label:"登录密码",prop:"rule"}},[a("el-input",{staticClass:"form-input",attrs:{type:"password"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),t.form.id?a("el-alert",{staticClass:"margin-top",attrs:{title:"不填则不修改密码。",type:"error"}}):t._e()],1),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-radio-group",{model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[a("el-radio",{attrs:{label:"normal"}},[t._v("正常")]),a("el-radio",{attrs:{label:"hidden"}},[t._v("禁用")])],1)],1)],1)]),a("div",{staticClass:"padding-xl flex justify-center"},[a("el-button",{on:{click:t.onBack}},[t._v("返回")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("提交")])],1)])],1),a("copyright")],1)},r=[],s=a("7f70"),o=a("8327"),l={name:"LevelEdit",data:function(){return{rules:{username:[{required:!0,message:"请输入账号",trigger:"blur"}],role_id:[{required:!0,message:"请选择角色",trigger:"blur"}]},form:{username:"",nickname:"",dqtime:"",role_id:"",password:"",status:"normal"},id:"",rolelist:[],is_submit:!1}},computed:Object(s["a"])({},Object(o["b"])(["config"])),created:function(){this.id=this.$route.query.id,this.init()},methods:{onBack:function(){this.$router.go(-1)},change:function(t){this.$forceUpdate()},init:function(){var t=this;this.api.get("auth/detail",{id:this.id}).then((function(e){1==e.code&&(e.data.info&&(t.form=e.data.info),t.rolelist=e.data.rolelist)}))},submit:function(){var t=this;this.form,this.$refs["dataForm"].validate((function(e){if(e){if(t.is_submit)return;t.is_submit=!0,t.api.post("auth/post",Object(s["a"])({id:t.id},t.form)).then((function(e){t.is_submit=!1,1==e.code?(t.$util.success(e.message),t.onBack()):t.$util.error(e.message)})).catch((function(){t.is_submit=!1}))}}))},resetForm:function(){this.form={username:"",nickname:"",role_id:0,password:"",status:"normal"}}}},n=l,m=(a("35a2"),a("3d7a")),u=Object(m["a"])(n,i,r,!1,null,null,null);e["default"]=u.exports},a264:function(t,e,a){}}]);