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
e3c3f71d
Commit
e3c3f71d
authored
Sep 09, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e0ca408a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
952 additions
and
886 deletions
+952
-886
Calculation.vue
src/components/subject/Calculation.vue
+189
-174
Dataquestion.vue
src/components/subject/Dataquestion.vue
+188
-178
EntryProblem.vue
src/components/subject/EntryProblem.vue
+193
-178
ListenTopic.vue
src/components/subject/ListenTopic.vue
+7
-4
easyQuestion.vue
src/components/subject/easyQuestion.vue
+189
-176
nounExplanation.vue
src/components/subject/nounExplanation.vue
+186
-176
No files found.
src/components/subject/Calculation.vue
View file @
e3c3f71d
<
template
>
<
template
>
<!-- 计算题 -->
<!-- 计算题 -->
<view>
<view>
<view
class=
"item"
style=
"padding:0 20px;"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color:#999999;"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
</view>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
<view>
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
</view>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<view>
</view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
</view>
>
/
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
</view>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
</view>
<view
class=
"item1"
>
<swiper
<view
class=
"flex flex_start_center"
>
class=
"swiper-box"
<view>
{{
index1
+
1
}}
、
</view>
:autoplay=
"autoplay"
<view
class=
"num"
v-html=
"item1.Title"
></view>
:current=
"current"
</view>
@
change=
"onchange"
<view
class=
"chooseName"
>
>
<textarea
type=
"text"
v-model=
"item1.myAnswer"
class=
"input textarea"
placeholder=
"请填写答案"
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<swiper-item
</view>
v-for=
"(item1, index1) in data.DetailsList"
</view>
:key=
"item1.id"
</swiper-item>
>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<view
class=
"item1"
>
</swiper>
<view
class=
"flex flex_start_center"
>
</view>
<view>
{{
index1
+
1
}}
、
</view>
<van-toast
id=
"van-toast"
/>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
class=
"chooseName"
>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
changeNumToHan
}
from
"../../utils/index"
;
changeNumToHan
export
default
{
}
from
"../../utils/index"
;
props
:
{
export
default
{
paperData
:
Object
,
props
:
{
sort
:
Number
,
paperData
:
Object
,
sortTotal
:
Number
,
sort
:
Number
,
isLast
:
Boolean
,
sortTotal
:
Number
,
},
isLast
:
Boolean
setup
(
props
,
context
)
{
},
let
{
ctx
}
=
getCurrentInstance
();
setup
(
props
,
context
)
{
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
let
{
ctx
}
=
getCurrentInstance
();
item
.
myAnswer
=
""
;
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
});
item
.
myAnswer
=
""
;
let
data
=
reactive
({
});
data
:
props
.
paperData
,
let
data
=
reactive
({
autoplay
:
false
,
data
:
props
.
paperData
,
sortIndex
:
props
.
sort
+
1
,
autoplay
:
false
,
sortTotal
:
props
.
sortTotal
,
sortIndex
:
props
.
sort
+
1
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
sortTotal
:
props
.
sortTotal
,
ExamIndex
:
1
,
//第几题
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
});
ExamIndex
:
1
,
//第几题
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
});
});
},
},
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onchange
(
e
)
{
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
'进入'
)
console
.
log
(
"进入"
);
this
.
$emit
(
'getAfterTopic'
);
this
.
$emit
(
"getAfterTopic"
);
}
}
if
(
e
.
detail
.
current
==
0
)
{
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
'getBeforeTopic'
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
}
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
})
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
font-weight
:
800
;
color
:
#111111
;
color
:
#111111
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#DA
7878
;
color
:
#da
7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/Dataquestion.vue
View file @
e3c3f71d
<
template
>
<
template
>
<!-- 计算题 -->
<!-- 资料题 -->
<view>
<view>
<view
class=
"item"
style=
"padding:0 20px;"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color:#999999;"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
</view>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
<view>
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
</view>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<view>
</view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
</view>
>
/
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
</view>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
</view>
<view
class=
"item1"
>
<swiper
<view
class=
"flex flex_start_center"
>
class=
"swiper-box"
<view>
{{
index1
+
1
}}
、
</view>
:autoplay=
"autoplay"
<view
class=
"num"
v-html=
"item1.Title"
></view>
:current=
"current"
</view>
@
change=
"onchange"
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
>
class=
"flex item2 flex_start_center"
>
<swiper-item></swiper-item>
<view
class=
"chooseName"
>
<swiper-item
<input
type=
"text"
v-model=
"item2.Content"
class=
"input"
/>
v-for=
"(item1, index1) in data.DetailsList"
</view>
:key=
"item1.id"
</view>
>
</view>
<view
class=
"item1"
>
</swiper-item>
<view
class=
"flex flex_start_center"
>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<view>
{{
index1
+
1
}}
、
</view>
</swiper>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<van-toast
id=
"van-toast"
/>
<view
</view>
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"index2"
class=
"flex item2 flex_start_center"
>
<view
class=
"chooseName"
>
<input
type=
"text"
v-model=
"item2.Content"
class=
"input"
/>
</view>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
changeNumToHan
}
from
"../../utils/index"
;
changeNumToHan
export
default
{
}
from
"../../utils/index"
;
props
:
{
export
default
{
paperData
:
Object
,
props
:
{
sort
:
Number
,
paperData
:
Object
,
sortTotal
:
Number
,
sort
:
Number
,
isLast
:
Boolean
,
sortTotal
:
Number
,
},
isLast
:
Boolean
setup
(
props
,
context
)
{
},
let
{
ctx
}
=
getCurrentInstance
();
setup
(
props
,
context
)
{
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
let
{
item
.
myAnswer
=
""
;
ctx
});
}
=
getCurrentInstance
();
let
data
=
reactive
({
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
data
:
props
.
paperData
,
item
.
myAnswer
=
""
;
autoplay
:
false
,
});
sortIndex
:
props
.
sort
+
1
,
let
data
=
reactive
({
sortTotal
:
props
.
sortTotal
,
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
autoplay
:
false
,
ExamIndex
:
1
,
//第几题
sortIndex
:
props
.
sort
+
1
,
});
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
});
});
},
},
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onchange
(
e
)
{
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
'进入'
)
console
.
log
(
"进入"
);
this
.
$emit
(
'getAfterTopic'
);
this
.
$emit
(
"getAfterTopic"
);
}
}
if
(
e
.
detail
.
current
==
0
)
{
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
'getBeforeTopic'
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
}
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
})
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
font-weight
:
800
;
color
:
#111111
;
color
:
#111111
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#DA
7878
;
color
:
#da
7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/EntryProblem.vue
View file @
e3c3f71d
<
template
>
<
template
>
<!-- 计算题 -->
<!-- 分录题 -->
<view>
<view>
<view
class=
"item"
style=
"padding:0 20px;"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color:#999999;"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
</view>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
<view>
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
</view>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<view>
</view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
</view>
>
/
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
</view>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
</view>
<view
class=
"item1"
>
<swiper
<view
class=
"flex flex_start_center"
>
class=
"swiper-box"
<view>
{{
index1
+
1
}}
、
</view>
:autoplay=
"autoplay"
<view
class=
"num"
v-html=
"item1.Title"
></view>
:current=
"current"
</view>
@
change=
"onchange"
<view
v-for=
"(item2, index2) in item1.QuestionContentObj"
:key=
"item2.id"
>
class=
"flex item2 flex_start_center"
>
<swiper-item></swiper-item>
<view
class=
"chooseName"
>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
<input
type=
"text"
v-model=
"item2.Content"
class=
"input"
/>
<view
class=
"item1"
>
</view>
<view
class=
"flex flex_start_center"
>
</view>
<view>
{{
index1
+
1
}}
、
</view>
</view>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</swiper-item>
</view>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<view
</swiper>
v-for=
"(item2, index2) in item1.QuestionContentObj"
</view>
:key=
"index2"
<van-toast
id=
"van-toast"
/>
class=
"flex item2 flex_start_center"
</view>
>
<view
class=
"chooseName"
>
<input
type=
"text"
v-model=
"item2.Content"
class=
"input"
@
input=
"input($event, item2)"
/>
</view>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
changeNumToHan
}
from
"../../utils/index"
;
changeNumToHan
export
default
{
}
from
"../../utils/index"
;
props
:
{
export
default
{
paperData
:
Object
,
props
:
{
sort
:
Number
,
paperData
:
Object
,
sortTotal
:
Number
,
sort
:
Number
,
isLast
:
Boolean
,
sortTotal
:
Number
,
},
isLast
:
Boolean
setup
(
props
,
context
)
{
},
let
{
ctx
}
=
getCurrentInstance
();
setup
(
props
,
context
)
{
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
let
{
item
.
myAnswer
=
""
;
ctx
});
}
=
getCurrentInstance
();
let
data
=
reactive
({
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
data
:
props
.
paperData
,
item
.
myAnswer
=
""
;
autoplay
:
false
,
});
sortIndex
:
props
.
sort
+
1
,
let
data
=
reactive
({
sortTotal
:
props
.
sortTotal
,
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
autoplay
:
false
,
ExamIndex
:
1
,
//第几题
sortIndex
:
props
.
sort
+
1
,
});
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
});
});
},
},
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onchange
(
e
)
{
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
'进入'
)
console
.
log
(
"进入"
);
this
.
$emit
(
'getAfterTopic'
);
this
.
$emit
(
"getAfterTopic"
);
}
}
if
(
e
.
detail
.
current
==
0
)
{
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
'getBeforeTopic'
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
}
},
};
input
(
e
,
i
)
{
onMounted
(()
=>
{
console
.
log
(
i
);
if
(
props
.
isLast
)
{
},
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
};
}
onMounted
(()
=>
{
})
if
(
props
.
isLast
)
{
let
that
=
methods
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
return
{
}
...
toRefs
(
data
),
});
...
methods
,
let
that
=
methods
;
};
return
{
},
...
toRefs
(
data
),
};
...
methods
,
};
},
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
font-weight
:
800
;
color
:
#111111
;
color
:
#111111
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#DA
7878
;
color
:
#da
7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/ListenTopic.vue
View file @
e3c3f71d
<
template
>
<
template
>
<!--
单选
题 -->
<!--
听力
题 -->
<view
class=
"listen"
>
<view
class=
"listen"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
:time=
"audioTime"
:time=
"audioTime"
:auto-start=
"false"
:auto-start=
"false"
class=
"flex flex_center_center"
class=
"flex flex_center_center"
style=
"color:#00acf9;"
ref=
"listenCountdown"
ref=
"listenCountdown"
format=
"mm:ss"
format=
"mm:ss"
/>
/>
...
@@ -157,7 +158,8 @@ export default {
...
@@ -157,7 +158,8 @@ export default {
isLast
:
Boolean
,
isLast
:
Boolean
,
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
let
{
refs
}
=
getCurrentInstance
();
let
{
refs
}
=
getCurrentInstance
();
let
data
=
reactive
({
let
data
=
reactive
({
autoplay
:
false
,
autoplay
:
false
,
sortIndex
:
props
.
sort
+
1
,
//大题序号
sortIndex
:
props
.
sort
+
1
,
//大题序号
...
@@ -183,6 +185,7 @@ export default {
...
@@ -183,6 +185,7 @@ export default {
}
}
});
});
});
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
...
@@ -212,7 +215,7 @@ export default {
...
@@ -212,7 +215,7 @@ export default {
if
(
data
.
isPlay
)
{
if
(
data
.
isPlay
)
{
innerAudioContext
.
play
();
innerAudioContext
.
play
();
// refs.listenCountdown.start();
// refs.listenCountdown.start();
console
.
log
(
"开始播放"
,
refs
);
console
.
log
(
"开始播放"
);
data
.
isPlay
=
false
data
.
isPlay
=
false
}
else
{
}
else
{
innerAudioContext
.
stop
();
innerAudioContext
.
stop
();
...
@@ -265,6 +268,7 @@ export default {
...
@@ -265,6 +268,7 @@ export default {
},
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
console
.
log
(
'refs'
,
refs
)
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
...
@@ -385,6 +389,5 @@ export default {
...
@@ -385,6 +389,5 @@ export default {
.listen
.van-count-down
{
.listen
.van-count-down
{
font-size
:
22
rpx
!important
;
font-size
:
22
rpx
!important
;
color
:
#00acf9
!important
;
color
:
#00acf9
!important
;
background-color
:
#000000
}
}
</
style
>
</
style
>
src/components/subject/easyQuestion.vue
View file @
e3c3f71d
<
template
>
<
template
>
<!-- 论述题 -->
<!-- 论述题 -->
<view>
<view>
<view
class=
"item"
style=
"padding:0 20px;"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color:#999999;"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
</view>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
<view>
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
</view>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<view>
</view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
</view>
>
/
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
</view>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
</view>
<view
class=
"item1"
>
<swiper
<view
class=
"flex flex_start_center"
>
class=
"swiper-box"
<view>
{{
index1
+
1
}}
、
</view>
:autoplay=
"autoplay"
<view
class=
"num"
v-html=
"item1.Title"
></view>
:current=
"current"
</view>
@
change=
"onchange"
<view
class=
"chooseName"
>
>
<textarea
type=
"text"
v-model=
"item1.myAnswer"
class=
"input textarea"
placeholder=
"请填写答案"
<swiper-item></swiper-item>
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<swiper-item
</view>
v-for=
"(item1, index1) in data.DetailsList"
</view>
:key=
"item1.id"
</swiper-item>
>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<view
class=
"item1"
>
</swiper>
<view
class=
"flex flex_start_center"
>
</view>
<view>
{{
index1
+
1
}}
、
</view>
<van-toast
id=
"van-toast"
/>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</view>
</view>
<view
class=
"chooseName"
>
<textarea
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
changeNumToHan
}
from
"../../utils/index"
;
changeNumToHan
export
default
{
}
from
"../../utils/index"
;
props
:
{
export
default
{
paperData
:
Object
,
props
:
{
sort
:
Number
,
paperData
:
Object
,
sortTotal
:
Number
,
sort
:
Number
,
isLast
:
Boolean
,
sortTotal
:
Number
,
},
isLast
:
Boolean
setup
(
props
,
context
)
{
},
let
{
ctx
}
=
getCurrentInstance
();
setup
(
props
,
context
)
{
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
let
{
item
.
myAnswer
=
""
;
ctx
});
}
=
getCurrentInstance
();
let
data
=
reactive
({
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
data
:
props
.
paperData
,
item
.
myAnswer
=
""
;
autoplay
:
false
,
});
sortIndex
:
props
.
sort
+
1
,
let
data
=
reactive
({
sortTotal
:
props
.
sortTotal
,
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
autoplay
:
false
,
ExamIndex
:
1
,
//第几题
sortIndex
:
props
.
sort
+
1
,
});
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
});
});
},
},
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onchange
(
e
)
{
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
'进入'
)
console
.
log
(
"进入"
);
this
.
$emit
(
'getAfterTopic'
);
this
.
$emit
(
"getAfterTopic"
);
}
}
if
(
e
.
detail
.
current
==
0
)
{
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
'getBeforeTopic'
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
}
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
})
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
font-weight
:
800
;
color
:
#111111
;
color
:
#111111
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#DA
7878
;
color
:
#da
7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
style
>
src/components/subject/nounExplanation.vue
View file @
e3c3f71d
<
template
>
<
template
>
<!-- 名词解释 -->
<!-- 名词解释 -->
<view>
<view>
<view
class=
"item"
style=
"padding:0 20px;"
>
<view
class=
"item"
style=
"padding: 0 20px"
>
<view
class=
"name"
>
<view
class=
"name"
>
<view>
<view>
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
{{
changeNumToHan
(
sortIndex
)
}}
、
{{
data
.
GroupName
}}
<text
style=
"color:#999999;"
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text>
<text
style=
"color: #999999"
</view>
>
(共
{{
data
.
DetailsList
.
length
}}
道,
{{
data
.
GScore
}}
分)
</text
<view>
>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text>
/
</view>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<view>
</view>
<text
class=
"Single_Before"
>
{{
ExamIndex
}}
</text
</view>
>
/
<swiper
class=
"swiper-box"
:autoplay=
"autoplay"
:current=
"current"
@
change=
"onchange"
>
<text
class=
"Exam_Total"
>
{{
data
.
DetailsList
.
length
}}
</text>
<swiper-item
v-if=
"sortIndex != 1"
></swiper-item>
</view>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"item1.id"
>
</view>
<view
class=
"item1"
>
<swiper
<view
class=
"flex flex_start_center"
>
class=
"swiper-box"
<view>
{{
index1
+
1
}}
、
</view>
:autoplay=
"autoplay"
<view
class=
"num"
v-html=
"item1.Title"
></view>
:current=
"current"
</view>
@
change=
"onchange"
<view
class=
"chooseName"
>
>
<textarea
type=
"text"
v-model=
"item1.myAnswer"
class=
"input textarea"
placeholder=
"请填写答案"
<swiper-item></swiper-item>
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
<swiper-item
v-for=
"(item1, index1) in data.DetailsList"
:key=
"index1"
>
</view>
<view
class=
"item1"
>
</view>
<view
class=
"flex flex_start_center"
>
</swiper-item>
<view>
{{
index1
+
1
}}
、
</view>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
<view
class=
"num"
v-html=
"item1.Title"
></view>
</swiper>
</view>
</view>
<view
class=
"chooseName"
>
<van-toast
id=
"van-toast"
/>
<textarea
</view>
type=
"text"
v-model=
"item1.Answer"
class=
"input textarea"
placeholder=
"请填写答案"
placeholder-style=
"textarea-placeholder"
:maxlength=
"-1"
/>
</view>
</view>
</swiper-item>
<swiper-item
v-if=
"sortIndex != sortTotal"
></swiper-item>
</swiper>
</view>
<van-toast
id=
"van-toast"
/>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
import
{
ref
,
ref
,
reactive
,
reactive
,
toRefs
,
toRefs
,
toRef
,
toRef
,
getCurrentInstance
,
getCurrentInstance
,
watch
,
watch
,
computed
,
computed
,
onMounted
,
onMounted
,
}
from
"vue"
;
}
from
"vue"
;
import
{
import
{
changeNumToHan
}
from
"../../utils/index"
;
changeNumToHan
export
default
{
}
from
"../../utils/index"
;
props
:
{
export
default
{
paperData
:
Object
,
props
:
{
sort
:
Number
,
paperData
:
Object
,
sortTotal
:
Number
,
sort
:
Number
,
isLast
:
Boolean
,
sortTotal
:
Number
,
},
isLast
:
Boolean
setup
(
props
,
context
)
{
},
let
{
ctx
}
=
getCurrentInstance
();
setup
(
props
,
context
)
{
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
let
{
item
.
myAnswer
=
""
;
ctx
});
}
=
getCurrentInstance
();
let
data
=
reactive
({
props
.
paperData
.
DetailsList
.
forEach
((
item
,
index
)
=>
{
data
:
props
.
paperData
,
item
.
myAnswer
=
""
;
autoplay
:
false
,
});
sortIndex
:
props
.
sort
+
1
,
let
data
=
reactive
({
sortTotal
:
props
.
sortTotal
,
data
:
props
.
paperData
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
autoplay
:
false
,
ExamIndex
:
1
,
//第几题
sortIndex
:
props
.
sort
+
1
,
});
sortTotal
:
props
.
sortTotal
,
current
:
1
,
//默认从第几个开始-用于从快捷菜单点入
ExamIndex
:
1
,
//第几题
});
let
methods
=
{
let
methods
=
{
changeNumToHan
,
changeNumToHan
,
jumpPage
()
{
jumpPage
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
"/pages/exam/examPaper"
,
url
:
"/pages/exam/examPaper"
,
});
});
},
},
back
()
{
back
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onchange
(
e
)
{
onchange
(
e
)
{
data
.
ExamIndex
=
e
.
detail
.
current
;
data
.
ExamIndex
=
e
.
detail
.
current
;
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
if
(
data
.
ExamIndex
===
data
.
data
.
DetailsList
.
length
+
1
)
{
console
.
log
(
'进入'
)
console
.
log
(
"进入"
);
this
.
$emit
(
'getAfterTopic'
);
this
.
$emit
(
"getAfterTopic"
);
}
}
if
(
e
.
detail
.
current
==
0
)
{
if
(
e
.
detail
.
current
==
0
)
{
this
.
$emit
(
'getBeforeTopic'
);
this
.
$emit
(
"getBeforeTopic"
);
}
}
}
},
};
};
onMounted
(()
=>
{
onMounted
(()
=>
{
if
(
props
.
isLast
)
{
if
(
props
.
isLast
)
{
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
data
.
current
=
props
.
paperData
.
DetailsList
.
length
;
}
}
})
});
let
that
=
methods
;
let
that
=
methods
;
return
{
return
{
...
toRefs
(
data
),
...
toRefs
(
data
),
...
methods
,
...
methods
,
};
};
},
},
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.name
{
.name
{
height
:
90
rpx
;
height
:
90
rpx
;
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
800
;
font-weight
:
800
;
color
:
#111111
;
color
:
#111111
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.Single_Before
{
.Single_Before
{
font-size
:
28
rpx
;
font-size
:
28
rpx
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#DA
7878
;
color
:
#da
7878
;
}
}
.swiper-box
{
.swiper-box
{
height
:
calc
(
100vh
-
270
rpx
);
height
:
calc
(
100vh
-
270
rpx
);
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.num
{
.num
{
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.item
{
.item
{
margin-bottom
:
40
rpx
;
margin-bottom
:
40
rpx
;
}
}
.item1
{
.item1
{
margin
:
25
rpx
0
;
margin
:
25
rpx
0
;
align-items
:
center
;
align-items
:
center
;
}
}
.item2
{
.item2
{
/* padding-left: 25rpx; */
/* padding-left: 25rpx; */
margin
:
30
rpx
0
;
margin
:
30
rpx
0
;
}
}
.choose
{
.choose
{
background-color
:
#00acf9
!important
;
background-color
:
#00acf9
!important
;
color
:
#ffffff
!important
;
color
:
#ffffff
!important
;
}
}
.chooseNum
{
.chooseNum
{
width
:
40
rpx
;
width
:
40
rpx
;
height
:
40
rpx
;
height
:
40
rpx
;
text-align
:
center
;
text-align
:
center
;
line-height
:
40
rpx
;
line-height
:
40
rpx
;
border-radius
:
50%
;
border-radius
:
50%
;
border
:
1px
solid
#e2e2e2
;
border
:
1px
solid
#e2e2e2
;
margin-right
:
30
rpx
;
margin-right
:
30
rpx
;
font-size
:
26
rpx
;
font-size
:
26
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#111111
;
color
:
#111111
;
}
}
.chooseName
{
.chooseName
{
font-size
:
24
rpx
;
font-size
:
24
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#111111
;
color
:
#111111
;
}
}
.input
{
.input
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
width
:
690
rpx
;
width
:
690
rpx
;
border-bottom
:
2
rpx
solid
#000
;
border-bottom
:
2
rpx
solid
#000
;
color
:
#000
;
color
:
#000
;
font-size
:
22
rpx
;
font-size
:
22
rpx
;
}
}
.textarea
{
.textarea
{
box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
20
rpx
0
;
padding
:
20
rpx
0
;
}
}
/
deep
/
.textarea-placeholder
{
/
deep
/
.textarea-placeholder
{
font-size
:
20
rpx
;
font-size
:
20
rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#cccccc
;
color
:
#cccccc
;
}
}
</
style
>
</
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