<template>
    <div>
        <el-dialog
          title="高级查询"
          :visible="moreQueryVisible"
          @close="close"
          width="66%">
          <el-form
            inline
            ref="queryForm"
            label-position="top"
            :model="formData">
            <el-form-item
              label="区域编码"
              prop="areaCode">
              <el-input v-model="formData.areaCode"></el-input>
            </el-form-item>
            <el-form-item
              label="区域名称"
              prop="areaName">
              <el-input v-model="formData.areaName"></el-input>
            </el-form-item>
            <el-form-item
              label="备注"
              prop="remark">
              <el-input v-model="formData.remark"></el-input>
            </el-form-item>
          </el-form>
          <div class="more-query-btn">
            <el-button v-auth="50400010103" type="primary" @click="submitForm">查询</el-button>
            <el-button v-auth="50400010104" @click="resetForm('queryForm')">重置</el-button>
          </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
  data () {
    return {
      formData: {
        areaCode: '',
        areaName: '',
        remark: '',
      },
    }
  },
  mounted () {
  },
  props: {
    moreQueryVisible: Boolean
  },
  methods: {

    // 关闭弹窗
    close () {
      this.$emit('close')
    },

    // 提交表单
    submitForm () {
      this.$emit('toGetList', this.formData)
      this.$refs['queryForm'].resetFields()
    },

    // 重置表单
    resetForm () {
      this.$refs['queryForm'].resetFields()
    }
  }
}
</script>
