gearboxOil.vue 9.8 KB

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