<template>
  <div class="ls-search-form">
      <el-row :gutter="20" class="search-style">
        <el-col :span="5" >
          <label>模块名称</label>
          <common-select v-model="queryParam.modelId" dictType="CRM_Module_Code"  >
          </common-select>
        </el-col>
        <el-col :span="5" >
          <label>文件 ID</label>
          <el-input v-model="queryParam.fileId" size="small"
              v-inputFilter:trim
              @keyup.enter.native="doSearch"
              placeholder="请输入" clearable></el-input>
        </el-col>
        <el-col :span="5" >
          <label>文件名称</label>
          <el-input v-model="queryParam.fileName" size="small"
              v-inputFilter:trim
              @keyup.enter.native="doSearch"
              placeholder="请输入" clearable></el-input>
        </el-col>
      </el-row>
      <div class="btns-wrap">
        <el-button @click="doSearch"  type="warning" icon="el-icon-search" size="small" >查询</el-button>
        <el-button @click="reSet"     type="info"  icon="el-icon-refresh-left" plain size="small" >重置</el-button>
      </div>
  </div>
</template>

<script>
    export default {
        name: 'attch-search',
        props: {},
        created () {

        },
        mounted() {

        },
        methods: {
            doSearch () {
                this.$emit('query', 1);
            },
            //重置
            reSet () {
               for(let item in this.queryParam){
                 this.queryParam[item] = '';
               }
               this.doSearch();
            },

        },
        data () {
            return {
                queryParam: {
                  modelId: '',
                  fileName: '',
                  fileId: '',
                },
            };
        },
    }
</script>

<style type="text/css" scoped lang="scss">

</style>
