|
@@ -203,37 +203,28 @@ export default {
|
|
|
this.search(2);
|
|
|
},
|
|
|
del(v) {
|
|
|
- this.$api
|
|
|
- .gradecheckGoodsChange({ chapterExamId: v.chapterExamId })
|
|
|
- .then((res) => {
|
|
|
- if (res.data > 0) {
|
|
|
- this.$message.error("已有学员正在学习该课程,无法删除");
|
|
|
- return;
|
|
|
- } else {
|
|
|
- this.$alert(
|
|
|
- "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
|
|
|
- "提示",
|
|
|
- {
|
|
|
- dangerouslyUseHTMLString: true,
|
|
|
- }
|
|
|
- )
|
|
|
- .then(() => {
|
|
|
- var data = {
|
|
|
- chapterExamId: v.chapterExamId,
|
|
|
- status: -1,
|
|
|
- };
|
|
|
- this.$api.editbankchapter(data).then((res) => {
|
|
|
- this.$message.success("删除成功");
|
|
|
- this.search();
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "info",
|
|
|
- message: "已取消删除",
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
+ this.$alert(
|
|
|
+ "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
|
|
|
+ "提示",
|
|
|
+ {
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ var data = {
|
|
|
+ chapterExamId: v.chapterExamId,
|
|
|
+ status: -1,
|
|
|
+ };
|
|
|
+ this.$api.editbankchapter(data).then((res) => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ this.search();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "info",
|
|
|
+ message: "已取消删除",
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
addClick(v, int) {
|