gearboxOil.vue 10 KB

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