index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <div class="router-err" v-if="userInfo.type !== 3">
  3. <div class="router-err__icon">
  4. <img src="img/404.png" />
  5. </div>
  6. <div class="router-err__content">
  7. <h2>无权限或找不到页面</h2>
  8. <p>当前页面无权限访问或者打开了一个不存在的链接,请检查当前账户权限和链接的可访问性。</p>
  9. </div>
  10. </div>
  11. <el-container class="flex-column" v-else>
  12. <el-main class="nopadding">
  13. <el-container>
  14. <el-aside width="300px">
  15. <asideMain ref="asideMain" :userInfo="userInfo"></asideMain>
  16. </el-aside>
  17. <el-container>
  18. <chatMain ref="chatMain" :userInfo="userInfo"></chatMain>
  19. </el-container>
  20. <el-aside width="400px">
  21. <rightMain ref="rightMain" :userInfo="userInfo"></rightMain>
  22. </el-aside>
  23. </el-container>
  24. </el-main>
  25. </el-container>
  26. </template>
  27. <script>
  28. import asideMain from '../components/aside';
  29. import rightMain from '../components/asideRight';
  30. import chatMain from '../components/chatBody';
  31. export default {
  32. components: {
  33. asideMain,chatMain,rightMain
  34. },
  35. data(){
  36. return {
  37. userInfo:null,
  38. }
  39. },
  40. created() {
  41. var userInfo = this.$TOOL.data.get("USER_INFO");
  42. this.userInfo = userInfo;
  43. }
  44. }
  45. </script>
  46. <style scoped lang="scss">
  47. .router-err {display: flex;width: 900px;margin: 50px auto;align-items: center;}
  48. .router-err__icon {width: 400px;}
  49. .router-err__icon img {width: 100%;}
  50. .router-err__content {flex: 1;padding:40px;}
  51. .router-err__content h2 {font-size: 26px;}
  52. .router-err__content p {font-size: 14px;color: #999;margin: 15px 0 30px 0;line-height: 1.5;}
  53. @media (max-width: 992px){
  54. .router-err {display: block;width: 100%;margin-top: 10px;text-align: center;}
  55. .router-err__icon {width: 280px;margin: 0 auto;}
  56. }
  57. </style>