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
31c84542
Commit
31c84542
authored
May 31, 2022
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
5ef2f509
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
114 additions
and
339 deletions
+114
-339
navbar.vue
src/components/navbar.vue
+1
-1
rulesPopup.vue
src/components/setComments/rulesPopup.vue
+93
-332
commentRulesList.vue
src/pages/setComments/commentRulesList.vue
+20
-6
No files found.
src/components/navbar.vue
View file @
31c84542
...
...
@@ -48,6 +48,6 @@
.sticky
{
position
:
sticky
;
top
:
0
;
z-index
:
999
;
z-index
:
2
;
}
</
style
>
src/components/setComments/rulesPopup.vue
View file @
31c84542
<
template
>
<view
class=
"rulesPopup-box"
>
<van-popup
:show=
"show"
:round=
"true"
@
close=
"closepopup"
>
<view
class=
"rulesPopup-popup-box"
>
<van-icon
class=
"rulesPopup-popup-closure"
name=
"cross"
@
click=
"closepopup"
/>
<view
class=
"rulesPopup-popup-title"
>
自定义评论规则
</view>
<view
class=
"rulesPopup-popup-content"
>
<input
v-model=
"uploadParm.ExamName"
class=
"rulesPopup-popup-name"
placeholder=
"请输入本组自定义规则名称"
/>
<view>
<text></text>
<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=
"uploadParm.ExamName"
class=
"rulesPopup-name"
placeholder=
"请输入本组自定义规则名称"
/>
<view
class=
"rulesPopup-RuleSettings"
>
<text
class=
"RuleSettings-title"
>
规则设置
</text>
<view
class=
"RuleSettings-slider"
>
<van-slider
v-model=
"value"
bar-height=
"10rpx"
active-color=
"#ee0a24"
>
<template
#
button
>
<div
class=
"custom-button"
>
{{
value
}}
</div>
</
template
>
</van-slider>
<!-- <van-slider v-model="valueNum" range
bar-height="4px" active-color="#ee0a24"
@change="onChange" /> -->
</view>
</view>
</view>
<view
class=
"RuleSettings-content"
>
<textarea
placeholder=
"请填写评论内容"
></textarea>
</view>
<view
class=
"rulesPopup-save flex"
>
<view
@
click=
"save"
>
保存
</view>
</view>
</view>
</van-popup>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
onMounted
,
...
...
@@ -26,195 +43,41 @@
import
{
uploadFile
}
from
"@/utils/index"
;
export
default
{
props
:
{
dataList
:[],
CourseId
:
0
},
components
:
{},
setup
(
props
,
ctx
)
{
// 双滑块模式时,值必须是数组
const
value
=
ref
([
10
,
50
]);
let
{
proxy
}
=
getCurrentInstance
();
let
data
=
reactive
({
userData
:{},
//用户信息
showPhone
:
false
,
showLogin
:
false
,
//多次点击
show
:
false
,
uploadParm
:
{
// Uid:726615,
// CourseId:44977497,
Uid
:
0
,
CourseId
:
props
.
CourseId
,
ExamName
:
''
},
fileList
:[],
Msg
:{
PageIndex
:
1
,
PageSize
:
10
,
ExamName
:
''
},
dataList
:
props
.
dataList
,
valueNum
:
ref
([
0
,
0
]),
show
:
false
,
loading
:
false
,
});
let
methods
=
{
examDetails
(
item
){
uni
.
navigateTo
({
url
:
`/pages/index/examDetails?exam=
${
encodeURIComponent
(
JSON
.
stringify
(
item
))}
`
});
showFun
(){
data
.
show
=
true
},
closepopup
(){
data
.
show
=
false
data
.
uploadParm
=
{
Uid
:
''
,
CourseId
:
''
,
ExamName
:
''
}
},
// 重新导入
clickReimport
(
item
){
uni
.
showModal
({
title
:
'提示'
,
content
:
'重新导入将要清除此考试数据,是否继续'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
that
.
DelExamInfo
(
item
)
}
else
if
(
res
.
cancel
)
{
uni
.
showToast
({
title
:
'已取消'
,
icon
:
'none'
,
duration
:
500
})
}
}
});
},
// 删除接口
DelExamInfo
(
item
){
let
Msg
=
{
ExamId
:
item
.
ExamId
}
proxy
.
$request
(
"/Exam/DelExamInfo"
,
Msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
){
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
,
duration
:
500
})
data
.
show
=
true
;
proxy
.
$parent
.
getExamPageList
();
}
})
},
ImportInformation
(){
data
.
show
=
true
},
beforeRead
(
file
){
if
(
!
data
.
uploadParm
.
ExamName
){
uni
.
showToast
({
title
:
'请输入考试名称'
,
icon
:
'none'
,
duration
:
500
})
return
}
if
(
file
.
url
.
indexOf
(
'xls'
)
==-
1
||
file
.
url
.
indexOf
(
'xlsx'
)
==-
1
)
{
uni
.
showToast
({
title
:
'请上传 xls/xlsx 格式图片'
,
icon
:
'none'
,
duration
:
500
})
return
false
;
}
return
true
;
},
// 添加导入
customUpload
(
event
){
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
)
const
{
file
}
=
event
.
detail
;
that
.
uploadFileFun
(
file
)
// uploadFile(params, file, (res) => {
// uni.showModal({
// title:res.Message
// })
// });
// return
onChange
(
value
){
console
.
log
(
value
)
// data.valueNum = value
// console.log(data.valueNum)
},
uploadFileFun
(
file
){
if
(
!
data
.
uploadParm
.
ExamName
){
uni
.
showToast
({
title
:
'请输入考试名称'
,
icon
:
'none'
,
duration
:
500
})
return
}
if
(
file
[
0
].
url
.
indexOf
(
'xls'
)
==-
1
||
file
[
0
].
url
.
indexOf
(
'xlsx'
)
==-
1
){
uni
.
showToast
({
title
:
'请上传xls、xlsx格式的文件'
,
icon
:
'none'
,
duration
:
500
})
return
}
let
host
=
''
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
host
=
'http://192.168.10.36:8082/api'
}
else
{
host
=
'https://eduapi.oytour.com/api'
}
data
.
userData
=
uni
.
getStorageSync
(
'userInfo'
)
data
.
uploadParm
=
{
Uid
:
data
.
userData
.
Id
,
CourseId
:
data
.
uploadParm
.
CourseId
,
ExamName
:
data
.
uploadParm
.
ExamName
}
data
.
loading
=
true
uni
.
uploadFile
({
url
:
host
+
'/Upload/UploadStuExamScore'
,
filePath
:
file
[
0
].
url
,
name
:
'file'
,
formData
:
{
myfile
:
file
[
0
],
params
:
JSON
.
stringify
(
data
.
uploadParm
)
},
success
(
res
)
{
if
(
res
.
Code
==
1
){
uni
.
showToast
({
title
:
'导入成功'
,
icon
:
'none'
,
duration
:
500
})
uni
.
hideLoading
();
data
.
uploadParm
=
{
Uid
:
''
,
CourseId
:
''
,
ExamName
:
''
}
data
.
loading
=
false
// ctx.emit('change')
}
else
{
uni
.
showToast
({
title
:
'导入失败'
,
icon
:
'none'
,
duration
:
500
})
uni
.
hideLoading
();
data
.
loading
=
false
}
},
fail
(
err
)
{
console
.
log
(
"uploadErr"
,
err
)
}
});
proxy
.
$parent
.
getExamPageList
();
save
(){
data
.
show
=
false
}
};
let
that
=
methods
;
return
{
...
toRefs
(
data
),
value
,
...
methods
};
},
...
...
@@ -227,6 +90,47 @@
};
</
script
>
<
style
scoped
>
.custom-button
{
width
:
26
rpx
;
color
:
#fff
;
font-size
:
20
rpx
;
line-height
:
36
rpx
;
text-align
:
center
;
background-color
:
#ee0a24
;
border-radius
:
100
rpx
;
}
.RuleSettings-slider
{
padding
:
52
rpx
0
66
rpx
0
;
}
.rulesPopup-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
;
}
.rulesPopup-save
{
justify-content
:
flex-end
;
margin-top
:
40
rpx
;
}
.RuleSettings-content
textarea
{
width
:
100%
;
}
.RuleSettings-content
{
background
:
#F7F7F7
;
border-radius
:
30
rpx
;
min-height
:
152
rpx
;
padding
:
37
rpx
43
rpx
;
}
.RuleSettings-title
{
font-size
:
30
rpx
;
font-weight
:
bold
;
color
:
#282828
;
}
.rulesPopup-box
.noData
{
text-align
:
center
;
flex
:
1
;
...
...
@@ -241,51 +145,25 @@
color
:
#cecece
;
text-align
:
center
;
}
.rulesPopup-hint-right
view
{
padding
:
16
rpx
30
rpx
;
background
:
#C91727
;
border-radius
:
50
rpx
;
color
:
#FFFFFF
;
font-size
:
24
rpx
;
font-weight
:
bold
;
letter-spacing
:
1
rpx
;
}
.rulesPopup-hint-right
{
flex-shrink
:
0
;
margin-left
:
50
rpx
;
}
.rulesPopup-hint-left
view
{
background
:
url('https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653648241000_545.png')
no-repeat
center
;
background-size
:
100%
100%
;
padding
:
11
rpx
0
11
rpx
30
rpx
;
}
.rulesPopup-hint-left
van-icon
{
font-size
:
42
rpx
;
margin-right
:
10
rpx
;
}
.rulesPopup-hint-left
{
font-size
:
22
rpx
;
color
:
#C91727
;
letter-spacing
:
1
rpx
;
align-items
:
center
;
}
.rulesPopup-center-hint
{
justify-content
:
space-between
;
padding
:
10
rpx
0
;
border-top
:
1
rpx
solid
#F6F6F6
;
align-items
:
center
;
.rulesPopup-RuleSettings
{
background
:
#FCEEEF
;
border-radius
:
30
rpx
;
padding
:
35
rpx
41
rpx
;
margin-top
:
51
rpx
;
margin-bottom
:
40
rpx
;
}
.rulesPopup-
popup-
name
{
.rulesPopup-name
{
background-color
:
#F7F7F7
;
text-align
:
center
;
border
:
1px
solid
#F7F7F7
;
height
:
8
6
rpx
;
line-height
:
8
6
rpx
;
height
:
8
8
rpx
;
line-height
:
8
8
rpx
;
padding
:
0
10
rpx
;
border-radius
:
44
rpx
;
font-size
:
30
rpx
;
letter-spacing
:
1
rpx
;
}
.rulesPopup-
popup-
title
{
.rulesPopup-title
{
width
:
100%
;
text-align
:
center
;
font-size
:
30
rpx
;
...
...
@@ -293,134 +171,17 @@
margin-bottom
:
73
rpx
;
letter-spacing
:
1
rpx
;
}
.rulesPopup-
popup-
closure
{
.rulesPopup-closure
{
position
:
absolute
;
right
:
31
rpx
;
top
:
31
rpx
;
color
:
#282828
;
font-size
:
38
rpx
;
}
.rulesPopup-
popup-
box
{
.rulesPopup-box
{
position
:
relative
;
width
:
548
rpx
;
padding
:
48
rpx
55
rpx
98
rpx
55
rpx
;
}
.homework-score-num
view
:last-child
{
font-size
:
23
rpx
;
margin-top
:
25
rpx
;
}
.homework-score-num
view
:first-child
{
margin-right
:
10
rpx
;
font-size
:
46
rpx
;
font-weight
:
800
;
}
.homework-score-num
{
font-weight
:
800
;
font-style
:
italic
;
font-size
:
36
rpx
;
}
.homework-score-title
{
font-size
:
20
rpx
;
margin-bottom
:
0
rpx
;
font-weight
:
400
;
letter-spacing
:
1px
;
margin-bottom
:
15
rpx
;
}
.homework-score
:last-child
{
margin-right
:
0
rpx
;
}
.homework-score
{
margin-right
:
16
rpx
;
flex-direction
:
column
;
justify-content
:
center
;
}
.rulesPopup-right
{
height
:
122
rpx
;
background
:
#FCEEEF
;
padding
:
23
rpx
37
rpx
15
rpx
37
rpx
;
border-radius
:
30
rpx
;
justify-content
:
space-between
;
flex-shrink
:
0
;
margin-left
:
11
rpx
;
color
:
#CE8086
;
}
.rulesPopup.activeOne
.rulesPopup-state-text
{
color
:
#BEBEBE
;
}
.rulesPopup-state-text
{
font-size
:
20
rpx
;
letter-spacing
:
2px
;
}
.rulesPopup-state
van-icon
{
color
:
#DADADA
;
font-size
:
24
rpx
;
margin-right
:
10
rpx
;
}
.rulesPopup-state
{
margin-top
:
35
rpx
;
font-size
:
20
rpx
;
}
.rulesPopup.activeOne
.rulesPopup-name
{
color
:
#282828
;
}
.rulesPopup-name
{
height
:
70
rpx
;
font-size
:
26
rpx
;
word-break
:
break-all
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
overflow
:
hidden
;
margin-top
:
9
rpx
;
letter-spacing
:
1px
;
font-weight
:
bold
;
}
.rulesPopup-left
{
flex-grow
:
1
;
}
.rulesPopup-center
{
justify-content
:
space-between
;
padding
:
0
0
20
rpx
0
;
}
.rulesPopup-center-line
{
width
:
4
rpx
;
height
:
23
rpx
;
background
:
#282828
;
position
:
absolute
;
left
:
0
;
top
:
46
rpx
;
}
.rulesPopup.activeOne
.rulesPopup-center-box
{
background
:
#FFFFFF
;
}
.rulesPopup-center-box
{
flex-grow
:
1
;
position
:
relative
;
border-radius
:
30
rpx
;
padding
:
31
rpx
40
rpx
0
22
rpx
;
margin-bottom
:
50
rpx
;
box-shadow
:
0px
6px
29px
0px
rgba
(
76
,
76
,
76
,
0.09
);
border-radius
:
30px
;
}
.rulesPopup
{
margin
:
0
50
rpx
;
}
.rulesPopup-import
text
{
margin-left
:
15
rpx
;
}
.rulesPopup-import
{
width
:
247
rpx
;
border
:
1
rpx
solid
#F2A1A8
;
background
:
#FFFFFF
;
line-height
:
54
rpx
;
padding
:
0
38
rpx
;
margin
:
auto
;
margin-bottom
:
48
rpx
;
border-radius
:
50
rpx
;
color
:
#F2A1A8
;
font-size
:
24
rpx
;
text-align
:
center
;
padding
:
48
rpx
55
rpx
60
rpx
55
rpx
;
}
.rulesPopup-box
{
...
...
src/pages/setComments/commentRulesList.vue
View file @
31c84542
...
...
@@ -35,19 +35,20 @@
<view
class=
"commentRulesList-footer-box"
>
<view
class=
"commentRulesList-footer flex"
>
<view
class=
"add flex"
>
<text>
添加自定义规则
</text>
<text
@
click=
"addRules"
>
添加自定义规则
</text>
<view
class=
"Wire"
></view>
</view>
<view
class=
"save flex"
><text>
保存
</text></view>
<view
class=
"save flex"
><text
@
click=
"save"
>
保存
</text></view>
</view>
</view>
<rulesPopup></rulesPopup>
<rulesPopup
ref=
"getrulesPopup"
></rulesPopup>
</view>
</
template
>
<
script
>
import
rulesPopup
from
'@/components/setComments/rulesPopup'
import
setComments
from
'@/components/setComments/setComments'
import
{
ref
,
reactive
,
toRefs
,
onMounted
,
...
...
@@ -65,6 +66,7 @@
rulesPopup
},
setup
()
{
let
{
refs
}
=
getCurrentInstance
();
let
{
proxy
}
=
getCurrentInstance
();
...
...
@@ -89,7 +91,7 @@
HomeWorkId
:
''
,
jobDetails
:
{},
dataList
:[],
pageState
:
'more'
pageState
:
'more'
,
});
let
methods
=
{
back
(){
...
...
@@ -97,8 +99,16 @@
delta
:
1
})
},
editRules
(){
//编辑
规则
saveRules
(){
//保存
规则
},
addRules
(){
//添加规则
data
.
show
=
true
refs
.
getrulesPopup
.
$vm
.
showFun
()
},
editRules
(){
//编辑规则
data
.
show
=
true
refs
.
getrulesPopup
.
$vm
.
showFun
()
},
deleteRules
(){
//删除规则
uni
.
showModal
({
...
...
@@ -116,8 +126,11 @@
}
}
});
}
}
,
}
onMounted
(()
=>
{
})
return
{
...
toRefs
(
data
),
...
methods
...
...
@@ -186,6 +199,7 @@
left
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
1
;
background
:
#FFFFFF
;
box-shadow
:
0
rpx
0
rpx
21
rpx
0
rpx
rgba
(
165
,
165
,
165
,
0.34
);
}
...
...
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