index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <view>
  3. <power-change-header></power-change-header>
  4. <view class="changeCurrent">
  5. <view class="info">
  6. <view><image src="../../static/icon7.png"></image></view>
  7. <view>{{currentDescript || '-'}}</view>
  8. </view>
  9. <view class="times">
  10. {{currentTime || '-'}} | {{plate || '-'}}
  11. </view>
  12. </view>
  13. <view class="timeline">
  14. <view class="timeinfo">
  15. <view class="list" v-for="(item,index) in swapStepList" :key="index">
  16. <view>{{$moment(item.seqTime).format("YYYY-MM-DD")}}</view>
  17. <view>{{$moment(item.seqTime).format("HH:mm:ss")}}</view>
  18. </view>
  19. </view>
  20. <view class="line">
  21. <uni-steps :options="swapStepList" :active="step" direction="column"></uni-steps>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. swapStepList:this.$scan.swapStepList,
  31. step:this.$scan.swapStepList.length-1,
  32. currentDescript:'',
  33. currentTime:'',
  34. plate:'',
  35. }
  36. },
  37. methods: {
  38. InitWs(){
  39. console.log(this.$scan,8989)
  40. this.$scan.InitWs()
  41. setTimeout(()=>{
  42. this.swapStepList=this.$scan.swapStepList
  43. this.step=this.$scan.swapStepList.length-1
  44. this.currentDescript=this.$scan.swapStepList.slice(-1)[0].description,
  45. this.currentTime=this.$scan.swapStepList.slice(-1)[0].seqTime,
  46. this.plate=this.$scan.swapConfirmDTO.plate
  47. },1000)
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .timeline{
  54. padding:0 58rpx;
  55. display: flex;
  56. margin-top: 60rpx;
  57. .timeinfo{
  58. display: flex;
  59. flex-direction: column;
  60. text-align: right;
  61. .list{
  62. display: flex;
  63. flex-direction: column;
  64. width: 100%;
  65. height: 102rpx;
  66. color: #c9cdd4;
  67. font-size: 28rpx;
  68. view:first-child{
  69. color:#86909c;
  70. }
  71. }
  72. }
  73. .line{
  74. flex: 1;
  75. }
  76. }
  77. .changeCurrent{
  78. width: 690rpx;
  79. margin: 30rpx auto;
  80. height: 180rpx;
  81. background-image: url('@/static/change-bg.png');
  82. background-size: 100% 100%;
  83. padding: 25rpx;
  84. box-sizing: border-box;
  85. display: flex;
  86. flex-direction:column;
  87. justify-content: space-around;
  88. .info{
  89. display: flex;
  90. color: #fff;
  91. font-size: 30rpx;
  92. font-weight: bold;
  93. line-height: 36rpx;
  94. image{
  95. width: 60rpx;
  96. height: 60rpx;
  97. padding-right: 25rpx;
  98. }
  99. view:last-child{
  100. padding-top: 12rpx;
  101. }
  102. }
  103. .times{
  104. color:#ededed;
  105. text-indent: 10rpx;
  106. }
  107. }
  108. </style>