gearboxOil.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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="jiyouBox">
  11. <view class="jiyouTop">
  12. <view class="jiyoutopTitle">变速箱油</view>
  13. </view>
  14. <view class="jylineBox">
  15. <view class="jyline" v-for="(item,index) in MaintainPartList" @click="godetail(item)">
  16. <view class="jyimgBox">
  17. <image :src="item.imgs.split(',')[0]" mode="" class="jyimg"></image>
  18. </view>
  19. <view class="jyName">
  20. <!-- <span class="best">最佳</span> -->
  21. <span class="jyNametxt">{{item.name}} </span>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. <!-- 养护信息 -->
  27. <view class="jiyouBox">
  28. <view class="jiyouTop">
  29. <view class="jiyoutopTitle">养护信息</view>
  30. </view>
  31. <view class="yhxxline">
  32. <view class="yhxxlineLeft">型号/厂家</view>
  33. <view class="yhxxlineRight">
  34. {{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.carmodelGroupGearbox ||'--' }} / {{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.manufactor||'--' }}
  35. </view>
  36. </view>
  37. <view class="yhxxline">
  38. <view class="yhxxlineLeft">原厂加注量</view>
  39. <view class="yhxxlineRight">
  40. {{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.fillingcapacity ||'--' }}
  41. </view>
  42. </view>
  43. <view class="yhxxline">
  44. <view class="yhxxlineLeft">换油量(L)</view>
  45. <view class="yhxxlineRight">
  46. 重力:{{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.gravity ||'--' }} 机器:{{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.machine ||'--' }}
  47. </view>
  48. </view>
  49. <view class="yhxxline">
  50. <view class="yhxxlineLeft">换油接头</view>
  51. <view class="yhxxlineRight">
  52. {{ detail.carmodelGroupGearbox&&detail.carmodelGroupGearbox.oilchangeConnector ||'--' }}
  53. </view>
  54. </view>
  55. <view class="yhxxline">
  56. <view class="yhxxlineLeft">养护指导</view>
  57. <view class="yhxxlineRight">{{detail.carmodelGroupGearbox.guidance}}</view>
  58. </view>
  59. <view class="yhxxImgBox">
  60. <view class="yhxxImglineBox" v-if="detail.oilchangeConnectorPhoto.length>0">
  61. <view class="yhxxImgBorder" @click="showImgList(detail.oilchangeConnectorPhoto)">
  62. <image :src="detail.oilchangeConnectorPhoto[0]" mode="" class="yhxxImg"></image>
  63. <view class="yhxxCkdt">
  64. <image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
  65. <view class="yhxxCkdtNum">{{detail.oilchangeConnectorPhoto.length}}</view>
  66. </view>
  67. </view>
  68. <view class="yhxximgName">接头位置</view>
  69. </view>
  70. <view class="yhxxImglineBox" v-if="detail.guidancePhoto.length>0">
  71. <view class="yhxxImgBorder" @click="showImgList(detail.guidancePhoto)">
  72. <image :src="detail.guidancePhoto[0]" mode="" class="yhxxImg"></image>
  73. <view class="yhxxCkdt">
  74. <image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
  75. <view class="yhxxCkdtNum">{{detail.guidancePhoto.length}}</view>
  76. </view>
  77. </view>
  78. <view class="yhxximgName">养护指导</view>
  79. </view>
  80. <view class="yhxxImglineBox" v-if="detail.inspectionPhoto.length>0">
  81. <view class="yhxxImgBorder" @click="showImgList(detail.inspectionPhoto)">
  82. <image :src="detail.inspectionPhoto[0]" mode="" class="yhxxImg"></image>
  83. <view class="yhxxCkdt">
  84. <image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
  85. <view class="yhxxCkdtNum">{{detail.inspectionPhoto.length}}</view>
  86. </view>
  87. </view>
  88. <view class="yhxximgName">检查口/加注/放油口</view>
  89. </view>
  90. <view class="yhxxImglineBox" v-if="detail.boxPhoto.length>0">
  91. <view class="yhxxImgBorder" @click="showImgList(detail.boxPhoto)">
  92. <image :src="detail.boxPhoto[0]" mode="" class="yhxxImg"></image>
  93. <view class="yhxxCkdt">
  94. <image src="../../static/img/icon_pic.png" mode="" class="iconpic"></image>
  95. <view class="yhxxCkdtNum">{{detail.boxPhoto.length}}</view>
  96. </view>
  97. </view>
  98. <view class="yhxximgName">变速箱图片</view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </template>
  105. <script>
  106. export default {
  107. components: {
  108. },
  109. data() {
  110. return {
  111. optdata:'',
  112. MaintainPartList:[],
  113. detail:'',
  114. }
  115. },
  116. onLoad(opt) {
  117. this.optdata=opt;
  118. this.queryMaintainPartList();
  119. this.queryGearbox()
  120. },
  121. methods: {
  122. showImgList(arr){
  123. uni.previewImage({
  124. urls: arr,
  125. longPressActions: {
  126. itemList: ['发送给朋友', '保存图片'],
  127. success: function(data) {
  128. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  129. },
  130. fail: function(err) {
  131. console.log(err.errMsg);
  132. }
  133. }
  134. });
  135. },
  136. queryMaintainPartList(){
  137. uni.showLoading({ title: '加载中'});
  138. this.$http('partsByOpen/queryMaintainPartList', {
  139. groupId:this.optdata.id,
  140. componentCode:'007005',
  141. },'POST').then(res => {
  142. uni.hideLoading();
  143. this.MaintainPartList=res.data
  144. })
  145. },
  146. queryGearbox(){
  147. this.$http('partsByOpen/queryGearbox', {
  148. groupId:this.optdata.id,
  149. },'POST').then(res => {
  150. this.detail=res.data
  151. })
  152. },
  153. godetail(e){
  154. uni.navigateTo({
  155. url:'/pages/index/goodsDetail?id='+e.id
  156. })
  157. }
  158. }
  159. }
  160. </script>
  161. <style scoped>
  162. .content {
  163. min-height: 100vh;
  164. background: #F4F5F7;
  165. }
  166. .box {
  167. padding: 0 24rpx;
  168. background: #ffffff;
  169. }
  170. .historylinecarImg {
  171. width: 46rpx;
  172. height: 46rpx;
  173. }
  174. .historylinecar {
  175. font-weight: 400;
  176. font-size: 26rpx;
  177. color: #1A1A1A;
  178. line-height: 37rpx;
  179. width: 636rpx;
  180. }
  181. .historyLine {
  182. display: flex;
  183. justify-content: space-between;
  184. padding: 30rpx 0;
  185. border-top: 1rpx solid #EEEEEE;
  186. }
  187. .cont {
  188. padding:0 24rpx 30rpx 24rpx;
  189. }
  190. .toplineImg{
  191. width: 35rpx;
  192. height: 34rpx;
  193. }
  194. .topName{
  195. line-height: 34rpx;font-weight: 400;
  196. color: #FFFFFF;font-size: 28rpx;padding-left: 16rpx;
  197. }
  198. .topBox{
  199. width: 702rpx;
  200. height: 98rpx;
  201. background: #FFFFFF linear-gradient(132deg, #FF8635 0%, #FF4828 100%);
  202. border-radius: 16rpx;
  203. display: flex;justify-content: space-around;
  204. }
  205. .topsx{
  206. width: 2rpx;background: #ffffff;
  207. height: 54rpx;margin-top: 22rpx;
  208. }
  209. .topLine{
  210. display: flex;padding-top: 32rpx;
  211. }
  212. .jiyouTop{
  213. display: flex;justify-content: space-between;
  214. }
  215. .jiyouBox{
  216. margin-top: 30rpx;border-radius: 16rpx;
  217. background: #ffffff;padding: 30rpx;
  218. }
  219. .jiyoutopTitle{
  220. font-weight: 500;font-size: 28rpx;
  221. color: #1A1A1A;
  222. line-height: 40rpx;
  223. }
  224. .jyzl{
  225. font-weight: 400;line-height: 40rpx;
  226. color: #666666;font-size: 24rpx;
  227. }
  228. .jyimg{
  229. width: 302rpx;
  230. height: 302rpx;
  231. border-radius: 10rpx;
  232. }
  233. .jyline{
  234. width: 302rpx;padding-top: 30rpx;
  235. }
  236. .jyName{
  237. font-weight: 400;font-size: 22rpx;
  238. color: #1A1A1A;
  239. line-height:36rpx ;
  240. overflow: hidden;
  241. text-overflow: ellipsis;
  242. display: -webkit-box;
  243. -webkit-box-orient: vertical;
  244. -webkit-line-clamp: 2;
  245. padding-top: 10rpx;
  246. }
  247. .best{
  248. color: #FF4F00;border-radius: 6rpx;
  249. padding: 0 8rpx;border: 1px solid #FF4F00;
  250. }
  251. .jylineBox{
  252. display: flex;justify-content: space-between;flex-wrap: wrap;
  253. }
  254. .yhxxline{
  255. display: flex;font-size: 26rpx;line-height: 36rpx;padding: 20rpx 0;
  256. }
  257. .yhxxlineLeft{
  258. color: #999999;width: 174rpx;
  259. }
  260. .yhxxlineRight{
  261. color: #3C3C3C;width: 458rpx;
  262. }
  263. .yhxxImg{
  264. width: 138rpx;
  265. height: 138rpx;
  266. }
  267. .yhxxImgBorder{
  268. width: 138rpx;
  269. height: 138rpx;
  270. border-radius: 7rpx;
  271. border: 1rpx solid #EEEEEE;
  272. overflow: hidden;
  273. position: relative;
  274. }
  275. .yhxximgName{
  276. width: 138rpx;font-weight: 400;
  277. color: #3C3C3C;font-size: 24rpx;
  278. line-height: 34rpx;padding-top: 16rpx;
  279. }
  280. .iconpic{
  281. width: 18rpx;
  282. height: 15rpx;
  283. }
  284. .yhxxCkdt{
  285. width: 62rpx;
  286. height: 30rpx;
  287. border-radius: 15rpx;
  288. background: rgba(0, 0, 0, 0.6);
  289. position: absolute;
  290. bottom: 10rpx;right: 10rpx;
  291. display: flex;
  292. justify-content: center;
  293. align-items: center;
  294. }
  295. .yhxxCkdtNum{
  296. color: #ffffff;font-weight: 500;font-size: 20rpx;padding-left: 5rpx; padding-bottom: 6rpx;
  297. }
  298. .yhxxImgBox{
  299. display: flex;
  300. }
  301. .yhxxImglineBox{
  302. margin-right: 30rpx;
  303. }
  304. .yhxxImglineBox:nth-child(4){
  305. margin-right: 0rpx;
  306. }
  307. </style>