t-i-ningmeijituan.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <view class="content">
  3. <view class="section_1">
  4. <scroll-view scroll-x>
  5. <view class="tab_box">
  6. <view class="tab" v-for="(item,index) in home_link[0].children" :key="index">
  7. <view class="title" @click="change_active(index+1)" :class="active==index+1?'active':''">
  8. {{item.title}}</view>
  9. </view>
  10. </view>
  11. </scroll-view>
  12. <view v-for="(item,index) in home_link[0].children" :key="index">
  13. <view class="list" v-if="index+1 == active">
  14. <view class="item" v-for="(item_2,index_2) in item.children" :key="index_2"
  15. @click="go_record(item_2)">
  16. {{item_2.title}}
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 快速通道 -->
  22. <view class="section_3" v-if="home_link[2].children.length > 0">
  23. <view class="title">快速通道</view>
  24. <view class="list">
  25. <view class="item" v-for="(item,index) in home_link[2].children" :key="index" @click="go_record(item)">
  26. <image :src="item.thumb" mode="widthFix"></image>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- <view class="bottom" @click="go_h5()">
  31. <image src="./icon/bottom.png" mode="aspectFit"></image>
  32. </view> -->
  33. </view>
  34. </template>
  35. <script>
  36. import {
  37. goToLink
  38. } from "@/common/common.js"
  39. export default {
  40. name: "t-i-ningmeijituan",
  41. props: [
  42. "mine_code",
  43. "home_link"
  44. ],
  45. data() {
  46. return {
  47. active: 1,
  48. };
  49. },
  50. mounted() {
  51. },
  52. methods: {
  53. change_active(index) {
  54. console.log(index)
  55. this.active = index
  56. },
  57. go_record(item) {
  58. goToLink(item, this.mine_code)
  59. },
  60. go_h5() {
  61. uni.navigateTo({
  62. // http://ningdongyunying.nxjiewei.com:8011/assets/html/QRcoddetails/index.html?name=&uuid=&pageId=10ad4420d27b4146bafe43802f03d5c6&departmentID=
  63. url: "../../index/h5/h5?url=" +
  64. "http://ningdongyunying.nxjiewei.com:8011/web/monitor/dispatch/center"
  65. })
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss">
  71. .content {
  72. margin-top: 10rpx;
  73. padding-bottom: 40rpx;
  74. background-color: #FFFFFF;
  75. }
  76. .section_1 {
  77. box-sizing: border-box;
  78. padding: 25rpx;
  79. .tab_box {
  80. display: flex;
  81. .tab {
  82. margin-right: 40rpx;
  83. text-align: center;
  84. .title {
  85. width: 180rpx;
  86. height: 80rpx;
  87. line-height: 80rpx;
  88. font-size: 36rpx;
  89. }
  90. .active {
  91. color: #009fe8;
  92. border-bottom: 4rpx solid #009fe8;
  93. }
  94. }
  95. }
  96. .list {
  97. margin-top: 30rpx;
  98. overflow: hidden;
  99. .item {
  100. float: left;
  101. margin-right: 20rpx;
  102. margin-bottom: 30rpx;
  103. width: 160rpx;
  104. box-sizing: border-box;
  105. border: 2rpx solid #009fe8;
  106. border-radius: 20rpx;
  107. font-size: 28rpx;
  108. line-height: 70rpx;
  109. //超过一行省略号
  110. overflow: hidden;
  111. white-space: nowrap;
  112. text-overflow: ellipsis;
  113. padding: 0 10rpx;
  114. background-color: #66C7F218;
  115. color: #009FE8;
  116. text-align: center;
  117. }
  118. .item:nth-child(4n) {
  119. margin-right: 0;
  120. }
  121. }
  122. }
  123. .section_2 {
  124. box-sizing: border-box;
  125. padding: 0 25rpx;
  126. .title {
  127. line-height: 120rpx;
  128. font-size: 36rpx;
  129. }
  130. .list {
  131. display: flex;
  132. flex-wrap: wrap;
  133. justify-content: space-between;
  134. .item {
  135. margin-bottom: 20rpx;
  136. width: 340rpx;
  137. height: 180rpx;
  138. border-radius: 20rpx;
  139. overflow: hidden;
  140. image {
  141. width: 340rpx;
  142. height: 180rpx;
  143. }
  144. }
  145. }
  146. }
  147. .section_3 {
  148. box-sizing: border-box;
  149. padding: 0 25rpx;
  150. .title {
  151. line-height: 120rpx;
  152. font-size: 36rpx;
  153. }
  154. .list {
  155. display: flex;
  156. flex-wrap: wrap;
  157. justify-content: space-between;
  158. .item {
  159. margin-bottom: 20rpx;
  160. width: 700rpx;
  161. border-radius: 10rpx;
  162. overflow: hidden;
  163. image {
  164. width: 700rpx;
  165. }
  166. }
  167. }
  168. }
  169. .bottom {
  170. margin-top: 10rpx;
  171. text-align: center;
  172. image {
  173. width: 700rpx;
  174. height: 240rpx;
  175. }
  176. }
  177. </style>