<template>
    <div class="ls-search-form">

      <div class="search-style">
        <el-row :gutter="10" >
          <el-col :span="6">
            <label>字典类型</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.dataType" placeholder="请输入"></el-input>
          </el-col>
          <el-col :span="6">
            <label>字典KEY</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.dataCode" placeholder="请输入"></el-input>
          </el-col>
          <el-col :span="6">
            <label>字典VALUE</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.dataValue" placeholder="请输入"></el-input>
          </el-col>
          <el-col :span="6">
            <label>字典描述</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.dataDesc" placeholder="请输入"></el-input>
          </el-col>
        </el-row>
        <el-row :gutter="10" class="search-style">
          <el-col :span="6">
            <label>字典扩展1</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.ext1" placeholder="请输入"></el-input>
          </el-col>
          <el-col :span="6">
            <label>字典扩展2</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.ext2" placeholder="请输入"></el-input>
          </el-col>
          <el-col :span="6">
            <label>字典扩展3</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.ext3" placeholder="请输入"></el-input>
          </el-col>
          <el-col :span="6">
            <label>字典扩展4</label>
            <el-input clearable size="mini" type="text" v-model="queryParam.ext4" placeholder="请输入"></el-input>
          </el-col>
        </el-row>
      </div>

      <div class="btns-wrap">
        <el-button type="warning" size="mini" icon="el-icon-search" @click="doSearch">查询</el-button>
        <el-button type="info" size="mini" icon="el-icon-refresh-left" @click="reset">重置</el-button>
      </div>
    </div>

</template>

<script>
  export default {
    name: 'dictionary-search',
    props: {

    },
    data: function() {
      return {
        queryParam: {
          dataType: '',
          dataCode: '',
          dataValue: '',
          dataDesc: '',
          ext1: '',
          ext2: '',
          ext3: '',
          ext4: ''
        }
      };
    },
    created: function() {},
    methods: {
      //筛选控件触发查询
      doSearch: function() {
        this.$emit('query', this.queryParam);
      },
      //重置
      reset: function() {
        this.queryParam = {
          dataType: '',
          dataCode: '',
          dataValue: '',
          dataDesc: '',
          ext1: '',
          ext2: '',
          ext3: '',
          ext4: ''
        }
        this.$emit('query', this.queryParam);
      }
    },

  }
</script>

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

</style>
