12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553 |
- <template>
- <view>
- <u-navbar back-text="编辑资料"></u-navbar>
- <view class="edit-head">
- <u-avatar :src="personal_info.faceImage+'?x-oss-process=image/resize,m_fill,w_256,h_256'" size="160" :show-level="true" level-icon="edit-pen-fill" level-bg-color ="#4E8DF6" @click="uploadPhoto"></u-avatar>
- </view>
-
- <view class="edit-form">
- <u-form :model="form" ref="uForm" label-width ="160">
- <u-form-item label="姓名"><u-input :disabled='true' v-model="personal_info.realName" input-align="right" placeholder=""/></u-form-item>
- <u-form-item label="身份证号"><u-input :disabled='true' v-model="idCard" input-align="right" placeholder=""/></u-form-item>
- <u-form-item label="手机号"><u-input :disabled='true' v-model="personal_info.phone" input-align="right" placeholder=""/></u-form-item>
- <u-form-item label="性别"><u-input :disabled='true' v-model="form.sex" input-align="right" placeholder="男"/></u-form-item>
- <u-form-item label="年龄"><u-input :disabled='true' v-model="personal_info.age" input-align="right" placeholder="31岁"/></u-form-item>
- <u-form-item label="所属工会">
- <!-- <u-input v-model="personal_info.orgName" input-align="right" placeholder="荆州市总工会" type="select" @click="show_orgName = true" />
- <u-select v-model="show_orgName" :defaultValue="defaultData.orgId" mode="single-column" :list="orgNameList" @confirm="orgNameConfirm"></u-select> -->
- <u-input v-model="personal_info.orgName" input-align="right" type="select" placeholder="请选择所属工会" @click="getSearch" />
- </u-form-item>
- <u-form-item label="身高">
- <u-input v-model="form.height" input-align="right" placeholder="172cm" type="select" @click="show_height = true" />
- <u-select v-model="show_height" :defaultValue="defaultData.height" mode="single-column" :list="height_ranges" @confirm="heightConfirm"></u-select>
- </u-form-item>
- <u-form-item label="体重">
- <u-input v-model="form.weight" input-align="right" placeholder="75kg" type="select" @click="show_weight = true"/>
- <u-select v-model="show_weight" :defaultValue="defaultData.weight" mode="single-column" :list="weight_ranges" @confirm="weightConfirm"></u-select>
- </u-form-item>
-
- <view class="edit-line"></view>
-
- <u-form-item label="出身地">
- <u-input v-model="personal_info.birthplaceN" input-align="right" placeholder="荆州市沙市区" type="select" @click='birthdayAddressChange'/>
- <u-select v-model="show_birthday_address" mode="mutil-column-auto" :default-value='defaultData.address' :list="defaultColumns" @confirm="onBirthdayCityConfirm"></u-select>
- </u-form-item>
- <u-form-item label="户口所在地">
- <u-input v-model="personal_info.registeredResidenceN" input-align="right" placeholder="荆州市沙市区" type="select" @click='registeredResidenceAddressChange'/>
- <u-select v-model="show_registered_residence" mode="mutil-column-auto" :default-value='defaultData.registered_residence' :list="defaultColumns" @confirm="onResidenceRegisteredCityConfirm"></u-select>
- </u-form-item>
- <u-form-item label="工作所在地">
- <u-input v-model="personal_info.workplaceN" input-align="right" placeholder="荆州市沙市区" type="select" @click='workAddressChange'/>
- <u-select v-model="show_work_address" mode="mutil-column-auto" :default-value='defaultData.work_address' :list="defaultColumns" @confirm="onWorkCityConfirm"></u-select>
- </u-form-item>
-
- <view class="edit-line"></view>
-
-
-
- <u-form-item label="学历" >
- <u-input v-model="personal_info.educationN" input-align="right" placeholder="大学本科" type="select" @click="show_education = true"/>
- <u-select v-model="show_education" :defaultValue="defaultData.education" mode="single-column" :list="base_dictionary.xlList" @confirm="educationConfirm"></u-select>
- </u-form-item>
- <u-form-item label="行业" >
- <u-input v-model="personal_info.industryN" input-align="right" placeholder="IT/互联网" type="select" @click="show_profession = true"/></u-form-item>
- <u-select v-model="show_profession" :defaultValue="defaultData.profession" mode="single-column" :list="base_dictionary.hyList" @confirm="professionConfirm"></u-select>
- <u-form-item label="工作单位">
- <u-input v-model="personal_info.workUnit" input-align="right" placeholder="湖北荆鹏软件开发有限公司" /></u-form-item>
- <u-form-item label="岗位">
- <u-input v-model="personal_info.post" input-align="right" placeholder="软件工程师" /></u-form-item>
-
- <view class="edit-line"></view>
-
- <u-form-item label="月薪" >
- <u-input v-model="personal_info.salaryRangeN" input-align="right" placeholder="请选择" type="select" @click="show_salary = true" />
- <u-select v-model="show_salary" :defaultValue="defaultData.salary_range" mode="single-column" :list="base_dictionary.yxList" @confirm="salaryConfirm"></u-select>
- </u-form-item>
- <u-form-item label="住房状况">
- <u-input v-model="personal_info.housingSituationN" input-align="right" placeholder="请选择" type="select" @click="show_house = true"/>
- <u-select v-model="show_house" :defaultValue="defaultData.house_status" mode="single-column" :list="base_dictionary.zfqkList" @confirm="houseConfirm"></u-select>
- </u-form-item>
- <u-form-item label="婚姻状况">
- <u-input v-model="personal_info.maritalStatusN" input-align="right" placeholder="未婚" type="select" @click="show_marriage = true"/>
- <u-select v-model="show_marriage" :defaultValue="defaultData.marriage_status" mode="single-column" :list="base_dictionary.hyqkList" @confirm="marriageConfirm"></u-select>
- </u-form-item>
- <u-form-item label="子女状况" >
- <u-input v-model="personal_info.childStatusN" input-align="right" placeholder="无" type="select" @click="show_children = true"/>
- <u-select v-model="show_children" :defaultValue="defaultData.children_status" mode="single-column" :list="base_dictionary.znqkList" @confirm="childrenConfirm"></u-select>
- </u-form-item>
-
- <view class="edit-line"></view>
- <view class="edit-row">
- <p>兴趣爱好</p>
- <view class="edit-label">
- <span v-for="(item,index) in base_dictionary.hobbyInfoList" :key="index" :class="item.isMemberSelect ? 'active' : ''" @tap="selectInterest(index)">
- {{item.name}}
- </span>
- <!--
- <span class="active">摄影</span>
- <span>烹饪</span>
- <span>健身</span>
- <span>打游戏</span>
- <span>摄影</span>
- <span>烹饪</span>
- <span>健身</span>
- <span>打游戏</span>-->
- </view>
- </view>
-
- <view class="edit-line"></view>
-
- <view class="edit-row" @click="editSelfEvaluation">
- <view class="u-flex u-row-between " >
- <p>自我评价</p>
- <u-icon custom-prefix="custom-icon" name="youjiantou"></u-icon>
- </view>
- <view class="edit-text">
- {{personal_info.selfEvaluation}}
- </view>
- </view>
- <view class="edit-title">择偶标准</view>
-
- <u-form-item label="年龄范围" >
- <u-input v-model="personal_info.taAgeRangeN" input-align="right" placeholder="20~35" type="select" @click="show_ta_age_ranges = true"/>
- <u-select v-model="show_ta_age_ranges" :defaultValue="defaultData.ta_age_range" mode="single-column" :list="base_dictionary.nlfwList" @confirm="taAgeRangeConfirm"></u-select>
- </u-form-item>
-
- <u-form-item label="月薪" >
- <u-input v-model="personal_info.taIncomeRangeN" input-align="right" placeholder="不限" type="select" @click="show_ta_salary = true"/>
- <u-select v-model="show_ta_salary" :defaultValue="defaultData.ta_salary_range" mode="single-column" :list="base_dictionary.yxList" @confirm="taSalaryRangeConfirm"></u-select>
- </u-form-item>
- <u-form-item label="学历" >
- <u-input v-model="personal_info.taEduN" input-align="right" placeholder="不限" type="select" @click="show_ta_education = true"/>
- <u-select v-model="show_ta_education" :defaultValue="defaultData.ta_education" mode="single-column" :list="base_dictionary.xlList" @confirm="taEducationConfirm"></u-select>
- </u-form-item>
- <u-form-item label="职业">
- <u-input v-model="personal_info.taOccupation" input-align="right" placeholder="不限" /></u-form-item>
- <u-form-item label="所在地">
- <u-input v-model="personal_info.taWorkplaceN" :defaultValue="defaultData.ta_work_address" input-align="right" placeholder="请选择" type="select" @click='taWorkAddressChange'/>
- <u-select v-model="show_ta_work_address" mode="mutil-column-auto" :default-value='defaultData.ta_work_address' :list="defaultColumns" @confirm="onTaWorkCityConfirm"></u-select>
- </u-form-item>
- <u-form-item label="其他要求">
- <u-input v-model="personal_info.taOther" input-align="right" placeholder="请选择" /></u-form-item>
- </u-form>
- </view>
-
- <view>
- <uni-popup ref="alertDialog" type="dialog">
- <!-- <uni-popup-dialog type="success" title="提示" :content="content" @confirm="confirm"
- @close="dialogClose"></uni-popup-dialog>-->
- </uni-popup>
- <u-modal v-model="submitShow" @confirm="confirm" show-cancel-button='true' ref="uModal" :asyncClose="true" :content="content"></u-modal>
- </view>
- <view class="personal-btn">
- <u-button type="error" shape="circle" :custom-style="customStyle" @click="formsubmit">
- <span>保存</span>
- </u-button>
- </view>
- <view>
-
- <u-popup border-radius="20" v-model="showSelfEvaluation" @close="close" mode="center" length="90%" height="600rpx">
- <view style="display: flex; flex-direction: column;">
- <view style="display:flex;flex-direction:row;margin-top: 50rpx;justify-content: space-between; ">
- <view style="margin-left: 50rpx;font-weight: bold!important; font-size:30rpx;margin-bottom: 20rpx;">自我评价</view>
- <view style="font-color:#E5E7EA;margin-right: 50rpx;">{{selfEvaluation.length}}/200</view>
- </view>
- <view style="display: flex; uni-textarea; margin-bottom: 20rpx;justify-content: center;align-items:center;">
- <textarea style="width: 80%; padding-top: 10rpx;padding-bottom: 10rpx; border-radius:30rpx;padding-left: 20rpx;padding-right: 20rpx; background-color: #E5E7EA;overflow: auto;" :adjust-position="false" placeholder="请填写内容" maxlength="200" name="summary" v-model="selfEvaluation">
-
- </textarea>
- </view>
- <view>
- <button style="border-radius:100rpx;background-color: #FF5E5E;width:75%;color:#FFFFFF" @click="saveSelfEvaluation">保存</button>
- </view>
- </view>
- </u-popup>
- </view>
-
- <!--
- <u-action-sheet
- :show="show_education"
- :actions="base_dictionary.xlList"
- title="请选择学历"
- description=""
- @close="show_education = false"
- @select="educationSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_salary"
- :actions="base_dictionary.yxList"
- title="请选择月薪"
- description=""
- @close="show_salary = false"
- @select="salarySelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_profession"
- :actions="base_dictionary.hyList"
- title="请选择行业"
- description=""
- @close="show_profession = false"
- @select="professionSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_house"
- :actions="base_dictionary.zfqkList"
- title="请选择住房状况"
- description=""
- @close="show_house = false"
- @select="houseSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_marriage"
- :actions="base_dictionary.hyList"
- title="请选择婚姻状况"
- description=""
- @close="show_marriage = false"
- @select="marriageSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_children"
- :actions="base_dictionary.znqkList"
- title="请选择子女状况"
- description=""
- @close="show_children = false"
- @select="childrenSelect"
- >
- </u-action-sheet>
-
- <u-action-sheet
- :show="show_ta_age_ranges"
- :actions="base_dictionary.nlfwList"
- title="请选择年龄范围"
- description=""
- @close="show_ta_age_ranges = false"
- @select="taAgeRangeSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_ta_education"
- :actions="base_dictionary.xlList"
- title="请选择学历"
- description=""
- @close="show_ta_education = false"
- @select="taEducationSelect"
- >
- </u-action-sheet>
- <u-action-sheet
- :show="show_ta_salary"
- :actions="base_dictionary.nlfwList"
- title="请选择月薪"
- description="xxxxxxx"
- @close="show_ta_salary = false"
- @select="taSalarySelect"
- >
- </u-action-sheet>-->
- </view>
- </template>
- <script>
-
- import * as loginApi from '@/apis/login.js'
-
- // import mpvueCityPicker from "@/pagesB/components/mpvue-citypicker/mpvueCityPicker.vue";
- // import mpvueCityPicker from "../../pagesB/components/mpvue-citypicker/mpvueCityPicker.vue";
- import {provinceData,cityData,areaData,setCityData,getCityData,getCityPosition} from '@/apis/city.js';
- let _self;
- export default {
- /* components:{
- mpvueCityPicker
- },*/
- data() {
- return {
- personalInfoChange: {},
- change: false,
- submitShow: false,
- content: '个人资料信息已修改,提交后需后台重新审核资料,是否继续提交?',
- orgNameList: [],
- defaultColumns: [],
- cityPickerValueDefault:[16,6,0],
- customStyle: {
- background: '#FF5E5E'
- },
- defaultData:{
- orgid:[1],
- height:[45],
- weight:[45],
-
- address:[16,6,0],
- registered_residence:[16,6,0],
- work_address:[16,6,0],
- education:[1],
- profession:[1],
- salary_range:[1],
- house_status:[1],
- marriage_status:[1],
- children_status:[1],
- ta_age_range:[1],
- ta_salary_range:[1],
- ta_education:[1],
- ta_work_address:[16,6,0]
- },
- form: {
- orgName: '',
- name: '',
- sex: '',
- height:'',
- weight:'',
-
- address:'',
- registered_residence:'',
- work_address:'',
- work_corporation:'',
- work_post:'',
- education:'',
- profession:'',
- salary_range:'',
- house_status:'',
- marriage_status:'',
- children_status:'',
- self_assess:'',
-
- addressId:'',
- registered_residenceId:'',
- work_addressId:'',
- educationId:'',
- professionId:'',
- salary_rangeId:'',
- house_statusId:'',
- marriage_statusId:'',
- children_statusId:'',
- },
- selfEvaluation:'',
- personal_info:{
- faceImage:' /static/img/sexMan.png'
- },
- height_ranges:[],
- weight_ranges:[],
- showSelfEvaluation:false,
- show_orgName:false,
- show_height:false,
- show_weight:false,
-
- show_birthday_address:false,
- show_registered_residence:false,
- show_work_address:false,
- show_salary:false,
- show_profession:false,
- show_education:false,
- show_house:false,
- show_marriage:false,
- show_children:false,
- show_ta_age_ranges:false,
- show_ta_education:false,
- show_ta_salary:false,
- show_ta_work_address:false,
- base_dictionary:{
- zfqkList:[],
- yxList:[],
- znqkList:[],
- qyList:[],
- xlList:[],
- hyList:[],
- nlfwList:[],
- hyqkList:[],
- hobbyInfoList:[],
-
- }
- }
-
- },
- computed:{
-
- idCard(){
- if(this.personal_info.idCard && this.personal_info.idCard.length>=15){
- let prefix = this.personal_info.idCard.substr(0,5);
- let suffix = this.personal_info.idCard.substr(this.personal_info.idCard.length-3,3);
- return prefix + '********'+ suffix;
- }
- return '42100********111'
- }
- },
- onLoad(){
- _self = this;
-
- _self.getOrgNameList(true);
- // console.log('省'+JSON.stringify(provinceData))
-
- //let personalInfoPlus = this.carhelp.getPersonInfoPlus();
- //console.log('personalInfoPlus'+JSON.stringify(personalInfoPlus))
- this.personal_info = this.carhelp.getPersonInfo();
- // console.log('个人信息'+JSON.stringify(this.personal_info))
- let subject = {subject:''}
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- loginApi.getBaseDictionary(subject).then(function(data){
- uni.hideLoading();
- //console.log('基础字典'+JSON.stringify(data));
- let personal_info = _self.carhelp.getPersonInfo();
- if(data.data)
- {
- _self.base_dictionary = data.data;
- if(_self.base_dictionary.zfqkList){
-
- for(let i = 0;i< _self.base_dictionary.zfqkList.length;i++)
- {
- _self.base_dictionary.zfqkList[i].label = _self.base_dictionary.zfqkList[i].name;
- }
- if(_self.personal_info.housingSituation!=null)
- {
- let index = _self.base_dictionary.zfqkList.findIndex(item => item.value === personal_info.housingSituation);
- if(index>=0){
- _self.defaultData.house_status = [index]
- _self.personal_info.housingSituationN = _self.base_dictionary.zfqkList[index].name;
- _self.personal_info.housingSituation = _self.base_dictionary.zfqkList[index].value;
- }
- }
- /*
- if(_self.personal_info.housingSituation!=null && _self.personal_info.housingSituation<= _self.base_dictionary.zfqkList.length)
- {
- _self.personal_info.housingSituationN =_self.base_dictionary.zfqkList[_self.personal_info.housingSituation-1].label
- }*/
- }
-
- //console.log('住房情况'+JSON.stringify(_self.base_dictionary.zfqkList));
- if(_self.base_dictionary.yxList){
-
- for(let i = 0;i< _self.base_dictionary.yxList.length;i++)
- {
- _self.base_dictionary.yxList[i].label = _self.base_dictionary.yxList[i].name;
- }
- if(_self.personal_info.salaryRange!=null)
- {
- let index = _self.base_dictionary.yxList.findIndex(item => item.value === personal_info.salaryRange);
- if(index>=0){
- _self.defaultData.salary_range = [index]
- _self.personal_info.salaryRangeN = _self.base_dictionary.yxList[index].name;
- _self.personal_info.salaryRange = _self.base_dictionary.yxList[index].value;
- }
- }
- if(_self.personal_info.taIncomeRange!=null)
- {
- let index = _self.base_dictionary.yxList.findIndex(item => item.value === personal_info.taIncomeRange);
- if(index>=0){
- _self.defaultData.ta_salary_range = [index]
- _self.personal_info.taIncomeRangeN = _self.base_dictionary.yxList[index].name;
- _self.personal_info.taIncomeRange = _self.base_dictionary.yxList[index].value;
- }
- }
- /*
- if(_self.personal_info.salaryRange!=null && _self.personal_info.salaryRange<= _self.base_dictionary.yxList.length)
- {
- _self.personal_info.salaryRangeN =_self.base_dictionary.yxList[_self.personal_info.salaryRange-1].label
- }
- if(_self.personal_info.taIncomeRange!=null && _self.personal_info.taIncomeRange<= _self.base_dictionary.yxList.length)
- {
- _self.personal_info.taIncomeRangeN =_self.base_dictionary.yxList[_self.personal_info.taIncomeRange-1].label
- }*/
- }
-
- //console.log('月薪情况'+JSON.stringify(_self.base_dictionary.yxList));
- if(_self.base_dictionary.znqkList){
-
- for(let i = 0;i< _self.base_dictionary.znqkList.length;i++)
- {
- _self.base_dictionary.znqkList[i].label = _self.base_dictionary.znqkList[i].name;
- }
- if(_self.personal_info.childStatus!=null)
- {
- let index = _self.base_dictionary.znqkList.findIndex(item => item.value === personal_info.childStatus);
- if(index>=0){
- _self.defaultData.children_status = [index]
- _self.personal_info.childStatusN = _self.base_dictionary.znqkList[index].name;
- _self.personal_info.childStatus = _self.base_dictionary.znqkList[index].value;
- }
- }
- /*
- if(_self.personal_info.childStatus!=null && _self.personal_info.childStatus<= _self.base_dictionary.znqkList.length)
- {
- _self.personal_info.childStatusN =_self.base_dictionary.znqkList[_self.personal_info.childStatus-1].label
- }*/
- }
- //console.log('子女情况'+JSON.stringify(_self.base_dictionary.znqkList));
- /*
- if(_self.base_dictionary.qyList){
-
- for(let i = 0;i< _self.base_dictionary.qyList.length;i++)
- {
- _self.base_dictionary.qyList[i].label = _self.base_dictionary.qyList[i].name;
- }
- }
- console.log('区域'+JSON.stringify(_self.base_dictionary.qyList));
- */
- if(_self.base_dictionary.xlList){
-
- for(let i = 0;i< _self.base_dictionary.xlList.length;i++)
- {
- _self.base_dictionary.xlList[i].label = _self.base_dictionary.xlList[i].name;
-
- }
- if(_self.personal_info.education!=null)
- {
- let index = _self.base_dictionary.xlList.findIndex(item => item.value === personal_info.education);
- if(index>=0){
- _self.defaultData.education = [index]
- _self.personal_info.educationN = _self.base_dictionary.xlList[index].name;
- _self.personal_info.education = _self.base_dictionary.xlList[index].value;
- }
- }
- if(_self.personal_info.taEdu!=null)
- {
- let index = _self.base_dictionary.xlList.findIndex(item => item.value === personal_info.taEdu);
- if(index>=0){
- _self.defaultData.ta_education = [index]
- _self.personal_info.taEduN = _self.base_dictionary.xlList[index].name;
- _self.personal_info.taEdu = _self.base_dictionary.xlList[index].value;
- }
- }
- //console.log('学历'+JSON.stringify(_self.base_dictionary.xlList.length))
- /* if(_self.personal_info.education!=null && _self.personal_info.education <= _self.base_dictionary.xlList.length)
- {
- //console.log('学历'+JSON.stringify(_self.personal_info.education))
- _self.personal_info.educationN =_self.base_dictionary.xlList[Number(_self.personal_info.education)-1].label
- _self.defaultData.education = [Number(_self.personal_info.education)-1]
- }
- if(_self.personal_info.taEdu!=null && _self.personal_info.taEdu<= _self.base_dictionary.xlList.length)
- {
- _self.personal_info.taEduN =_self.base_dictionary.xlList[_self.personal_info.taEdu-1].label
- }*/
- }
- //console.log('学历情况'+JSON.stringify(_self.base_dictionary.xlList));
-
- if(_self.base_dictionary.hyList){
-
- for(let i = 0;i< _self.base_dictionary.hyList.length;i++)
- {
- _self.base_dictionary.hyList[i].label = _self.base_dictionary.hyList[i].name;
- }
- if(_self.personal_info.industry!=null)
- {
- let index = _self.base_dictionary.hyList.findIndex(item => item.value === personal_info.industry);
- if(index>=0){
- _self.defaultData.profession = [index]
- _self.personal_info.industryN = _self.base_dictionary.hyList[index].name;
- _self.personal_info.industry = _self.base_dictionary.hyList[index].value;
- }
- }
- /*
- if(_self.personal_info.industry!=null && _self.personal_info.industry<= _self.base_dictionary.hyList.length)
- {
- _self.personal_info.industryN =_self.base_dictionary.hyList[_self.personal_info.industry-1].label
- }*/
-
- }
- // console.log('行业情况'+JSON.stringify(_self.base_dictionary.hyList));
- if(_self.base_dictionary.nlfwList){
-
- for(let i = 0;i< _self.base_dictionary.nlfwList.length;i++)
- {
- _self.base_dictionary.nlfwList[i].label = _self.base_dictionary.nlfwList[i].name;
- }
- if(_self.personal_info.taAgeRange!=null)
- {
- let index = _self.base_dictionary.nlfwList.findIndex(item => item.value === personal_info.taAgeRange);
- if(index>=0){
- _self.defaultData.ta_age_range = [index]
- _self.personal_info.taAgeRangeN = _self.base_dictionary.nlfwList[index].name;
- _self.personal_info.taAgeRange = _self.base_dictionary.nlfwList[index].value;
- }
- }
- /*
- if(_self.personal_info.taAgeRange!=null && _self.personal_info.taAgeRange<= _self.base_dictionary.nlfwList.length)
- {
- _self.personal_info.taAgeRangeN =_self.base_dictionary.nlfwList[_self.personal_info.taAgeRange-1].label
- }*/
- }
- //console.log('年龄范围'+JSON.stringify(_self.base_dictionary.nlfwList));
- if(_self.base_dictionary.hyqkList){
-
- for(let i = 0;i< _self.base_dictionary.hyqkList.length;i++)
- {
- _self.base_dictionary.hyqkList[i].label = _self.base_dictionary.hyqkList[i].name;
- }
- if(_self.personal_info.maritalStatus!=null)
- {
- let index = _self.base_dictionary.hyqkList.findIndex(item => item.value === personal_info.maritalStatus);
- if(index>=0){
- _self.defaultData.ta_age_range = [index]
- _self.personal_info.maritalStatusN = _self.base_dictionary.hyqkList[index].name;
- _self.personal_info.maritalStatus = _self.base_dictionary.hyqkList[index].value;
- }
- }
- /*
- if(_self.personal_info.maritalStatus!=null && _self.personal_info.maritalStatus<= _self.base_dictionary.hyqkList.length)
- {
- _self.personal_info.maritalStatusN =_self.base_dictionary.hyqkList[_self.personal_info.maritalStatus-1].label
- }*/
- }
- //console.log('婚姻情况'+JSON.stringify(_self.base_dictionary.hyqkList));
- if(_self.base_dictionary.hobbyInfoList){
-
- for(let i = 0;i< _self.base_dictionary.hobbyInfoList.length;i++)
- {
- _self.base_dictionary.hobbyInfoList[i].isMemberSelect = false;
- _self.base_dictionary.hobbyInfoList[i].label = _self.base_dictionary.hobbyInfoList[i].name;
- if(_self.personal_info.hobby!=null){
- // console.log('hobby'+JSON.stringify(_self.personal_info.hobby))
- if(_self.personal_info.hobby.indexOf(_self.base_dictionary.hobbyInfoList[i].id)>=0)
- {
- _self.base_dictionary.hobbyInfoList[i].isMemberSelect = true;
- // console.log('选中'+JSON.stringify(_self.base_dictionary.hobbyInfoList[i]))
- }
- }
- }
- }
- // console.log('兴趣爱好'+JSON.stringify(_self.base_dictionary.hobbyInfoList));
- if(_self.personal_info.birthplace!=null){
- _self.personal_info.birthplaceN = getCityData(Number(_self.personal_info.birthplace));
- // console.log('address'+JSON.stringify(_self.form.addressId))
- }
- if(_self.personal_info.registeredResidence!=null){
- _self.personal_info.registeredResidenceN = getCityData(Number(_self.personal_info.registeredResidence));
- }
- if(_self.personal_info.workplace!=null){
- _self.personal_info.workplaceN = getCityData(Number(_self.personal_info.workplace));
-
- }
- if(_self.personal_info.taWorkplace!=null){
- _self.personal_info.taWorkplaceN = getCityData(Number(_self.personal_info.taWorkplace));
-
- }
- }
- _self.personalInfoChange = Object.assign({},_self.personal_info);
- console.log(_self.personalInfoChange)
- },function(err){
- console.log('获取基础字典错误'+JSON.stringify(err))
- uni.hideLoading();
- })
-
- for(let i = 130;i<=220;i++)
- {
- let height_range = {value: i, label: i.toString()+"cm"};
- this.height_ranges.push(height_range);
- //this.height_ranges.push(i.toString());
- }
- for(let i = 20;i<=120;i++)
- {
- // this.weight_ranges.push(i.toString());
- let weight_range = {value:i, label:i.toString()+"kg"};
- this.weight_ranges.push(weight_range);
- }
- if(this.personal_info){
- this.form.sex = this.personal_info.gender?'女':'男'
- if(this.personal_info.height)
- {
- this.form.height = this.personal_info.height+'cm'
- _self.defaultData.height = [_self.height_ranges.findIndex(item => item.value === _self.personal_info.height)]
-
-
- }
- if(this.personal_info.weight)
- {
- this.form.weight = this.personal_info.weight+'kg'
- _self.defaultData.weight = [_self.weight_ranges.findIndex(item => item.value === _self.personal_info.weight)]
-
- }
- }
-
- if(provinceData.length<=0){
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- loginApi.getCityList().then(function(data){
- uni.hideLoading();
- // console.log('获取城市成功'+JSON.stringify(data));
- if(data.result && data.data){
- setCityData(data.data);
- _self.init_city_data();
-
- //_self.$refs.mpvuebirtydayCityPicker.setCityData(data.data);
- //console.log('province data '+JSON.stringify(provinceData))
- if(_self.personal_info.birthplace!=null){
- _self.personal_info.birthplaceN = getCityData(Number(_self.personal_info.birthplace));
- _self.defaultData.address = getCityPosition(Number(_self.personal_info.birthplace));
- //this.defaultData.registered_residence = this.defaultData.address;
- //this.defaultData.work_address = this.defaultData.address; //
- console.log('address'+JSON.stringify(_self.defaultData.address))
- }
- if(_self.personal_info.registeredResidence!=null){
- _self.personal_info.registeredResidenceN = getCityData(Number(_self.personal_info.registeredResidence));
- _self.defaultData.registered_residence = getCityPosition(Number(_self.personal_info.registeredResidence));
- }
- if(_self.personal_info.workplace!=null){
- _self.personal_info.workplaceN = getCityData(Number(_self.personal_info.workplace));
- _self.defaultData.work_address = getCityPosition(Number(_self.personal_info.workplace));
-
- }
- if(_self.personal_info.taWorkplace!=null){
- _self.personal_info.taWorkplaceN = getCityData(Number(_self.personal_info.taWorkplace));
- _self.defaultData.ta_work_address = getCityPosition(Number(_self.personal_info.taWorkplace));
-
- }
- }
-
- },function(err){
- console.log('获取城市列表错误'+JSON.stringify(err))
- uni.hideLoading();
- })
- }else{
- _self.init_city_data();
- if(_self.personal_info.birthplace!=null){
- _self.personal_info.birthplaceN = getCityData(Number(_self.personal_info.birthplace));
- _self.defaultData.address = getCityPosition(Number(_self.personal_info.birthplace));
- //this.defaultData.registered_residence = this.defaultData.address;
- //this.defaultData.work_address = this.defaultData.address; //
- console.log('address'+JSON.stringify(_self.defaultData.address))
- }
- if(_self.personal_info.registeredResidence!=null){
- _self.personal_info.registeredResidenceN = getCityData(Number(_self.personal_info.registeredResidence));
- _self.defaultData.registered_residence = getCityPosition(Number(_self.personal_info.registeredResidence));
- }
- if(_self.personal_info.workplace!=null){
- _self.personal_info.workplaceN = getCityData(Number(_self.personal_info.workplace));
- _self.defaultData.work_address = getCityPosition(Number(_self.personal_info.workplace));
-
- }
- if(_self.personal_info.taWorkplace!=null){
- _self.personal_info.taWorkplaceN = getCityData(Number(_self.personal_info.taWorkplace));
- _self.defaultData.ta_work_address = getCityPosition(Number(_self.personal_info.taWorkplace));
-
- }
- }
- // _self.personalInfoChange =new Object(_self.personal_info);
-
- _self.personalInfoChange = Object.assign({},_self.personal_info);
- console.log(_self.personalInfoChange)
- // console.log('个人信息'+JSON.stringify(this.personal_info))
- },
- onShow() {
- var item = this.carhelp.get("searchOrgItem")
- if (item) {
- console.log(item)
- this.personal_info.orgName = item.name;
- this.personal_info.orgId = item.id;
- }
- },
- methods:{
- getSearch() {
- uni.navigateTo({
- url: '/pagesA/pages/login/search'
- })
- },
- getOrgNameList(bl) {
- _self = this;
-
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- if(bl) {
- _self.orgNameList = [];
- }
- loginApi.orgList().then((res) => {
- _self.orgNameList = res.data.data;
- if(_self.orgNameList){
- for(let i = 0;i< _self.orgNameList.length;i++)
- {
- _self.orgNameList[i].label = _self.orgNameList[i].name;
- _self.orgNameList[i].value = _self.orgNameList[i].id;
- }
- if(_self.personal_info.orgId!=null)
- {
- let index = _self.orgNameList.findIndex(item => item.value === personal_info.orgId);
- if(index>=0){
- _self.defaultData.orgId = [index]
- _self.personal_info.orgName = _self.orgNameList[index].name;
- _self.personal_info.orgId = _self.orgNameList[index].id;
- }
- }
- }
- uni.hideLoading();
- })
- .catch((error) => {
- uni.showToast({
- title: error,icon: "none"
- })
- })
- },
- init_city_data(){
- for(let i = 0;i< provinceData.length;i++){
- let province = provinceData[i];
- if(cityData[i].length>0){
- province.children = [];
- for(let j = 0;j< cityData[i].length;j++){
- let city = cityData[i][j];
- if(areaData[i][j].length>0){
- city.children = [];
- for(let k = 0;k< areaData[i][j].length;k++){
- city.children.push(areaData[i][j][k])
- }
- }
- province.children.push(city);
- }
- }
- this.defaultColumns.push(province);
- }
- },
- saveSelfEvaluation(){
- this.showSelfEvaluation = false;
- this.personal_info.selfEvaluation = this.selfEvaluation;
- console.log('自我评价'+JSON.stringify(this.selfEvaluation))
- },
- editSelfEvaluation(){
- if(this.personal_info.selfEvaluation!=null)
- {
- this.selfEvaluation = this.personal_info.selfEvaluation;
- }else
- {
- this.selfEvaluation = ''
- }
- this.showSelfEvaluation = true
-
- console.log('editSelfEvaluation')
- },
- open() {
- console.log('open');
- },
- close() {
- this.showSelfEvaluation = false
- console.log('close');
- },
- selectInterest(index){
- // let interest = this.interests;
- this.base_dictionary.hobbyInfoList[index].isMemberSelect = !this.base_dictionary.hobbyInfoList[index].isMemberSelect;
- console.log('item'+JSON.stringify(this.base_dictionary.hobbyInfoList[index]))
- },
- birthdayAddressChange(){
- _self.show_birthday_address = true;
- // console.log('birthdayAddress change')
- // this.$refs.mpvuebirtydayCityPicker.show()
- },
- registeredResidenceAddressChange(){
- _self.show_registered_residence = true;
- // this.$refs.mpvueRegisteredResidenceCityPicker.show()
- },
- workAddressChange(){
- _self.show_work_address = true;
- // this.$refs.mpvueWorkCityPicker.show()
- },
- taWorkAddressChange(){
- _self.show_ta_work_address = true;
- // this.$refs.mpvueTaWorkCityPicker.show()
- },
- onBirthdayCityConfirm(e) {
- // console.log('e'+JSON.stringify(e))
- //this.defaultData.address = [this.base_dictionary.znqkList.findIndex(item => item.value === e[0].value)]
- //this.defaultData.address = [17,1,1]
- let province = e[0];
- let city = e[1];
- let area = e[2];
-
- this.defaultData.address = getCityPosition(area.value);
- this.defaultData.registered_residence = this.defaultData.address;
- this.defaultData.work_address = this.defaultData.address;
- // console.log('address '+JSON.stringify(this.defaultData.address))
- this.personal_info.birthplaceN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.birthplace = val.value;
- let name = getCityData(Number(val.value));
- _self.personal_info.birthplaceN = name;
-
- //
- _self.personal_info.registeredResidenceN= _self.personal_info.birthplaceN;
- _self.personal_info.registeredResidence = _self.personal_info.birthplace;
- _self.personal_info.workplaceN = _self.personal_info.birthplaceN;
- _self.personal_info.workplace = _self.personal_info.birthplace;
- })
- // console.log('地址选择'+JSON.stringify(_self.form.addressId))
- },
- onResidenceRegisteredCityConfirm(e) {
- let province = e[0];
- let city = e[1];
- let area = e[2];
-
- this.defaultData.registered_residence = getCityPosition(area.value);
- // console.log('address '+JSON.stringify(this.defaultData.address))
- this.personal_info.registeredResidenceN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- let name = getCityData(Number(val.value));
- _self.personal_info.registeredResidenceN = name;
- _self.personal_info.registeredResidence = val.value;
- })
- },
- onWorkCityConfirm(e) {
- let province = e[0];
- let city = e[1];
- let area = e[2];
-
- this.defaultData.work_address = getCityPosition(area.value);
- // console.log('address '+JSON.stringify(this.defaultData.address))
- this.personal_info.workplaceN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- let name = getCityData(Number(val.value));
- _self.personal_info.workplaceN = name;
- _self.personal_info.workplace = val.value;
- })
- },
- onTaWorkCityConfirm(e) {
- let province = e[0];
- let city = e[1];
- let area = e[2];
-
- this.defaultData.ta_work_address = getCityPosition(area.value);
- // console.log('address '+JSON.stringify(this.defaultData.address))
- this.personal_info.taWorkplaceN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- let name = getCityData(Number(val.value));
- _self.personal_info.taWorkplaceN = name;
- _self.personal_info.taWorkplace = val.value;
- })
-
- },
- formsubmit() {
- this.personal_info.hobby = ''
- for(let i=0;i<this.base_dictionary.hobbyInfoList.length;i++)
- {
- if(this.base_dictionary.hobbyInfoList[i].isMemberSelect)
- {
- if(this.personal_info.hobby.length>0)
- {
- this.personal_info.hobby+=','
- }
- this.personal_info.hobby += this.base_dictionary.hobbyInfoList[i].id;
- }
- }
- // console.log(this.personalInfoChange)
- // console.log(this.personal_info)
- for(var item in this.personal_info) {
- if(this.personalInfoChange[item] != this.personal_info[item]) {
- this.change = true;
- // console.log(this.personalInfoChange[item])
- // console.log(this.personal_info[item])
- }
- }
-
- if(!this.change) {
- uni.switchTab({
- url:'./index'
- })
- } else {
- this.submitShow = true;
- }
- },
- confirm(){
- console.log('确认保存')
- let personal_info = {type:1,id:this.personal_info.id};
- let _personal_info = this.personal_info;
- if(_personal_info.faceImage)
- {
- personal_info.faceImage = _personal_info.faceImage;
- console.log('faceImage'+personal_info.faceImage)
- }
- personal_info.hobby = ''
- for(let i=0;i<_self.base_dictionary.hobbyInfoList.length;i++)
- {
- if(_self.base_dictionary.hobbyInfoList[i].isMemberSelect)
- {
- if(personal_info.hobby.length>0)
- {
- personal_info.hobby+=','
- }
- personal_info.hobby += _self.base_dictionary.hobbyInfoList[i].id;
- }
- }
- if(_personal_info.selfEvaluation)
- {
- personal_info.selfEvaluation = _personal_info.selfEvaluation;
- console.log('selfEvaluation'+personal_info.selfEvaluation);
- }
- if(_personal_info.orgId)
- {
- personal_info.orgId = _personal_info.orgId;
- console.log('orgId'+personal_info.orgId)
- }
- if(_personal_info.weight)
- {
- personal_info.weight = _personal_info.weight;
- console.log('weight'+personal_info.weight)
- }
- if(_personal_info.height)
- {
- personal_info.height = _personal_info.height;
- console.log('height'+personal_info.height)
- }
- if(_personal_info.education)
- {
- personal_info.education = _personal_info.education;
- console.log('education'+personal_info.education)
- }
- /*
- if(_personal_info.educationN)
- {
- personal_info.educationN = _personal_info.educationN;
- console.log('education'+personal_info.educationN)
- } */
- if(_personal_info.workUnit)
- {
- personal_info.workUnit = _personal_info.workUnit;
- console.log('workUnit'+personal_info.workUnit)
- }
- if(_personal_info.post)
- {
- personal_info.post = _personal_info.post;
- console.log('post'+personal_info.post)
- }
-
- if(_personal_info.industry)
- {
- personal_info.industry = _personal_info.industry;
- console.log('industry'+personal_info.industry)
- }
- /*
- if(_personal_info.industryN)
- {
- personal_info.industryN = _personal_info.industryN;
- console.log('industryN'+personal_info.industryN)
- } */
- if(_personal_info.salaryRange)
- {
- personal_info.salaryRange = _personal_info.salaryRange;
- console.log('salaryRange'+personal_info.salaryRange)
- }
- /*
- if(_personal_info.salaryRangeN)
- {
- personal_info.salaryRangeN = _personal_info.salaryRangeN;
- console.log('salaryRangeN'+personal_info.salaryRangeN)
- } */
- if(_personal_info.housingSituation)
- {
- personal_info.housingSituation = _personal_info.housingSituation;
- console.log('housingSituation'+personal_info.housingSituation)
- }
- /*
- if(_personal_info.housingSituationN)
- {
- personal_info.housingSituationN = _personal_info.housingSituationN;
- console.log('housingSituationN'+personal_info.housingSituationN)
- } */
-
- if(_personal_info.maritalStatus)
- {
- personal_info.maritalStatus = _personal_info.maritalStatus;
- console.log('maritalStatus'+personal_info.maritalStatus)
- }
- /*
- if(_personal_info.maritalStatusN)
- {
- personal_info.maritalStatusN = _personal_info.maritalStatusN;
- console.log('maritalStatusN'+personal_info.maritalStatusN)
- } */
- if(_personal_info.childStatus)
- {
- personal_info.childStatus = _personal_info.childStatus;
- console.log('childStatus'+personal_info.childStatus)
- }
- /*
- if(_personal_info.childStatusN)
- {
- personal_info.childStatusN = _personal_info.childStatusN;
- console.log('childStatusN'+personal_info.childStatusN)
- } */
- if(_personal_info.taIncomeRange)
- {
- personal_info.taIncomeRange = _personal_info.taIncomeRange;
- console.log('taIncomeRange'+personal_info.taIncomeRange)
- }
- /*
- if(_personal_info.taIncomeRangeN)
- {
- personal_info.taIncomeRangeN = _personal_info.taIncomeRangeN;
- console.log('taIncomeRangeN'+personal_info.taIncomeRangeN)
- } */
- if(_personal_info.birthplace)
- {
- personal_info.birthplace = _personal_info.birthplace;
- console.log('birthplace'+personal_info.birthplace)
- }
- /*
- if(_personal_info.birthplaceN)
- {
- personal_info.birthplaceN = _personal_info.birthplaceN;
- console.log('birthplaceN'+personal_info.birthplaceN)
- } */
- if(_personal_info.registeredResidence)
- {
- personal_info.registeredResidence = _personal_info.registeredResidence;
- console.log('registeredResidence'+personal_info.registeredResidence)
- }
- /*
- if(_personal_info.registeredResidenceN)
- {
- personal_info.registeredResidenceN = _personal_info.registeredResidenceN;
- console.log('registeredResidenceN'+personal_info.registeredResidenceN)
- } */
- if(_personal_info.workplace)
- {
- personal_info.workplace = _personal_info.workplace;
- console.log('workplace'+personal_info.workplace)
- }
- /*
- if(_personal_info.workplaceN)
- {
- personal_info.workplaceN = _personal_info.workplaceN;
- console.log('workplaceN'+personal_info.workplaceN)
- } */
-
- if(_personal_info.taWorkplace)
- {
- personal_info.taWorkplace = _personal_info.taWorkplace;
- console.log('taWorkplace'+personal_info.taWorkplace)
- }
- /*
- if(_personal_info.taWorkplaceN)
- {
- personal_info.taWorkplaceN = _personal_info.taWorkplaceN;
- console.log('taWorkplaceN'+personal_info.taWorkplaceN)
- } */
- if(_personal_info.taAgeRange)
- {
- personal_info.taAgeRange = _personal_info.taAgeRange;
- console.log('taAgeRange'+personal_info.taAgeRange)
- }
- /*
- if(_personal_info.taAgeRangeN)
- {
- personal_info.taAgeRangeN = _personal_info.taAgeRangeN;
- console.log('taAgeRangeN'+personal_info.taAgeRangeN)
- } */
- if(_personal_info.taEdu)
- {
- personal_info.taEdu = _personal_info.taEdu;
- console.log('taEdu'+personal_info.taEdu)
- }
- /*
- if(_personal_info.taEduN)
- {
- personal_info.taEduN = _personal_info.taEduN;
- console.log('education'+personal_info.taEduN)
- } */
-
- if(_personal_info.taOccupation)
- {
- personal_info.taOccupation = _personal_info.taOccupation;
- console.log('taOccupation'+personal_info.taOccupation)
- }
- /*
- if(_personal_info.taOccupationN)
- {
- personal_info.taOccupationN = _personal_info.taOccupationN;
- console.log('education'+personal_info.taOccupationN)
- } */
- if(_personal_info.taOther)
- {
- personal_info.taOther = _personal_info.taOther;
- console.log('taOther'+personal_info.taOther)
- }
- /*
- if(_personal_info.taOccupationN)
- {
- personal_info.taOccupationN = _personal_info.taOccupationN;
- console.log('education'+personal_info.taOccupationN)
- } */
- console.log('xxxx')
-
- loginApi.save_personal_info(personal_info).then((data) => {
- console.log('保存成功'+JSON.stringify(data));
- if(data.result){
- if(data.data){
- _self.submitShow = false;
- _self.findByOpenId();
- uni.switchTab({
- url:'./index'
- })
-
- }
- }
- //_self.findByOpenId();
- /*uni.navigateTo({
- url:'../user/index'
- })*/
- }).catch(error => {
- _self.submitShow = false;
- uni.showToast({
- title: error,
- icon: "none"
- })
- })
- },
- updatePersonInfo(){
-
- },
- updatePersonPlusInfo(){
-
- },
- childrenConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.children_status = [this.base_dictionary.znqkList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.childStatusN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.childStatus = val.value;
- this.personal_info.childStatusN += result;
- })
- },
- marriageConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.marriage_status = [this.base_dictionary.hyqkList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.maritalStatusN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- console.log('val'+JSON.stringify(val))
- _self.personal_info.maritalStatus =val.value;
- this.personal_info.maritalStatusN += result;
- })
- },
- houseConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.house_status = [this.base_dictionary.zfqkList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.housingSituationN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.housingSituation = val.value;
- _self.personal_info.housingSituationN += result;
- })
- },
- orgNameConfirm(e) {
- console.log('e'+JSON.stringify(e))
- this.defaultData.orgId = [this.orgNameList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.orgName = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.orgId = val.value;
- _self.personal_info.orgName += result;
- })
- },
- educationConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.education = [this.base_dictionary.xlList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.educationN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.education = val.value;
- _self.personal_info.educationN += result;
- })
- },
- professionConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.profession = [this.base_dictionary.hyList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.industryN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.industry = val.value;
- this.personal_info.industryN += result;
- })
- },
- salaryConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.salary_range = [this.base_dictionary.yxList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.salaryRangeN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.salaryRange = val.value;
- this.personal_info.salaryRangeN += result;
- })
- },
- taSalaryRangeConfirm(e){
- console.log('e111'+JSON.stringify(e))
- this.defaultData.ta_salary_range = [this.base_dictionary.yxList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.taIncomeRangeN = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- console.log('val'+val + 'index '+index)
- let result = val.label
- _self.personal_info.taIncomeRange = val.value;
- _self.personal_info.taIncomeRangeN += result;
- })
- },
- taAgeRangeConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.ta_age_range = [this.base_dictionary.nlfwList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.taAgeRangeN = '';
- e.map((val, index) => {
- console.log('val'+val + 'index '+index)
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.taAgeRange = val.value;
- _self.personal_info.taAgeRangeN += result;
- })
- },
- taEducationConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.ta_education = [this.base_dictionary.xlList.findIndex(item => item.value === e[0].value)]
-
- this.personal_info.taEduN = '';
- e.map((val, index) => {
- console.log('val'+val + 'index '+index)
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.taEdu = val.value;
- _self.personal_info.taEduN += result;
- })
- },
- /*
- educationSelect(e) {
- this.personal_info.education = e.value;
- this.personal_info.educationN = e.name;
- //this.$refs.uForm.validateField('personal_info.education')
- },
- salarySelect(e) {
- this.personal_info.salaryRange = e.value;
- this.personal_info.salaryRangeN = e.name;
- //this.$refs.uForm.validateField('personal_info.salaryRange')
- },
- professionSelect(e) {
- this.personal_info.industry = e.value;
- this.personal_info.industryN = e.name;
- //this.$refs.uForm.validateField('personal_info.industry')
- },
- houseSelect(e) {
- this.personal_info.housingSituation = e.value;
- this.personal_info.housingSituationN = e.name;
- //this.$refs.uForm.validateField('personal_info.housingSituation')
- },
- childrenSelect(e) {
- this.personal_info.childStatus = e.value;
- this.personal_info.childStatusN = e.name;
- //this.$refs.uForm.validateField('personal_info.childStatus')
- },
- marriageSelect(e) {
- this.personal_info.maritalStatus = e.value;
- this.personal_info.maritalStatusN = e.name;
- //this.$refs.uForm.validateField('personal_info.maritalStatus')
- },
- taAgeRangeSelect(e) {
- this.personal_info.taAgeRange = e.value;
- this.personal_info.taAgeRangeN = e.name;
- //this.$refs.uForm.validateField('personal_info.taAgeRange')
- },
- taEducationSelect(e) {
- this.personal_info.taEdu = e.value;
- this.personal_info.taEduN = e.name;
- //this.$refs.uForm.validateField('personal_info.taEdu')
- },
- taSalarySelect(e) {
- this.personal_info.taIncomeRange = e.value;
- this.personal_info.taIncomeRangeN = e.name;
- //this.$refs.uForm.validateField('personal_info.taIncomeRange')
- },*/
- heightConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.height = [this.height_ranges.findIndex(item => item.value === e[0].value)]
- this.form.height = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.height = val.value
- this.form.height += result;
- })
- },
- weightConfirm(e){
- console.log('e'+JSON.stringify(e))
- this.defaultData.weight = [this.weight_ranges.findIndex(item => item.value === e[0].value)]
- this.form.weight = '';
- e.map((val, index) => {
- // this.result += this.result == '' ? val.label : '-' + val.label;
- let result = val.label
- _self.personal_info.weight = val.value;
- this.form.weight += result;
- })
- },
- uploadPhoto(){
- // 上传图片
- //const ctx = uni.createCanvasContext('myCanvas');
- //console.log('url'+this.uploadUrl)
- //console.log(this.carhelp.getToken())
- let _this = this;
- uni.chooseImage({
- count: 1, //默认9
- // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album','camera'], //从相册选择
- success:(res)=> {
- let imgFile = res.tempFilePaths;
- console.log(process.car.BASE_URL+"mobile/member/uploadBase64")
- console.log(imgFile)
- console.log(process.car.NODE_ENV)
-
- console.log()
- var token=this.carhelp.getToken()
- for(let i = 0;i < imgFile.length;i++)
- {
-
- wx.uploadFile({
- url:process.car.BASE_URL+"uploadPicture",
-
- // url:process.car.BASE_URL+"mobile/member/uploadBase64",
- name: 'photoFile',
- header: {
-
- // 'appId': process.car.VUE_APP_WXAPPID ,
-
- 'Authorization':token ,
-
- // 'openId': "wxa8954f417fa7c32f" ,
-
-
- 'accept': 'application/json',
- //#ifdef MP-WEIXIN
- "Content-Type": "multipart/form-data",//记得设置
- //#endif
-
- },
- filePath: imgFile[0],
- success: function(result) {
- let imgUrls = JSON.parse(result.data) //百度支持 this.site_url +'/' +
- //let image ={url: imgUrls.data};
- //_self.fileList.push(image); //微信
- _self.personal_info.faceImage = imgUrls.data;
- }
-
-
-
- })
-
-
- }
- },
- });
- },
- findByOpenId(){
- var openId=this.carhelp.getOpenId()
- if(openId==""){
- console.log("------------------")
- setTimeout(()=>{
- this.findByOpenId()
- },1000)
- return
- }
- uni.request({
- method:'get',
- url: process.car.BASE_URL + "/mobile/regUser/findByOpenId",
- data: {
- openId:openId,
- },
- header: {
- 'Content-Type': 'application/x-www-form-urlencoded',
- 'X-Requested-With': 'XMLHttpRequest',
- }
- }).then((response) => {
- // console.log('findByOpenId' +JSON.stringify(response))
- let [error, res] = response;
-
- if (res.data.code == 200&&res.data.result) {
- var token = res ? res.data.data.token : '';
- this.carhelp.setPersonInfo(res.data.data.memberInfo );
- this.carhelp.setToken(token);
- this.carhelp.setPersonInfoPlus(res.data.data);
-
-
- }
- }).catch(error => {
-
- })
- }
- }
- }
- </script>
- <style>
- page{
- background-color: #f4f0f0;
- }
- </style>
- <style lang="scss" scoped>
- .edit-text{
- margin-top: 10px;
- color:#999;
- }
- .edit-row{
- padding: 12px 0;
- .edit-label{
- display: flex;
- margin-top: 10px;
- flex-wrap: wrap;
- span{
- margin-right: 8px;
- background-color: #E5E7EA ;
- padding: 4px 10px;
- border-radius: 4px;
- font-size: 12px;
- margin-bottom: 10px;
- }
- .active{
- background-color: #FFC1BC;
- }
- }
- }
- .edit-line{
- height: 12px;
- background-color:#f4f0f0 ;
- margin-left: -15px;
- margin-right: -15px;
- }
- .edit-title{
- padding:12px 0;
- padding-left: 15px;
- background-color:#f4f0f0 ;
- margin-left: -15px;
- margin-right: -15px;
- }
- .edit-head{
- display: flex;
- padding: 20px 0;
- justify-content: center;
- }
- .personal-btn{
- padding: 15px 50px;
- }
- .edit-form{
- padding: 0 15px;
- background-color: #fff;
- }
- </style>
|