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
587d9350
Commit
587d9350
authored
Sep 08, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4b09e673
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
166 deletions
+1
-166
Sort.vue
src/components/subject/Sort.vue
+0
-163
examPaper.vue
src/pages/exam/examPaper.vue
+1
-3
No files found.
src/components/subject/Sort.vue
deleted
100644 → 0
View file @
4b09e673
<
template
>
<!-- 单选题 -->
<view>
<view
class=
"item"
>
<view
class=
"name"
>
{{
changeNumToHan
(
data
.
GSortNum
+
1
)
}}
、
{{
data
.
GroupName
}}
</view
>
<view
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
<!--
<view>
{{
item1
.
Title
}}
</view>
-->
</view>
<view
v-for=
"(item2, index2, index3) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_wrap flex_start_center"
v-if=
"index2 === 0"
>
<view
v-for=
"(item3, index3) in item2"
:key=
"index3"
class=
"flex item3 flex_start_center"
>
<view
class=
"chooseNum"
:class=
"
{ myAnswer: item1.myAnswer.find((e) => e == item3.Name) }"
@click="change(index1, index2, index3)"
>
{{
item3
.
Name
}}
</view>
<view
class=
"chooseName"
@
click=
"change(index1, index2, index3)"
v-html=
"item3.Content"
></view>
</view>
</view>
<view
class=
"flex chooseName"
>
答案:
<view
v-for=
"(i, n) in item1.myAnswer"
:key=
"n"
style=
"margin: 0 10rpx"
>
{{
i
}}
</view>
</view>
</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
{
props
:
{
paperData
:
Object
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
[];
});
let
data
=
reactive
({
data
:
props
.
paperData
,
});
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
});
},
back
()
{
uni
.
navigateBack
();
},
//选题
change
(
index1
,
index2
,
index3
)
{
let
myAnswer
=
data
.
data
.
DetailsList
[
index1
].
myAnswer
;
let
res
=
data
.
data
.
DetailsList
[
index1
].
QuestionContentObj
[
index2
][
index3
].
Name
;
let
find
=
myAnswer
.
indexOf
(
res
);
if
(
find
==
-
1
)
{
myAnswer
.
push
(
res
);
}
else
{
myAnswer
.
splice
(
find
,
1
);
}
},
};
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
</
script
>
<
style
scoped
>
.name
{
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
color
:
#111111
;
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.item
{
margin-bottom
:
40
rpx
;
}
.item1
{
margin
:
25
rpx
0
;
align-items
:
center
;
}
.item2
{
/* padding-left: 25rpx;
margin: 30rpx 0; */
}
.item3
{
width
:
100%
;
padding-left
:
25
rpx
;
margin
:
20
rpx
0
;
}
.myAnswer
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
</
style
>
\ No newline at end of file
src/pages/exam/examPaper.vue
View file @
587d9350
...
...
@@ -271,7 +271,6 @@ import Dataquestion from "../../components/subject/Dataquestion.vue";
import
SortingProblem
from
"../../components/subject/SortingProblem.vue"
;
import
Connect
from
"../../components/subject/Connect.vue"
;
//"连线题"
import
SharingChoose
from
"../../components/subject/SharingChoose.vue"
import
Sort
from
"../../components/subject/Sort"
;
//"排序题"
export
default
{
components
:
{
SingleChoiceNumber
,
...
...
@@ -292,8 +291,7 @@ export default {
SortingProblem
,
EntryProblem
,
SharingChoose
,
Connect
,
Sort
,
Connect
},
setup
(
props
,
context
)
{
let
Gid
=
uni
.
getStorageSync
(
"userInfo"
).
Id
;
...
...
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