<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.name" name="name" label="项目(课题)名称" placeholder="请输入项目(课题)名称" />
            <van-field v-model="form.laiyuancontent" name="laiyuancontent" label="项目来源" placeholder="请输入项目来源" />
            <van-field v-model="form.projectlevelone" name="projectlevelone" label="项目(课题)编号" placeholder="请输入项目(课题)编号" />
            <van-field v-model="form.money" name="money" type="number" label="经费(万元)" placeholder="请输入经费(万元)" />
            <van-field v-model="form.userName" name="userName" label="负责人" placeholder="请输入负责人" />
            <van-field v-model="form.directionName" name="directionName" label="所属研究方向" placeholder="请输入所属研究方向" />
            <van-field v-model="form.cooperativeunit" name="cooperativeunit" label="合作单位" placeholder="请输入合作单位" />
            <van-field v-model="form.projectsource" name="projectsource" type="number" 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>
