From 92d0cf73df170131eba84490d875bc954eb7a708 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 11 Aug 2021 20:41:58 +0800
Subject: [PATCH] 报名考试修改
---
src/views/trainingRegistration/index.vue | 101 ++++++++++++++++++++++++--------------------------
1 files changed, 49 insertions(+), 52 deletions(-)
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index a0b4b3a..e389a84 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -23,7 +23,7 @@
>
<template slot="menuLeft">
<el-button
- style="display:none"
+ style="display: none"
type="danger"
size="small"
plain
@@ -38,19 +38,19 @@
@click="revoke(row)"
:size="size"
:type="type"
- :disabled="row.cancel==2"
+ :disabled="row.cancel == 2"
>取消报名</el-button
>
<el-button
icon="el-icon-folder-checked"
- style="display:none"
+ style="display: none"
@click="affirmApply(row)"
:size="size"
:type="type"
- >确认报名</el-button>
+ >确认报名</el-button
+ >
</template>
</avue-crud>
-
</basic-container>
</template>
@@ -80,7 +80,7 @@
tip: false,
searchSize: "mini",
searchMenuSpan: 6,
- height: 693,
+ height: 583,
index: true,
labelWidth: "120",
menuWidth: 100,
@@ -89,7 +89,7 @@
column: column,
delBtn: false,
editBtn: false,
- addBtn:false
+ addBtn: false,
},
};
},
@@ -119,20 +119,20 @@
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();
@@ -172,54 +172,51 @@
);
},
//确认报名
- 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("确定将选择数据删除?", {
--
Gitblit v1.9.3