123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <template>
- <view>
- <view class="flow" style="display: flex;" v-for="(item, index) in logListData" :key="index">
- <view class="steps">
- <view class="steps_list">
- <view :class="index==0?'tails':'active-tails'"></view>
- <view class="node">
- <view class="active-node">
- </view>
- </view>
- <view v-if="(index+1)<logListData.length" class="tail"
- :class="{'active-tail':parseInt(item.id)-1 == item.index}" :hidden="item.index == 0">
- </view>
- </view>
- </view>
- <view class="wrapper">
- <view class="title">
- <text>{{item.name}}</text>
- </view>
- <view class="time">
- <span>{{item.timeMessage}}</span>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- /*
- item:没条记录详情
- activity: 当前进度条状态
- wrapperStatus:流程状态对应字段
- wrapperTitle:详情对应字段
- index:进度条排列序号 index == 0代表最后一个没有竖立进度条
- date:时间
- */
- import {
- logList
- } from "@/api/maintain.js"
- export default {
- data() {
- return {
- detail: [{
- activity: 0,
- logType: 1,
- createTime: "2021.07.01 20:00",
- },
- {
- activity: 1,
- logType: 2,
- createTime: "2021.07.01 20:00",
- },
- {
- activity: 2,
- logType: 3,
- createTime: "2021.07.01 20:00",
- },
- {
- activity: 3,
- logType: 4,
- createTime: "2021.07.01 20:00",
- },
- {
- activity: 4,
- logType: 5,
- createTime: "2021.07.01 20:00",
- },
- {
- activity: 5,
- logType: 6,
- createTime: "2021.07.01 20:00",
- }
- ],
- orderData: {},
- logListData: [],
- }
- },
- onLoad(options) {
- this.orderData = JSON.parse(decodeURIComponent(options.data));
- logList({
- orderId: this.orderData.id
- }).then((res) => {
- this.logListData = res.data
- })
- },
- methods: {
- }
- }
- </script>
- <style lang="scss">
- .flow {
- background: #F5F5F5;
- }
- page {
- height: 100%;
- background: #F5F5F5;
- }
- .wrapper {
- width: 605rpx;
- height: 138rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- margin: 46rpx 46rpx 46rpx 37rpx;
- padding: 33rpx;
- .title {
- font-weight: bold;
- font-size: 26rpx;
- }
- .time {
- padding-top: 20rpx;
- font-size: 26rpx;
- color: #333;
- }
- }
- .steps {
- display: flex;
- .steps_list {
- display: flex;
- flex-direction: column;
- align-items: center;
- // padding: 0 0 0 5px;
- // padding: 0 0 40rpx;
- margin-left: 54rpx;
- // height: 160rpx;
- }
- .active-tails {
- height: 118rpx;
- width: 2rpx;
- background: #E8E7E7;
- }
- .tails {
- height: 118rpx;
- width: 2rpx;
- }
- .tail {
- height: calc(100% - 15rpx);
- width: 2rpx;
- background: #E8E7E7;
- }
- .active-tail {
- width: 2rpx;
- background-color: #F87362 !important;
- }
- .node {
- width: 28rpx;
- height: 28rpx;
- background: rgba(0, 94, 255, 0.15);
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- .active-node {
- width: 14rpx;
- height: 14rpx;
- background: #005EFF;
- border-radius: 50%;
- }
- }
- }
- </style>
|