first commit
This commit is contained in:
@@ -0,0 +1,377 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar @click-left="history.back()" fixed left-arrow placeholder
|
||||
title="修改个人信息"></van-nav-bar>
|
||||
|
||||
<van-form :show-error-message="true" @submit="doSubmit" class="mt5"
|
||||
input-align="right"
|
||||
ref="form"
|
||||
scroll-to-error
|
||||
validate-trigger="onSubmit">
|
||||
<van-cell-group inset>
|
||||
<van-field label="工号" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('loginname')}"></van-field>
|
||||
<van-field label="姓名" left-icon="contact"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></van-field>
|
||||
<van-field clickable label="性别"
|
||||
left-icon="ellipsis"
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
v-model="formData.sex"></van-field>
|
||||
<van-popup position="bottom" v-model="sexPicker">
|
||||
<van-picker
|
||||
:columns="['男','女']"
|
||||
@cancel="sexPicker = false"
|
||||
@confirm="(val)=>{this.formData.sex = val;sexPicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field @click="marriagePicker=true" label="婚否" left-icon="ellipsis"
|
||||
readonly placeholder="请选择婚否" v-model="formData.marriage"></van-field>
|
||||
<van-popup position="bottom" v-model="marriagePicker">
|
||||
<van-picker
|
||||
:columns="['已婚','未婚']"
|
||||
@cancel="marriagePicker = false"
|
||||
@confirm="(val)=>{formData.marriage = val;marriagePicker=false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--临时屏蔽-->
|
||||
<template v-if="false">
|
||||
<van-field :rules="[{ required:true, message: '请选择民族' }]" clickable label="民族"
|
||||
left-icon="bar-chart-o"
|
||||
placeholder="请选择民族" readonly
|
||||
v-model="formData.nation"></van-field>
|
||||
<van-popup position="bottom" v-model="nationPicker">
|
||||
<van-picker
|
||||
:columns="nationColumns"
|
||||
@cancel="nationPicker = false"
|
||||
@confirm="(v)=>{formData.nation = v;nationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学历"
|
||||
|
||||
left-icon="coupon-o"
|
||||
placeholder="请选择学历" readonly
|
||||
v-model="formData.education"></van-field>
|
||||
<van-popup position="bottom" v-model="educationPicker">
|
||||
<van-picker
|
||||
:columns="educationColumns"
|
||||
@cancel="educationPicker = false"
|
||||
@confirm="(v)=>{formData.education = v;educationPicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field clickable
|
||||
label="学位"
|
||||
left-icon="comment-o"
|
||||
placeholder="请选择学位" readonly
|
||||
v-model="formData.academicDegree"></van-field>
|
||||
<van-popup position="bottom" v-model="academicDegreePicker">
|
||||
<van-picker
|
||||
:columns="academicDegreeColumns"
|
||||
@cancel="academicDegreePicker = false"
|
||||
@confirm="(v)=>{formData.academicDegree = v;academicDegreePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="政治面貌" left-icon="label-o"
|
||||
placeholder="请填写政治面貌" readonly
|
||||
v-model="formData.political"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field @click="idTypePicker=true" label="有效证件类型" left-icon="label-o"
|
||||
placeholder="请选择有效证件类型"
|
||||
readonly v-model="formData.idType">
|
||||
</van-field>
|
||||
<van-popup position="bottom" v-model="idTypePicker">
|
||||
<van-picker
|
||||
:columns="idTypeColumns"
|
||||
@cancel="idTypePicker = false"
|
||||
@confirm="(v)=>{formData.idType = v;idTypePicker = false}"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field label="证件号"
|
||||
left-icon="idcard"
|
||||
placeholder="请填写身份证号码"
|
||||
:rules="[{ pattern :/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的证件号' }]"
|
||||
v-model="formData.idcard"></van-field>
|
||||
<van-field label="联系电话"
|
||||
left-icon="phone-o"
|
||||
placeholder="请填写联系电话"
|
||||
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '请输入正确的手机号' }]"
|
||||
type="tel"
|
||||
v-model="formData.mobile"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10" inset>
|
||||
<!-- <van-field label="户口所在地" left-icon="wap-home-o"-->
|
||||
<!-- placeholder="请填写户口所在地" readonly-->
|
||||
<!-- v-model="formData.registeredResidence"></van-field>-->
|
||||
<!-- <van-field label="现居住地" left-icon="home-o"-->
|
||||
<!-- placeholder="请填写现居住地" readonly-->
|
||||
<!-- v-model="formData.homeAddress"></van-field>-->
|
||||
<van-field label="工作单位" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('unit').getName()}"></van-field>
|
||||
<van-field label="分工会" left-icon="cluster-o"
|
||||
readonly
|
||||
value="${@shiro.getPrincipalProperty('union').getUnionname()}"></van-field>
|
||||
<!-- <van-field label="职务" left-icon="debit-pay"-->
|
||||
<!-- placeholder="请填写职务" readonly-->
|
||||
<!-- v-model="formData.position"></van-field>-->
|
||||
</van-cell-group>
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div class="van-cell__title van-field__label" style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-friends-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label" style="width: auto">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-button @click="family.push({})" icon="plus"
|
||||
native-type="button" round size="mini" style="width: 40px"
|
||||
type="primary"
|
||||
v-if="family && family.length>0 && family.length<3"></van-button>
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
<template v-if="family && family.length>0">
|
||||
<div class="mt5" v-for="o,i in family">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(i+1)}}</span>
|
||||
<van-button @click="family.splice(i,1)"
|
||||
icon="minus" native-type="button" round size="mini"
|
||||
style="width: 40px"
|
||||
type="danger"></van-button>
|
||||
</div>
|
||||
<van-field :rules="[{ required:true, message: '请填写与本人关系' }]" label="关系" placeholder="请填写与本人关系"
|
||||
v-model="o.relation"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写姓名' }]" label="姓名" placeholder="请填写姓名"
|
||||
v-model="o.name"></van-field>
|
||||
<van-field :rules="[{ required:true, message: '请填写联系方式' }]" label="联系方式" placeholder="请填写联系方式"
|
||||
type="tel"
|
||||
v-model="o.mobile"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button @click="family.push({})"
|
||||
icon="plus" native-type="button" round size="mini"
|
||||
style="width: 50px"
|
||||
type="primary"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<!-- <van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-notes-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>个人工作简历</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
|
||||
autosize
|
||||
readonly
|
||||
autosize
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请输入个人工作简历"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.vita"
|
||||
></van-field>
|
||||
</div>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="mt10 up_down" inset>
|
||||
<div class="van-cell">
|
||||
<div style="display: flex">
|
||||
<div class="van-field__left-icon">
|
||||
<i class="van-icon van-icon-award-o"></i>
|
||||
</div>
|
||||
<div class="van-cell__title van-field__label">
|
||||
<span>特长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-divider></van-divider>
|
||||
<van-field
|
||||
|
||||
autosize
|
||||
autosize
|
||||
readonly
|
||||
input-align="left"
|
||||
maxlength="200"
|
||||
placeholder="请填写个人特长"
|
||||
rows="4"
|
||||
show-word-limit
|
||||
style="padding: 0"
|
||||
type="textarea"
|
||||
v-model="formData.specialSkill"
|
||||
></van-field>
|
||||
</div>
|
||||
</van-cell-group>-->
|
||||
|
||||
<div style="margin: 20px 20px 10px;">
|
||||
<van-button :color="themeColor" block native-type="submit" style="border-radius: 10px"
|
||||
type="info">
|
||||
提 交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const political = []
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
sexPicker: false,
|
||||
marriagePicker: false,
|
||||
applyRecords: [],
|
||||
formData: {},
|
||||
nationPicker: false,
|
||||
educationPicker: false,
|
||||
academicDegreePicker: false,
|
||||
family: [],
|
||||
educationColumns: [
|
||||
'博士研究生', '硕士研究生', '本科', '专科', '中专中技', '高中', '初中以下'
|
||||
],
|
||||
academicDegreeColumns: [
|
||||
'学士', '硕士', '博士'
|
||||
],
|
||||
nationColumns: [],
|
||||
memberStatusColumn: {
|
||||
MEMBER: 1,
|
||||
APPLYING: 2,
|
||||
NOTMEBMER: 3,
|
||||
},
|
||||
memberStatus: null,
|
||||
idTypePicker: false,
|
||||
idTypeColumns: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSubmit() {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '温馨提醒',
|
||||
message: GetQueryString("taskId") ? '您的手机号信息已核对,确认提交?' : '您确定要提交吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const formData = clone(this.formData)
|
||||
formData.taskId = GetQueryString("taskId") ? GetQueryString("taskId") : null
|
||||
formData.family = JSON.stringify(this.family)
|
||||
const resp = await $.post("/platform/member/apply/submit/doEdit", formData)
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
history.back()
|
||||
// location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
addFamily() {
|
||||
this.family.push({})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const resp = await $.get("/platform/member/apply/submit/unionInfo")
|
||||
this.applyRecords = resp.data.records
|
||||
if (resp.data.member === 1) {
|
||||
this.memberStatus = this.memberStatusColumn.MEMBER
|
||||
} else {
|
||||
if (resp.data.record != null) {
|
||||
this.memberStatus = this.memberStatusColumn.APPLYING
|
||||
} else {
|
||||
this.memberStatus = this.memberStatusColumn.NOTMEBMER
|
||||
}
|
||||
}
|
||||
this.$set(this.formData, "isMember", "${@shiro.getPrincipalProperty('member')}")
|
||||
this.$set(this.formData, "sex", "${@shiro.getPrincipalProperty('sex')}")
|
||||
this.$set(this.formData, "marriage", "${@shiro.getPrincipalProperty('marriage')}")
|
||||
this.$set(this.formData, "position", "${@shiro.getPrincipalProperty('position')}")
|
||||
this.$set(this.formData, "nation", "${@shiro.getPrincipalProperty('nation')}")
|
||||
this.$set(this.formData, "mobile", resp.data.mobile)
|
||||
this.$set(this.formData, "political", "${@shiro.getPrincipalProperty('political')}")
|
||||
this.$set(this.formData, "id", "${@shiro.getPrincipalProperty('id')}")
|
||||
this.$set(this.formData, "education", "${@shiro.getPrincipalProperty('education')}")
|
||||
this.$set(this.formData, "academicDegree", "${@shiro.getPrincipalProperty('academicDegree')}")
|
||||
this.$set(this.formData, "idcard", resp.data.idcard)
|
||||
this.$set(this.formData, "idType", resp.data.idType)
|
||||
this.$set(this.formData, "registeredResidence", "${@shiro.getPrincipalProperty('registeredResidence')}")
|
||||
this.$set(this.formData, "homeAddress", "${@shiro.getPrincipalProperty('homeAddress')}")
|
||||
this.$set(this.formData, "vita", "${@shiro.getPrincipalProperty('vita')}")
|
||||
this.$set(this.formData, "specialSkill", "${@shiro.getPrincipalProperty('specialSkill')}")
|
||||
const {data} = await $.get("/mobile/member/getAllNation");
|
||||
this.nationColumns = data.map(v => {
|
||||
return v.mzmc
|
||||
})
|
||||
|
||||
const idTypeRespData = await getDictByCode("idType")
|
||||
console.log(idTypeRespData)
|
||||
this.idTypeColumns = idTypeRespData.map(v => {
|
||||
return v.name
|
||||
})
|
||||
// console.log(idTypeColumns)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell, .van-picker button, .submit .van-button--normal {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user