123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- <template>
- <view>
- <power-change-header></power-change-header>
- <view class="changeCurrent">
- <view class="info">
- <view><image src="../../static/icon7.png"></image></view>
- <view>{{currentDescript || '-'}}</view>
- </view>
- <view class="times">
- {{currentTime || '-'}} | {{plate || '-'}}
- </view>
- </view>
- <view class="timeline">
- <view class="timeinfo">
- <view class="list" v-for="(item,index) in swapStepList" :key="index">
- <view>{{$moment(item.seqTime).format("YYYY-MM-DD")}}</view>
- <view>{{$moment(item.seqTime).format("HH:mm:ss")}}</view>
- </view>
- </view>
- <view class="line">
- <uni-steps :options="swapStepList" :active="step" direction="column"></uni-steps>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- swapStepList:this.$scan.swapStepList,
- step:this.$scan.swapStepList.length-1,
- currentDescript:'',
- currentTime:'',
- plate:'',
- swapInfoDTO:null,
- }
- },
- mounted() {
- this.InitWs()
- },
- methods: {
- InitWs(){
- if (this.$storage.get("exchangeNo")) {
- let msg = {
- type: "subscribeExchange",
- payLoad: {
- exchangeNo: this.$storage.get("exchangeNo")
- }
- }
- if (this.$ws.socketTask == null) {
- this.$ws.connect()
- this.$ws.onSocketOpen = () => {
- this.getWsData()
- this.$ws.sendmessage(msg)
- }
- }else{
- this.getWsData()
- this.$ws.sendmessage(msg)
- }
- }else {
- this.$utils.msg('未获取到换电编号')
- }
- // console.log(this.$scan,8989)
- // this.$scan.InitWs()
- // setTimeout(()=>{
- // this.swapStepList=this.$scan.swapStepList
- // this.step=this.$scan.swapStepList.length-1
- // this.currentDescript=this.$scan.swapStepList.slice(-1)[0].description,
- // this.currentTime=this.$scan.swapStepList.slice(-1)[0].seqTime,
- // this.plate=this.$scan.swapConfirmDTO.plate
- // },1000)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .timeline{
- padding:0 58rpx;
- display: flex;
- margin-top: 60rpx;
- .timeinfo{
- display: flex;
- flex-direction: column;
- text-align: right;
- .list{
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 102rpx;
- color: #c9cdd4;
- font-size: 28rpx;
- view:first-child{
- color:#86909c;
- }
- }
- }
- .line{
- flex: 1;
- }
- }
- .changeCurrent{
- width: 690rpx;
- margin: 30rpx auto;
- height: 180rpx;
- background-image: url('@/static/change-bg.png');
- background-size: 100% 100%;
- padding: 25rpx;
- box-sizing: border-box;
- display: flex;
- flex-direction:column;
- justify-content: space-around;
- .info{
- display: flex;
- color: #fff;
- font-size: 30rpx;
- font-weight: bold;
- line-height: 36rpx;
-
- image{
- width: 60rpx;
- height: 60rpx;
- padding-right: 25rpx;
- }
- view:last-child{
- padding-top: 12rpx;
- }
- }
- .times{
- color:#ededed;
- text-indent: 10rpx;
- }
- }
- </style>
|