<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
export default {
  data() {
    return {
      serviceList: [
        { label: '非常不满意', value: 1 },
        { label: '不满意', value: 2 },
        { label: '一般', value: 3 },
        { label: '满意', value: 4 },
        { label: '非常满意', value: 5 }
      ]
    };
  },
  props: {},
  computed: {
    // 表格列配置
    seekList() {
      return [
        {
          label: '关键字：',
          value: 'searchName',
          type: 'input',
          placeholder: '编码/工单编码/客户名称/客户编码'
        },
        {
          label: '编码:',
          value: 'code',
          type: 'input',
          placeholder: ''
        },
        {
          label: '工单编码:',
          value: 'workCode',
          type: 'input',
          placeholder: ''
        },
        {
          label: '客户名称:',
          value: 'contactName',
          width: 380,
          type: 'input',
          placeholder: ''
        },
        {
          label: '客户编码:',
          value: 'contactCode',
          width: 380,
          type: 'input',
          placeholder: ''
        },
        {
          label: '服务态度评分:',
          value: 'attitudeRating',
          width: 370,
          labelWidth:130,
          type: 'select',
          planList: this.serviceList,
          placeholder: '请选择'
        },
        {
          label: '响应速度评分:',
          value: 'responseSpeed',
          width: 370,
          labelWidth:130,
          type: 'select',
          planList: this.serviceList,
          placeholder: '请选择'
        },
        {
          label: '整体满意度:',
          value: 'serviceRating',
          width: 380,
          type: 'select',
          planList: this.serviceList,
          placeholder: '请选择'
        },
        {
          label: '创建人:',
          value: 'createUserName',
          width: 380,
          type: 'input',
          placeholder: ''
        },
        {
          label: '创建时间：',
          value: 'createTime',
          type: 'date',
          dateType: 'datetimerange',
          placeholder: '',
          width: 380,
          valueAr: ['createTimeStart', 'createTimeEnd']
        },
      ];
    }
  },
  methods: {
    /* 搜索 */
    search(e) {
      this.$emit('search', {
        ...e
      });
    }
  }
};
</script>
