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
722c45f9
Commit
722c45f9
authored
Apr 27, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
5c17dcb6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
18 deletions
+103
-18
class.js
src/api/course/class.js
+12
-0
lessonPreparation.vue
src/pages/course/lessonPreparation.vue
+13
-0
prepareclassDetails.vue
src/pages/course/prepareclassDetails.vue
+78
-18
No files found.
src/api/course/class.js
View file @
722c45f9
...
...
@@ -344,3 +344,15 @@ export function GetClassLessPlanList(data) {
data
});
}
/**
* 评论显示打分
*/
export
function
GetNowUserLessonComment
(
data
)
{
return
request
({
url
:
'/Class/GetNowUserLessonComment'
,
method
:
'post'
,
data
});
}
src/pages/course/lessonPreparation.vue
View file @
722c45f9
...
...
@@ -349,6 +349,19 @@
//提交
saveInfo
(
num
)
{
this
.
addMsg
.
IsTemplate
=
num
;
for
(
let
i
=
0
;
i
<
this
.
addMsg
.
LessonPlanList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
addMsg
.
LessonPlanList
[
i
].
LessonPlanDetailsList
.
length
;
j
++
){
if
(
this
.
addMsg
.
LessonPlanList
[
i
].
LessonPlanDetailsList
[
j
].
ProjectContent
==
''
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
'top'
,
timeout
:
1500
,
message
:
`请检查内容填写是否完整`
})
return
;
}
}
}
SetClassLessPlan
(
this
.
addMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
this
.
$q
.
notify
({
...
...
src/pages/course/prepareclassDetails.vue
View file @
722c45f9
...
...
@@ -170,7 +170,7 @@
filled
clearable
autogrow
:disable=
"AccountType"
:disable=
"AccountType
||!isCanEdit
"
/>
</div>
</div>
...
...
@@ -178,7 +178,7 @@
</div>
</div>
</div>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md marginl-15 margint-15"
label=
"提交"
@
click=
"saveOrderInfo()"
:loading=
"Dloading"
v-if=
"AccountType==false"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md marginl-15 margint-15"
label=
"提交"
@
click=
"saveOrderInfo()"
:loading=
"Dloading"
v-if=
"AccountType==false
&&data.IsEditSummary
<
=
0
"
/>
</div>
...
...
@@ -204,6 +204,7 @@
<q-rating
v-model=
"item.Score"
size=
"1em"
v-if=
"Score>-1"
icon=
"thumb_up"
readonly
/>
...
...
@@ -222,17 +223,18 @@
<div
class=
"pl column"
>
<div
class=
"row"
style=
"align-items: center"
>
<span
style=
"margin-right: 5px"
>
备课打分:
</span>
<q-rating
v-model=
"plmsg.Score"
size=
"1.5em"
icon=
"thumb_up"
/>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==5"
>
非常满意
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==4"
>
满意
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==3"
>
感觉一般
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==2"
>
不满意
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==1"
>
非常不满意
</span>
<template
v-if=
"Score>-1"
>
<q-rating
v-model=
"plmsg.Score"
size=
"1.5em"
icon=
"thumb_up"
/>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==5"
>
非常满意
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==4"
>
满意
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==3"
>
感觉一般
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==2"
>
不满意
</span>
<span
class=
"ratestyle"
v-if=
"plmsg.Score==1"
>
非常不满意
</span>
</
template
>
</div>
<div
class=
"row"
style=
"margin-top: 20px;align-items: center"
>
<q-input
filled
v-model=
"plmsg.Comment"
label=
"写下你想评价的内容"
style=
"flex:1"
/>
...
...
@@ -251,7 +253,8 @@
getClassLessPlan
,
getLessonCommentList
,
setLessonComment
,
updateClassLessPlan
updateClassLessPlan
,
GetNowUserLessonComment
}
from
'../../api/course/class'
;
export
default
{
name
:
"prepareclassDetails"
,
...
...
@@ -269,10 +272,18 @@
LessonPlanId
:
0
,
ClassId
:
0
,
ClassPlanId
:
0
,
TeacherId
:
0
},
data
:{},
CommentList
:[],
AccountType
:
true
AccountType
:
true
,
scoreMsg
:{
ClassPlanId
:
0
,
ClassId
:
0
},
Score
:
0
,
nowDate
:
''
,
//现在时间
isCanEdit
:
false
}
},
created
(){
...
...
@@ -283,17 +294,44 @@
this
.
msg
.
ClassPlanId
=
this
.
$route
.
query
.
ClassPlanId
?
this
.
$route
.
query
.
ClassPlanId
:
0
;
this
.
plmsg
.
ClassId
=
this
.
$route
.
query
.
ClassId
?
this
.
$route
.
query
.
ClassId
:
0
;
this
.
plmsg
.
ClassPlanId
=
this
.
$route
.
query
.
ClassPlanId
?
this
.
$route
.
query
.
ClassPlanId
:
0
;
this
.
scoreMsg
.
ClassPlanId
=
this
.
$route
.
query
.
ClassPlanId
?
this
.
$route
.
query
.
ClassPlanId
:
0
;
this
.
scoreMsg
.
ClassId
=
this
.
$route
.
query
.
ClassId
?
this
.
$route
.
query
.
ClassId
:
0
;
let
userInfo
=
this
.
getLocalStorage
();
this
.
AccountType
=
userInfo
.
AccountType
==
2
?
false
:
true
;
//是否是教师
this
.
getList
()
//备课内容
this
.
getCommentList
()
//评价
this
.
getUserComment
();
var
today
=
new
Date
();
var
y
=
today
.
getFullYear
();
var
m
=
today
.
getMonth
()
+
1
;
var
d
=
today
.
getDate
();
var
h
=
today
.
getHours
();
var
i
=
today
.
getMinutes
();
var
s
=
today
.
getSeconds
();
// 在小于10的数字钱前加一个‘0’
this
.
nowDate
=
y
+
'-'
+
m
+
'-'
+
d
+
' '
+
h
+
':'
+
i
+
':'
+
s
;
},
methods
:{
//获取评论显示分数
getUserComment
(){
GetNowUserLessonComment
(
this
.
scoreMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
Score
=
res
.
Data
.
Score
;
this
.
plmsg
.
Score
=
this
.
Score
;
}
})
},
getList
()
{
getClassLessPlan
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
this
.
data
=
res
.
Data
;
this
.
plmsg
.
TeacherId
=
res
.
Data
.
UpdateBy
;
var
beginTimes
=
this
.
nowDate
.
replace
(
/-/g
,
"/"
);
var
endTimes
=
this
.
data
.
ClassEndTime
.
replace
(
/-/g
,
"/"
);
var
a
=
(
Date
.
parse
(
endTimes
)
-
Date
.
parse
(
beginTimes
))
/
3600
/
1000
;
if
(
a
<
0
){
this
.
isCanEdit
=
true
;
//可以编辑
}
}
})
},
...
...
@@ -343,8 +381,30 @@
})
},
saveOrderInfo
(){
this
.
Dloading
=
true
;
// this.Dloading= true;
console
.
log
(
this
.
data
,
'data'
);
let
count
=
0
,
LessonNum
=
0
;
this
.
data
.
LessonPlanList
.
forEach
(
x
=>
{
x
.
LessonPlanDetailsList
.
forEach
(
y
=>
{
if
(
y
.
Summary
==
null
||
y
.
Summary
==
''
){
count
++
;
}
})
LessonNum
+=
x
.
LessonPlanDetailsList
.
length
;
})
console
.
log
(
count
,
'count'
);
console
.
log
(
LessonNum
,
'LessonNum'
);
if
(
count
==
LessonNum
){
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
'top'
,
timeout
:
1500
,
message
:
`请至少填写一项课后总结`
})
return
}
updateClassLessPlan
(
this
.
data
).
then
(
res
=>
{
this
.
Dloading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
...
...
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