<template>
  <steps v-if="['0', '1'].includes(auth)"></steps>
  <div v-else-if="userInfo.is_admin">
    <el-row>
      <el-col :span="24">
        <admin-hello></admin-hello>
      </el-col>
    </el-row>
    <el-row :gutter="12">
      <el-col :span="12">
        <card title="开户流程">ABCDEF</card>
      </el-col>
      <el-col :span="12">
        <card title="工资发放流程">ABCDEF</card>
      </el-col>
    </el-row>
  </div>
  <workbench v-else-if="auth === '2' && loginType === 'Type-S'"></workbench>
  <div v-else-if="auth === '2'&& loginType !== 'Type-S'">
    <el-row :gutter="12" style="margin-bottom: 35px">
      <el-col :span="8">
        <hello></hello>
      </el-col>
      <el-col :span="8">
        <hello></hello>
      </el-col>
      <el-col :span="8">
        <hello></hello>
      </el-col>
      <el-col :md="16" :sm="24" v-if="userInfo.is_master">
        <wage></wage>
      </el-col>
      <el-col :md="8" :sm="24">
        <business></business>
      </el-col>
      <el-col :md="16" :sm="24">
        <worker></worker>
      </el-col>
      <el-col :md="8" :sm="24" v-if="userInfo.is_master">
        <quick></quick>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapGetters, mapState } from "vuex";
import hello from "./cards/hellocard";
import card from "./cards/card";
import worker from "./cards/workercard";
import wage from "./cards/wagecard";
import quick from "./cards/quickcard";
import business from "./cards/businesscard";
import adminHello from "./cards/adminhellocard";
import steps from "./cards/authSteps/index";
import workbench from '../../views/workstation/workbench/index'

export default {
  name: "wel",
  components: {
    hello,
    card,
    worker,
    wage,
    quick,
    business,
    adminHello,
    steps,
    workbench,
  },
  data() {
    return {};
  },
  computed: {
    ...mapState({
      auth: (state) => state.user.auth,
      loginType: (state) => state.user.userInfo.login_type,
    }),
    ...mapGetters(["userInfo"]),
  },
  created() {
  },
  methods: {
    handleChange(val) {
      window.console.log(val);
    },
  },
};
</script>

<style>
.el-font-size {
  font-size: 14px;
}
</style>

