|
@@ -59,7 +59,13 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="所属分部" prop="organId" :label-width="formLabelWidth">
|
|
|
- <el-select v-model.trim="topForm.organId" filterable clearable placeholder="所属分部" @change="switchOrgan">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="topForm.organId"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="所属分部"
|
|
|
+ @change="switchOrgan"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in branchList"
|
|
|
:key="item.value"
|
|
@@ -117,7 +123,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="diSpan">
|
|
|
- <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
+ <el-tooltip placement="top" popper-class="mTooltip">
|
|
|
<div slot="content">
|
|
|
「是」当前声部的学生都可以选择该老师;
|
|
|
<br />「否」只有该老师的VIP课,单技课,基础技能课的学生可以选择该老师;
|
|
@@ -185,22 +191,25 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="专业技能" prop="subjectIds" :label-width="formLabelWidth">
|
|
|
<el-select
|
|
|
- :disabled="!topForm.organId"
|
|
|
+ :disabled="!topForm.organId"
|
|
|
multiple
|
|
|
v-model.trim="topForm.subjectIds"
|
|
|
clearable
|
|
|
filterable
|
|
|
placeholder="专业技能"
|
|
|
>
|
|
|
- <el-option-group v-for="group in subjectList"
|
|
|
- :key="group.label"
|
|
|
- :label="group.label">
|
|
|
- <el-option v-for="item in group.options"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-option-group>
|
|
|
+ <el-option-group
|
|
|
+ v-for="group in subjectList"
|
|
|
+ :key="group.label"
|
|
|
+ :label="group.label"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in group.options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-option-group>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -336,7 +345,7 @@ export default {
|
|
|
isSupportCourseScheduleRewardsRules: true,
|
|
|
isSupportExtraPracticeLesson: null
|
|
|
},
|
|
|
- tenantId:null,
|
|
|
+ tenantId: null,
|
|
|
imageIcon: require("@/assets/images/base/warning.png"),
|
|
|
rules: {
|
|
|
realName: [
|
|
@@ -402,41 +411,49 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
|
|
|
if (this.pageType == "update") {
|
|
|
teacherGet({ teacherId: this.teacherId }).then(res => {
|
|
|
- let result = res.data;
|
|
|
- this.topForm = {
|
|
|
- realName: result.realName,
|
|
|
- gender: result.gender,
|
|
|
- birthdate: result.birthdate,
|
|
|
- entryDate: result.entryDate,
|
|
|
- jobNature: result.jobNature,
|
|
|
- organId: result.teacherOrganId,
|
|
|
- flowOrganRange: result.flowOrganRangeId
|
|
|
- ? result.flowOrganRangeId.split(",")
|
|
|
- : null,
|
|
|
- introduction: result.introduction,
|
|
|
- phone: result.phone,
|
|
|
- avatar: result.avatar,
|
|
|
- graduateSchool: result.graduateSchool,
|
|
|
- email: result.email,
|
|
|
- educationBackground: result.educationBackground,
|
|
|
- subjectIds: result.subjectId ? result.subjectId.split(",") : null,
|
|
|
- technicalTitles: result.technicalTitles,
|
|
|
- certificateType: result.certificateType,
|
|
|
- certificateNum: result.certificateNum,
|
|
|
- isProbationPeriod: result.isProbationPeriod,
|
|
|
- isSupportCourseScheduleRewardsRules:
|
|
|
- result.isSupportCourseScheduleRewardsRules,
|
|
|
- isSupportExtraPracticeLesson: result.isSupportExtraPracticeLesson
|
|
|
- };
|
|
|
- let sn = [];
|
|
|
- result.teacherSchools.forEach(item => {
|
|
|
- sn.push(item.name);
|
|
|
- });
|
|
|
- this.teacherSchools = this.joinArray(sn, ","); // 教学点
|
|
|
+ if (res.code == 200) {
|
|
|
+ let result = res.data;
|
|
|
+ this.topForm = {
|
|
|
+ realName: result.realName,
|
|
|
+ gender: result.gender,
|
|
|
+ birthdate: result.birthdate,
|
|
|
+ entryDate: result.entryDate,
|
|
|
+ jobNature: result.jobNature,
|
|
|
+ organId: result.teacherOrganId,
|
|
|
+ flowOrganRange: result.flowOrganRangeId
|
|
|
+ ? result.flowOrganRangeId.split(",")
|
|
|
+ : null,
|
|
|
+ introduction: result.introduction,
|
|
|
+ phone: result.phone,
|
|
|
+ avatar: result.avatar,
|
|
|
+ graduateSchool: result.graduateSchool,
|
|
|
+ email: result.email,
|
|
|
+ educationBackground: result.educationBackground,
|
|
|
+
|
|
|
+ technicalTitles: result.technicalTitles,
|
|
|
+ certificateType: result.certificateType,
|
|
|
+ certificateNum: result.certificateNum,
|
|
|
+ isProbationPeriod: result.isProbationPeriod,
|
|
|
+ isSupportCourseScheduleRewardsRules:
|
|
|
+ result.isSupportCourseScheduleRewardsRules,
|
|
|
+ isSupportExtraPracticeLesson: result.isSupportExtraPracticeLesson
|
|
|
+ };
|
|
|
+ let sn = [];
|
|
|
+ result.teacherSchools.forEach(item => {
|
|
|
+ sn.push(item.name);
|
|
|
+ });
|
|
|
+ if(result.subjectId){
|
|
|
+ let arr = result.subjectId.split(",");
|
|
|
+ this.topForm.subjectIds = arr.map(item=>{
|
|
|
+ return parseInt(item)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.teacherSchools = this.joinArray(sn, ","); // 教学点
|
|
|
+ this.switchOrgan()
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -540,38 +557,38 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 选择分部
|
|
|
- switchOrgan(){
|
|
|
- if(this.topForm.organId == 43){
|
|
|
- this.tenantId =2
|
|
|
- }else{
|
|
|
- this.tenantId = 1
|
|
|
+ switchOrgan() {
|
|
|
+ if (this.topForm.organId == 43) {
|
|
|
+ this.tenantId = 2;
|
|
|
+ } else {
|
|
|
+ this.tenantId = 1;
|
|
|
}
|
|
|
- subjectListTree({
|
|
|
+ subjectListTree({
|
|
|
// 声部
|
|
|
delFlag: 0,
|
|
|
rows: 9999,
|
|
|
- tenantId:this.tenantId
|
|
|
+ tenantId: this.tenantId
|
|
|
}).then(res => {
|
|
|
let result = res.data;
|
|
|
if (res.code == 200) {
|
|
|
- let tempArray = []
|
|
|
+ let tempArray = [];
|
|
|
result.rows.forEach((item, index) => {
|
|
|
- let subject = []
|
|
|
+ let subject = [];
|
|
|
if (item.subjects) {
|
|
|
item.subjects.forEach(s => {
|
|
|
subject.push({
|
|
|
value: s.id,
|
|
|
label: s.name
|
|
|
- })
|
|
|
- })
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
tempArray[index] = {
|
|
|
label: item.name,
|
|
|
options: subject
|
|
|
- }
|
|
|
- })
|
|
|
- this.subjectList = tempArray
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.subjectList = tempArray;
|
|
|
}
|
|
|
});
|
|
|
}
|