t-o-news-tab-2-UI备份.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <view>
  3. <view class="tab">
  4. <view class="item" @click="change_active(1)">
  5. <view class="text" :class="active == 1?'active':''">安全管理</view>
  6. <view class="line" v-if="active == 1"></view>
  7. </view>
  8. <view class="item" @click="change_active(2)">
  9. <view class="text" :class="active == 2?'active':''">巡检维护</view>
  10. <view class="line" v-if="active == 2"></view>
  11. </view>
  12. <view class="item" @click="change_active(3)">
  13. <view class="text" :class="active == 3?'active':''">党建经营</view>
  14. <view class="line" v-if="active == 3"></view>
  15. </view>
  16. <view class="item" @click="change_active(4)">
  17. <view class="text" :class="active == 4?'active':''">其他</view>
  18. <view class="line" v-if="active == 4"></view>
  19. </view>
  20. </view>
  21. <view class="list">
  22. <view class="item" v-for="item in 2">
  23. <view class="title">
  24. <view class="text">车辆管理</view>
  25. <view class="tip">24</view>
  26. </view>
  27. <view class="inner">
  28. <view class="left">
  29. <view class="user">
  30. <image
  31. src="https://cdn.colorhub.me/X-ec79ZLNkBQcrD3tH7tRV-nrSrcZDvlEdM-c_-pAWA/rs:fill:280:280:0/g:sm/bG9jYWw6Ly8vODcv/ZWIvZDlkMmNkZDkz/MjBkZTI0ZDUxZWE4/MTQyYmQzNThhNmY4/MWU0ODdlYi5qcGVn.jpg"
  32. mode="aspectFill"></image>
  33. </view>
  34. </view>
  35. <view class="right">
  36. <view class="name">李建中<text>信息化站</text></view>
  37. <view class="text">
  38. 在“车辆管理”中“司机出车记录”内新增内容。
  39. </view>
  40. <view class="img_box">
  41. <view class="img" v-for="item in 4">
  42. <image
  43. src="https://cdn.colorhub.me/8pIGfpKGL2VzBVaKPEX0htM1Cy0xMjOPtWV8HDbDQKs/rs:fill:280:280:0/g:sm/bG9jYWw6Ly8vYjIv/ZmMvZmI4Mjc4YmE5/NzJhNzVhZWYwYzZh/NzE1OTMzMjk0MWU5/ODVhYjJmYy5qcGVn.jpg"
  44. mode="aspectFill"></image>
  45. </view>
  46. </view>
  47. <view class="time">2021-12-14 08:32:56</view>
  48. <view class="btn">
  49. <view class="icon">
  50. <image src="./icon/btn.png" mode=""></image>
  51. </view>
  52. <view class="btn_text" @click="go_all_list()">点击查看全部信息</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. name: "t-o-news-tab-2",
  63. data() {
  64. return {
  65. active: 1,
  66. };
  67. },
  68. methods: {
  69. change_active(item) {
  70. this.active = item
  71. },
  72. go_all_list() {
  73. uni.navigateTo({
  74. url: "../../origanization/news/tab_2/all_list/all_list"
  75. })
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss">
  81. .tab {
  82. display: flex;
  83. justify-content: space-around;
  84. align-items: center;
  85. background-color: #FFFFFF;
  86. margin-bottom: 20rpx;
  87. height: 90rpx;
  88. .item {
  89. position: relative;
  90. .text {
  91. font-size: 30rpx;
  92. color: #666666;
  93. }
  94. .active {
  95. font-weight: 700;
  96. color: #000000;
  97. }
  98. .line {
  99. position: absolute;
  100. bottom: -15rpx;
  101. left: 50%;
  102. transform: translateX(-30rpx);
  103. width: 60rpx;
  104. height: 4rpx;
  105. background-color: #009FE8;
  106. }
  107. }
  108. }
  109. .list {
  110. box-sizing: border-box;
  111. padding: 0 25rpx;
  112. .item {
  113. margin-bottom: 20rpx;
  114. width: 700rpx;
  115. background-color: #FFFFFF;
  116. border-radius: 20rpx;
  117. box-sizing: border-box;
  118. padding: 0 25rpx;
  119. .title {
  120. display: flex;
  121. justify-content: center;
  122. align-items: center;
  123. .text {
  124. text-align: center;
  125. height: 120rpx;
  126. line-height: 120rpx;
  127. font-size: 40rpx;
  128. font-weight: 700;
  129. }
  130. .tip {
  131. margin-left: 10rpx;
  132. width: 64rpx;
  133. height: 30rpx;
  134. color: red;
  135. text-align: right;
  136. font-size: 24rpx;
  137. background-image: url(./icon/new.png);
  138. background-size: 43rpx 30rpx;
  139. background-repeat: no-repeat;
  140. }
  141. }
  142. .inner {
  143. width: 650rpx;
  144. display: flex;
  145. .left {
  146. .user {
  147. image {
  148. width: 90rpx;
  149. height: 90rpx;
  150. border-radius: 50%;
  151. }
  152. }
  153. }
  154. .right {
  155. margin-left: 20rpx;
  156. width: 600rpx;
  157. .name {
  158. margin-top: 5rpx;
  159. font-size: 32rpx;
  160. text {
  161. margin-left: 20rpx;
  162. font-size: 26rpx;
  163. color: #3a3a3a;
  164. }
  165. }
  166. .text {
  167. width: 550rpx;
  168. margin-top: 10rpx;
  169. font-size: 28rpx;
  170. }
  171. .img_box {
  172. margin-top: 20rpx;
  173. width: 550rpx;
  174. overflow: hidden;
  175. .img {
  176. margin-bottom: 10rpx;
  177. float: left;
  178. margin-right: 20rpx;
  179. image {
  180. width: 170rpx;
  181. height: 170rpx;
  182. border-radius: 10rpx;
  183. }
  184. }
  185. .img:nth-child(3n) {
  186. margin-right: 0;
  187. }
  188. }
  189. .time {
  190. font-size: 24rpx;
  191. color: #999999;
  192. }
  193. .btn {
  194. margin: 20rpx auto;
  195. width: 400rpx;
  196. height: 50rpx;
  197. background-color: #69BBFA;
  198. border-radius: 50rpx;
  199. display: flex;
  200. align-items: center;
  201. justify-content: center;
  202. .icon {
  203. image {
  204. width: 23rpx;
  205. height: 24rpx;
  206. display: block;
  207. }
  208. }
  209. .btn_text {
  210. margin-left: 10rpx;
  211. font-size: 28rpx;
  212. color: #FFFFFF;
  213. }
  214. }
  215. }
  216. }
  217. }
  218. }
  219. </style>