lubrication-detail.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view class="container py2">
  3. <view class="mx3 p3 bg-color-white" style="border-radius: 16rpx">
  4. <!-- <view class="f-size-32 f-weight-6 py2 mb-2 title">任务信息</view> -->
  5. <equipment-line title="任务名称" :content="infoData.name" />
  6. <equipment-line title="计划名称" :content="infoData.planName" />
  7. <equipment-line title="设备" :content="infoData.sbName" />
  8. <equipment-line title="部件" :content="infoData.partName" />
  9. <equipment-line title="部件编号" :content="infoData.partNo" />
  10. <equipment-line title="任务开始时间" :content="infoData.startTime" />
  11. <equipment-line title="任务结束时间" :content="infoData.endTime" />
  12. <equipment-line
  13. title="实际开始时间"
  14. :content="infoData.actualStartTime"
  15. />
  16. <equipment-line title="实际结束时间" :content="infoData.actualEndTime" />
  17. <equipment-line
  18. title="设备状态"
  19. :content="sbStatusMap[infoData.sbStatus]"
  20. />
  21. <equipment-line title="任务状态" :content="statusMap[infoData.status]" />
  22. <equipment-line title="要求" :content="infoData.requirement" />
  23. <equipment-line title="备注" :content="infoData.remark" />
  24. <equipment-line title="检查结果" :content="infoData.feedback" />
  25. </view>
  26. <view class="p-fixed d-flex j-around a-center footer">
  27. <view class="main-color-bg text-color-white common" @tap="handleUpdate"
  28. >修改</view
  29. >
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default {
  35. data() {
  36. return {
  37. infoData: {},
  38. detailId: "",
  39. statusMap: null,
  40. sbStatusMap: null,
  41. };
  42. },
  43. onLoad(options) {
  44. this.detailId = options.detailId;
  45. this.statusMap = this.$DictCache.getLabelByValueMapByType(
  46. this.$DictCache.TYPE.CHECK_JOB_STATUS
  47. );
  48. this.sbStatusMap = this.$DictCache.getLabelByValueMapByType(
  49. this.$DictCache.TYPE.CHECK_JOB_SB_STATUS
  50. );
  51. },
  52. onShow() {
  53. this.initData();
  54. },
  55. methods: {
  56. handleUpdate() {
  57. uni.navigateTo({
  58. url: "/pages/lubrication-add/lubrication-add?detailId=" + this.detailId,
  59. });
  60. },
  61. initData() {
  62. this.$Http
  63. .fetchCheckJob({
  64. id: this.detailId,
  65. })
  66. .then((res) => {
  67. this.infoData = res.data;
  68. });
  69. },
  70. },
  71. };
  72. </script>
  73. <style lang="less">
  74. page {
  75. background-color: #f4f4f4;
  76. }
  77. .container {
  78. padding-bottom: 100rpx;
  79. .footer {
  80. bottom: 0;
  81. left: 0;
  82. right: 0;
  83. background-color: #fff;
  84. z-index: 10000;
  85. }
  86. .title {
  87. border-bottom: 1rpx solid #f4f4f4;
  88. }
  89. .img {
  90. width: 100rpx;
  91. height: 100rpx;
  92. }
  93. .p-fixed {
  94. border-top: 1rpx solid #f4f4f4;
  95. height: 100rpx;
  96. .common {
  97. padding: 15rpx 200rpx;
  98. border-radius: 30rpx;
  99. background-color: #0082ff;
  100. color: #fff;
  101. }
  102. }
  103. }
  104. </style>