(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d65744a"],{b199:function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return r}));var n=a("b775"),i=a("d722");function o(t){return Object(n["a"])({url:i["a"].taskList,method:"get",params:t})}function r(t){return Object(n["a"])({url:i["a"].taskSave,method:"post",data:t})}},fdd4: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||-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")),r=a("2909"),s=a("b199"),l={data:function(){return{infoLoading:!0,list:[]}},created:function(){this.fetchInfo()},methods:{fetchInfo:function(){var t=this;this.infoLoading=!0,Object(s["a"])({utype:1},"get").then((function(e){t.list=Object(r["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),r=i.id,s=i.points,l=i.daily,c=i.max_perday,u={id:r,points:s,daily:l,max_perday:c};a.push(u)})),Object(s["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}}]);