<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-form :model="form" :rules="rules" ref="form" label-width="130px">
            <el-tabs v-model="active" type="card">
              <el-tab-pane label="保安培训机构申请信息" name="first"><train-data :form="form"></train-data></el-tab-pane>
              <el-tab-pane label="申请单位信息" name="second"><company-data :form="form"></company-data></el-tab-pane>
              <el-tab-pane label="主要管理人员信息" name="third"><admin-data :form="form"></admin-data></el-tab-pane>
              <el-tab-pane label="培训机构师资信息" name="fourth"><teamoney-data :form="form"></teamoney-data></el-tab-pane>
              <el-tab-pane label="申请电子资料信息" name="fifth"><elec-data :form="form"></elec-data></el-tab-pane>
            </el-tabs>
          </el-form>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import trainData from './parts/train-data.vue';
import companyData from './parts/company-data.vue';
import adminData from './parts/admin-data.vue';
import teamoneyData from './parts/teamoney-data.vue';
import elecData from './parts/elec-data.vue';
import { mapState, createNamespacedHelpers } from 'vuex';
export default {
  name: 'info',
  props: {},
  components: { trainData, companyData, adminData, teamoneyData, elecData },
  data: function () {
    return {
      active: 'first',
      form: {},
      rules: {},
    };
  },
  created() {
    if (this.id) this.search();
  },
  methods: {
    search() {},
    // 返回
    back() {
      this.$router.push({ path: '/adminPolice/permit/pxslsqsl' });
    },
  },
  computed: {
    ...mapState(['user']),
    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;
  }
  .two {
    .btn {
      text-align: center;
    }
    /deep/.el-form-item {
      margin: 0 0 10px 0;
    }
    .longlabel {
      /deep/.el-form-item__label {
        line-height: 20px;
        padding: 0 12px;
      }
    }
  }
}
</style>
