|
@@ -157,7 +157,7 @@
|
|
idtype: '1',
|
|
idtype: '1',
|
|
gender: '',
|
|
gender: '',
|
|
juzhuDizhi: '',
|
|
juzhuDizhi: '',
|
|
- shenfenzhengUrl:'',
|
|
|
|
|
|
+ shenfenzhengUrl: '',
|
|
minzu: {},
|
|
minzu: {},
|
|
shuxiang: {
|
|
shuxiang: {
|
|
|
|
|
|
@@ -202,27 +202,35 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
-
|
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '加载中'
|
|
|
|
+ });
|
|
this.initRequests()
|
|
this.initRequests()
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
async initRequests() {
|
|
async initRequests() {
|
|
- await Promise.all([
|
|
|
|
- this.getXueli(),
|
|
|
|
- this.getHunyin(),
|
|
|
|
- this.getMinzu(),
|
|
|
|
- this.getXingzuo(),
|
|
|
|
- this.getShuxiang(),
|
|
|
|
- this.getJiguan(),
|
|
|
|
- ]);
|
|
|
|
- if (this.status == 'edit') {
|
|
|
|
- this.$emit('finishDom','gerenZiliao');
|
|
|
|
|
|
+ try {
|
|
|
|
+ await Promise.all([
|
|
|
|
+ this.getXueli(),
|
|
|
|
+ this.getHunyin(),
|
|
|
|
+ this.getMinzu(),
|
|
|
|
+ this.getXingzuo(),
|
|
|
|
+ this.getShuxiang(),
|
|
|
|
+ this.getJiguan(),
|
|
|
|
+ ]);
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ if (this.status == 'edit') {
|
|
|
|
+ this.$emit('finishDom', 'gerenZiliao');
|
|
|
|
+ }
|
|
|
|
+ } catch (e) {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: `请求失败!`,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 2000
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
editinfo(data) {
|
|
editinfo(data) {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -236,10 +244,10 @@
|
|
this.formData.jiguanShiName = data.jiguanShiName
|
|
this.formData.jiguanShiName = data.jiguanShiName
|
|
this.formData.juzhuDizhi = data.juzhuDizhi
|
|
this.formData.juzhuDizhi = data.juzhuDizhi
|
|
this.formData.birthday = data.birthday
|
|
this.formData.birthday = data.birthday
|
|
- this.formData.minzu = this.dataForId(this.minzuList, data.minzu)||''
|
|
|
|
|
|
+ this.formData.minzu = this.dataForId(this.minzuList, data.minzu) || ''
|
|
this.formData.gender = data.gender
|
|
this.formData.gender = data.gender
|
|
- this.formData.xueli = this.dataForId(this.xueliList, data.xueli)||''
|
|
|
|
- this.formData.hunyin = this.dataForId(this.hunyinList, data.hunyin)||''
|
|
|
|
|
|
+ this.formData.xueli = this.dataForId(this.xueliList, data.xueli) || ''
|
|
|
|
+ this.formData.hunyin = this.dataForId(this.hunyinList, data.hunyin) || ''
|
|
this.formData.hujiDizhi = data.hujiDizhi
|
|
this.formData.hujiDizhi = data.hujiDizhi
|
|
this.formData.juzhuDizhi = data.juzhuDizhi
|
|
this.formData.juzhuDizhi = data.juzhuDizhi
|
|
this.formData.xingzuo = this.dataForId(this.xingzuoList, data.xingzuo) || ''
|
|
this.formData.xingzuo = this.dataForId(this.xingzuoList, data.xingzuo) || ''
|
|
@@ -481,14 +489,16 @@
|
|
getFileUrl(data) {
|
|
getFileUrl(data) {
|
|
this.formData.shenfenzhengUrl = data
|
|
this.formData.shenfenzhengUrl = data
|
|
console.log('data', data);
|
|
console.log('data', data);
|
|
- jiazhengIdcard({url:this.formData.shenfenzhengUrl}).then(res=>{
|
|
|
|
- console.log('res',res);
|
|
|
|
- if(res.code ==0){
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ jiazhengIdcard({
|
|
|
|
+ url: this.formData.shenfenzhengUrl
|
|
|
|
+ }).then(res => {
|
|
|
|
+ console.log('res', res);
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
this.formData.realName = res.data.name
|
|
this.formData.realName = res.data.name
|
|
this.formData.gender = res.data.genderId
|
|
this.formData.gender = res.data.genderId
|
|
this.formData.minzu.name = res.data.ethnicity
|
|
this.formData.minzu.name = res.data.ethnicity
|
|
@@ -543,7 +553,7 @@
|
|
this.formData.gender = data
|
|
this.formData.gender = data
|
|
},
|
|
},
|
|
selectChangeHunyinList(data) {
|
|
selectChangeHunyinList(data) {
|
|
- console.log('data',data[0]);
|
|
|
|
|
|
+ console.log('data', data[0]);
|
|
this.formData.hunyin = data[0]
|
|
this.formData.hunyin = data[0]
|
|
},
|
|
},
|
|
switchXingzuoChange(e) {
|
|
switchXingzuoChange(e) {
|