Browse Source

bug修改

zhangyu 3 years ago
parent
commit
d0fd2729b4
2 changed files with 7 additions and 4 deletions
  1. 6 3
      src/utils/authutils.js
  2. 1 1
      src/views/ledger/facility/addfacility.vue

+ 6 - 3
src/utils/authutils.js

@@ -44,9 +44,6 @@ export default {
       next()
     } else {
       let userInfo = store.getters['layout/userInfo']
-      if (to.meta.breadcrumbs) {
-        store.dispatch('setBreadcrumb', to.meta.breadcrumbs)
-      }
       if (
         (from.path == "/ledger/rentadd" && session.get("rentAddData") && session.get("rentAddData").length) ||
         (from.path == "/ledger/cenoteadd" && session.get("cenoteAddData") && session.get("cenoteAddData").length) ||
@@ -64,11 +61,17 @@ export default {
           let arr = from.path.split("/")
           let srt = arr[arr.length - 1].slice(0, -3)
           session.remove(`${srt}AddData`)
+					if (to.meta.breadcrumbs) {
+						store.dispatch('setBreadcrumb', to.meta.breadcrumbs)
+					}
           next()
         }).catch(() => {
           next(false)
         })
       } else {
+        if (to.meta.breadcrumbs) {
+					store.dispatch('setBreadcrumb', to.meta.breadcrumbs)
+				}
         next()
       }
       console.log("==================== user info ================", userInfo)

+ 1 - 1
src/views/ledger/facility/addfacility.vue

@@ -231,7 +231,7 @@ export default {
             item.SystemList.push(t.id)
           })
         }
-        item.propertyId = item.checked;
+        item.propertyId = !!item.checked;
         item.classCode = this.category.deviceId;
       })
       if (flag) {