<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
  import {
    exceptionType,
    relationType,
    reviewStatusEnum
  } from '@/enum/dict';
  export default {
    data() {
      return {};
    },
    computed: {
      // 表格列配置
      seekList() {
        return [
        {
            label: '关键字：',
            value: 'searchName',
            type: 'input',
            placeholder: '编码/名称/来源编码/创建人'
          },
          {
            label: '编码：',
            value: 'code',
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '名称：',
            value: 'name',
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '进度：',
            value: 'progress',
            width: 380,
            planList:exceptionType,
            type: 'select',
            placeholder: '请选择'
          },
          // {
          //   label: '来源类型：',
          //   value: 'relationType',
          //   width: 380,
          //   planList: relationType,
          //   type: 'select',
          //   placeholder: '请选择'
          // },
          {
            label: '来源编码：',
            value: 'relationCode',
            width: 380,
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '来源名称：',
            value: 'relationName',
            width: 380,
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '审批状态：',
            value: 'approvalStatus',
            width: 380,
            planList: reviewStatusEnum,
            type: 'select',
            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>
