Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
0c822f2b
Commit
0c822f2b
authored
Dec 11, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
a12bb4cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
11 deletions
+66
-11
lesson-form.vue
src/components/course/lesson-form.vue
+66
-11
No files found.
src/components/course/lesson-form.vue
View file @
0c822f2b
...
...
@@ -126,11 +126,24 @@
text-align
:
center
;
margin-right
:
10px
;
cursor
:
pointer
;
box-shadow
:
4px
4px
5px
#d1d1d1
;
}
.less_Isout
{
font-size
:
12px
;
color
:
#2961FE
;
}
.classQue
{
background-color
:
rgb
(
63
,
196
,
255
);
}
.classChu
{
background-color
:
#f2f2f2
;
}
.classChu
.commonLessName
{
color
:
#000
;
}
.classQue
.commonLessName
{
color
:
#fff
;
}
</
style
>
<
template
>
<div
v-if=
"!isShowSign"
>
...
...
@@ -314,19 +327,27 @@
<div
class=
"lessStudentList"
>
<div
class=
"lessStuTitle"
>
学生签到情况
</div>
<div
class=
"lessStuInnerList"
>
<div
class=
"lessList"
v-for=
"(item,index) in dayObj.GuestList"
:key=
"index"
>
<q-avatar
style=
"margin:10px 0 5px 0"
>
<img
:src=
"item.UserIcon"
>
<div
class=
"lessList"
v-for=
"(item,index) in dayObj.GuestList"
:key=
"index"
:class=
"{'classQue':isShowSignBtn&&item.IsCheck==0,'classChu':isShowSignBtn&&
item.IsCheck==1}"
@
click=
"changeStatus(item)"
>
<q-avatar
size=
"md"
style=
"margin:12px 0 5px 0"
v-if=
"item.UserIcon"
>
<img
:src=
"item.UserIcon"
/>
</q-avatar>
<div>
{{item.GuestName}}
</div>
<div
class=
"less_Isout"
>
<span
v-if=
"item.IsCheck==0"
>
正常
</span>
<q-avatar
size=
"md"
color=
"teal-10"
style=
"margin:12px 0 5px 0"
text-color=
"white"
v-if=
"!item.UserIcon"
>
{{item.GuestName[0]}}
</q-avatar>
<div
style=
"margin:5px 0;"
class=
"commonLessName"
>
{{item.GuestName}}
</div>
<div
class=
"less_Isout"
v-if=
"isShowSignBtn"
>
<span
v-if=
"item.IsCheck==0"
>
出勤
</span>
<span
v-if=
"item.IsCheck==1"
>
缺勤
</span>
<!-- <span v-if="item.IsCheck==-1">缺勤</span> -->
</div>
<div
class=
"less_Isout"
v-else
>
<span
v-if=
"item.IsCheck==0"
>
出勤
</span>
<span
v-if=
"item.IsCheck==1"
>
缺勤
</span>
<span
v-if=
"item.IsCheck==-1"
>
未签到
</span>
</div>
</div>
</div>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-card-actions
align=
"right"
class=
"bg-white"
v-if=
"isShowSignBtn"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"isShowSign=false"
/>
<q-btn
label=
"确认"
color=
"accent q-px-md"
style=
"font-weight:400 !important"
...
...
@@ -395,6 +416,8 @@
ClassId
:
0
},
dayObj
:{},
isShowSignBtn
:
false
,
//是否显示签到提交按钮
comChecked
:{},
//点击选中复制
}
},
created
()
{
...
...
@@ -543,31 +566,63 @@
},
//点击日历
getClicked
(
item
){
console
.
log
(
item
,
'rili'
);
if
(
item
.
IsEndDate
){
this
.
isShowSign
=
true
;
this
.
dayMsg
.
ClassPlanId
=
item
.
ClassPlanId
;
this
.
dayMsg
.
School_Id
=
this
.
setingObj
.
School_Id
;
this
.
dayMsg
.
ClassId
=
this
.
setingObj
.
ClassId
;
this
.
comChecked
=
item
;
this
.
getDayClassPlan
();
}
},
//获取某一天的计划信息
getDayClassPlan
(){
GetDayClassPlan
(
this
.
dayMsg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据来了'
);
if
(
res
.
Code
==
1
)
{
this
.
dayObj
=
res
.
Data
;
var
d
=
new
Date
();
var
datetime
=
d
.
getFullYear
()
+
'-'
+
(
d
.
getMonth
()
+
1
)
+
'-'
+
d
.
getDate
();
if
(
this
.
dayObj
.
ClassDate
==
datetime
){
this
.
isShowSignBtn
=
true
;
}
else
{
this
.
isShowSignBtn
=
false
;
}
this
.
dayObj
.
GuestList
.
forEach
(
x
=>
{
if
(
this
.
isShowSignBtn
&&
x
.
IsCheck
==-
1
){
x
.
IsCheck
=
0
;
}
})
}
})
},
//点击切换签到
changeStatus
(
item
){
if
(
this
.
isShowSignBtn
){
if
(
item
.
IsCheck
==
0
){
item
.
IsCheck
=
1
;
}
else
{
item
.
IsCheck
=
0
;
}
}
},
//点击签到
saveSign
(){
let
signMsg
=
[];
this
.
dayObj
.
GuestList
.
forEach
(
x
=>
{
let
obj
=
{
classId
:
this
.
setingObj
.
ClassId
,
ClassDate
:
this
.
comChecked
.
ClassDateStr
,
ClassRoomId
:
this
.
comChecked
.
ClassRoomId
,
School_Id
:
this
.
setingObj
.
School_Id
,
TeacherId
:
this
.
comChecked
.
TeacherId
,
OrderGuestId
:
x
.
Id
,
CheckStatus
:
x
.
IsCheck
}
signMsg
.
push
(
obj
);
})
addClassCheck
(
signMsg
).
then
(
res
=>
{
console
.
log
(
res
,
'数据来了'
);
if
(
res
.
Code
==
1
)
{
this
.
isShowSign
=
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