| | |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button |
| | | style="display:none" |
| | | style="display: none" |
| | | type="danger" |
| | | size="small" |
| | | plain |
| | |
| | | @click="revoke(row)" |
| | | :size="size" |
| | | :type="type" |
| | | :disabled="row.cancel==2" |
| | | :disabled="row.cancel == 2" |
| | | >取消报名</el-button |
| | | > |
| | | <el-button |
| | |
| | | @click="affirmApply(row)" |
| | | :size="size" |
| | | :type="type" |
| | | :disabled="row.cancel==2" |
| | | >确认报名</el-button> |
| | | :disabled="row.cancel == 2" |
| | | >确认报名</el-button |
| | | > |
| | | </template> |
| | | </avue-crud> |
| | | |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | tip: false, |
| | | searchSize: "mini", |
| | | searchMenuSpan: 6, |
| | | height: 693, |
| | | height: 583, |
| | | index: true, |
| | | labelWidth: "120", |
| | | menuWidth: 230, |
| | |
| | | adddata(form).then( |
| | | (res) => { |
| | | this.onLoad(this.page); |
| | | if(res.data.data==201){ |
| | | if (res.data.data == 201) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"已报名,不能重复报名", |
| | | message: "已报名,不能重复报名", |
| | | }); |
| | | }else if(res.data.data==201){ |
| | | } else if (res.data.data == 201) { |
| | | this.$message({ |
| | | type: "warning", |
| | | message:"报名失败", |
| | | message: "报名失败", |
| | | }); |
| | | }else{ |
| | | } else { |
| | | this.$message({ |
| | | type: "success", |
| | | message:"报名成功", |
| | | message: "报名成功", |
| | | }); |
| | | } |
| | | done(); |
| | |
| | | ); |
| | | }, |
| | | //确认报名 |
| | | affirmApply(row,done,loading){ |
| | | affirmApply(row, done, loading) { |
| | | this.$confirm("确认报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.cancel = 3; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "确认报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }) |
| | | }).then(() => { |
| | | row.cancel = 3; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "确认报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | revoke(row,done,loading) { |
| | | revoke(row, done, loading) { |
| | | this.$confirm("确定取消报名?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | row.cancel = 2; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "取消报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }) |
| | | |
| | | }).then(() => { |
| | | row.cancel = 2; |
| | | update(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "取消报名成功!", |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | window.console.log(error); |
| | | loading(); |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |