|
@@ -443,7 +443,7 @@ export default {
|
|
var url = QUESTION_API + "/paperStruct";
|
|
var url = QUESTION_API + "/paperStruct";
|
|
if (this.paperStructId != "add") {
|
|
if (this.paperStructId != "add") {
|
|
//假如没ID就是新增
|
|
//假如没ID就是新增
|
|
- this.$http
|
|
|
|
|
|
+ this.$httpWithMsg
|
|
.put(url, this.blueStruct)
|
|
.put(url, this.blueStruct)
|
|
.then(() => {
|
|
.then(() => {
|
|
this.$notify({
|
|
this.$notify({
|
|
@@ -454,15 +454,11 @@ export default {
|
|
this.removeItem();
|
|
this.removeItem();
|
|
this.back();
|
|
this.back();
|
|
})
|
|
})
|
|
- .catch(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "error",
|
|
|
|
- message: "试卷结构名称重复,请重新命名",
|
|
|
|
- });
|
|
|
|
|
|
+ .finally(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- this.$http
|
|
|
|
|
|
+ this.$httpWithMsg
|
|
.post(url, this.blueStruct)
|
|
.post(url, this.blueStruct)
|
|
.then(() => {
|
|
.then(() => {
|
|
this.$notify({
|
|
this.$notify({
|
|
@@ -473,12 +469,8 @@ export default {
|
|
this.removeItem();
|
|
this.removeItem();
|
|
this.back();
|
|
this.back();
|
|
})
|
|
})
|
|
- .catch(() => {
|
|
|
|
|
|
+ .finally(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
- this.$notify({
|
|
|
|
- type: "error",
|
|
|
|
- message: "试卷结构名称重复,请重新命名",
|
|
|
|
- });
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|