engineOil.vue 4.7 KB

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