12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0ed0110f"],{"129d":function(t,e,a){"use strict";a("b94e")},9973:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-pagination",{attrs:{background:"","page-size":t.page_size?t.page_size:20,"current-page":t.current,"page-sizes":[10,20,30,40,50,60,70,80,90,100],layout:"total,sizes,prev, pager, next",total:t.total},on:{"current-change":t.getData,"size-change":t.handleSizeChange}})},n=[],o={data:function(){return{page:1}},props:{total:"",page_size:"",current:""},methods:{getData:function(t){this.page=t,this.$emit("pageChange")},handleSizeChange:function(t){this.$emit("pageChange",t)}},created:function(){}},r=o,l=(a("129d"),a("4ac2")),s=Object(l["a"])(r,i,n,!1,null,null,null);e["a"]=s.exports},a14c: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("section",{staticClass:"content"},[a("h4",[t._v("赛事分组")]),a("el-divider"),a("el-form",{staticClass:"filter-form",attrs:{"label-width":"80px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"赛事名称"}},[a("el-select",{attrs:{placeholder:"请选择比赛",size:"mini"},model:{value:t.queryParams.match_id,callback:function(e){t.$set(t.queryParams,"match_id",e)},expression:"queryParams.match_id"}},t._l(t.matchList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.getData}},[t._v("筛选")]),a("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:t.handleAdd}},[t._v("新增分组")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-top":"10px"},attrs:{data:t.list,height:"50vh"}},[a("el-table-column",{attrs:{align:"center",prop:"name",label:"分组名称"}}),a("el-table-column",{attrs:{align:"center",prop:"join_count",label:"参赛人数"}}),a("el-table-column",{attrs:{align:"center",prop:"out_count",label:"退赛人数"}}),a("el-table-column",{attrs:{align:"center",prop:"date",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(a){t.title="编辑分组",t.open=!0,t.form=e.row}}},[t._v("编辑")])]}}])})],1),a("Page",{ref:"pageButton",attrs:{current:t.form.page,page_size:t.form.page_size,total:t.total},on:{pageChange:t.gopage}}),a("el-dialog",{attrs:{title:t.title,visible:t.open,width:"500px","append-to-body":""},on:{"update:visible":function(e){t.open=e}}},[a("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules,"label-width":"80px"}},[a("el-form-item",{attrs:{label:"分组名称",prop:"name"}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入分组名称",size:"mini"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"比赛名称",prop:"match_id"}},[a("el-select",{attrs:{placeholder:"请选择比赛"},model:{value:t.form.match_id,callback:function(e){t.$set(t.form,"match_id",e)},expression:"form.match_id"}},t._l(t.matchList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:t.submitForm}},[t._v("确 定")]),a("el-button",{on:{click:function(e){t.open=!1}}},[t._v("取 消")])],1)],1)],1)},n=[],o=a("9973"),r={components:{Page:o["a"]},data:function(){return{loading:!1,queryParams:{page:1},form:{},list:[{},{}],total:0,title:"新增分组",open:!1,rules:{name:[{required:!0,message:"请输入分组名称",trigger:"blur"}],match_id:[{required:!0,message:"请选择比赛",trigger:"blur"}]},matchList:[],groupList:[],userList:[]}},methods:{gopage:function(t){t&&(this.queryParams.page_size=t),this.queryParams.page=this.$refs.pageButton.page,this.getData()},getData:function(){var t=this;this.loading=!0,this.$api.getMatchList().then((function(e){t.matchList=e.data.data})),this.$api.getGroupList().then((function(e){t.groupList=e.data.data})),this.$api.getUserSearch().then((function(e){t.userList=e.data.data})),this.$api.getGroups(this.queryParams).then((function(e){t.list=e.data.data.list,t.total=e.data.data.total,t.loading=!1}))},handleAdd:function(){this.open=!0,this.title="新增分组",this.form={}},submitForm:function(){var t=this;this.$refs["form"].validate((function(e){e&&(null!=t.form.id?t.$api.updateGroup(t.form).then((function(e){t.msgSuccess("修改成功"),t.open=!1,t.getData()})):t.$api.addGroup(t.form).then((function(e){t.msgSuccess("新增成功"),t.open=!1,t.getData()})))}))}},created:function(){this.getData()}},l=r,s=a("4ac2"),c=Object(s["a"])(l,i,n,!1,null,null,null);e["default"]=c.exports},b94e:function(t,e,a){}}]);
- //# sourceMappingURL=chunk-0ed0110f.124934a9.js.map
|