|
@@ -1671,22 +1671,11 @@ export default {
|
|
|
"/" +
|
|
|
this.quesModel.id
|
|
|
)
|
|
|
- .then((response) => {
|
|
|
- if (response.data.length > 0) {
|
|
|
- var deleteInfo =
|
|
|
- "该试题被试卷:" +
|
|
|
- response.data.join(" , ") +
|
|
|
- "使用,不能删除";
|
|
|
- this.$notify({
|
|
|
- message: deleteInfo,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$notify({
|
|
|
- message: "保存成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- }
|
|
|
+ .then(() => {
|
|
|
+ this.$notify({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
})
|
|
|
.finally(() => (this.loading = false));
|
|
|
});
|
|
@@ -1822,7 +1811,7 @@ export default {
|
|
|
callback: (action) => {
|
|
|
if (action == "confirm") {
|
|
|
this.loading = true;
|
|
|
- this.$http
|
|
|
+ this.$httpWithMsg
|
|
|
.delete(
|
|
|
QUESTION_API +
|
|
|
"/paper/deleteQuestion/" +
|
|
@@ -1830,28 +1819,17 @@ export default {
|
|
|
"/" +
|
|
|
questionId
|
|
|
)
|
|
|
- .then((response) => {
|
|
|
- if (response.data.length > 0) {
|
|
|
- var deleteInfo =
|
|
|
- "该试题被试卷:" +
|
|
|
- response.data.join(" , ") +
|
|
|
- "使用,不能删除";
|
|
|
- this.$notify({
|
|
|
- message: deleteInfo,
|
|
|
- type: "error",
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.initPaper();
|
|
|
- this.getreduplicateQuestions();
|
|
|
- this.reduplicateGroup = [];
|
|
|
- this.loading = true;
|
|
|
- this.$notify({
|
|
|
- message: "保存成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- }
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ .then(() => {
|
|
|
+ this.initPaper();
|
|
|
+ this.getreduplicateQuestions();
|
|
|
+ this.reduplicateGroup = [];
|
|
|
+ this.loading = true;
|
|
|
+ this.$notify({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .finally(() => (this.loading = false));
|
|
|
}
|
|
|
},
|
|
|
});
|