ZZJ
2022-09-27 f2ef9272ed076bdca33d21b39bcc671e576553b3
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>