(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9281f0c6"],{"4fa0":function(t,e,a){"use strict";var i=a("df3a"),r=a.n(i);r.a},df3a:function(t,e,a){},f49f:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticStyle:{"margin-bottom":"20px"}},[a("el-button",{on:{click:function(e){t.dialogVisible=!0}}},[t._v("新增")]),a("el-button",{on:{click:t.startDraw}},[t._v("开始抽奖")]),a("el-button",{on:{click:t.endDraw}},[t._v("结束抽奖")]),a("el-button",{on:{click:t.refreshPage}},[t._v("重置抽奖页面")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.data,"highlight-current-row":"",border:"","row-class-name":t.activeRow}},[a("el-table-column",{attrs:{prop:"SettingId",label:"ID",width:"100"}}),a("el-table-column",{attrs:{prop:"PrizeId",label:"奖品",formatter:t.showPrizeName}}),a("el-table-column",{attrs:{prop:"PrizeNum",label:"数量",width:"100"}}),a("el-table-column",{attrs:{prop:"IsRepeat",label:"允许重复抽",formatter:t.showRepeat,width:"150"}}),a("el-table-column",{attrs:{prop:"Status",label:"状态",formatter:t.showStatus,width:"150"}})],1),a("el-dialog",{attrs:{title:"提示",visible:t.dialogVisible,width:"60%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("el-form",{attrs:{"label-width":"120px",model:t.formData}},[a("el-form-item",{attrs:{label:"奖品"}},[a("el-select",{model:{value:t.formData.PrizeId,callback:function(e){t.$set(t.formData,"PrizeId",e)},expression:"formData.PrizeId"}},t._l(t.prizes,function(t){return a("el-option",{key:t.PrizeId,attrs:{label:t.PrizeType+" - "+t.PrizeName,value:t.PrizeId}})}),1)],1),a("el-form-item",{attrs:{label:"数量"}},[a("el-input-number",{attrs:{min:1},model:{value:t.formData.PrizeNum,callback:function(e){t.$set(t.formData,"PrizeNum",e)},expression:"formData.PrizeNum"}})],1),a("el-form-item",{attrs:{label:"允许重复抽"}},[a("el-select",{model:{value:t.formData.IsRepeat,callback:function(e){t.$set(t.formData,"IsRepeat",e)},expression:"formData.IsRepeat"}},[a("el-option",{attrs:{label:"是",value:"1"}}),a("el-option",{attrs:{label:"否",value:"0"}})],1)],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSubmit}},[t._v("确定")])],1)],1)],1)],1)},r=[],l=a("cebc"),o={name:"setting",props:["data","prizes"],data:function(){return{dialogVisible:!1,formData:{PrizeId:void 0,IsRepeat:"0",PrizeNum:1}}},methods:{refreshPage:function(){this.$emit("refreshPage")},startDraw:function(){this.$emit("startDraw")},endDraw:function(){this.$emit("endDraw")},activeRow:function(t){var e=t.row;if(1===e.Status)return"tab-row-active"},showPrizeName:function(t,e,a){var i=(this.prizes||[]).filter(function(t){var e=t.PrizeId;return e===a})[0]||{};return"".concat(i.PrizeType," - ").concat(i.PrizeName)},showRepeat:function(t,e,a){return 1===a?"允许":"不允许"},showStatus:function(t,e,a){return 1===a?"有效":"已抽过"},onSubmit:function(){this.$emit("submit",Object(l["a"])({},this.formData,{IsRepeat:this.formData.IsRepeat-0})),this.dialogVisible=!1}}},n=o,s=(a("4fa0"),a("2877")),u=Object(s["a"])(n,i,r,!1,null,null,null);u.options.__file="setting.vue";e["default"]=u.exports}}]);
//# sourceMappingURL=chunk-9281f0c6.23392d22.js.map