|
@@ -616,14 +616,26 @@ export default {
|
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(0, 0, 0, 0.4)",
|
|
|
});
|
|
|
- ticketBoxCreate(data).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- this.msgSuccess("保存成功");
|
|
|
+ ticketBoxCreate(data)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.msgSuccess("保存成功");
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ loading.close();
|
|
|
+ } else {
|
|
|
+ this.$message.error("保存失败,请重新添加!");
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ loading.close();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error("保存失败,请重新添加!");
|
|
|
this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
this.$router.go(-1);
|
|
|
loading.close();
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|