<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="4" @search="search"></seekPage>
</template>
<script>
export default {
  data() {
    return {
      auditStatus: [
        {
          label: '待审核',
          value: '0'
        },
        {
          label: '已拒绝',
          value: 2
        },
        {
          label: '已通过',
          value: 1
        },
        {
          label: '已撤回',
          value: 3
        }
      ]
    };
  },
  props:{
    levelList:{
      type:Array,
      default:()=>[]
    }
  },
  computed: {
    // 表格列配置
    seekList() {
      return [
        {
          label: '客户名称:',
          value: 'contactName',
          type: 'input',
          placeholder: ''
        },
        // {
        //   label: '创建人:',
        //   value: 'code',
        //   type: 'input',
        //   placeholder: ''
        // },
        {
          label: '报修编码:',
          value: 'code',
          type: 'input',
          placeholder: ''
        },
        {
          label: '故障等级:',
          value: 'faultLevel',
          type: 'select',
          planList:this.levelList,
          placeholder: ''
        },
        {
          label: '状态:',
          value: 'demandStatus',
          type: 'select',
          planList:this.auditStatus,
          placeholder: ''
        },
        {
          label: '报修时间:',
          value: 'time',
          type: 'date',
          dateType: 'datetimerange',
          placeholder: '',
          width: 380,
          valueAr: ['createTimeStart', 'createTimeEnd']
        },

      ];
    }
  },
  methods: {
    /* 搜索 */
    search(e) {
      console.log('是否调用');
      this.$emit('search', {
        ...e
      });
    }
  }
};
</script>
