|
@@ -452,7 +452,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({
|
|
@@ -463,15 +463,15 @@ export default {
|
|
this.removeItem();
|
|
this.removeItem();
|
|
this.back();
|
|
this.back();
|
|
})
|
|
})
|
|
- .catch(() => {
|
|
|
|
|
|
+ .catch((e) => {
|
|
this.$notify({
|
|
this.$notify({
|
|
type: "error",
|
|
type: "error",
|
|
- message: "试卷结构名称重复,请重新命名",
|
|
|
|
|
|
+ message: e.data.desc,
|
|
});
|
|
});
|
|
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({
|
|
@@ -482,11 +482,11 @@ export default {
|
|
this.removeItem();
|
|
this.removeItem();
|
|
this.back();
|
|
this.back();
|
|
})
|
|
})
|
|
- .catch(() => {
|
|
|
|
|
|
+ .catch((e) => {
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.$notify({
|
|
this.$notify({
|
|
type: "error",
|
|
type: "error",
|
|
- message: "试卷结构名称重复,请重新命名",
|
|
|
|
|
|
+ message: e.data.desc,
|
|
});
|
|
});
|
|
});
|
|
});
|
|
}
|
|
}
|