<template>
  <div id="info">
    <el-row>
      <el-col :span="24" class="main">
        <el-col :span="24" class="one">
          <el-button type="primary" size="mini" @click="back()">返回</el-button>
        </el-col>
        <el-col :span="24" class="two">
          <el-tabs v-model="active" type="card">
            <el-tab-pane label="保安员基本信息" name="first">
              <basic-info :basic_id="basic_id"></basic-info>
            </el-tab-pane>
            <el-tab-pane label="其他信息" name="second">
              <other-info :basic_id="basic_id"></other-info>
            </el-tab-pane>
            <el-tab-pane label="电子资料" name="third">
              <files-info :basic_id="basic_id"></files-info>
            </el-tab-pane>
            <el-tab-pane label="资料审核" name="fourth">
              <datash-info :basic_id="basic_id" @back="back"></datash-info>
            </el-tab-pane>
          </el-tabs>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import basicInfo from '../baybm/infoParts/basic-1.vue';
import otherInfo from '../baybm/infoParts/other-1.vue';
import filesInfo from '../baybm/infoParts/files-1.vue';
// 资料审核
import datashInfo from './parts/datash-1.vue';
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'info',
  props: {},
  components: {
    basicInfo,
    otherInfo,
    filesInfo,
    datashInfo,
  },
  data: function () {
    return {
      active: 'fourth',
    };
  },
  created() {},
  methods: {
    // 返回
    back() {
      this.$router.push({ path: '/adminPolice/security/bmzgsh' });
    },
  },
  computed: {
    ...mapState(['user']),
    basic_id() {
      return this.$route.query.id;
    },
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .one {
    text-align: right;
    margin: 10px 0;
  }
}
</style>
