(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00dc5e14"],{"6a40":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{style:{margin:"20px 0"}},[a("el-form",{attrs:{inline:!0,model:t.formData}},[a("el-form-item",{attrs:{label:"中奖人"}},[a("el-input",{model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("el-form-item",{attrs:{label:"奖品等级"}},[a("el-input",{attrs:{placeholder:"一等奖, 二等奖 ..."},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")]),a("el-button",{style:{marginLeft:"40px"},attrs:{type:"text"},on:{click:function(e){t.exportExcel()}}},[t._v("导出所有")])],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData,"highlight-current-row":"",border:""}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-table",{attrs:{data:e.row.winners,size:"small",border:"","row-class-name":t.errorRow}},[a("el-table-column",{attrs:{prop:"UserName",label:"名称"}}),a("el-table-column",{attrs:{prop:"UserOrg",label:"组织"}}),a("el-table-column",{attrs:{prop:"UserDept",label:"部门"}}),a("el-table-column",{attrs:{prop:"Status",label:"状态",formatter:t.showStatus}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[1===e.row.Status?a("el-button",{attrs:{type:"text"},on:{click:function(a){t.cancelWinner(e.row)}}},[t._v("取消")]):t._e()]}}])})],1)]}}])}),a("el-table-column",{attrs:{prop:"PrizeType",label:"奖类"}}),a("el-table-column",{attrs:{prop:"PrizeName",label:"奖品"}}),a("el-table-column",{attrs:{fixed:"right",label:"操作",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){t.exportExcel(e.row)}}},[t._v("导出")])]}}])})],1)],1)},n=[],l=a("cebc"),o=a("a4bb"),i=a.n(o),c=(a("cadf"),a("551c"),a("097d"),a("ed08")),s={name:"winner",props:["data","prizes"],data:function(){return{formData:{name:"",type:""}}},computed:{tableData:function(){var t=this,e=Object(c["a"])(this.data,"PrizeId");return i()(e).map(function(a){var r=(t.prizes||[]).filter(function(t){return t.PrizeId==a})[0]||{};return Object(l["a"])({},r,{winners:e[a]})})}},methods:{onSearch:function(){this.$emit("search",this.formData)},cancelWinner:function(t){var e=this;this.$confirm("确认要取消该人员中奖资格?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$emit("cancel",t)})},errorRow:function(t){var e=t.row;if(-1===e.Status)return"tab-row-error"},showStatus:function(t,e,a){return 1===a?"有效":"被取消"},exportExcel:function(t){t?this.$emit("exportExcel",{type:t.PrizeType}):this.$emit("exportExcel")}}},u=s,p=(a("a8f7"),a("2877")),f=Object(p["a"])(u,r,n,!1,null,null,null);f.options.__file="winner.vue";e["default"]=f.exports},a8f7:function(t,e,a){"use strict";var r=a("ad92"),n=a.n(r);n.a},ad92:function(t,e,a){}}]);
//# sourceMappingURL=chunk-00dc5e14.25d9a676.js.map