<template>
  <div class="scan-wait part-box">
    <Button type="error" @click="resetConfig">重新设置采集信息</Button>
    <Button type="primary" @click="toScan">开始采集</Button>
  </div>
</template>

<script>
import { mapState } from "vuex";

export default {
  name: "scan-wait",
  data() {
    return {};
  },
  computed: {
    ...mapState("client", ["clientConfig"])
  },
  methods: {
    resetConfig() {
      this.$router.push({ name: "ScanArea" });
    },
    toScan() {
      const scanRouter = this.clientConfig.packageScan
        ? "GroupScan"
        : "LineScan";
      const routerName = this.clientConfig.paperStage
        ? "CheckInfo"
        : scanRouter;

      this.$router.push({ name: routerName });
    }
  }
};
</script>
