webpackJsonp([67],{1013:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"forum-module"},[t._m(0,!1,!1),t._v(" "),i("div",{staticClass:"table-top-bar clearfix"},[i("button",{staticClass:"bbs-config",on:{click:t.setConfig}},[t._v("配置")]),t._v(" "),i("button",{staticClass:"bbs-give",on:{click:t.giveMagic}},[t._v("赠送")])]),t._v(" "),i("div",{directives:[{name:"loading",rawName:"v-loading.body",value:t.loading,expression:"loading",modifiers:{body:!0}}],staticClass:"table-responsive"},[i("form",{staticClass:"form-horizontal no-margin"},[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.magicList},on:{"selection-change":t.checkIds}},[i("el-table-column",{attrs:{type:"selection",align:"center",width:"68"}}),t._v(" "),i("el-table-column",{attrs:{label:"id",prop:"id",align:"center",width:50}}),t._v(" "),i("el-table-column",{attrs:{label:"名称",prop:"name",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{label:"图片",prop:"picPath",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("img",{attrs:{src:t.$store.state.baseUrl+e.row.magicLogo,height:"25"}})]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"价格(元)",prop:"price",align:"center"}}),t._v(" "),i("el-table-column",{attrs:{label:"排列顺序",prop:"displayorder",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-input",{staticStyle:{width:"40%"},model:{value:e.row.displayorder,callback:function(i){t.$set(e.row,"displayorder",i)},expression:"scope.row.displayorder"}})]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"启用",prop:"available",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-switch",{attrs:{"on-text":"是","off-text":"否"},model:{value:e.row.available,callback:function(i){t.$set(e.row,"available",i)},expression:"scope.row.available"}})]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"操作",align:"center",width:200},scopedSlots:t._u([{key:"default",fn:function(e){return[i("a",{staticClass:"t-edit iconfont bbs-edit",attrs:{href:"javascript:void(0)",title:"编辑"},on:{click:function(i){t.editGift(e.row.id)}}})]}}])})],1)],1)]),t._v(" "),i("div",{staticClass:"table-bottom-bar"},[i("div",{staticClass:"pull-left"},[i("el-button",{on:{click:t.savePriority}},[t._v("保存排列顺序")])],1)])])},staticRenderFns:[function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"forum-header"},[i("span",{staticClass:"forum-name"},[t._v("道具列表")])])}]}},610:function(t,e,i){function a(t){i(926)}var s=i(66)(i(704),i(1013),a,null,null);t.exports=s.exports},704:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=i(228);e.default={data:function(){return{loading:!0,friendLinkCtgList:[],magicList:[],ids:"",groupList:[],params:{pageNo:1,pageSize:20,queryCtgId:""},totalCount:0,currentPage:1,changePageSize:localStorage.getItem("PageSize"),disabled:!0}},methods:{getMagicList:function(){var t=this,e=this.params;a.s(e).then(function(e){"100"==e.code?(t.magicList=e.body,t.totalCount=e.totalCount,t.loading=!1):(t.loading=!1,t.$message.error(e.message))}).catch(function(e){t.loading=!1,t.$message.error("网络异常")})},savePriority:function(){var t=this;this.loading=!0;for(var e=this.magicList,i={ids:[],prioritys:[],magicAvails:[]},s=0;s<e.length;s++)i.ids.push(e[s].id),i.prioritys.push(e[s].displayorder),i.magicAvails.push(e[s].available);i.ids=i.ids.join(","),i.prioritys=i.prioritys.join(","),i.magicAvails=i.magicAvails.join(","),a.y(i).then(function(e){t.loading=!1,"100"==e.code?(t.$message.success("保存成功"),t.getMagicList()):t.$message.error(e.message)}).catch(function(e){t.loading=!1,t.$message.error("保存异常")})},editGift:function(t){this.$router.push({path:"/magicedit",query:{type:"edit",id:t}})},setConfig:function(){this.$router.push({path:"/magicconfig"})},giveMagic:function(){this.$router.push({path:"/selectuser"})},getPage:function(t){this.loading=!0,this.params.pageNo=t,this.getMagicList()},getSize:function(t){this.loading=!0,this.params.pageNo=t,this.getMagicList()},changeSize:function(t){var e=t.target.value;e<1?(localStorage.setItem("PageSize",20),e=20):localStorage.setItem("PageSize",e),this.loading=!0,this.params.pageSize=parseInt(e),this.params.pageNo=1,this.currentPage=1,this.getMagicList()},checkIds:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].id);0==e.length?(this.ids="",this.disabled=!0):(this.ids=e.join(","),this.disabled=!1)}},created:function(){var t=localStorage.getItem("PageSize");null!=t?this.params.pageSize=parseInt(t):this.changePageSize=20,this.getMagicList()},watch:{$route:function(t,e){this.loading=!0,this.getMagicList()}}}},840:function(t,e,i){e=t.exports=i(570)(!1),e.push([t.i,"",""])},926:function(t,e,i){var a=i(840);"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);i(571)("57391847",a,!0)}});