|
|
@@ -378,51 +378,111 @@ export default {
|
|
|
},
|
|
|
//回填数据
|
|
|
backFillData() {
|
|
|
- if (this.historyData || this.historyData.id) {
|
|
|
+ if (Object.keys(this.historyData).length > 0 || this.historyData.id) {
|
|
|
for (let i in this.historyData) {
|
|
|
this.$set(this.infoForm, i, this.historyData[i].value);
|
|
|
}
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs["infoForm"].clearValidate();
|
|
|
});
|
|
|
- }
|
|
|
- if (!this.infoForm["name"]) {
|
|
|
- if (this.$store.state.userInfo.realname) {
|
|
|
- this.$set(this.infoForm, "name", this.$store.state.userInfo.realname);
|
|
|
+ } else {
|
|
|
+ if (!this.infoForm["name"]) {
|
|
|
+ if (this.$store.state.userInfo.realname) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "name",
|
|
|
+ this.$store.state.userInfo.realname
|
|
|
+ );
|
|
|
+ this.nameDisabledStatus = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
this.nameDisabledStatus = true;
|
|
|
}
|
|
|
- } else {
|
|
|
- this.nameDisabledStatus = true;
|
|
|
- }
|
|
|
- if (!this.infoForm["idcard"]) {
|
|
|
- if (this.$store.state.userInfo.idCard) {
|
|
|
- this.$set(this.infoForm, "idcard", this.$store.state.userInfo.idCard);
|
|
|
+ if (!this.infoForm["idcard"]) {
|
|
|
+ if (this.$store.state.userInfo.idCard) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "idcard",
|
|
|
+ this.$store.state.userInfo.idCard
|
|
|
+ );
|
|
|
+ this.idcardDisabledStatus = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
this.idcardDisabledStatus = true;
|
|
|
}
|
|
|
- } else {
|
|
|
- this.idcardDisabledStatus = true;
|
|
|
- }
|
|
|
- if (!this.infoForm["telphone"]) {
|
|
|
- if (this.$store.state.userInfo.telphone) {
|
|
|
+ if (!this.infoForm["telphone"]) {
|
|
|
+ if (this.$store.state.userInfo.telphone) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "telphone",
|
|
|
+ this.$store.state.userInfo.telphone
|
|
|
+ );
|
|
|
+ this.telphoneDisabledStatus = true;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.telphoneDisabledStatus = true;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.infoForm["work_unit"] &&
|
|
|
+ this.$store.state.userInfo.companyName
|
|
|
+ ) {
|
|
|
this.$set(
|
|
|
this.infoForm,
|
|
|
- "telphone",
|
|
|
- this.$store.state.userInfo.telphone
|
|
|
+ "work_unit",
|
|
|
+ this.$store.state.userInfo.companyName
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (!this.infoForm["sex"] && this.$store.state.userInfo.sex) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "sex",
|
|
|
+ this.$store.state.userInfo.sex == 1
|
|
|
+ ? "男"
|
|
|
+ : this.$store.state.userInfo.sex == 2
|
|
|
+ ? "女"
|
|
|
+ : null
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.infoForm["education"] &&
|
|
|
+ this.$store.state.userInfo.eduLevel
|
|
|
+ ) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "education",
|
|
|
+ this.$store.state.userInfo.eduLevel
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.infoForm["recent_photos"] &&
|
|
|
+ this.$store.state.userInfo.oneInchPhotos
|
|
|
+ ) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "recent_photos",
|
|
|
+ this.$store.state.userInfo.oneInchPhotos
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.infoForm["idcard_face_photo"] &&
|
|
|
+ this.$store.state.userInfo.idCardImg1
|
|
|
+ ) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "idcard_face_photo",
|
|
|
+ this.$store.state.userInfo.idCardImg1
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.infoForm["idcard_national_photo"] &&
|
|
|
+ this.$store.state.userInfo.idCardImg2
|
|
|
+ ) {
|
|
|
+ this.$set(
|
|
|
+ this.infoForm,
|
|
|
+ "idcard_national_photo",
|
|
|
+ this.$store.state.userInfo.idCardImg2
|
|
|
);
|
|
|
- this.telphoneDisabledStatus = true;
|
|
|
}
|
|
|
- } else {
|
|
|
- this.telphoneDisabledStatus = true;
|
|
|
- }
|
|
|
- if (
|
|
|
- !this.infoForm["work_unit"] &&
|
|
|
- this.$store.state.userInfo.companyName
|
|
|
- ) {
|
|
|
- this.$set(
|
|
|
- this.infoForm,
|
|
|
- "work_unit",
|
|
|
- this.$store.state.userInfo.companyName
|
|
|
- );
|
|
|
}
|
|
|
},
|
|
|
//照片处理逻辑
|