p-production-statistics-section-4.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <view>
  3. <view class="list">
  4. <view class="item" v-for="(item,index) in list" :key="index">
  5. <view class="item_title">{{item.name}}</view>
  6. <view class="item_content">
  7. <view class="box">
  8. <view class="name">早班产量</view>
  9. <view class="num">{{item.n1}} 吨</view>
  10. </view>
  11. <view class="box">
  12. <view class="name">中班产量</view>
  13. <view class="num">{{item.n2}} 吨</view>
  14. </view>
  15. <view class="box">
  16. <view class="name">晚班产量</view>
  17. <view class="num">{{item.n3}} 吨</view>
  18. </view>
  19. </view>
  20. <view class="item_bottom">
  21. <view class="left">年累计产量:<text>{{item.year}} 吨</text></view>
  22. <view class="right" @click="go_container(item.org_num)">
  23. <view class="more">更多详情</view>
  24. <uni-icons type="arrowright" size="12" color="#75B8D5"></uni-icons>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. data() {
  34. return {
  35. list:[]
  36. };
  37. },
  38. mounted() {
  39. this.get_list()
  40. },
  41. methods:{
  42. go_container(org_num){
  43. uni.navigateTo({
  44. url: "../../production/production_report/production_report?org_num=" +
  45. org_num,
  46. })
  47. },
  48. get_list(){
  49. this.$p_api.coalmine_ratio({
  50. }).then((res)=>{
  51. // console.log(res.data.data)
  52. this.list = res.data.data
  53. })
  54. },
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .list {
  60. padding-bottom: 40rpx;
  61. .item {}
  62. .item_title {
  63. text-align: center;
  64. line-height: 100rpx;
  65. font-size: 34rpx;
  66. font-weight: 700;
  67. }
  68. .item_content {
  69. box-sizing: border-box;
  70. padding: 0 20rpx;
  71. display: flex;
  72. justify-content: space-between;
  73. .box {
  74. box-sizing: border-box;
  75. width: 200rpx;
  76. text-align: center;
  77. border-radius: 6px;
  78. overflow: hidden;
  79. .name {
  80. font-size: 26rpx;
  81. line-height: 40rpx;
  82. }
  83. .num {
  84. font-size: 26rpx;
  85. line-height: 40rpx;
  86. }
  87. }
  88. .box:nth-child(1) {
  89. border: 1px solid #00A2E8;
  90. }
  91. .box:nth-child(1) .name {
  92. background-color: #00A2E8;
  93. }
  94. .box:nth-child(2) {
  95. border: 1px solid #FFBC34;
  96. }
  97. .box:nth-child(2) .name {
  98. background-color: #FFBC34;
  99. }
  100. .box:nth-child(3) {
  101. border: 1px solid #FFC0B2;
  102. }
  103. .box:nth-child(3) .name {
  104. background-color: #FFC0B2;
  105. }
  106. }
  107. .item_bottom {
  108. display: flex;
  109. justify-content: space-between;
  110. box-sizing: border-box;
  111. padding: 40rpx 0;
  112. margin: 0 20rpx;
  113. border-bottom: 1px solid #eee;
  114. .left {
  115. font-size: 24rpx;
  116. text {
  117. font-weight: 700;
  118. }
  119. }
  120. .right {
  121. display: flex;
  122. align-items: baseline;
  123. .more {
  124. margin-right: 6rpx;
  125. font-size: 24rpx;
  126. color: #75B8D5;
  127. }
  128. }
  129. }
  130. }
  131. </style>