Commit fba32968 authored by liwei's avatar liwei

修改bug

parent a077cc3b
......@@ -705,16 +705,17 @@
/>
</el-select>
</el-form-item>
<el-form-item label="难度等级:" prop="teDirection">
<el-select v-model="form.difficultyClassify" clearable style="width: 200px" filterable placeholder="难度等级" clearable>
<el-option
v-for="item in difficultyOptions"
:key="item.dictValue"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
</el-form-item> <br>
<!-- <el-form-item label="难度等级:" prop="teDirection">-->
<!-- <el-select v-model="form.difficultyClassify" clearable style="width: 200px" filterable placeholder="难度等级" clearable>-->
<!-- <el-option-->
<!-- v-for="item in difficultyOptions"-->
<!-- :key="item.dictValue"-->
<!-- :label="item.dictLabel"-->
<!-- :value="item.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item> -->
<br>
<el-form-item>
<el-button
class="fourWordsBtn"
......@@ -786,11 +787,11 @@
<span>{{ getJobClassificationLabelAndName(scope.row.jobClassify) }}</span>
</template>
</el-table-column>
<el-table-column label="难度等级" prop="difficultyClassify" show-overflow-tooltip>
<template slot-scope="scope">
{{ getDifficultyLevelName(scope.row.difficultyClassify) }}
</template>
</el-table-column>
<!-- <el-table-column label="难度等级" prop="difficultyClassify" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ getDifficultyLevelName(scope.row.difficultyClassify) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="价格" prop="lessonPrice" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.lessonPrice }}-->
......@@ -1118,14 +1119,14 @@ export default {
if (this.lessonTypeOptions) {
this.lessonTypeOptions.forEach(item => {
if (item.dictValue === dictValue && dictValue === '1') {
name = '企业课程'
name = '技术端'
}
})
}
if (this.lessonTypeOptions) {
this.lessonTypeOptions.forEach(item => {
if (item.dictValue === dictValue1 && dictValue1 === '1') {
name1 = '院校课程'
name1 = '技能端'
}
})
}
......
......@@ -99,9 +99,9 @@
{{ scope.row.exitId || '-' }}
</template>
</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">
{{ scope.row.lessonType || '-' }}
<span>{{ getLessonTypeName( scope.row.lessonType,scope.row.lessonTypeSchool) }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remarks" :show-overflow-tooltip="true">
......@@ -186,7 +186,7 @@
<div class="tip">出口ip可以填写多个,用逗号分隔</div>
</el-form-item>
<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
v-for="(item,index) in lessonTypeOptions"
:key="index"
......@@ -290,7 +290,12 @@ export default {
},
// 表单参数
form: {
unitType: '0'
unitType: '0',
unitName: '',
userId: '',
exitId: '',
lessonType: '',
remarks: ''
},
// 表单校验
rules: {
......@@ -310,10 +315,31 @@ export default {
this.getLessonType()
},
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() {
getDict('lesson_type').then(res => {
this.lessonTypeOptions = res.data
console.log('this.lessonTypeOptions:', this.lessonTypeOptions)
})
},
getUserList() {
......@@ -398,7 +424,8 @@ export default {
unitName: undefined,
unitNumber: undefined,
exitId: undefined,
flag: ''
flag: '',
lessonType: []
}
this.handleQuery()
},
......@@ -414,6 +441,15 @@ export default {
const id = row.businessId
getSysUnit(id).then(response => {
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.title = '修改单位'
})
......@@ -440,6 +476,7 @@ export default {
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
this.form.lessonType = this.form.lessonType.length > 1 ? '2' : this.form.lessonType.join(',')
if (this.form.businessId !== undefined) {
updateSysUnit(this.form).then(response => {
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