@@ -445,10 +445,15 @@ export default {
"$route.query.id": {
immediate: true,
handler(newId) {
- if (newId) {
- this.initData(newId);
- } else {
- this.reset();
+ // 只有当前路由路径包含'/inStorageManage/in-request/InRequestForm'时才处理,避免标签跳转时错误调用API
+ if (
+ this.$route.path.includes("/inStorageManage/in-request/InRequestForm")
+ ) {
+ if (newId) {
+ this.initData(newId);
+ } else {
+ this.reset();
+ }
}
},