<!-- 搜索表单 -->
<template>
  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
</template>
<script>
  export default {
    data() {
      return {};
    },
    props: {
      user: {
        type: 'String',
        default: ''
      },
      typeOptions: {
        type: Array,
        default: () => []
      }
    },
    computed: {
      // 表格列配置
      seekList() {
        return [
          {
            label: '关键字：',
            value: 'keyWord',
            type: 'input',
            placeholder: '编码/故障原因'
          },
          {
            label: '编码:',
            value: 'code',
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '故障原因:',
            value: 'faultReason',
            type: 'input',
            placeholder: '请输入'
          },
          {
            label: '故障类型:',
            value: 'type',
            planList: this.typeOptions,
            type: 'select',
            placeholder: ''
          }
        ];
      }
    },
    methods: {
      /* 搜索 */
      search(e) {
        this.$emit('search', {
          ...e
        });
      }
    }
  };
</script>
