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
cc4925b6
Commit
cc4925b6
authored
Apr 01, 2024
by
FangYuePeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/1.0' into 1.0
parents
fd61eb08
4ecee3e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
47 deletions
+110
-47
teaTrialCourse.js
src/api/try/teaTrialCourse.js
+10
-0
index.vue
src/views/courseInformation/classManagement/index.vue
+99
-46
index.vue
src/views/courseInformation/courseManagement/index.vue
+1
-1
No files found.
src/api/try/teaTrialCourse.js
View file @
cc4925b6
...
@@ -66,3 +66,13 @@ export function exportTeaTrialCourse(query) {
...
@@ -66,3 +66,13 @@ export function exportTeaTrialCourse(query) {
responseType
:
'blob'
responseType
:
'blob'
})
})
}
}
export
function
batchAddTeaTrialCourse
(
data
)
{
return
request
({
url
:
'/teatrialcourse/batchAdd'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
// 接口修改传参类型
}
})
}
src/views/courseInformation/classManagement/index.vue
View file @
cc4925b6
...
@@ -109,7 +109,21 @@
...
@@ -109,7 +109,21 @@
<!-- 开课类型-->
<!-- 开课类型-->
<el-table-column
label=
"开课类型"
prop=
"isPay"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"开课类型"
prop=
"isPay"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
isPay
===
0
?
'试用'
:
'付费'
}}
<!--
{{
scope
.
row
.
isPay
===
0
?
'试用'
:
'付费'
}}
-->
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
isPay
===
0
?
'试用'
:
'付费'
}}
</span>
<el-select
v-if=
"scope.row.flag === '1'"
v-model=
"scope.row.isPay"
filterable
style=
"width: 160px"
>
<el-option
v-for=
"(items,index) in isPayList"
:key=
"index"
:label=
"items.label"
:value=
"items.value"
/>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"单位名称"
prop=
"applicantUnitName"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"单位名称"
prop=
"applicantUnitName"
:show-overflow-tooltip=
"true"
>
...
@@ -124,12 +138,38 @@
...
@@ -124,12 +138,38 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"岗位分类"
prop=
"jobClassification"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"岗位分类"
prop=
"jobClassification"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
getJobClassificationName
(
scope
.
row
.
jobClassification
)
||
'-'
}}
<span
v-if=
"scope.row.flag === '0'"
>
{{
getJobClassificationName
(
scope
.
row
.
jobClassification
)
||
'-'
}}
</span>
<el-select
v-if=
"scope.row.flag === '1'"
v-model=
"scope.row.jobClassification"
filterable
style=
"width: 160px"
>
<el-option
v-for=
"(items,index) in valueOptions"
:key=
"index"
:label=
"items.dictLabel"
:value=
"items.dictValue"
/>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"技术分类"
prop=
"value"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"技术分类"
prop=
"value"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
getCourseDirectionName
(
scope
.
row
.
technicalClassification
)
||
'-'
}}
<span
v-if=
"scope.row.flag === '0'"
>
{{
getCourseDirectionName
(
scope
.
row
.
technicalClassification
)
||
'-'
}}
</span>
<el-select
v-if=
"scope.row.flag === '1'"
v-model=
"scope.row.technicalClassification"
filterable
style=
"width: 160px"
>
<el-option
v-for=
"(items,index) in courseDirection"
:key=
"index"
:label=
"items.dictLabel"
:value=
"items.dictValue"
/>
</el-select>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"开始日期"
prop=
"value2"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"开始日期"
prop=
"value2"
:show-overflow-tooltip=
"true"
>
...
@@ -163,8 +203,16 @@
...
@@ -163,8 +203,16 @@
<!-- 备注-->
<!-- 备注-->
<el-table-column
label=
"备注"
prop=
"remarks"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"备注"
prop=
"remarks"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remarks
||
'-'
}}
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
remarks
||
'-'
}}
</span>
</
template
>
<el-input
v-if=
"scope.row.flag === '1'"
v-model=
"scope.row.remarks"
placeholder=
"备注"
clearable
:maxlength=
"30"
size=
"small"
/>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"200px"
>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -216,10 +264,10 @@
...
@@ -216,10 +264,10 @@
<div>
<div>
<el-form-item
<el-form-item
label=
"单位"
label=
"单位"
prop=
"
u
nit"
prop=
"
applicantU
nit"
>
>
<el-select
<el-select
v-model=
"addForm.
unitId
"
v-model=
"addForm.
applicantUnit
"
:disabled=
"unitDisplay"
:disabled=
"unitDisplay"
filterable
filterable
style=
"width: 160px"
style=
"width: 160px"
...
@@ -390,10 +438,10 @@
...
@@ -390,10 +438,10 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"开始日期"
prop=
"createTime"
>
<el-table-column
label=
"开始日期"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
begin
Dat
e
||
'-'
}}
</span>
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
begin
TrialTim
e
||
'-'
}}
</span>
<el-date-picker
<el-date-picker
v-if=
"scope.row.flag === '1'"
v-if=
"scope.row.flag === '1'"
v-model=
"scope.row.begin
Dat
e"
v-model=
"scope.row.begin
TrialTim
e"
type=
"date"
type=
"date"
placeholder=
"-"
placeholder=
"-"
:editable=
"false"
:editable=
"false"
...
@@ -404,10 +452,10 @@
...
@@ -404,10 +452,10 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"结束日期"
prop=
"endTime"
>
<el-table-column
label=
"结束日期"
prop=
"endTime"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
end
Dat
e
||
'-'
}}
</span>
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
end
TrialTim
e
||
'-'
}}
</span>
<el-date-picker
<el-date-picker
v-if=
"scope.row.flag === '1'"
v-if=
"scope.row.flag === '1'"
v-model=
"scope.row.end
Dat
e"
v-model=
"scope.row.end
TrialTim
e"
type=
"date"
type=
"date"
placeholder=
"-"
placeholder=
"-"
:editable=
"false"
:editable=
"false"
...
@@ -472,17 +520,20 @@
...
@@ -472,17 +520,20 @@
</template>
</template>
<
script
>
<
script
>
import
{
getDataCache
,
setDataCache
}
from
'@/assets/js/filterData'
import
commonField
from
'@/utils/commonField'
import
commonField
from
'@/utils/commonField'
import
{
import
{
batchAddUnitLesson
,
deleteUnitLesson
,
deleteUnitLesson
,
queryOpenCourseByUnit
,
queryOpenCourseByUnit
,
update
,
update
,
validOpenCourse
validOpenCourse
}
from
'@/api/classManagement'
}
from
'@/api/classManagement'
import
{
listCourseAll
,
listUnitAll
}
from
'@/api/sysUnit'
import
{
listCourseAll
,
listUnitAll
}
from
'@/api/sysUnit'
import
{
listTeaTrialCourse
}
from
'@/api/try/teaTrialCourse'
import
{
batchAddTeaTrialCourse
,
delTeaTrialCourse
,
listTeaTrialCourse
,
updateTeaTrialCourse
}
from
'@/api/try/teaTrialCourse'
import
dict
from
'@/views/system/dict/index.vue'
import
dict
from
'@/views/system/dict/index.vue'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
getDict
}
from
'@/api/system/dict/data'
export
default
{
export
default
{
...
@@ -574,7 +625,8 @@ export default {
...
@@ -574,7 +625,8 @@ export default {
jobClassification
:
''
,
jobClassification
:
''
,
technicalClassification
:
''
,
technicalClassification
:
''
,
beginTrialTime
:
''
,
beginTrialTime
:
''
,
endTrialTime
:
''
endTrialTime
:
''
,
applicantType
:
1
},
},
// 开课类型list
// 开课类型list
isPayList
:
[
isPayList
:
[
...
@@ -610,15 +662,15 @@ export default {
...
@@ -610,15 +662,15 @@ export default {
return
commonField
return
commonField
}
}
},
},
/** 路由离开前存储筛选条件*/
/
/ /
** 路由离开前存储筛选条件*/
beforeRouteLeave
(
to
,
from
,
next
)
{
//
beforeRouteLeave(to, from, next) {
setDataCache
(
this
.
$route
.
path
,
this
.
queryParams
)
//
setDataCache(this.$route.path, this.queryParams)
next
()
//
next()
},
//
},
created
()
{
created
()
{
this
.
getUnitOptions
()
this
.
getUnitOptions
()
this
.
getClassOptions
()
this
.
getClassOptions
()
this
.
queryParams
=
JSON
.
parse
(
getDataCache
(
this
.
$route
.
path
))
// 获取存储的筛选项
//
this.queryParams = JSON.parse(getDataCache(this.$route.path)) // 获取存储的筛选项
this
.
getList
()
// 列表查询
this
.
getList
()
// 列表查询
this
.
getCourseDirection
()
this
.
getCourseDirection
()
this
.
getJobClassification
()
this
.
getJobClassification
()
...
@@ -744,9 +796,9 @@ export default {
...
@@ -744,9 +796,9 @@ export default {
/**
/**
* 1.根据单位和课程验重
* 1.根据单位和课程验重
* **/
* **/
if
(
this
.
addForm
.
unitId
&&
this
.
addForm
.
unitId
!==
''
&&
this
.
addForm
.
unitId
!==
undefined
&&
this
.
addForm
.
lessonId
&&
this
.
addForm
.
lessonId
!==
''
&&
this
.
addForm
.
lessonId
!==
undefined
)
{
if
(
this
.
addForm
.
applicantUnit
&&
this
.
addForm
.
applicantUnit
!==
''
&&
this
.
addForm
.
applicantUnit
!==
undefined
&&
this
.
addForm
.
lessonId
&&
this
.
addForm
.
lessonId
!==
''
&&
this
.
addForm
.
lessonId
!==
undefined
)
{
const
obj
=
{
const
obj
=
{
unitId
:
this
.
addForm
.
unitId
,
unitId
:
this
.
addForm
.
applicantUnit
,
lessonId
:
this
.
addForm
.
lessonId
lessonId
:
this
.
addForm
.
lessonId
}
}
validOpenCourse
(
obj
).
then
(
res
=>
{
validOpenCourse
(
obj
).
then
(
res
=>
{
...
@@ -757,17 +809,17 @@ export default {
...
@@ -757,17 +809,17 @@ export default {
const
obj
=
{
const
obj
=
{
applyPost
:
null
,
applyPost
:
null
,
flag
:
'0'
,
flag
:
'0'
,
begin
Dat
e
:
this
.
addForm
.
beginDate
,
begin
TrialTim
e
:
this
.
addForm
.
beginDate
,
end
Dat
e
:
this
.
addForm
.
endDate
,
end
TrialTim
e
:
this
.
addForm
.
endDate
,
lessonName
:
this
.
addForm
.
lessonName
,
lessonName
:
this
.
addForm
.
lessonName
,
teDirection
:
null
,
applicantUnit
:
this
.
addForm
.
applicantUnit
,
unitName
:
this
.
addForm
.
unitName
,
unitId
:
this
.
addForm
.
unitId
,
lessonId
:
this
.
addForm
.
lessonId
,
lessonId
:
this
.
addForm
.
lessonId
,
jobClassification
:
this
.
addForm
.
jobClassification
,
jobClassification
:
this
.
addForm
.
jobClassification
,
technicalClassification
:
this
.
addForm
.
technicalClassification
,
technicalClassification
:
this
.
addForm
.
technicalClassification
,
isPay
:
this
.
addForm
.
isPay
,
isPay
:
this
.
addForm
.
isPay
,
remarks
:
this
.
addForm
.
remarks
remarks
:
this
.
addForm
.
remarks
,
applicantType
:
1
}
}
this
.
form
.
settingList
.
push
(
obj
)
this
.
form
.
settingList
.
push
(
obj
)
}
else
{
}
else
{
...
@@ -776,7 +828,7 @@ export default {
...
@@ -776,7 +828,7 @@ export default {
}
}
})
})
}
else
{
}
else
{
if
(
!
this
.
addForm
.
unitId
||
this
.
addForm
.
unitId
===
''
||
this
.
addForm
.
unitId
===
undefined
)
{
if
(
!
this
.
addForm
.
applicantUnit
||
this
.
addForm
.
applicantUnit
===
''
||
this
.
addForm
.
applicantUnit
===
undefined
)
{
return
this
.
$message
.
error
(
'请选择单位'
)
return
this
.
$message
.
error
(
'请选择单位'
)
}
}
if
(
!
this
.
addForm
.
lessonId
||
this
.
addForm
.
lessonId
===
''
||
this
.
addForm
.
lessonId
===
undefined
)
{
if
(
!
this
.
addForm
.
lessonId
||
this
.
addForm
.
lessonId
===
''
||
this
.
addForm
.
lessonId
===
undefined
)
{
...
@@ -912,12 +964,14 @@ export default {
...
@@ -912,12 +964,14 @@ export default {
handleSave
(
index
)
{
handleSave
(
index
)
{
const
obj
=
{
const
obj
=
{
businessId
:
this
.
dateList
[
index
].
businessId
,
businessId
:
this
.
dateList
[
index
].
businessId
,
unitId
:
this
.
dateList
[
index
].
unitId
,
beginTrialTime
:
this
.
dateList
[
index
].
beginTrialTime
,
lessonId
:
this
.
dateList
[
index
].
lessonId
,
endTrialTime
:
this
.
dateList
[
index
].
endTrialTime
,
beginDate
:
this
.
dateList
[
index
].
beginDate
,
jobClassification
:
this
.
dateList
[
index
].
jobClassification
,
endDate
:
this
.
dateList
[
index
].
endDate
technicalClassification
:
this
.
dateList
[
index
].
technicalClassification
,
remarks
:
this
.
dateList
[
index
].
remarks
,
isPay
:
this
.
dateList
[
index
].
isPay
}
}
update
(
obj
).
then
(
res
=>
{
update
TeaTrialCourse
(
obj
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
dateList
[
index
].
flag
=
'0'
this
.
dateList
[
index
].
flag
=
'0'
this
.
$message
.
success
(
'保存成功'
)
this
.
$message
.
success
(
'保存成功'
)
...
@@ -928,28 +982,27 @@ export default {
...
@@ -928,28 +982,27 @@ export default {
/** 提交按钮 */
/** 提交按钮 */
submitForm
:
function
()
{
submitForm
:
function
()
{
if
(
this
.
form
.
settingList
.
length
>
0
)
{
if
(
this
.
form
.
settingList
.
length
>
0
)
{
console
.
log
(
'this.form
.settingList'
,
this
.
form
.
settingList
)
console
.
log
(
'this.form
'
,
this
.
form
)
// batchAddUnitLesson
(this.form).then(res => {
batchAddTeaTrialCourse
(
this
.
form
).
then
(
res
=>
{
//
console.log('添加开课信息', res)
console
.
log
(
'添加开课信息'
,
res
)
//
if (res.code === 200) {
if
(
res
.
code
===
200
)
{
//
this.resetAddFrom()
this
.
resetAddFrom
()
//
this.open = false
this
.
open
=
false
//
this.getList()
this
.
getList
()
//
}
}
//
})
})
}
else
{
}
else
{
return
this
.
$message
.
error
(
'请添加列表数据'
)
return
this
.
$message
.
error
(
'请添加列表数据'
)
}
}
},
},
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
roleIds
=
row
.
businessId
||
this
.
ids
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(
function
()
{
}).
then
(
function
()
{
return
del
eteUnitLesson
(
roleIds
)
return
del
TeaTrialCourse
(
row
.
businessId
)
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
()
this
.
getList
()
this
.
$message
({
this
.
$message
({
...
...
src/views/courseInformation/courseManagement/index.vue
View file @
cc4925b6
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
<el-form-item
label=
"难度等级"
prop=
"value2"
>
<el-form-item
label=
"难度等级"
prop=
"value2"
>
<el-select
v-model=
"form.value2"
placeholder=
"难度等级"
clearable
>
<el-select
v-model=
"form.value2"
placeholder=
"难度等级"
clearable
>
<el-option
<el-option
v-for=
"item in value
2
Options"
v-for=
"item in valueOptions"
:key=
"item.value"
:key=
"item.value"
:label=
"item.label"
:label=
"item.label"
:value=
"item.value"
:value=
"item.value"
...
...
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