<template>
  <div v-show="show" class="edit-expected-position">
    <el-form :model="userInfoData" label-position="top">
      <el-row :gutter="28">
        <el-col :span="12">
          <el-form-item label="学校名称">
            <el-input v-model="userInfoData.name" size="large" placeholder="请输入学校名称" />
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="学制类型">
            <el-select
              v-model="userInfoData.region"
              size="large"
              placeholder="请选择学制类型"
              style="width: 100%"
            >
              <el-option label="Zone one" value="shanghai" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="学历">
            <el-select
              v-model="userInfoData.region"
              size="large"
              placeholder="请选择学历"
              style="width: 100%"
            >
              <el-option label="Zone one" value="shanghai" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="专业">
            <el-input v-model="userInfoData.name" size="large" placeholder="请输入专业" />
          </el-form-item>
        </el-col>

        <el-col :span="12" class="flx-align-center">
          <el-form-item label="在校时间">
            <el-date-picker
              v-model="userInfoData.date"
              type="date"
              placeholder="入学时间"
              size="large"
            />
            <span style="margin: 0 16px">至</span>
            <el-date-picker
              v-model="userInfoData.date1"
              type="date"
              placeholder="毕业时间"
              size="large"
            />
          </el-form-item>
        </el-col>
        <el-col>
          <el-form-item label="在校经历(选填)">
            <div class="text-header">
              <el-icon size="28"><i-ep-MoreFilled /></el-icon>
            </div>
            <el-input
              v-model="userInfoData.textareaVal"
              type="textarea"
              show-word-limit
              :maxlength="300"
              :rows="10"
              :placeholder="`1、在校担任职务... \n2、获得荣誉... \n3、所学主要课程...`"
            />
          </el-form-item>
        </el-col>
        <el-col>
          <el-form-item label="毕业设计/论文题目(选填)">
            <el-input
              v-model="userInfoData.textareaVal"
              size="large"
              placeholder="请输入毕业设计/论文题目"
            />
          </el-form-item>
        </el-col>
        <el-col>
          <el-form-item label="毕业设计/论文描述(选填)">
            <div class="text-header">
              <el-icon size="28"><i-ep-MoreFilled /></el-icon>
            </div>
            <el-input
              v-model="userInfoData.textareaVal"
              type="textarea"
              show-word-limit
              :maxlength="600"
              :rows="10"
              placeholder="请填写内容"
            />
          </el-form-item>
        </el-col>
        <el-col class="edit-resume-btn">
          <el-button size="large" style="width: 100px" @click="emits('update:show', false)"
            >取消</el-button
          >
          <el-button size="large" type="primary" style="width: 100px">完成</el-button>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script setup lang="ts">
defineProps({
  show: {
    type: Boolean,
    default: false
  }
})

const emits = defineEmits(['update:show'])

const userInfoData: any = ref({})
</script>

<style lang="scss" scoped>
.edit-expected-position {
  background: #f8f8f8;
  border-radius: 12px;
  padding: 24px;
  font-weight: 400;
  color: #222222;
  margin-top: 24px;
  .edit-user__info {
    font-size: 18px;
    margin-bottom: 24px;
  }

  .sex {
    display: flex;
    align-items: center;
    span {
      width: 227px;
      height: 38px;
      line-height: 38px;
      text-align: center;
      display: inline-block;
      background: #ffffff;
      border-radius: 8px;
      border: 1px solid #cccccc;
      margin-right: 15px;
      color: #999999;
      cursor: pointer;
    }
    .active {
      background: #dcecff;
      border: 1px solid #177cfa;
      color: #177cfa;
    }
  }

  .edit-resume-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px;
  }

  .text-header {
    width: 100%;
    height: 44px;
    border-radius: 12px 12px 0px 0px;
    border: 1px solid #cccccc;
    border-bottom: 0;
    display: flex;
    align-items: center;
    .el-icon {
      transform: rotate(90deg);
      color: #d9d9d9;
    }
  }
  :deep(.el-textarea__inner) {
    border-radius: 0px 0px 12px 12px;
  }
}
</style>
