dev_2022-03-03
e 3 years ago
parent c940939b1a
commit 5781b3ab26
  1. 284
      src/views/user/AddUser.vue

@ -36,52 +36,56 @@
</el-form-item> </el-form-item>
<el-form-item label="证件类型" prop="documentType"> <el-form-item label="证件类型" prop="documentType">
<el-select <el-input v-model="form.documentType" placeholder="请输入"></el-input>
v-model="form.documentType" <!-- <el-select-->
clearable <!-- v-model="form.documentType"-->
placeholder="请选择证件类型" <!-- clearable-->
> <!-- placeholder="请选择证件类型"-->
<el-option <!-- >-->
v-for="(item,index) in documentTypeList" <!-- <el-option-->
:key="index" <!-- v-for="(item,index) in documentTypeList"-->
:label="item.name" <!-- :key="index"-->
:value="item.value" <!-- :label="item.name"-->
></el-option> <!-- :value="item.value"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="国家"> <el-form-item label="国家">
<el-select <el-input v-model="form.countries" placeholder="请输入"></el-input>
v-model="form.countries" <!-- <el-select-->
clearable <!-- v-model="form.countries"-->
placeholder="请选择国家" <!-- clearable-->
> <!-- placeholder="请选择国家"-->
<el-option <!-- >-->
v-for="(item,index) in countryList" <!-- <el-option-->
:key="index" <!-- v-for="(item,index) in countryList"-->
:label="item.name" <!-- :key="index"-->
:value="item.value" <!-- :label="item.name"-->
></el-option> <!-- :value="item.value"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="城市"> <el-form-item label="城市">
<el-select <el-input v-model="form.cityName" placeholder="请输入"></el-input>
v-model="form.cityId" <!-- <el-select-->
clearable <!-- v-model="form.cityId"-->
placeholder="请选择城市" <!-- clearable-->
:disabled="form.provinceId ? false : true" <!-- placeholder="请选择城市"-->
> <!-- :disabled="form.cityId ? false : true"-->
<el-option <!-- >-->
v-for="(item,index) in cityList" <!-- <el-option-->
:key="index" <!-- v-for="(item,index) in cityList"-->
:label="item.cityName" <!-- :key="index"-->
:value="item.cityId" <!-- :label="item.cityName"-->
></el-option> <!-- :value="item.cityId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="教育程度"> <el-form-item label="教育程度">
<!-- <el-input v-model="form.educationDegree" placeholder="请输入"></el-input>-->
<el-select <el-select
v-model="form.educationDegree" v-model="form.educationDegree"
clearable clearable
@ -96,10 +100,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="schoolId" label="当前院校"> <el-form-item label="当前院校">
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校"> <el-input v-model="form.schoolName" placeholder="请输入"></el-input>
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> <!-- <el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校">-->
</el-select> <!-- <el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -121,19 +126,20 @@
</el-form-item> </el-form-item>
<el-form-item label="省份"> <el-form-item label="省份">
<el-select <el-input v-model="form.provinceName" placeholder="请输入"></el-input>
v-model="form.provinceId" <!-- <el-select-->
clearable <!-- v-model="form.provinceId"-->
placeholder="请选择省份" <!-- clearable-->
@change="getCity" <!-- placeholder="请选择省份"-->
> <!-- @change="getCity"-->
<el-option <!-- >-->
v-for="(item,index) in provinceList" <!-- <el-option-->
:key="index" <!-- v-for="(item,index) in provinceList"-->
:label="item.provinceName" <!-- :key="index"-->
:value="item.provinceId" <!-- :label="item.provinceName"-->
></el-option> <!-- :value="item.provinceId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="出生日期"> <el-form-item label="出生日期">
@ -231,39 +237,42 @@
<div> <div>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="职业"> <el-form-item label="职业">
<el-select <el-input v-model="item.professionalName" placeholder="请输入"></el-input>
v-model="item.personalCareerId" <!-- <el-select-->
placeholder="请选择职业" <!-- v-model="item.personalCareerId"-->
> <!-- placeholder="请选择职业"-->
<el-option <!-- >-->
v-for="item1 in occupationList" <!-- <el-option-->
:key="item1.value" <!-- v-for="item1 in occupationList"-->
:label="item1.label" <!-- :key="item1.value"-->
:value="item1.value" <!-- :label="item1.label"-->
></el-option> <!-- :value="item1.value"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="院校"> <el-form-item label="院校">
<el-select v-model="item.schoolId" filterable clearable placeholder="请选择院校" @change="id => getSchoolName(id,index)"> <el-input v-model="item.schoolName" placeholder="请输入"></el-input>
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> <!-- <el-select v-model="item.schoolId" filterable clearable placeholder="请选择院校" @change="id => getSchoolName(id,index)">-->
</el-select> <!-- <el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="专业类"> <el-form-item label="专业类">
<el-select <el-input v-model="item.professionalClassName" placeholder="请输入"></el-input>
v-model="item.professionalClassId" <!-- <el-select-->
:disabled="item.disciplineId ? false : true" <!-- v-model="item.professionalClassId"-->
clearable <!-- :disabled="item.disciplineId ? false : true"-->
placeholder="请选择专业类" <!-- clearable-->
@change="id => getItemProfessional(id,index)" <!-- placeholder="请选择专业类"-->
@clear="() => clearItemProfess(index)" <!-- @change="id => getItemProfessional(id,index)"-->
> <!-- @clear="() => clearItemProfess(index)"-->
<el-option <!-- >-->
v-for="(item2,index) in item.ProfessionalClassList" <!-- <el-option-->
:key="index" <!-- v-for="(item2,index) in item.ProfessionalClassList"-->
:label="item2.professionalClassName" <!-- :key="index"-->
:value="item2.professionalClassId" <!-- :label="item2.professionalClassName"-->
></el-option> <!-- :value="item2.professionalClassId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</div> </div>
@ -274,36 +283,38 @@
<br /> <br />
</el-form-item> </el-form-item>
<el-form-item label="专业学科"> <el-form-item label="专业学科">
<el-select <el-input v-model="item.disciplineName" placeholder="请输入"></el-input>
v-model="item.disciplineId" <!-- <el-select-->
clearable <!-- v-model="item.disciplineId"-->
placeholder="请选择专业学科" <!-- clearable-->
@change="id => getItemProfessionalClass(id,index)" <!-- placeholder="请选择专业学科"-->
@clear="() => clearItemClass(index)" <!-- @change="id => getItemProfessionalClass(id,index)"-->
> <!-- @clear="() => clearItemClass(index)"-->
<el-option <!-- >-->
v-for="(item3,index) in item.subjectList" <!-- <el-option-->
:key="index" <!-- v-for="(item3,index) in item.subjectList"-->
:label="item3.disciplineName" <!-- :key="index"-->
:value="item3.disciplineId" <!-- :label="item3.disciplineName"-->
></el-option> <!-- :value="item3.disciplineId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="专业"> <el-form-item label="专业">
<el-select <el-input v-model="item.professionalName" placeholder="请输入"></el-input>
v-model="item.professionalId" <!-- <el-select-->
:disabled="item.professionalClassId ? false : true" <!-- v-model="item.professionalId"-->
clearable <!-- :disabled="item.professionalClassId ? false : true"-->
placeholder="请选择专业" <!-- clearable-->
@change="getItemStuGrade" <!-- placeholder="请选择专业"-->
> <!-- @change="getItemStuGrade"-->
<el-option <!-- >-->
v-for="(item4,index) in item.ProfessionalList" <!-- <el-option-->
:key="index" <!-- v-for="(item4,index) in item.ProfessionalList"-->
:label="item4.professionalName" <!-- :key="index"-->
:value="item4.professionalId" <!-- :label="item4.professionalName"-->
></el-option> <!-- :value="item4.professionalId"-->
</el-select> <!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</div> </div>
@ -457,7 +468,7 @@ export default {
userId: this.$store.state.userId, userId: this.$store.state.userId,
userName: '', // userName: '', //
uniqueIdentification: '', // uniqueIdentification: '', //
documentType: 1, // documentType: '居民身份证', //
idNumber: '', // idNumber: '', //
cityId: '', // cityId: '', //
countries: '中国', // countries: '中国', //
@ -622,12 +633,14 @@ export default {
getdata() { getdata() {
this.$get(this.api.queryUserInfoDetails,{ userId: this.userId }).then(res => { this.$get(this.api.queryUserInfoDetails,{ userId: this.userId }).then(res => {
let userInfo = res.result.hrUserInfo let userInfo = res.result.hrUserInfo
let schoolId = userInfo.schoolId this.form.accountId = userInfo.userId
this.form = Object.assign(userInfo,res.result.userAccountList[0]) this.originAccount = res.result.userAccountList[0].account
this.form.schoolId = schoolId
this.form.accountId = userInfo.id
this.originAccount = this.form.account
this.archivesList = res.result.personalFileList this.archivesList = res.result.personalFileList
this.form.documentType = '居民身份证'
this.form.countries = res.result.hrUserInfo.countries
this.form.cityName = res.result.hrUserInfo.cityName
this.form.schoolName = res.result.hrUserInfo.schoolName
this.form.provinceName = res.result.hrUserInfo.provinceName
this.$nextTick(() => { this.$nextTick(() => {
if(this.form.provinceId){ if(this.form.provinceId){
@ -636,30 +649,31 @@ export default {
if(this.archivesList.length){ if(this.archivesList.length){
this.archivesList.forEach((e,k) =>{ this.archivesList.forEach((e,k) =>{
this.$set(e, 'subjectList', this.subjectList); this.$set(e, 'subjectList', this.subjectList);
this.$set(e, 'disciplineId', e.disciplineId ? e.disciplineId : ''); this.$set(e, 'disciplineId', e.disciplineName ? e.disciplineName : '');
this.$set(e, 'disciplineName', e.disciplineName ? e.disciplineName : ''); this.$set(e, 'disciplineName', e.disciplineName ? e.disciplineName : '');
this.$set(e, 'professionalClassId', e.professionalClassId ? e.professionalClassId : ''); this.$set(e, 'professionalClassId', e.professionalClassName ? e.professionalClassName : '');
this.$set(e, 'professionalClassName', e.professionalClassName ? e.professionalClassName : ''); this.$set(e, 'professionalClassName', e.professionalClassName ? e.professionalClassName : '');
this.$set(e, 'professionalId', e.professionalId ? e.professionalId : ''); this.$set(e, 'professionalId', e.professionalName ? e.professionalName : '');
this.$set(e, 'professionalName', e.professionalName ? e.professionalName : ''); this.$set(e, 'professionalName', e.professionalName ? e.professionalName : '');
this.$set(e, 'schoolId', e.schoolId ? e.schoolId : ''); this.$set(e, 'schoolId', e.schoolName ? e.schoolName : '');
this.$set(e, 'schoolName', e.schoolName ? e.schoolName : ''); this.$set(e, 'schoolName', e.schoolName ? e.schoolName : '');
if(e.disciplineId){ // if(e.disciplineId){
this.$get(this.api.queryCourseProfessionalClass, { disciplineId: e.disciplineId }).then(res => { // this.$get(this.api.queryCourseProfessionalClass, { disciplineId: e.disciplineId }).then(res => {
this.$set(e, 'ProfessionalClassList', res.list); // this.$set(e, 'ProfessionalClassList', res.list);
}).catch(res => {}); // }).catch(res => {});
}else{ // }else{
this.$set(e, 'ProfessionalClassList', []); // this.$set(e, 'ProfessionalClassList', []);
} // }
if(e.professionalClassId){ // if(e.professionalClassId){
this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => { // this.$get(this.api.queryCourseProfessional,{ professionalClassId: e.professionalClassId }).then(res => {
this.$set(e, 'ProfessionalList', res.list); // this.$set(e, 'ProfessionalList', res.list);
}).catch(res => {}); // }).catch(res => {});
}else{ // }else{
this.$set(e, 'ProfessionalList', []); // this.$set(e, 'ProfessionalList', []);
} // }
}) })
}else{ }else{
// this.concatArch(1) // this.concatArch(1)
} }

Loading…
Cancel
Save