<template>
  <div>
    <el-row>
      <el-form ref="queryForm" :model="queryParams" inline>
        <el-row>
          <el-form-item>
            <el-input v-model="queryParams.name" placeholder="姓名/联系方式" clearable style="width: 200px" @keyup.enter.native="handleQuery" />
          </el-form-item>
          <el-form-item>
            <el-select v-model="queryParams.source" placeholder="选择线索来源" clearable @change="handleQuery">
              <el-option v-for="dict in sourceOptions" :key="dict.dictValue" :value="dict.dictValue" />
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select v-model="queryParams.intentionState" placeholder="选择意向状态" clearable @change="handleQuery">
              <el-option v-for="dict in intentionOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue">
                <i class="el-icon-star-on" :style="dict.cssClass" />
                <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictValue }}</span>
              </el-option>
            </el-select>
          </el-form-item>
          <el-form-item>
            <el-select v-model="queryParams.followUser2" placeholder="选择跟进人员" filterable clearable @change="handleQuery">
              <el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="创建时间">
            <el-date-picker v-model="queryParams.createTime" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleQuery" />
          </el-form-item>
        </el-row>

        <el-row>
          <el-form-item label-width="80">
            <template slot="label">
              <el-button type="text" @click="handleFilter">筛选</el-button>
            </template>
            <el-checkbox-group v-model="queryParams.etc" @change="etcChange">
              <el-checkbox v-if="filterItems.myCreate" label="myCreate">我创建的</el-checkbox>
              <el-checkbox v-if="filterItems.myValid" label="myValid">我的有效</el-checkbox>
              <el-checkbox v-if="filterItems.valid" label="valid">有效线索</el-checkbox>
              <el-checkbox v-if="filterItems.todayValid" label="todayValid">今日有效线索</el-checkbox>
              <el-checkbox v-if="filterItems.todayFollow" label="todayFollow">今日跟踪</el-checkbox>
              <el-checkbox v-if="filterItems.outtime" label="outtime">
                <el-badge :value="expireCount" type="danger">过期线索</el-badge>
              </el-checkbox>
              <el-checkbox v-if="filterItems.relate" label="relate">相关线索</el-checkbox>
              <el-checkbox v-if="filterItems.reSign" label="reSign">撞单线索</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
          <el-form-item class="m20">
            <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
            <el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
            <el-button type="primary" @click="handlePublicClue">公海</el-button>
            <el-dropdown trigger="click">
              <el-button type="primary">
                更多
                <i class="el-icon-arrow-down el-icon--right" />
              </el-button>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item @click.native="handleImport(false)">导入</el-dropdown-item>
                <el-dropdown-item @click.native="handleImport(true)">一点通导入</el-dropdown-item>
                <el-dropdown-item v-if="admin == 'true'" @click.native="handleExport">导出</el-dropdown-item>
                <el-dropdown-item v-if="admin == 'true'" @click.native="handleBatChUpdate()">批量修改</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </el-form-item>
          <!-- <el-button type="primary" v-if="admin != 'true' && accept" @click="handleAccept(false)">停止接收</el-button>
            <el-button type="primary" v-if="admin != 'true' && !accept" @click="handleAccept(true)">启动接收</el-button> -->
        </el-row>
      </el-form>
    </el-row>
  </div>
</template>
<script>
export default {

}
</script>

