Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
5c01bd3e
Commit
5c01bd3e
authored
Sep 10, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cacc5bb3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
18 deletions
+221
-18
answer.vue
src/components/subject/answer.vue
+203
-0
examPaper.vue
src/pages/exam/examPaper.vue
+18
-18
No files found.
src/components/subject/answer.vue
View file @
5c01bd3e
<
template
>
<view>
<van-nav-bar
fixed
>
<template
#
left
>
<van-icon
name=
"cross"
style=
"font-size: 32rpx; color: #111"
/>
</
template
>
<
template
#
title
>
<view
style=
"
font-size: 32rpx;
color: #111;
font-family: PingFang SC;
font-weight: 800;
"
>
答题卡
</view
>
</
template
>
</van-nav-bar>
<view
class=
"answer-sheets"
>
<view
v-for=
"(item, index) in questionList"
:key=
"index"
class=
"item"
>
<view
class=
"name"
>
{{ changeNumToHan(index + 1) }}、{{ item.GroupName }}
</view
>
<view
class=
"flex flex_wrap"
>
<view
v-for=
"(item1, index1) in item.DetailsList"
:key=
"index1"
class=
"flex flex_wrap"
>
<view
class=
"item1-1"
v-if=
"
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
>
{{ index1 + 1 }}.
</view
>
<view
class=
"item1"
v-else
@
click=
"jumpPage(index, index1)"
>
{{
index1 + 1
}}
</view>
<view
v-if=
"
item1.QuestionTypeKey === 'reading-comprehensio' ||
item1.QuestionTypeKey === 'listening'
"
class=
"flex flex_wrap"
>
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
>
<view
class=
"item1"
>
{{ index2 + 1 }}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submit"
>
立即提交
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</template>
<
script
>
import
{
ref
,
reactive
,
toRefs
,
toRef
,
getCurrentInstance
,
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
setup
()
{
let
paperData
=
uni
.
getStorageSync
(
"paperData"
);
console
.
log
(
66
,
paperData
);
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
data
=
reactive
({
msg
:
{
GuestId
:
Gid
,
PaperId
:
5
,
PublishId
:
1
},
questionList
:
paperData
.
Paper
.
GroupList
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
(
index
,
index1
)
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper?index="
+
index
+
"&&index1="
+
(
index1
+
1
),
});
},
// async getPaperDetail() {
// let res = await getPaperDetail(data.msg);
// if (res) {
// data.questionList = res.Data.Paper.GroupList;
// console.log(90, res.Data.Paper.GroupList);
// }
// },
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
// onLoad() {
// uni.setNavigationBarTitle({
// title: "答题卡",
// });
// },
};
</
script
>
<
style
scoped
>
.answer-sheets
{
box-sizing
:
border-box
;
padding
:
30
rpx
;
height
:
calc
(
100vh
-
300
rpx
);
overflow-y
:
auto
;
}
.name
,
.num
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
width
:
100
rpx
;
text-align
:
center
;
}
.item
{
margin-bottom
:
20
rpx
;
}
.item1-1
{
width
:
690
rpx
;
margin
:
22
rpx
0
0
0
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
600
;
color
:
#111111
;
}
.item1
{
width
:
44
rpx
;
height
:
44
rpx
;
border
:
1px
solid
#e2e2e2
;
border-radius
:
50%
;
margin
:
22
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
600
;
color
:
#111111
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
box-sizing
:
border-box
;
}
.item2
{
width
:
44
rpx
;
height
:
44
rpx
;
border
:
1px
solid
#e2e2e2
;
border-radius
:
50%
;
text-align
:
center
;
line-height
:
44
rpx
;
margin-right
:
55
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.submitBox
{
width
:
750
rpx
;
height
:
150
rpx
;
background-color
:
#e2e2e2
;
position
:
fixed
;
left
:
0
;
bottom
:
0
;
box-sizing
:
border-box
;
padding-top
:
40
rpx
;
}
.submit
{
width
:
600
rpx
;
height
:
70
rpx
;
border-radius
:
35
rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background-color
:
#00acf9
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#fff
;
margin
:
0
auto
;
}
</
style
>
src/pages/exam/examPaper.vue
View file @
5c01bd3e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view
style=
"height: 100rpx"
></view>
<view
style=
"height: 100rpx"
></view>
<van-nav-bar
fixed
>
<van-nav-bar
fixed
>
<template
#
left
>
<template
#
left
>
<van-icon
name=
"cross"
size=
"3
0
rpx"
@
click=
"back"
/>
<van-icon
name=
"cross"
size=
"3
2
rpx"
@
click=
"back"
/>
</
template
>
</
template
>
<
template
#
title
>
<
template
#
title
>
<view
class=
"flex"
style=
"justify-content: center"
@
click=
"start"
>
<view
class=
"flex"
style=
"justify-content: center"
@
click=
"start"
>
...
@@ -23,13 +23,13 @@
...
@@ -23,13 +23,13 @@
</view>
</view>
</
template
>
</
template
>
</van-nav-bar>
</van-nav-bar>
<view
class=
"exam-con"
>
<view
class=
"exam-con"
v-if=
"!isShowAnswer"
>
<view
v-for=
"(item, index) in peaperDetail.Paper.GroupList"
:key=
"index"
>
<view
v-for=
"(item, index) in peaperDetail.Paper.GroupList"
:key=
"index"
>
<i
<i
class=
"iconfont icon-caidanzu answerSheet"
class=
"iconfont icon-caidanzu answerSheet"
style=
"position:absolute;right:15px;top:85px;
"
style=
"position: absolute; right: 15px; top: 85px
"
@
click=
"jump
AnswerSheet"
@
click=
"show
AnswerSheet"
></i>
></i>
<!-- 数字单选题 -->
<!-- 数字单选题 -->
<SingleChoiceNumber
<SingleChoiceNumber
:startIndex=
"item.startIndex"
:startIndex=
"item.startIndex"
...
@@ -261,6 +261,9 @@
...
@@ -261,6 +261,9 @@
/>
/>
</view>
</view>
</view>
</view>
<view
class=
"answer-con"
v-if=
"isShowAnswer"
>
<Answer
:paperData=
"peaperDetail"
/>
</view>
<van-toast
id=
"van-toast"
/>
<van-toast
id=
"van-toast"
/>
</view>
</view>
</template>
</template>
...
@@ -299,6 +302,7 @@ import Dataquestion from "../../components/subject/Dataquestion.vue";
...
@@ -299,6 +302,7 @@ import Dataquestion from "../../components/subject/Dataquestion.vue";
import
SortingProblem
from
"../../components/subject/SortingProblem.vue"
;
import
SortingProblem
from
"../../components/subject/SortingProblem.vue"
;
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
SharingChoose
from
"../../components/subject/SharingChoose.vue"
;
import
SharingChoose
from
"../../components/subject/SharingChoose.vue"
;
import
Answer
from
"../../components/subject/answer.vue"
;
//答题卡
export
default
{
export
default
{
components
:
{
components
:
{
SingleChoiceNumber
,
SingleChoiceNumber
,
...
@@ -320,6 +324,7 @@ export default {
...
@@ -320,6 +324,7 @@ export default {
EntryProblem
,
EntryProblem
,
SharingChoose
,
SharingChoose
,
Connect
,
Connect
,
Answer
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
...
@@ -333,9 +338,10 @@ export default {
...
@@ -333,9 +338,10 @@ export default {
changeIndex
:
0
,
//大题序号
changeIndex
:
0
,
//大题序号
changeIndexSub
:
1
,
//小题序号
changeIndexSub
:
1
,
//小题序号
isLast
:
false
,
//用于判断是否从后往前翻
isLast
:
false
,
//用于判断是否从后往前翻
isShowAnswer
:
false
,
//是否显示答题卡
});
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
...
@@ -352,11 +358,6 @@ export default {
...
@@ -352,11 +358,6 @@ export default {
if
(
res
)
{
if
(
res
)
{
callback
(
res
);
callback
(
res
);
data
.
peaperDetail
=
res
.
Data
;
data
.
peaperDetail
=
res
.
Data
;
uni
.
setStorage
({
key
:
"paperData"
,
data
:
data
.
peaperDetail
,
});
// console.log(90, res.Data.Paper.GroupList);
}
}
},
},
//往后翻
//往后翻
...
@@ -369,11 +370,10 @@ export default {
...
@@ -369,11 +370,10 @@ export default {
this
.
changeIndex
--
;
this
.
changeIndex
--
;
this
.
isLast
=
true
;
this
.
isLast
=
true
;
},
},
jumpAnswerSheet
()
{
//显示答题卡
uni
.
navigateTo
({
showAnswerSheet
()
{
url
:
"/pages/exam/answerSheet"
,
data
.
isShowAnswer
=
true
;
});
},
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
console
.
log
(
366
,
data
.
peaperDetail
);
console
.
log
(
366
,
data
.
peaperDetail
);
...
...
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