|
@@ -161,18 +161,22 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // this.$message.success('修改成功');
|
|
|
- this.$router.push({
|
|
|
- path: '/modelEdit',
|
|
|
- query: {
|
|
|
- modelId: this.modelId,
|
|
|
- modelNo: this.modelNo,
|
|
|
- modelName: this.modelName,
|
|
|
- modelType: this.modelType,
|
|
|
- modelState: this.modelState,
|
|
|
- filePath: this.filePath,
|
|
|
- }
|
|
|
- })
|
|
|
+ // 异步请求,增加一层条件判断
|
|
|
+ if(isModifyName&&!isModifyFile)
|
|
|
+ {
|
|
|
+ this.$message.success('修改成功');
|
|
|
+ this.$router.push({
|
|
|
+ path: '/modelEdit',
|
|
|
+ query: {
|
|
|
+ modelId: this.modelId,
|
|
|
+ modelNo: this.modelNo,
|
|
|
+ modelName: this.modelName,
|
|
|
+ modelType: this.modelType,
|
|
|
+ modelState: this.modelState,
|
|
|
+ filePath: this.filePath,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
returnLink() {
|
|
|
//指定跳转地址
|
|
@@ -299,14 +303,24 @@ export default {
|
|
|
}
|
|
|
)
|
|
|
.then((res) => {
|
|
|
-
|
|
|
- this.$alert("上传成功");
|
|
|
- // location.reload();
|
|
|
+ this.filePath=res.data.file_path;
|
|
|
+ this.$message.success('修改成功');
|
|
|
console.log(res);
|
|
|
+
|
|
|
+ this.$router.push({
|
|
|
+ path: '/modelEdit',
|
|
|
+ query: {
|
|
|
+ modelId: this.modelId,
|
|
|
+ modelNo: this.modelNo,
|
|
|
+ modelName: this.modelName,
|
|
|
+ modelType: this.modelType,
|
|
|
+ modelState: this.modelState,
|
|
|
+ filePath: this.filePath,
|
|
|
+ }
|
|
|
+ })
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- // location.reload();
|
|
|
}
|
|
|
|
|
|
}
|