deviceInfo.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <view class="device-info-main">
  3. <navBar left="0" bgColor="transparent"></navBar>
  4. <view class="device-name">{{list.car_name}}</view>
  5. <view class="block-card">
  6. <view class="info-view">
  7. <view class="info-title">{{ $t('车架号') }}</view>
  8. <view class="info-value">{{list.frame_no}}</view>
  9. </view>
  10. <view class="info-view">
  11. <view class="info-title">{{ $t('设备编号') }}</view>
  12. <view class="info-value">{{car_sn}}</view>
  13. </view>
  14. <view class="info-view">
  15. <view class="info-title">{{ $t('车辆总里程') }}</view>
  16. <view class="info-value">{{(Number(list.total_mil) / 1000).toFixed(2)}}km</view>
  17. </view>
  18. </view>
  19. <view class="flex-row">
  20. <view class="block-card-1" style="margin-right: 18rpx;">
  21. <img class="info-icon" src="https://qiniu.bms16.com/FoyFReERWQ5jmqQIk0Aj9V7SWGR2" alt="">
  22. <view class="info-text">{{ $t('中控硬件') }}</view>
  23. <view class="info-vosion">{{list.control_hardware}}</view>
  24. </view>
  25. <view class="block-card-1">
  26. <img class="info-icon" src="https://qiniu.bms16.com/Fvf3btY0699U2P65cRxYGDBADNHr" alt="">
  27. <view class="info-text">{{ $t('中控软件') }}</view>
  28. <view class="info-vosion">{{list.control_software}}</view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. var config = require('../../common/config.js');
  35. var common = require('../../common/common.js');
  36. var request = require('../../common/request');
  37. export default {
  38. data() {
  39. return {
  40. car_sn:"",
  41. list:{}
  42. };
  43. }
  44. /**
  45. * 生命周期函数--监听页面加载
  46. */
  47. ,
  48. onLoad: function(options) {
  49. this.car_sn = uni.getStorageSync('car_info').car_sn || ''
  50. this.loadCarDetailFn()
  51. },
  52. methods: {
  53. async loadCarDetailFn() {
  54. let {
  55. data
  56. } = await request.postApi(config.API_FLK_CAR_DETAIL, {
  57. car_sn:this.car_sn
  58. })
  59. if(data.code == 200){
  60. this.list = data.data
  61. }
  62. }
  63. }
  64. };
  65. </script>
  66. <style>
  67. @import './deviceInfo.css';
  68. </style>