staffSendDetail.vue 2.02 KB
<template>
  <div>
    <glsx-combi-form ref="staffSendFormRef" :formObj="searchForm" :formData="staffSendFormData" :inline="true">
      <span slot="footer" slot-scope="scope" class="select-pro">
        <el-button type="primary" :size="size" @click="handleSearch(scope)">查询</el-button>
      </span>
    </glsx-combi-form>
    <GLTable ref="staffSendDetailRef" :getListApi="getListApi" :beforeSearchFn="beforeSearchFn" :noDataImg="url" :searchForm="searchForm" :tableParams="tableParams" :tableData="staffSendTableData" :pageConf="pageConf" :tableTotal="tableTotal"></GLTable>
  </div>
</template>

<script>
import url from '@/assets/empty.png'
export default {
  name: 'staffSendDetail',
  props: ['materialId'],
  data() {
    return {
      url,
      searchForm: {
        materialId: this.materialId,
        employeeName: ''
      },
      staffSendFormData: [
        {
          label: '',
          name: 'employeeName',
          type: 'input',
          placeholder: '请输入姓名',
          prefixIcon: 'el-icon-search' 
        }
      ],
      getListApi: this.$apis.material.sendDetailPage,
      tableParams: {
        listName: 'data',
        tableOption: false,
        tableColumns: [
          {
            label: '姓名',
            prop: 'employeeName'
          },
          {
            label: '发送次数',
            prop: 'sendNumber',
            sortable: true
          },
          {
            label: '阅读次数',
            prop: 'readNumber',
            sortable: true
          },
          {
            label: '阅读人数',
            prop: 'readPeopleNumber'
          },
          {
            label: '打开率',
            prop: 'openRate'
          }
        ]
      }
    }
  },
  methods: {
    // 搜索
    handleSearch() {
      this.$refs.staffSendDetailRef.refreshTable()
    },
    // 重置
    handleReset() {
      this.searchForm = {
        staffName: '',
        materialId: this.materialId
      }
      this.handleSearch()
    }
  }
}
</script>

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