111
k94314517
2025-06-18 153404ffa0a9c6d23d2c2732b46fa6929e86294f
admin/src/views/no-permissions.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
<template>
  <NotAllow>
    <div class="content">
      <img src="../assets/images/not-allow.png">
      <h2>无权访问</h2>
      <p>如您需要访问该系统,请联系系统管理员</p>
      <el-button @click="logout" type="primary">退出系统</el-button>
    </div>
  </NotAllow>
</template>
<script>
import NotAllow from '../components/common/NotAllow'
import { mapMutations } from 'vuex'
import { logout } from '@/api/system/common'
export default {
  name: 'NoPermissions',
  components: { NotAllow },
  methods: {
    ...mapMutations(['setUserInfo']),
    /**
     * é€€å‡ºç™»å½•
     */
    logout () {
      logout()
        .then(() => {
          this.setUserInfo(null)
          this.$cache.twoFA.removePassword()
          this.$router.push({ name: 'login' })
        })
        .catch(e => {
          this.$tip.apiFailed(e)
        })
    }
  }
}
</script>
<style scoped>
</style>