<template>
  <div id="check-1">
    <van-row>
      <van-col span="24" class="main">
        <van-col :span="24" class="one">
          <van-form @submit="onSubmit">
            <van-field v-model="form.id" name="id" label="数据id" style="display: none" />
            <van-field name="status" label="审核状态">
              <template #input>
                <van-radio-group v-model="form.status" direction="horizontal">
                  <van-radio name="1">通过</van-radio>
                  <van-radio name="-1">拒绝</van-radio>
                </van-radio-group>
              </template>
            </van-field>
            <van-field
              v-model="form.remark"
              name="remark"
              rows="1"
              autosize
              label="审核意见"
              type="textarea"
              maxlength="100"
              placeholder="审核意见"
              show-word-limit
              :rules="[{ required: true, message: '审核意见' }]"
            />
            <div style="margin: 16px">
              <van-button round block type="info" native-type="submit">提交</van-button>
            </div>
          </van-form>
        </van-col>
      </van-col>
    </van-row>
  </div>
</template>

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

<style lang="less" scoped></style>
