index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <template>
  2. <div class='other'>
  3. <div class='other-top'>
  4. <span class='other-system' v-for='(item,index) in matter' :class='item.id==matterId?"isActive":""' :key='index' @click='tabSyatem(item)'>
  5. <img :src='item.id==matterId?item.icon:item.icon1' alt />
  6. {{item.name}}
  7. </span>
  8. </div>
  9. <div class='other-bottom'>
  10. <div class='other-left'>
  11. <ul>
  12. <li class='li-style' v-for='(item,index) in everySystem' :key='"o"+index' @click='dialogVisible(item)'>
  13. <span class='circle'></span>
  14. {{item.label}}
  15. </li>
  16. </ul>
  17. </div>
  18. <div class='other-right' v-if='matterId!=1'>
  19. <floor-list :floors='floors' @emitFloor='emitFloor'></floor-list>
  20. </div>
  21. <div class='legend-box'>
  22. <Legend></Legend>
  23. </div>
  24. </div>
  25. <other-dialog ref='dialog' :systemName='systemName'></other-dialog>
  26. <zhsx-other v-if='matterId==1'></zhsx-other>
  27. <div class='qtfugl' v-if='matterId==2'>
  28. <img src='../../assets/imgs/matter_floorB2.png' alt />
  29. </div>
  30. <gcfz-dialog ref='gcfzDialog' :systemName='systemName'></gcfz-dialog>
  31. </div>
  32. </template>
  33. <script>
  34. import floorList from './floorList'
  35. import OtherDialog from './otherDialog'
  36. import { matter, floors } from '@/utils/plugins/components.js'
  37. import ZhsxOther from './zhsxOther'
  38. import GcfzDialog from './gcfzDialog'
  39. export default {
  40. data() {
  41. return {
  42. matter,
  43. floors,
  44. everySystem: [],
  45. matterId: 2,
  46. systemName: '供电系统',
  47. floorInfo: {
  48. floorName: 'F1',
  49. floorId: 'f1'
  50. },
  51. dialogInfo: {}
  52. }
  53. },
  54. components: { floorList, OtherDialog, ZhsxOther, GcfzDialog },
  55. methods: {
  56. tabSyatem(item) {
  57. this.matterId = item.id
  58. this.everySystem = item.children
  59. this.systemName = item.name
  60. },
  61. emitFloor(item) {
  62. this.floorInfo = item
  63. },
  64. dialogVisible(item) {
  65. this.$refs.gcfzDialog.showModal(item)
  66. }
  67. },
  68. mounted() {
  69. this.everySystem = this.matter[0].children
  70. }
  71. }
  72. </script>
  73. <style lang="less" scoped>
  74. .other {
  75. background: rgba(242, 245, 247, 1);
  76. height: 100%;
  77. overflow: hidden;
  78. .other-top {
  79. margin-top: 24px;
  80. position: fixed;
  81. text-align: center;
  82. width: 100%;
  83. z-index: 2;
  84. .other-system {
  85. padding: 12px 23px;
  86. color: #1f2429;
  87. background: #fff;
  88. font-size: 16px;
  89. cursor: pointer;
  90. vertical-align: bottom;
  91. img {
  92. width: 16px;
  93. height: 16px;
  94. margin-right: 4px;
  95. margin-bottom: 3px;
  96. }
  97. }
  98. .isActive {
  99. color: #025baa;
  100. }
  101. }
  102. .other-bottom {
  103. display: flex;
  104. .other-left {
  105. position: fixed;
  106. z-index: 2;
  107. padding-top: 100px;
  108. color: #646c73;
  109. font-size: 14px;
  110. }
  111. .li-style {
  112. padding: 0 0 18px 35px;
  113. cursor: pointer;
  114. .circle {
  115. width: 6px;
  116. height: 6px;
  117. background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
  118. border-radius: 50%;
  119. display: inline-block;
  120. margin-right: 10px;
  121. }
  122. }
  123. .other-right {
  124. margin-top: 24px;
  125. flex: 1;
  126. }
  127. .legend-box {
  128. position: fixed;
  129. right: 32px;
  130. top: 155px;
  131. }
  132. }
  133. .qtfugl {
  134. img {
  135. width: 100%;
  136. height: 100%;
  137. margin: 0 auto;
  138. }
  139. }
  140. }
  141. </style>