<template>
  <base-form slot="content" ref="ruleForm" :data="searchData">
    <div slot="footer">
      <el-button :loading="listLoading" icon="el-icon-search" class="xl-form-btn bgc1" @click="searchHandle">查询</el-button>
      <!-- <el-button :loading="listLoading" icon="el-icon-document" class="xl-form-btn bgc2" @click="toExportExcel">导出{{ this.$route.meta.title }}信息</el-button> -->
    </div>
  </base-form>
</template>
<script>
export default {
  props: {
    listLoading: Boolean
  },
  inject: ['parentData'],
  data() {
    return {
      searchData: [
        { label: '所属区域', key: 'area_type', type: 'select', options: this.$dictData.area_type},
        { label: '学校名称', key: 'school_name' },
        { label: '学校属性', key: 'school_attrib', type: 'select', class: 'c-3', options: this.$dictData.school_attrib },
        { label: '学校类型', key: 'school_type', type: 'select', class: 'c-3', options: this.$dictData.school_type },
        { label: '学校分类', key: 'school_cate', type: 'select', class: 'c-3', options: this.$dictData.school_cate },
        { label: '学校预警', key: 'school_warn', type: 'select', class: 'c-3', options: this.$dictData.school_warn },
      ]
    }
  },
  methods: {
    searchHandle() {
      const oldform = this.$refs.ruleForm.baseForm
      const newForm = { ...oldform }
      this.$emit('change', newForm)
    }
  }
}
</script>
