gearboxOil.vue 12 KB

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