1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579 |
- <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>
- <view class="edit-row" @click="editTaOther">
- <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.taOther}}
- </view>
- </view>
- </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>
- <view>
- <u-popup border-radius="20" v-model="showTaOther" @close="closeTaOther" 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;">{{taOther.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="taOther">
- </textarea>
- </view>
- <view>
- <button style="border-radius:100rpx;background-color: #FF5E5E;width:75%;color:#FFFFFF"
- @click="saveTaOther">保存</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: '',
- taOther: '',
- personal_info: {
- faceImage: ' /static/img/sexMan.png'
- },
- height_ranges: [],
- weight_ranges: [],
- showSelfEvaluation: false,
- showTaOther: 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);
- this.personal_info = this.carhelp.getPersonInfo();
- // //('个人信息'+JSON.stringify(this.personal_info))
- let subject = {
- subject: ''
- }
- uni.showLoading({
- title: "加载中",
- mask: true,
- })
- loginApi.getBaseDictionary(subject).then(function(data) {
- uni.hideLoading();
- ////('基础字典'+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
- }*/
- }
- ////('住房情况'+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.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.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;
- }
- }
-
- }
-
- 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
- }*/
- }
- // //('行业情况'+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
- }*/
- }
- ////('年龄范围'+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
- }*/
- }
- ////('婚姻情况'+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) {
- // //('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;
- // //('选中'+JSON.stringify(_self.base_dictionary.hobbyInfoList[i]))
- }
- }
- }
- }
- // //('兴趣爱好'+JSON.stringify(_self.base_dictionary.hobbyInfoList));
- if (_self.personal_info.birthplace != null) {
- _self.personal_info.birthplaceN = getCityData(Number(_self.personal_info.birthplace));
- // //('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);
- //(_self.personalInfoChange)
- }, function(err) {
- //('获取基础字典错误' + 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();
- // //('获取城市成功'+JSON.stringify(data));
- if (data.result && data.data) {
- setCityData(data.data);
- _self.init_city_data();
- //_self.$refs.mpvuebirtydayCityPicker.setCityData(data.data);
- ////('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; //
- //('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) {
- //('获取城市列表错误' + 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; //
- //('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);
- //(_self.personalInfoChange)
- // //('个人信息'+JSON.stringify(this.personal_info))
- },
- onShow() {
- var item = this.carhelp.get("searchOrgItem")
- if (item) {
- //(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;
- //('自我评价' + JSON.stringify(this.selfEvaluation))
- },
- saveTaOther() {
- this.showTaOther = false;
- this.personal_info.taOther = this.taOther;
- },
- editSelfEvaluation() {
- if (this.personal_info.selfEvaluation != null) {
- this.selfEvaluation = this.personal_info.selfEvaluation;
- } else {
- this.selfEvaluation = ''
- }
- this.showSelfEvaluation = true
- //('editSelfEvaluation')
- },
- editTaOther(){
- if(this.personal_info.taOther!=null)
- {
- this.taOther = this.personal_info.taOther;
- }else
- {
- this.taOther = ''
- }
- this.showTaOther = true
- //('editTaOther')
- },
- open() {
- //('open');
- },
- close() {
- this.showSelfEvaluation = false
- //('close');
- },
- closeTaOther() {
- this.showTaOther = false;
- },
- selectInterest(index) {
- // let interest = this.interests;
- this.base_dictionary.hobbyInfoList[index].isMemberSelect = !this.base_dictionary.hobbyInfoList[index]
- .isMemberSelect;
- //('item' + JSON.stringify(this.base_dictionary.hobbyInfoList[index]))
- },
- birthdayAddressChange() {
- _self.show_birthday_address = true;
- // //('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) {
- // //('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;
- // //('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;
- })
- // //('地址选择'+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);
- // //('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);
- // //('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);
- // //('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;
- }
- }
- // //(this.personalInfoChange)
- // //(this.personal_info)
- for (var item in this.personal_info) {
- if (this.personalInfoChange[item] != this.personal_info[item]) {
- this.change = true;
- // //(this.personalInfoChange[item])
- // //(this.personal_info[item])
- }
- }
- if (!this.change) {
- uni.switchTab({
- url: './index'
- })
- } else {
- this.submitShow = true;
- }
- },
- confirm() {
- //('确认保存')
- 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;
- //('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;
- //('selfEvaluation' + personal_info.selfEvaluation);
- }
- if (_personal_info.orgId) {
- personal_info.orgId = _personal_info.orgId;
- //('orgId' + personal_info.orgId)
- }
- if (_personal_info.weight) {
- personal_info.weight = _personal_info.weight;
- //('weight' + personal_info.weight)
- }
- if (_personal_info.height) {
- personal_info.height = _personal_info.height;
- //('height' + personal_info.height)
- }
- if (_personal_info.education) {
- personal_info.education = _personal_info.education;
- //('education' + personal_info.education)
- }
- /*
- if(_personal_info.educationN)
- {
- personal_info.educationN = _personal_info.educationN;
- //('education'+personal_info.educationN)
- } */
- if (_personal_info.workUnit) {
- personal_info.workUnit = _personal_info.workUnit;
- //('workUnit' + personal_info.workUnit)
- }
- if (_personal_info.post) {
- personal_info.post = _personal_info.post;
- //('post' + personal_info.post)
- }
- if (_personal_info.industry) {
- personal_info.industry = _personal_info.industry;
- //('industry' + personal_info.industry)
- }
- /*
- if(_personal_info.industryN)
- {
- personal_info.industryN = _personal_info.industryN;
- //('industryN'+personal_info.industryN)
- } */
- if (_personal_info.salaryRange) {
- personal_info.salaryRange = _personal_info.salaryRange;
- //('salaryRange' + personal_info.salaryRange)
- }
- /*
- if(_personal_info.salaryRangeN)
- {
- personal_info.salaryRangeN = _personal_info.salaryRangeN;
- //('salaryRangeN'+personal_info.salaryRangeN)
- } */
- if (_personal_info.housingSituation) {
- personal_info.housingSituation = _personal_info.housingSituation;
- //('housingSituation' + personal_info.housingSituation)
- }
- /*
- if(_personal_info.housingSituationN)
- {
- personal_info.housingSituationN = _personal_info.housingSituationN;
- //('housingSituationN'+personal_info.housingSituationN)
- } */
- if (_personal_info.maritalStatus) {
- personal_info.maritalStatus = _personal_info.maritalStatus;
- //('maritalStatus' + personal_info.maritalStatus)
- }
- /*
- if(_personal_info.maritalStatusN)
- {
- personal_info.maritalStatusN = _personal_info.maritalStatusN;
- //('maritalStatusN'+personal_info.maritalStatusN)
- } */
- if (_personal_info.childStatus) {
- personal_info.childStatus = _personal_info.childStatus;
- //('childStatus' + personal_info.childStatus)
- }
- /*
- if(_personal_info.childStatusN)
- {
- personal_info.childStatusN = _personal_info.childStatusN;
- //('childStatusN'+personal_info.childStatusN)
- } */
- if (_personal_info.taIncomeRange) {
- personal_info.taIncomeRange = _personal_info.taIncomeRange;
- //('taIncomeRange' + personal_info.taIncomeRange)
- }
- /*
- if(_personal_info.taIncomeRangeN)
- {
- personal_info.taIncomeRangeN = _personal_info.taIncomeRangeN;
- //('taIncomeRangeN'+personal_info.taIncomeRangeN)
- } */
- if (_personal_info.birthplace) {
- personal_info.birthplace = _personal_info.birthplace;
- //('birthplace' + personal_info.birthplace)
- }
- /*
- if(_personal_info.birthplaceN)
- {
- personal_info.birthplaceN = _personal_info.birthplaceN;
- //('birthplaceN'+personal_info.birthplaceN)
- } */
- if (_personal_info.registeredResidence) {
- personal_info.registeredResidence = _personal_info.registeredResidence;
- //('registeredResidence' + personal_info.registeredResidence)
- }
- /*
- if(_personal_info.registeredResidenceN)
- {
- personal_info.registeredResidenceN = _personal_info.registeredResidenceN;
- //('registeredResidenceN'+personal_info.registeredResidenceN)
- } */
- if (_personal_info.workplace) {
- personal_info.workplace = _personal_info.workplace;
- //('workplace' + personal_info.workplace)
- }
- /*
- if(_personal_info.workplaceN)
- {
- personal_info.workplaceN = _personal_info.workplaceN;
- //('workplaceN'+personal_info.workplaceN)
- } */
- if (_personal_info.taWorkplace) {
- personal_info.taWorkplace = _personal_info.taWorkplace;
- //('taWorkplace' + personal_info.taWorkplace)
- }
- /*
- if(_personal_info.taWorkplaceN)
- {
- personal_info.taWorkplaceN = _personal_info.taWorkplaceN;
- //('taWorkplaceN'+personal_info.taWorkplaceN)
- } */
- if (_personal_info.taAgeRange) {
- personal_info.taAgeRange = _personal_info.taAgeRange;
- //('taAgeRange' + personal_info.taAgeRange)
- }
- /*
- if(_personal_info.taAgeRangeN)
- {
- personal_info.taAgeRangeN = _personal_info.taAgeRangeN;
- //('taAgeRangeN'+personal_info.taAgeRangeN)
- } */
- if (_personal_info.taEdu) {
- personal_info.taEdu = _personal_info.taEdu;
- //('taEdu' + personal_info.taEdu)
- }
- /*
- if(_personal_info.taEduN)
- {
- personal_info.taEduN = _personal_info.taEduN;
- //('education'+personal_info.taEduN)
- } */
- if (_personal_info.taOccupation) {
- personal_info.taOccupation = _personal_info.taOccupation;
- //('taOccupation' + personal_info.taOccupation)
- }
- /*
- if(_personal_info.taOccupationN)
- {
- personal_info.taOccupationN = _personal_info.taOccupationN;
- //('education'+personal_info.taOccupationN)
- } */
- if (_personal_info.taOther) {
- personal_info.taOther = _personal_info.taOther;
- //('taOther' + personal_info.taOther)
- }
- /*
- if(_personal_info.taOccupationN)
- {
- personal_info.taOccupationN = _personal_info.taOccupationN;
- //('education'+personal_info.taOccupationN)
- } */
- //('xxxx')
- loginApi.save_personal_info(personal_info).then((data) => {
- //('保存成功' + 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) {
- //('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) {
- //('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
- //('val' + JSON.stringify(val))
- _self.personal_info.maritalStatus = val.value;
- this.personal_info.maritalStatusN += result;
- })
- },
- houseConfirm(e) {
- //('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) {
- //('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) {
- //('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) {
- //('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) {
- //('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) {
- //('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;
- //('val' + val + 'index ' + index)
- let result = val.label
- _self.personal_info.taIncomeRange = val.value;
- _self.personal_info.taIncomeRangeN += result;
- })
- },
- taAgeRangeConfirm(e) {
- //('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) => {
- //('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) {
- //('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) => {
- //('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;
- })
- },
-
- heightConfirm(e) {
- //('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) {
- //('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');
- ////('url'+this.uploadUrl)
- ////(this.carhelp.getToken())
- let _this = this;
- uni.chooseImage({
- count: 1, //默认9
- // sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album', 'camera'], //从相册选择
- success: (res) => {
- let imgFile = res.tempFilePaths;
- //(process.car.BASE_URL + "mobile/member/uploadBase64")
- //(imgFile)
- //(process.car.NODE_ENV)
- //()
- 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: {
-
- 'Authorization': token,
-
- '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 == "") {
- //("------------------")
- 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) => {
- // //('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>
|