<template>
  <el-form ref="form" :model="form" :rules="rules">
    <el-row>
      <el-col :span="8">
        <el-checkbox v-model="form.myCreate" label="myCreate">我创建的</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.myValid" label="myValid">我的有效</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.valid" label="valid">有效线索</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.todayValid" label="todayValid">今日有效线索</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.todayFollow" label="todayFollow">今日跟踪</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.outtime" label="outtime">过期线索</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.relate" label="relate">相关线索</el-checkbox>
      </el-col>
      <el-col :span="8">
        <el-checkbox v-model="form.reSign" label="reSign">撞单线索</el-checkbox>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
export default {
  name: 'FilterForm',
  model: {
    prop: 'info',
    event: 'update'
  },
  props: {
    info: {
      type: Object,
      default: () => {}
    },
    options: {
      type: Object,
      default: () => ({
        userOptions: []
      })
    }
  },
  data() {
    return {
      form: JSON.parse(JSON.stringify(this.info)),
      rules: {}
    };
  },
  watch: {
    form: {
      handler(val) {
        this.$emit('update', val);
      },
      deep: true,
      immediate: true
    }
  },
  methods: {
    validate() {
      return this.$refs.form.validate();
    }
  }
};
</script>
