Commit fba32968 authored by liwei's avatar liwei

修改bug

parent a077cc3b
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="技术端课程方案:" prop="classPlan" v-if="queryParams.lessonType[0] === '0' || queryParams.lessonType.length == 2"> <el-form-item label="技术端课程方案:" prop="classPlan" v-if="queryParams.lessonType.includes('0')">
<el-select v-model="queryParams.classPlan" class="selectWidth" placeholder="企业课程方案" multiple clearable> <el-select v-model="queryParams.classPlan" class="selectWidth" placeholder="技术端课程方案" multiple clearable>
<el-option <el-option
v-for="item in coursePlanOptions" v-for="item in coursePlanOptions"
:key="item.dictValue" :key="item.dictValue"
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="技能端课程方案:" prop="classPlanSchool" v-if="queryParams.lessonType[0] === '1' || queryParams.lessonType.length == 2"> <el-form-item label="技能端课程方案:" prop="classPlanSchool" v-if="queryParams.lessonType.includes('1')">
<el-select v-model="queryParams.classPlanSchool" class="selectWidth" placeholder="院校课程方案" multiple clearable> <el-select v-model="queryParams.classPlanSchool" class="selectWidth" placeholder="院校课程方案" multiple clearable>
<el-option <el-option
v-for="item in coursePlanOptionsC" v-for="item in coursePlanOptionsC"
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="前沿讲堂分类:" prop="courseType" v-if="queryParams.classPlan === '0' || queryParams.classPlanSchool === '0'"> <el-form-item label="前沿讲堂分类:" prop="courseType" v-if="queryParams.classPlan.includes('0') || queryParams.classPlanSchool.includes('0')">
<el-select v-model="queryParams.courseType" placeholder="前沿讲堂分类" clearable> <el-select v-model="queryParams.courseType" placeholder="前沿讲堂分类" clearable>
<el-option <el-option
v-for="item in courseTypeOptions" v-for="item in courseTypeOptions"
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="智联课堂分类:" prop="courseType" v-if="queryParams.classPlan === '3'"> <el-form-item label="智联课堂分类:" prop="courseType" v-if="queryParams.classPlan.includes('3')">
<el-select v-model="queryParams.intelligentClassroom" placeholder="智联课堂分类" clearable> <el-select v-model="queryParams.intelligentClassroom" placeholder="智联课堂分类" clearable>
<el-option <el-option
v-for="item in intelligentClassroomOptions" v-for="item in intelligentClassroomOptions"
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="难度等级:" prop="difficultyClassify" v-if="queryParams.classPlan === '2'"> <el-form-item label="难度等级:" prop="difficultyClassify" v-if="queryParams.classPlan.includes('1')">
<el-select v-model="queryParams.difficultyClassify" placeholder="难度等级" clearable> <el-select v-model="queryParams.difficultyClassify" placeholder="难度等级" clearable>
<el-option <el-option
v-for="item in difficultyOptions" v-for="item in difficultyOptions"
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="岗位分类:" prop="jobClassify" v-if="queryParams.classPlan === '2'"> <el-form-item label="岗位分类:" prop="jobClassify" v-if="queryParams.classPlan.includes('1')">
<el-select v-model="queryParams.jobClassify" placeholder="岗位分类" clearable> <el-select v-model="queryParams.jobClassify" placeholder="岗位分类" clearable>
<el-option <el-option
v-for="item in valueOptions" v-for="item in valueOptions"
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="课程维度:" prop="courseDimensions" v-if="queryParams.classPlan === '2'"> <el-form-item label="课程维度:" prop="courseDimensions" v-if="queryParams.classPlan.includes('1')">
<el-select v-model="queryParams.courseDimensions" placeholder="课程维度" clearable> <el-select v-model="queryParams.courseDimensions" placeholder="课程维度" clearable>
<el-option <el-option
v-for="item in courseDimensionsOptions" v-for="item in courseDimensionsOptions"
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<!-- />--> <!-- />-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="技术分类:" prop="tecClassifySchool" v-if="queryParams.classPlanSchool === '1'"> <el-form-item label="技术分类:" prop="tecClassifySchool" v-if="queryParams.classPlanSchool.includes('1')">
<el-select v-model="queryParams.tecClassifySchool" placeholder="技术分类" clearable> <el-select v-model="queryParams.tecClassifySchool" placeholder="技术分类" clearable>
<el-option <el-option
v-for="item in courseDirection" v-for="item in courseDirection"
...@@ -358,37 +358,57 @@ ...@@ -358,37 +358,57 @@
<span>{{ scope.row.classHour }}</span> <span>{{ scope.row.classHour }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="难度等级" prop="difficultyClassify" min-width="140px" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ getDifficultyLevelName(scope.row.difficultyClassify) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="课程类型" prop="lessonType" min-width="140px" :show-overflow-tooltip="true"> <el-table-column align="center" label="课程类型" prop="lessonType" min-width="140px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getLessonTypeName( scope.row.lessonType,scope.row.lessonTypeSchool) }}</span> <span>{{ getLessonTypeName( scope.row.lessonType,scope.row.lessonTypeSchool) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="企业课程方案" prop="classPlan" min-width="200px" :show-overflow-tooltip="true"> <el-table-column align="center" label="技术端-课程方案" prop="classPlan" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('0') || queryParams.lessonType.length === 0">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getCoursePlanName( scope.row.classPlan) }}</span> <span>{{ getCoursePlanName( scope.row.classPlan) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="岗位分类" prop="jobClassify" min-width="140px" :show-overflow-tooltip="true"> <el-table-column align="center" label="技术端-前沿讲堂" prop="courseType" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('0') || queryParams.lessonType.length === 0">
<template slot-scope="scope">
<span>{{ getCourseTypeName( scope.row.courseType) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="岗位分类" prop="jobClassify" min-width="140px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('0') || queryParams.lessonType.length === 0">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getJobClassificationName(scope.row.jobClassify) }}</span> <span>{{ getJobClassificationName(scope.row.jobClassify) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="企业技术分类" prop="tecClassify" min-width="200px" :show-overflow-tooltip="true"> <el-table-column align="center" label="难度等级" prop="difficultyClassify" min-width="140px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('0') || queryParams.lessonType.length === 0">
<template slot-scope="scope">
<span>{{ getDifficultyLevelName(scope.row.difficultyClassify) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="课程维度" prop="courseDimensions" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('0') || queryParams.lessonType.length === 0">
<template slot-scope="scope">
<span>{{ getCourseDimensionsName( scope.row.enterpriseCourseDimensions) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="智联课堂分类" prop="intelligentClassroom" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('0') || queryParams.lessonType.length === 0">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getCourseDirectionName(scope.row.tecClassify) }}</span> <span>{{ getIntelligentClassroomName( scope.row.intelligentClassroom) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="院校课程方案" prop="classPlan" min-width="200px" :show-overflow-tooltip="true"> <!-- <el-table-column align="center" label="企业技术分类" prop="tecClassify" min-width="200px" :show-overflow-tooltip="true">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getCourseDirectionName(scope.row.tecClassify) }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" label="技能端-课程方案" prop="classPlanSchool" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('1') || queryParams.lessonType.length === 0">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getCoursePlanNameC( scope.row.classPlanSchool) }}</span> <span>{{ getCoursePlanNameC( scope.row.classPlanSchool) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="院校技术分类" prop="tecClassify" min-width="200px" :show-overflow-tooltip="true"> <el-table-column align="center" label="技能端-前沿讲堂" prop="classPlan" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('1') || queryParams.lessonType.length === 0">
<template slot-scope="scope">
<span>{{ getCoursePlanName( scope.row.classPlan) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="技术分类" prop="tecClassifySchool" min-width="200px" :show-overflow-tooltip="true" v-if="queryParams.lessonType.includes('1') || queryParams.lessonType.length === 0">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getCourseDirectionName(scope.row.tecClassifySchool) }}</span> <span>{{ getCourseDirectionName(scope.row.tecClassifySchool) }}</span>
</template> </template>
...@@ -1462,6 +1482,33 @@ export default { ...@@ -1462,6 +1482,33 @@ export default {
}) })
return name return name
}, },
// 根据id获取课程维度
getCourseDimensionsName(dictValue) {
if (!dictValue) {
return ''
}
const values = dictValue.split(',') // 将逗号分隔的多个值分割成数组
const names = []
this.courseDimensionsOptions.forEach(item => {
if (values.includes(item.dictValue)) {
names.push(item.dictLabel) // 将找到的名称添加到数组中
}
})
return names.join(',') // 将名称数组拼接成逗号分隔的字符串
},
getIntelligentClassroomName(dictValue) {
if (!dictValue) {
return ''
}
const values = dictValue.split(',') // 将逗号分隔的多个值分割成数组
const names = []
this.intelligentClassroomOptions.forEach(item => {
if (values.includes(item.dictValue)) {
names.push(item.dictLabel) // 将找到的名称添加到数组中
}
})
return names.join(',') // 将名称数组拼接成逗号分隔的字符串
},
// 根据课程类型的id获取类型的名称 // 根据课程类型的id获取类型的名称
getLessonTypeName(dictValue, dictValue1) { getLessonTypeName(dictValue, dictValue1) {
let name = '' let name = ''
...@@ -1496,6 +1543,20 @@ export default { ...@@ -1496,6 +1543,20 @@ export default {
}) })
return names.join(',') // 将名称数组拼接成逗号分隔的字符串 return names.join(',') // 将名称数组拼接成逗号分隔的字符串
}, },
// 根据根据id获取前沿讲堂的名称
getCourseTypeName(dictValue) {
if (!dictValue) {
return ''
}
const values = dictValue.split(',') // 将逗号分隔的多个值分割成数组
const names = []
this.courseTypeOptions.forEach(item => {
if (values.includes(item.dictValue)) {
names.push(item.dictLabel) // 将找到的名称添加到数组中
}
})
return names.join(',') // 将名称数组拼接成逗号分隔的字符串
},
// 根据id获取课程方案的名称 // 根据id获取课程方案的名称
getCoursePlanNameC(dictValue) { getCoursePlanNameC(dictValue) {
if (!dictValue) { if (!dictValue) {
...@@ -1503,7 +1564,7 @@ export default { ...@@ -1503,7 +1564,7 @@ export default {
} }
const values = dictValue.split(',') // 将逗号分隔的多个值分割成数组 const values = dictValue.split(',') // 将逗号分隔的多个值分割成数组
const names = [] const names = []
this.coursePlanOptionsC.forEach(item => { this.courseTypeOptions.forEach(item => {
if (values.includes(item.dictValue)) { if (values.includes(item.dictValue)) {
names.push(item.dictLabel) // 将找到的名称添加到数组中 names.push(item.dictLabel) // 将找到的名称添加到数组中
} }
......
...@@ -705,16 +705,17 @@ ...@@ -705,16 +705,17 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="难度等级:" prop="teDirection"> <!-- <el-form-item label="难度等级:" prop="teDirection">-->
<el-select v-model="form.difficultyClassify" clearable style="width: 200px" filterable placeholder="难度等级" clearable> <!-- <el-select v-model="form.difficultyClassify" clearable style="width: 200px" filterable placeholder="难度等级" clearable>-->
<el-option <!-- <el-option-->
v-for="item in difficultyOptions" <!-- v-for="item in difficultyOptions"-->
:key="item.dictValue" <!-- :key="item.dictValue"-->
:label="item.dictLabel" <!-- :label="item.dictLabel"-->
:value="item.dictValue" <!-- :value="item.dictValue"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <br> <!-- </el-form-item> -->
<br>
<el-form-item> <el-form-item>
<el-button <el-button
class="fourWordsBtn" class="fourWordsBtn"
...@@ -786,11 +787,11 @@ ...@@ -786,11 +787,11 @@
<span>{{ getJobClassificationLabelAndName(scope.row.jobClassify) }}</span> <span>{{ getJobClassificationLabelAndName(scope.row.jobClassify) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="难度等级" prop="difficultyClassify" show-overflow-tooltip> <!-- <el-table-column label="难度等级" prop="difficultyClassify" show-overflow-tooltip>-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ getDifficultyLevelName(scope.row.difficultyClassify) }} <!-- {{ getDifficultyLevelName(scope.row.difficultyClassify) }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<!-- <el-table-column label="价格" prop="lessonPrice" show-overflow-tooltip>--> <!-- <el-table-column label="价格" prop="lessonPrice" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- {{ scope.row.lessonPrice }}--> <!-- {{ scope.row.lessonPrice }}-->
...@@ -1118,14 +1119,14 @@ export default { ...@@ -1118,14 +1119,14 @@ export default {
if (this.lessonTypeOptions) { if (this.lessonTypeOptions) {
this.lessonTypeOptions.forEach(item => { this.lessonTypeOptions.forEach(item => {
if (item.dictValue === dictValue && dictValue === '1') { if (item.dictValue === dictValue && dictValue === '1') {
name = '企业课程' name = '技术端'
} }
}) })
} }
if (this.lessonTypeOptions) { if (this.lessonTypeOptions) {
this.lessonTypeOptions.forEach(item => { this.lessonTypeOptions.forEach(item => {
if (item.dictValue === dictValue1 && dictValue1 === '1') { if (item.dictValue === dictValue1 && dictValue1 === '1') {
name1 = '院校课程' name1 = '技能端'
} }
}) })
} }
......
...@@ -99,9 +99,9 @@ ...@@ -99,9 +99,9 @@
{{ scope.row.exitId || '-' }} {{ scope.row.exitId || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所需课程类型" prop="lessonType" :show-overflow-tooltip="true"> <el-table-column align="center" label="所需课程类型" prop="lessonType" min-width="140px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.lessonType || '-' }} <span>{{ getLessonTypeName( scope.row.lessonType,scope.row.lessonTypeSchool) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remarks" :show-overflow-tooltip="true"> <el-table-column label="备注" prop="remarks" :show-overflow-tooltip="true">
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<div class="tip">出口ip可以填写多个,用逗号分隔</div> <div class="tip">出口ip可以填写多个,用逗号分隔</div>
</el-form-item> </el-form-item>
<el-form-item prop="lessonType" label="所需课程类型:"> <el-form-item prop="lessonType" label="所需课程类型:">
<el-select v-model="queryParams.lessonType" clearable multiple placeholder="所需课程类型"> <el-select v-model="form.lessonType" clearable multiple placeholder="所需课程类型">
<el-option <el-option
v-for="(item,index) in lessonTypeOptions" v-for="(item,index) in lessonTypeOptions"
:key="index" :key="index"
...@@ -290,7 +290,12 @@ export default { ...@@ -290,7 +290,12 @@ export default {
}, },
// 表单参数 // 表单参数
form: { form: {
unitType: '0' unitType: '0',
unitName: '',
userId: '',
exitId: '',
lessonType: '',
remarks: ''
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -310,10 +315,31 @@ export default { ...@@ -310,10 +315,31 @@ export default {
this.getLessonType() this.getLessonType()
}, },
methods: { methods: {
// 根据课程类型的id获取类型的名称
getLessonTypeName(dictValue, dictValue1) {
let name = ''
let name1 = ''
if (this.lessonTypeOptions) {
this.lessonTypeOptions.forEach(item => {
if (item.dictValue === dictValue && dictValue === '1') {
name = '技术端'
}
})
}
if (this.lessonTypeOptions) {
this.lessonTypeOptions.forEach(item => {
if (item.dictValue === dictValue1 && dictValue1 === '1') {
name1 = '技能端'
}
})
}
return (name !== '' && name1 !== '' ? name + ',' : name) + name1
},
// 获取课程类型 // 获取课程类型
getLessonType() { getLessonType() {
getDict('lesson_type').then(res => { getDict('lesson_type').then(res => {
this.lessonTypeOptions = res.data this.lessonTypeOptions = res.data
console.log('this.lessonTypeOptions:', this.lessonTypeOptions)
}) })
}, },
getUserList() { getUserList() {
...@@ -398,7 +424,8 @@ export default { ...@@ -398,7 +424,8 @@ export default {
unitName: undefined, unitName: undefined,
unitNumber: undefined, unitNumber: undefined,
exitId: undefined, exitId: undefined,
flag: '' flag: '',
lessonType: []
} }
this.handleQuery() this.handleQuery()
}, },
...@@ -414,6 +441,15 @@ export default { ...@@ -414,6 +441,15 @@ export default {
const id = row.businessId const id = row.businessId
getSysUnit(id).then(response => { getSysUnit(id).then(response => {
this.form = response.data this.form = response.data
if (response.data.lessonType === '1' && response.data.lessonTypeSchool === '1') {
this.form.lessonType = ['0', '1']
}
if (response.data.lessonType === '0' && response.data.lessonTypeSchool === '1') {
this.form.lessonType = ['1']
}
if (response.data.lessonType === '1' && response.data.lessonTypeSchool === '0') {
this.form.lessonType = ['0']
}
this.open = true this.open = true
this.title = '修改单位' this.title = '修改单位'
}) })
...@@ -440,6 +476,7 @@ export default { ...@@ -440,6 +476,7 @@ export default {
submitForm: function() { submitForm: function() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
this.form.lessonType = this.form.lessonType.length > 1 ? '2' : this.form.lessonType.join(',')
if (this.form.businessId !== undefined) { if (this.form.businessId !== undefined) {
updateSysUnit(this.form).then(response => { updateSysUnit(this.form).then(response => {
this.msgSuccess('修改成功') this.msgSuccess('修改成功')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment