<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 {
  mixins: [],
  props: {
    listLoading: Boolean
  },
  inject: ['parentData'],
  data() {
    return {
      searchData: [
        { label: '手机号', key: 'phone' },
        { label: '昵称', key: 'nickname' },
        { label: '备注', key: 'tag' },
        { label: '是否置业经理', key: 'is_sale', type: 'select', class: 'c-3', options: this.$dictData.sys_yesno },
        { label: '是否开启推送', key: 'is_notice', type: 'select', class: 'c-3', options: this.$dictData.sys_yesno },
      ]
    }
  },
  methods: {
    searchHandle() {
      const oldform = this.$refs.ruleForm.baseForm
      const newForm = { ...oldform }
      this.$emit('change', newForm)
    }
  }
}
</script>
