src/views/other/commonDialog/SelectLeadDialog.vue
@@ -10,18 +10,12 @@
    >
      <div class="bg-view">
        <div class="query-bg">
          <el-input placeholder="请输入内容" v-model="queryInput" size="mini" class="input-with-select">
            <el-select v-model="select" slot="prepend" placeholder="请选择">
              <el-option label="全部字段" value="1"></el-option>
              <el-option label="客户名称" value="2"></el-option>
              <el-option label="商机状态" value="3"></el-option>
              <el-option label="商机来源" value="4"></el-option>
            </el-select>
          </el-input>
          <div class="btn">
            <el-button type="primary" size="mini" disabled>设置字段</el-button>
            <el-button type="primary" size="mini" disabled>快速创建</el-button>
          </div>
          <SearchCommonView
            ref="searchCommonView"
            :search-options="searchOptions"
            @searchClick="searchClick"
            @resetClick="resetClick"
          />
        </div>
        <el-table
          :data="tableData"
@@ -42,7 +36,10 @@
          </div>
        </el-table>
        <div slot="footer" class="dialog-footer">
          <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div>
          <!-- <div class="remark">说明:支持多字段模糊查询,仅显示符合条件的前5条数据</div> -->
          <div class="btn-pager">
            <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
          </div>
        </div>
      </div>
    </el-dialog>
@@ -51,8 +48,10 @@
<script>
import { getSalesLeadsList } from "@/api/client/salesLead"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
  name: "EditSelChanceDialog",
  mixins: [pageMixin],
  props: {
    editCommonConfig: {
      type: Object,
@@ -60,7 +59,8 @@
        return {
          editVisible: false,
          title: "",
          infomation: {}
          infomation: {},
          search_map: {}
        }
      }
    }
@@ -75,7 +75,12 @@
      select: "1",
      tableData: [],
      searchSelOptions: [],
      loading: false
      loading: false,
      searchOptions: [
        { value: "name", label: "客户名称" },
        { value: "businessStatus", label: "商机状态" },
        { value: "sales_sources_id", label: "商机来源" }
      ]
    }
  },
  created() {
@@ -88,7 +93,11 @@
    // 请求数据
    async getData() {
      this.loading = true
      await getSalesLeadsList()
      await getSalesLeadsList({
        search_map: this.editConfig.search_map,
        page: this.pagerOptions.currPage,
        pageSize: this.pagerOptions.pageSize
      })
        .then((res) => {
          console.log(res)
          if (res.code === 200) {
@@ -98,7 +107,8 @@
                  ...item
                }
              })
              this.tableData = list.slice(0, 5) || []
              this.tableData = list || []
              this.pagerOptions.totalCount = res.data.count
            } else {
              this.tableData = []
            }
@@ -117,6 +127,18 @@
      this.editConfig.editVisible = false
      console.log(row)
      this.$emit("selClient", row, "lead")
    },
    // 搜索
    searchClick(val, content) {
      console.log(val, content)
      this.editConfig.search_map = {
        [val.value]: content
      }
      this.getData()
    },
    resetClick() {
      this.editConfig.search_map = {}
      this.getData()
    }
  }
}
@@ -146,9 +168,16 @@
  cursor: pointer;
}
.dialog-footer {
  height: 40px;
  line-height: 40px;
  height: 50px;
  line-height: 50px;
  color: red;
  .btn-pager {
    display: flex;
    margin-top: 0px;
    .page {
      margin-left: auto;
    }
  }
}
::v-deep {
  .input-with-select .el-input-group__prepend {