zhangzengfei
2022-08-23 e37e45cfe1123928dba5d9c5a427b0ee497b7ad6
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>