t-o-news-tab-1 - 副本.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  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">五定表</view>
  24. <scroll-view scroll-x>
  25. <view class="inner">
  26. <view class="line">
  27. <view class="box">
  28. <view class="text text_1">序号</view>
  29. </view>
  30. <view class="box">
  31. <view class="text text_2">检查时间</view>
  32. </view>
  33. <view class="box">
  34. <view class="text text_3">检查地点</view>
  35. </view>
  36. <view class="box">
  37. <view class="text text_4">检查人</view>
  38. </view>
  39. <view class="box">
  40. <view class="text text_5">问题类型</view>
  41. </view>
  42. <view class="box">
  43. <view class="text text_6">问题或隐患描述</view>
  44. </view>
  45. <view class="box">
  46. <view class="text text_7">整改措施</view>
  47. </view>
  48. <view class="box">
  49. <view class="text text_8">完成日期</view>
  50. </view>
  51. <view class="box">
  52. <view class="text text_9">详情</view>
  53. </view>
  54. </view>
  55. <view class="line" v-for="item in 5">
  56. <view class="icon">
  57. <image src="./icon/new.png" mode=""></image>
  58. </view>
  59. <view class="box">
  60. <view class="text text_1">{{item}}</view>
  61. </view>
  62. <view class="box">
  63. <view class="text text_2">2021-12-25</view>
  64. </view>
  65. <view class="box">
  66. <view class="text text_3">红柳机房</view>
  67. </view>
  68. <view class="box">
  69. <view class="text text_4">李建中、牛之星、李雅婷</view>
  70. </view>
  71. <view class="box">
  72. <view class="text text_5">标准化</view>
  73. </view>
  74. <view class="box">
  75. <view class="text text_6">问题或隐患描述问题或隐患描述问题或隐患描述问题或隐患描述问题或隐患描述问题或隐患描述问题或隐患描述问题或隐患描述
  76. </view>
  77. </view>
  78. <view class="box">
  79. <view class="text text_7">整改措施整改措施整改措施整改措施整改措施整改措施</view>
  80. </view>
  81. <view class="box">
  82. <view class="text text_8">2021-12-31</view>
  83. </view>
  84. <view class="box">
  85. <view class="text text_9">查看</view>
  86. </view>
  87. </view>
  88. </view>
  89. </scroll-view>
  90. <view class="btn">
  91. <view class="icon">
  92. <image src="./icon/btn.png" mode=""></image>
  93. </view>
  94. <view class="btn_text" @click="go_all_list()">点击查看全部信息</view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </template>
  100. <script>
  101. export default {
  102. name: "t-o-news-tab-1",
  103. data() {
  104. return {
  105. active: 1
  106. };
  107. },
  108. methods: {
  109. change_active(item) {
  110. this.active = item
  111. },
  112. get_list(){
  113. },
  114. go_all_list(){
  115. uni.navigateTo({
  116. url:"../../origanization/news/tab_1/all_list/all_list"
  117. })
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="scss">
  123. .tab {
  124. display: flex;
  125. justify-content: space-around;
  126. align-items: center;
  127. background-color: #FFFFFF;
  128. margin-bottom: 20rpx;
  129. height: 90rpx;
  130. .item {
  131. position: relative;
  132. .text {
  133. font-size: 30rpx;
  134. color: #666666;
  135. }
  136. .active {
  137. font-weight: 700;
  138. color: #000000;
  139. }
  140. .line {
  141. position: absolute;
  142. bottom: -15rpx;
  143. left: 50%;
  144. transform: translateX(-30rpx);
  145. width: 60rpx;
  146. height: 4rpx;
  147. background-color: #009FE8;
  148. }
  149. }
  150. }
  151. .list {
  152. box-sizing: border-box;
  153. padding: 0 25rpx;
  154. .item {
  155. margin-bottom: 20rpx;
  156. width: 700rpx;
  157. background-color: #FFFFFF;
  158. border-radius: 20rpx;
  159. box-sizing: border-box;
  160. padding: 0 25rpx;
  161. padding-bottom: 20rpx;
  162. .title {
  163. text-align: center;
  164. height: 120rpx;
  165. line-height: 120rpx;
  166. font-size: 40rpx;
  167. font-weight: 700;
  168. }
  169. .inner {
  170. .line {
  171. display: flex;
  172. align-items: center;
  173. position: relative;
  174. .icon{
  175. position: absolute;
  176. top: -10rpx;
  177. right: 0;
  178. image{
  179. width: 33rpx;
  180. height: 18rpx;
  181. }
  182. }
  183. .box {
  184. display: flex;
  185. align-items: center;
  186. height: 90rpx;
  187. box-sizing: border-box;
  188. border: 1rpx solid #D9D9D9;
  189. .text {
  190. font-size: 26rpx;
  191. color: #333333;
  192. text-align: center;
  193. text-overflow: -o-ellipsis-lastline;
  194. overflow: hidden;
  195. text-overflow: ellipsis;
  196. display: -webkit-box;
  197. -webkit-line-clamp: 2;
  198. line-clamp: 2;
  199. -webkit-box-orient: vertical;
  200. }
  201. .text_1 {
  202. width: 80rpx;
  203. }
  204. .text_2 {
  205. width: 220rpx;
  206. }
  207. .text_3 {
  208. width: 200rpx;
  209. }
  210. .text_4 {
  211. width: 400rpx;
  212. }
  213. .text_5 {
  214. width: 200rpx;
  215. }
  216. .text_6 {
  217. width: 500rpx;
  218. }
  219. .text_7 {
  220. width: 500rpx;
  221. }
  222. .text_8 {
  223. width: 200rpx;
  224. }
  225. .text_9 {
  226. width: 200rpx;
  227. }
  228. }
  229. }
  230. .line:nth-child(1) {
  231. .box {
  232. height: 80rpx;
  233. background-color: #D8D8D8;
  234. .text {
  235. font-size: 28rpx;
  236. color: #000000;
  237. }
  238. }
  239. }
  240. }
  241. .btn {
  242. margin: 20rpx auto;
  243. width: 400rpx;
  244. height: 50rpx;
  245. background-color: #69BBFA;
  246. border-radius: 50rpx;
  247. display: flex;
  248. align-items: center;
  249. justify-content: center;
  250. .icon {
  251. image {
  252. width: 23rpx;
  253. height: 24rpx;
  254. display: block;
  255. }
  256. }
  257. .btn_text {
  258. margin-left: 10rpx;
  259. font-size: 28rpx;
  260. color: #FFFFFF;
  261. }
  262. }
  263. }
  264. }
  265. </style>