mark
2022-09-27 b73200f9537a39f484708409a6f8840ebb0db82c
src/views/equipmentManagement/index.vue
@@ -19,6 +19,23 @@
    Flow,
    Footer,
  },
  created() {
    this.checkpermission();
  },
  methods: {
    checkpermission() {
      const userInfo = JSON.parse(sessionStorage.getItem("userInfo"));
      if (!userInfo) {
        this.$router.push("/login");
      }
      const val = userInfo.permissions.find((item) => {
        return item == "deviceMng";
      });
      if (val) {
        this.$router.push("/equipmentList");
      }
    },
  },
};
</script>