<template>
  <div id="search-1">
    <van-row>
      <van-col span="24" class="main">
        <van-col span="24" class="one">
          <van-form label-width="4em">
            <van-field v-model="form.title" name="title" label="论文题目" placeholder="请输入论文题目" />
            <van-field v-model="form.number" name="number" label="期刊卷号" placeholder="请输入期刊卷号" />
            <van-field v-model="form.startnum" name="startnum" label="起止页码" placeholder="请输入起止页码" />
            <van-field v-model="form.type" name="type" label="论文类别" placeholder="请输入论文类别" />
            <van-field v-model="form.directionName" name="directionName" label="研究方向" placeholder="请输入研究方向" />
            <van-field v-model="form.userName" name="userName" label="作者" placeholder="请输入作者" />
            <div class="btn">
              <van-button type="info" size="small" @click="reseat">重置条件</van-button>
              <van-button type="primary" size="small" @click="onSubmit">提交查询</van-button>
            </div>
          </van-form>
        </van-col>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
const moment = require('moment');
export default {
  name: 'search-1',
  props: { form: { type: Object } },
  components: {},
  data: function () {
    return {};
  },
  created() {},
  methods: {
    reseat() {
      this.$emit('reseat');
    },
    onSubmit() {
      this.$emit('onSubmit', { data: this.form });
    },
  },
  computed: {
    ...mapState(['user']),
  },
  metaInfo() {
    return { title: this.$route.meta.title };
  },
  watch: {
    test: {
      deep: true,
      immediate: true,
      handler(val) {},
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  .one {
    .btn {
      text-align: center;
      margin: 10px 0;
      .van-button {
        margin: 0 5px;
      }
    }
  }
}
</style>
