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