|
@@ -106,15 +106,13 @@
|
|
@change="onSubjectChange('search')"
|
|
@change="onSubjectChange('search')"
|
|
v-model="result.subjectIds"
|
|
v-model="result.subjectIds"
|
|
placeholder="请选择">
|
|
placeholder="请选择">
|
|
- <el-option-group
|
|
|
|
- v-for="(group, index) in subjectTreeList"
|
|
|
|
- :key="index"
|
|
|
|
- :label="group.label">
|
|
|
|
- <el-option
|
|
|
|
- v-for="(item, i) in group.options"
|
|
|
|
- :key="i"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value.toString()">
|
|
|
|
|
|
+ <el-option-group v-for="(group, index) in subjectTreeList"
|
|
|
|
+ :key="index"
|
|
|
|
+ :label="group.label">
|
|
|
|
+ <el-option v-for="(item, i) in group.options"
|
|
|
|
+ :key="i"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value.toString()">
|
|
</el-option>
|
|
</el-option>
|
|
</el-option-group>
|
|
</el-option-group>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -193,6 +191,13 @@ export default {
|
|
mounted () {
|
|
mounted () {
|
|
this.__init()
|
|
this.__init()
|
|
},
|
|
},
|
|
|
|
+ activated () {
|
|
|
|
+ this.pageType = this.$route.query.type
|
|
|
|
+ this.id = this.$route.query.id
|
|
|
|
+ this.pageInfo = this.$route.query.pageInfo
|
|
|
|
+ this.searchForm = this.$route.query.searchForm
|
|
|
|
+ this.__init()
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
async __init () {
|
|
async __init () {
|
|
this.$refs.form.resetFields()
|
|
this.$refs.form.resetFields()
|
|
@@ -219,13 +224,13 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
let subjectTree = await getSoundTree({ delFlag: 0, rows: 9999 })
|
|
let subjectTree = await getSoundTree({ delFlag: 0, rows: 9999 })
|
|
- if(subjectTree.code == 200) {
|
|
|
|
|
|
+ if (subjectTree.code == 200) {
|
|
let subjectResult = subjectTree.data
|
|
let subjectResult = subjectTree.data
|
|
subjectResult.rows.forEach(element => {
|
|
subjectResult.rows.forEach(element => {
|
|
let tempElement = {}
|
|
let tempElement = {}
|
|
tempElement = { label: element.name, options: [] }
|
|
tempElement = { label: element.name, options: [] }
|
|
// 判断子级声部是否为空
|
|
// 判断子级声部是否为空
|
|
- if(element.subjects) {
|
|
|
|
|
|
+ if (element.subjects) {
|
|
element.subjects.forEach(subject => {
|
|
element.subjects.forEach(subject => {
|
|
tempElement.options.push({
|
|
tempElement.options.push({
|
|
value: subject.id,
|
|
value: subject.id,
|
|
@@ -264,13 +269,15 @@ export default {
|
|
errorText: null
|
|
errorText: null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ this.resetForm()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async onSubjectChange(type) {
|
|
|
|
|
|
+ async onSubjectChange (type) {
|
|
let organId = this.result.organId
|
|
let organId = this.result.organId
|
|
let subject = this.result.subjectIds
|
|
let subject = this.result.subjectIds
|
|
// 判断是否有分部和声部
|
|
// 判断是否有分部和声部
|
|
- if(subject.length <= 0 || !organId || organId == '') {
|
|
|
|
|
|
+ if (subject.length <= 0 || !organId || organId == '') {
|
|
this.teacherList = []
|
|
this.teacherList = []
|
|
this.result.teacherId = []
|
|
this.result.teacherId = []
|
|
return
|
|
return
|
|
@@ -278,7 +285,7 @@ export default {
|
|
let subjectIds = Object.assign([], subject).join(',')
|
|
let subjectIds = Object.assign([], subject).join(',')
|
|
await findTeacherByOrganId({ organId: organId, subjectIds: subjectIds, jobNature: 'FULL_TIME' }).then(res => {
|
|
await findTeacherByOrganId({ organId: organId, subjectIds: subjectIds, jobNature: 'FULL_TIME' }).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- if(type != 'update') {
|
|
|
|
|
|
+ if (type != 'update') {
|
|
this.teacherList = []
|
|
this.teacherList = []
|
|
this.result.teacherId = []
|
|
this.result.teacherId = []
|
|
}
|
|
}
|
|
@@ -291,8 +298,8 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- onCheckAll() { // 全选老师
|
|
|
|
- if(this.teacherList.length <= 0) {
|
|
|
|
|
|
+ onCheckAll () { // 全选老师
|
|
|
|
+ if (this.teacherList.length <= 0) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.result.teacherId = []
|
|
this.result.teacherId = []
|