gearboxOil.vue 10 KB

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