|
@@ -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="所属分部">
|
|
|
+ <el-select
|
|
|
+ v-model.trim="topForm.organId"
|
|
|
+ filterable
|
|
|
+ clearable
|
|
|
+ placeholder="所属分部"
|
|
|
+ @change="switchOrgan"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in branchList"
|
|
|
:key="item.value"
|
|
@@ -109,6 +115,11 @@
|
|
|
<el-input disabled v-model.trim="teacherSchools"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="备份名字" :label-width="formLabelWidth">
|
|
|
+ <el-input v-model.trim="topForm.memo"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
@@ -117,7 +128,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,6 +196,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="专业技能" prop="subjectIds" :label-width="formLabelWidth">
|
|
|
<el-select
|
|
|
+ :disabled="!topForm.organId"
|
|
|
multiple
|
|
|
v-model.trim="topForm.subjectIds"
|
|
|
clearable
|
|
@@ -200,7 +212,7 @@
|
|
|
v-for="item in group.options"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
- :value="item.value.toString()"
|
|
|
+ :value="item.value"
|
|
|
></el-option>
|
|
|
</el-option-group>
|
|
|
</el-select>
|
|
@@ -336,8 +348,10 @@ export default {
|
|
|
certificateType: null,
|
|
|
certificateNum: null,
|
|
|
isSupportCourseScheduleRewardsRules: true,
|
|
|
- isSupportExtraPracticeLesson: null
|
|
|
+ isSupportExtraPracticeLesson: null,
|
|
|
+ memo: null
|
|
|
},
|
|
|
+ tenantId: null,
|
|
|
imageIcon: require("@/assets/images/base/warning.png"),
|
|
|
rules: {
|
|
|
realName: [
|
|
@@ -403,65 +417,50 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- subjectListTree({
|
|
|
- // 声部
|
|
|
- delFlag: 0,
|
|
|
- rows: 9999
|
|
|
- }).then(res => {
|
|
|
- let result = res.data;
|
|
|
- if (res.code == 200) {
|
|
|
- let tempArray = [];
|
|
|
- result.rows.forEach((item, index) => {
|
|
|
- let subject = [];
|
|
|
- item.subjects.forEach(s => {
|
|
|
- subject.push({
|
|
|
- value: s.id,
|
|
|
- label: s.name
|
|
|
- });
|
|
|
- });
|
|
|
-
|
|
|
- tempArray[index] = {
|
|
|
- label: item.name,
|
|
|
- options: subject
|
|
|
- };
|
|
|
- });
|
|
|
- this.subjectList = tempArray;
|
|
|
- }
|
|
|
- });
|
|
|
|
|
|
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,
|
|
|
+ memo:result.memo
|
|
|
+ };
|
|
|
+ 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()
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -545,7 +544,8 @@ export default {
|
|
|
technicalTitles: null,
|
|
|
certificateType: null,
|
|
|
certificateNum: null,
|
|
|
- jobType: "ADVISER"
|
|
|
+ jobType: "ADVISER",
|
|
|
+ memo
|
|
|
};
|
|
|
this.$refs[formName].resetFields();
|
|
|
},
|
|
@@ -563,6 +563,42 @@ export default {
|
|
|
// 获取光标所在位置
|
|
|
this.topForm.avatar = res.data.url;
|
|
|
}
|
|
|
+ },
|
|
|
+ // 选择分部
|
|
|
+ switchOrgan() {
|
|
|
+ if (this.topForm.organId == 43) {
|
|
|
+ this.tenantId = 2;
|
|
|
+ } else {
|
|
|
+ this.tenantId = 1;
|
|
|
+ }
|
|
|
+ subjectListTree({
|
|
|
+ // 声部
|
|
|
+ delFlag: 0,
|
|
|
+ rows: 9999,
|
|
|
+ tenantId: this.tenantId
|
|
|
+ }).then(res => {
|
|
|
+ let result = res.data;
|
|
|
+ if (res.code == 200) {
|
|
|
+ let tempArray = [];
|
|
|
+ result.rows.forEach((item, index) => {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|