index.vue 2.88 KB
<template>
  <div class="container">
    <h3>客户分群</h3>
    <search-form class="searchTop border-shadow" :formModel="searchForm" :formList="clientPartFormList">
      <span class="inline-b" slot="form-slot">
        <!-- :id="tableParams.btnId" -->
        <el-button type="primary" :size="btn_size" icon="el-icon-search" :id="tableParams.btnId" ref="searchButton">查询</el-button>
      </span>
    </search-form>
    <basic-table ref="clientMassTable" :tableParams="tableParams" :getListApi="getListApi" :searchForm="searchForm" :hasNum="true">
      <span slot="table-button" slot-scope="scope">
        <el-button v-for="(j, idx) in tableParams.tableOption.btnList" :key="idx" :type="j.type || 'text'" :size="btn_size" @click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button>
      </span>
    </basic-table>
  </div>
</template>

<script>
export default {
  name: 'clientPartGroup',
  data() {
    return {
      searchForm: {},
      clientPartFormList: [
        {
          type: 'daterange',
          prop: 'daterange',
          pickerOptions: {
            disabledDate(time) {
              return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
            }
          }
        },
        {
          type: 'select',
          prop: 'status',
          placeholder: '请选择更新机制',
          options: [
            {
              label: '全部',
              value: null
            },
            {
              label: '自动(每天更新)',
              value: 1
            },
            {
              label: '手动(每天更新)',
              value: 1
            }
          ]
        },
        {
          type: 'input',
          inputType: 'text',
          prop: 'name3',
          placeholder: '请输入客户分群名称'
        }
      ],
      tableParams: {
        btnId: new Date().getTime() + parseInt(Math.random() * 1000),
        listName: 'list',
        tableColumns: [
          {
            label: '客户分群名称',
            prop: 'clientGroupName'
          },
          {
            label: '客户数',
            prop: 'gender'
          },
          {
            label: '更新机制',
            prop: 'createdDate'
          },
          {
            label: '创建人',
            prop: 'source'
          },
          {
            label: '更新时间',
            prop: 'isAddWeChat'
          }
        ],
        tableOption: {
          width: 170,
          btnList: [
            // {
            //   name: "编辑",
            //   pType: "edit",
            // },
            // {
            //   name: "删除",
            //   pType: "delete",
            // },
            {
              name: '人群圈像',
              pType: 'detail'
            }
          ]
        }
      },
      getListApi: ''
    }
  },
  methods: {
    name() {}
  }
}
</script>

<style lang="scss" scoped>
</style>