|
|
|
@ -442,6 +442,26 @@
|
|
|
|
|
photoUrl: '',
|
|
|
|
|
applyId: '',
|
|
|
|
|
},
|
|
|
|
|
formData2: {
|
|
|
|
|
name: '',
|
|
|
|
|
sex: '',
|
|
|
|
|
nationa: '',
|
|
|
|
|
formerName: '',
|
|
|
|
|
nationality: '',
|
|
|
|
|
maritalStatus: '',
|
|
|
|
|
political: '',
|
|
|
|
|
phone: '',
|
|
|
|
|
cerno: '',
|
|
|
|
|
address: '',
|
|
|
|
|
registeredAuthority: '',
|
|
|
|
|
permanentAddress: '',
|
|
|
|
|
residentBureau: '',
|
|
|
|
|
positionCapacity: '',
|
|
|
|
|
smPost: '',
|
|
|
|
|
smGrade: '',
|
|
|
|
|
photoUrl: '',
|
|
|
|
|
applyId: '',
|
|
|
|
|
},
|
|
|
|
|
selectedFile: null,
|
|
|
|
|
isLoading: false,
|
|
|
|
|
showResult: false,
|
|
|
|
@ -470,7 +490,7 @@
|
|
|
|
|
methods: {
|
|
|
|
|
submitForm() {
|
|
|
|
|
// 简单验证
|
|
|
|
|
if (!this.formData.name || !this.formData.sex || !this.formData.nationa || !this.formData.nationality || !this.formData.maritalStatus || !this.formData.political || !this.formData.phone || !this.formData.cerno || !this.formData.address || !this.formData.registeredAuthority || !this.formData.permanentAddress || !this.formData.residentBureau || !this.formData.positionCapacity || !this.formData.smPost || !this.formData.smGrade) {
|
|
|
|
|
if (!this.formData2.name || !this.formData2.sex || !this.formData2.nationa || !this.formData2.nationality || !this.formData2.maritalStatus || !this.formData2.political || !this.formData2.phone || !this.formData2.cerno || !this.formData2.address || !this.formData2.registeredAuthority || !this.formData2.permanentAddress || !this.formData2.residentBureau || !this.formData2.positionCapacity || !this.formData2.smPost || !this.formData2.smGrade) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请填写所有必填字段',
|
|
|
|
|
type: 'warning'
|
|
|
|
@ -487,11 +507,11 @@
|
|
|
|
|
}
|
|
|
|
|
// 准备表单数据
|
|
|
|
|
let formData = new FormData();
|
|
|
|
|
if (this.formData.name) formData.append("name", this.formData.name);
|
|
|
|
|
if (this.formData.sex) formData.append("sex", this.formData.sex);
|
|
|
|
|
if (this.formData.phone) formData.append("phone", this.formData.phone);
|
|
|
|
|
if (this.formData.smPost) formData.append("smPost", this.formData.smPost);
|
|
|
|
|
if (this.formData.smGrade) formData.append("smGrade", this.formData.smGrade);
|
|
|
|
|
if (this.formData2.name) formData.append("name", this.formData2.name);
|
|
|
|
|
if (this.formData2.sex) formData.append("sex", this.formData2.sex);
|
|
|
|
|
if (this.formData2.phone) formData.append("phone", this.formData2.phone);
|
|
|
|
|
if (this.formData2.smPost) formData.append("smPost", this.formData2.smPost);
|
|
|
|
|
if (this.formData2.smGrade) formData.append("smGrade", this.formData2.smGrade);
|
|
|
|
|
formData.append('photo', this.selectedFile);
|
|
|
|
|
// 显示加载状态
|
|
|
|
|
this.isLoading = true;
|
|
|
|
@ -791,6 +811,7 @@
|
|
|
|
|
// 从后端获取转义后的 JSON 字符串
|
|
|
|
|
if ([[${applyInfoList}]]){
|
|
|
|
|
this.formData = {...[[${applyInfoList}]]}
|
|
|
|
|
this.formData2 = {...[[${applyInfoList}]]}
|
|
|
|
|
// 获取图片并转换为 Blob
|
|
|
|
|
if (this.formData.photoUrl) {
|
|
|
|
|
fetch(this.formData.photoUrl)
|
|
|
|
|