Administrator
2021-07-13 aedad51e0775acd4e46f18ca8aaf27fc9ae221cf
src/views/trainingRegistration/index.vue
@@ -25,6 +25,15 @@
          >删 除
        </el-button>
      </template>
      <template slot-scope="{ type, size, row }" slot="menu">
        <el-button
          icon="el-icon-refresh-right"
          @click="revoke(row)"
          :size="size"
          :type="type"
          >撤销报名</el-button
        >
      </template>
    </avue-crud>
  </div>
</template>
@@ -56,10 +65,11 @@
        searchSize: "mini",
        searchMenuSpan: 6,
        height: 627,
        menuWidth: 160,
        menuWidth: 290,
        align: "center",
        selection: true,
        column: column,
        delBtn: false
      },
    };
  },
@@ -116,7 +126,8 @@
      this.onLoad(this.page);
    },
    rowUpdate(row, index, done, loading) {
      console.log(row);
      // console.log(row);
      update(row).then(
        () => {
          this.onLoad(this.page);
@@ -132,6 +143,24 @@
        }
      );
    },
    revoke(row) {
      // console.log(row);
      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("确定将选择数据删除?", {
        confirmButtonText: "确定",