<template>
  <div class="noAuth">
    <el-row>
      <el-col :span="10">
        <h1 class="text-jumbo text-ginormous">哎呀!</h1>
        <h2 style="padding: 30px 0 20px 0">你无权限访问该数据!</h2>
        <h4 style="padding: 15px 0 20px 3px">请联系领导解决</h4>
        <ul class="list-unstyled">
          <li>或者你可以去:</li>
          <li class="link-type">
            <span @click="back(1)"> 回首页 </span>
          </li>
          <li class="link-type">
            <span @click="back"> 返回上一页 </span>
          </li>
        </ul>
      </el-col>
      <el-col :span="14">
        <img :src="errGif" width="313" height="428" />
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "NoAuth",
  data() {
    return {
      errGif: require("@/assets/img/401.png"),
    };
  },
  methods: {
    back(type) {
      if (type) {
        window.vm.$router.push({ path: "/welcome/dashboard" });
      } else {
        if (this.$route.query.noGoBack) {
          window.vm.$router.push({ path: "/welcome/dashboard" });
        } else {
          window.vm.$router.go(-1);
        }
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.noAuth {
  width: 800px;
  max-width: 100%;
  margin: 100px auto;
  text-align: left;
  .pan-back-btn {
    background: #008489;
    color: #fff;
    border: none !important;
  }
  .pan-gif {
    margin: 0 auto;
    display: block;
  }
  .pan-img {
    display: block;
    margin: 0 auto;
    width: 100%;
  }
  .text-jumbo {
    font-size: 60px;
    font-weight: 700;
    color: #484848;
    padding-top: 45px;
  }
  .list-unstyled {
    padding: 0 0 0 4px;
    font-size: 14px;
    li {
      line-height: 30px;
    }
  }
}
</style>
