<template>
  <div class="auditionClass">
             <save-form
      :inline="true"
      class="searchForm"
      ref="searchForm"
      @submit="FetchList"
      @reset="reset"
      :model.sync="searchForm"
    >
      <el-form-item prop="organId">
        <el-select
          class="multiple"
          filterable
          v-model.trim="searchForm.organId"
          multiple
          collapse-tags
          clearable
          placeholder="请选择分部"
        >
          <el-option
            v-for="(item, index) in selects.branchs"
            :key="index"
            :label="item.name"
            :value="item.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button native-type="submit" type="danger">搜索</el-button>
        <el-button native-type="reset" type="primary">重置</el-button>
      </el-form-item>
    </save-form>

    <Statistics :groupType='groupType' />

    <TableList :groupType='groupType' />
  </div>
</template>

<script>
import Statistics from './components/index';
import TableList from './components/tableList';
export default {
  name: "auditionClass",
  components: {
    Statistics,
    TableList
  },
    provide() {
    return {
      organId: () => this.searchForm.organId.join(","),
      isSearch: ()=> this.isSearch,
    };
  },
  data() {
    return {
      groupType: 'PRACTICE',
        searchForm: {
        organId: [],
      },
      isSearch: false,
    }
  },
  async mounted() {

  },
  methods: {
    __init() {

    },
        FetchList() {
      this.isSearch = !this.isSearch;
    },
    reset() {
      this.searchForm.organId = [];
      this.FetchList();
    },
  }
};
</script>

<style lang="scss" scoped>
.rows {
    > div {
      margin-bottom: 20px;
    }
  }
::v-deep  .el-card__body .statistic {
  margin-bottom: 15px;
  padding: 0;
}
.statistic {
  .statistic-content > span {
    font-size: 22px !important;
    &:first-child {
      font-size: 14px !important;
    }
  }
}
</style>
