webpackJsonp([50],{hQNi:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("vMJZ"),a={name:"userGroupEdit",data:function(){return{form:{status:"1",setting:{base:{allow_login:"1"},credit:{login:""}}},id:""}},created:function(){this.id=this.$route.query.id,(this.id||0===this.id)&&this.fetchData()},activated:function(){var t=this.$route.query.id;t!=this.id&&(this.id=t,this.fetchData())},methods:{fetchData:function(){var t=this,e={id:this.id};s.a.getGroupInfo(e).then(function(e){1==e.code&&(t.form=e.data,t.form.status=String(e.data.status))})},onSubmit:function(){var t=this;this.id&&(this.form.id=this.id),s.a.groupAdd(this.form).then(function(e){1==e.code&&(t.$message.success("提交成功！"),eventBus.$emit("updateGroupSuccess"))})}}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"container"},[i("el-form",{ref:"form",attrs:{model:t.form,"label-position":"top","label-width":"140px"}},[i("el-row",{attrs:{gutter:20}},[i("el-col",{attrs:{span:8}},[i("div",{staticClass:"grid-content"},[i("el-form-item",{attrs:{label:"名称"}},[i("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"备注"}},[i("el-input",{attrs:{type:"textarea",rows:"5"},model:{value:t.form.memo,callback:function(e){t.$set(t.form,"memo",e)},expression:"form.memo"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"状态"}},[i("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}})],1),t._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.onSubmit}},[t._v("确认")])],1)],1)]),t._v(" "),i("el-col",{attrs:{span:10}},[i("div",{staticClass:"grid-content"},[i("p",{staticClass:"mt-sm mb-md"},[t._v("基础设置")]),t._v(" "),i("el-form-item",{attrs:{label:"允许登录"}},[i("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.form.setting.base.allow_login,callback:function(e){t.$set(t.form.setting.base,"allow_login",e)},expression:"form.setting['base']['allow_login']"}})],1),t._v(" "),i("p",{staticClass:"mt-sm mb-md"},[t._v("积分设置")]),t._v(" "),i("el-form-item",{attrs:{label:"登录赠送积分/天"}},[i("el-input",{staticStyle:{width:"150px"},model:{value:t.form.setting.credit.login,callback:function(e){t.$set(t.form.setting.credit,"login",e)},expression:"form.setting['credit']['login']"}})],1)],1)])],1)],1)],1)},staticRenderFns:[]},l=i("XAIM")(a,o,!1,null,null,null);e.default=l.exports}});