index.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div class="container">
  3. <div class="header">
  4. <el-button @click="Show1()">公司基本信息</el-button>
  5. <el-button @click="Show2()">楼宇基本信息</el-button>
  6. <el-button @click="Show3()">底层系统信息</el-button>
  7. </div>
  8. <corporation-info v-if="show1" class="content"></corporation-info>
  9. <building-info v-if="show2" class="content"></building-info>
  10. <accessedSystem v-if="show3" class="content"></accessedSystem>
  11. </div>
  12. </template>
  13. <script>
  14. import CorporationInfo from "./corporationInfo";
  15. import buildingInfo from "./buildingInfo";
  16. import accessedSystem from "./accessedSystem";
  17. export default {
  18. components: { CorporationInfo, buildingInfo, accessedSystem },
  19. data() {
  20. return {
  21. show1: true,
  22. show2: false,
  23. show3: false,
  24. };
  25. },
  26. methods: {
  27. Show1() {
  28. this.show1 = true;
  29. this.show2 = false;
  30. this.show3 = false;
  31. },
  32. Show2() {
  33. this.show1 = false;
  34. this.show2 = true;
  35. this.show3 = false;
  36. },
  37. Show3() {
  38. this.show1 = false;
  39. this.show2 = false;
  40. this.show3 = true;
  41. },
  42. },
  43. };
  44. </script>
  45. <style lang="less" scoped>
  46. .container {
  47. position: absolute;
  48. left: 218px;
  49. top: 77px;
  50. right: 16px;
  51. bottom: 20px;
  52. line-height: 20px;
  53. background-color: rgba(255, 255, 255, 1);
  54. color: rgba(16, 16, 16, 1);
  55. font-size: 14px;
  56. text-align: center;
  57. .header {
  58. text-align: left;
  59. // padding: 15px;
  60. font-size: 25px;
  61. width: 95%;
  62. margin: 0 auto;
  63. height: 60px;
  64. display: flex;
  65. align-items: center;
  66. .el-button {
  67. border-radius: 50px;
  68. margin-right: 30px;
  69. &:focus,
  70. &:hover {
  71. background: #2ea8e6;
  72. color: #fff;
  73. }
  74. }
  75. }
  76. .content {
  77. height: calc(100% - 60px);
  78. }
  79. }
  80. </style>