(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-619847f8"],{"6e38":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[t._v("任务配置")])]),a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.infoLoading,expression:"infoLoading"}],staticClass:"common-form",attrs:{"label-width":"0","inline-message":!0}},[a("el-form-item",[a("el-table",{attrs:{border:"",data:t.list}},[a("el-table-column",{attrs:{label:"任务名称",prop:"name"}}),a("el-table-column",{attrs:{align:"center",label:"完成任务奖励积分"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-form-item",[a("el-input",{staticStyle:{width:"120px"},attrs:{type:"number"},model:{value:e.row.points,callback:function(a){t.$set(e.row,"points",a)},expression:"scope.row.points"}})],1)]}}])}),a("el-table-column",{attrs:{align:"center",label:"每天奖励次数上限"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.daily?a("el-form-item",[a("el-input",{staticStyle:{width:"120px"},attrs:{type:"number"},model:{value:e.row.max_perday,callback:function(a){t.$set(e.row,"max_perday",a)},expression:"scope.row.max_perday"}})],1):a("el-form-item",[t._v(" - ")])]}}])}),a("el-table-column",{attrs:{align:"center",label:"任务类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.daily?a("span",{staticClass:"font_warning"},[t._v(" 日常任务 ")]):a("span",{staticClass:"font_brand"},[t._v("单次任务")])]}}])})],1)],1),a("el-form-item",{attrs:{label:""}},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.onSubmit("form")}}},[t._v("保存")])],1)],1)],1)],1)},i=[],o=(a("4160"),a("159b"),a("5530")),s=a("2909"),r=a("b199"),l={data:function(){return{infoLoading:!0,list:[]}},created:function(){this.fetchInfo()},methods:{fetchInfo:function(){var t=this;this.infoLoading=!0,Object(r["a"])({utype:2},"get").then((function(e){t.list=Object(s["a"])(e.data.items),t.infoLoading=!1})).catch((function(){}))},onSubmit:function(t){var e=this,a=[];this.list.forEach((function(t,e,n){var i=Object(o["a"])({},t),s=i.id,r=i.points,l=i.daily,c=i.max_perday,u={id:s,points:r,daily:l,max_perday:c};a.push(u)})),Object(r["b"])(a).then((function(t){return e.$message.success(t.message),!0})).catch((function(){}))}}},c=l,u=a("2877"),d=Object(u["a"])(c,n,i,!1,null,null,null);e["default"]=d.exports},b199:function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return s}));var n=a("b775"),i=a("d722");function o(t){return Object(n["a"])({url:i["a"].taskList,method:"get",params:t})}function s(t){return Object(n["a"])({url:i["a"].taskSave,method:"post",data:t})}}}]);