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
6083728c
Commit
6083728c
authored
Sep 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
376589b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
217 additions
and
180 deletions
+217
-180
SortingProblem.vue
src/components/subject/SortingProblem.vue
+197
-180
answerSheet.vue
src/pages/exam/answerSheet.vue
+20
-0
No files found.
src/components/subject/SortingProblem.vue
View file @
6083728c
<
template
>
<!-- 计算题 -->
<view>
<view
class=
"item"
style=
"padding:0 20px;
"
>
<view
class=
"item"
style=
"padding: 0 20px
"
>
<view
class=
"name"
>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color:#999999;"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
>
</view>
<view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
>
/
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
</view>
</view>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
<view
class=
"item1"
>
<view
class=
"flex flex_start_center"
>
<view>
{{
index1
+
1
}}
、
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
<view
class=
"chooseName"
>
<textarea
type=
"text"
v-model=
"item1.myAnswer"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<textarea
type=
"text"
v-model=
"item1.myAnswer"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</view>
</swiper-item>
...
...
@@ -34,7 +51,7 @@
</
template
>
<
script
>
import
{
import
{
ref
,
reactive
,
toRefs
,
...
...
@@ -43,21 +60,18 @@
watch
,
computed
,
onMounted
,
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
}
from
"vue"
;
import
{
changeNumToHan
}
from
"../../utils/index"
;
export
default
{
props
:
{
paperData
:
Object
,
sort
:
Number
,
sortTotal
:
Number
,
isLast
:
Boolean
isLast
:
Boolean
,
startIndex
:
Number
,
},
setup
(
props
,
context
)
{
let
{
ctx
}
=
getCurrentInstance
();
let
{
ctx
}
=
getCurrentInstance
();
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
item
.
myAnswer
=
""
;
});
...
...
@@ -69,7 +83,10 @@
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
});
if
(
props
.
startIndex
)
{
data
.
current
=
props
.
startIndex
;
data
.
ExamIndex
=
props
.
startIndex
;
}
let
methods
=
{
changeNumToHan
,
jumpPage
()
{
...
...
@@ -83,29 +100,29 @@
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
'进入'
)
this
.
$emit
(
'getAfterTopic'
);
console
.
log
(
"进入"
);
this
.
$emit
(
"getAfterTopic"
);
}
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
'getBeforeTopic'
);
}
this
.
$emit
(
"getBeforeTopic"
);
}
},
};
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
})
});
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
};
},
};
};
</
script
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
...
...
@@ -114,46 +131,46 @@
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.Exam_Total
{
}
.Exam_Total
{
font-size
:
25
rpx
;
color
:
gray
;
}
.Single_Before
{
}
.Single_Before
{
font-size
:
28
rpx
;
font-weight
:
bold
;
color
:
#DA
7878
;
}
.swiper-box
{
color
:
#da
7878
;
}
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
}
.num
{
}
.num
{
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
...
...
@@ -165,32 +182,32 @@
font-family
:
PingFang
SC
;
font-weight
:
bold
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:
#cccccc
;
}
}
</
style
>
src/pages/exam/answerSheet.vue
View file @
6083728c
...
...
@@ -39,6 +39,9 @@
</view>
</view>
</view>
<view
class=
"submitBox"
>
<view
class=
"submit"
>
立即提交
</view>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
...
...
@@ -154,4 +157,21 @@ export default {
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
}
.submitBox
{
width
:
750
rpx
;
height
:
100
rpx
;
background-color
:
#e2e2e2
;
}
.submit
{
width
:
600
rpx
;
height
:
50
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
;
}
</
style
>
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