Management.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <template>
  2. <div class="maintenance-supervision">
  3. <div class="maintenance-supervision_header">
  4. <button-group @change="change">
  5. <button-group-item style="width: 152px; padding: 7px 1px">
  6. 管理单位管理建筑排名
  7. </button-group-item>
  8. <button-group-item style="width: 152px; padding: 7px 1px">
  9. 维保单位管理建筑排名
  10. </button-group-item>
  11. <button-group-item style="width: 147px; padding: 7px 1px">
  12. 建筑入住单位数排名
  13. </button-group-item>
  14. </button-group>
  15. </div>
  16. <div v-if="checked === 0">
  17. <div class="row header">
  18. <span class="num">序号</span>
  19. <span class="time">管理单位名称</span>
  20. <span class="result">管理建筑数</span>
  21. </div>
  22. <VueSeamlessScroll :data="list1" :class-option="classOption" class="warp">
  23. <ul class="item">
  24. <li class="row" v-for="(item, index) in list1" :key="index">
  25. <span class="num">{{ index + 1 }}</span>
  26. <span class="time">{{ item[0] }}</span>
  27. <span class="person">{{ item[1] }}</span>
  28. <!-- <span class="result"
  29. :style="{
  30. color: resultType(item[2])
  31. }"
  32. >{{ item[2] }}</span
  33. > -->
  34. </li>
  35. </ul>
  36. </VueSeamlessScroll>
  37. </div>
  38. <div v-if="checked === 1">
  39. <div class="row header">
  40. <span class="num">序号</span>
  41. <span class="time">维保单位名称</span>
  42. <span class="person">维保建筑数</span>
  43. </div>
  44. <VueSeamlessScroll :data="list2" :class-option="classOption" class="warp">
  45. <ul class="item">
  46. <li class="row" v-for="(item, index) in list1" :key="index">
  47. <span class="num">{{ index + 1 }}</span>
  48. <span class="time">{{ item[0] }}</span>
  49. <span class="person">{{ item[1] }}</span>
  50. <!-- <span class="result"
  51. :style="{
  52. color: resultType(item[2])
  53. }"
  54. >{{ item[2] }}</span
  55. > -->
  56. </li>
  57. </ul>
  58. </VueSeamlessScroll>
  59. </div>
  60. <div v-if="checked === 2">
  61. <div class="row header">
  62. <span class="num">序号</span>
  63. <span class="time">登记事件</span>
  64. <span class="person">排查人员</span>
  65. <!-- <span class="result">是否存在隐患</span> -->
  66. </div>
  67. <VueSeamlessScroll :data="list3" :class-option="classOption" class="warp">
  68. <ul class="item">
  69. <li class="row" v-for="(item, index) in list3" :key="index">
  70. <span class="num">{{ index + 1 }}</span>
  71. <span class="time">{{ item[0] }}</span>
  72. <span
  73. class="person"
  74. :style="{
  75. color: resultType(item[1]),
  76. }"
  77. >{{ item[1] }}</span
  78. >
  79. </li>
  80. </ul>
  81. </VueSeamlessScroll>
  82. </div>
  83. <!-- <div v-if="checked === 3">
  84. <div class="row header">
  85. <span class="time">序号</span>
  86. <span class="person">建筑名称</span>
  87. <span class="result">入住单位数</span>
  88. </div>
  89. <VueSeamlessScroll
  90. :data="list3"
  91. :class-option="classOption"
  92. class="warp"
  93. >
  94. <ul class="item">
  95. <li class="row" v-for="(item, index) in list1" :key="index">
  96. <span class="num">{{ index+1 }}</span>
  97. <span class="time">{{ item[0] }}</span>
  98. <span class="person">{{ item[1] }}</span>
  99. <span class="result"
  100. :style="{
  101. color: resultType(item[2])
  102. }"
  103. >{{ item[2] }}</span
  104. > -->
  105. <!-- </li>
  106. </ul>
  107. </VueSeamlessScroll>
  108. </div> -->
  109. </div>
  110. </template>
  111. <script>
  112. import VueSeamlessScroll from "vue-seamless-scroll";
  113. export default {
  114. name: "MaintenanceSupervision",
  115. data() {
  116. return {
  117. list1: [
  118. ["环球金融大厦", "40"],
  119. ["天祥广场", "35"],
  120. ["经济科技大厦", "23"],
  121. ["环球金融大厦", "40"],
  122. ["环球金融大厦", "40"],
  123. ["环球金融大厦", "40"],
  124. ["环球金融大厦", "40"],
  125. ["环球金融大厦", "40"],
  126. ],
  127. list2: [
  128. ["沙坪坝支队", "合格"],
  129. ["两江支队", "不合格"],
  130. ["城口大队", "合格"],
  131. ["永川支队", "不合格"],
  132. ["城口大队", "合格"],
  133. ["永川支队", "合格"],
  134. ["永川支队", "不合格"],
  135. ["永川支队", "不合格"],
  136. ],
  137. list3: [
  138. ["环球金融大厦", "40"],
  139. ["天祥广场", "35"],
  140. ["经济科技大厦", "23"],
  141. ["环球金融大厦", "40"],
  142. ["环球金融大厦", "40"],
  143. ["环球金融大厦", "40"],
  144. ["环球金融大厦", "40"],
  145. ["环球金融大厦", "40"],
  146. ],
  147. checked: 0,
  148. };
  149. },
  150. components: {
  151. VueSeamlessScroll,
  152. },
  153. computed: {
  154. classOption() {
  155. return {
  156. singleHeight: 43,
  157. };
  158. },
  159. },
  160. methods: {
  161. change(idx) {
  162. this.checked = idx;
  163. console.log("切换索引", idx);
  164. },
  165. resultType(text) {
  166. return {
  167. 合格: "#23f59d",
  168. 不合格: "#df575b",
  169. 是: "#23f59d",
  170. 否: "#df575b",
  171. }[text];
  172. },
  173. },
  174. };
  175. </script>
  176. <style scoped lang="less">
  177. .maintenance-supervision {
  178. // padding: 10px 10px 0px 20px;
  179. .maintenance-supervision_header {
  180. border-bottom: 1px solid #154956;
  181. padding-bottom: 2px;
  182. margin-top: 15px;
  183. font-size: 12px;
  184. color: rgb(79, 149, 186);
  185. }
  186. .warp {
  187. height: 520px;
  188. margin: 0 auto;
  189. overflow: hidden;
  190. .item {
  191. list-style: none;
  192. padding: 0;
  193. margin: 0 auto;
  194. cursor: pointer;
  195. }
  196. }
  197. .header {
  198. color: #fff;
  199. height: 33px !important;
  200. line-height: 33px !important;
  201. background-color: rgba(0, 163, 255, 0.3) !important;
  202. color: #61dbff;
  203. margin-top: 15px;
  204. margin-bottom: 6px;
  205. }
  206. .row,
  207. li,
  208. a {
  209. display: block;
  210. height: 39px;
  211. line-height: 39px;
  212. margin-bottom: 4px;
  213. display: flex;
  214. justify-content: space-between;
  215. align-items: center;
  216. font-size: 16px;
  217. background-color: rgba(0, 0, 0, 0.2);
  218. .time,
  219. .num,
  220. .person,
  221. .result {
  222. flex: 0.33;
  223. display: flex;
  224. justify-content: center;
  225. align-items: center;
  226. }
  227. .num {
  228. flex: 0.15;
  229. }
  230. .time {
  231. flex: 1;
  232. }
  233. .result {
  234. flex: 0.35;
  235. }
  236. }
  237. }
  238. </style>