<template>
  <div class="referInfo">
    <el-form
      ref="formRef"
      :model="formData"
      label-position="top"
      class="checkForm"
    >
      <div class="cont_title">个人信息</div>
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item label="姓名">
            <el-input
              v-model="formData.name"
              placeholder="填写真实姓名"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="性别">
            <el-radio-group v-model="formData.gender" size="small">
              <el-radio label="0">男</el-radio>
              <el-radio label="2">女</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="身份证号">
            <el-input
              v-model="formData.idCard"
              placeholder="填写真实姓名身份证号"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label="出生日期">
            <el-select v-model="value" placeholder="年">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label=" ">
            <el-select v-model="value" placeholder="月">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="4">
          <el-form-item label=" ">
            <el-select v-model="value" placeholder="日">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="籍贯">
            <el-select v-model="value" placeholder="省">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label=" ">
            <el-select v-model="value" placeholder="市">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="民族">
            <el-input
              v-model="formData.nation"
              placeholder="填写民族"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="入学年份(高中)">
            <el-input
              v-model="formData.startSchoolDate"
              placeholder="填写入学年份(高中)"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="政治面貌">
            <el-input
              v-model="formData.achievementPath"
              placeholder="填写政治面貌"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="手机号">
            <el-input
              v-model="formData.phone"
              placeholder="填写手机号"
              size="small"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="电子邮箱">
            <el-input
              v-model="formData.email"
              placeholder="填写电子邮箱"
              size="small"
            />
          </el-form-item>
        </el-col>
      </el-row>

      <div class="cont_title">学校信息</div>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="就读中学">
            <el-select v-model="value" placeholder="省">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label=" ">
            <el-select v-model="value" placeholder="市">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label=" ">
            <el-select v-model="value" placeholder="中学">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="中学联系人">
            <el-select v-model="value" placeholder="填写中学联系人">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="中学联系电话">
            <el-input
              v-model="formData.schoolPhone"
              placeholder="填写中学联系电话"
              size="small"
            />
          </el-form-item>
        </el-col>
      </el-row>

      <div class="cont_title">学习成绩证明材料</div>
      <el-form-item
        label="上传申请资料图片"
        prop="backgroundPicture"
        class="bgPic"
      >
        <div class="bgInfo">1、资料包括：XXXXXXXXXXXXX；</div>
        <div class="bgInfo">
          2、请上传1-10张图片，支持JPG、JPEG、PNG等格式，每张图片不超过10M
        </div>
        <div class="image_add">
          <div class="image_in">
            <i style="font-size: 44px" class="el-icon-circle-plus"> </i>
            <div class="text">上传材料</div>
          </div>

          <img :src="formData.backgroundPicture" class="avatar" />
        </div>
      </el-form-item>

      <el-form-item class="btn">
        <el-button @click="confirm">提交资料</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
/* eslint-disable */
// import { GetCheckInfo, CheckSignUpInfo } from '@/api/campSystem/campOper'

export default {
  name: "CheckForm",
  props: {
    phoneFu: [Number, String],
    typeFu: [Number, String],
  },
  data() {
    return {
      formData: {},
      type: this.typeFu,
    };
  },
  methods: {
    open() {
      // 获取当前审核资料详情
      GetCheckInfo({
        phone: this.phoneFu,
      })
        .then((response) => {
          console.log(response);
          if (response.code != 200) {
            return this.msgError(response.msg);
          }
          this.formData = response.data;
          this.formData.backgroundPicture =
            "http://campiste.oss-cn-beijing.aliyuncs.com/image/jpg/20210928/05b70e907da5434cafe5de494bea3378.jpg";
        })
        .catch((error) => {
          console.log(error);
        });
    },
    // confirm () {
    //   this.dialogVisible = false
    //   this.$emit('closeDialog', this.dialogVisible, 1, this.formData)
    // },
    // noConfirm () {
    //   this.dialogVisible = false
    //   this.$emit('closeDialog', this.dialogVisible, 2, this.formData)
    // },
    // 取消,关闭弹框，修改父组件的值
    cancelBtn() {
      this.dialogVisible = false;
      this.$emit("closeDialog", this.dialogVisible, false);
    },
  },
  watch: {
    // dialogVisibleFu () {
    //   this.dialogVisible = this.dialogVisibleFu
    // },
    typeFu() {
      this.type = this.typeFu;
    },
  },
};
</script>

<style scoped lang="scss">
.referInfo {
  padding: 0 50px 110px 50px;
  .checkForm {
    flex: 1;
    .cont_title {
      height: 48px;
      line-height: 48px;
      font-size: 18px;
      font-family: PingFang SC;
      font-weight: 500;
      color: #12141c;
    }

    ::v-deep .el-form-item {
      margin-bottom: 20px;

      .el-form-item__label {
        height: 32px;
        line-height: 32px;
        font-size: 12px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #12141c;
      }

      .el-form-item__content {
        height: 40px;
        line-height: 40px;

        .el-input {
          height: 40px;

          .el-input__inner {
            height: 40px;
            border-radius: 4px;
            border: 1px solid #e1e3e6;
            background-color: #ffffff;

            &:hover {
              border-color: #60194a;
            }

            &:focus {
              border-color: #60194a;
            }
          }
        }
        // 圆
        .el-radio-group {
          .el-radio {
            .el-radio__label {
              color: #656872;
            }

            .el-radio__input {
              .el-radio__inner {
                width: 20px;
                height: 20px;
                line-height: 20px;
                border-radius: 50%;
                &:hover {
                  border-color: #60194a;
                }
              }

              &.is-checked {
                .el-radio__inner {
                  background: #ffffff !important;
                  border-color: #60194a;

                  &::after {
                    width: 7.5px;
                    height: 7.5px;
                    background: #60194a !important;
                  }
                }
              }
            }
          }
        }
      }

      &.btn {
        .el-form-item__content {
          text-align: center;
        }
      }

      &.bgPic {
        height: 260px;
        .el-form-item__label {
          font-size: 14px;
        }
        .bgInfo {
          font-size: 12px;
          font-family: PingFang SC;
          font-weight: 500;
          color: #a7a2a6;
          line-height: 24px;
        }
        img {
          width: 160px;
          height: 160px;
          border-radius: 4px;
          border: 2px dashed #bcc2ca;
          margin: 0 10px 10px 0;
        }
      }
      .el-select {
        width: 100%;
      }
      .image_add {
        position: relative;
        margin-top: 24px;
        .image_in {
          position: absolute;
          top: 23%;
          left: 7%;
        }
        i {
          font-size: 52px;
          color: #60194a;
        }
        .text {
          font-size: 14px;
          color: #a7a2a6;
          text-align: center;
        }
      }
      .btn {
        text-align: center;
        padding-bottom: 224px;
      }
      .el-button {
        width: 200px;
        height: 50px;
        background: #60194a;
        border-radius: 4px;
        opacity: 0.8;
        line-height: 50px;
        text-align: center;
        color: #fff;
        font-size: 16px;
        padding: 0;
        margin: 30px 0 0 0;
      }
    }
  }
}
</style>
