<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.timestr" name="timestr" label="活动时间" placeholder="请输入活动时间" />
            <van-field v-model="form.propaganda" name="propaganda" label="宣传报导" placeholder="请输入宣传报导" />
            <van-field v-model="form.usersnumber" name="usersnumber" 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>
