(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6a8fa2e4"],{"1ec2":function(e,t,a){"use strict";a.r(t);var s=a("b7be"),n={mixins:[a("70a0").a],data:function(){return{baseColumns:[{title:"类型",slot:"type"},{title:"天数",key:"days"},{title:"奖励积分",key:"point",featureKey:"user_point"},{title:"奖励经验",key:"exp",featureKey:"user_level"},{title:"操作",slot:"action"}],rewards:[],total:0,tableParams:{type:"0",page:1,limit:15}}},computed:{columns:function(){var e=this;return this.baseColumns.filter((function(t){return!t.featureKey||e.isBusinessFeatureEnabled(t.featureKey)}))}},created:function(){this.signRewards()},methods:{signRewards:function(){var e=this;Object(s.bc)(this.tableParams).then((function(t){e.rewards=t.data.list,e.total=t.data.count}))},tabsChange:function(){this.tableParams.page=1,this.signRewards()},pageChange:function(e){this.tableParams.page=e,this.signRewards()},add:function(){var e=this;(this.isBusinessFeatureEnabled("user_point")||this.isBusinessFeatureEnabled("user_level"))&&this.$modalForm(Object(s.i)({type:this.tableParams.type})).then((function(){return e.signRewards()}))},edit:function(e){var t=this;this.$modalForm(Object(s.T)(e.id)).then((function(){return t.signRewards()}))},remove:function(e,t,a){var s=this,n={title:t,num:a,url:"/setting/sign/del_rewards/".concat(e.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(e){s.$Message.success(e.msg),s.signRewards()})).catch((function(e){s.$Message.error(e.msg)}))}}},i=a("2877"),r=Object(i.a)(n,(function(){var e=this,t=e._self._c;return t("Card",{attrs:{bordered:!1,"dis-hover":""}},[t("Tabs",{on:{"on-click":e.tabsChange},model:{value:e.tableParams.type,callback:function(t){e.$set(e.tableParams,"type",t)},expression:"tableParams.type"}},[t("TabPane",{attrs:{label:"连续签到奖励",name:"0"}}),t("TabPane",{attrs:{label:"累积签到奖励",name:"1"}})],1),e.isBusinessFeatureEnabled("user_point")||e.isBusinessFeatureEnabled("user_level")?t("Button",{attrs:{type:"primary"},on:{click:e.add}},[e._v("添加"+e._s("0"===e.tableParams.type?"连续":"累积")+"签到奖励")]):e._e(),t("Table",{staticClass:"mt20",attrs:{columns:e.columns,data:e.rewards},scopedSlots:e._u([{key:"type",fn:function(t){var a=t.row;return[e._v("\n      "+e._s("0"===e.tableParams.type?"连续":"累积")+"签到"+e._s(a.days)+"天奖励\n    ")]}},{key:"action",fn:function(a){var s=a.row,n=a.index;return[t("a",{on:{click:function(t){return e.edit(s)}}},[e._v("编辑")]),t("Divider",{attrs:{type:"vertical"}}),t("a",{on:{click:function(t){return e.remove(s,"删除".concat("0"==s.type?"连续":"累积","签到奖励"),n)}}},[e._v("删除")])]}}])}),t("div",{staticClass:"acea-row row-right page"},[t("Page",{attrs:{total:e.total,"show-elevator":"","show-total":"","page-size":e.tableParams.limit},on:{"on-change":e.pageChange}})],1)],1)}),[],!1,null,null,null);t.default=r.exports},"70a0":function(e,t,a){"use strict";t.a={computed:{businessFeatureSwitchMap:function(){var e=this.$store&&this.$store.state&&this.$store.state.admin,t=e&&e.menus;return t&&t.businessFeatureSwitch||{}}},methods:{isBusinessFeatureEnabled:function(e){var t=this.businessFeatureSwitchMap[e];return 1===Number(void 0===t?1:t)}}}}}]);