Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
thinkApp
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
游洁
thinkApp
Commits
98e871ee
Commit
98e871ee
authored
Jun 02, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
3624fcbe
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
87 deletions
+112
-87
setComments.vue
src/components/setComments/setComments.vue
+2
-2
studentsPopu.vue
src/components/setComments/studentsPopu.vue
+21
-35
addComment.vue
src/pages/setComments/addComment.vue
+78
-45
commentDetails.vue
src/pages/setComments/commentDetails.vue
+6
-4
setComments.vue
src/pages/setComments/setComments.vue
+5
-1
No files found.
src/components/setComments/setComments.vue
View file @
98e871ee
<
template
>
<view
class=
"setComments-box"
>
<view
class=
"setComments-add"
@
click=
"addComments"
>
<
!--
<
view
class=
"setComments-add"
@
click=
"addComments"
>
<van-icon
name=
"plus"
/><text>
创建评价
</text>
</view>
</view>
-->
<view
class=
"index-student-information"
>
<view
class=
"setComments-content-box"
v-if=
"dataList.length>0"
>
<template
v-for=
"(item,index) in dataList"
>
...
...
src/components/setComments/studentsPopu.vue
View file @
98e871ee
<
template
>
<van-popup
:show=
"show"
:round=
"true"
position=
"bottom"
custom-style=
"height: 80%"
@
close=
"closepopup"
>
<view
class=
"studentsPopu-box flex"
>
<view
class=
"studentsPopu-title"
>
选择学员
<text>
(
{{
chooseStuArray
?
chooseStuArray
.
length
:
0
}}
/
{{
stuList
?
stuList
.
length
:
0
}}
)
</text>
</view>
<view
class=
"studentsPopu-search flex"
>
<van-search
:value=
"Keywords"
shape=
"round"
style=
"border-radius: 20rpx;width: 100%;"
input-align=
"center"
background=
"#F6F6F6"
@
change=
"searchKeywords"
placeholder=
"请输入
搜索关键词
"
/>
background=
"#F6F6F6"
@
change=
"searchKeywords"
placeholder=
"请输入
学员姓名
"
/>
</view>
<view
class=
"studentsPopuImg"
>
<view
class=
"studentsPopuImg"
style=
"flex:1;height: 1px;"
>
<view
class=
"studentsPopu-img-box flex"
>
<template
v-for=
"(item,index) in stuList"
>
<view
class=
"studentsPopu-img-list flex"
@
click=
"clickChoose(item)"
<view
class=
"studentsPopu-img-list flex"
v-if=
"(Keywords!='' && item.StuName.indexOf(Keywords)!=-1) || Keywords==''"
@
click=
"clickChoose(item)"
:class=
"item.state?'active':''"
>
<view
class=
"studentsPopu-imgbox flex"
>
<view
class=
"studentsPopu-img flex"
>
...
...
@@ -32,7 +32,6 @@
</view>
</view>
</van-popup>
</template>
<
script
>
import
{
...
...
@@ -56,10 +55,9 @@
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
show
:
false
,
loading
:
false
,
Keywords
:
''
,
stuList
:
[]
,
stuList
:
props
.
courseStuList
,
chooseStuArray
:
[]
});
let
methods
=
{
...
...
@@ -77,43 +75,31 @@
}
},
// 搜索
searchKeywords
()
{
},
showFun
()
{
data
.
show
=
true
},
closepopup
()
{
data
.
show
=
false
searchKeywords
({
detail
})
{
data
.
Keywords
=
detail
},
save
()
{
ctx
.
emit
(
"getdata"
,
data
.
chooseStuArray
);
data
.
show
=
false
}
};
//监听属性数组
watch
(()
=>
props
[
"courseStuList"
],
(
newValue
,
oldValue
)
=>
{
if
(
newValue
!=
oldValue
&&
newValue
&&
newValue
.
length
>
0
)
{
let
addList
=
function
(
arr
)
{
arr
.
forEach
((
item
)
=>
{
item
.
state
=
false
;})
}
addList
(
newValue
);
data
.
stuList
=
newValue
;
}
},
{
deep
:
true
,
});
//
watch(() => props["courseStuList"], (newValue, oldValue) => {
//
if (newValue != oldValue && newValue && newValue.length > 0) {
//
let addList = function(arr) {
//
arr.forEach((item) => {item.state = false;})
//
}
//
addList(newValue);
//
data.stuList = newValue;
//
}
//
}, {
//
deep: true,
//
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
};
},
onLoad
()
{
},
onShow
()
{
}
};
</
script
>
...
...
@@ -220,10 +206,10 @@
overflow
:
hidden
;
}
.footer
{
/*
.footer {
position: fixed;
left: 0;
right: 0;
bottom: 0;
}
}
*/
</
style
>
src/pages/setComments/addComment.vue
View file @
98e871ee
<
template
>
<view
class=
"addComment-index-box"
>
<view
class=
"addComment-index-box
flex"
style=
"background-color: #F6F6F6;flex-direction: column;padding-bottom: 168rpx;
"
>
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6"
>
<view
class=
"addComment-header-box flex"
>
<van-icon
class=
"addComment-header-left"
name=
"arrow-left"
@
click=
"back"
/>
<text
class=
"addComment-header-title"
>
新增评论
</text>
</view>
</navbar>
<view
class=
"addComment-content"
>
<view
class=
"addComment-content"
style=
"background-color: #F6F6F6;"
>
<view
class=
"addComment-title flex"
>
<van-icon
name=
"friends-o"
/>
<text>
选择学员 (
{{
postMsg
.
ChooseStuList
?
postMsg
.
ChooseStuList
.
length
:
0
}}
)
</text>
</view>
<view
class=
"addComment-img-box flex"
>
<view
class=
"addComment-img-box flex"
:style=
"
{'height':(expendStatus?'unset':'178rpx'),'overflow':(expendStatus?'unset':'hidden')}"
>
<view
class=
"addComment-img-list activeOne flex"
@
click=
"selectStudents"
>
<view
class=
"addComment-imgbox flex"
>
<view
class=
"addComment-img"
>
...
...
@@ -39,20 +39,22 @@
</view>
<view
class=
"addComment-textarea-box"
>
<view
class=
"hotsopt"
@
click=
"expendStatus=!expendStatus"
></view>
<view
class=
"content-textarea-box"
>
<textarea
placeholder=
"请填写评论内容"
v-model=
"postMsg.Info"
></textarea>
</view>
<view
class=
"Sure-button flex"
>
<view
v-if=
"clickShow"
@
click=
"clickSure"
>
确定
</view>
<view
v-else
class=
"active"
>
确定
</view>
</view>
</view>
<
template
v-show=
"show"
>
<studentsPopu
ref=
"getstudentsPopup"
:courseStuList=
"StuList"
@
getdata=
"getChooseStu"
></studentsPopu>
</
template
>
<van-popup
:z-index=
"1000"
:show=
"show"
:round=
"true"
position=
"bottom"
custom-style=
"height: 70vh"
@
close=
"closepopup"
>
<studentsPopu
ref=
"getstudentsPopup"
:courseStuList=
"StuList"
@
getdata=
"getChooseStu"
v-if=
"show"
></studentsPopu>
</van-popup>
</view>
<view
class=
"footer"
v-if=
"!show"
>
<view
class=
"studentsPopu-save flex"
>
<view
v-if=
"clickShow"
@
click=
"clickSure"
>
确定
</view>
<view
v-else
class=
"active"
>
确定
</view>
</view>
</view>
<
view
class=
"addComment-bj"
></view
>
<
!-- <view class="addComment-bj"></view> --
>
</view>
</template>
<
script
>
...
...
@@ -63,7 +65,8 @@
toRefs
,
onMounted
,
getCurrentInstance
,
inject
inject
,
nextTick
}
from
"vue"
;
import
navbar
from
'../../components/navbar.vue'
export
default
{
...
...
@@ -83,29 +86,6 @@
}
=
getCurrentInstance
();
let
data
=
reactive
({
value
:
1
,
optionsList
:
[{
text
:
'部分可见'
,
value
:
0
},
{
text
:
'可见不可见'
,
value
:
1
},
{
text
:
'活动商品'
,
value
:
2
},
],
radioList
:
[{
name
:
'使用默认配置'
,
id
:
1
,
checked
:
true
},
{
name
:
'自定义评价'
,
id
:
2
}
],
checked
:
'1'
,
Msg
:
{
CourseId
:
''
,
...
...
@@ -119,7 +99,8 @@
},
StuList
:
[],
//课程学员列表
clickShow
:
true
,
show
:
false
show
:
false
,
expendStatus
:
false
});
let
methods
=
{
back
()
{
...
...
@@ -130,23 +111,34 @@
// 点击弹出学员列表
selectStudents
()
{
data
.
show
=
true
setTimeout
(()
=>
{
refs
.
getstudentsPopup
.
$vm
.
showFun
()
},
500
)
},
closepopup
(){
data
.
show
=
false
},
// 点击确定
clickSure
()
{
uni
.
showLoading
()
data
.
clickShow
=
false
;
data
.
postMsg
.
Times
=
data
.
Msg
.
CommentTimes
;
data
.
postMsg
.
CourseId
=
data
.
Msg
.
CourseId
;
proxy
.
$request
(
"/Teacher/BatchSetStuComment"
,
data
.
postMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
uni
.
showToast
({
title
:
'操作成功!'
,
title
:
'评语保存成功!'
,
icon
:
'none'
,
duration
:
500
})
uni
.
navigateBack
({
delta
:
1
})
}
else
{
uni
.
showToast
({
title
:
'评语保存失败,请重试'
,
icon
:
'none'
,
duration
:
500
})
}
uni
.
hideLoading
()
})
},
...
...
@@ -155,10 +147,11 @@
if
(
array
)
{
data
.
postMsg
.
ChooseStuList
=
array
}
data
.
show
=
false
},
//根据课程编号获取课程学员
getCourseStu
()
{
uni
.
showLoading
()
let
stuMsg
=
{
courseId
:
data
.
Msg
.
CourseId
};
...
...
@@ -167,6 +160,7 @@
if
(
res
)
{
data
.
StuList
=
res
.
Data
;
}
uni
.
hideLoading
()
})
},
};
...
...
@@ -178,8 +172,11 @@
onLoad
(
option
)
{
this
.
Msg
.
CourseId
=
option
.
CourseId
;
this
.
Msg
.
CommentTimes
=
option
.
CommentTimes
;
this
.
getCourseStu
();
},
onShow
()
{
this
.
getCourseStu
();
}
};
</
script
>
...
...
@@ -214,7 +211,7 @@
background
:
#F6F6F6
;
border-radius
:
30
rpx
;
padding
:
33
rpx
37
rpx
;
min-height
:
537
rpx
;
min-height
:
720
rpx
;
}
.addComment-textarea-box
{
...
...
@@ -222,7 +219,18 @@
/* background: #FFFFFF; */
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654049334000_485.png')
no-repeat
top
0
center
#FFFFFF
;
background-size
:
141
rpx
41
rpx
;
padding
:
50
rpx
50
rpx
37
rpx
50
rpx
;
padding
:
84
rpx
50
rpx
37
rpx
50
rpx
;
position
:
relative
;
}
.addComment-textarea-box
.hotsopt
{
width
:
141
rpx
;
height
:
41
rpx
;
position
:
absolute
;
top
:
0
;
left
:
50%
;
margin-left
:
-70
rpx
;
z-index
:
2
;
}
.addComment-text
{
...
...
@@ -327,4 +335,29 @@
top
:
0
;
z-index
:
9
;
}
.studentsPopu-save
view
{
background
:
#C91727
;
font-size
:
30
rpx
;
font-weight
:
bold
;
letter-spacing
:
1
rpx
;
width
:
260
rpx
;
line-height
:
88
rpx
;
border-radius
:
44
rpx
;
text-align
:
center
;
color
:
#FFFFFF
;
}
.studentsPopu-save
{
justify-content
:
center
;
margin-top
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
.footer
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
2
;
background-color
:
#FFF
;
}
</
style
>
src/pages/setComments/commentDetails.vue
View file @
98e871ee
...
...
@@ -108,10 +108,10 @@
//实在评价可见性
clickoptions
(
type
)
{
let
showTypeMsg
=
{
i
ds
:
''
+
data
.
currentAction
.
Id
,
I
ds
:
''
+
data
.
currentAction
.
Id
,
ShowType
:
type
};
proxy
.
$request
(
"/Teacher/SetStuCommentShowType
ByTimes
"
,
showTypeMsg
).
then
(
res
=>
{
proxy
.
$request
(
"/Teacher/SetStuCommentShowType"
,
showTypeMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
methods
.
getStuCommentList
()
}
else
{
...
...
@@ -147,9 +147,11 @@
this
.
topData
.
CreateTime
=
json
.
CreateTime
;
this
.
topData
.
CreateTypeStr
=
json
.
CreateTypeStr
;
this
.
Msg
.
CommentTimes
=
json
.
Times
;
this
.
getStuCommentList
();
},
onShow
()
{
this
.
getStuCommentList
();
}
};
</
script
>
<
style
scoped
>
...
...
src/pages/setComments/setComments.vue
View file @
98e871ee
...
...
@@ -120,9 +120,12 @@
},
onLoad
(
option
)
{
this
.
Msg
.
CourseId
=
option
.
CourseId
;
},
onShow
()
{
this
.
getCourseRule
();
this
.
getCourseCommentTimes
();
}
,
}
};
</
script
>
...
...
@@ -221,4 +224,5 @@
top
:
0
;
z-index
:
9
;
}
</
style
>
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