<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_name' },
        { label: '层级', key: 'level' },
        { label: '上级区域', key: 'parent_id', type: 'selectRemote',
          remoteParams: { skey: 'area_name', api: `other.admareainfolist`, opKey: 'area_name', opVal: 'id' }
        },
        { label: '备注', key: 'remark' },
        // { label: '区域', key: 'area_type', type: 'select', class: 'c-3', options: this.$dictData.area_type },
      ]
    }
  },
  methods: {
    searchHandle() {
      const oldform = this.$refs.ruleForm.baseForm
      const newForm = { ...oldform }
      this.$emit('change', newForm)
    }
  }
}
</script>
