Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzksxt
Overview
Overview
Details
Activity
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
常超
xzksxt
Commits
322798ca
Commit
322798ca
authored
Jul 15, 2024
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
试题调整为一道100分
parent
684af648
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
22 deletions
+36
-22
src/components/student/answer.vue
+36
-22
No files found.
src/components/student/answer.vue
View file @
322798ca
...
@@ -38,8 +38,9 @@
...
@@ -38,8 +38,9 @@
<p>
{{
title
}}
(
{{
optionValue
}}
)
</p>
<p>
{{
title
}}
(
{{
optionValue
}}
)
</p>
<i
class=
"iconfont icon-right auto-right"
></i>
<i
class=
"iconfont icon-right auto-right"
></i>
<span
style=
"color: black;font-weight: bold"
>
全卷共5题
<i
<span
style=
"color: black;font-weight: bold"
>
全卷共1题
class=
"iconfont icon-time"
></i>
倒计时:
<b>
{{
time
}}
</b></span>
<!--
<i
class=
"iconfont icon-time"
></i>
倒计时:
<b>
{{
time
}}
</b></span>
-->
</span>
<div
style=
"color: black;font-weight: bold"
>
(
{{
userInfo
.
name
}}
)
</div>
<div
style=
"color: black;font-weight: bold"
>
(
{{
userInfo
.
name
}}
)
</div>
</div>
</div>
<ul
style=
"display: flex;margin-left: 30px"
>
<ul
style=
"display: flex;margin-left: 30px"
>
...
@@ -105,7 +106,11 @@
...
@@ -105,7 +106,11 @@
<div
class=
"analysis"
id=
"topic1Right"
style=
"display: none"
>
<div
class=
"analysis"
id=
"topic1Right"
style=
"display: none"
>
<ul>
<ul>
<li
class=
"first "
>
<el-tag
type=
"success"
>
正确答案:
</el-tag><span
<li
class=
"first "
>
<el-tag
type=
"success"
>
正确答案:
</el-tag><span
class=
"right"
>
{{
reduceAnswer
.
rightAnswer
}}
</span></li>
class=
"right"
>
{{
reduceAnswer
.
rightAnswer
}}
</span>
<!--
<el-tag
type=
"success"
@
click=
"previous()"
>
上一题
</el-tag>
<el-tag
type=
"success"
@
click=
"next()"
>
下一题
</el-tag>
<el-tag
type=
"success"
@
click=
"commit()"
>
结束考试
</el-tag>
-->
</li>
<li
class=
"second"
><el-tag>
题目解析:
</el-tag>
<li
class=
"second"
><el-tag>
题目解析:
</el-tag>
<div
class=
"li2right"
>
{{
(
reduceAnswer
.
analysis
==
null
||
reduceAnswer
.
analysis
==
''
)
?
'无'
:
<div
class=
"li2right"
>
{{
(
reduceAnswer
.
analysis
==
null
||
reduceAnswer
.
analysis
==
''
)
?
'无'
:
reduceAnswer
.
analysis
}}
</div>
reduceAnswer
.
analysis
}}
</div>
...
@@ -174,6 +179,9 @@
...
@@ -174,6 +179,9 @@
<li
class=
"first"
>
<li
class=
"first"
>
<el-tag
type=
"success"
>
正确答案:
</el-tag>
<el-tag
type=
"success"
>
正确答案:
</el-tag>
<span
class=
"right"
>
{{
reduceAnswer
.
rightAnswer
}}
</span>
<span
class=
"right"
>
{{
reduceAnswer
.
rightAnswer
}}
</span>
<!--
<el-tag
type=
"success"
@
click=
"previous()"
>
上一题
</el-tag>
<el-tag
type=
"success"
@
click=
"next()"
>
下一题
</el-tag>
<el-tag
type=
"success"
@
click=
"commit()"
>
结束考试
</el-tag>
-->
</li>
</li>
<li
class=
"second"
>
<li
class=
"second"
>
<el-tag>
题目解析:
</el-tag>
<el-tag>
题目解析:
</el-tag>
...
@@ -194,7 +202,10 @@
...
@@ -194,7 +202,10 @@
<ul>
<ul>
<li
class=
"first"
>
<li
class=
"first"
>
<el-tag
type=
"success"
>
正确答案:
</el-tag>
<el-tag
type=
"success"
>
正确答案:
</el-tag>
<span
class=
"right"
>
{{
reduceAnswer
.
answer
===
'T'
?
'正确'
:
'错误'
}}
</span>
<span
class=
"right"
>
{{
reduceAnswer
.
answer
===
'T'
?
'正确'
:
'错误'
}}
</span>
<!--
<el-tag
type=
"success"
@
click=
"previous()"
>
上一题
</el-tag>
<el-tag
type=
"success"
@
click=
"next()"
>
下一题
</el-tag>
<el-tag
type=
"success"
@
click=
"commit()"
>
结束考试
</el-tag>
-->
</li>
</li>
<li
class=
"second"
>
<li
class=
"second"
>
<el-tag>
题目解析:
</el-tag>
<el-tag>
题目解析:
</el-tag>
...
@@ -205,14 +216,14 @@
...
@@ -205,14 +216,14 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"operation"
>
<
!--
<
div
class=
"operation"
>
<ul
class=
"end"
>
<ul
class=
"end"
>
<li
@
click=
"previous()"
><i
class=
"iconfont icon-previous"
></i><span>
上一题
</span></li>
<li
@
click=
"previous()"
><i
class=
"iconfont icon-previous"
></i><span>
上一题
</span></li>
<li
@
click=
"commit()"
><i
class=
"iconfont icon-previous"
></i><span>
结束考试
</span>
<li
@
click=
"commit()"
><i
class=
"iconfont icon-previous"
></i><span>
结束考试
</span>
</li>
</li>
<li
@
click=
"next()"
><span>
下一题
</span></li>
<li
@
click=
"next()"
><span>
下一题
</span></li>
</ul>
</ul>
</div>
</div>
-->
</div>
</div>
</transition>
</transition>
</div>
</div>
...
@@ -286,7 +297,7 @@ export default {
...
@@ -286,7 +297,7 @@ export default {
//设置截止时间
//设置截止时间
var
endDate
=
new
Date
(
now
+
fiveMinutesInMillis
);
var
endDate
=
new
Date
(
now
+
fiveMinutesInMillis
);
this
.
end
=
endDate
.
getTime
();
this
.
end
=
endDate
.
getTime
();
this
.
countTime
()
//
this.countTime()
},
},
watch
:
{
watch
:
{
optionValue
(
newValue
)
{
optionValue
(
newValue
)
{
...
@@ -561,7 +572,7 @@ export default {
...
@@ -561,7 +572,7 @@ export default {
this
.
ischeckBox
=
true
this
.
ischeckBox
=
true
//保存学生答题选项
//保存学生答题选项
this
.
topic2Answer
[
this
.
index
]
=
this
.
checkList
this
.
topic2Answer
[
this
.
index
]
=
this
.
checkList
//
this.commit()
this
.
commit
()
// console.log(this.topic1Answer[this.index])
// console.log(this.topic1Answer[this.index])
// this.radio[this.index] = this.topic1Answer[this.index]
// this.radio[this.index] = this.topic1Answer[this.index]
// const dasd = this.radio[this.index]
// const dasd = this.radio[this.index]
...
@@ -587,7 +598,7 @@ export default {
...
@@ -587,7 +598,7 @@ export default {
}
}
/* 保存学生答题选项 */
/* 保存学生答题选项 */
this
.
topic1Answer
[
this
.
index
]
=
val
this
.
topic1Answer
[
this
.
index
]
=
val
//
this.commit()
this
.
commit
()
},
},
//获取判断题作答选项
//获取判断题作答选项
getJudgeLabel
(
val
)
{
getJudgeLabel
(
val
)
{
...
@@ -598,7 +609,7 @@ export default {
...
@@ -598,7 +609,7 @@ export default {
this
.
radioFlagPd
=
true
this
.
radioFlagPd
=
true
this
.
isradio
=
true
this
.
isradio
=
true
}
}
//
this.commit()
this
.
commit
()
},
},
previous
()
{
//上一题
previous
()
{
//上一题
...
@@ -718,17 +729,17 @@ export default {
...
@@ -718,17 +729,17 @@ export default {
}
}
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
$router
.
push
({
//
this.$router.push({
path
:
'/studentScore'
,
query
:
{
//
path: '/studentScore', query: {
score
:
finalScore
,
//
score: finalScore,
startTime
:
this
.
startTime
,
//
startTime: this.startTime,
endTime
:
this
.
endTime
,
//
endTime: this.endTime,
cid
:
this
.
$route
.
query
.
cid
,
//
cid: this.$route.query.cid,
cname
:
this
.
$route
.
query
.
cname
,
//
cname: this.$route.query.cname,
role
:
this
.
$route
.
query
.
role
//
role: this.$route.query.role
}
//
}
})
//
})
console
.
log
(
"
出总分数
"
)
console
.
log
(
"
已交卷
"
)
}
}
}).
catch
(()
=>
{
}).
catch
(()
=>
{
console
.
log
(
"继续答题"
)
console
.
log
(
"继续答题"
)
...
@@ -736,6 +747,7 @@ export default {
...
@@ -736,6 +747,7 @@ export default {
}
}
},
},
countTime
()
{
//倒计时
countTime
()
{
//倒计时
debugger
//获取当前时间
//获取当前时间
var
date
=
new
Date
();
var
date
=
new
Date
();
var
now
=
date
.
getTime
();
var
now
=
date
.
getTime
();
...
@@ -751,7 +763,7 @@ export default {
...
@@ -751,7 +763,7 @@ export default {
setTimeout
(
this
.
countTime
,
1000
);
setTimeout
(
this
.
countTime
,
1000
);
}
else
{
}
else
{
console
.
log
(
"考试时间已到,强制交卷。"
)
console
.
log
(
"考试时间已到,强制交卷。"
)
this
.
commit
();
//
this.commit();
}
}
}
}
},
},
...
@@ -899,6 +911,8 @@ export default {
...
@@ -899,6 +911,8 @@ export default {
.el-tag
{
.el-tag
{
background-color
:
#2776df
;
background-color
:
#2776df
;
color
:
white
;
color
:
white
;
font-size
:
24px
;
cursor
:
pointer
;
}
}
}
}
...
...
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