|
@@ -0,0 +1,807 @@
|
|
|
+<template>
|
|
|
+ <div id="resume">
|
|
|
+ <detail-layout>
|
|
|
+ <template v-slot:title>
|
|
|
+ 我的简历
|
|
|
+ </template>
|
|
|
+ <template #main v-if="loading">
|
|
|
+ <el-row>
|
|
|
+ <el-form :model="info">
|
|
|
+ <el-card class="box-card" shadow="never">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle" justify="end">
|
|
|
+ <!-- <el-col :span="18">求职意向</el-col> -->
|
|
|
+ <el-col :span="6" style="text-align:right;">
|
|
|
+ <el-button type="success" size="small" icon="el-icon-view" @click="checkResume()">预览</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <form-item label="期望行业">
|
|
|
+ <el-select v-model="expect.industry" :multiple="true" :filterable="true" placeholder="请选择" style="width: 100%">
|
|
|
+ <el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.label"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </form-item>
|
|
|
+ <form-item label="期望职业"> <el-input v-model="expect.job" placeholder="请选择期望职业"></el-input></form-item>
|
|
|
+ <form-item label="职位分类">
|
|
|
+ <tag-checkbox
|
|
|
+ :max="3"
|
|
|
+ placeholder="点击选择职位分类,最多选择3个"
|
|
|
+ :firstList="jobTypeList"
|
|
|
+ @selectChange="selectChange"
|
|
|
+ @listChange="listChange"
|
|
|
+ :selected="expect.category"
|
|
|
+ type="category"
|
|
|
+ ></tag-checkbox>
|
|
|
+ </form-item>
|
|
|
+ <form-item label="期望城市">
|
|
|
+ <tag-all-select
|
|
|
+ placeholder="点击选择城市"
|
|
|
+ :firstList="provinceList"
|
|
|
+ :secondList="cityList"
|
|
|
+ @selectChange="selectChange"
|
|
|
+ @listChange="listChange"
|
|
|
+ :selected="expect.city"
|
|
|
+ type="city"
|
|
|
+ ></tag-all-select>
|
|
|
+ </form-item>
|
|
|
+ <form-item label="期望薪资">
|
|
|
+ <template>
|
|
|
+ <el-select v-model="expect.salary" placeholder="请选择..." style="width: 100%">
|
|
|
+ <el-option v-for="(item, index) in options4" :key="index" :label="item.label" :value="item.label"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="18">基本信息</el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <form-item label="头像">
|
|
|
+ <upload
|
|
|
+ :limit="1"
|
|
|
+ :data="info.avatar_url"
|
|
|
+ type="avatar_url"
|
|
|
+ :url="`/files/stud/resume_avatar/${user.id}/upload`"
|
|
|
+ @upload="uploadSuccess"
|
|
|
+ ></upload>
|
|
|
+ </form-item>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <form-item label="姓名"> <el-input v-model="info.info.xm" placeholder="请输入姓名" readonly></el-input></form-item>
|
|
|
+ <form-item label="性别">
|
|
|
+ <el-radio-group v-model="info.info.xb" disabled>
|
|
|
+ <el-radio label="男"></el-radio>
|
|
|
+ <el-radio label="女"></el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </form-item>
|
|
|
+ <!-- <form-item label="籍贯"> <el-input v-model="info.native" placeholder="请输入籍贯"></el-input></form-item> -->
|
|
|
+ <form-item label="政治面貌">
|
|
|
+ <el-select v-model="info.info.zzmm" placeholder="请选择..." style="width: 100%">
|
|
|
+ <el-option v-for="(item, index) in options5" :key="index" :label="item.label" :value="item.label"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </form-item>
|
|
|
+ <form-item label="学历"> <el-input v-model="info.info.xl" placeholder="请输入学历" readonly></el-input></form-item>
|
|
|
+ <form-item label="学校"> <el-input v-model="info.info.yx" placeholder="请输入院校" readonly></el-input></form-item>
|
|
|
+ <form-item label="所学专业"> <el-input v-model="info.info.zy" placeholder="请输入所学专业" readonly></el-input></form-item>
|
|
|
+ <form-item label="生源地"> <el-input v-model="info.info.syszd" placeholder="请输入学生生源地" readonly></el-input></form-item>
|
|
|
+ <form-item label="手机号"> <el-input v-model="info.contact.mobile" placeholder="请输入手机号"></el-input></form-item>
|
|
|
+ <form-item label="邮箱"> <el-input v-model="info.contact.email" placeholder="请输入邮箱"></el-input></form-item>
|
|
|
+ <!-- <form-item label="学历">
|
|
|
+ <template>
|
|
|
+ <el-select v-model="info.value6" placeholder="请选择..." style="width: 100%">
|
|
|
+ <el-option v-for="(item, index) in options6" :key="index" :label="item.label" :value="item.value"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </form-item> -->
|
|
|
+ <!-- <form-item label="手机"> <el-input v-model="info.phone" placeholder=" "></el-input></form-item>
|
|
|
+ <form-item label="邮箱"> <el-input v-model="info.email" placeholder=" "></el-input></form-item> -->
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="18">自我介绍</el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <form-item label="一句话描述"> <el-input v-model="info.profile" placeholder="请输入一句话描述"></el-input></form-item>
|
|
|
+ <form-item label="专业技能"> <el-input v-model="info.skill" placeholder="请输入专业技能"></el-input></form-item>
|
|
|
+ <el-row>
|
|
|
+ <form-item label="个人介绍">
|
|
|
+ <el-input type="textarea" :rows="8" placeholder="请输入内容" v-model="info.content" maxlength="100" show-word-limit> </el-input>
|
|
|
+ </form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="21">教育经历</el-col>
|
|
|
+ <el-col :span="3"><el-button type="success" size="mini" icon="el-icon-plus" @click="educationsDialog = true">新增</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <template>
|
|
|
+ <el-table :data="info.educations" style="width: 100%">
|
|
|
+ <el-table-column prop="yx" align="left" label="毕业院校"> </el-table-column>
|
|
|
+ <el-table-column prop="fy" align="left" label="院系/分院"> </el-table-column>
|
|
|
+ <el-table-column prop="zy" align="center" label="专业"> </el-table-column>
|
|
|
+ <el-table-column prop="xl" align="center" label="学历"> </el-table-column>
|
|
|
+ <el-table-column prop="rxsj" align="center" label="就读时间"> </el-table-column>
|
|
|
+ <el-table-column prop="bysj" align="center" label="毕业时间"> </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-button type="text" @click="openEdit('educations', scope.row, scope.$index)">编辑</el-button>
|
|
|
+ <el-button type="text" @click="subListDelete('educations', scope.$index)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="21">工作或项目经历</el-col>
|
|
|
+ <el-col :span="3"><el-button type="success" size="mini" icon="el-icon-plus" @click="worksDialog = true">新增</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <template>
|
|
|
+ <el-table :data="info.works" style="width: 100%">
|
|
|
+ <el-table-column prop="corpname" align="left" label="公司/项目"> </el-table-column>
|
|
|
+ <el-table-column prop="position" align="center" label="职位/角色"> </el-table-column>
|
|
|
+ <el-table-column prop="begin" align="center" label="开始时间"> </el-table-column>
|
|
|
+ <el-table-column prop="end" align="center" label="结束时间"> </el-table-column>
|
|
|
+ <el-table-column align="center" label="操作">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <el-button type="text" @click="openEdit('works', scope.row, scope.$index)">编辑</el-button>
|
|
|
+ <el-button type="text" @click="subListDelete('works', scope.$index)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="21">证书</el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <upload-file
|
|
|
+ :url="`/files/stud/resume_${user.id}_honors/upload`"
|
|
|
+ desc="只能上传不超过2MB文件"
|
|
|
+ :limit="100"
|
|
|
+ @upload="uploadSuccess"
|
|
|
+ @changeName="changeName"
|
|
|
+ @toRemove="toRemove"
|
|
|
+ type="honors"
|
|
|
+ :data="uploads.honors"
|
|
|
+ ></upload-file>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="21">能力介绍<span style="font-weight: 700; font-size: 0.75rem;">(如您的作品,成绩单,证书等证明材料)</span></el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <upload-file
|
|
|
+ :url="`/files/stud/resume_${user.id}abilities/upload`"
|
|
|
+ desc="只能上传不超过2MB文件"
|
|
|
+ :limit="100"
|
|
|
+ @upload="uploadSuccess"
|
|
|
+ @changeName="changeName"
|
|
|
+ @toRemove="toRemove"
|
|
|
+ type="abilities"
|
|
|
+ :data="uploads.abilities"
|
|
|
+ ></upload-file>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="21">个人风采</el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <upload-file
|
|
|
+ :url="`/files/stud/resume_${user.id}shows/upload`"
|
|
|
+ desc="只能上传不超过2MB文件"
|
|
|
+ :limit="100"
|
|
|
+ @upload="uploadSuccess"
|
|
|
+ @changeName="changeName"
|
|
|
+ @toRemove="toRemove"
|
|
|
+ type="shows"
|
|
|
+ :data="uploads.shows"
|
|
|
+ ></upload-file>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="box-card" shadow="never" style="margin-top: 2rem">
|
|
|
+ <template #header>
|
|
|
+ <el-row type="flex" align="middle">
|
|
|
+ <el-col :span="21">简历附件<span style="font-weight: 700; font-size: 0.75rem;">(可上传pdf、word文档或图片文件)</span></el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <upload-file
|
|
|
+ :url="`/files/stud/resume_${user.id}attachments/upload`"
|
|
|
+ desc="只能上传不超过2MB文件"
|
|
|
+ :limit="100"
|
|
|
+ @upload="uploadSuccess"
|
|
|
+ @changeName="changeName"
|
|
|
+ @toRemove="toRemove"
|
|
|
+ type="attachments"
|
|
|
+ :data="uploads.attachments"
|
|
|
+ ></upload-file>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </el-form>
|
|
|
+ <el-row type="flex" justify="center">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-button type="success" style="width:60%" @click="toSubmit()">保 存</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </detail-layout>
|
|
|
+ <el-dialog title="教育经历" center :visible.sync="educationsDialog">
|
|
|
+ <el-form :model="educationsForm" label-position="left" label-width="auto" ref="educationsForm" :rules="eduRules">
|
|
|
+ <el-form-item label="院校" prop="yx">
|
|
|
+ <el-input v-model="educationsForm.yx" placeholder="请输入院校"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="院系/分院" prop="fy">
|
|
|
+ <el-input v-model="educationsForm.fy" placeholder="请输入院系/分院"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="专业" prop="zy">
|
|
|
+ <el-input v-model="educationsForm.zy" placeholder="请输入专业"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="学历" prop="xl">
|
|
|
+ <el-input v-model="educationsForm.xl" placeholder="请输入学历"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="入学时间" prop="rxsj">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="educationsForm.rxsj"
|
|
|
+ style="width:100%"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择入学时间"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="毕业时间" prop="bysj">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="educationsForm.bysj"
|
|
|
+ style="width:100%"
|
|
|
+ type="date"
|
|
|
+ placeholder="请选择毕业时间"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="toClose('educations')">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="toSubmitSub('educations')">保 存</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="工作经历" center :visible.sync="worksDialog">
|
|
|
+ <el-form :model="worksForm" label-position="left" label-width="auto" ref="worksForm" :rules="worksRules">
|
|
|
+ <el-form-item label="公司名/项目名" prop="corpname">
|
|
|
+ <el-input v-model="worksForm.corpname" placeholder="请输入公司名/项目名"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="职位/角色" prop="position">
|
|
|
+ <el-input v-model="worksForm.position" placeholder="请输入职位/角色"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工作描述" prop="desc">
|
|
|
+ <el-input v-model="worksForm.desc" type="textarea" autosize placeholder="请输入工作描述"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开始时间" prop="begin">
|
|
|
+ <el-date-picker v-model="worksForm.begin" style="width:100%" type="date" placeholder="请选择开始时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="结束时间" prop="end">
|
|
|
+ <el-date-picker v-model="worksForm.end" style="width:100%" type="date" placeholder="请选择结束时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="toClose('works')">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="toSubmitSub('works')">保 存</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="简历详情" center :visible.sync="resumeDialog" :fullscreen="true">
|
|
|
+ <resumes :info="preInfo"></resumes>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import resumes from '@resume/src/views/resume.vue';
|
|
|
+import uploadFile from '@/components/upload-file.vue';
|
|
|
+import upload from '@/components/upload.vue';
|
|
|
+import tagCheckbox from '@/components/tag-checkbox.vue';
|
|
|
+import tagAllSelect from '@/components/tag-all-select.vue';
|
|
|
+import formItem from '@/components/form-item.vue';
|
|
|
+import detailLayout from '@/layout/detail-layout.vue';
|
|
|
+import { mapActions, mapState } from 'vuex';
|
|
|
+import _ from 'lodash';
|
|
|
+export default {
|
|
|
+ name: 'resume',
|
|
|
+ props: {
|
|
|
+ original: { type: Object, default: () => {} },
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ detailLayout,
|
|
|
+ formItem,
|
|
|
+ tagAllSelect,
|
|
|
+ upload,
|
|
|
+ uploadFile,
|
|
|
+ tagCheckbox,
|
|
|
+ resumes,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ loading: false,
|
|
|
+ educationsDialog: false,
|
|
|
+ resumeDialog: false,
|
|
|
+ worksDialog: false,
|
|
|
+ preInfo: {},
|
|
|
+ educationsForm: {},
|
|
|
+ worksForm: {},
|
|
|
+ uploads: {},
|
|
|
+ provinceList: [{ label: '北京市', value: '110000' }, { label: '吉林省', value: '220000' }, { label: '沈阳省', value: '210000' }],
|
|
|
+ cityList: [],
|
|
|
+ secondList: [{ label: '长春市', value: '220100' }, { label: '吉林市', value: '220200' }],
|
|
|
+ secondList1: [{ label: '沈阳市', value: '210100' }, { label: '大连市', value: '210200' }],
|
|
|
+ info: {
|
|
|
+ educations: [],
|
|
|
+ works: [],
|
|
|
+ honors: [],
|
|
|
+ abilities: [],
|
|
|
+ shows: [],
|
|
|
+ attachments: [],
|
|
|
+ },
|
|
|
+ expect: {},
|
|
|
+ eduRules: {
|
|
|
+ yx: [{ required: true, message: '请输入院校', trigger: 'blur' }],
|
|
|
+ fy: [{ required: true, message: '请输入院系/分院', trigger: 'blur' }],
|
|
|
+ zy: [{ required: true, message: '请输入专业', trigger: 'blur' }],
|
|
|
+ xl: [{ required: true, message: '请输入学历', trigger: 'blur' }],
|
|
|
+ rxsj: [{ required: true, message: '请选择入学时间', trigger: 'blur' }],
|
|
|
+ bysj: [{ required: true, message: '请选择毕业时间', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ worksRules: {
|
|
|
+ corpname: [{ required: true, message: '请输入公司名/项目名', trigger: 'blur' }],
|
|
|
+ position: [{ required: true, message: '请输入职位/角色', trigger: 'blur' }],
|
|
|
+ desc: [{ required: true, message: '请输入工作描述', trigger: 'blur' }],
|
|
|
+ begin: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
|
|
|
+ end: [{ required: true, message: '请选择结束时间', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ jobTypeList: [
|
|
|
+ {
|
|
|
+ label: 'IT',
|
|
|
+ value: '1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'test2',
|
|
|
+ value: '2',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'test3',
|
|
|
+ value: '3',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'test4',
|
|
|
+ value: '4',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ textarea: '',
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ value: '选项1',
|
|
|
+ label: '农、林、牧、渔业',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项2',
|
|
|
+ label: '采矿业',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项3',
|
|
|
+ label: '制造业',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项4',
|
|
|
+ label: '电力、热力、燃气及水生产和供应业',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项5',
|
|
|
+ label: '建筑业',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ options2: [
|
|
|
+ {
|
|
|
+ value: '选项1',
|
|
|
+ label: '产品',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项2',
|
|
|
+ label: '设计',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项3',
|
|
|
+ label: '编程/IT开发',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项4',
|
|
|
+ label: '测试',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项5',
|
|
|
+ label: 'IT运维',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ options3: [
|
|
|
+ {
|
|
|
+ label: '全国',
|
|
|
+ options3: [
|
|
|
+ {
|
|
|
+ value: 'Quanguo',
|
|
|
+ label: '全国',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '直辖市',
|
|
|
+ options3: [
|
|
|
+ {
|
|
|
+ value: 'Beijing',
|
|
|
+ label: '成都',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'Shanghai',
|
|
|
+ label: '上海',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'Tianjin',
|
|
|
+ label: '天津',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'Chongqin',
|
|
|
+ label: '重庆',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ options4: [
|
|
|
+ {
|
|
|
+ value: '选项2',
|
|
|
+ label: '1K',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项3',
|
|
|
+ label: '2K',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项4',
|
|
|
+ label: '3K',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项5',
|
|
|
+ label: '4K',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ options5: [
|
|
|
+ {
|
|
|
+ value: '共青团员',
|
|
|
+ label: '共青团员',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '群众',
|
|
|
+ label: '群众',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '中共党员',
|
|
|
+ label: '中共党员',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '中共预备党员',
|
|
|
+ label: '中共预备党员',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ options6: [
|
|
|
+ {
|
|
|
+ value: '选项1',
|
|
|
+ label: '请选择...',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项2',
|
|
|
+ label: '博士',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项3',
|
|
|
+ label: '硕士',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项4',
|
|
|
+ label: '本科',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项5',
|
|
|
+ label: '大专',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '选项6',
|
|
|
+ label: '其他',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ form: {
|
|
|
+ name: '',
|
|
|
+ place: '',
|
|
|
+ num: '',
|
|
|
+ },
|
|
|
+ value1: [],
|
|
|
+ value2: [],
|
|
|
+ value3: [],
|
|
|
+ value4: [],
|
|
|
+ value5: [],
|
|
|
+ value6: [],
|
|
|
+ }),
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // this.$set(this, `info`, this.original);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['userOperation', 'resumesOperation']),
|
|
|
+ async search() {
|
|
|
+ let result = await this.resumesOperation({ type: 'search', data: { id: this.user.id } });
|
|
|
+ this.$set(this, `expect`, result.data.expect);
|
|
|
+ this.returnData(result.data);
|
|
|
+ this.$set(this, `info`, result.data ? result.data : { info: {} });
|
|
|
+ result = await this.userOperation({ type: 'search', data: { id: this.user.id } });
|
|
|
+ this.$set(this.info, `info`, result.data.info ? result.data.info : { info: {} });
|
|
|
+ this.$set(this, `loading`, true);
|
|
|
+ },
|
|
|
+ async toSubmit() {
|
|
|
+ let data = JSON.parse(JSON.stringify(this.expect));
|
|
|
+ data = this.proData(data);
|
|
|
+ this.info.expect = data;
|
|
|
+ data = this.proPic(JSON.parse(JSON.stringify(this.info)));
|
|
|
+ let result;
|
|
|
+ if (this.info.id) {
|
|
|
+ result = await this.resumesOperation({ type: 'update', data: { info: data, id: this.info.id } });
|
|
|
+ } else {
|
|
|
+ result = await this.resumesOperation({ type: 'add', data: { info: data, schid: this.user.schid, studid: this.user.id } });
|
|
|
+ }
|
|
|
+ if (`${result.errcode}` === '0') {
|
|
|
+ this.$message.success('操作成功');
|
|
|
+ } else {
|
|
|
+ this.$message.error(result.errmsg);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ listChange({ val, type }) {
|
|
|
+ //此方法是更换子列表的
|
|
|
+ if (val === '220000') {
|
|
|
+ this.$set(this, `cityList`, this.secondList);
|
|
|
+ } else if (val === '210000') {
|
|
|
+ this.$set(this, `cityList`, this.secondList1);
|
|
|
+ } else if (type === 'zy_req') {
|
|
|
+ //专业查询模拟
|
|
|
+ this.$set(this, `subjectSubList`, val === '1' ? this.subjectSub : this.subjectSub2);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selectChange({ val, type }) {
|
|
|
+ //此方法是同步选择
|
|
|
+ if (type === 'category' || type === 'city' || type === 'salary') {
|
|
|
+ this.$set(this.expect, type, val);
|
|
|
+ } else {
|
|
|
+ this.$set(this.info, type, val);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toSubmitSub(type) {
|
|
|
+ this.$refs[`${type}Form`].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ this.subListAdd(type);
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ subListAdd(type) {
|
|
|
+ let data = _.get(this, `${type}Form`);
|
|
|
+ if (data.index !== undefined) {
|
|
|
+ let { index, ...info } = data;
|
|
|
+ this.$set(_.get(this.info, `${type}`), `${index}`, info);
|
|
|
+ this.toClose(type);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let list = _.get(this.info, `${type}`);
|
|
|
+ if (list) {
|
|
|
+ list.push(data);
|
|
|
+ this.$set(this.info, `${type}`, list);
|
|
|
+ } else {
|
|
|
+ list = [data];
|
|
|
+ this.$set(this.info, `${type}`, list);
|
|
|
+ }
|
|
|
+ this.toClose(type);
|
|
|
+ },
|
|
|
+ toClose(type) {
|
|
|
+ this.$set(this, `${type}Form`, {});
|
|
|
+ this.$set(this, `${type}Dialog`, false);
|
|
|
+ },
|
|
|
+ openEdit(type, info, index) {
|
|
|
+ let data = JSON.parse(JSON.stringify(info));
|
|
|
+ data.index = index;
|
|
|
+ this.$set(this, `${type}Form`, data);
|
|
|
+ this.$set(this, `${type}Dialog`, true);
|
|
|
+ },
|
|
|
+ subListDelete(type, index) {
|
|
|
+ let list = _.get(this.info, `${type}`);
|
|
|
+ list.splice(index, 1);
|
|
|
+ this.$set(this.info, `${type}`, list);
|
|
|
+ },
|
|
|
+ uploadSuccess({ type, data }) {
|
|
|
+ if (type !== 'avatar_url') {
|
|
|
+ let arr = _.get(this.uploads, type);
|
|
|
+ if (arr !== undefined) {
|
|
|
+ this.uploads[type].push({ name: data.name, uri: data.uri });
|
|
|
+ } else {
|
|
|
+ let newArr = [{ name: data.name, uri: data.uri }];
|
|
|
+ this.$set(this.uploads, `${type}`, newArr);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$set(this.info, `${type}`, data.uri);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ toRemove({ type, data }) {
|
|
|
+ if (type !== 'avatar_url') {
|
|
|
+ let arr = _.get(this.uploads, type);
|
|
|
+ let newArr = arr.filter(item => item.uri !== data.url);
|
|
|
+ this.$set(this.uploads, `${type}`, newArr);
|
|
|
+ this.toSubmit();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ proData(data) {
|
|
|
+ let mid = '';
|
|
|
+ data.industry.map(item => {
|
|
|
+ if (mid === '') {
|
|
|
+ mid = item;
|
|
|
+ } else {
|
|
|
+ mid += `,${item}`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ data.industry = mid;
|
|
|
+ mid = '';
|
|
|
+ data.city.map(item => {
|
|
|
+ if (mid === '') {
|
|
|
+ mid = item.label;
|
|
|
+ } else {
|
|
|
+ mid += `,${item.label}`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ data.city = mid;
|
|
|
+ mid = '';
|
|
|
+ data.category.map(item => {
|
|
|
+ if (mid === '') {
|
|
|
+ mid = item.label;
|
|
|
+ } else {
|
|
|
+ mid += `,${item.label}`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ data.category = mid;
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ proPic(data) {
|
|
|
+ data.honors = _.get(this.uploads, `honors`) === undefined ? [] : _.get(this.uploads, `honors`);
|
|
|
+ data.abilities = _.get(this.uploads, `abilities`) === undefined ? [] : _.get(this.uploads, `abilities`);
|
|
|
+ data.shows = _.get(this.uploads, `shows`) === undefined ? [] : _.get(this.uploads, `shows`);
|
|
|
+ data.attachments = _.get(this.uploads, `attachments`) === undefined ? [] : _.get(this.uploads, `attachments`);
|
|
|
+ console.log(data);
|
|
|
+ return data;
|
|
|
+ },
|
|
|
+ returnData(data) {
|
|
|
+ if (data.expect.industry) {
|
|
|
+ let ind = data.expect.industry.split(',');
|
|
|
+ this.$set(this.expect, `industry`, ind);
|
|
|
+ }
|
|
|
+ if (data.expect.city) {
|
|
|
+ let ind = data.expect.city.split(',');
|
|
|
+ let selected = [];
|
|
|
+ for (const select of ind) {
|
|
|
+ let res = this.provinceList.filter(item => item.label === select);
|
|
|
+ if (res.length > 0) {
|
|
|
+ selected = [...selected, ...res];
|
|
|
+ } else {
|
|
|
+ let res = this.secondList.filter(item => item.label === select);
|
|
|
+ if (res.length > 0) {
|
|
|
+ selected = [...selected, ...res];
|
|
|
+ } else {
|
|
|
+ let res = this.secondList1.filter(item => item.label === select);
|
|
|
+ if (res.length > 0) {
|
|
|
+ selected = [...selected, ...res];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this.expect, `city`, selected);
|
|
|
+ }
|
|
|
+ if (data.expect.category) {
|
|
|
+ let ind = data.expect.category.split(',');
|
|
|
+ let arr = [];
|
|
|
+ for (const select of ind) {
|
|
|
+ let result = this.jobTypeList.filter(item => item.label === select);
|
|
|
+ arr = [...arr, ...result];
|
|
|
+ }
|
|
|
+ this.$set(this.expect, `category`, arr);
|
|
|
+ }
|
|
|
+ if (data.expect.salary) {
|
|
|
+ this.$set(this.expect, `salary`, data.expect.salary);
|
|
|
+ }
|
|
|
+ if (data.honors.length > 0) {
|
|
|
+ this.$set(this.uploads, `honors`, data.honors);
|
|
|
+ }
|
|
|
+ if (data.abilities.length > 0) {
|
|
|
+ this.$set(this.uploads, `abilities`, data.abilities);
|
|
|
+ }
|
|
|
+ if (data.shows.length > 0) {
|
|
|
+ this.$set(this.uploads, `shows`, data.shows);
|
|
|
+ }
|
|
|
+ if (data.attachments.length > 0) {
|
|
|
+ this.$set(this.uploads, `attachments`, data.attachments);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ checkResume() {
|
|
|
+ let preInfo = JSON.parse(JSON.stringify(this.info));
|
|
|
+ let data = JSON.parse(JSON.stringify(this.expect));
|
|
|
+ data = this.proData(data);
|
|
|
+ preInfo.expect = data;
|
|
|
+ preInfo = this.proPic(preInfo);
|
|
|
+ this.$set(this, `preInfo`, preInfo);
|
|
|
+ this.resumeDialog = true;
|
|
|
+ },
|
|
|
+ changeName({ type, data }) {
|
|
|
+ let newObject = { name: data.name, uri: data.url };
|
|
|
+ let list = _.get(this.uploads, type);
|
|
|
+ if (list.length > 0) {
|
|
|
+ let index = _.findIndex(list, item => {
|
|
|
+ return item.uri === data.url;
|
|
|
+ });
|
|
|
+ this.$set(list, `${index}`, newObject);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.tip {
|
|
|
+ color: #999999;
|
|
|
+}
|
|
|
+.rowStyle {
|
|
|
+ border-bottom: 1px dashed;
|
|
|
+}
|
|
|
+</style>
|