Commit 6760e1ba authored by 张伯涛's avatar 张伯涛

课程添加课程维度字段

parent ef694137
...@@ -106,6 +106,23 @@ ...@@ -106,6 +106,23 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="课程维度:" prop="enterpriseCourseDimensions">
<el-select
v-model="form.enterpriseCourseDimensions"
:disabled="form.lessonType === '0'"
multiple
class="normalSelct"
>
<el-option
v-for="(items,index) in enterpriseCourseDimensionsOptions"
:key="index"
:label="items.dictLabel"
:value="items.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row class="border-border" :gutter="100"> <el-row class="border-border" :gutter="100">
<el-col :span="24"> <el-col :span="24">
...@@ -348,9 +365,12 @@ export default { ...@@ -348,9 +365,12 @@ export default {
valueOptions: [], valueOptions: [],
courseDirection: [], courseDirection: [],
courseTypeOptions: [], courseTypeOptions: [],
enterpriseCourseDimensionsOptions: [],
coursePlanOptions: [], coursePlanOptions: [],
coursePlanOptionsC: [], coursePlanOptionsC: [],
form: { form: {
// 课程维度
enterpriseCourseDimensions: '',
// 课程名称 // 课程名称
lessonName: '', lessonName: '',
// 一句话介绍 // 一句话介绍
...@@ -422,6 +442,7 @@ export default { ...@@ -422,6 +442,7 @@ export default {
this.form.jobClassify = '' this.form.jobClassify = ''
this.form.tecClassify = '' this.form.tecClassify = ''
this.form.courseType = '' this.form.courseType = ''
this.form.enterpriseCourseDimensions = ''
}, },
lessonTypeSchoolChange() { lessonTypeSchoolChange() {
this.form.classPlanSchool = [] this.form.classPlanSchool = []
...@@ -435,6 +456,7 @@ export default { ...@@ -435,6 +456,7 @@ export default {
this.getJobClassification() this.getJobClassification()
this.getCourseDirection() this.getCourseDirection()
this.getcourseTypeOptions() this.getcourseTypeOptions()
this.getenterpriseCourseDimensionsOptions()
this.getTeacher() this.getTeacher()
this.getCoursePlanC() this.getCoursePlanC()
}, },
...@@ -480,6 +502,12 @@ export default { ...@@ -480,6 +502,12 @@ export default {
this.courseTypeOptions = res.data this.courseTypeOptions = res.data
}) })
}, },
// 获取课程维度
getenterpriseCourseDimensionsOptions() {
getDict('course_dimensions').then(res => {
this.enterpriseCourseDimensionsOptions = res.data
})
},
// 保存 // 保存
submit() { submit() {
console.log('form', this.form) console.log('form', this.form)
...@@ -532,6 +560,11 @@ export default { ...@@ -532,6 +560,11 @@ export default {
} else { } else {
this.form.courseType = this.form.courseType.split(',') this.form.courseType = this.form.courseType.split(',')
} }
if (praseStrEmpty(this.form.enterpriseCourseDimensions) === '') {
this.form.enterpriseCourseDimensions = []
} else {
this.form.enterpriseCourseDimensions = this.form.enterpriseCourseDimensions.split(',')
}
if (praseStrEmpty(this.form.classPlanSchool) === '') { if (praseStrEmpty(this.form.classPlanSchool) === '') {
// 把字符串转换成数组 // 把字符串转换成数组
this.form.classPlanSchool = [] this.form.classPlanSchool = []
...@@ -571,6 +604,9 @@ export default { ...@@ -571,6 +604,9 @@ export default {
if (form.courseType.length > 0) { if (form.courseType.length > 0) {
form.courseType = form.courseType.join(',') form.courseType = form.courseType.join(',')
} }
if (form.enterpriseCourseDimensions.length > 0) {
form.enterpriseCourseDimensions = form.enterpriseCourseDimensions.join(',')
}
if (form.courseTypeC.length > 0) { if (form.courseTypeC.length > 0) {
form.courseTypeC = form.courseTypeC.join(',') form.courseTypeC = form.courseTypeC.join(',')
} }
...@@ -614,6 +650,7 @@ export default { ...@@ -614,6 +650,7 @@ export default {
lessonType: this.form.lessonType, lessonType: this.form.lessonType,
lessonTypeSchool: this.form.lessonTypeSchool, lessonTypeSchool: this.form.lessonTypeSchool,
courseType: this.form.courseType, courseType: this.form.courseType,
enterpriseCourseDimensions: this.form.enterpriseCourseDimensions,
courseTypeC: this.form.courseTypeC, courseTypeC: this.form.courseTypeC,
qualityLesson: this.form.qualityLesson qualityLesson: this.form.qualityLesson
} }
...@@ -635,6 +672,9 @@ export default { ...@@ -635,6 +672,9 @@ export default {
if (form.courseType.length > 0) { if (form.courseType.length > 0) {
form.courseType = form.courseType.join(',') form.courseType = form.courseType.join(',')
} }
if (form.enterpriseCourseDimensions.length > 0) {
form.enterpriseCourseDimensions = form.enterpriseCourseDimensions.join(',')
}
if (form.courseTypeC.length > 0) { if (form.courseTypeC.length > 0) {
form.courseTypeC = form.courseTypeC.join(',') form.courseTypeC = form.courseTypeC.join(',')
} }
......
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