(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-44fc90da"],{"8dca":function(t,e,a){"use strict";a("f8c8")},cde7:function(t,e,a){"use strict";a.r(e);var s=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"},[a("el-form",{ref:"dataForm",attrs:{rules:t.rules,model:t.form,"label-position":"right","label-width":"200px"}},[a("div",{staticClass:"app-form-group margin-top"},[a("div",{staticClass:"app-form-ti"},[t._v("基础配置")]),a("div",{staticClass:"padding-top-lg"},[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:1}},[t._v("开启")]),a("el-radio",{attrs:{label:0}},[t._v("关闭")])],1)],1),1==t.form.status?a("el-form-item",{attrs:{label:"规则设置"}},[t._l(t.form.reward,(function(e,s){return a("div",{staticClass:"rule-row"},[a("el-input",{staticClass:"form-input  margin-left",attrs:{type:"number"},model:{value:e.num,callback:function(a){t.$set(e,"num",a)},expression:"item.num"}},[a("template",{slot:"prepend"},[t._v("分享")]),a("template",{slot:"append"},[t._v("位")])],2),a("el-select",{staticClass:"form-input",staticStyle:{width:"200px"},attrs:{filterable:"",placeholder:"请选择分享等级",type:"number"},model:{value:e.level,callback:function(a){t.$set(e,"level",a)},expression:"item.level"}},[t.config.fenxiao.texts?a("el-option",{attrs:{label:t.config.fenxiao.texts.mlevel||"默认用户",value:-1}}):t._e(),t._l(t.levels,(function(t){return a("el-option",{key:t.id,attrs:{label:t.title,value:t.id}})}))],2),a("el-input",{staticClass:"form-input margin-left",attrs:{type:"number"},model:{value:e.reward,callback:function(a){t.$set(e,"reward",a)},expression:"item.reward"}},[a("template",{slot:"prepend"},[t._v("奖励")]),a("template",{slot:"append"},[t._v("元")])],2),a("el-input",{staticClass:"form-input margin-left",attrs:{type:"number"},model:{value:e.score_reward,callback:function(a){t.$set(e,"score_reward",a)},expression:"item.score_reward"}},[a("template",{slot:"prepend"},[t._v("奖励")]),a("template",{slot:"append"},[t._v("积分")])],2),a("el-button",{staticClass:"margin-left",attrs:{type:"danger",icon:"el-icon-delete"},on:{click:function(e){return t.delRule(s)}}})],1)})),a("div",{},[a("el-button",{attrs:{type:"success",size:"mini",icon:"el-icon-plus"},on:{click:t.addRule}},[t._v("添加")])],1),a("el-alert",{attrs:{title:"邀请指定等级用户达到一定数量后发放一定金额奖励，每个档位奖励只发放一次，不重复发放。",type:"error"}})],2):t._e()],1)]),a("div",{staticClass:"padding-lg flex justify-center"},[a("el-button",{on:{click:t.onBack}},[t._v("返回")]),a("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("提交")])],1)])],1),a("copyright")],1)},i=[],l=a("7f70"),n=(a("e8d6"),a("baf6"),a("8327")),r={name:"DirectpushTeam",components:{},data:function(){return{activeIndex:"1",rules:{},form:{status:0,reward:[]},levels:[]}},computed:Object(l["a"])({},Object(n["b"])(["config"])),watch:{config:function(t){this.init()}},mounted:function(){this.init()},methods:{onBack:function(){this.$router.go(-1)},addRule:function(){this.form.reward.push({num:"",reward:"",score_reward:""})},delRule:function(t){this.form.reward.splice(t,1)},handleSelect:function(t,e){this.activeIndex=t},submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&t.api.post("saward/config/set",t.form).then((function(e){1==e.code?(t.$util.success(e.message),t.$store.dispatch("settings/getSetting")):t.$util.error(e.message)}))}))},init:function(){var t=this,e=this.config;e.saward&&(this.form=this.$util.restJson(e.saward)),this.api.get("fenxiao/level/all").then((function(e){1==e.code&&(t.levels=e.data.list)}))}}},o=r,c=(a("8dca"),a("3d7a")),u=Object(c["a"])(o,s,i,!1,null,null,null);e["default"]=u.exports},f8c8:function(t,e,a){}}]);