Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
tea-resources-web
Commits
a424c7ee
Commit
a424c7ee
authored
Apr 23, 2024
by
FangYuePeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人开课和单位开课新增操作
parent
664c861c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1115 additions
and
130 deletions
+1115
-130
teaTrialCourse.js
src/api/try/teaTrialCourse.js
+10
-0
index.vue
src/views/courseInformation/classManagement/index.vue
+492
-29
index.vue
src/views/courseInformation/courseManagement/index.vue
+86
-37
index.vue
src/views/courseInformation/courseManagement/info/index.vue
+55
-28
index.vue
src/views/courseInformation/tryoutCommencement/index.vue
+472
-36
No files found.
src/api/try/teaTrialCourse.js
View file @
a424c7ee
...
...
@@ -108,3 +108,13 @@ export function importExcel(data) {
data
})
}
// 根据查询参数分页查询可开课的课程
export
function
queryBLessonWithTrial
(
query
)
{
return
request
({
url
:
'/blesson/queryBLessonWithTrial'
,
method
:
'get'
,
params
:
query
})
}
src/views/courseInformation/classManagement/index.vue
View file @
a424c7ee
...
...
@@ -105,6 +105,17 @@
@
click=
"handleAdd"
>
{{
commonField
.
addName
}}
</el-button>
</el-form-item>
<el-form-item>
<!-- //新增按钮-->
<el-button
v-hasPermi=
"hasAddPerm"
:class=
"commonField.addClass"
:type=
"commonField.typePrimary"
:icon=
"commonField.addIcon"
:size=
"commonField.smallSize"
@
click=
"handleAdd1"
>
测试
</el-button>
</el-form-item>
<!-- //导入按钮-->
<el-button
...
...
@@ -267,6 +278,248 @@
:limit
.
sync=
"queryParams.rows"
@
pagination=
"getList"
/>
<el-dialog
:title=
"title"
:visible
.
sync=
"open1"
width=
"1300px"
:close-on-click-modal=
"false"
append-to-body
@
close=
"handleClose"
>
<el-form
ref=
"lessonRef"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"auto"
>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"开课单位"
prop=
"applicantUnit"
>
<el-select
v-model=
"queryLessonParams.applicantUnit"
filterable
style=
"width: 400px"
>
<el-option
v-for=
"(items,index) in unitOptions"
:key=
"index"
:label=
"items.unitName"
:value=
"items.businessId"
/>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item
label=
"课程类型"
prop=
"lessonType"
>
<el-select
v-model=
"queryLessonParams.lessonType"
filterable
style=
"width: 400px"
@
change=
"handleLessonTypeChange"
>
<el-option
v-for=
"item in lessonTypeOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
</div>
</div>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"课程方案"
prop=
"classPlan"
>
<el-select
v-model=
"queryLessonParams.classPlan"
filterable
style=
"width: 400px"
>
<el-option
v-for=
"item in coursePlanOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item
label=
"难度等级"
prop=
"difficultyClassify"
>
<el-select
v-model=
"queryLessonParams.difficultyClassify"
placeholder=
"难度等级"
clearable
style=
"width: 400px"
>
<el-option
v-for=
"item in difficultyOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
</div>
</div>
<el-divider
/>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"开始时间"
prop=
"createTime"
>
<span>
<el-date-picker
v-model=
"addLessonForm.beginDate"
style=
"width: 400px"
type=
"date"
placeholder=
"-"
:editable=
"false"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
/>
</span>
</el-form-item>
</div>
<div>
<el-form-item
label=
"结束时间"
prop=
"endTime"
>
<span>
<el-date-picker
v-model=
"addLessonForm.endDate"
style=
"width: 400px"
type=
"date"
placeholder=
"-"
:editable=
"false"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
/>
</span>
</el-form-item>
</div>
</div>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"开课类型"
prop=
"isPay"
>
<el-select
v-model=
"addLessonForm.isPay"
filterable
style=
"width: 400px"
>
<el-option
v-for=
"(items,index) in isPayList"
:key=
"index"
:label=
"items.label"
:value=
"items.value"
/>
</el-select>
</el-form-item>
</div>
<div
/>
</div>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"addLessonForm.remarks"
style=
"width: 1100px"
placeholder=
"备注"
clearable
:maxlength=
"30"
size=
"small"
/>
</el-form-item>
</div>
</div>
</el-form>
<div
style=
"padding: 20px;text-align: center"
>
<el-button
class=
"fourWordsBtn"
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleLessonQuery"
>
查询
</el-button>
<el-button
class=
"fourWordsBtn"
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"handleLessonClear"
>
重置
</el-button>
</div>
<!-- <el-table class="DBXXClass" border :data="form.settingList" @selection-change="handleSelectionChange ">-->
<el-table
ref=
"multipleTable"
class=
"DBXXClass"
border
:data=
"lessonList"
:row-key=
"getRoKey"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
/>
<el-table-column
label=
"序号"
type=
"index"
width=
"70"
align=
"center"
:reserve-selection=
"true"
/>
<el-table-column
label=
"课程名称"
prop=
"lessonName"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lessonName
}}
</
template
>
</el-table-column>
<el-table-column
label=
"开课单位"
prop=
"applicantUnit"
show-overflow-tooltip
>
{{ getUnitName(queryLessonParams.applicantUnit) }}
</el-table-column>
<el-table-column
label=
"课程类型"
prop=
"lessonType"
show-overflow-tooltip
>
{{ queryLessonParams.lessonType === '0' ? '企业课程' : '院校课程' }}
</el-table-column>
<el-table-column
label=
"课程方案"
prop=
"class"
show-overflow-tooltip
>
{{ getClassPlanName(queryLessonParams.classPlan) }}
</el-table-column>
<el-table-column
label=
"难度等级"
prop=
"class"
show-overflow-tooltip
>
{{ getDifficultyLevelName(queryLessonParams.difficultyClassify) }}
</el-table-column>
<el-table-column
label=
"开始日期"
prop=
"createTime"
show-overflow-tooltip
>
<
template
>
{{
addLessonForm
.
beginDate
}}
</
template
>
</el-table-column>
<el-table-column
label=
"结束日期"
prop=
"endTime"
show-overflow-tooltip
>
<
template
>
{{
addLessonForm
.
endDate
}}
</
template
>
</el-table-column>
<el-table-column
label=
"开课类型"
prop=
"isPay"
:show-overflow-tooltip=
"true"
>
{{ addLessonForm.isPay === 0 ? '试用' : '付费' }}
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remarks"
show-overflow-tooltip
>
<
template
>
{{
addLessonForm
.
remarks
}}
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total1>0"
:total=
"total1"
:page
.
sync=
"queryLessonParams.page"
:limit
.
sync=
"queryLessonParams.rows"
@
pagination=
"handleLessonQuery"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"cancelBtn"
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
class=
"submitBtn"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</el-dialog>
<!-- 添加或修改角色配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1100px"
:close-on-click-modal=
"false"
append-to-body
@
close=
"handleClose"
>
<el-form
ref=
"form"
:model=
"form"
size=
"small"
label-width=
"auto"
>
...
...
@@ -628,16 +881,21 @@ import {
delTeaTrialCourse
,
importTemplateTrialCourse
,
listALLTeaTrialCourse
,
listTeaTrialCourse
,
updateTeaTrialCourse
,
importExcel
importExcel
,
queryBLessonWithTrial
}
from
'@/api/try/teaTrialCourse'
import
dict
from
'@/views/system/dict/index.vue'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
getToken
}
from
'@/utils/auth'
export
default
{
name
:
'Role'
,
dicts
:
[
'tec_classify'
,
'job_classify'
],
data
()
{
return
{
total1
:
0
,
lessonList
:
[],
difficultyOptions
:
[],
multipleSelection
:
[],
// 开始日期数组
dateRangeBegin
:
[],
...
...
@@ -682,10 +940,15 @@ export default {
dateList
:
[],
unitOptions
:
[],
classOptions
:
[],
lessonTypeOptions
:
[],
coursePlanOptions
:
[],
coursePlanOptionsC
:
[],
// 弹出层标题
title
:
''
,
// 是否显示弹出层
open
:
false
,
open1
:
false
,
// 日期范围
// dateRange: [],
// 菜单表格数据
...
...
@@ -747,19 +1010,46 @@ export default {
endTrialTime
:
''
,
applicantType
:
2
},
// 查询参数
queryLessonParams
:
{
applicantUnit
:
''
,
classPlan
:
''
,
lessonType
:
''
,
difficultyClassify
:
''
,
page
:
1
,
rows
:
10
},
// 开课类型list
isPayList
:
[
{
label
:
'试用'
,
value
:
0
},
{
label
:
'付费'
,
value
:
1
}
],
courseDirection
:
[],
addLessonForm
:
{
applicantUnit
:
''
,
unitId
:
''
,
unitName
:
''
,
lessonId
:
''
,
lessonName
:
''
,
beginDate
:
null
,
endDate
:
null
,
classPlan
:
''
,
lessonType
:
''
,
remarks
:
''
,
isPay
:
''
},
addForm
:
{
unitId
:
''
,
unitName
:
''
,
lessonId
:
''
,
lessonName
:
''
,
beginDate
:
null
,
endDate
:
null
endDate
:
null
,
classPlan
:
''
,
lessonType
:
''
},
// 表单参数
form
:
{
...
...
@@ -770,7 +1060,8 @@ export default {
label
:
'label'
},
deptOptions
:
[]
deptOptions
:
[],
rules
:
{}
}
},
computed
:
{
...
...
@@ -793,8 +1084,55 @@ export default {
this
.
getList
()
// 列表查询
this
.
getCourseDirection
()
this
.
getJobClassification
()
this
.
getLessonType
()
this
.
getCoursePlan
()
this
.
getDifficultyLevel
()
},
methods
:
{
// 获取难度等级
getDifficultyLevel
()
{
getDict
(
'difficulty_grade'
).
then
(
res
=>
{
this
.
difficultyOptions
=
res
.
data
})
},
// 根据难度等级的id获取难度等级的名称
getDifficultyLevelName
(
dictValue
)
{
let
name
=
''
this
.
difficultyOptions
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
dictValue
)
{
name
=
item
.
dictLabel
}
})
return
name
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
console
.
log
(
this
.
multipleSelection
)
},
getRoKey
(
row
)
{
return
row
.
id
},
// 获取课程类型
getLessonType
()
{
getDict
(
'lesson_type'
).
then
(
res
=>
{
this
.
lessonTypeOptions
=
res
.
data
console
.
log
(
'课程类型'
,
this
.
lessonTypeOptions
)
})
},
// 获取课程方案
getCoursePlan
()
{
getDict
(
'class_plan'
).
then
(
res
=>
{
this
.
coursePlanOptions
=
res
.
data
console
.
log
(
'课程方案'
,
this
.
coursePlanOptions
)
})
},
// 获取课程方案(院校)
getCoursePlanC
()
{
getDict
(
'class_plan_C'
).
then
(
res
=>
{
this
.
coursePlanOptionsC
=
res
.
data
console
.
log
(
'课程方案'
,
this
.
addForm
.
coursePlanOptionsC
)
})
},
/** 1.获取全部单位**/
getUnitOptions
()
{
const
obj
=
{
...
...
@@ -814,6 +1152,17 @@ export default {
})
return
name
},
getClassPlanName
(
dictValue
)
{
// 根据难度等级的id获取难度等级的名称
let
name
=
''
this
.
coursePlanOptions
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
dictValue
)
{
name
=
item
.
dictLabel
}
})
return
name
},
// 获取岗位类型
getJobClassification
()
{
// const obj = {
...
...
@@ -859,6 +1208,39 @@ export default {
this
.
classOptions
=
res
.
data
})
},
/** 查找可以开课的课程*/
handleLessonQuery
()
{
const
query
=
{
page
:
1
,
rows
:
10
,
applicantUnit
:
this
.
queryLessonParams
.
applicantUnit
,
classPlan
:
this
.
queryLessonParams
.
classPlan
,
lessonType
:
this
.
queryLessonParams
.
lessonType
,
applicantType
:
'2'
,
difficultyClassify
:
this
.
queryLessonParams
.
difficultyClassify
}
queryBLessonWithTrial
(
query
).
then
(
res
=>
{
this
.
lessonList
=
res
.
rows
this
.
total1
=
res
.
total
console
.
log
(
res
)
console
.
log
(
this
.
lessonList
)
})
// if (res.code == 200) {
// this.lessonList = res.rows
// this.total1 = res.total
// console.log("res1111")
// } else {
// console.log("res2222211")
// }
//
// })
// console.log("res",this.setList)
},
/** 3.当用户选中单位时将单位选择框禁用**/
handleUnitChange
(
value
)
{
if
(
value
&&
value
!==
''
&&
value
!==
undefined
)
{
...
...
@@ -893,10 +1275,40 @@ export default {
this
.
resetAddFrom
()
this
.
unitDisplay
=
false
},
handleLessonClear
()
{
this
.
resetQueryLesson
()
this
.
resetAddLessonForm
()
},
resetAddLessonForm
()
{
this
.
addLessonForm
=
{
unitId
:
''
,
unitName
:
''
,
lessonId
:
''
,
lessonName
:
''
,
beginDate
:
null
,
endDate
:
null
}
this
.
lessonList
=
[]
this
.
total1
=
0
},
resetQueryLesson
()
{
this
.
queryLessonParams
=
{
coursePlan
:
''
,
lessonType
:
''
}
this
.
form
.
settingList
=
[]
},
/** 5.关闭时请表单想和列表数据清空**/
handleClose
()
{
this
.
resetAddFrom
()
this
.
handleLessonClear
()
this
.
open
=
false
this
.
open1
=
false
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
lessonRef
.
clearValidate
()
})
},
/** 6.重置方法**/
resetAddFrom
()
{
...
...
@@ -1039,6 +1451,7 @@ export default {
this
.
total
=
response
.
total
this
.
loading
=
false
})
console
.
log
(
'dateList'
,
this
.
dateList
)
},
/** 查询菜单列表 */
getMenuList
(
roleId
)
{
...
...
@@ -1088,6 +1501,17 @@ export default {
this
.
handleQuery
()
},
/** 处理课程类型变化*/
handleLessonTypeChange
(
value
)
{
if
(
value
===
'1'
)
{
getDict
(
'class_plan_C'
).
then
(
res
=>
{
this
.
coursePlanOptions
=
res
.
data
})
}
else
{
this
.
getCoursePlan
()
}
},
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
()
...
...
@@ -1095,6 +1519,13 @@ export default {
this
.
unitDisplay
=
false
this
.
title
=
'开课新增'
},
/** 新增按钮操作 */
handleAdd1
()
{
this
.
reset
()
this
.
open1
=
true
this
.
unitDisplay
=
false
this
.
title
=
'开课新增'
},
/** 修改按钮操作 */
handleUpdate
(
index
)
{
this
.
dateList
[
index
].
flag
=
'1'
...
...
@@ -1120,33 +1551,65 @@ export default {
/** 提交按钮 */
submitForm
:
function
()
{
if
(
this
.
form
.
settingList
.
length
>
0
)
{
// 克隆form
const
form
=
{
settingList
:
this
.
form
.
settingList
,
applicantUnit
:
this
.
addForm
.
applicantUnit
,
console
.
log
(
'提交'
)
const
form
=
this
.
multipleSelection
form
.
forEach
(
item
=>
{
item
.
applicantUnit
=
this
.
queryLessonParams
.
applicantUnit
item
.
lessonId
=
item
.
businessId
item
.
remarks
=
this
.
addLessonForm
.
remarks
item
.
applicantType
=
2
item
.
isPay
=
this
.
addLessonForm
.
isPay
item
.
beginTrialTime
=
this
.
addLessonForm
.
beginDate
item
.
endTrialTime
=
this
.
addLessonForm
.
endDate
item
.
businessId
=
null
item
.
flag
=
'0'
item
.
jobClassification
=
item
.
jobClassify
item
.
technicalClassification
=
item
.
tecClassify
})
console
.
log
(
form
)
const
addForm
=
{
settingList
:
form
,
applicantUnit
:
this
.
addLessonForm
.
applicantUnit
,
applicantType
:
2
}
// 判断form的每一项flag是否为0
for
(
let
i
=
0
;
i
<
form
.
settingList
.
length
;
i
++
)
{
if
(
form
.
settingList
[
i
].
flag
===
'1'
)
{
return
this
.
$message
.
error
(
'请保存列表数据'
)
}
}
console
.
log
(
'this.form'
,
this
.
form
)
console
.
log
(
'this.addForm'
,
this
.
addForm
)
batchAddTeaTrialCourse
(
form
).
then
(
res
=>
{
batchAddTeaTrialCourse
(
addForm
).
then
(
res
=>
{
console
.
log
(
'添加开课信息'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
resetAddFrom
()
this
.
open
=
false
this
.
open1
=
false
this
.
getList
()
this
.
$message
.
success
(
'添加成功'
)
}
})
}
else
{
return
this
.
$message
.
error
(
'请添加列表数据'
)
}
// if (this.form.settingList.length > 0) {
// // 克隆form
// const form = {
// settingList: this.form.settingList,
// applicantUnit: this.addForm.applicantUnit,
// applicantType: 2
// }
// // 判断form的每一项flag是否为0
// for (let i = 0; i
<
form
.
settingList
.
length
;
i
++
)
{
// if (form.settingList[i].flag === '1') {
// return this.$message.error('请保存列表数据')
// }
// }
// console.log('this.form', this.form)
// console.log('this.addForm', this.addForm)
// batchAddTeaTrialCourse(form).then(res => {
// console.log('添加开课信息', res)
// if (res.code === 200) {
// this.resetAddFrom()
// this.open = false
// this.getList()
// this.$message.success('添加成功')
// }
// })
// } else {
// return this.$message.error('请添加列表数据')
// }
},
/** 删除按钮操作 */
handleDelete
(
row
)
{
...
...
src/views/courseInformation/courseManagement/index.vue
View file @
a424c7ee
...
...
@@ -7,6 +7,17 @@
<el-form-item
label=
"课程名称"
prop=
"lessonName"
>
<el-input
v-model=
"queryParams.lessonName"
placeholder=
"课程名称"
:maxlength=
"15"
style=
"width: 200px"
/>
</el-form-item>
<!-- 课程类型-->
<el-form-item
label=
"课程类型"
prop=
"lessonType"
>
<el-select
v-model=
"queryParams.lessonType"
placeholder=
"课程类型"
clearable
>
<el-option
v-for=
"item in lessonTypeOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
<!-- 课程方案-->
<el-form-item
label=
"课程方案"
prop=
"classPlan"
>
<el-select
v-model=
"queryParams.classPlan"
class=
"selectWidth"
placeholder=
"课程方案"
clearable
>
...
...
@@ -79,9 +90,9 @@
/>
</el-select>
</el-form-item>
<!--
企业
精品课-->
<el-form-item
label=
"
企业
精品课"
prop=
"entQualityLesson"
>
<el-select
v-model=
"queryParams.
entQualityLesson"
placeholder=
"企业
精品课"
clearable
>
<!-- 精品课-->
<el-form-item
label=
"精品课"
prop=
"entQualityLesson"
>
<el-select
v-model=
"queryParams.
qualityLesson"
placeholder=
"
精品课"
clearable
>
<el-option
v-for=
"(item,index) in entQualityLessonList"
:key=
"index"
...
...
@@ -90,17 +101,7 @@
/>
</el-select>
</el-form-item>
<!-- 院校精品课-->
<el-form-item
label=
"院校精品课"
prop=
"schoolQualityLesson"
>
<el-select
v-model=
"queryParams.schoolQualityLesson"
placeholder=
"院校精品课"
clearable
>
<el-option
v-for=
"item in entQualityLessonList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<!-- //查询按钮-->
<el-button
...
...
@@ -148,6 +149,18 @@
<el-form-item
label=
"课程方案"
prop=
"name"
>
<el-input
v-model=
"form.name"
auto-complete=
"off"
placeholder=
"课时数"
:maxlength=
"15"
/>
</el-form-item>
<el-form-item
label=
"课程类型"
>
<el-select
v-model=
"form.lessonType"
placeholder=
"课程类型"
clearable
>
<el-option
v-for=
"item in lessonTypeOptions"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"岗位分类"
prop=
"value"
>
<el-select
v-model=
"form.value"
placeholder=
"适用岗位"
clearable
>
<el-option
...
...
@@ -286,6 +299,11 @@
<span>
{{
scope
.
row
.
classHour
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"课程类型"
prop=
"lessonType"
min-width=
"120px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getLessonTypeName
(
scope
.
row
.
lessonType
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"课程方案"
prop=
"classPlan"
min-width=
"120px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getCoursePlanName
(
scope
.
row
.
classPlan
)
}}
</span>
...
...
@@ -343,26 +361,26 @@
/>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"
企业精品课"
prop=
"entQ
ualityLesson"
min-width=
"100px"
:show-overflow-tooltip=
"true"
>
<el-table-column
align=
"center"
label=
"
精品课"
prop=
"q
ualityLesson"
min-width=
"100px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.
entQ
ualityLesson"
v-model=
"scope.row.
q
ualityLesson"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleEntQualityChange(scope.row)"
/>
</
template
>
</el-table-column>
<
el-table-column
align=
"center"
label=
"院校精品课"
prop=
"schoolQualityLesson"
min-width=
"100px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.schoolQualityLesson"
active-value=
"1"
inactive-value=
"0"
@
change=
"handleSchoolQualityChange(scope.row)"
/
>
</
template
>
<
/el-table-column
>
<
!-- <el-table-column align="center" label="院校精品课" prop="schoolQualityLesson" min-width="100px" :show-overflow-tooltip="true">--
>
<!-- <template slot-scope="scope">--
>
<!-- <el-switch-->
<!-- v-model="scope.row.schoolQualityLesson"-->
<!-- active-value="1"-->
<!-- inactive-value="0"-->
<!-- @change="handleSchoolQualityChange(scope.row)"-->
<!-- />--
>
<!-- </template>--
>
<
!-- </el-table-column>--
>
<el-table-column
align=
"left"
label=
"课程介绍"
prop=
"lessonDescription"
min-width=
"150px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
lessonDescription
}}
</span>
...
...
@@ -370,7 +388,7 @@
</el-table-column>
<el-table-column
align=
"left"
label=
"课程评分"
prop=
"lessonScore"
min-width=
"150px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<el-link
type=
"primary"
v-if=
"scope.row.lessonScore!==0"
@
click=
"handleCheckScore(scope.row.businessId, scope.row.lessonScore)"
>
{{
scope
.
row
.
lessonScore
}}
分
</el-link>
<el-link
v-if=
"scope.row.lessonScore!==0"
type=
"primary"
@
click=
"handleCheckScore(scope.row.businessId, scope.row.lessonScore)"
>
{{
scope
.
row
.
lessonScore
}}
分
</el-link>
<div
v-else
>
-
</div>
</
template
>
</el-table-column>
...
...
@@ -547,7 +565,7 @@
>
<div
style=
"padding: 50px"
>
<div
class=
"scoreTitle"
>
综合评分:
<span
style=
"color: red; margin: 0 50px 0 30px; font-size: 20px"
>
{{ scoreAvg}}分
</span>
综合评分:
<span
style=
"color: red; margin: 0 50px 0 30px; font-size: 20px"
>
{{ scoreAvg
}}分
</span>
评价总数:
<span
style=
"color: red;margin-left: 30px;font-size: 20px"
>
{{ scoreTotal }}条
</span>
</div>
<el-table
...
...
@@ -566,10 +584,10 @@
匿名用户
</div>
<div
v-else-if=
"scope.row.unitName===''"
>
{{
scope
.
row
.
userName
}}
{{
scope
.
row
.
userName
}}
</div>
<div
v-else
>
{{
scope
.
row
.
userName
+
'-'
+
scope
.
row
.
unitName
}}
{{
scope
.
row
.
userName
+
'-'
+
scope
.
row
.
unitName
}}
</div>
</
template
>
...
...
@@ -679,7 +697,7 @@ export default {
}
return
{
// 评分列表
//平均分
//
平均分
scoreAvg
:
0
,
scoreTable
:
[],
// 评论总数
...
...
@@ -747,6 +765,8 @@ export default {
{
value
:
'1'
,
label
:
'已发布'
},
{
value
:
'0'
,
label
:
'未发布'
}
],
// 课程类型List
lessonTypeOptions
:
[],
// 课程方向
courseDirection
:
[],
valueOptions
:
[
...
...
@@ -806,11 +826,12 @@ export default {
lessonPrice
:
''
,
homeDisplay
:
''
,
flag
:
''
,
schoolQ
ualityLesson
:
''
,
entQualityLesson
:
''
q
ualityLesson
:
''
,
lessonType
:
''
},
coursePlanOptions
:
[],
coursePlanOptionsC
:
[],
// pagination
total
:
0
,
...
...
@@ -872,6 +893,7 @@ export default {
this
.
getCourseDirection
()
this
.
getJobClassification
()
this
.
getDifficultyLevel
()
this
.
getLessonType
()
this
.
getCoursePlan
()
this
.
getTeacher
()
this
.
loadData
()
...
...
@@ -880,9 +902,9 @@ export default {
/**
* 点击分数
***/
handleCheckScore
(
id
,
scoreAvg
)
{
handleCheckScore
(
id
,
scoreAvg
)
{
this
.
drawer
=
true
this
.
scoreAvg
=
scoreAvg
this
.
scoreAvg
=
scoreAvg
this
.
getScoreList
(
id
)
},
/**
...
...
@@ -1022,10 +1044,10 @@ export default {
},
// 修改是否企业精品课
handleEntQualityChange
(
row
)
{
const
text
=
row
.
entQ
ualityLesson
===
'1'
?
'显示'
:
'不显示'
const
text
=
row
.
q
ualityLesson
===
'1'
?
'显示'
:
'不显示'
const
params
=
{
businessId
:
row
.
businessId
,
entQualityLesson
:
row
.
entQ
ualityLesson
qualityLesson
:
row
.
q
ualityLesson
}
this
.
$confirm
(
'是否确认操作?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -1089,6 +1111,8 @@ export default {
flag
:
_this
.
queryParams
.
flag
,
schoolQualityLesson
:
_this
.
queryParams
.
schoolQualityLesson
,
entQualityLesson
:
_this
.
queryParams
.
entQualityLesson
,
qualityLesson
:
_this
.
queryParams
.
qualityLesson
,
lessonType
:
_this
.
queryParams
.
lessonType
,
sort
:
'create_date desc'
}
queryBLessonsByPagination
(
params
).
then
(
res
=>
{
...
...
@@ -1142,6 +1166,14 @@ export default {
console
.
log
(
'课程方案'
,
this
.
coursePlanOptions
)
})
},
// 获取课程方案(院校版)
getCoursePlanC
()
{
getDict
(
'class_plan_c'
).
then
(
res
=>
{
this
.
coursePlanOptionsC
=
res
.
data
console
.
log
(
'课程方案'
,
this
.
coursePlanOptionsC
)
})
},
// 获取岗位类型
getJobClassification
()
{
getDict
(
'job_classify'
).
then
(
res
=>
{
...
...
@@ -1154,6 +1186,13 @@ export default {
this
.
courseDirection
=
res
.
data
})
},
// 获取课程类型
getLessonType
()
{
getDict
(
'lesson_type'
).
then
(
res
=>
{
this
.
lessonTypeOptions
=
res
.
data
})
},
// 根据岗位的id获取岗位的名称
getJobClassificationName
(
dictValue
)
{
if
(
!
dictValue
)
{
...
...
@@ -1198,6 +1237,16 @@ export default {
})
return
name
},
// 根据课程类型的id获取类型的名称
getLessonTypeName
(
dictValue
)
{
let
name
=
''
this
.
lessonTypeOptions
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
dictValue
)
{
name
=
item
.
dictLabel
}
})
return
name
},
// 根据id获取课程方案的名称
getCoursePlanName
(
dictValue
)
{
if
(
!
dictValue
)
{
...
...
src/views/courseInformation/courseManagement/info/index.vue
View file @
a424c7ee
...
...
@@ -19,6 +19,24 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"100"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"精品课:"
prop=
"qualityLesson"
>
<el-radio-group
v-model=
"form.qualityLesson"
>
<el-radio
label=
"1"
>
是
</el-radio>
<el-radio
label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"课程类型"
prop=
"lessonType"
>
<el-radio-group
v-model=
"form.lessonType"
>
<el-radio
label=
"0"
>
企业课程
</el-radio>
<el-radio
label=
"1"
>
院校课程
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"100"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"课时数:"
prop=
"classHour"
:rules=
"[
{ required: status !== '3', message: '请输入课时数', trigger: 'blur' }]">
...
...
@@ -34,7 +52,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"课程方案:"
prop=
"classPlan"
:rules=
"[
{ required: status !== '3', message: '请选择课程方案', trigger: 'blur' }]">
<el-form-item
v-if=
"form.lessonType === '0'"
label=
"课程方案:"
prop=
"classPlan"
:rules=
"[
{ required: status !== '3', message: '请选择课程方案', trigger: 'blur' }]">
<el-select
v-model=
"form.classPlan"
filterable
...
...
@@ -49,11 +67,29 @@
/>
</el-select>
</el-form-item>
<el-form-item
v-else
label=
"课程方案:"
prop=
"classPlan"
:rules=
"[
{ required: status !== '3', message: '请选择课程方案', trigger: 'blur' }]">
<el-select
v-model=
"form.classPlan"
filterable
multiple
class=
"normalSelct"
>
<el-option
v-for=
"(items,index) in coursePlanOptionsC"
:key=
"index"
:label=
"items.dictLabel"
:value=
"items.dictValue"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"100"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"岗位分类:"
prop=
"jobClassify"
>
<el-form-item
v-if=
"form.classPlan[0]=== '1'"
label=
"岗位分类:"
prop=
"jobClassify"
>
<el-select
v-model=
"form.jobClassify"
class=
"normalSelct"
...
...
@@ -69,7 +105,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"技术分类:"
prop=
"tecClassify"
>
<el-form-item
v-if=
"form.classPlan[0]!== '1'"
label=
"技术分类:"
prop=
"tecClassify"
>
<el-select
v-model=
"form.tecClassify"
multiple
...
...
@@ -135,24 +171,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"100"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"企业精品课:"
prop=
"entQualityLesson"
>
<el-radio-group
v-model=
"form.entQualityLesson"
>
<el-radio
label=
"1"
>
是
</el-radio>
<el-radio
label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"院校精品课"
prop=
"schoolQualityLesson"
>
<el-radio-group
v-model=
"form.schoolQualityLesson"
>
<el-radio
label=
"1"
>
是
</el-radio>
<el-radio
label=
"0"
>
否
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"100"
>
<el-col
span=
"12"
>
<el-form-item
label=
"课程封面"
prop=
"totalStuHours"
>
...
...
@@ -209,10 +228,7 @@
import
{
uploadPublic
}
from
'@/api/contentManagement/sysContest'
import
{
blessonAdd
,
detailBLesson
,
queryTeaLessonJobs
,
queryTeaLessonTecs
,
updateBLesson
detailBLesson
}
from
'@/api/courseManagement/indexApi'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
listCmsLecturer
}
from
'@/api/courseManagement/cmsLecturer'
...
...
@@ -222,6 +238,8 @@ export default {
name
:
'Index'
,
data
()
{
return
{
// 岗位能力
cP
:
[
'1'
],
// 方案集合
optionList
:
[],
...
...
@@ -267,6 +285,7 @@ export default {
valueOptions
:
[],
courseDirection
:
[],
coursePlanOptions
:
[],
coursePlanOptionsC
:
[],
form
:
{
// 课程名称
lessonName
:
''
,
...
...
@@ -288,10 +307,10 @@ export default {
difficultyClassify
:
''
,
// 首页显示
homeDisplay
:
'0'
,
//
企业
精品课
entQ
ualityLesson
:
'0'
,
// 精品课
q
ualityLesson
:
'0'
,
// 院校精品课
schoolQualityLesson
:
'0'
,
lessonType
:
'0'
,
// 课程介绍
lessonDescription
:
''
,
flag
:
'1'
,
...
...
@@ -322,6 +341,7 @@ export default {
this
.
getJobClassification
()
this
.
getCourseDirection
()
this
.
getTeacher
()
this
.
getCoursePlanC
()
},
getDifficultyLevlList
()
{
getDict
(
'difficulty_grade'
).
then
(
res
=>
{
...
...
@@ -340,6 +360,13 @@ export default {
console
.
log
(
'课程方案'
,
this
.
coursePlanOptions
)
})
},
// 获取课程方案(院校)
getCoursePlanC
()
{
getDict
(
'class_plan_C'
).
then
(
res
=>
{
this
.
coursePlanOptionsC
=
res
.
data
console
.
log
(
'课程方案'
,
this
.
coursePlanOptionsC
)
})
},
// 获取岗位类型
getJobClassification
()
{
getDict
(
'job_classify'
).
then
(
res
=>
{
...
...
src/views/courseInformation/tryoutCommencement/index.vue
View file @
a424c7ee
...
...
@@ -116,6 +116,17 @@
@
click=
"handleAdd"
>
{{
commonField
.
addName
}}
</el-button>
</el-form-item>
<el-form-item>
<!-- //新增按钮-->
<el-button
:class=
"commonField.addClass"
:type=
"commonField.typePrimary"
:icon=
"commonField.addIcon"
:size=
"commonField.smallSize"
@
click=
"handleAdd1"
>
测试
</el-button>
</el-form-item>
</div>
</el-form>
</div>
...
...
@@ -580,7 +591,248 @@
<el-button
class=
"submitBtn"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</el-dialog>
<el-dialog
:title=
"title"
:visible
.
sync=
"open1"
width=
"1300px"
:close-on-click-modal=
"false"
append-to-body
@
close=
"handleClose"
>
<el-form
ref=
"lessonRef"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"auto"
>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"申请人"
prop=
"applicant"
>
<el-select
v-model=
"queryLessonParams.applicant"
filterable
style=
"width: 400px"
>
<el-option
v-for=
"(items,index) in userOptions"
:key=
"index"
:label=
"items.nickName"
:value=
"items.businessId"
/>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item
label=
"课程类型"
prop=
"lessonType"
>
<el-select
v-model=
"queryLessonParams.lessonType"
filterable
style=
"width: 400px"
@
change=
"handleLessonTypeChange"
>
<el-option
v-for=
"item in lessonTypeOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
</div>
</div>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"课程方案"
prop=
"classPlan"
>
<el-select
v-model=
"queryLessonParams.classPlan"
filterable
style=
"width: 400px"
>
<el-option
v-for=
"item in coursePlanOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item
label=
"难度等级"
prop=
"difficultyClassify"
>
<el-select
v-model=
"queryLessonParams.difficultyClassify"
placeholder=
"难度等级"
clearable
style=
"width: 400px"
>
<el-option
v-for=
"item in difficultyOptions"
:key=
"item.dictValue"
:label=
"item.dictLabel"
:value=
"item.dictValue"
/>
</el-select>
</el-form-item>
</div>
</div>
<el-divider
/>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"开始时间"
prop=
"createTime"
>
<span>
<el-date-picker
v-model=
"addLessonForm.beginDate"
style=
"width: 400px"
type=
"date"
placeholder=
"-"
:editable=
"false"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
/>
</span>
</el-form-item>
</div>
<div>
<el-form-item
label=
"结束时间"
prop=
"endTime"
>
<span>
<el-date-picker
v-model=
"addLessonForm.endDate"
style=
"width: 400px"
type=
"date"
placeholder=
"-"
:editable=
"false"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
/>
</span>
</el-form-item>
</div>
</div>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"开课类型"
prop=
"isPay"
>
<el-select
v-model=
"addLessonForm.isPay"
filterable
style=
"width: 400px"
>
<el-option
v-for=
"(items,index) in isPayList"
:key=
"index"
:label=
"items.label"
:value=
"items.value"
/>
</el-select>
</el-form-item>
</div>
<div
/>
</div>
<div
style=
"display: flex;justify-content: space-between;align-items: center"
>
<div>
<el-form-item
label=
"备注"
prop=
"remarks"
>
<el-input
v-model=
"addLessonForm.remarks"
style=
"width: 1100px"
placeholder=
"备注"
clearable
:maxlength=
"30"
size=
"small"
/>
</el-form-item>
</div>
</div>
</el-form>
<div
style=
"padding: 20px;text-align: center"
>
<el-button
class=
"fourWordsBtn"
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleLessonQuery"
>
查询
</el-button>
<el-button
class=
"fourWordsBtn"
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"handleLessonClear"
>
重置
</el-button>
</div>
<!-- <el-table class="DBXXClass" border :data="form.settingList" @selection-change="handleSelectionChange ">-->
<el-table
ref=
"multipleTable"
class=
"DBXXClass"
border
:data=
"lessonList"
:row-key=
"getRoKey"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
/>
<el-table-column
label=
"序号"
type=
"index"
width=
"70"
align=
"center"
:reserve-selection=
"true"
/>
<el-table-column
label=
"开课名称"
prop=
"lessonName"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lessonName
}}
</
template
>
</el-table-column>
<el-table-column
label=
"申请人"
prop=
"applicantUnit"
show-overflow-tooltip
>
{{ getUserName(queryLessonParams.applicant) || '-' }}
</el-table-column>
<el-table-column
label=
"课程类型"
prop=
"lessonType"
show-overflow-tooltip
>
{{ queryLessonParams.lessonType === '0' ? '企业课程' : '院校课程' }}
</el-table-column>
<el-table-column
label=
"课程方案"
prop=
"class"
show-overflow-tooltip
>
{{ getClassPlanName(queryLessonParams.classPlan) }}
</el-table-column>
<el-table-column
label=
"难度等级"
prop=
"class"
show-overflow-tooltip
>
{{ getDifficultyLevelName(queryLessonParams.difficultyClassify) }}
</el-table-column>
<el-table-column
label=
"开始日期"
prop=
"createTime"
show-overflow-tooltip
>
<
template
>
{{
addLessonForm
.
beginDate
}}
</
template
>
</el-table-column>
<el-table-column
label=
"结束日期"
prop=
"endTime"
show-overflow-tooltip
>
<
template
>
{{
addLessonForm
.
endDate
}}
</
template
>
</el-table-column>
<el-table-column
label=
"开课类型"
prop=
"isPay"
:show-overflow-tooltip=
"true"
>
{{ addLessonForm.isPay === 0 ? '试用' : '付费' }}
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remarks"
show-overflow-tooltip
>
<
template
>
{{
addLessonForm
.
remarks
}}
</
template
>
</el-table-column>
</el-table>
<pagination
v-show=
"total1>0"
:total=
"total1"
:page
.
sync=
"queryLessonParams.page"
:limit
.
sync=
"queryLessonParams.rows"
@
pagination=
"handleLessonQuery"
/>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
class=
"cancelBtn"
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
class=
"submitBtn"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</template>
...
...
@@ -588,31 +840,57 @@
import
commonField
from
'@/utils/commonField'
import
{
parseTime
}
from
'@/utils'
import
{
getById
,
listTeaExamExaminationPaper
,
upadteBatch
upadteBatch
}
from
'@/api/examination/teaExamExaminationPaper'
import
{
delTeaExamQuestions
}
from
'@/api/examination/teaExamQuestions'
import
{
delApplicationTrial
,
listApplicationTrial
}
from
'@/api/try/applicationTrial'
import
{
delSysContentNewsInformation
}
from
'@/api/contentManagement/sysContentNewsInformation'
import
{
delApplicationTrial
}
from
'@/api/try/applicationTrial'
import
{
batchAddTeaTrialCourse
,
delTeaTrialCourse
,
listALLTeaTrialCourse
,
listTeaTrialCourse
,
listTeaTrialCourse
,
queryBLessonWithTrial
,
updateTeaTrialCourse
}
from
'@/api/try/teaTrialCourse'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
queryOpenCourseByUnit
,
validOpenCourse
}
from
'@/api/classManagement'
import
{
getListUser
,
listUser
}
from
'@/api/system/user'
import
{
validOpenCourse
}
from
'@/api/classManagement'
import
{
listUser
}
from
'@/api/system/user'
import
{
listCourseAll
}
from
'@/api/sysUnit'
export
default
{
name
:
'TryoutApplication'
,
data
()
{
return
{
total1
:
0
,
lessonList
:
[],
// 查询参数
queryLessonParams
:
{
applicant
:
''
,
classPlan
:
''
,
lessonType
:
''
,
difficultyClassify
:
''
,
page
:
1
,
rows
:
10
},
// 开始日期数组
dateRangeBegin
:
[],
// 结束日期
dateRangeEnd
:
[],
unitOptions
:
[],
difficultyOptions
:
[],
lessonTypeOptions
:
[],
coursePlanOptions
:
[],
coursePlanOptionsC
:
[],
addLessonForm
:
{
applicant
:
''
,
unitId
:
''
,
unitName
:
''
,
lessonId
:
''
,
lessonName
:
''
,
beginDate
:
null
,
endDate
:
null
,
classPlan
:
''
,
lessonType
:
''
,
remarks
:
''
,
isPay
:
''
},
// 显示开关
showSwitch
:
{
courseContent
:
true
,
...
...
@@ -641,6 +919,7 @@ export default {
settingList
:
[]
},
open
:
false
,
open1
:
false
,
title
:
''
,
courseDirection
:
[],
classOptions
:
[],
...
...
@@ -708,8 +987,120 @@ export default {
this
.
getClassOptions
()
this
.
getUserList
()
this
.
loadData
()
this
.
getLessonType
()
this
.
getCoursePlan
()
this
.
getDifficultyLevel
()
},
methods
:
{
// 获取难度等级
getDifficultyLevel
()
{
getDict
(
'difficulty_grade'
).
then
(
res
=>
{
this
.
difficultyOptions
=
res
.
data
})
},
// 根据难度等级的id获取难度等级的名称
getDifficultyLevelName
(
dictValue
)
{
let
name
=
''
this
.
difficultyOptions
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
dictValue
)
{
name
=
item
.
dictLabel
}
})
return
name
},
getClassPlanName
(
dictValue
)
{
// 根据难度等级的id获取难度等级的名称
let
name
=
''
this
.
coursePlanOptions
.
forEach
(
item
=>
{
if
(
item
.
dictValue
===
dictValue
)
{
name
=
item
.
dictLabel
}
})
return
name
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
console
.
log
(
this
.
multipleSelection
)
},
getRoKey
(
row
)
{
return
row
.
id
},
handleLessonClear
()
{
this
.
resetQueryLesson
()
this
.
resetAddLessonForm
()
},
resetAddLessonForm
()
{
this
.
addLessonForm
=
{
unitId
:
''
,
unitName
:
''
,
lessonId
:
''
,
lessonName
:
''
,
beginDate
:
null
,
endDate
:
null
}
this
.
lessonList
=
[]
this
.
total1
=
0
},
resetQueryLesson
()
{
this
.
queryLessonParams
=
{
coursePlan
:
''
,
lessonType
:
''
}
this
.
form
.
settingList
=
[]
},
getLessonType
()
{
getDict
(
'lesson_type'
).
then
(
res
=>
{
this
.
lessonTypeOptions
=
res
.
data
console
.
log
(
'课程类型'
,
this
.
lessonTypeOptions
)
})
},
/** 查找可以开课的课程*/
handleLessonQuery
()
{
const
query
=
{
page
:
1
,
rows
:
10
,
applicant
:
this
.
queryLessonParams
.
applicant
,
classPlan
:
this
.
queryLessonParams
.
classPlan
,
lessonType
:
this
.
queryLessonParams
.
lessonType
,
applicantType
:
'1'
,
difficultyClassify
:
this
.
queryLessonParams
.
difficultyClassify
}
console
.
log
(
query
)
queryBLessonWithTrial
(
query
).
then
(
res
=>
{
this
.
lessonList
=
res
.
rows
this
.
total1
=
res
.
total
console
.
log
(
res
)
console
.
log
(
this
.
lessonList
)
})
},
/** 处理课程类型变化*/
handleLessonTypeChange
(
value
)
{
if
(
value
===
'1'
)
{
getDict
(
'class_plan_C'
).
then
(
res
=>
{
this
.
coursePlanOptions
=
res
.
data
})
}
else
{
this
.
getCoursePlan
()
}
},
// 获取课程方案
getCoursePlan
()
{
getDict
(
'class_plan'
).
then
(
res
=>
{
this
.
coursePlanOptions
=
res
.
data
console
.
log
(
'课程方案'
,
this
.
coursePlanOptions
)
})
},
// 获取课程方案(院校)
getCoursePlanC
()
{
getDict
(
'class_plan_C'
).
then
(
res
=>
{
this
.
coursePlanOptionsC
=
res
.
data
console
.
log
(
'课程方案'
,
this
.
addForm
.
coursePlanOptionsC
)
})
},
// 状态转换
statusChange
(
status
)
{
if
(
status
===
'0'
)
{
...
...
@@ -755,7 +1146,12 @@ export default {
/** 5.关闭时请表单想和列表数据清空**/
handleClose
()
{
this
.
resetAddFrom
()
this
.
handleLessonClear
()
this
.
open
=
false
this
.
open1
=
false
this
.
$nextTick
().
then
(()
=>
{
this
.
$refs
.
lessonRef
.
clearValidate
()
})
},
/** 7.当课程有值是将课程label查询*/
handleLessonChange
(
value
)
{
...
...
@@ -1078,36 +1474,76 @@ export default {
this
.
unitDisplay
=
false
this
.
title
=
'开课新增'
},
/** 新增按钮操作 */
handleAdd1
()
{
this
.
reset
()
this
.
open1
=
true
this
.
unitDisplay
=
false
this
.
title
=
'开课新增'
},
/** 提交按钮 */
submitForm
:
function
()
{
if
(
this
.
form
.
settingList
.
length
>
0
)
{
// 克隆form
const
form
=
{
settingList
:
this
.
form
.
settingList
,
applicant
:
this
.
addForm
.
applicant
,
console
.
log
(
'提交'
)
const
form
=
this
.
multipleSelection
form
.
forEach
(
item
=>
{
item
.
applicant
=
this
.
queryLessonParams
.
applicant
item
.
lessonId
=
item
.
businessId
item
.
remarks
=
this
.
addLessonForm
.
remarks
item
.
applicantType
=
1
item
.
isPay
=
this
.
addLessonForm
.
isPay
item
.
beginTrialTime
=
this
.
addLessonForm
.
beginDate
item
.
endTrialTime
=
this
.
addLessonForm
.
endDate
item
.
businessId
=
null
item
.
flag
=
'0'
item
.
jobClassification
=
item
.
jobClassify
item
.
technicalClassification
=
item
.
tecClassify
})
console
.
log
(
form
)
const
addForm
=
{
settingList
:
form
,
applicant
:
this
.
addLessonForm
.
applicant
,
applicantType
:
1
}
// 判断form的每一项flag是否为0
for
(
let
i
=
0
;
i
<
form
.
settingList
.
length
;
i
++
)
{
if
(
form
.
settingList
[
i
].
flag
===
'1'
)
{
return
this
.
$message
.
error
(
'请保存列表数据'
)
}
}
console
.
log
(
'this.form'
,
this
.
form
)
batchAddTeaTrialCourse
(
form
).
then
(
res
=>
{
batchAddTeaTrialCourse
(
addForm
).
then
(
res
=>
{
console
.
log
(
'添加开课信息'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
resetAddFrom
()
this
.
open
=
false
this
.
open1
=
false
this
.
loadData
()
this
.
$message
({
message
:
'新增成功'
,
type
:
'success'
})
this
.
$message
.
success
(
'添加成功'
)
}
})
}
else
{
return
this
.
$message
.
error
(
'请添加列表数据'
)
}
// if (this.form.settingList.length > 0) {
// // 克隆form
// const form = {
// settingList: this.form.settingList,
// applicant: this.addForm.applicant,
// applicantType: 1
// }
// // 判断form的每一项flag是否为0
// for (let i = 0; i
<
form
.
settingList
.
length
;
i
++
)
{
// if (form.settingList[i].flag === '1') {
// return this.$message.error('请保存列表数据')
// }
// }
// console.log('this.form', this.form)
// batchAddTeaTrialCourse(form).then(res => {
// if (res.code === 200) {
// this.resetAddFrom()
// this.open = false
// this.loadData()
// this.$message({
// message: '新增成功',
// type: 'success'
// })
// }
// })
// } else {
// return this.$message.error('请添加列表数据')
// }
},
/** 修改按钮操作 */
handleUpdate
(
index
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment