<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" />
          </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" />
          </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" 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="1600"
              :rows="10"
            />
          </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="`填写完整、有吸引力的工作业绩，有助于您获得更多老板的青睐 \n列如 \n1、取得的成绩..... \n2、实现的突破.....`"
            />
          </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>
