|
@@ -37,6 +37,19 @@
|
|
|
>新增选手</el-button>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-form-item label-width="10" style='margin-left:10px'>
|
|
|
+ <el-button type="primary" @click="getData" size="mini">筛选</el-button>
|
|
|
+ <el-button type="nomal" @click="queryParams={},getData()" size="mini">重置</el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ size="mini"
|
|
|
+ icon="el-icon-warning"
|
|
|
+ @click="resetInitFund"
|
|
|
+ >重置初始资金</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<el-table v-loading='loading' :data="list" style="width: 100%;margin-top:10px;" height="50vh">
|
|
@@ -151,17 +164,17 @@ export default {
|
|
|
},
|
|
|
methods:{
|
|
|
del(id) {
|
|
|
- this.$confirm("删除选手会删除相关数据,确定删除吗?", "提示", {
|
|
|
- type: "warning",
|
|
|
- }).then(() => {
|
|
|
- this.$api.delPlayer({ id: id }).then((res) => {
|
|
|
- this.$message({
|
|
|
- message: "删除成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- this.getData();
|
|
|
+ this.$confirm("删除选手会删除相关数据,确定删除吗?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.delPlayer({ id: id }).then((res) => {
|
|
|
+ this.$message({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.getData();
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
},
|
|
|
gopage(size) {
|
|
|
if (size) {
|
|
@@ -200,6 +213,19 @@ export default {
|
|
|
this.open = true
|
|
|
})
|
|
|
},
|
|
|
+ resetInitFund(){
|
|
|
+ if(!this.queryParams.match_id){
|
|
|
+ this.$message.error("请先选择比赛!")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$confirm("该操作会将指定比赛所有选手的初始资金清空,您确认要重置选手的初始资金?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.$api.resetInitFund(this.queryParams).then(res=>{
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|