engineOil.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <view class="content">
  3. <view class="box">
  4. <view class="historyLine">
  5. <image :src="optdata.logo" mode="" class="historylinecarImg"></image>
  6. <view class="historylinecar">{{optdata.value}}</view>
  7. </view>
  8. </view>
  9. <view class="cont">
  10. <view class="topBox">
  11. <view class="topLine" @click="goby">
  12. <image src="../../static/img/icon_baoyang.png" mode="" class="toplineImg"></image>
  13. <view class="topName">保养周期</view>
  14. </view>
  15. <view class="topsx"></view>
  16. <view class="topLine" @click="gopz">
  17. <image src="../../static/img/icon_cheliang.png" mode="" class="toplineImg"></image>
  18. <view class="topName">车辆配置</view>
  19. </view>
  20. </view>
  21. <view class="jiyouBox">
  22. <view class="jiyouTop">
  23. <view class="jiyoutopTitle">机油推荐</view>
  24. <view class="jyzl">机油加注量:<span style="color: #FF4F00;">{{oilusage}}</span> </view>
  25. </view>
  26. <view class="jylineBox">
  27. <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
  28. <view class="jyimgBox">
  29. <image :src="item.imgs.split(',')[0]" mode="" class="jyimg"></image>
  30. </view>
  31. <view class="jyName">
  32. <!-- <span class="best">最佳</span> -->
  33. <span class="jyNametxt">{{item.name}} </span>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <script>
  42. export default {
  43. components: {
  44. },
  45. data() {
  46. return {
  47. optdata:'',
  48. MaintainPartList:[],
  49. oilusage:'',
  50. }
  51. },
  52. onLoad(opt) {
  53. console.log(opt)
  54. this.optdata=opt;
  55. this.queryMaintainPartList()
  56. this.queryOilInfoByGroupID()
  57. },
  58. methods: {
  59. queryMaintainPartList(){
  60. uni.showLoading({ title: '加载中'});
  61. this.$http('partsByOpen/queryMaintainPartList', {
  62. groupId:this.optdata.id,
  63. componentCode:'015001',
  64. },'POST').then(res => {
  65. uni.hideLoading();
  66. this.MaintainPartList=res.data
  67. })
  68. },
  69. queryOilInfoByGroupID(){
  70. var that=this;
  71. this.$http('matchingByOpen/queryOilInfoByGroupID', {
  72. // mileage:'30000',
  73. groupId:this.optdata.id,
  74. },'POST').then(res => {
  75. var arr = res.data
  76. arr.forEach(item=>{
  77. if(item[0]=='机油'){
  78. that.oilusage=item[2]
  79. }
  80. })
  81. console.log(that.oilusage)
  82. })
  83. },
  84. goby(){
  85. uni.navigateTo({
  86. url:'/pages/index/maintenance?nLevelID='+this.optdata.nLevelID+'&id='+this.optdata.id
  87. })
  88. },
  89. godetail(e){
  90. uni.navigateTo({
  91. url:'/pages/index/goodsDetail?id='+e.id
  92. })
  93. },
  94. gopz(){
  95. uni.navigateTo({
  96. url:'/pages/index/carConfiguration?nLevelID='+this.optdata.nLevelID
  97. })
  98. }
  99. }
  100. }
  101. </script>
  102. <style scoped>
  103. .content {
  104. min-height: 100vh;
  105. background: #F4F5F7;
  106. }
  107. .box {
  108. padding: 0 24rpx;
  109. background: #ffffff;
  110. }
  111. .historylinecarImg {
  112. width: 46rpx;
  113. height: 46rpx;
  114. }
  115. .historylinecar {
  116. font-weight: 400;
  117. font-size: 26rpx;
  118. color: #1A1A1A;
  119. line-height: 37rpx;
  120. width: 636rpx;
  121. }
  122. .historyLine {
  123. display: flex;
  124. justify-content: space-between;
  125. padding: 30rpx 0;
  126. border-top: 1rpx solid #EEEEEE;
  127. }
  128. .cont {
  129. padding: 30rpx 24rpx;
  130. }
  131. .toplineImg{
  132. width: 35rpx;
  133. height: 34rpx;
  134. }
  135. .topName{
  136. line-height: 34rpx;font-weight: 400;
  137. color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
  138. }
  139. .topBox{
  140. width: 702rpx;
  141. height: 98rpx;
  142. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  143. border-radius: 16rpx;
  144. display: flex;justify-content: space-around;
  145. }
  146. .topsx{
  147. width: 2rpx;background: #ffffff;
  148. height: 54rpx;margin-top: 22rpx;
  149. }
  150. .topLine{
  151. display: flex;padding-top: 32rpx;
  152. }
  153. .jiyouTop{
  154. display: flex;justify-content: space-between;
  155. }
  156. .jiyouBox{
  157. margin-top: 30rpx;border-radius: 16rpx;
  158. background: #ffffff;padding: 30rpx;
  159. }
  160. .jiyoutopTitle{
  161. font-weight: 500;font-size: 28rpx;
  162. color: #1A1A1A;
  163. line-height: 40rpx;
  164. }
  165. .jyzl{
  166. font-weight: 400;line-height: 40rpx;
  167. color: #666666;font-size: 24rpx;
  168. }
  169. .jyimg{
  170. width: 302rpx;
  171. height: 302rpx;
  172. border-radius: 10rpx;
  173. }
  174. .jyline{
  175. width: 302rpx;padding-top: 30rpx;
  176. }
  177. .jyName{
  178. font-weight: 400;font-size: 22rpx;
  179. color: #1A1A1A;
  180. line-height:36rpx ;
  181. overflow: hidden;
  182. text-overflow: ellipsis;
  183. display: -webkit-box;
  184. -webkit-box-orient: vertical;
  185. -webkit-line-clamp: 2;
  186. padding-top: 10rpx;
  187. }
  188. .best{
  189. color: #FF4F00;border-radius: 6rpx;
  190. padding: 0 8rpx;border: 1px solid #FF4F00;
  191. }
  192. .jylineBox{
  193. display: flex;justify-content: space-between;flex-wrap: wrap;
  194. }
  195. .jyNametxt{
  196. }
  197. </style>