|
@@ -12,18 +12,22 @@
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
|
|
<el-row :gutter="26">
|
|
<el-row :gutter="26">
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="姓名" prop="name">
|
|
|
|
|
|
+ <el-form-item label="姓名" prop="name"
|
|
|
|
+ :rules="[{ required: true, message: '姓名不能为空', trigger: 'blur' }]">
|
|
<el-input v-model="inputForm.name"></el-input>
|
|
<el-input v-model="inputForm.name"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="身份证号码" prop="idCard">
|
|
|
|
|
|
+ <el-form-item label="身份证号码" prop="idCard"
|
|
|
|
+ :rules="[{ required: true, validator: validator.isCardId, trigger: 'blur' }]">
|
|
<el-input v-model="inputForm.idCard"
|
|
<el-input v-model="inputForm.idCard"
|
|
@blur="idCardOnly(inputForm.idCard)"></el-input>
|
|
@blur="idCardOnly(inputForm.idCard)"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="性别" prop="sex">
|
|
|
|
|
|
+ <el-form-item label="性别" prop="sex" :rules="[
|
|
|
|
+ { required: true, message: '性别不能为空', trigger: 'change' }
|
|
|
|
+ ]">
|
|
<el-radio-group v-model="inputForm.sex">
|
|
<el-radio-group v-model="inputForm.sex">
|
|
<el-radio v-for="item in $dictUtils.getDictList('sex')" :label="item.value"
|
|
<el-radio v-for="item in $dictUtils.getDictList('sex')" :label="item.value"
|
|
:key="item.value">{{ item.label }}</el-radio>
|
|
:key="item.value">{{ item.label }}</el-radio>
|
|
@@ -31,12 +35,15 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="年龄" prop="age">
|
|
|
|
|
|
+ <el-form-item label="年龄" prop="age"
|
|
|
|
+ :rules="[{ required: true, message: '年龄不能为空', trigger: 'change' }]">
|
|
<el-input v-model="inputForm.age" type="number"></el-input>
|
|
<el-input v-model="inputForm.age" type="number"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="出生日期" prop="birthday">
|
|
|
|
|
|
+ <el-form-item label="出生日期" prop="birthday" :rules="[
|
|
|
|
+ { required: true, message: '请填写出生日期', trigger: 'blur' }
|
|
|
|
+ ]">
|
|
<el-date-picker style="width: 100%" v-model="inputForm.birthday"
|
|
<el-date-picker style="width: 100%" v-model="inputForm.birthday"
|
|
value-format="YYYY-MM-DD" placeholder="选择日期">
|
|
value-format="YYYY-MM-DD" placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
@@ -75,7 +82,8 @@
|
|
|
|
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="联系电话" prop="mobilePhone">
|
|
|
|
|
|
+ <el-form-item label="联系电话" prop="mobilePhone"
|
|
|
|
+ :rules="[{ required: true, message: '联系电话不能为空', trigger: 'change' }]">
|
|
<el-input v-model="inputForm.mobilePhone"
|
|
<el-input v-model="inputForm.mobilePhone"
|
|
@blur="mobilePhoneOnly(inputForm.mobilePhone)"></el-input>
|
|
@blur="mobilePhoneOnly(inputForm.mobilePhone)"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -90,6 +98,26 @@
|
|
<el-input v-model="inputForm.permanentAddress"></el-input>
|
|
<el-input v-model="inputForm.permanentAddress"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="密码:" prop="newPassword">
|
|
|
|
+ <el-input v-model="inputForm.newPassword" maxlength="50" placeholder="若不修改,请留空"
|
|
|
|
+ show-password></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="确认密码" prop="confirmNewPassword" :rules="inputForm.newPassword ? [
|
|
|
|
+ {
|
|
|
|
+ validator: validatePass2,
|
|
|
|
+ trigger: 'blur',
|
|
|
|
+ },
|
|
|
|
+ ] :
|
|
|
|
+ []
|
|
|
|
+ ">
|
|
|
|
+ <el-input v-model="inputForm.confirmNewPassword" maxlength="50" placeholder=""
|
|
|
|
+ show-password></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 学历信息</el-divider>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i> 学历信息</el-divider>
|
|
<el-row :gutter="26">
|
|
<el-row :gutter="26">
|
|
@@ -192,7 +220,8 @@
|
|
label: 'name', // 显示名称
|
|
label: 'name', // 显示名称
|
|
children: 'children' // 子级字段名
|
|
children: 'children' // 子级字段名
|
|
}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.department" :accordion="true"
|
|
}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.department" :accordion="true"
|
|
- size="default" @getValue="(value) => { inputForm.department = value }" />
|
|
|
|
|
|
+ size="default"
|
|
|
|
+ @getValue="(value) => { inputForm.department = value }" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -271,7 +300,8 @@
|
|
label: 'name', // 显示名称
|
|
label: 'name', // 显示名称
|
|
children: 'children' // 子级字段名
|
|
children: 'children' // 子级字段名
|
|
}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.department" :accordion="true"
|
|
}" :url="`/system-server/sys/office/treeData?type=2`" :value="inputForm.department" :accordion="true"
|
|
- size="default" @getValue="(value) => { inputForm.department = value }" />
|
|
|
|
|
|
+ size="default"
|
|
|
|
+ @getValue="(value) => { inputForm.department = value }" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -853,6 +883,9 @@ export default {
|
|
socialSecurityPictureOppositeUrl: '',
|
|
socialSecurityPictureOppositeUrl: '',
|
|
roleIdList: [],
|
|
roleIdList: [],
|
|
postIdList: [],
|
|
postIdList: [],
|
|
|
|
+
|
|
|
|
+ confirmNewPassword: "",//确认密码
|
|
|
|
+ newPassword: "" // 密码
|
|
},
|
|
},
|
|
keyWatch: '',
|
|
keyWatch: '',
|
|
roleList: [],
|
|
roleList: [],
|
|
@@ -900,6 +933,13 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ validatePass2(rule, value, callback) {
|
|
|
|
+ if (value !== this.inputForm.newPassword) {
|
|
|
|
+ callback(new Error("两次输入密码不一致!"));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
handleUploadSuccess(response, file, fileList) {
|
|
handleUploadSuccess(response, file, fileList) {
|
|
return this.handleAvatarSuccess(response, file, fileList, null, 'front')
|
|
return this.handleAvatarSuccess(response, file, fileList, null, 'front')
|
|
},
|
|
},
|