<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.usernames" name="usernames" label="组织者" placeholder="请输入组织者" />
            <van-field v-model="form.role" name="role" label="充当角色" placeholder="请输入充当角色" />
            <van-field v-model="form.numbers" name="numbers" label="人数" placeholder="请输入人数" />
            <van-field v-model="form.propaganda" name="propaganda" 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>
