<template>
  <div id="result-1">
    <van-row>
      <van-col span="24" class="main">
        <van-col span="24" class="one">
          <van-steps direction="vertical" :active="step">
            <van-step v-for="(item, index) in info.record" :key="index">
              <p>{{ item.word }}</p>
              <p>审核时间：{{ item.time }}</p>
              <p>审核意见：{{ item.remark || '暂无' }}</p>
            </van-step>
          </van-steps>
        </van-col>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'result-1',
  props: {
    info: { type: Object },
  },
  components: {},
  data: function () {
    return {
      step: 0,
    };
  },
  created() {},
  methods: {
    searchStep(data) {
      this.$set(this, `step`, data.length - 1);
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    info: {
      deep: true,
      immediate: true,
      handler(val) {
        if (val) this.searchStep(val.record);
      },
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .one {
    p {
      margin: 0 0 8px 0;
    }
  }
}
</style>
