| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-706a2400"],{1447:function(t,e,a){"use strict";var n=a("04c2"),i=a("203c"),l=a("db2f"),o=a("62f1"),s=a("ed14"),c=a("d5f7"),r=a("8dda"),u=a("00c3"),d=a("56ce"),h=TypeError,f=d((function(){[].keys().reduce((function(){}),void 0)})),m=!f&&r("reduce",h);n({target:"Iterator",proto:!0,real:!0,forced:f||m},{reduce:function(t){o(this);try{l(t)}catch(d){c(this,"throw",d)}var e=arguments.length<2,a=e?void 0:arguments[1];if(m)return u(m,this,e?[t]:[t,a]);var n=s(this),r=0;if(i(n,(function(n){e?(e=!1,a=n):a=t(a,n,r),r++}),{IS_RECORD:!0}),e)throw new h("Reduce of empty iterator with no initial value");return a}})},"335d":function(t,e,a){"use strict";a("fedb")},"6ff1":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:"new-app-container layout-vertical"},[a("YMTableSearch",{attrs:{loading:t.loading,"search-form":t.searchForm},on:{onValueChange:t.onValueChange,submit:t.onSubmit},scopedSlots:t._u([{key:"extra",fn:function(){},proxy:!0}])}),a("div",{staticClass:"toolbar"},[a("div",{staticClass:"segmented-control"},t._l(t.stateOptions,(function(e){return a("div",{key:e.value,staticClass:"segmented-item",class:{active:t.activeState===e.value},on:{click:function(a){return t.handleSegmentChange(e.value)}}},[t._v(" "+t._s(e.label)+" ")])})),0),a("div",{staticClass:"batch-actions"},[a("el-button",{attrs:{size:"small",type:"warning"},on:{click:t.handleBatchState}},[t._v("批量修改状态")]),a("el-button",{attrs:{size:"small",type:"success"},on:{click:t.handleBatchOnline}},[t._v("批量上架")]),a("el-button",{attrs:{size:"small",type:"danger"},on:{click:t.handleBatchOffline}},[t._v("批量下架")])],1)]),a("YMTable",{ref:"table",attrs:{apis:t.apis,columns:t.columns,"custom-style":{height:"calc(100vh - 270px)"},index:!0,loading:t.loading,"rows-actions":t.rowsActions,selection:!0,"show-summary":!1,"table-key":4,"table-options":t.tableOptions,"custom-loading":t.customLoading}}),a("Dialog",{ref:"dialog",attrs:{dialogActions:{title:"修改比赛状态",width:"400px"}},on:{confirm:t.submitStateEdit}},[a("template",{slot:"content"},[a("el-form",{attrs:{"label-width":"100px"}},[a("el-form-item",{attrs:{rules:[{required:!0,message:"请选择比赛状态"}],label:"比赛状态"}},[a("el-select",{staticStyle:{width:"100%"},model:{value:t.form.state,callback:function(e){t.$set(t.form,"state",e)},expression:"form.state"}},t._l(t.validStateOptions,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1)],2)],1)},i=[],l=a("639f"),o=(a("b15b"),a("e491"),a("b138"),a("865d"),a("8f26"),a("1447"),a("209c"),a("6d35"),a("0401"),a("9039")),s=a("7e1e"),c=[{value:0,label:"未开始"},{value:1,label:"进行中"},{value:2,label:"已完成"},{value:3,label:"延期"},{value:4,label:"取消"},{value:"",label:"全部"}],r=[{value:1,label:"上架"},{value:0,label:"下架"},{value:"",label:"全部"}],u=[{value:1,label:"已加锁"},{value:0,label:"未加锁"},{value:"",label:"全部"}],d={name:"SportList",components:{Dialog:o["a"]},data:function(){var t=this;return{loading:!1,queryData:{},stateOptions:c,activeState:1,customLoading:!0,form:{id:[],state:null},validStateOptions:c.filter((function(t){return""!==t.value})),searchForm:[{label:"赛事ID",type:"input",prop:"data_id",clearable:!0,placeholder:"请输入"},{label:"球队名称",type:"input",prop:"team_name",clearable:!0,placeholder:"请输入"},{label:"赛事名称",type:"input",prop:"league",clearable:!0,placeholder:"请输入"},{label:"赔率玩法",type:"select",prop:"odds",clearable:!0,options:[{value:0,label:"无"},{value:1,label:"有"}]},{label:"上架状态",type:"select",prop:"status",clearable:!0,options:r},{label:"锁定状态",type:"select",prop:"is_locked",clearable:!0,options:u},{label:"比赛时间",type:"daterange",prop:"timeRange",clearable:!0,valueFormat:"yyyy-MM-dd"}],columns:[{label:"赛事ID",prop:"data_id",width:"80"},{label:"联赛名称",prop:"league",width:"150",link:!0,click:function(e){t.$router.push({name:"EventDetail",query:{id:e.id}})}},{label:"对阵信息 (主队 VS 客队)",prop:"match_info",width:"380",html:!0,method:function(t){var e=t.home_team_logo||"",a=t.guest_team_logo||"";return'\n <div style="display: flex; align-items: center; justify-content: center; width: 100%;">\n <div style="flex: 1; text-align: right; display: flex; align-items: center; justify-content: flex-end;">\n <span style="margin-right: 8px;">'.concat(t.home_team,'</span>\n <img src="').concat(e,'" style="width: 24px; height: 24px; object-fit: contain;" onerror="this.style.display=\'none\'">\n </div>\n <div style="padding: 0 10px; color: #909399; font-weight: bold; font-size: 12px;">VS</div>\n <div style="flex: 1; text-align: left; display: flex; align-items: center;">\n <img src="').concat(a,'" style="width: 24px; height: 24px; object-fit: contain;" onerror="this.style.display=\'none\'">\n <span style="margin-left: 8px;">').concat(t.guest_team,"</span>\n </div>\n </div>\n ")}},{label:"赔率玩法",prop:"odds",html:!0,method:function(t){return t.odds&&t.odds.length>0?'<span class="el-tag el-tag--success el-tag--small el-tag--light">有</span>':'<span class="el-tag el-tag--info el-tag--small el-tag--light">无</span>'}},{label:"比赛状态",prop:"state",width:"100",html:!0,method:function(t){var e={0:{text:"未开始",color:"#909399"},1:{text:"进行中",color:"#409EFF"},2:{text:"已完成",color:"#67C23A"},3:{text:"延期",color:"#E6A23C"},4:{text:"取消",color:"#F56C6C"}},a=e[t.state]||{text:"未知",color:"#303133"};return'<span style="color: '.concat(a.color,'; font-weight: bold;">').concat(a.text,"</span>")}},{label:"上架状态",prop:"status",width:"90",html:!0,method:function(t){return 1===t.status?'<span class="el-tag el-tag--success el-tag--small el-tag--light">已上架</span>':'<span class="el-tag el-tag--info el-tag--small el-tag--light">已下架</span>'}},{label:"加锁状态",prop:"is_locked",width:"90",html:!0,method:function(t){return 1===t.is_locked?'<span style="color: #F56C6C;"><i class="el-icon-lock"></i> 已加锁</span>':'<span style="color: #909399;"><i class="el-icon-unlock"></i> 未加锁</span>'}},{label:"进行时长",prop:"fixture_status",width:"100",html:!0,method:function(t){var e="";return t.fixture_status&&(e=t.fixture_status.elapsed),e?'<span style="color: #E6A23C; font-weight: bold;"><i class="el-icon-timer"></i> '.concat(e,"</span>"):"--"}},{label:"直播中进行时长",prop:"odd_fixture_status",width:"100",html:!0,method:function(t){var e=JSON.parse(t.odd_fixture_status),a="";return a=e?e.seconds:"",a?'<span style="color: #E6A23C; font-weight: bold;"><i class="el-icon-timer"></i> '.concat(a,"</span>"):"--"}},{label:"比分 (半场/全场)",prop:"score",minWidth:"120",html:!0,method:function(t){var e=t.half_score||"-",a=t.score||"-";return'<span style="color: #409EFF; font-weight: bold;">'.concat(e," / ").concat(a,"</span>")}},{label:"比赛时间",prop:"game_time",minWidth:"160"}],rowsActions:[{key:"viewDetail",label:"查看详情",html:!0,method:function(e){t.$router.push({name:"EventDetail",query:{id:e.id}})}},{key:"viewInfo",label:"对比赛事信息",html:!0,method:function(e){t.$router.push({name:"EventInformationIndex",query:{data_id:e.data_id}})}},{key:"changeState",label:"修改状态",html:!0,method:function(e){t.form={id:[e.id],state:e.state},t.$refs.dialog.open()}},{key:"toggleRec",vIF:function(t){return 0===t.is_rec},label:"置顶",method:function(e){t.quickEditAPI(e,{is_rec:1},"置顶","is_rec")}},{key:"toggleRec1",vIF:function(t){return 1===t.is_rec},label:"取消置顶",method:function(e){t.quickEditAPI(e,{is_rec:0},"取消置顶","is_rec")}},{key:"toggleStatus",vIF:function(t){return 1===t.status},label:"下架",method:function(e){var a=1===e.status?0:1,n=1===a?"上架":"下架";t.quickEditAPI(e,{status:a},n,"status")}},{key:"toggleStatus1",vIF:function(t){return 0===t.status},label:"上架",method:function(e){var a=1===e.status?0:1,n=1===a?"上架":"下架";t.quickEditAPI(e,{status:a},n,"status")}}],apis:{list:{url:"sport/list",dataParam:"data.data",resultParam:"data",init:!1}},tableOptions:{add:{show:!1},edit:{show:!1},delete:{show:!1}}}},mounted:function(){this.onSubmit()},destroyed:function(){clearInterval(this.timer)},methods:{onValueChange:function(t){},handleSegmentChange:function(t){this.activeState=t,this.onSubmit(this.queryData)},onSubmit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(l["a"])({},t);e.state=this.activeState,e.timeRange&&2===e.timeRange.length?(e.start_time=e.timeRange[0],e.end_time=e.timeRange[1]):(e.start_time=void 0,e.end_time=void 0),delete e.timeRange;var a=Object.keys(e).reduce((function(t,a){return""!==e[a]&&null!==e[a]&&void 0!==e[a]&&(t[a]=e[a]),t}),{});this.queryData=a,this.$refs.table&&this.$refs.table.getList(this.queryData)},submitStateEdit:function(){var t=this;if(null===this.form.state)return this.$message.warning("请选择比赛状态");this.loading=!0,Object(s["ob"])({id:this.form.id,state:this.form.state}).then((function(){t.$message.success("比赛状态修改成功"),t.$refs.dialog.close(),t.onSubmit(t.queryData)})).catch((function(){t.$message.error("比赛状态修改失败")})).finally((function(){t.loading=!1}))},quickEditAPI:function(t,e,a,n){var i=this,o="确认要对该赛事执行【".concat(a,"】操作吗?");"下架"===a&&(o+="(注意:该操作会将款退回)"),this.$confirm(o,"操作提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){i.loading=!0;var n=Object(l["a"])({id:[t.id]},e);Object(s["ob"])(n).then((function(){i.$message.success("".concat(a,"成功")),i.onSubmit(i.queryData)})).catch((function(){i.$message.error("".concat(a,"失败"))})).finally((function(){i.loading=!1}))})).catch((function(){}))},getSelectionIds:function(){var t;return(null===(t=this.$refs.table)||void 0===t?void 0:t.selectionList)||[]},handledGoRrror:function(){this.$router.push({name:"EventErrorList"})},handleBatchState:function(){var t=this.getSelectionIds();if(!t.length)return this.$message.warning("请先选择数据");this.form={id:t,state:null},this.$refs.dialog.open()},handleBatchOnline:function(){var t=this.getSelectionIds();if(!t.length)return this.$message.warning("请先选择数据");this.batchRequest(t,{status:1},"批量上架")},handleBatchOffline:function(){var t=this.getSelectionIds();if(!t.length)return this.$message.warning("请先选择数据");this.batchRequest(t,{status:0},"批量下架")},handleBatchLock:function(){var t=this.getSelectionIds();if(!t.length)return this.$message.warning("请先选择数据");this.batchRequest(t,{is_locked:1},"批量加锁")},handleBatchUnlock:function(){var t=this.getSelectionIds();if(!t.length)return this.$message.warning("请先选择数据");this.batchRequest(t,{is_locked:0},"批量解锁")},batchRequest:function(t,e,a){var n=this,i="确认要执行【".concat(a,"】操作吗?");"批量下架"===a&&(i+="(注意:该操作会将款退回)"),this.$confirm(i,"操作提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){n.loading=!0,Object(s["ob"])(Object(l["a"])({id:t},e)).then((function(){n.$message.success("".concat(a,"成功")),n.onSubmit(n.queryData)})).catch((function(){n.$message.error("".concat(a,"失败"))})).finally((function(){n.loading=!1}))})).catch((function(){}))}}},h=d,f=(a("335d"),a("1805")),m=Object(f["a"])(h,n,i,!1,null,"380f146b",null);e["default"]=m.exports},"865d":function(t,e,a){"use strict";var n=a("04c2"),i=a("f370").left,l=a("d1da"),o=a("4de2"),s=a("c3c0"),c=!s&&o>79&&o<83,r=c||!l("reduce");n({target:"Array",proto:!0,forced:r},{reduce:function(t){var e=arguments.length;return i(this,t,e,e>1?arguments[1]:void 0)}})},f370:function(t,e,a){"use strict";var n=a("db2f"),i=a("9bf4"),l=a("71cd"),o=a("57ad"),s=TypeError,c="Reduce of empty array with no initial value",r=function(t){return function(e,a,r,u){var d=i(e),h=l(d),f=o(d);if(n(a),0===f&&r<2)throw new s(c);var m=t?f-1:0,p=t?-1:1;if(r<2)while(1){if(m in h){u=h[m],m+=p;break}if(m+=p,t?m<0:f<=m)throw new s(c)}for(;t?m>=0:f>m;m+=p)m in h&&(u=a(u,h[m],m,d));return u}};t.exports={left:r(!1),right:r(!0)}},fedb:function(t,e,a){}}]);
|