/*
 *@description:查询
 *@author: hudw
 *@date: 2022-03-14 11:45:54
*/
<template>
  <a-page-header class="page-header" :bordered="false" style="background-color: #fff; margin-bottom: 10px">
    <a-space slot="title">
     <span> {{ $route.meta.title }}</span>
      <p-grid-form ref="gird" :span="12" :layout="$attrs.layout" style="width:600px;font-weight: normal" :labelCol="{ span: 6}" :wrapperCol="{ span: 18 }" @submit="submit" :items="fromItems" />
    </a-space>
    <a-space v-if="count != 3" slot="extra">
      <p-button type="primary" icon="search" @clickSync="submit">查询</p-button>
      <p-button type="primary" @clickSync="mx_reset">重置</p-button>
    </a-space>
  </a-page-header>
</template>
<script>
export default {
  components: {
    // advancedQueryModel,
  },
  name: 'search-bar',
  props: {
    adQueryUrl: {
      type: String,
    },

    options: {
      //字典
      type: Object,
    },
    count: {
      type: null,
      default: 0,
    },
    fromItems: {
      type: Array,
    },
  },
  data() {
    return {
      fieldOptions: null,
      visible: false,
    };
  },
  mounted() {},
  computed: {},

  methods: {
    adQueryClick() {
      this.visible = true;
    },
    getFieldsValue() {
      return this.$refs.gird.form.getFieldsValue();
    },
    mx_reset() {
      this.$refs.gird.form.resetFields();
    },
    submit(e) {
      e.preventDefault();
      let form = this.$refs.gird.form;
      form.validateFields((error, value) => {
        if (error) return;
        this.$emit('submit', value);
      });
    },
  },
};
</script>
<style lang="less">
.page-header {
  .ant-page-header-heading-title {
    font-size: 16px;
  }
}
</style>


