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
701e0bba
Commit
701e0bba
authored
Apr 07, 2024
by
王飞龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开课管理新增修改
parent
7d4201c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
22 deletions
+48
-22
index.vue
src/views/courseInformation/classManagement/index.vue
+26
-13
index.vue
src/views/courseInformation/tryoutCommencement/index.vue
+22
-9
No files found.
src/views/courseInformation/classManagement/index.vue
View file @
701e0bba
...
...
@@ -428,17 +428,17 @@
width=
"50"
align=
"center"
/>
<el-table-column
label=
"单位"
prop=
"applicantUnit"
>
<el-table-column
label=
"单位"
prop=
"applicantUnit"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
getUnitName
(
scope
.
row
.
applicantUnit
)
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"课程"
prop=
"class"
>
<el-table-column
label=
"课程"
prop=
"class"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lessonName
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"开始日期"
prop=
"createTime"
>
<el-table-column
label=
"开始日期"
prop=
"createTime"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
beginTrialTime
||
'-'
}}
</span>
<el-date-picker
...
...
@@ -452,7 +452,7 @@
/>
</
template
>
</el-table-column>
<el-table-column
label=
"结束日期"
prop=
"endTime"
>
<el-table-column
label=
"结束日期"
prop=
"endTime"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
endTrialTime
||
'-'
}}
</span>
<el-date-picker
...
...
@@ -466,7 +466,7 @@
/>
</
template
>
</el-table-column>
<el-table-column
label=
"开课类型"
prop=
"isPay"
>
<el-table-column
label=
"开课类型"
prop=
"isPay"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<!--
{{
scope
.
row
.
isPay
===
0
?
'试用'
:
'付费'
}}
-->
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
isPay
===
0
?
'试用'
:
'付费'
}}
</span>
...
...
@@ -485,7 +485,7 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"岗位分类"
prop=
"jobClassification"
>
<el-table-column
label=
"岗位分类"
prop=
"jobClassification"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<!--
{{
getJobClassificationName
(
scope
.
row
.
jobClassification
)
||
'-'
}}
-->
<span
v-if=
"scope.row.flag === '0'"
>
{{
getJobClassificationName
(
scope
.
row
.
jobClassification
)
||
'-'
}}
</span>
...
...
@@ -504,7 +504,7 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"技术分类"
prop=
"teDirection"
>
<el-table-column
label=
"技术分类"
prop=
"teDirection"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<!--
{{
getCourseDirectionName
(
scope
.
row
.
technicalClassification
)
||
'-'
}}
-->
<span
v-if=
"scope.row.flag === '0'"
>
{{
getCourseDirectionName
(
scope
.
row
.
technicalClassification
)
||
'-'
}}
</span>
...
...
@@ -523,7 +523,7 @@
</el-select>
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remarks"
>
<el-table-column
label=
"备注"
prop=
"remarks"
show-overflow-tooltip
>
<
template
slot-scope=
"scope"
>
<!--
{{
scope
.
row
.
remarks
||
'-'
}}
-->
<span
v-if=
"scope.row.flag === '0'"
>
{{
scope
.
row
.
remarks
||
'-'
}}
</span>
...
...
@@ -729,7 +729,6 @@ export default {
this
.
getJobClassification
()
},
methods
:
{
// 获取课程方向
/** 1.获取全部单位**/
getUnitOptions
()
{
const
obj
=
{
...
...
@@ -808,7 +807,8 @@ export default {
this
.
addForm
.
unitName
=
null
}
const
obj
=
{
applicantUnit
:
value
applicantUnit
:
value
,
applicantType
:
2
}
listALLTeaTrialCourse
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
...
...
@@ -886,7 +886,7 @@ export default {
}
this
.
form
.
settingList
.
push
(
obj
)
}
else
{
return
this
.
$message
.
error
(
'
和列表中数据是否重复
'
)
return
this
.
$message
.
error
(
'
列表中已申请该课程
'
)
}
}
})
...
...
@@ -920,7 +920,7 @@ export default {
console
.
log
(
'数组中的数据'
,
list
)
console
.
log
(
'对象'
,
this
.
addForm
)
list
.
forEach
(
item
=>
{
if
(
item
.
unitId
===
this
.
addForm
.
unitId
&&
item
.
lessonId
===
this
.
addForm
.
lessonId
)
{
if
(
item
.
applicantUnit
===
this
.
addForm
.
applicantUnit
&&
item
.
lessonId
===
this
.
addForm
.
lessonId
)
{
b
=
true
}
})
...
...
@@ -1036,8 +1036,21 @@ export default {
/** 提交按钮 */
submitForm
:
function
()
{
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
)
batchAddTeaTrialCourse
(
this
.
form
).
then
(
res
=>
{
console
.
log
(
'this.addForm'
,
this
.
addForm
)
batchAddTeaTrialCourse
(
form
).
then
(
res
=>
{
console
.
log
(
'添加开课信息'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
resetAddFrom
()
...
...
src/views/courseInformation/tryoutCommencement/index.vue
View file @
701e0bba
...
...
@@ -570,7 +570,7 @@ import { delApplicationTrial, listApplicationTrial } from '@/api/try/application
import
{
delSysContentNewsInformation
}
from
'@/api/contentManagement/sysContentNewsInformation'
import
{
batchAddTeaTrialCourse
,
delTeaTrialCourse
,
delTeaTrialCourse
,
listALLTeaTrialCourse
,
listTeaTrialCourse
,
updateTeaTrialCourse
}
from
'@/api/try/teaTrialCourse'
...
...
@@ -736,7 +736,7 @@ export default {
}
}
},
/** 3.当用户选中
单位
时将单位选择框禁用**/
/** 3.当用户选中
申请人
时将单位选择框禁用**/
handleUnitChange
(
value
)
{
if
(
value
&&
value
!==
''
&&
value
!==
undefined
)
{
this
.
unitDisplay
=
true
...
...
@@ -745,14 +745,15 @@ export default {
* 2.根据value值查询该单位所开的课程
**/
if
(
this
.
userOptions
.
find
(
item
=>
item
.
businessId
===
value
))
{
this
.
addForm
.
unitName
=
this
.
userOptions
.
find
(
item
=>
item
.
businessId
===
value
).
unit
Name
this
.
addForm
.
nickName
=
this
.
userOptions
.
find
(
item
=>
item
.
businessId
===
value
).
nick
Name
}
else
{
this
.
addForm
.
unit
Name
=
null
this
.
addForm
.
nick
Name
=
null
}
const
obj
=
{
unitId
:
value
applicant
:
value
,
applicantType
:
1
}
queryOpenCourseByUnit
(
obj
).
then
(
res
=>
{
listALLTeaTrialCourse
(
obj
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
if
(
res
.
code
===
200
)
{
this
.
form
.
settingList
=
res
.
data
...
...
@@ -760,7 +761,7 @@ export default {
})
}
else
{
this
.
unitDisplay
=
false
this
.
addForm
.
unit
Name
=
null
this
.
addForm
.
nick
Name
=
null
this
.
form
.
settingList
=
[]
}
},
...
...
@@ -926,7 +927,7 @@ export default {
}
this
.
form
.
settingList
.
push
(
obj
)
}
else
{
return
this
.
$message
.
error
(
'
和列表中数据是否重复
'
)
return
this
.
$message
.
error
(
'
列表中已申请该课程
'
)
}
}
})
...
...
@@ -1029,8 +1030,20 @@ export default {
/** 提交按钮 */
submitForm
:
function
()
{
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
(
this
.
form
).
then
(
res
=>
{
batchAddTeaTrialCourse
(
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
resetAddFrom
()
this
.
open
=
false
...
...
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