readPerDetail.vue 2.65 KB
<template>
  <div>
    <glsx-combi-form ref="readPerDetailFormRef" :formObj="searchForm" :formData="readPerDetailFormData" :inline="true">
      <span slot="footer" slot-scope="scope" class="select-pro">
        <el-button type="default" :size="size" @click="handleReset(scope)">重置</el-button>
        <el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
      </span>
    </glsx-combi-form>
    <GLTable ref="readPerDetailRef" :getListApi="getListApi" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="readPerDetailTableData" :pageConf="pageConf" :tableTotal="tableTotal">
    </GLTable>
  </div>
</template>

<script>
import url from "@/assets/empty.png"
export default {
  name: 'readPerDetail',
  props: ['materialId'],
  data() {
    return {
      url,
      searchForm: {
        customerName: '',
        customerPhone: '',
        staffName: '',
        materialId: this.materialId,
      },
      getListApi: this.$apis.material.readDetailPage,
      readPerDetailFormData: [
        {
          label: '名称:',
          name: 'customerName',
          maxlength: 10,
          type: 'input',
          placehoder: '请输入内容'
        },{
          label: '客户手机号:',
          name: 'customerPhone',
          placehoder: '请输入手机号',
          type: 'input'
        },
        {
          label: '发送人:',
          name: 'staffName',
          maxlength: 10,
          placehoder: '请输入内容',
          type: 'input'
        }
      ],
      tableParams: {
        listName: 'data',
        tableOption: false,
        tableColumns: [
          {
            label: '客户名称',
            prop: 'customerName'
          },
          {
            label: '电话号码',
            prop: 'customerPhone'
          },
          {
            label: '发送人',
            prop: 'staffName'
          },
          {
            label: '所属企微成员',
            prop: 'departName'
          },
          {
            label: '阅读次数',
            prop: 'readTime'
          },
          {
            label: '首次阅读时间',
            prop: 'firstReadTime'
          },
          {
            label: '最后阅读时间',
            prop: 'lastReadTime'
          }
        ]
      }
    }
  },
  methods: {
    // 搜索
    handleSearch() {
      this.$refs.readPerDetailRef.refreshTable()
    },
    // 重置
    handleReset() {
      this.searchForm = {
        customerName: '',
        customerPhone: '',
        staffName: '',
        materialId: this.materialId
      }
      this.handleSearch()
    },
  }
}
</script>

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