Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
da704ed1
Commit
da704ed1
authored
Jan 05, 2023
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程名称展示问题,考试直接开始
parent
d2e10728
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
80 additions
and
8 deletions
+80
-8
UserCourseVo.java
...c/main/java/com/zehong/system/domain/vo/UserCourseVo.java
+5
-0
TTrainCourseServiceImpl.java
...m/zehong/system/service/impl/TTrainCourseServiceImpl.java
+8
-0
TTrainCourseMapper.xml
...m/src/main/resources/mapper/system/TTrainCourseMapper.xml
+1
-1
LearnAfter.vue
...ews/educationPlanExam/myLessons/components/LearnAfter.vue
+1
-1
LearnBefore.vue
...ws/educationPlanExam/myLessons/components/LearnBefore.vue
+1
-1
LearnItem.vue
...iews/educationPlanExam/myLessons/components/LearnItem.vue
+62
-4
Left.vue
...src/views/educationPlanExam/myLessons/components/Left.vue
+2
-1
No files found.
danger-manage-system/src/main/java/com/zehong/system/domain/vo/UserCourseVo.java
View file @
da704ed1
...
...
@@ -35,4 +35,9 @@ public class UserCourseVo {
private
String
dataKind
;
private
Integer
personnelType
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
testStartTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
testEndTime
;
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseServiceImpl.java
View file @
da704ed1
...
...
@@ -155,6 +155,14 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
@Override
public
List
<
UserCourseVo
>
userCourseList
(
Long
userId
,
Integer
type
){
List
<
UserCourseVo
>
list
=
tTrainCourseMapper
.
userCourseList
(
userId
,
type
,
1
);
for
(
UserCourseVo
v
:
list
){
if
(
v
.
getTestEndTime
()!=
null
&&
v
.
getTestEndTime
().
getTime
()<
new
Date
().
getTime
()){
v
.
setState
(
3
);
}
if
(
v
.
getTestStartTime
()!=
null
&&
v
.
getTestStartTime
().
getTime
()>
new
Date
().
getTime
()){
v
.
setState
(
4
);
}
}
return
list
;
}
...
...
danger-manage-system/src/main/resources/mapper/system/TTrainCourseMapper.xml
View file @
da704ed1
...
...
@@ -158,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert>
<select
id=
"userCourseList"
resultType=
"com.zehong.system.domain.vo.UserCourseVo"
>
SELECT uc.user_course_id AS userCourseId,uc.state ,uc.examination_time AS examinationTime,
uc.`examination_result` AS examinationResult,uc.`create_time` AS createTime,
uc.`examination_result` AS examinationResult,uc.`create_time` AS createTime,
c.test_start_time as testStartTime,c.test_end_time as testEndTime,
c.`course_name` AS courseName, c.`topic_num` AS topicNum,c.`release_time` AS releaseTime,c.data_kind as dataKind,c.personnel_type as personnelType,
p.`plan_name` AS courseType,c.course_id as courseId,c.qualified_num as qualifiedNum
FROM t_train_user_course uc
...
...
danger-manage-web/src/views/educationPlanExam/myLessons/components/LearnAfter.vue
View file @
da704ed1
...
...
@@ -78,7 +78,7 @@ export default {
},
computed
:
{
afterList
()
{
return
this
.
list
.
filter
((
item
)
=>
item
.
state
>
1
);
return
this
.
list
.
filter
((
item
)
=>
item
.
state
==
2
);
},
},
created
()
{
...
...
danger-manage-web/src/views/educationPlanExam/myLessons/components/LearnBefore.vue
View file @
da704ed1
...
...
@@ -77,7 +77,7 @@ export default {
},
computed
:
{
beforeList
()
{
return
this
.
list
.
filter
((
item
)
=>
item
.
state
<
2
);
return
this
.
list
.
filter
((
item
)
=>
item
.
state
!=
2
);
},
},
created
()
{
...
...
danger-manage-web/src/views/educationPlanExam/myLessons/components/LearnItem.vue
View file @
da704ed1
...
...
@@ -16,8 +16,8 @@
</div>
<div
class=
"time"
>
发布时间:
{{
itemData
.
createTime
}}
</div>
<div
class=
"bottom flex"
>
<div
@
click=
"click"
class=
"btn"
:class=
"
{ again: yesOrNo }">
{{
yesOrNo
?
"重新考试"
:
"开始学习"
}}
<div
v-if=
"!itemData.state===4 || !(itemData.state===3 && itemData.dataKind==='1')"
@
click=
"click"
class=
"btn"
:class=
"
{ again: yesOrNo }">
{{
yesOrNo
}}
</div>
</div>
<div
...
...
@@ -25,16 +25,29 @@
:class=
"
{
no: itemData.state === 1,
yes: itemData.state === 2,
ygq:itemData.state === 3,
wks:itemData.state === 4,
}"
>
{{
state
[
itemData
.
state
]
}}
</div>
<AnswerLesson
v-if=
"answerOpen"
:courseId=
"itemData.courseId"
:userCourseId=
"itemData.userCourseId"
:visible
.
sync=
"answerOpen"
@
jj=
"jj"
/>
</div>
</
template
>
<
script
>
import
AnswerLesson
from
"./AnswerLesson"
;
export
default
{
name
:
""
,
components
:
{
AnswerLesson
,
},
props
:
{
itemData
:
{
type
:
Object
,
...
...
@@ -50,14 +63,52 @@ export default {
},
computed
:
{
yesOrNo
()
{
return
this
.
itemData
.
state
==
1
||
this
.
itemData
.
state
==
2
;
console
.
log
(
this
.
itemData
)
if
(
this
.
itemData
.
dataKind
===
"0"
){
if
(
this
.
itemData
.
state
===
0
){
return
'开始学习'
}
else
if
(
this
.
itemData
.
state
===
1
){
return
'重新考试'
}
else
if
(
this
.
itemData
.
state
===
2
){
return
'重新考试'
}
else
if
(
this
.
itemData
.
state
===
3
){
return
'开始学习'
}
else
if
(
this
.
itemData
.
state
===
4
){
return
'还未开始'
}
}
else
{
if
(
this
.
itemData
.
state
===
0
){
return
'开始考试'
}
else
if
(
this
.
itemData
.
state
===
1
){
return
'重新考试'
}
else
if
(
this
.
itemData
.
state
===
2
){
return
'重新考试'
}
else
if
(
this
.
itemData
.
state
===
3
){
return
'开始学习'
}
else
if
(
this
.
itemData
.
state
===
4
){
return
'还未开始'
}
}
},
},
data
()
{
return
{};
return
{
answerOpen
:
false
};
},
methods
:
{
jj
(
e
)
{
if
(
e
.
answer
>=
e
.
qualifiedNum
)
{
this
.
fenshu
=
Math
.
floor
((
e
.
answer
/
e
.
topicNum
)
*
100
);
this
.
state
=
2
;
}
},
click
()
{
if
(
this
.
itemData
.
dataKind
===
'1'
){
this
.
answerOpen
=
true
;
return
;
}
const
{
courseId
,
userCourseId
,
state
,
examinationResult
,
topicNum
}
=
this
.
itemData
;
// if (!this.yesOrNo) {
...
...
@@ -73,6 +124,7 @@ export default {
path
:
"myLessons/CheckLesson"
,
query
:
{
courseId
,
userCourseId
,
state
,
fenshu
},
});
// } else {
// this.$emit("examination", { courseId, userCourseId });
// }
...
...
@@ -161,6 +213,12 @@ export default {
&
.yes
{
background
:
#3cc426
!
important
;
}
&
.ygq
{
background
:
red
!
important
;
}
&
.wks
{
background
:
yellow
!
important
;
}
}
}
</
style
>
danger-manage-web/src/views/educationPlanExam/myLessons/components/Left.vue
View file @
da704ed1
...
...
@@ -41,7 +41,8 @@ export default {
"0"
:
'未完成'
,
"1"
:
'未通过'
,
"2"
:
"已完成"
,
"3"
:
"已过期"
"3"
:
"已过期"
,
"4"
:
"未开始"
},
};
},
...
...
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