<template>
  <div class="app-container detail-container">
    <el-tabs v-model="activeName" @tab-click="handleClick" class="detail-tab">
      <el-tab-pane label="工商信息" name="first"></el-tab-pane>
      <el-tab-pane label="工商变更" name="second"></el-tab-pane>
    </el-tabs>

    <div v-if="activeName=='first'">
      111
    </div>
    <tables
      :tableLoading="tableLoading"
      :tableData="tableData"
      :forData="forData"
      :tableDataTotal="tableDataTotal"
      :queryParams="queryParams"
      @handle-current-change="handleCurrentChange"
      v-if="activeName=='second'"
    />
  </div>
</template>

<script>
import mixin from '../mixins/mixin'
export default {
  name: 'Businfo',
  mixins: [mixin],
  data() {
    return {
      activeName: 'first',
      queryParams: {
        cid: 6034,
        pageNum: 1,
        pageSize: 10
      },
      forData: [
        {label: '变更日期', prop: 'inReason', slot: true},
        {label: '变更事项', prop: 'inDate'},
        {label: '变更前', prop: 'department'},
        {label: '变更后', prop: 'department'}
      ],
      formData: [],
      //列表
      tableLoading:false,
      tableData:[],
      pageIndex:1,
      pageSize:10,
      tableDataTotal:0,
    }
  },
  created() {
    this.dataRegion()
  },
  methods: {
    handleClick(){
      this.dataRegion()
    },
    async dataRegion() {
      this.tableData = [
        {id:1, inReason:'达萨法达萨法', inDate:'000',tag:'aaa'},
        {id:2, inReason:'达萨法达萨法', inDate:'111'},
        {id:3, inReason:'达萨法达萨法', inDate:'222'},
        {id:4, inReason:'达萨法达萨法', inDate:'333'}
      ] //测试
    },
    handleQuery(params) {
      console.log(params)
    }
  }
}
</script>

<style lang="scss" scoped>
.detail-container{
  margin: 0;
  padding: 16px;
  background: #FFFFFF;
  .detail-tab{
    margin: 0 0 0 -16px;
    ::v-deep .el-tabs__nav-wrap::after{
      display: none;
    }
    ::v-deep .el-tabs__item{
      font-size: 16px;
      height: 30px;
      line-height: 30px;
      padding: 0 16px;
      &.is-active{
        font-weight: bold;
      }
    }
  }
}
</style>
