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
195dd6d9
Commit
195dd6d9
authored
Jun 02, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
f7e396f1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
324 additions
and
197 deletions
+324
-197
App.vue
src/App.vue
+1
-0
index.js
src/api/index.js
+8
-0
examDetailsComponents.vue
src/components/index/scoreDetails/examDetailsComponents.vue
+17
-6
examList.vue
src/components/index/workSituation/examList.vue
+20
-8
rulesPopup.vue
src/components/setComments/rulesPopup.vue
+96
-59
setComments.vue
src/components/setComments/setComments.vue
+5
-5
sregionslider.vue
src/components/sregionslider/sregionslider.vue
+42
-19
examDetails.vue
src/pages/index/examDetails.vue
+27
-13
commentRulesList.vue
src/pages/setComments/commentRulesList.vue
+98
-82
setComments.vue
src/pages/setComments/setComments.vue
+10
-5
No files found.
src/App.vue
View file @
195dd6d9
...
...
@@ -23,4 +23,5 @@ export default {
*
{
box-sizing
:
border-box
;
}
</
style
>
src/api/index.js
View file @
195dd6d9
...
...
@@ -24,6 +24,14 @@ export function login(data) {
})
}
export
function
setCourseComment
(
data
)
{
return
request
({
url
:
'/Teacher/SetCourseComment'
,
method
:
'post'
,
data
})
}
/**
* 手机号登录
* @param {JSON参数} data
...
...
src/components/index/scoreDetails/examDetailsComponents.vue
View file @
195dd6d9
<
template
>
<view
class=
"examDetailsComponents-box"
>
<view
class=
"examDetailsComponents activeOne flex"
v-for=
"(item,index) in ExamStu"
:key=
"index"
:class=
"item.StuId ==0?'mismatchActive':''"
>
<template
v-for=
"(item,index) in ExamStu"
>
<view
class=
"examDetailsComponents activeOne flex"
v-if=
"(item.StuId==0 && unKnowStatus) || !unKnowStatus"
:key=
"index"
:class=
"item.StuId ==0?'mismatchActive':''"
>
<view
class=
"examDetailsComponents-time-box flex"
@
click=
"goStuScoreDetail(item)"
>
<view
class=
"examDetailsComponents-time flex"
>
<view>
{{
item
.
StuName
.
substring
(
0
,
1
)
}}
</view>
...
...
@@ -39,12 +41,13 @@
排名率
</view>
<view
class=
"homework-score-num"
>
<text>
{{
(
item
.
RankRate
*
100
).
toFixed
(
0
)
}}
</text>
%
<text>
{{
(
item
.
RankRate
*
100
).
toFixed
(
0
)
}}
</text>
%
</view>
</view>
</view>
</view>
</view>
</
template
>
</view>
</template>
<
script
>
...
...
@@ -53,22 +56,30 @@
toRefs
,
onMounted
,
getCurrentInstance
,
inject
inject
,
watch
}
from
"vue"
;
export
default
{
props
:
{
ExamStu
:[]
ExamStu
:[],
checkUnKnow
:
false
},
components
:
{},
setup
()
{
setup
(
props
)
{
watch
(
()
=>
props
.
checkUnKnow
,
(
newValue
,
oldValue
)
=>
{
data
.
unKnowStatus
=
newValue
}
)
let
data
=
reactive
({
obj
:
{
Name
:
''
,
Photo
:
''
,
},
showPhone
:
false
,
unKnowStatus
:
props
.
checkUnKnow
,
showLogin
:
true
,
//多次点击
});
let
methods
=
{
...
...
src/components/index/workSituation/examList.vue
View file @
195dd6d9
...
...
@@ -54,8 +54,10 @@
<view
class=
"examList-popup-box"
>
<van-icon
class=
"examList-popup-closure"
name=
"cross"
@
click=
"closepopup"
/>
<view
class=
"examList-popup-title"
>
导入考试信息
</view>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1654136886000_860.png"
mode=
"widthFix"
class=
"examList-popup-icon"
></image>
<view
class=
"examList-popup-content"
>
<input
v-model=
"uploadParm.ExamName"
class=
"examList-popup-name"
placeholder=
"请输入考试名称"
/>
<van-uploader
class=
"examList-popup-fil-box flex"
accept=
"file"
...
...
@@ -69,7 +71,7 @@
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653639041000_305.png"
/>
选择文件
</view>
-->
<van-button
round
color=
'#C91727'
custom-style=
'width: 548rpx
;'
block
>
选择文件
</van-button>
<van-button
round
color=
'#C91727'
icon=
"add-o"
custom-style=
'width: 360rpx;margin:0 auto
;'
block
>
选择文件
</van-button>
</van-uploader>
</view>
</view>
...
...
@@ -362,33 +364,42 @@
.examList-popup-fil-box
{
display
:
flex
;
line-height
:
88
rpx
;
width
:
548
rpx
;
width
:
360
rpx
;
/* padding: 0 197rpx; */
border-radius
:
44
rpx
;
font-size
:
30
rpx
;
color
:
#FFFFFF
;
background
:
#C91727
;
margin
:
0
auto
;
margin-top
:
27
rpx
;
text-align
:
center
;
}
.examList-popup-name
{
background-color
:
#FFFFFF
;
text-align
:
center
;
border
:
1px
solid
#AAAAAA
;
height
:
8
6
rpx
;
line-height
:
8
6
rpx
;
border
:
1
r
px
solid
#AAAAAA
;
height
:
8
8
rpx
;
line-height
:
8
8
rpx
;
padding
:
0
10
rpx
;
border-radius
:
44
rpx
;
font-size
:
30
rpx
;
width
:
439
rpx
;
font-weight
:
bold
;
margin
:
0
auto
;
}
.examList-popup-title
{
width
:
100%
;
text-align
:
center
;
font-size
:
30
rpx
;
font-weight
:
500
;
margin-bottom
:
73
rpx
;
letter-spacing
:
1
rpx
;
margin-bottom
:
70
rpx
;
}
.examList-popup-icon
{
width
:
188
rpx
;
height
:
188
rpx
;
display
:
block
;
margin
:
0
auto
50
rpx
auto
;
}
.examList-popup-closure
{
position
:
absolute
;
right
:
31
rpx
;
...
...
@@ -399,7 +410,8 @@
.examList-popup-box
{
position
:
relative
;
width
:
548
rpx
;
padding
:
48
rpx
55
rpx
98
rpx
55
rpx
;
padding
:
48
rpx
55
rpx
82
rpx
55
rpx
;
box-sizing
:
border-box
;
}
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
...
...
src/components/setComments/rulesPopup.vue
View file @
195dd6d9
<
template
>
<view
class=
"rulesPopup-box"
>
<van-popup
:show=
"show"
:round=
"true"
@
close=
"closepopup"
>
<view
class=
"rulesPopup-box"
>
<van-icon
class=
"rulesPopup-closure"
name=
"cross"
@
click=
"closepopup"
/>
<view
class=
"rulesPopup-title"
>
自定义评论规则
</view>
<view
class=
"rulesPopup-content"
>
<input
v-model=
"ruleObj.Title"
class=
"rulesPopup-name"
placeholder=
"请输入本组自定义规则名称"
/>
<view
class=
"rulesPopup-RuleSettings"
>
<text
class=
"RuleSettings-title"
>
规则设置
</text>
<view
class=
"RuleSettings-slider"
>
<sRegionSlider
:minValue=
"minValue"
:maxValue=
"maxValue"
:step=
"1"
@
up=
"up"
@
down=
"down"
@
move=
"move"
/>
</view>
</view>
</view>
<view
class=
"RuleSettings-content"
>
<textarea
placeholder=
"请填写评论内容"
v-model=
"ruleObj.Info"
></textarea>
</view>
<view
class=
"rulesPopup-save flex"
>
<view
@
click=
"save"
>
保存
</view>
</view>
<van-icon
class=
"rulesPopup-closure"
name=
"cross"
@
click=
"cancelHandler"
/>
<view
class=
"rulesPopup-title"
>
自定义评论规则
</view>
<view
class=
"rulesPopup-content"
>
<!--
<input
v-model=
"ruleObj.Title"
class=
"rulesPopup-name"
placeholder=
"请输入本组自定义规则名称"
/>
-->
<view
class=
"rulesPopup-RuleSettings"
>
<view
class=
"RuleSettings-title"
>
规则设置
</view>
<sRegionSlider
:minValue=
"minValue"
:maxValue=
"maxValue"
:fillMinValue=
'rangeValue[0]'
:fullValue=
'rangeValue[1]'
:step=
"5"
@
up=
"up"
@
down=
"down"
@
move=
"move"
/>
</view>
</van-popup>
</view>
<view
class=
"RuleSettings-content"
>
<textarea
placeholder=
"请填写评论内容"
v-model=
"ruleObj.Info"
></textarea>
</view>
<view
class=
"rulesPopup-save flex"
>
<van-loading
color=
"#f5f5f5"
v-if=
"loading"
/>
<view
@
click=
"save"
v-else
>
保存
</view>
</view>
</view>
</
template
>
<
script
>
...
...
@@ -38,20 +36,33 @@
import
{
uploadFile
}
from
"@/utils/index"
;
import
{
setCourseComment
}
from
'../../api/index'
export
default
{
components
:
{
sRegionSlider
},
props
:
{
rule
:{
type
:
Number
,
default
:
null
},
rules
:{
type
:
Object
,
default
:
null
}
},
emits
:
[
'change'
],
emits
:
[
'change'
,
'cancel'
],
setup
(
props
,
ctx
)
{
let
{
proxy
}
=
getCurrentInstance
();
watch
(
()
=>
props
.
rules
,
(
newValue
,
oldValue
)
=>
{
data
.
rules
=
newValue
}
)
let
data
=
reactive
({
show
:
false
,
loading
:
false
,
isRange
:
true
,
ruleObj
:
{
...
...
@@ -62,45 +73,65 @@
Info
:
""
,
//评价
},
minValue
:
0
,
maxValue
:
10
maxValue
:
0
,
rangeValue
:[
0
,
100
],
rules
:
props
.
rules
});
if
(
props
.
rule
!=-
1
){
let
tempRule
=
data
.
rules
.
CommentDetails
[
props
.
rule
]
data
.
ruleObj
.
DetailId
=
tempRule
.
DetailId
;
data
.
ruleObj
.
StartNum
=
tempRule
.
StartNum
;
data
.
ruleObj
.
EndNum
=
tempRule
.
EndNum
;
data
.
ruleObj
.
Info
=
tempRule
.
Info
;
data
.
minValue
=
tempRule
.
StartNum
;
data
.
maxValue
=
tempRule
.
EndNum
;
}
let
methods
=
{
chage
(
minValue
,
maxValue
){
data
.
minValue
=
minValue
;
data
.
maxValue
=
maxValue
;
},
up
(
e
){
// console.log(e);//// e中包含了原有的e信息, 并添加了custom对象
data
.
minValue
=
e
.
custom
.
minValue
;
data
.
maxValue
=
e
.
custom
.
maxValue
;
},
down
(
e
){
},
move
(
e
){
},
showFun
(
item
)
{
if
(
item
)
{
data
.
ruleObj
.
DetailId
=
item
.
DetailId
;
data
.
ruleObj
.
StartNum
=
item
.
StartNum
;
data
.
ruleObj
.
EndNum
=
item
.
EndNum
;
data
.
ruleObj
.
Info
=
item
.
Info
;
}
else
{
data
.
ruleObj
.
DetailId
=
0
;
data
.
ruleObj
.
StartNum
=
0
;
data
.
ruleObj
.
EndNum
=
0
;
data
.
ruleObj
.
Info
=
""
;
}
data
.
show
=
true
},
closepopup
()
{
data
.
show
=
false
},
onChange
(
value
)
{
console
.
log
(
value
)
cancelHandler
(){
ctx
.
emit
(
'cancel'
)
},
save
()
{
data
.
ruleObj
.
StartNum
=
data
.
valueNum
[
0
];
data
.
ruleObj
.
EndNum
=
data
.
valueNum
[
1
];
ctx
.
emit
(
"change"
,
data
.
ruleObj
);
data
.
show
=
false
if
(
data
.
ruleObj
.
Info
==
''
){
uni
.
showToast
({
title
:
'请填写评语内容'
,
icon
:
'none'
,
duration
:
1000
})
return
;
}
uni
.
showLoading
()
data
.
loading
=
true
console
.
log
(
data
.
valueNum
)
data
.
ruleObj
.
StartNum
=
data
.
minValue
>
data
.
maxValue
?
data
.
maxValue
:
data
.
minValue
;
data
.
ruleObj
.
EndNum
=
data
.
minValue
>
data
.
maxValue
?
data
.
minValue
:
data
.
maxValue
;
if
(
props
.
rule
!=-
1
){
data
.
rules
.
CommentDetails
[
props
.
rule
]
=
data
.
ruleObj
}
else
{
data
.
rules
.
CommentDetails
.
push
(
data
.
ruleObj
)
}
setCourseComment
(
data
.
rules
).
then
(
r
=>
{
//console.log(r)
data
.
loading
=
false
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'操作成功!'
,
icon
:
'none'
,
duration
:
500
})
ctx
.
emit
(
"change"
);
})
}
};
let
that
=
methods
;
...
...
@@ -128,9 +159,7 @@
border-radius
:
100
rpx
;
}
.RuleSettings-slider
{
padding
:
0
0
30
rpx
0
;
}
.rulesPopup-save
view
{
background
:
#C91727
;
...
...
@@ -151,6 +180,10 @@
.RuleSettings-content
textarea
{
width
:
100%
;
font-size
:
30
rpx
;
font-weight
:
400
;
color
:
#282828
;
line-height
:
48
rpx
;
}
.RuleSettings-content
{
...
...
@@ -158,12 +191,16 @@
border-radius
:
30
rpx
;
min-height
:
152
rpx
;
padding
:
37
rpx
43
rpx
;
box-sizing
:
border-box
;
margin-top
:
40
rpx
;
}
.RuleSettings-title
{
font-size
:
30
rpx
;
font-weight
:
bold
;
color
:
#282828
;
line-height
:
42
rpx
;
/* margin-bottom: 70rpx; */
}
.rulesPopup-box
.noData
{
...
...
@@ -186,9 +223,8 @@
.rulesPopup-RuleSettings
{
background
:
#FCEEEF
;
border-radius
:
30
rpx
;
padding
:
35
rpx
41
rpx
;
margin-top
:
51
rpx
;
margin-bottom
:
40
rpx
;
padding
:
35
rpx
40
rpx
;
padding-bottom
:
60
rpx
;
}
.rulesPopup-name
{
...
...
@@ -208,8 +244,7 @@
text-align
:
center
;
font-size
:
30
rpx
;
font-weight
:
500
;
margin-bottom
:
73
rpx
;
letter-spacing
:
1
rpx
;
margin-bottom
:
60
rpx
;
}
.rulesPopup-closure
{
...
...
@@ -222,8 +257,10 @@
.rulesPopup-box
{
position
:
relative
;
width
:
548
rpx
;
padding
:
48
rpx
55
rpx
60
rpx
55
rpx
;
width
:
650
rpx
;
padding
:
40
rpx
;
padding-bottom
:
60
rpx
;
box-sizing
:
border-box
;
}
.rulesPopup-box
{}
...
...
src/components/setComments/setComments.vue
View file @
195dd6d9
...
...
@@ -76,11 +76,11 @@
dataList
:
[],
});
let
methods
=
{
back
()
{
uni
.
navigateBack
({
delta
:
1
})
},
//
back() {
//
uni.navigateBack({
//
delta: 1
//
})
//
},
addComments
(){
uni
.
navigateTo
({
url
:
'/pages/setComments/commentRulesList?show='
+
true
...
...
src/components/sregionslider/sregionslider.vue
View file @
195dd6d9
...
...
@@ -2,10 +2,14 @@
<view
clipchildren=
false
>
<text
class=
"loading"
:style=
"
{opacity: lineLeft===0 ? '1' : '0'}">loading...
</text>
<view
class=
"fj-slider-box"
:style=
"
{opacity: lineLeft!==0 ? '1' : '0'}" clipchildren= false>
<view
class=
"tip"
:style=
"
{left:`${tipLeft}px`,opacity: tipShow ? '1' : '1'}">
{{
curValue
}}
%
<view
class=
"h"
></view>
</view>
<view
class=
"tip"
:style=
"
{left:`${minLeft}px`,opacity: tipShow ? '1' : '1'}">
{{
myShowMinNum
}}
%
<view
class=
"h"
></view>
</view>
<view
class=
"tip"
:style=
"
{left:`${maxLeft-30}px`,opacity: tipShow ? '1' : '1'}">
{{
myShowMaxNum
}}
%
<view
class=
"h"
></view>
</view>
<view
class=
"fj-slider"
clipchildren=
false
>
<view
class=
"fj-line"
ref=
"fj-line"
>
<view
class=
"scale-box"
>
...
...
@@ -35,8 +39,8 @@
</view>
</view>
<view
class=
"fj-value"
>
<text
class=
"fj-v-l"
:style=
"
{color: showMinNum===fillMinValue ? '#333' : '#999'}"
>
{{
fillMinValue
}}
</text>
<text
class=
"fj-v-r"
:style=
"
{color: showMaxNum===fillValue ? '#333' : '#999'}"
>
{{
fillValue
}}
</text>
<text
class=
"fj-v-l"
>
{{
fillMinValue
}}
</text>
<text
class=
"fj-v-r"
>
{{
fillValue
}}
</text>
</view>
</view>
</view>
...
...
@@ -78,7 +82,7 @@ export default {
},
step
:
{
type
:
Number
,
default
:
1
,
default
:
5
,
},
},
watch
:
{
...
...
@@ -128,9 +132,16 @@ export default {
sFillMinValue
:
0
,
percentage
:
0
,
disX
:
0
disX
:
0
,
myShowMinNum
:
0
,
myShowMaxNum
:
0
,
};
},
created
()
{
this
.
myShowMinNum
=
this
.
minValue
this
.
myShowMaxNum
=
this
.
maxValue
},
mounted
(){
this
.
$nextTick
().
then
(()
=>
{
this
.
envir
({
...
...
@@ -206,6 +217,9 @@ export default {
})
},
touchmove
(
e
,
type
)
{
try
{
// #ifndef APP-PLUS
const
disX
=
e
.
touches
[
0
].
clientX
-
this
.
lineLeft
// #endif
...
...
@@ -238,6 +252,11 @@ export default {
this
.
curValue
=
this
.
curValue
+
this
.
fillMinValue
;
if
(
type
===
'min'
){
this
.
myShowMinNum
=
this
.
curValue
}
else
if
(
type
===
'max'
){
this
.
myShowMaxNum
=
this
.
curValue
}
this
.
$emit
(
'move'
,
{
...
e
,
custom
:{
...
...
@@ -248,6 +267,9 @@ export default {
}
})
}
catch
(
e
){
//TODO handle the exception
}
},
touchend
(
e
,
type
)
{
if
(
type
===
'min'
)
{
...
...
@@ -295,10 +317,10 @@ export default {
<
style
scoped
>
.scale
view
{
width
:
2px
;
height
:
5
px
;
width
:
2
r
px
;
height
:
7
r
px
;
background
:
#282828
;
border-radius
:
1px
;
border-radius
:
1
r
px
;
}
.scale
{
justify-content
:
space-between
;
...
...
@@ -313,7 +335,7 @@ export default {
.fj-slider-box
{
font-size
:
14px
;}
.loading
{
font-size
:
14px
;
text-align
:
center
;
display
:
block
;}
.fj-value
{
position
:
relative
;
height
:
20px
;}
.fj-v-l
,
.fj-v-r
{
font-size
:
14px
;
position
:
absolute
;}
.fj-v-l
,
.fj-v-r
{
font-size
:
24
rpx
;
position
:
absolute
;
font-weight
:
500
;
color
:
#282828
;}
.fj-v-l
{
left
:
0
;}
.fj-v-r
{
right
:
0
;}
...
...
@@ -336,15 +358,16 @@ export default {
}
.tip
{
width
:
37px
;
/* width: 37px; */
position
:
relative
;
padding
:
1
px
5
px
;
padding
:
1
0
r
px
;
background
:
#FFFDFD
;
color
:
rgba
(
227
,
64
,
76
,
1
)
;
color
:
#E53F4E
;
border-radius
:
6px
;
z-index
:
4
;
font-size
:
14
px
;
font-size
:
24
r
px
;
text-align
:
center
;
display
:
inline
;
}
.h
{
position
:
absolute
;
...
...
@@ -359,14 +382,14 @@ export default {
}
.fj-line
{
position
:
relative
;}
.fj-line
,
.fj-line-pull
{
height
:
5
px
;
background
:
#
999
;
height
:
12
r
px
;
background
:
#
fff
;
position
:
absolute
;
top
:
14px
;
left
:
15px
;
right
:
15px
;
z-index
:
1
;
border-radius
:
5
px
;
border-radius
:
6
r
px
;
}
.fj-line-pull
{
z-index
:
2
;
background
:
#282828
;}
...
...
src/pages/index/examDetails.vue
View file @
195dd6d9
...
...
@@ -15,7 +15,8 @@
<view>
{{
ExamName
}}
</view>
</view>
<view
class=
"conten-title-right"
>
<text>
仅查看未匹配学员
</text>
<text>
仅看未匹配
</text>
<van-switch
:checked=
"unSelectCheck"
size=
"18px"
active-color=
"#07c160"
@
change=
"changeUnSelect"
/>
</view>
</view>
<view
class=
"jobDetails-num-box flex"
>
...
...
@@ -30,7 +31,7 @@
</view>
</view>
<view
class=
"index-student-information"
style=
"flex:1;height:1px"
>
<examDetailsComponents
:ExamStu=
"ExamStu"
></examDetailsComponents>
<examDetailsComponents
:ExamStu=
"ExamStu"
:checkUnKnow=
'unSelectCheck'
></examDetailsComponents>
</view>
</view>
</view>
...
...
@@ -66,9 +67,13 @@
ExamName
:
"测试需要绑"
,
ExamNum
:
0
,
AvgScore
:
0
,
ExamStu
:[]
ExamStu
:[],
unSelectCheck
:
false
});
let
methods
=
{
changeUnSelect
({
detail
}){
data
.
unSelectCheck
=
detail
},
//获取考试学生列表
getExamStuList
(){
proxy
.
$request
(
"/Exam/GetExamStuList"
,
data
.
Msg
).
then
(
res
=>
{
...
...
@@ -127,25 +132,34 @@
padding
:
70
rpx
185
rpx
35
rpx
185
rpx
;
}
.conten-title-right
text
{
background
:
#C91727
;
border-radius
:
27
rpx
;
font-size
:
24
rpx
;
font-weight
:
bold
;
color
:
#FFFFFF
;
padding
:
10
rpx
19
rpx
;
display
:
block
;
font-weight
:
400
;
color
:
grey
;
text-align
:
right
;
display
:
block
;
margin-bottom
:
10
rpx
;
}
.conten-title-right
{
flex-shrink
:
0
;
text-align
:
right
;
margin-left
:
20
rpx
;
}
.conten-title-left
view
{
font-size
:
50
rpx
;
font-weight
:
800
;
font-size
:
36
rpx
;
font-weight
:
600
;
color
:
#282828
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.conten-title-left
text
{
font-size
:
36
rpx
;
font-weight
:
400
;
margin-bottom
:
10
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
grey
;
}
.conten-title-left
{
color
:
#282828
;
...
...
src/pages/setComments/commentRulesList.vue
View file @
195dd6d9
...
...
@@ -7,40 +7,56 @@
</view>
</navbar>
<view
class=
"commentRulesList-content"
>
<view
class=
"commentRulesList-title flex"
>
<
!--
<
view
class=
"commentRulesList-title flex"
>
<van-image
class=
"img"
width=
"35rpx"
height=
"40rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653980136000_413.png"
/>
<text>
{{
courseRule
.
Title
}}
</text>
</view>
<view
class=
"commentRulesList-list"
v-if=
"courseRule"
v-for=
"(item,index) in courseRule.CommentDetails"
>
<view
class=
"commentRulesList-cross"
v-if=
"courseRule.Id>0"
@
click=
"deleteRules(item,index)"
>
<van-icon
name=
"cross"
/>
</view>
<view
class=
"commentRulesList-img flex"
>
<view>
百分比:
{{
item
.
StartNum
}}
%-
{{
item
.
EndNum
}}
%
</view>
<van-image
v-if=
"courseRule.Id>0"
@
click=
"editRules(item)"
class=
"img"
width=
"31rpx"
height=
"30rpx"
fit=
"cover"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653980151000_180.png"
/>
</view>
-->
<view
style=
"border-radius: 30rpx;background: #FCEEEF;overflow: hidden;margin-bottom: 40rpx;"
v-for=
"(item,index) in courseRule.CommentDetails"
>
<van-swipe-cell
id=
"swipe-cell"
:right-width=
"116"
async-close
:key=
"index"
@
close=
"onClose"
>
<view
class=
"commentRulesList-list"
>
<view
class=
"commentRulesList-img flex"
>
<view>
百分比:
{{
item
.
StartNum
}}
%-
{{
item
.
EndNum
}}
%
</view>
</view>
<view
class=
"commentRulesList-comment"
>
{{
item
.
Info
}}
</view>
</view>
<view
class=
"commentRulesList-comment"
>
{{
item
.
Info
}}
<view
slot=
"right"
class=
"van-swipe-cell__right"
>
<van-button
square
type=
"danger"
@
click=
"deleteRules(item,index)"
custom-style=
"height:100%;"
>
删除
</van-button>
<van-button
square
type=
"primary"
@
click=
"editRules(item,index)"
custom-style=
"height:100%;"
>
编辑
</van-button>
</view>
</van-swipe-cell>
</view>
<view
class=
"noData"
v-
else
>
<view
class=
"noData"
v-
if=
"!courseRule || !courseRule.CommentDetails || !courseRule.CommentDetails.length>0"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png"
mode=
"widthFix"
></image>
<view>
暂无评论规则数据
</view>
</view>
</view>
<view
class=
"commentRulesList-footer-box"
>
<view
class=
"commentRulesList-footer flex"
>
<view
class=
"add flex"
>
<!--
<text
@
click=
"addRules"
>
添加自定义规则
</text>
<view
class=
"Wire"
></view>
-->
</view>
<!--
<view
class=
"save flex"
><text
v-if=
"!isDefaultRule"
@
click=
"saveRules"
>
保存
</text></view>
-->
<view
class=
"add flex"
>
<text
@
click=
"addRules"
>
添加自定义规则
</text>
<view
class=
"Wire"
></view>
</view>
<view
class=
"save flex"
><text
v-if=
"!isDefaultRule"
@
click=
"saveRules"
>
保存
</text></view>
</view>
</view>
<
template
v-show=
"show
"
>
<rulesPopup
ref=
"getrulesPopup"
@
change=
"changeData"
></rulesPopup>
</
template
>
<
van-popup
:show=
"show"
:round=
"true"
@
close=
"closepopup
"
>
<rulesPopup
@
cancel=
"closepopup"
:rule=
"editor"
:rules=
"courseRule"
v-if=
"show"
ref=
"getrulesPopup"
@
change=
"changeData"
></rulesPopup>
</
van-popup
>
</view>
</
template
>
<
script
>
...
...
@@ -83,10 +99,20 @@
},
//课程规则
isDefaultRule
:
true
,
//是否是默认规则(
detailItem
:
{},
//当前编辑项
show
:
false
show
:
false
,
editor
:
-
1
});
let
methods
=
{
onClose
(
event
)
{
const
{
position
,
instance
}
=
event
.
detail
;
switch
(
position
)
{
case
'left'
:
case
'cell'
:
case
'right'
:
instance
.
close
();
break
;
}
},
back
()
{
uni
.
navigateBack
({
delta
:
1
...
...
@@ -94,29 +120,22 @@
},
// 关闭规则弹窗
closure
(){
refs
.
getrulesPopup
.
$vm
.
closepopup
()
},
saveRules
()
{
//保存规则
proxy
.
$request
(
"/Teacher/SetCourseComment"
,
data
.
courseRule
).
then
(
res
=>
{
if
(
res
)
{
uni
.
showToast
({
title
:
'操作成功!'
,
icon
:
'none'
,
duration
:
500
})
this
.
getCourseRule
()
}
})
this
.
show
=
false
},
//添加规则
addRules
()
{
data
.
show
=
true
refs
.
getrulesPopup
.
$vm
.
showFun
()
//refs.getrulesPopup.$vm.showFun()
},
closepopup
(){
data
.
show
=
false
data
.
editor
=-
1
},
//编辑规则
editRules
(
item
)
{
editRules
(
item
,
index
)
{
data
.
editor
=
index
data
.
show
=
true
refs
.
getrulesPopup
.
$vm
.
showFun
(
item
)
},
//删除规则
...
...
@@ -156,6 +175,7 @@
},
//获取课程规则信息
getCourseRule
()
{
uni
.
showLoading
()
proxy
.
$request
(
"/Teacher/GetCourseComment"
,
data
.
Msg
).
then
(
res
=>
{
if
(
res
)
{
var
tempData
=
res
.
Data
;
...
...
@@ -171,36 +191,13 @@
data
.
isDefaultRule
=
false
;
}
}
uni
.
hideLoading
()
})
},
//获取子组件数据
changeData
(
item
)
{
console
.
log
(
"item"
,
item
);
if
(
item
)
{
if
(
item
.
Title
&&
item
.
Title
!=
''
)
{
data
.
courseRule
.
Title
=
item
.
Title
}
if
(
data
.
isDefaultRule
)
{
data
.
courseRule
.
CommentDetails
=
[];
}
let
obj
=
{
DetailId
:
item
.
DetailId
,
StartNum
:
item
.
StartNum
,
EndNum
:
item
.
EndNum
,
Info
:
item
.
Info
}
if
(
item
.
DetailId
>
0
&&
data
.
courseRule
.
CommentDetails
.
length
>
0
)
{
let
chooseIndex
=
data
.
courseRule
.
CommentDetails
.
findIndex
(
qitem
=>
qitem
.
DetailId
==
item
.
DetailId
);
data
.
courseRule
.
CommentDetails
[
chooseIndex
].
StartNum
=
obj
.
StartNum
;
data
.
courseRule
.
CommentDetails
[
chooseIndex
].
EndNum
=
obj
.
EndNum
;
data
.
courseRule
.
CommentDetails
[
chooseIndex
].
Info
=
obj
.
Info
;
}
else
{
data
.
courseRule
.
CommentDetails
.
push
(
obj
)
}
}
if
(
data
.
isDefaultRule
)
{
data
.
isDefaultRule
=
false
;
}
changeData
()
{
methods
.
getCourseRule
()
data
.
show
=
false
}
}
return
{
...
...
@@ -211,17 +208,17 @@
onLoad
(
option
)
{
this
.
Msg
.
CourseId
=
option
.
CourseId
;
if
(
option
.
show
){
this
.
show
=
option
.
show
this
.
addRules
()
}
if
(
option
.
CourseId
){
this
.
show
=
true
this
.
addRules
()
setTimeout
(()
=>
{
this
.
show
=
false
this
.
closure
()
},
200
)
//this.show = option.show
//this.addRules()
}
// if(option.CourseId){
// this.show = true
// this.addRules()
// setTimeout(()=>{
// this.show = false
// this.closure()
// },200)
// }
this
.
getCourseRule
();
},
};
...
...
@@ -232,7 +229,17 @@
flex
:
1
;
width
:
100%
;
}
.van-swipe-cell__left
,
.van-swipe-cell__right
{
position
:
absolute
;
top
:
0
;
height
:
100%
;
right
:
0
;
width
:
232px
;
-webkit-transform
:
translate3d
(
100%
,
0
,
0
);
transform
:
translate3d
(
100%
,
0
,
0
);
}
.noData
image
{
width
:
200
rpx
;
margin-bottom
:
40
rpx
;
...
...
@@ -305,7 +312,7 @@
font-weight
:
400
;
color
:
#282828
;
line-height
:
58
rpx
;
letter-spacing
:
1
rpx
;
}
.commentRulesList-img
.img
{
...
...
@@ -344,11 +351,10 @@
.commentRulesList-list
{
background
:
#FCEEEF
;
border-radius
:
30px
;
/* border-radius: 30px; */
position
:
relative
;
padding
:
37
rpx
38
rpx
36
rpx
45
rpx
;
margin-bottom
:
40
rpx
;
min-height
:
290
rpx
;
min-height
:
100
rpx
;
}
.commentRulesList-title
.img
{
...
...
@@ -410,7 +416,18 @@
background
:
#FFFFFF
;
color
:
#D13A48
;
}
.right-opeartion
{
width
:
100px
;
margin-left
:
38px
;
background
:
#D13A48
;
color
:
#FFF
;
left
:
159px
;
z-index
:
-1
;
padding-left
:
91
rpx
;
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
}
.add
text
,
.save
text
{
line-height
:
88
rpx
;
...
...
@@ -487,11 +504,10 @@
.commentRulesList-list
{
background
:
#FCEEEF
;
border-radius
:
30px
;
/* border-radius: 30px; */
position
:
relative
;
padding
:
37
rpx
38
rpx
36
rpx
45
rpx
;
margin-bottom
:
40
rpx
;
min-height
:
290
rpx
;
min-height
:
100
rpx
;
}
.commentRulesList-title
.img
{
...
...
src/pages/setComments/setComments.vue
View file @
195dd6d9
...
...
@@ -2,7 +2,7 @@
<view
class=
"setComments-index-box"
>
<navbar
class=
"navbarSticky"
bg=
"#F6F6F6"
>
<view
class=
"setComments-header-box flex"
>
<van-icon
class=
"setComments-header-left"
name=
"arrow-left"
@
click=
"back"
/>
<van-icon
class=
"setComments-header-left"
name=
"arrow-left"
@
click=
"back
First
"
/>
<text
class=
"setComments-header-title"
>
设置评语
</text>
</view>
</navbar>
...
...
@@ -18,8 +18,8 @@
<
template
v-else
>
使用默认配置
</
template
>
</text>
<view>
<
template
v-if=
"courseRule&&courseRule.Id>0"
>
从自定义评价规则进入修改
</
template
>
<
template
v-else
>
不喜欢默认配置可自行设置
</
template
>
<
template
v-if=
"courseRule&&courseRule.Id>0"
>
当前启用自定义规则,可以随时再次调整
</
template
>
<
template
v-else
>
当前使用为系统默认配置,你可以点击进行自定义调整
</
template
>
</view>
</view>
</view>
...
...
@@ -77,8 +77,11 @@
courseRule
:
{},
//课程评价规则
});
let
methods
=
{
back
()
{
backFirst
()
{
console
.
log
(
'come in...'
)
console
.
log
(
getCurrentPages
())
uni
.
navigateBack
({
url
:
'/pages/index/workSituation'
,
delta
:
1
})
...
...
@@ -103,8 +106,10 @@
})
},
goRules
()
{
console
.
log
(
'come in 2 ....'
)
uni
.
navigateTo
({
url
:
'/pages/setComments/commentRulesList?CourseId='
+
data
.
Msg
.
CourseId
//url: '/pages/setComments/commentRulesList?CourseId=' + data.Msg.CourseId
url
:
'/pages/setComments/commentRulesList?show='
+
false
+
'CourseId='
+
data
.
Msg
.
CourseId
})
}
};
...
...
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