record.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="uni-app">
  3. <view class="status-bar" />
  4. <view class="main-container">
  5. <wk-nav-bar title="审批记录" />
  6. <view class="container">
  7. <view class="list">
  8. <view v-for="(item, index) in recordList" :key="index" class="list-item">
  9. <view class="icon-box">
  10. <image v-if="item.examineStatus === 0" :src="$static('images/audit/await.png')" alt="" class="audit-icon" />
  11. <image v-else-if="item.examineStatus === 1" :src="$static('images/audit/pass.png')" alt="" class="audit-icon" />
  12. <image v-else-if="item.examineStatus === 2" :src="$static('images/audit/refuse.png')" alt="" class="audit-icon" />
  13. <image v-else-if="item.examineStatus === 3" :src="$static('images/audit/await.png')" alt="" class="audit-icon" />
  14. <image v-else-if="item.examineStatus === 4" :src="$static('images/audit/cancel.png')" alt="" class="audit-icon" />
  15. <image v-else-if="item.examineStatus === 5" :src="$static('images/audit/create.png')" alt="" class="audit-icon" />
  16. <image v-else-if="item.examineStatus === 6" :src="$static('images/audit/create.png')" alt="" class="audit-icon" />
  17. </view>
  18. <view class="content">
  19. <view class="time">
  20. <template v-if="item.orderId">
  21. 第{{ item.orderId }}级
  22. </template>
  23. {{ item.examineTime }}
  24. </view>
  25. <view class="info">
  26. <text class="name">
  27. {{ item.examineUserName }}
  28. </text>
  29. <text class="action">
  30. {{ calcStatus(item.examineStatus).label }}
  31. </text>
  32. <text v-if="item.examineStatus !== 3">
  33. 了此审批
  34. </text>
  35. </view>
  36. <view v-if="item.remarks" class="remarks">
  37. {{ item.remarks }}
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import { QueryExamineRecordLog } from 'API/examine'
  48. import {mapGetters} from 'vuex'
  49. export default {
  50. name: 'ExamineRecord',
  51. data() {
  52. return {
  53. id: null,
  54. recordList: []
  55. }
  56. },
  57. computed: {
  58. ...mapGetters({
  59. calcStatus: 'base/calcStatus'
  60. })
  61. },
  62. onLoad(options) {
  63. this.routerQuery = options
  64. this.id = options.id
  65. this.getRecordList()
  66. },
  67. methods: {
  68. getRecordList() {
  69. QueryExamineRecordLog({
  70. recordId: this.id
  71. }).then(res => {
  72. this.recordList = res
  73. }).catch()
  74. },
  75. }
  76. }
  77. </script>
  78. <style scoped lang="scss">
  79. .main-container {
  80. background-color: white;
  81. }
  82. .container {
  83. .list {
  84. padding: 30rpx 60rpx;
  85. .list-item {
  86. width: 100%;
  87. display: flex;
  88. padding-bottom: 30rpx;
  89. .icon-box {
  90. position: relative;
  91. width: 50rpx;
  92. .audit-icon {
  93. position: relative;
  94. width: 50rpx;
  95. height: 50rpx;
  96. display: block;
  97. }
  98. &:before {
  99. position: absolute;
  100. top: 30rpx;
  101. left: 50%;
  102. transform: translateX(-50%);
  103. content: '';
  104. width: 2rpx;
  105. height: 100%;
  106. /*background: url("~IMG/icon/circle.png") repeat-y center;*/
  107. /*background-size: 60px 10px;*/
  108. border-left: 1rpx dotted #cccccc;
  109. display: block;
  110. }
  111. }
  112. .content {
  113. flex: 1;
  114. line-height: 2;
  115. display: flex;
  116. flex-direction: column;
  117. margin-left: 36rpx;
  118. .time {
  119. font-size: 26rpx;
  120. color: $light;
  121. }
  122. .info {
  123. font-size: 30rpx;
  124. color: $gray;
  125. .name {}
  126. .action {}
  127. }
  128. .remarks {
  129. position: relative;
  130. font-size: 24rpx;
  131. color: $light;
  132. line-height: 1.5;
  133. background-color: $light-bg;
  134. padding: 20rpx 30rpx;
  135. margin-top: 25rpx;
  136. margin-right: 30rpx;
  137. &:before {
  138. position: absolute;
  139. top: -20rpx;
  140. left: 0;
  141. content: '';
  142. width: 0;
  143. height: 0;
  144. border-left: 20rpx solid $light-bg;
  145. border-right: 0 none;
  146. border-top: 20rpx solid transparent;
  147. border-bottom: 20rpx solid transparent;
  148. }
  149. }
  150. }
  151. &:last-child {
  152. .icon-box:before {
  153. display: none;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. </style>