mark
2022-10-09 c72156587ad51a022b2e3fced4701c8c9785302f
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>