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

Loading…
Cancel
Save