equipment-use.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view style="padding-top: 50rpx">
  3. <view class="mx3 my2 p3 bg-color-white" style="border-radius: 16rpx">
  4. <equipment-line title="使用区域" :content="infoData.useAreaName" />
  5. <equipment-line title="使用公司" :content="infoData.useCompanyName" />
  6. <equipment-line title="使用项目部" :content="infoData.useProjectName" />
  7. <equipment-line title="使用部门" :content="infoData.useDeptName" />
  8. <equipment-line title="使用班组" :content="infoData.useGroupName" />
  9. <equipment-line title="当前部门" :content="infoData.saveDeptName" />
  10. <equipment-line title="使用人" :content="infoData.saveUserName" />
  11. <equipment-line title="总行驶里程" :content="infoData.totalMiles + ''" />
  12. <equipment-line title="总行驶小时" :content="infoData.totalHours + ''" />
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. detailId: '',
  21. infoData: {}
  22. };
  23. },
  24. onLoad(options) {
  25. this.detailId = options.detailId;
  26. this.initData();
  27. },
  28. methods: {
  29. initData() {
  30. this.$Http
  31. .fetchSbInfo({
  32. id: this.detailId
  33. })
  34. .then((res) => {
  35. console.log(res);
  36. this.infoData = res.data;
  37. });
  38. this.statusMap = this.$DictCache.getLabelByValueMapByType(
  39. this.$DictCache.TYPE.SB_INFO_STATUS
  40. );
  41. }
  42. }
  43. };
  44. </script>
  45. <style lang="less">
  46. page {
  47. background-color: #f4f4f4;
  48. }
  49. </style>