<template>
  <div id="rightcont">
    <el-col class="zhengce">
      <el-col :span="24" class="topTitle"> <span>详情</span></el-col>
      <el-col :span="24" class="info">
        <el-col :span="24" class="messgae">
          <el-form ref="form" :model="form" label-width="120px">
            <el-form-item label="对接会标题">
              <el-input v-model="form.title" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="开始时间">
              <el-date-picker
                :disabled="true"
                v-model="form.start_time"
                type="datetime"
                placeholder="请选择开始时间"
                format="yyyy-MM-dd HH:mm"
                value-format="yyyy-MM-dd HH:mm"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="报名截止时间">
              <el-date-picker
                :disabled="true"
                v-model="form.join_end"
                type="datetime"
                placeholder="请选择报名截止时间"
                format="yyyy-MM-dd HH:mm"
                value-format="yyyy-MM-dd HH:mm"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="地址">
              <el-select v-model="form.place" :disabled="true" placeholder="请选择地址">
                <el-option v-for="item in options" :key="item.name" :label="item.name" :value="item.name"> </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="简介">
              <el-input type="textarea" v-model="form.desc" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="审核" :disabled="true">
              <el-radio v-model="form.is_allowed" label="1">允许</el-radio>
              <el-radio v-model="form.is_allowed" label="2">拒绝</el-radio>
            </el-form-item>

            <el-form-item label="拒绝理由" v-if="form.is_allowed == 2">
              <el-input type="textarea" v-model="form.reason" placeholder="无"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="onSubmit()">提交</el-button>
            </el-form-item>
          </el-form>
        </el-col>
      </el-col>
    </el-col>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';

export default {
  name: 'rightcont',
  props: {
    userinfo: null,
    form: null,
    options: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {
    ...mapState(['user']),
  },
  methods: {
    onSubmit() {
      console.log(this.form);
      this.$emit('onSubmit', { data: this.form });
    },
  },
};
</script>

<style lang="less" scoped>
p {
  padding: 0;
  margin: 0;
}
.zhengce {
  padding: 20px;
}
.zhengce .topTitle {
  font-size: 22px;
  color: #22529a;
  margin: 0 0 20px 0;
}

.zhengce .info {
  float: left;
  width: 100%;
}
.zhengce .info p {
  float: left;
  width: 100%;
  padding: 10px 0;
}
.zhengce .info p span {
  float: left;
  margin: 0 10px 0 0;
}
.zhengce .info p image {
  float: left;
  width: 100px;
  height: 100px;
}
</style>
