gearboxOil.vue 13 KB

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