Commit fba32968 authored by liwei's avatar liwei

修改bug

parent a077cc3b
...@@ -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