| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742 |
- <template>
- <div class="addResume" style="padding-bottom: 20px">
- <div class="info flex align-center justify-center">
- <div class="info-box">
- <div class="info-boxs flex justify-between">
- <div class="info-box-l" style="width:calc(100% - 640px)">
- <div class="info-box-l-box">
- <div class="info-box-l-title">
- 个人中心
- <div class="info-box-l-line"></div>
- </div>
- <div class="info-box-l-info-hover">
- <!---------------------------- 查看个人信息 ---------------------------------->
- <div class="info-box-l-info-hovers" v-if="userInfoEdit == false">
- <div class="info-box-l-info flex align-center justify-between">
- <div class="info-box-l-info-l flex align-center">
- <div class="info-box-l-info-avatar" style="flex-shrink: 0;">
- <el-upload class="avatar-uploader flex align-center justify-center"
- :action="action" :show-file-list="false" :on-success="handleAvatarSuccess
- ">
- <img v-if="avatar" :src="avatar" style="
- width: 100%;
- height: 100%;
- " class="avatar" />
- <el-icon color="#00DD9A" v-else class="avatar-uploader-icon">
- <Plus />
- </el-icon>
- </el-upload>
- </div>
- <div class="info-box-l-info-info">
- <div class="info-box-l-info-info-t flex align-center">
- <div>
- {{ nickName }}
- </div>
- <!-- <div v-if="isVip==false">
- 升级VIP
- </div> -->
- <!-- <div v-if="isVip" style="
- background-color: #00dd9a;
- color: #ffffff;
- ">
- 会员用户
- </div> -->
- </div>
- <div class="info-box-l-info-info-b flex align-center">
- <!-- 工作经验·年龄·学历·性别 -->
- {{
- resumeInfo.workExpTimes ||
- 0
- }}年经验·
- {{
- userEntity &&
- userEntity.age
- ? userEntity.age
- : 18
- }}岁·
- {{ this.getHighestEducation().degree || ''}}·
- {{
- userEntity &&
- userEntity.sex == 1
- ? '男'
- : userEntity &&
- userEntity.sex ==
- 2
- ? '女'
- : ''
- }}
- </div>
- </div>
- </div>
- <div class="info-box-l-info-r flex align-center">
- <div class="info-box-l-info-r-item" @click="goInterview(0)">
- <div class="info-box-l-info-r-item-t">
- {{ deliveryCount }}
- </div>
- <div class="info-box-l-info-r-item-b">
- 投递记录
- </div>
- </div>
- <div class="info-box-l-info-r-item" @click="goInterview(4)">
- <div class="info-box-l-info-r-item-t">
- {{ browseCount }}
- </div>
- <div class="info-box-l-info-r-item-b">
- 浏览记录
- </div>
- </div>
- <div class="info-box-l-info-r-item" @click="goInterview(3)">
- <div class="info-box-l-info-r-item-t">
- {{ collectionCount }}
- </div>
- <div class="info-box-l-info-r-item-b">
- 我的收藏
- </div>
- </div>
- </div>
- </div>
- <!-- 求职状态 -->
- <div class="info-box-l-btm flex align-center justify-between">
- <div class="info-box-l-status">
- {{
- resumesStatus == 0
- ? '离职-随时到岗'
- : resumesStatus == 1
- ? '在职-月内到岗'
- : resumesStatus == 2
- ? '在职-考虑机会'
- : '在职-暂不考虑'
- }}
- </div>
- <div @click="hideFrom('userInfoEdit')"
- class="info-box-l-seid flex align-center">
- <el-icon class="info-box-l-seid-icon" style="cursor: pointer"
- color="#00DD9A" size="20">
- <Edit />
- </el-icon>
- 编辑
- </div>
- </div>
- </div>
- <!---------------------------- 编辑个人信息 ---------------------------------->
- <div v-else class="info-box-l-edit">
- <view class="info-box-l-edit-title">
- 编辑个人信息
- </view>
- <el-form ref="formResume" v-loading="loading" size="large" style="margin-top: 20px"
- class="flex align-center justify-between" label-position="top" :inline="true"
- :model="form" label-width="120px">
- <el-form-item prop="resumesName" :rules="[
- {
- required: true,
- message: '请输入姓名',
- trigger: 'blur'
- }
- ]" class="row45" label="姓名">
- <el-input placeholder="请输入姓名" class="inputClass"
- v-model="form.resumesName" />
- </el-form-item>
- <el-form-item class="row45" label="性别">
- <div class="info-box-l-edit-sex flex align-center justify-between">
- <div @click="
- current = item.id;
- form.resumesSex =
- item.id;
- " :class="current == item.id
- ? 'activeSex'
- : ''
- "
- class="info-box-l-edit-sex-item flex align-center justify-center"
- v-for="(item, index) in sexList" :key="index">
- {{ item.name }}
- </div>
- </div>
- </el-form-item>
- <el-form-item prop="resumesPhone" :rules="[
- {
- required: true,
- message: '请输入手机号',
- trigger: 'blur'
- }
- ]" class="row45" label="手机号">
- <el-input v-model="form.resumesPhone" maxlength="11" placeholder="请输入手机号" />
- </el-form-item>
- <el-form-item class="row45" label="年龄">
- <el-input-number style="width: 100%" v-model="form.resumesAge" :min="1"
- :max="100" controls-position="right" />
- </el-form-item>
- <el-form-item prop="resumesEmail" :rules="[
- {
- required: true,
- message: '请输入电子邮箱',
- trigger: 'blur'
- }
- ]" class="row45" label="电子邮箱">
- <el-input v-model="form.resumesEmail" type="email" placeholder="请输入电子邮箱" />
- </el-form-item>
- <el-form-item prop="resumesStatus" :rules="[
- {
- required: true,
- message: '请选择求职状态',
- trigger: 'blur'
- }
- ]" class="row45" label="当前求职状态">
- <el-select style="width: 100%" v-model="form.resumesStatus"
- placeholder="请选择求职状态">
- <el-option v-for="item in qiuzhiStatus" :key="item.value"
- :label="item.label" :value="item.value" />
- </el-select>
- </el-form-item>
- <el-form-item class="row45"></el-form-item>
- <el-form-item class="row45">
- <div class="info-box-l-edit-btn flex align-center justify-end">
- <el-button @click="
- userInfoEdit = false
- " style="width: 100px" type="Info">取消</el-button>
- <el-button @click="saveResumesInfo()" style="
- width: 100px;
- margin-left: 30px;
- " type="primary">保存</el-button>
- </div>
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- <div class="info-box-l-lines"></div>
- <div class="info-box-l-gw">
- <!---------------------------- 查看求职意向 ---------------------------------->
- <div v-if="!gangweiEdit" class="info-box-l-gw-box info-box-l-gw-boxs">
- <div class="info-box-l-gw-title flex align-center justify-between">
- 求职意向
- <div @click="addIntentionJob()" class="info-box-l-gw-box-edit flex align-center">
- <el-icon class="info-box-l-gw-box-edit-icon" style="cursor: pointer"
- color="#00DD9A" size="20">
- <CirclePlus />
- </el-icon>
- 添加
- </div>
- </div>
- <div v-if="jobTypeList.length == 0" style="margin-top: 20px">
- 暂无求职意向
- </div>
- <div style="margin-top: 20px"
- class="info-box-l-gw-box flex align-center flex-wrap justify-between">
- <div style="width: 90%" class="flex align-center flex-wrap">
- <div @click="getInteJob(item)" class="info-box-l-gw-box-item flex align-center" style="margin-bottom: 20px;"
- v-for="(item, index) in jobTypeList" :key="index">
- {{ item.ruleClassifyName }}
- <div class="fontCOlor" style="margin-left: 10px">
- |
- <span class="font333" style="margin-left: 10px">
- {{ item.salaryRange }}
- </span>
- </div>
- <div class="fontCOlor" style="margin-left: 10px">
- |
- <span style="margin-left: 10px">
- {{ item.citys }}
- </span>
- </div>
- <el-icon class="info-box-l-gw-box-item-edit" color="#00DD9A">
- <EditPen />
- </el-icon>
- <img v-if="item.isDefault == 1" class="info-box-l-gw-box-item-biaoji"
- src="../../../public/images/index/biaoji.png" />
- </div>
- </div>
- </div>
- </div>
- <!---------------------------- 添加求职意向 ---------------------------------->
- <div v-else class="info-box-l-gw-box" style="padding: 0 40px">
- <div class="info-box-l-gw-title">
- 添加求职意向
- </div>
- <el-form ref="formRef" v-loading="loading" size="large" style="margin-top: 20px"
- class="flex align-center justify-between" label-position="top" :inline="true"
- :model="intentionJob" label-width="120px">
- <el-form-item prop="ruleClassifyName" :rules="[
- {
- required: true,
- message: '请选择工作职位',
- trigger: 'blur'
- }
- ]" class="row45" label="工作职位">
- <el-input @click="openDialog()" :readonly="true" placeholder="请选择工作职位"
- suffix-icon="ArrowRight" class="inputClass" v-model="intentionJob.ruleClassifyName
- ">
- </el-input>
- </el-form-item>
- <el-form-item prop="citys" :rules="[
- {
- required: true,
- message: '请选择期望工作地点',
- trigger: 'blur'
- }
- ]" class="row45" label="期望地点">
- <el-input @click="openCityDialog()" :readonly="true" placeholder="请选择期望工作地点"
- suffix-icon="ArrowRight" class="inputClass" v-model="intentionJob.citys">
- </el-input>
- </el-form-item>
- <el-form-item prop="industry" :rules="[
- {
- required: true,
- message: '请选择从事方向',
- trigger: 'blur'
- }
- ]" class="row45" label="从事方向">
- <el-input @click="openIndustry()" :readonly="true" placeholder="请选择从事方向"
- suffix-icon="ArrowRight" class="inputClass" v-model="intentionJob.industry">
- </el-input>
- </el-form-item>
- <el-form-item prop="salaryRange" :rules="[
- {
- required: true,
- message: '请选择期望薪资',
- trigger: 'blur'
- }
- ]" class="row45" label="期望薪资">
- <div style="display: flex; gap: 10px; align-items: center; width: 100%">
- <!-- 最低薪资 -->
- <el-select v-model="intentionJob.minSalary" placeholder="最低薪资"
- style="flex: 1">
- <el-option v-for="item in desireSalary" :key="item.value"
- :label="item.label" :value="item.value" />
- </el-select>
- <span>-</span>
- <!-- 最高薪资 -->
- <el-select v-model="intentionJob.maxSalary" placeholder="最高薪资"
- style="flex: 1">
- <el-option
- v-for="item in desireSalary.filter(i => Number(i.value) >= Number(intentionJob.minSalary))"
- :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </div>
- </el-form-item>
- <el-form-item prop="postType" :rules="[
- {
- required: true,
- message: '请选择工作性质',
- trigger: 'blur'
- }
- ]" class="row45" label="工作性质">
- <el-select style="width: 100%" v-model="intentionJob.postType"
- placeholder="请选择工作性质">
- <el-option v-for="item in workStatus" :key="item.value" :label="item.label"
- :value="item.value" />
- </el-select>
- </el-form-item>
- <el-form-item class="row45"></el-form-item>
- <el-form-item class="row45"></el-form-item>
- <el-form-item class="row45">
- <div class="info-box-l-edit-btn flex align-center justify-end">
- <el-button @click="gangweiEdit = false" style="width: 100px"
- type="Info">取消</el-button>
- <el-button v-if="intentionId" @click="deleteInteJob()" style="
- width: 100px;
- margin-left: 30px;
- " type="danger">删除</el-button>
- <el-button @click="editInteJob()" style="
- width: 100px;
- margin-left: 30px;
- " type="primary">保存</el-button>
- </div>
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- <!---------------------------- 右边简历预览 ---------------------------------->
- <div class="info-box-r flex justify-center flex-wrap" style="width: 350px;">
- <div class="info-box-r-t">
- <div>
- <el-card class="box-card" shadow="hover" style="
- cursor: pointer;
- border: none;
- border-radius: 15px;
- ">
- <template #header>
- <div class="card-header" style="padding: 2px">
- <span style="font-weight: 500">简历预览</span>
- </div>
- </template>
- <div class="box-card-i flex align-center">
- <el-icon style="margin-right: 10px">
- <User />
- </el-icon>姓名:{{ form.resumesName ? form.resumesName : '暂无'}}
- </div>
- <div class="box-card-i flex align-center">
- <el-icon style="margin-right: 10px">
- <Message />
- </el-icon>邮箱:{{
- form.resumesEmail
- ? form.resumesEmail
- : '暂无'
- }}
- </div>
- <div class="box-card-i flex align-center">
- <el-icon style="margin-right: 10px">
- <Finished />
- </el-icon>岗位:<template v-if="jobTypeList.length > 0">
- <template v-for="(item, index) in jobTypeList" :key="index">
- {{ item.ruleClassifyName }}
- </template>
- </template>
- <template v-else>暂无岗位</template>
- </div>
- <div class="box-card-i flex align-center">
- <el-icon style="margin-right: 10px">
- <Discount />
- </el-icon>学校:{{
- form.school ? form.school : '暂无'
- }}
- </div>
- <div class="box-card-i flex align-center">
- <el-icon style="margin-right: 10px">
- <Operation />
- </el-icon>专业:{{
- form.major ? form.major : '暂无'
- }}
- </div>
- </el-card>
- </div>
- </div>
- <div class="info-box-r-b flex align-center justify-around" style="margin-top: 20px;padding-bottom: 10px;">
- <div class="info-box-r-b-item" @click="goInterview(0)">
- <div class="info-box-r-b-item-t flex align-center justify-center">
- <img src="/images/resume/lljl.png" alt="" srcset="" />
- </div>
- <div class="info-box-r-b-item-b">投递记录</div>
- </div>
- <div class="info-box-r-b-item" @click="goInterview(1)">
- <div class="info-box-r-b-item-t flex align-center justify-center">
- <img src="/images/resume/myLove.png" alt="" srcset="" />
- </div>
- <div class="info-box-r-b-item-b">沟通记录</div>
- </div>
- <div class="info-box-r-b-item" @click="goInterview(2)">
- <div class="info-box-r-b-item-t flex align-center justify-center">
- <img src="/images/resume/ms.png" alt="" srcset="" />
- </div>
- <div class="info-box-r-b-item-b">我的面试</div>
- </div>
- <div class="info-box-r-b-item" @click="goInterview(3)">
- <div class="info-box-r-b-item-t flex align-center justify-center">
- <img src="/images/resume/sx.png" alt="" srcset="" />
- </div>
- <div class="info-box-r-b-item-b">我的收藏</div>
- </div>
- </div>
- </div>
- <!-- 附件简历 -->
- <upload-resume v-model="resumeFiles" :limit="3" @change="handleChange" />
- </div>
- <!---------------------------- 工作经历 ---------------------------------->
- <div class="info-boxsWork flex align-center justify-center">
- <div class="info-boxsWorks">
- <div class="info-boxsWorks-title flex align-center justify-between">
- 工作经历
- <div @click="workIndex = -1;hideFrom('workExperience')"
- class="info-boxsWorks-title-add flex align-center">
- <el-icon class="info-boxsWorks-title-adds" style="cursor: pointer" color="#00DD9A"
- size="20">
- <CirclePlus />
- </el-icon>
- 添加
- </div>
- </div>
- <div class="info-boxsWorks-content" v-if="
- workExps.length == 0 &&
- !workExperience
- ">
- 暂无工作经历
- </div>
- <div v-if="!workExperience" class="info-boxsWorks-content" v-for="(item, index) in workExps"
- :key="index">
- <div class="info-boxsWorks-content-title flex align-center justify-between">
- {{ item.companyName || '未填写公司名称' }}
- <div class="info-boxsWorks-content-title-cz flex align-center">
- <div @click="editWorkHis(item, index)"
- class="info-boxsWorks-content-title-cz-i flex align-center">
- <el-icon class="info-boxsWorks-content-title-cz-is" style="cursor: pointer"
- color="#00DD9A" size="14">
- <Edit />
- </el-icon>
- 编辑
- </div>
- <div @click="deleteWorkHis(item, index)"
- class="info-boxsWorks-content-title-cz-i flex align-center">
- <el-icon class="info-boxsWorks-content-title-cz-is" style="cursor: pointer"
- color="#00DD9A" size="14">
- <Delete />
- </el-icon>
- 删除
- </div>
- </div>
- </div>
- <!-- 显示该公司下的所有职位信息 -->
- <div v-for="(detail, detailIndex) in workExpList.filter(exp => exp.workExpId === item.workExpId)"
- :key="detailIndex" class="info-boxsWorks-content-position">
- <div class="info-boxsWorks-content-job">
- <span>担任岗位:</span>
- {{ detail.position || '未填写岗位' }}
- <span v-if="detail.department" class="info-boxsWorks-content-department">
- ({{ detail.department }})
- </span>
- </div>
- <div class="info-boxsWorks-content-time flex align-center">
- <span>在职时间:</span>
- {{
- detail.startTime
- ? this.getFormDate(detail.startTime)
- : '未填写开始时间'
- }}
- <div class="info-boxsWorks-content-timez">
- 至
- </div>
- {{
- detail.endTime
- ? this.getFormDate(detail.endTime)
- : '至今'
- }}
- </div>
- <div class="info-boxsWorks-content-con" style="white-space: pre-wrap;">
- <span>工作内容:</span>
- <div>
- {{ detail.workContent || '未填写工作内容' }}
- </div>
- </div>
- <!-- 显示技能标签 -->
- <div v-if="detail.skills && detail.skills.length > 0"
- class="info-boxsWorks-content-time flex align-center">
- <span>专业技能:</span>
- <div class="info-boxsWorks-content-skills-tags">
- <span v-for="(skill, skillIndex) in detail.skills" :key="skillIndex"
- class="info-boxsWorks-content-skill-tag">
- {{ skill }}
- </span>
- </div>
- </div>
- <div v-if="detailIndex < workExpList.filter(exp => exp.workExpId === item.workExpId).length - 1"
- class="info-boxsWorks-content-divider"></div>
- </div>
- <!-- 是否屏蔽该公司 -->
- <div class="flex align-center" style="margin-top: 10px;">
- <div style="color: #999;font-size: 14px;margin-right: 10px;">不对该公司展示</div>
- <el-switch :active-value="1" :inactive-value="0" v-model="item.isShield" @change="changeIsDisplay(item)" />
- </div>
- </div>
- <!-- 添加/编辑工作经历 -->
- <div v-else class="info-boxsWorks-edit flex align-center justify-center">
- <div class="info-boxsWorks-edits">
- <el-form ref="formRefWork" v-loading="loading" size="large" style="margin-top: 20px"
- class="flex align-center justify-between" label-position="top" :inline="true"
- :model="workObj" label-width="120px">
- <el-form-item prop="resumesTitle" :rules="[
- {
- required: true,
- message: '请输入公司名称',
- trigger: 'blur'
- }
- ]" class="row45" label="公司名称">
- <el-input placeholder="请输入公司名称" suffix-icon="ArrowRight" class="inputClass"
- v-model="workObj.resumesTitle">
- </el-input>
- </el-form-item>
- <el-form-item prop="businessType" :rules="[
- {
- required: true,
- message: '请选择公司业务类型',
- trigger: 'change'
- }
- ]" class="row45" label="公司业务类型">
- <el-checkbox-group v-model="workObj.businessType">
- <el-checkbox v-for="item in businessTypeOptions" :key="item.value"
- :label="item.label">
- </el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- <el-form-item prop="department" :rules="[
- {
- required: true,
- message: '请选择所在部门',
- trigger: 'change'
- }
- ]" class="row45" label="所在部门">
- <el-select placeholder="请选择所在部门" v-model="workObj.departmentId"
- @change="handleDepartmentChange">
- <el-option v-for="item in departments" :key="item.departmentId"
- :label="item.departmentName" :value="item.departmentId">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="resumesTime" :rules="[
- {
- required: true,
- message: '请选择在职时间',
- trigger: 'blur'
- }
- ]" class="row45" label="在职时间">
- <el-date-picker v-model="workObj.resumesTime" type="daterange"
- range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
- </el-form-item>
- <el-form-item prop="selectedJobPost" :rules="[
- {
- required: true,
- message: '请选择工作职位',
- trigger: 'blur'
- }
- ]" class="row45" label="工作职位">
- <el-input @click="openDialogForWorkExp()" :readonly="true" placeholder="请选择工作职位"
- v-model="workObj.selectedJobPost" suffix-icon="ArrowRight"
- class="inputClass">
- </el-input>
- </el-form-item>
- <el-form-item prop="positionSkills" :rules="[
- {
- required: true,
- message: '请选择岗位职业技能',
- trigger: 'blur'
- }
- ]" class="row45" label="岗位职业技能">
- <el-input @click="openIndustryForWorkExp()" :readonly="true"
- placeholder="请选择岗位职业技能" v-model="workObj.positionSkills"
- suffix-icon="ArrowRight" class="inputClass">
- </el-input>
- </el-form-item>
- <el-form-item prop="resumesContent" :rules="[
- {
- required: true,
- message: '请输入工作内容',
- trigger: 'blur'
- }
- ]" class="row45" label="工作内容">
- <el-input v-model="workObj.resumesContent" :autosize="{
- minRows: 4,
- maxRows: 6
- }" type="textarea" placeholder="请输入工作内容" />
- </el-form-item>
- <el-form-item prop="workPerformance" class="row45" label="工作业绩">
- <el-input v-model="workObj.workPerformance" :autosize="{
- minRows: 4,
- maxRows: 6
- }" type="textarea" placeholder="请输入工作业绩" />
- </el-form-item>
- <el-form-item class="row45"> </el-form-item>
- <el-form-item class="row45">
- <div class="info-box-l-edit-btn flex align-center justify-end">
- <el-button @click="workExperience = false" style="width: 100px"
- type="Info">取消</el-button>
- <el-button @click="editInteWork()" style="
- width: 100px;
- margin-left: 30px;
- " type="primary">保存</el-button>
- </div>
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- </div>
- <!---------------------------- 教育经历 ---------------------------------->
- <div class="info-boxsWork flex align-center justify-center">
- <div class="info-boxsWorks">
- <div class="info-boxsWorks-title flex align-center justify-between">
- <div>教育经历<text style="font-size: 12px; color: #999;font-weight: 400;">(请填写最高学历)</text></div>
- <div @click="workIndex = -1; hideFrom('perExperience')"
- class="info-boxsWorks-title-add flex align-center">
- <el-icon class="info-boxsWorks-title-adds" style="cursor: pointer" color="#00DD9A"
- size="20">
- <CirclePlus />
- </el-icon>
- 添加
- </div>
- </div>
- <div class="info-boxsWorks-content" v-if="eduList.length == 0 && !perExperience">
- 暂无教育经历
- </div>
- <div v-if="!perExperience" class="info-boxsWorks-content" v-for="(item, index) in eduList"
- :key="index">
- <div class="info-boxsWorks-content-title flex align-center justify-between">
- {{ item.school || '未填写学校' }}
- <div class="info-boxsWorks-content-title-cz flex align-center">
- <div @click="editPerHis(item, index)"
- class="info-boxsWorks-content-title-cz-i flex align-center">
- <el-icon class="info-boxsWorks-content-title-cz-is" style="cursor: pointer"
- color="#00DD9A" size="14">
- <Edit />
- </el-icon>
- 编辑
- </div>
- <div @click="deletePerHis(item, index)"
- class="info-boxsWorks-content-title-cz-i flex align-center">
- <el-icon class="info-boxsWorks-content-title-cz-is" style="cursor: pointer"
- color="#00DD9A" size="14">
- <Delete />
- </el-icon>
- 删除
- </div>
- </div>
- </div>
- <div class="info-boxsWorks-content-job">
- <span>专业:</span>
- {{ item.profession || '未填写专业' }}
- </div>
- <div class="info-boxsWorks-content-job">
- <span>学历:</span>
- {{ item.degree || '未填写学历' }}
- </div>
- <div class="info-boxsWorks-content-time flex align-center">
- <span>就读时间:</span>
- {{
- item.startTime
- ? this.getFormDate(item.startTime)
- : '未填写开始时间'
- }}
- <div class="info-boxsWorks-content-timez">
- 至
- </div>
- {{
- item.endTime
- ? this.getFormDate(item.endTime)
- : '至今'
- }}
- </div>
- <div class="info-boxsWorks-content-con" style="white-space: pre-wrap;">
- <span>详细描述:</span>
- <div>{{ item.detail || '未填写详细描述' }}</div>
- </div>
- </div>
- <!-- 添加/编辑教育经历 -->
- <div v-else class="info-boxsWorks-edit flex align-center justify-center">
- <div class="info-boxsWorks-edits">
- <el-form ref="formRefperject" v-loading="loading" size="large" style="margin-top: 20px"
- class="flex align-center justify-between" label-position="top" :inline="true"
- :model="perjectObj" label-width="120px">
- <el-form-item prop="resumesTitle" :rules="[
- {
- required: true,
- message: '请输入学校名称',
- trigger: 'blur'
- }
- ]" class="row45" label="学校名称">
- <el-input placeholder="请输入学校名称" suffix-icon="ArrowRight" class="inputClass"
- v-model="perjectObj.resumesTitle">
- </el-input>
- </el-form-item>
- <el-form-item prop="resumesPost" :rules="[
- {
- required: true,
- message: '请输入专业',
- trigger: 'blur'
- }
- ]" class="row45" label="专业">
- <el-input placeholder="请输入专业" suffix-icon="ArrowRight" class="inputClass"
- v-model="perjectObj.resumesPost">
- </el-input>
- </el-form-item>
- <el-form-item prop="degree" :rules="[
- {
- required: true,
- message: '请选择学历',
- trigger: 'change'
- }
- ]" class="row45" label="学历">
- <el-select placeholder="请选择学历" v-model="perjectObj.degree" class="inputClass">
- <el-option v-for="(item, index) in degreeOptions" :key="index" :label="item"
- :value="item"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item prop="resumesTime" :rules="[
- {
- required: true,
- message: '请选择在校时间',
- trigger: 'blur'
- }
- ]" class="row45" label="在校时间">
- <el-date-picker v-model="perjectObj.resumesTime" type="daterange"
- range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
- </el-form-item>
- <el-form-item prop="resumesContent" class="row45" label="在校经历(选填)">
- <el-input v-model="perjectObj.resumesContent" :autosize="{
- minRows: 6,
- maxRows: 8
- }" maxlength="300" show-word-limit type="textarea" placeholder="1.在校担任职务...
- 2.获得荣誉...
- 3.所学主要课程..." />
- </el-form-item>
- <el-form-item class="row45"> </el-form-item>
- <el-form-item class="row45"> </el-form-item>
- <el-form-item class="row45">
- <div class="info-box-l-edit-btn flex align-center justify-end">
- <el-button @click="perExperience = false" style="width: 100px"
- type="Info">取消</el-button>
- <el-button @click="editIntePer()" style="
- width: 100px;
- margin-left: 30px;
- " type="primary">保存</el-button>
- </div>
- </el-form-item>
- </el-form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- 求职岗位选择 -->
- <el-dialog @close="type = false" class="workDialog" :draggable="true" destroy-on-close align-center center
- v-model="workDialog" title="工作地址">
- <template #header>
- <div class="my-header flex align-center">
- <div class="my-header-title" style="font-weight: bold">
- 求职岗位
- </div>
- <div class="my-header-title" style="margin-left: 40px">
- <el-autocomplete style="width: 300px" prefix-icon="Search" v-model="workSearch"
- :fetch-suggestions="querySearchAsync" placeholder="请输入岗位名称" @select="handleSelect" />
- </div>
- </div>
- </template>
- <div class="work flex align-center">
- <div class="work-left flex align-center justify-center">
- <div class="work-left-box">
- <ul class="work-left-box-list" style="overflow: auto">
- <li @click="workCurrent = index" :class="workCurrent == index ? 'workActive' : ''
- " v-for="(item, index) in workTypeList" :key="index"
- class="work-left-box-list-item flex align-center justify-center">
- <div class="work-left-box-list-items">
- {{ item.ruleClassifyName }}
- </div>
- </li>
- </ul>
- </div>
- </div>
- <div class="work-right flex align-center justify-center">
- <div class="work-right-box">
- <div class="work-right-box-item" v-for="(item, index) in rightList" :key="index">
- <div class="work-right-box-item-title">
- {{ item.title }}
- </div>
- <div class="work-right-box-item-name flex align-center flex-wrap">
- <div @click="selectJob(ite)" class="work-right-box-item-names"
- v-for="(ite, ind) in item.childrens">
- {{ ite.ruleClassifyName }}
- </div>
- </div>
- </div>
- <el-empty v-if="rightList.length == 0" description="暂无岗位" />
- </div>
- </div>
- </div>
- </el-dialog>
- <!-- 城市选择 -->
- <el-dialog @close="type = false" :draggable="true" destroy-on-close align-center center v-model="cityDialog"
- title="工作地址">
- <template #header>
- <div class="my-header flex align-center">
- <div class="my-header-title" style="font-weight: bold">
- 工作地址
- </div>
- <div class="my-header-title flex" style="margin-left: 40px; width: 300px">
- <el-input v-model="search" prefix-icon="Search" size="default" placeholder="请输入城市名称"
- class="input-with-select" @input="handleSearch" />
- <el-button @click="handleSearch" style="margin-left: 10px" type="primary">搜索</el-button>
- </div>
- </div>
- </template>
- <div class="city flex align-center justify-center">
- <div class="city-box">
- <div class="city-box-city">
- <div class="city-box-cityt flex align-center justify-between">
- 定位城市
- <div @click="getLocation()" class="city-box-cityt-r flex align-center">
- <el-icon size="18">
- <Location />
- </el-icon>
- 重新定位
- </div>
- </div>
- <div @click="selectCity(city)" class="city-box-citys">
- {{ city }}
- </div>
- </div>
- <div class="city-box-list">
- <ul class="city-box-lists" style="overflow: auto">
- <li class="city-box-lists-title">热门城市</li>
- <li class="city-box-lists-title-cs flex align-center flex-wrap">
- <div @click="selectCity(item)" class="city-box-lists-title-css"
- v-for="(item, index) in rmCity" :key="index">
- {{ item }}
- </div>
- </li>
- <li v-for="(item, index) in cityList" :key="index" class="city-box-lists-item">
- <div v-if="item.city.length > 0">
- <div class="city-box-lists-item-title">
- {{ item.letter.toUpperCase() }}
- </div>
- <div class="flex align-center flex-wrap">
- <div class="city-box-lists-item-titles flex align-center"
- v-for="(ite, ind) in item.city" :key="ind">
- <div @click="selectCity(ite)">
- {{ ite }}
- </div>
- </div>
- </div>
- </div>
- </li>
- </ul>
- </div>
- <el-empty v-if="cityList.length == 0" description="暂无城市" />
- </div>
- </div>
- </el-dialog>
- <!-- 从事方向选择 -->
- <el-dialog class="workDialog" @close="type = false" :draggable="true" destroy-on-close align-center center
- v-model="industryDialog" title="选择从事方向">
- <template #header>
- <div class="my-header flex align-center">
- <div class="my-header-title" style="font-weight: bold">
- 选择从事方向
- </div>
- <div class="my-header-title flex align-center" style="margin-left: 40px; width: 600px">
- <el-select @remove-tag="removeTag" :collapse-tags="true" :max-collapse-tags="2"
- class="my-header-title-se" multiple-limit="5" v-model="industryArr" multiple
- placeholder="请选择从事方向">
- <el-option v-for="item in industryArrList" :key="item.postSkillName"
- :label="item.postSkillName" :value="item.postSkillName" />
- </el-select>
- <span style="
- margin-left: 10px;
- font-size: 13px;
- color: #999999;
- ">{{ industryArr.length }}</span>
- <el-button @click="addHangye()" style="margin-left: 10px" type="primary">确定</el-button>
- </div>
- </div>
- </template>
- <div class="preference-grid">
- <div v-for="(parent, pIndex) in industryList" :key="pIndex" class="preference-group">
- <!-- 一级标题 -->
- <div class="preference-title">
- <span>{{ parent.postSkillName }}</span>
- </div>
- <!-- 二级可选项 -->
- <div class="preference-children">
- <div v-for="(child, cIndex) in parent.childrenList" :key="cIndex" class="preference-tag"
- :class="{ active: industryArr.includes(child.postSkillName) }"
- @click="togglePreference(pIndex,child.postSkillName)">
- <span>{{ child.postSkillName }}</span>
- </div>
- </div>
- </div>
- <el-empty v-if="industryList.length == 0" description="暂无从事方向" />
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import axios from 'axios';
- import jsonp from 'axios-jsonp';
- import cityJs from '../../publicJs/city.js';
- import citySelect from '../../publicJs/citySelect.js';
- import { ElMessageBox, ElMessage } from 'element-plus';
- import { ROOTPATH } from '../../../comment/httpUrl.js';
- import UploadResume from "../../components/UploadResume/UploadResume.vue";
- export default {
- components: { UploadResume },
- data() {
- return {
- resumeFiles: [],
- cityAll: cityJs, //城市数据
- action: ROOTPATH + '/alioss/upload', //上传图片地址
- industryDialog: false, //是否打开行业选择
- workDialog: false, //是否打开岗位选择
- cityDialog: false, //是否打开城市选择弹窗
- loading: false, //设置加载中
- isWork: false, // 防止重复提交
- gangweiEdit: false,
- current: 1,
- sexList: [
- {
- name: '男',
- id: 1
- },
- {
- name: '女',
- id: 2
- }
- ],
- userInfoEdit: false,
- form: {
- resumesName: '', //姓名
- resumesSex: 1, //性别
- graduationTime: '', //毕业时间
- resumesAge: 18, //年龄
- resumesPhone: '', //手机号
- resumesEducation: '', //学历
- resumesMarriage: '', //婚姻状态
- major: '', //专业
- school: '', //学校
- resumesWorkExperience: '', //工作经验
- resumesEmail: '', //电子邮箱
- resumesCompensation: '', //期望薪资
- industryName: '', //行业
- city: '', //意向城市
- resumesPost: '', //求职岗位
- ruleClassifyId: '', //岗位id
- resumesWorkList: [], //项目经验
- resumesCompanyList: [] //工作经历
- },
- workObj: {
- //工作经历
- resumesTitle: '', //公司名称
- resumesTime: [], //时间
- resumesContent: '', //工作内容
- resumesClassify: 1, //状态
- // 添加新的字段以支持新的数据结构
- workExpId: '',
- workExpDetailId: '',
- companyName: '', // 公司名称
- position: '', // 岗位
- positionId: 0,
- startTime: '', // 开始时间
- endTime: '', // 结束时间
- department: '',
- departmentId: 0,
- positionLevel: '初级', // 默认初级
- workPerformance: '', // 工作业绩
- skills: '[]', // 技能,格式为JSON字符串
- businessType: [], // 公司业务类型
- positionSkills: [], // 岗位职业技能,格式为数组
- selectedJobPost: '' // 选择的工作职位
- },
- // 与app端一致的业务类型选项
- businessTypeOptions: [
- { label: '跨境电商', value: '0' },
- { label: '国内电商', value: '1' },
- { label: '外贸', value: '2' },
- { label: '其他', value: '3' }
- ],
- // 与app端一致的岗位职级选项
- positionLevels: ['初级', '资深'],
- // 学历选项
- degreeOptions: ['初中', '高中', '中专', '大专', '本科', '硕士', '博士', '博士后'],
- forWorkExp: false, // 是否为工作经历选择数据
- perjectObj: {
- //项目经验
- resumesTitle: '', //公司名称
- resumesTime: [], //时间
- resumesPost: '', //岗位
- resumesContent: '', //工作内容
- resumesClassify: 2 //状态
- },
- qiuzhiStatus: [
- {
- value: 0,
- label: '离职-随时到岗'
- },
- {
- value: 1,
- label: '在职-月内到岗'
- },
- {
- value: 2,
- label: '在职-考虑机会'
- },
- {
- value: 3,
- label: '在职-暂不考虑'
- }
- ], //求职状态
- workStatus: [], //工作性质
- deliveryCount: 0, //投递记录
- browseCount: 0, //浏览记录
- collectionCount: 0, //我的收藏
- nickName: '',
- avatar: '',
- userType: 1, // 1:用户 2:企业
- resumesStatus: 1, //求职状态
- resumeInfo: {}, //简历信息
- userEntity: {}, //用户实体信息
- resumesId: '', //简历id
- screenHeight: 0, //屏幕高度
- jobTypeList: [], //求职意向
- cityList: [], //城市列表
- departments: [], // 部门列表
- intentionJob: {
- ruleClassifyId: '', //岗位id
- ruleClassifyName: '', //岗位名称
- citys: '', //工作城市
- salaryRange: '', //薪资范围
- industry: '', //行业
- postType: '', //工作性质
- isDefault: 0,//是否是第一意向
- minSalary: '',
- maxSalary: ''
- }, //求职意向
- desireSalary: [], //期望薪资
- intentionId: '', //求职意向id
- search: '', //城市搜索内容
- latitude: '',
- longitude: '',
- city: '', //定位城市
- rmCity: [], //热门城市列表
- workTypeList: [], //岗位类型
- workCurrent: 0,
- workSearch: '', //岗位搜索
- industryArr: [], //选择的行业数组
- industryArrList: [], //可选择的行业列表
- industryList: [], //行业列表
- type: false, //简历还是求职意向的 true:简历 false:求职意向
- workExperience: false, //是否显示工作经历添加或者修改
- perExperience: false, //是否显示项目经验添加或者修改
- workIndex: -1, //记录修改工作经历/工作经验的index值
- userInfoEdit: false, //个人信息编辑状态
- // 工作经历相关数据,定义为响应式属性
- workExps: [], // 工作经历列表
- workExpList: [],// 工作经历详细信息列表
- eduList: [], // 教育经历列表
- };
- },
- created() {
- for (let i = 5000; i <= 50000; i += 1000) {
- this.desireSalary.push({ value: i.toString(), label: i.toString() })
- }
- },
- computed: {
- rightList() {
- return this.workTypeList.length > 0
- ? this.workTypeList[this.workCurrent].childrens
- : [];
- },
- isVip() {
- return this.$store.state.isVip;
- }
- },
- mounted() {
- if (this.$route.query.isExpand === '1') {
- this.gangweiEdit = true
- }
- this.screenHeight = window.innerHeight;
- this.token = localStorage.getItem('token');
- if (this.token) {
- this.getUserData();
- this.getUserInfo();
- this.getJlInfo();
- this.getJobType();
- this.getPostType();
- this.getDepartment(); // 获取部门列表
- this.getJobList();
- }
- },
- watch: {
- //监听行业选择变化
- industryArr: {
- handler(newItems) {
- this.industryArr.map(item => {
- this.industryList.map(ite => {
- ite.childrenList.map(it => {
- if (item == it.industryName) {
- it.select = true;
- }
- });
- });
- });
- },
- deep: true
- },
- // 监听教育经历变化,自动更新最高学历信息
- eduList: {
- handler(newList) {
- // 获取最高学历的学校和专业
- const highestEdu = this.getHighestEducation();
- this.form.school = highestEdu.school;
- this.form.major = highestEdu.major;
- this.form.resumesEducation = highestEdu.degree;
- },
- deep: true
- },
- 'intentionJob.minSalary'(val) {
- this.updateSalaryRange()
- },
- 'intentionJob.maxSalary'(val) {
- this.updateSalaryRange()
- }
- },
- methods: {
- // 是否屏蔽该公司
- changeIsDisplay(item) {
- console.log(item)
- let data = {
- workExp: {
- isShield: item.isShield,
- workExpId: item.workExpId
- }
- }
- this.$Request.post("/app/userFirst/addWorkExp", data, { type: 'json' }).then((res) => {
- if (res.code == 0) {
- ElMessage({
- message: '修改成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- updateSalaryRange() {
- const { minSalary, maxSalary } = this.intentionJob
- if (minSalary && maxSalary && Number(maxSalary) > Number(minSalary)) {
- this.intentionJob.salaryRange = `${minSalary}-${maxSalary}`
- } else {
- this.intentionJob.salaryRange = ''
- }
- },
- handleChange(list) {
- console.log("当前上传的简历文件列表:", list);
- },
- querySearch(queryString, cb) {
- const results = queryString
- ? this.cityAll.filter(city =>
- city.label
- .toLowerCase()
- .includes(queryString.toLowerCase())
- )
- : '';
- // call callback function to return suggestions
- cb(results);
- },
- //去面试记录页面
- goInterview(index) {
- this.$router.push({
- name: 'interview',
- query: { index }
- });
- },
- //上传头像成功后的回调
- handleAvatarSuccess(res) {
- this.avatar = res.data;
- let that = this;
- that.$Request
- .post(
- '/app/user/updateUser',
- { avatar: that.avatar },
- { type: 'json' }
- )
- .then(res => {
- if (res.code === 0) {
- ElMessage({
- message: '上传成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- that.getUserInfo();
- } else {
- this.avatar = '';
- ElMessage({
- message: res.msg,
- type: 'info',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- //隐藏表单
- hideFrom(name) {
- //传递哪个哪个就打开,剩下的全部关闭
- let arr = [
- 'gangweiEdit',
- 'userInfoEdit',
- 'workExperience',
- 'perExperience'
- ];
- arr.map(item => {
- if (item == name) {
- this[item] = true;
- // 如果是添加教育经历,初始化教育经历编辑表单
- if (item == 'perExperience' && this.workIndex == -1) {
- this.perjectObj = {
- //教育经历
- resumesTitle: '', //学校名称
- resumesTime: [], //时间
- resumesPost: '', //专业
- resumesContent: '', //详细描述
- degree: '', //学历
- resumesClassify: 2, //状态
- // 添加新的字段以支持新的数据结构
- eduId: '',
- school: '', // 学校名称
- profession: '', // 专业
- startTime: '', // 开始时间
- endTime: '', // 结束时间
- detail: '', // 详细描述
- isUse: 1
- };
- }
- // 如果是添加工作经历,初始化工作经历编辑表单
- if (item == 'workExperience' && this.workIndex == -1) {
- this.workObj = {
- //工作经历
- resumesTitle: '', //公司名称
- resumesTime: [], //时间
- resumesPost: '', //岗位
- resumesContent: '', //工作内容
- resumesClassify: 1, //状态
- // 添加新的字段以支持新的数据结构
- workExpId: '',
- workExpDetailId: '',
- companyName: '', // 公司名称
- position: '', // 岗位
- positionId: 0,
- startTime: '', // 开始时间
- endTime: '', // 结束时间
- department: '',
- departmentId: '',
- positionLevel: '初级', // 默认初级
- workPerformance: '', // 工作业绩
- skills: '[]', // 技能,格式为JSON字符串
- businessType: [], // 公司业务类型
- positionSkills: [], // 岗位职业技能,格式为数组
- selectedJobPost: '', // 选择的工作职位
- ruleClassifyId: 0 // 工作职位ID
- };
- }
- // 如果是个人信息编辑模式,从新的数据结构中同步简历信息到form
- if (item == 'userInfoEdit') {
- // 首先从userEntity中获取基本用户信息
- if (this.userEntity) {
- this.form.resumesName =
- this.userEntity.userName || '';
- this.form.resumesAge = this.userEntity.age || '';
- this.form.resumesSex = this.userEntity.sex || 1;
- this.form.resumesPhone =
- this.userEntity.phone || '';
- // 更新性别选择的当前值
- this.current = this.userEntity.sex || 1;
- }
- // 然后从resumeList中获取其他简历信息
- if (this.resumeInfo && this.resumeInfo.resumeList) {
- const resumeData = this.resumeInfo.resumeList;
- this.form.resumesMarriage =
- resumeData.resumesMarriage || '';
- this.form.address = resumeData.address || '';
- this.form.graduationTime =
- resumeData.graduationTime || '';
- this.form.school = resumeData.school || '';
- this.form.major = resumeData.major || '';
- this.form.resumesWorkExperience =
- resumeData.resumesWorkExperience || '';
- this.form.resumesEmail =
- resumeData.resumesEmail || '';
- this.form.resumesStatus =
- resumeData.resumesStatus || 0;
- this.form.resumesCompensation =
- resumeData.resumesCompensation || '';
- this.form.city = resumeData.city || '';
- // this.form.birthday = resumeData.birthday || '';
- // this.form.resumesAttachment =
- // resumeData.resumesAttachment || '';
- // this.form.resumesImage =
- // resumeData.resumesImage || '';
- // this.form.resumesImageName =
- // resumeData.resumesImageName || '';
- this.resumesStatus = resumeData.resumesStatus;
- this.resumesId = resumeData.resumesId;
- }
- }
- } else {
- this[item] = false;
- }
- });
- },
- //保存教育经历
- editIntePer() {
- let formRef = this.$refs.formRefperject;
- formRef.validate(valid => {
- if (valid) {
- this.loading = true;
- // 构建新的数据结构用于保存
- let eduData = {
- eduId: this.perjectObj.eduId || '',
- school: this.perjectObj.resumesTitle || '', // 学校名称
- profession: this.perjectObj.resumesPost || '', // 专业
- degree: this.perjectObj.degree || '', // 学历
- startTime: this.getFormDate(
- this.perjectObj.resumesTime[0]
- ), // 开始时间
- endTime: this.getFormDate(
- this.perjectObj.resumesTime[1]
- ), // 结束时间
- detail: this.perjectObj.resumesContent || '', // 详细描述
- };
- // 调用保存API
- let apiUrl = '/app/userFirst/addEdu';
- this.$Request.post(apiUrl, eduData,{type:'json'}).then(res => {
- if (res.code == 0) {
- ElMessage({
- message: '保存成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- // 重置表单
- this.perjectObj = {
- //教育经历
- resumesTitle: '', //学校名称
- resumesTime: [], //时间
- resumesPost: '', //专业
- resumesContent: '', //详细描述
- degree: '', //学历
- resumesClassify: 2 //状态
- };
- // 重新获取最新的数据
- this.getUserInfo();
- this.getJlInfo();
- this.loading = false;
- this.perExperience = false;
- } else {
- this.loading = false;
- ElMessageBox.alert(res.msg, '提示', {
- confirmButtonText: '确认'
- });
- }
- });
- this.workIndex = -1;
- } else {
- console.log('error submit!');
- return false;
- }
- });
- },
- //编辑教育经历
- editPerHis(item, index) {
- this.workIndex = index;
- // 从eduList数组获取数据并转换为编辑表单需要的格式
- let edu = JSON.parse(JSON.stringify(item));
- // 构建编辑表单需要的数据结构
- this.perjectObj = {
- // 保留原有的resumesTitle字段用于向后兼容,这里存储学校名称
- resumesTitle: edu.school || '',
- // 保留原有的resumesPost字段用于向后兼容,这里存储专业和学历
- resumesPost: edu.profession || '',
- // 保留原有的resumesContent字段用于向后兼容,这里存储详细描述
- resumesContent: edu.detail || '',
- // 设置时间范围
- resumesTime: [
- edu.startTime ? new Date(edu.startTime) : '',
- edu.endTime ? new Date(edu.endTime) : ''
- ],
- // 保存实际的eduId用于更新
- eduId: edu.eduId,
- // 保存学历信息
- degree: edu.degree || ''
- };
- this.hideFrom('perExperience');
- },
- //删除教育经历
- deletePerHis(item, index) {
- ElMessageBox.alert('确认删除此段教育经历吗?', '提示', {
- confirmButtonText: '确认',
- showCancelButton: true,
- callback: res => {
- if (res == 'confirm') {
- //确认
- this.loading = true;
- let eduId = item.eduId;
- // 调用删除API
- this.$Request
- .post('/app/userFirst/deleteEdu', {eduId: eduId},{type:'json'})
- .then(res => {
- if (res.code == 0) {
- ElMessage({
- message: '已删除',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- // 重新获取最新的数据
- this.getUserInfo();
- this.getJlInfo();
- this.loading = false;
- } else {
- this.loading = false;
- ElMessageBox.alert(res.msg, '提示', {
- confirmButtonText: '确认'
- });
- }
- });
- }
- }
- });
- },
- //编辑工作经历
- editWorkHis(item, index) {
- this.workIndex = index;
- // 从workExps数组获取数据
- let workExp = JSON.parse(JSON.stringify(item));
-
- // 先设置基本的workObj,主要是workExpId
- this.workObj = {
- workExpId: workExp.workExpId,
- businessType: workExp.businessType || []
- };
-
- // 调用getDepartment获取部门列表,在获取成功后会自动调用getData获取详细数据
- this.getDepartment();
-
- this.hideFrom('workExperience');
- },
- //删除工作经历
- deleteWorkHis(item, index) {
- ElMessageBox.confirm('确认删除该条内容么?', '提示', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- // 确认删除
- this.loading = true;
- let action = 'userFirst/deleteWorkExp';
- let params = {
- workExpId: item.workExpId
- };
- this.$Request.post("/app/" + action, params,{type:'json'}).then((res) => {
- this.loading = false;
- if (res.code == 0) {
- ElMessage({
- message: '已删除',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- // 直接在本地数组中过滤掉删除的项,与app端逻辑一致
- this.workExps = this.workExps.filter(function(workItem) {
- return workItem.workExpId != item.workExpId;
- });
- // 同时过滤workExpList数组中对应的详细信息,确保页面正确渲染
- this.workExpList = this.workExpList.filter(function(detailItem) {
- return detailItem.workExpId != item.workExpId;
- });
- } else {
- ElMessage({
- message: res.msg,
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- }).catch(() => {
- this.loading = false;
- // 用户取消删除
- });
- });
- },
- //时间对象转:2023-11-21格式
- getFormDate(formData) {
- let time = new Date(formData);
- return (
- time.getFullYear() +
- '-' +
- (time.getMonth() + 1 < 10
- ? '0' + (time.getMonth() + 1)
- : time.getMonth() + 1) +
- '-' +
- (time.getDate() < 10 ? '0' + time.getDate() : time.getDate())
- );
- },
- //修改/添加工作经验
- editInteWork() {
- // 防止重复提交
- if (this.isWork) {
- return;
- }
- let formRef = this.$refs.formRefWork;
- formRef.validate(valid => {
- if (valid) {
- this.isWork = true;
- this.loading = true;
- console.log(this.workObj)
- // 构建与app端一致的数据结构用于保存
- let workExpDetailData = {
- workExpDetailId: this.workObj.workExpDetailId || '',
- workExpId: this.workObj.workExpId || '',
- department: this.workObj.department || '',
- departmentId: this.workObj.departmentId || 0,
- positionLevel: this.workObj.positionLevel || '',
- position: this.workObj.selectedJobPost || '',
- positionId: this.workObj.ruleClassifyId || 0,
- workContent: this.workObj.resumesContent || '', // 工作内容
- workPerformance: this.workObj.workPerformance || '', // 工作业绩
- skills: typeof this.workObj.positionSkills === 'string' ? this.workObj.positionSkills : JSON.stringify(this.workObj.positionSkills), // 技能,格式为JSON字符串,使用positionSkills字段的值
- startTime: this.getFormDate(this.workObj.resumesTime[0]), // 开始时间
- endTime: this.getFormDate(this.workObj.resumesTime[1]), // 结束时间
- };
- let workExpData = {
- workExp: {
- workExpId: this.workObj.workExpId || '',
- companyName: this.workObj.resumesTitle || '', // 公司名称
- type: JSON.stringify(this.workObj.businessType || []), // 公司业务类型
- },
- workExpDetails: [workExpDetailData]
- };
- console.log(workExpDetailData)
- let apiUrl = '/app/userFirst/addWorkExp';
- this.$Request.post(apiUrl, workExpData,{type:'json'}).then(res => {
- this.isWork = false;
- this.loading = false;
-
- if (res.code == 0) {
- ElMessage({
- message: '保存成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- // 重置表单
- this.workObj = {
- //工作经历
- resumesTitle: '', //公司名称
- resumesTime: [], //时间
- resumesPost: '', //岗位
- resumesContent: '', //工作内容
- resumesClassify: 1, //状态
- // 添加新的字段以支持新的数据结构
- workExpId: '',
- workExpDetailId: '',
- companyName: '', // 公司名称
- position: '', // 岗位
- positionId: 0,
- startTime: '', // 开始时间
- endTime: '', // 结束时间
- department: '',
- departmentId: 0,
- positionLevel: '初级',
- workPerformance: '', // 工作业绩
- skills: '[]', // 技能,格式为JSON字符串
- businessType: [], // 公司业务类型
- positionSkills: [], // 岗位职业技能,格式为数组
- selectedJobPost: '', // 选择的工作职位
- ruleClassifyId: 0 // 工作职位ID
- };
- // 重新获取最新的数据
- this.getUserInfo();
- this.getJlInfo();
- this.workExperience = false;
- } else {
- ElMessage({
- message: res.msg || '保存失败',
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- }).catch(() => {
- this.isWork = false;
- this.loading = false;
- });
- this.workIndex = -1;
- } else {
- console.log('error submit!');
- return false;
- }
- });
- },
- removeTag(e) {
- console.log(e, '2222222');
- this.industryList.map(item => {
- if (item.childrenList.length > 0) {
- item.childrenList.map(ite => {
- if (ite.industryName == e) {
- ite.select = false;
- }
- });
- }
- });
- console.log(this.industryList, '111111111');
- console.log(this.industryArr, '已出tag');
- },
- // 分割时间
- splitTime(time) {
- // 使用字符串的 split() 方法将时间分割为数组
- return time ? time.split(/ - /) : [];
- },
- //确认行业/岗位职业技能
- addHangye() {
- if (this.forWorkExp) {
- // 为工作经历设置岗位职业技能
- this.workObj.positionSkills = this.industryArr;
- } else if (this.type) {
- // 为表单设置行业
- this.form.industryName = this.industryArr.join('/');
- } else {
- // 为求职意向设置行业
- this.intentionJob.industry = this.industryArr.join('/');
- }
- this.industryDialog = false;
- },
- //打开行业选择弹框(用于求职意向)
- openIndustry(type) {
- this.type = type;
- this.forWorkExp = false; // 标志是求职意向使用
-
- // 检查是否已选择工作职位
- let ruleClassifyId = this.type ? this.form.ruleClassifyId : this.intentionJob.ruleClassifyId;
-
- if (!ruleClassifyId) {
- ElMessage({
- message: '请先选择工作职位',
- type: 'warning',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- return;
- }
-
- this.industryArr = [];
- this.getIndustryList();
- },
-
- // 为工作经历打开工作职位选择
- openDialogForWorkExp() {
- this.forWorkExp = true;
- this.workDialog = true;
- },
-
- // 为工作经历打开岗位职业技能选择
- openIndustryForWorkExp() {
- this.forWorkExp = true;
-
- // 检查是否已选择工作职位
- if (!this.workObj.selectedJobPost || !this.workObj.ruleClassifyId) {
- ElMessage({
- message: '请先选择工作职位',
- type: 'warning',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- return;
- }
-
- this.industryArr = [];
- this.getIndustryListForWorkExp();
- },
-
- /**
- * 获取工作经历的岗位职业技能数据
- */
- getIndustryListForWorkExp() {
- let data = {
- ruleClassifyId: this.workObj.ruleClassifyId
- };
-
- this.$Request.get('/app/userFirst/getPostSkill', { params: data }).then(res => {
- if (res.code == 0) {
- // 处理返回的层级数据
- this.industryList = res.data;
-
- // 构建可选择的行业列表(扁平化)
- let flatList = [];
- this.industryList.forEach(parent => {
- parent.childrenList.forEach(child => {
- flatList.push(child);
- });
- });
- this.industryArrList = flatList;
-
- this.industryDialog = true;
- } else {
- ElMessage({
- message: res.msg,
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- // 切换从事方向选择状态
- // togglePreference(a,skillName) {
- // // 查找索引
- // const index = this.industryArr.indexOf(skillName);
-
- // if (index > -1) {
- // // 如果已选择,则取消选择
- // this.industryArr.splice(index, 1);
- // } else {
- // // 如果未选择,检查是否达到选择上限
- // if (this.industryArr.length >= 5) {
- // ElMessage({
- // message: '最多添加五条',
- // type: 'info',
- // duration: 1500,
- // offset: this.screenHeight / 2
- // });
- // return;
- // }
- // // 添加选择
- // this.industryArr.push(skillName);
- // }
- // },
- // 切换从事方向选择状态
- togglePreference(pIndex, skillName) {
- const parent = this.industryList[pIndex]; // 当前分类
- console.log(parent)
- console.log(this.industryArr)
- const selectedInGroup = parent.childrenList.filter(item =>
- this.industryArr.includes(item.postSkillName)
- );
- const index = this.industryArr.indexOf(skillName);
- if (index > -1) {
- // 取消选择
- this.industryArr.splice(index, 1);
- } else {
- // 检查当前分类是否已选满 5 个
- if (selectedInGroup.length >= 5) {
- ElMessage({
- message: '每个分类最多选择五个',
- type: 'info',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- return;
- }
- // 添加选择
- this.industryArr.push(skillName);
- }
- },
-
- // 添加行业
- addIndustry(ite) {
- if (ite.select == false) {
- if (this.industryArr.length == 5) {
- ElMessage({
- message: '最多添加五条',
- type: 'info',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- return;
- }
- this.industryArr.push(ite.industryName);
- } else {
- console.log('ccccccccccc');
- this.industryArr.splice(
- this.industryArr.indexOf(ite.industryName),
- 1
- );
- }
- ite.select = !ite.select;
- },
- /**
- * 获取行业数据(从事方向)
- */
- getIndustryList() {
- // 获取当前选择的工作职位ID
- let ruleClassifyId = this.type ? this.form.ruleClassifyId : this.intentionJob.ruleClassifyId;
-
- let data = {
- ruleClassifyId: ruleClassifyId
- };
-
- this.$Request.get('/app/userFirst/getPostSkill', { params: data }).then(res => {
- if (res.code == 0) {
- // 处理返回的层级数据
- this.industryList = res.data;
-
- // 构建可选择的行业列表(扁平化)
- let flatList = [];
- this.industryList.forEach(parent => {
- parent.childrenList.forEach(child => {
- flatList.push(child);
- });
- });
- this.industryArrList = flatList;
-
- this.industryDialog = true;
- } else {
- ElMessage({
- message: res.msg,
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- //选择岗位
- handleSelect(item) {
- if (this.forWorkExp) {
- // 为工作经历选择
- this.workObj.ruleClassifyId = item.ruleClassifyId; //岗位分类id
- this.workObj.selectedJobPost = item.ruleClassifyName; //岗位分类名称
- } else if (this.type) {
- // 为表单选择
- this.form.ruleClassifyId = item.ruleClassifyId; //岗位分类id
- this.form.resumesPost = item.ruleClassifyName; //岗位分类名称
- } else {
- // 为求职意向选择
- this.intentionJob.ruleClassifyId = item.ruleClassifyId; //岗位分类id
- this.intentionJob.ruleClassifyName = item.ruleClassifyName; //岗位分类名称
- }
- this.workDialog = false;
- },
- // 岗位的搜索
- querySearchAsync(queryString, cd) {
- if (!queryString) {
- cd([]);
- return;
- }
- let data = {
- ruleClassifyName: queryString
- };
- this.$Request
- .get('/app/rule/userGetClassify', { params: data })
- .then(res => {
- if (res.code == 0) {
- let arr = res.data;
- arr.map(item => {
- item.value = item.ruleClassifyName;
- });
- cd(arr);
- }
- });
- },
- //打开岗位选择
- openDialog(type) {
- this.type = type;
- this.workSearch = '';
- this.workDialog = true;
- },
- /**
- * @param {Object} info
- * 选择岗位并返回
- */
- selectJob(info) {
- if (this.forWorkExp) {
- // 工作经历模块
- this.workObj.ruleClassifyId = info.ruleClassifyId; //岗位分类id
- this.workObj.selectedJobPost = info.ruleClassifyName; //岗位分类名称
- } else if (this.type) {
- // 表单模块
- this.form.ruleClassifyId = info.ruleClassifyId; //岗位分类id
- this.form.resumesPost = info.ruleClassifyName; //岗位分类名称
- } else {
- // 求职意向模块
- this.intentionJob.ruleClassifyId = info.ruleClassifyId; //岗位分类id
- this.intentionJob.ruleClassifyName = info.ruleClassifyName; //岗位分类名称
- }
- this.workDialog = false;
- this.forWorkExp = false; // 重置标志位
- },
- /**
- * 获取岗位列表
- */
- getJobList() {
- this.$Request.get('/app/rule/getClassifyList').then(res => {
- if (res.code == 0) {
- if (res.data) {
- this.workTypeList = res.data;
- }
- }
- });
- },
- //打开城市选择
- openCityDialog(type) {
- this.type = type;
- this.search = '';
- this.getCitysList();
- this.getLocation();
- this.getRmCityList();
- this.cityDialog = true;
- },
- //选择城市
- selectCity(city) {
- if (this.type) {
- this.form.city = city;
- } else {
- this.intentionJob.citys = city;
- }
- this.cityDialog = false;
- },
- /**
- * 热门城市列表
- */
- getRmCityList() {
- let data = {
- limitCount: 10
- };
- this.$Request
- .get('/app/postPush/getHotCity', { params: data })
- .then(res => {
- if (res.code == 0) {
- this.rmCity = res.data;
- }
- });
- },
- /**
- * @param {Object} longitude
- * @param {Object} latitude
- * 使用经纬度获取城市
- */
- getSelectCity(longitude, latitude) {
- let data = {
- lat: latitude,
- lng: longitude
- };
- this.$Request
- .get('/app/Login/selectCity', { params: data })
- .then(res => {
- if (res.code == 0) {
- this.city = res.data.city ? res.data.city : '未知';
- }
- });
- },
- //使用jsonp请求从腾讯地图获取经纬度
- getLocation() {
- let data = {
- key: 'ZBABZ-ZWECU-UQTVV-4LYDR-COK3F-5SF75', //申请的密钥
- output: 'jsonp'
- };
- let url = 'https://apis.map.qq.com/ws/location/v1/ip';
- axios
- .get(url, {
- params: data,
- adapter: jsonp
- })
- .then(res => {
- this.longitude = res.data.result.location.lng;
- this.latitude = res.data.result.location.lat;
- this.getSelectCity(this.longitude, this.latitude);
- })
- .catch(err => {
- console.log(err);
- });
- },
- //删除求职意向
- deleteInteJob() {
- ElMessageBox.alert('确认删除此求职意向吗?', '提示', {
- confirmButtonText: '确认',
- showCancelButton: true,
- callback: res => {
- if (res == 'confirm') {
- //确认
- this.loading = true;
- this.$Request
- .post(
- '/app/intention/deleteIntention',
- { intentionId: this.intentionId },
- { type: 'json' }
- )
- .then(res => {
- if (res.code == 0) {
- ElMessage({
- message: '删除成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- this.loading = false;
- this.gangweiEdit = false;
- this.getJobType();
- } else {
- this.loading = false;
- ElMessageBox.alert(res.msg, '提示', {
- confirmButtonText: '确认'
- });
- }
- });
- }
- }
- });
- },
- //修改求职意向
- editInteJob() {
- let formRef = this.$refs.formRef;
- formRef.validate(valid => {
- if (valid) {
- // 防止重复提交
- if (this.isWork) return;
- this.isWork = true;
-
- this.loading = true;
-
- // 构建与app端一致的数据结构
- let data = {
- intentionId: this.intentionId || '',
- ruleClassifyId: this.intentionJob.ruleClassifyId,
- ruleClassifyName: this.intentionJob.ruleClassifyName,
- citys: this.intentionJob.citys,
- salaryRange: this.intentionJob.salaryRange,
- postType: this.intentionJob.postType,
- industry: this.intentionJob.industry,
- createTime: "",
- industryId: 201,
- industryOneId: 200,
- classifyOneId: 0,
- classifyTwoId: 0,
- isDefault: 1
- };
- this.$Request.post("/app/intention/saveUpdate", data,{type:'json'}).then((res) => {
- this.isWork = false;
- this.loading = false;
-
- if (res.code == 0) {
- ElMessage({
- message: '保存成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
-
- // 关闭编辑弹窗
- this.gangweiEdit = false;
-
- // 更新求职意向列表
- this.getJobType();
- }
- // else {
- // ElMessage({
- // message: res.msg,
- // type: 'error',
- // duration: 1500,
- // offset: this.screenHeight / 2
- // });
- // }
- });
- } else {
- console.log('error submit!');
- return false;
- }
- });
- },
- //新增求职意向
- addIntentionJob() {
- //关闭之前的表单
- this.intentionId = '';
- this.intentionJob = {
- ruleClassifyId: '', //岗位id
- ruleClassifyName: '', //岗位名称
- citys: '', //工作城市
- salaryRange: '', //薪资范围
- industry: '', //行业
- postType: '', //工作性质
- minSalary: '', //最小薪资
- maxSalary: '' //最大薪资
- };
- this.hideFrom('gangweiEdit');
- },
- //查询求职意向
- getInteJob(item) {
- this.intentionId = item.intentionId;
- let data = {
- intentionId: item.intentionId
- };
- console.log(data, '1111111');
- this.$Request
- .get('/app/intention/getIntentionInfo', { params: data })
- .then(res => {
- if (res.code == 0) {
- this.intentionJob.ruleClassifyId =
- res.data.ruleClassifyId; //岗位id
- this.intentionJob.ruleClassifyName =
- res.data.ruleClassifyName; //岗位名称
- this.intentionJob.citys = res.data.citys; //工作城市
-
- // 设置薪资范围,确保与desireSalary中的选项匹配
- // this.intentionJob.salaryRange = res.data.salaryRange; //薪资范围(数值格式)
- this.intentionJob.minSalary = res.data.minSalary; //最小薪资
- this.intentionJob.maxSalary = res.data.maxSalary; //最大薪资
- this.intentionJob.industry = res.data.industry; //行业
- this.intentionJob.postType = res.data.postType; //工作性质
- this.intentionJob.isDefault = res.data.isDefault; //是否第一求职意向
- //关闭之前的表单
- this.hideFrom('gangweiEdit');
- }
- });
- },
- /**
- * 获取城市列表
- */
- getCitysList(keyword = '') {
- const grouped = {};
- // 过滤:如果有关键字,就按城市名模糊匹配
- const filtered = keyword
- ? cityJs.filter(item => item.label.includes(keyword))
- : cityJs;
- filtered.forEach(item => {
- const letterObj = citySelect.getFirstLetter(item.label);
- const letter = letterObj.firstletter.toUpperCase();
- if (!grouped[letter]) grouped[letter] = [];
- grouped[letter].push(item.label);
- });
- const sortedLetters = Object.keys(grouped).sort();
- this.cityList = sortedLetters.map(letter => ({
- letter,
- city: grouped[letter]
- }));
- },
- // 搜索事件
- handleSearch() {
- this.getCitysList(this.search.trim());
- },
- //获取求职意向
- getJobType() {
- this.$Request.get('/app/intention/getIntentionList').then(res => {
- if (res.code == 0 && res.data.length > 0) {
- this.jobTypeList = res.data;
- }
- });
- },
- //保存个人信息
- saveResumesInfo() {
- let formResume = this.$refs.formResume;
- formResume.validate(valid => {
- if (valid) {
- // 额外的字段验证
- // if (!this.form.resumesName) {
- // ElMessage({
- // message: '用户名不能为空',
- // type: 'warning',
- // duration: 1500,
- // offset: this.screenHeight / 2
- // });
- // return;
- // } else if (!this.form.resumesPhone) {
- // ElMessage({
- // message: '联系电话不能为空',
- // type: 'warning',
- // duration: 1500,
- // offset: this.screenHeight / 2
- // });
- // return;
- // }
- if (!this.form.resumesAge) {
- ElMessage({
- message: '年龄不能为空',
- type: 'warning',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- return;
- }
- // else if (!this.form.resumesEmail) {
- // ElMessage({
- // message: '邮箱不能为空',
- // type: 'warning',
- // duration: 1500,
- // offset: this.screenHeight / 2
- // });
- // return;
- // }
-
- // 计算年龄
- // this.form.resumesAge = this.calculateAgeFromBirthday(this.form.birthday) || 0;
-
- let that = this;
- ElMessageBox.confirm('确定保存信息', '温馨提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- that.loading = true;
- // 先更新用户信息
- that.$Request.post("/app/user/updateUser", {
- userName: that.form.resumesName,
- avatar: that.userEntity.avatar || '',
- sex: that.form.resumesSex,
- age: that.form.resumesAge,
- phone: this.form.resumesPhone
- // weChatNum: that.form.weChatNum || ''
- },{type:'json'}).then(res => {
- if (res.code === 0) {
- // 用户信息更新成功后,更新简历信息
- that.setResume();
- } else {
- that.loading = false;
- ElMessage({
- message: res.msg,
- type: 'error',
- duration: 1500,
- offset: that.screenHeight / 2
- });
- }
- });
- }).catch(() => {
- // 取消保存
- });
- }
- });
- },
- // 设置简历信息
- setResume() {
- let data = {
- resumesStatus: this.form.resumesStatus,
- // resumesPhone: this.form.resumesPhone,
- // resumesAge: this.form.resumesAge,
- birthday: this.getBirthDateByAge(this.form.resumesAge),
- resumesEmail: this.form.resumesEmail,
- ifExp: this.form.resumesWorkExperience ? 1 : 0
- };
- this.$Request.post("/app/userFirst/regist", data,{type:'json'}).then((res) => {
- this.loading = false;
- if (res.code == 0) {
- ElMessage({
- message: '保存成功',
- type: 'success',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- // 更新用户信息和简历信息
- this.getUserInfo();
- this.getJlInfo();
- this.userInfoEdit = false;
- // 可以在这里添加跳转逻辑
- setTimeout(function() {
- // 实际开发中可以根据需要添加跳转
- }, 1000);
- } else {
- ElMessage({
- message: res.msg,
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- getBirthDateByAge(age) {
- const today = new Date()
- const birth = new Date(today.getFullYear() - age, today.getMonth(), today.getDate())
- const y = birth.getFullYear()
- const m = String(birth.getMonth() + 1).padStart(2, '0')
- const d = String(birth.getDate()).padStart(2, '0')
- return `${y}-${m}-${d}`
- },
- // 计算年龄
- // calculateAgeFromBirthday(birthday) {
- // if (!birthday) return 0;
- // let birthDate = new Date(birthday);
- // let nowDate = new Date();
- // let age = nowDate.getFullYear() - birthDate.getFullYear();
- // if (nowDate.getMonth() < birthDate.getMonth() || (nowDate.getMonth() === birthDate.getMonth() && nowDate.getDate() < birthDate.getDate())) {
- // age--;
- // }
- // return age;
- // },
- // 获取最高学历的学校和专业
- getHighestEducation() {
- if (!this.eduList || this.eduList.length === 0) {
- return { school: '', major: '', degree: '' };
- }
-
- // 学历排序优先级(从高到低)
- const degreePriority = {
- '博士': 6,
- '硕士': 5,
- '本科': 4,
- '大专': 3,
- '高中': 2,
- '初中': 1,
- '其他': 0
- };
-
- // 对学历列表进行排序
- const sortedEduList = [...this.eduList].sort((a, b) => {
- const priorityA = degreePriority[a.degree] || 0;
- const priorityB = degreePriority[b.degree] || 0;
-
- // 优先按学历等级排序
- if (priorityA !== priorityB) {
- return priorityB - priorityA;
- }
-
- // 学历等级相同时,按结束时间排序(最新的在前)
- const endTimeA = new Date(a.endTime || 0).getTime();
- const endTimeB = new Date(b.endTime || 0).getTime();
- return endTimeB - endTimeA;
- });
-
- // 返回最高学历的信息
- const highestEdu = sortedEduList[0];
- return {
- school: highestEdu.school || '',
- major: highestEdu.profession || '',
- degree: highestEdu.degree || ''
- };
- },
- //查询简历信息
- getJlInfo() {
- this.$Request.get('/app/userFirst/getUserResumes').then(res => {
- if (res.code == 0) {
- if (res.data) {
- console.log(res.data);
- // 保存完整数据
- this.resumeInfo = res.data;
- // 同步新结构的各个字段
- this.eduList = res.data.eduList || []; // 学历列表
- this.intentions = res.data.intentions || []; // 意向列表
- this.skills = res.data.skills || []; // 技能列表
- this.userEntity = res.data.userEntity || {}; // 用户信息
- // 工作经验详细列表,处理skills字段将JSON字符串转换为数组
- this.workExpList = (res.data.workExpList || []).map(workExp => {
- if (workExp.skills && typeof workExp.skills === 'string') {
- try {
- workExp.skills = JSON.parse(workExp.skills);
- } catch (e) {
- workExp.skills = [];
- }
- } else if (!Array.isArray(workExp.skills)) {
- workExp.skills = [];
- }
- return workExp;
- });
- this.workExpTimes = res.data.workExpTimes || 0; // 工作经历中的技能经历数量
- this.workExps = res.data.workExps || []; // 工作经历列表
- // 从resumeList中提取简历基本信息并同步到form中
- if (res.data.resumeList) {
- const resumeData = res.data.resumeList;
- // 同步基本信息到form中
- this.form.resumesName =
- res.data.userEntity.userName || '';
- this.form.resumesAge = resumeData.resumesAge || '';
- this.form.resumesSex = resumeData.resumesSex || 1;
- this.form.resumesPhone =
- resumeData.resumesPhone || '';
- this.form.resumesMarriage =
- resumeData.resumesMarriage || '';
- this.form.address = resumeData.address || '';
- this.form.resumesEducation =
- resumeData.resumesEducation || '';
- this.form.graduationTime =
- resumeData.graduationTime || '';
-
- // 获取最高学历的学校和专业
- const highestEdu = this.getHighestEducation();
- this.form.school = highestEdu.school;
- this.form.major = highestEdu.major;
- this.form.resumesEducation = highestEdu.degree;
- this.form.resumesWorkExperience =
- resumeData.resumesWorkExperience || '';
- this.form.resumesEmail =
- resumeData.resumesEmail || '';
- this.form.resumesStatus =
- resumeData.resumesStatus || 0;
- this.form.resumesCompensation =
- resumeData.resumesCompensation || '';
- this.form.city = resumeData.city || '';
- // 同步其他需要的字段
- // this.form.birthday = resumeData.birthday || '';
- // this.form.resumesAttachment =
- // resumeData.resumesAttachment || '';
- // this.form.resumesImage =
- // resumeData.resumesImage || '';
- // this.form.resumesImageName =
- // resumeData.resumesImageName || '';
- // 更新性别选择的当前值
- this.current = resumeData.resumesSex || 1;
- this.resumesStatus = resumeData.resumesStatus;
- this.resumesId = resumeData.resumesId;
- }
- // 从userEntity中提取用户信息
- if (res.data.userEntity) {
- this.nickName = res.data.userEntity.userName || '';
- this.avatar = res.data.userEntity.avatar || '';
- // 更新store中的头像
- this.$store.commit(
- 'SET_AVATAR',
- res.data.userEntity.avatar || ''
- );
- }
- } else {
- ElMessageBox.alert('暂无简历,请添加简历', '提示', {
- confirmButtonText: '确认'
- });
- }
- } else {
- ElMessageBox.alert(res.msg, '提示', {
- confirmButtonText: '确认'
- });
- }
- });
- },
- //获取个人信息
- getUserInfo() {
- this.$Request.get('/app/user/selectUserById').then(res => {
- if (res.code == 0) {
- this.$store.commit('SET_AVATAR', res.data.avatar);
- this.nickName = res.data.userName;
- this.avatar = res.data.avatar;
- if (res.data.userType == 1 || res.data.userType == null) {
- this.userType = 1;
- localStorage.setItem('userType', 1);
- } else {
- this.userType = 2;
- localStorage.setItem('userType', 2);
- }
- }
- });
- },
- /**
- * 获取投递记录、收藏记录、浏览记录
- */
- getUserData() {
- this.$Request.get('/app/user/userData').then(res => {
- if (res.code == 0) {
- this.browseCount = res.data.browseCount;
- this.collectionCount = res.data.collectionCount;
- this.deliveryCount = res.data.deliveryCount;
- }
- });
- },
- //工作性质
- getPostType() {
- let data = {
- type: '工作性质'
- };
- this.$Request.get('/app/dict/list', { params: data }).then(res => {
- if (res.code == 0) {
- res.data.map(item => {
- item.label = item.value;
- });
- this.workStatus = res.data;
- }
- });
- },
- // 获取部门列表
- getDepartment() {
- this.$Request.post('/app/userFirst/getDepartment', {},{type:'json'}).then((res) => {
- if (res.code == 0) {
- this.departments = res.data;
- // 如果是编辑状态且有workExpId,获取工作经历详情
- if (this.workObj.workExpId && this.workObj.workExpId != '') {
- this.getData();
- }
- } else {
- ElMessage({
- message: res.msg || '获取部门列表失败',
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- // 获取工作经历详情
- getData() {
- this.$Request.get('/app/userFirst/getWorkExpDetailOne', {
- params: {
- workExpId: this.workObj.workExpId
- }
- }).then((res) => {
- if (res.code == 0) {
- const data = res.data;
- // 更新公司信息
- this.workObj.resumesTitle = data.workExp.companyName || '';
- this.workObj.businessType = JSON.parse(data.workExp.type) || [];
-
- // 更新工作经历详情
- if (data.workExpDetails && data.workExpDetails.length > 0) {
- const detail = data.workExpDetails[0];
- // 时间处理
- this.workObj.resumesTime = [
- new Date(detail.startTime),
- new Date(detail.endTime)
- ];
- // 工作内容
- this.workObj.resumesContent = detail.workContent || '';
- // 部门信息
- this.workObj.departmentId = detail.departmentId || 0;
- this.workObj.department = detail.department || '';
- // 岗位职级
- this.workObj.positionLevel = detail.positionLevel || '初级';
- // 工作业绩
- this.workObj.workPerformance = detail.workPerformance || '';
- // 技能处理
- this.workObj.skills = detail.skills ? JSON.parse(detail.skills) : [];
- // 岗位职业技能相关字段 - 修正字段映射关系
- this.workObj.selectedJobPost = detail.position || '';
- this.workObj.ruleClassifyId = detail.positionId || 0;
- this.workObj.positionSkills = detail.skills ? JSON.parse(detail.skills) : [];
- this.workObj.workExpDetailId = detail.workExpDetailId || '';
- }
- } else {
- ElMessage({
- message: res.msg || '获取工作经历详情失败',
- type: 'error',
- duration: 1500,
- offset: this.screenHeight / 2
- });
- }
- });
- },
- // 处理部门选择变化
- handleDepartmentChange(value) {
- // 根据部门ID获取部门名称
- const selectedDepartment = this.departments.find(item => item.departmentId === value);
- if (selectedDepartment) {
- this.workObj.department = selectedDepartment.departmentName;
- } else {
- this.workObj.department = '';
- }
- },
- //返回
- goBack() {
- this.$router.back();
- },
- //获取最高学历
- getHighestEducation() {
- // 定义学历等级映射(从低到高)
- const educationLevels = {
- '小学': 1,
- '初中': 2,
- '高中': 3,
- '中专': 4,
- '大专': 5,
- '本科': 6,
- '硕士': 7,
- '博士': 8,
- '博士后': 9
- };
- let highestEdu = null;
- let highestLevel = -1;
- // 检查eduList是否存在且是数组
- if (Array.isArray(this.eduList)) {
- this.eduList.forEach(edu => {
- const level = educationLevels[edu.degree] || 0;
- if (level > highestLevel) {
- highestLevel = level;
- highestEdu = edu;
- } else if (level === highestLevel) {
- // 如果学历等级相同,选择结束时间较晚的
- const currentEndTime = highestEdu.endTime ? new Date(highestEdu.endTime).getTime() : 0;
- const newEndTime = edu.endTime ? new Date(edu.endTime).getTime() : 0;
- if (newEndTime > currentEndTime) {
- highestEdu = edu;
- }
- }
- });
- }
- // 返回完整的最高学历信息
- return highestEdu ? {
- school: highestEdu.school,
- major: highestEdu.profession,
- degree: highestEdu.degree
- } : {
- school: '',
- major: '',
- degree: ''
- };
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- @import url('index.scss');
- .workDialog {
- width: 70% !important;
- }
- /* 从事方向选择样式 */
- .preference-grid {
- padding: 20px;
- max-height: 400px;
- overflow-y: auto;
- }
- .preference-group {
- margin-bottom: 20px;
- }
- .preference-title {
- font-size: 16px;
- font-weight: bold;
- margin-bottom: 10px;
- color: #333;
- }
- .preference-children {
- display: flex;
- flex-wrap: wrap;
- gap: 10px;
- }
- .preference-tag {
- padding: 8px 16px;
- border: 1px solid #dcdfe6;
- border-radius: 20px;
- cursor: pointer;
- transition: all 0.3s ease;
- background-color: #fff;
- font-size: 14px;
- color: #606266;
- }
- .preference-tag:hover {
- border-color: #00DD9A;
- color: #00DD9A;
- }
- .preference-tag.active {
- background-color: #00DD9A;
- border-color: #00DD9A;
- color: #fff;
- }
- /* 技能标签样式 */
- .info-boxsWorks-content-skills {
- display: flex;
- align-items: center;
- margin-top: 10px;
- }
- .info-boxsWorks-content-skills-title {
- margin-right: 10px;
- font-weight: bold;
- color: #333;
- }
- .info-boxsWorks-content-skills-tags {
- display: flex;
- flex-wrap: wrap;
- gap: 8px;
- }
- .info-boxsWorks-content-skill-tag {
- padding: 4px 12px;
- background-color: #f0f0f0;
- border-radius: 12px;
- font-size: 14px;
- color: #999999;
- white-space: nowrap;
- }
- </style>
|