<template>
  <div id="steps-1">
    <el-row>
      <el-col :span="24" class="main">
        <el-steps :active="active" align-center finish-status="success">
          <el-step title="买家已申请取消订单"> </el-step>
          <el-step title="审核"> </el-step>
          <el-step title="售后结束"> </el-step>
        </el-steps>
        <el-col :span="24" style="text-align: center">
          <el-col v-if="active == 0"> 买家已申请取消订单 </el-col>
          <el-col v-if="active == 1" style="text-align: center; margin: 15px 0; font-size: 18px">
            <el-button type="primary" @click="exam('4')">同意售后，处理取消订单</el-button>
            <el-button type="primary" @click="exam('!4')">拒绝</el-button>
          </el-col>
          <el-col v-if="active == 3">
            <el-col style="text-align: center; margin: 15px 0"><i class="el-icon-success"></i></el-col>
            <el-col style="text-align: center; margin: 15px 0; font-size: 18px">已取消订单</el-col>
          </el-col>
          <el-col v-if="active == 4">
            <el-col style="text-align: center; margin: 15px 0"><i class="el-icon-error"></i></el-col>
            <el-col style="text-align: center; margin: 15px 0; font-size: 18px">已拒绝</el-col>
          </el-col>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'steps-1',
  props: { active: { type: Number } },
  components: {},
  data: function () {
    return {};
  },
  created() {},
  methods: {
    exam(status) {
      this.$emit('exam', status);
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.el-icon-success {
  font-size: 60px;
  color: green;
}
.el-icon-error {
  font-size: 60px;
  color: red;
}
</style>
