Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
transport-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
transport-show-h5
Commits
92279b93
提交
92279b93
authored
8月 14, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
答题安卓机卡优化
上级
cb75452d
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
60 行增加
和
34 行删除
+60
-34
ExamTopic.vue
src/modules/exam-module/src/ExamTopic.vue
+60
-34
没有找到文件。
src/modules/exam-module/src/ExamTopic.vue
浏览文件 @
92279b93
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
:key=
"dIndex+dItem.id"
:key=
"dIndex+dItem.id"
:data-dId=
"dItem.id"
:data-dId=
"dItem.id"
:data-cId=
"item.id"
:data-cId=
"item.id"
:indexs=
"dItem.num"
>
v-if=
"dItem.num
<
=
countPage
.
currentPage
*
countPage
.
showQuestionNum
&&
dItem
.
num
>
= countPage.currentPage * countPage.showQuestionNum - 20"
:data-num="dItem.num">
<!-- v-if="dItem.num
<
=
countPage
.
currentPage
*
countPage
.
showQuestionNum
&&
dItem
.
num
>
= countPage.currentPage * countPage.showQuestionNum - 20" -->
<!-- v-if="dItem.num
<
=
countPage
.
currentPage
*
countPage
.
showQuestionNum
&&
dItem
.
num
>
= countPage.currentPage * countPage.showQuestionNum - 20" -->
<div
class=
"title"
>
<div
class=
"title"
>
<div
class=
"type"
v-if=
"item.type == 1"
>
单选题
</div>
<div
class=
"type"
v-if=
"item.type == 1"
>
单选题
</div>
...
@@ -242,43 +243,49 @@ export default {
...
@@ -242,43 +243,49 @@ export default {
},
500
)
},
500
)
},
},
slideChangeTransitionStart
:
function
()
{
slideChangeTransitionStart
:
function
()
{
const
dataNum
=
this
.
slides
[
this
.
activeIndex
].
attributes
[
'data-num'
]
_this
.
sildesHeightCount
()
_this
.
sildesHeightCount
()
_this
.
setCurrentCollect
()
_this
.
setCurrentCollect
()
_this
.
getIsSign
()
_this
.
getIsSign
()
if
(
this
.
activeIndex
===
_this
.
questionsData
.
sheet
.
question_count
)
{
if
(
!
dataNum
)
{
_this
.
topicCard
.
isShow
=
true
_this
.
topicCard
.
isShow
=
true
}
else
{
}
else
{
_this
.
topicCard
.
isShow
=
false
_this
.
topicCard
.
isShow
=
false
}
}
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
_this
.
isAnalysis
=
false
_this
.
isAnalysis
=
false
_this
.
currentNum
=
this
.
activeIndex
+
1
dataNum
&&
(
_this
.
currentNum
=
parseInt
(
dataNum
.
nodeValue
))
_this
.
currentNum
===
_this
.
questionsData
.
sheet
.
question_count
?
_this
.
nextBtnShow
=
false
:
_this
.
nextBtnShow
=
true
_this
.
currentNum
===
_this
.
questionsData
.
sheet
.
question_count
?
_this
.
nextBtnShow
=
false
:
_this
.
nextBtnShow
=
true
_this
.
requestData
.
answerPage
=
this
.
activeIndex
dataNum
&&
(
_this
.
requestData
.
answerPage
=
parseInt
(
dataNum
.
nodeValue
))
},
},
slidePrevTransitionEnd
:
function
()
{
slidePrevTransitionEnd
:
function
()
{
// if (this.activeIndex === 0) {
if
(
this
.
activeIndex
===
this
.
slides
.
length
-
2
)
{
// _this.prevQuestionLoading()
for
(
let
i
=
0
;
i
<
this
.
slides
.
length
;
i
++
)
{
// }
if
(
this
.
slides
[
i
].
attributes
[
'data-num'
])
{
if
(
this
.
activeIndex
===
_this
.
questionsData
.
sheet
.
question_count
-
1
)
{
if
(
parseInt
(
this
.
slides
[
i
].
attributes
[
'data-num'
].
nodeValue
)
===
parseInt
(
_this
.
swiperSign
))
{
this
.
slideTo
(
_this
.
swiperSign
,
0
,
false
)
this
.
slideTo
(
i
,
0
,
false
)
_this
.
currentNum
=
this
.
activeIndex
+
1
}
}
}
_this
.
currentNum
=
parseInt
(
this
.
slides
[
this
.
activeIndex
].
attributes
[
'data-num'
].
nodeValue
)
_this
.
currentNum
===
_this
.
questionsData
.
sheet
.
question_count
?
_this
.
nextBtnShow
=
false
:
_this
.
nextBtnShow
=
true
_this
.
currentNum
===
_this
.
questionsData
.
sheet
.
question_count
?
_this
.
nextBtnShow
=
false
:
_this
.
nextBtnShow
=
true
_this
.
sildesHeightCount
()
_this
.
sildesHeightCount
()
_this
.
setCurrentCollect
()
_this
.
setCurrentCollect
()
_this
.
getIsSign
()
_this
.
getIsSign
()
}
else
{
if
(
this
.
activeIndex
===
0
&&
parseInt
(
this
.
slides
[
this
.
activeIndex
].
attributes
[
'data-num'
].
nodeValue
!==
1
))
{
_this
.
prevQuestionLoading
()
}
}
}
},
},
slideNextTransitionEnd
:
function
()
{
slideNextTransitionEnd
:
function
()
{
// if (this.activeIndex === this.slides.length - 2) {
const
dataNum
=
this
.
slides
[
this
.
activeIndex
].
attributes
[
'data-num'
]
// _this.nextQuestionLoading()
if
(
!
dataNum
)
{
// }
if
(
this
.
activeIndex
===
_this
.
questionsData
.
sheet
.
question_count
-
1
)
{
_this
.
swiperSign
=
_this
.
questionsData
.
sheet
.
question_count
-
1
}
if
(
this
.
activeIndex
===
_this
.
questionsData
.
sheet
.
question_count
)
{
_this
.
clickStatus
=
Date
.
parse
(
new
Date
())
_this
.
clickStatus
=
Date
.
parse
(
new
Date
())
_this
.
requestData
.
answerPage
=
_this
.
questionsData
.
sheet
.
question_count
-
1
}
else
{
if
(
this
.
activeIndex
===
this
.
slides
.
length
-
2
&&
parseInt
(
dataNum
.
nodeValue
)
!==
parseInt
(
_this
.
questionsData
.
sheet
.
question_count
))
{
_this
.
nextQuestionLoading
()
}
}
}
}
}
}
}
...
@@ -334,15 +341,23 @@ export default {
...
@@ -334,15 +341,23 @@ export default {
},
},
methods
:
{
methods
:
{
prevQuestionLoading
()
{
prevQuestionLoading
()
{
Toast
.
loading
({
message
:
'加载中...'
,
duration
:
1000
,
loadingType
:
'spinner'
})
const
dId
=
this
.
swiper
.
slides
[
this
.
swiper
.
activeIndex
].
attributes
[
'data-dId'
].
nodeValue
const
dId
=
this
.
swiper
.
slides
[
this
.
swiper
.
activeIndex
].
attributes
[
'data-dId'
].
nodeValue
if
(
this
.
countPage
.
currentPage
!==
1
)
{
this
.
countPage
.
currentPage
--
this
.
countPage
.
currentPage
--
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
for
(
let
i
=
0
;
i
<
this
.
swiper
.
slides
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
swiper
.
slides
.
length
;
i
++
)
{
if
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
])
{
if
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
])
{
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
].
nodeValue
===
dId
&&
(
this
.
swiper
.
slideTo
(
i
,
0
,
false
))
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
].
nodeValue
===
dId
&&
(
this
.
swiper
.
slideTo
(
i
,
0
,
false
))
}
}
this
.
currentNum
=
this
.
swiper
.
activeIndex
}
}
this
.
currentNum
=
parseInt
(
this
.
slides
[
this
.
activeIndex
].
attributes
[
'data-num'
].
nodeValue
)
Toast
.
clear
()
})
})
},
},
nextQuestionLoading
()
{
nextQuestionLoading
()
{
...
@@ -492,17 +507,24 @@ export default {
...
@@ -492,17 +507,24 @@ export default {
},
},
// 答题卡点击跳题
// 答题卡点击跳题
cardChange
(
data
)
{
cardChange
(
data
)
{
Toast
.
loading
({
message
:
'加载中...'
,
duration
:
3000
,
loadingType
:
'spinner'
})
const
e
=
data
.
id
const
e
=
data
.
id
this
.
countPage
.
currentPage
=
data
.
num
this
.
countPage
.
currentPage
=
data
.
num
+
1
for
(
let
i
=
0
;
i
<
this
.
questionsData
.
sheet
.
question_count
;
i
++
)
{
this
.
$nextTick
(()
=>
{
for
(
let
i
=
0
;
i
<
this
.
swiper
.
slides
.
length
;
i
++
)
{
if
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
])
{
if
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
].
nodeValue
===
e
)
{
if
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-dId'
].
nodeValue
===
e
)
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
this
.
swiper
.
slideTo
(
i
,
0
,
false
)
this
.
swiper
.
slideTo
(
i
,
0
,
false
)
this
.
topicCard
.
isShow
=
false
this
.
topicCard
.
isShow
=
false
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
requestData
.
answerPage
=
this
.
swiper
.
activeIndex
this
.
requestData
.
answerPage
=
this
.
swiper
.
slides
[
i
].
attributes
[
'data-num'
].
nodeValue
this
.
currentNum
=
this
.
swiper
.
activeIndex
+
1
this
.
currentNum
=
parseInt
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-num'
].
nodeValue
)
this
.
currentNum
===
this
.
questionsData
.
sheet
.
question_count
this
.
currentNum
===
this
.
questionsData
.
sheet
.
question_count
?
this
.
nextBtnShow
=
false
?
this
.
nextBtnShow
=
false
:
this
.
nextBtnShow
=
true
:
this
.
nextBtnShow
=
true
...
@@ -512,18 +534,17 @@ export default {
...
@@ -512,18 +534,17 @@ export default {
},
200
)
},
200
)
}
}
}
}
}
})
},
},
showCard
()
{
showCard
()
{
this
.
requestData
.
answerPage
=
this
.
swiper
.
activeIndex
const
dataNum
=
parseInt
(
this
.
swiper
.
slides
[
this
.
swiper
.
activeIndex
].
attributes
[
'data-num'
].
nodeValue
)
this
.
requestData
.
answerPage
=
dataNum
this
.
swiperSign
=
dataNum
this
.
clickStatus
=
Date
.
parse
(
new
Date
())
this
.
clickStatus
=
Date
.
parse
(
new
Date
())
if
(
this
.
swiper
.
activeIndex
!==
this
.
questionsData
.
sheet
.
question_count
)
{
this
.
swiperSign
=
this
.
swiper
.
activeIndex
}
else
{
this
.
swiperSign
=
this
.
swiper
.
activeIndex
-
1
}
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
document
.
getElementById
(
'bottom-view'
).
scrollTop
=
0
this
.
topicCard
.
isShow
=
true
this
.
topicCard
.
isShow
=
true
this
.
swiper
.
slideTo
(
this
.
questionsData
.
sheet
.
question_count
,
0
,
false
)
this
.
swiper
.
slideTo
(
this
.
swiper
.
slides
.
length
-
1
,
0
,
false
)
},
},
// 标记
// 标记
signQuestion
()
{
signQuestion
()
{
...
@@ -722,11 +743,16 @@ export default {
...
@@ -722,11 +743,16 @@ export default {
:
this
.
nextBtnShow
=
true
:
this
.
nextBtnShow
=
true
if
(
res
.
answers
!==
null
)
{
if
(
res
.
answers
!==
null
)
{
if
(
res
.
answers
.
answerPage
!==
undefined
&&
this
.
$route
.
query
.
id
===
undefined
&&
res
.
answers
.
answerPage
!==
this
.
questionsData
.
sheet
.
question_count
)
{
if
(
res
.
answers
.
answerPage
!==
undefined
&&
this
.
$route
.
query
.
id
===
undefined
&&
res
.
answers
.
answerPage
!==
this
.
questionsData
.
sheet
.
question_count
)
{
setTimeout
(()
=>
{
this
.
countPage
.
currentPage
=
parseInt
(
res
.
answers
.
answerPage
/
10
)
+
1
this
.
currentNum
=
res
.
answers
.
answerPage
+
1
this
.
$nextTick
(()
=>
{
this
.
swiper
.
slideTo
(
res
.
answers
.
answerPage
,
0
,
false
)
for
(
let
i
=
0
;
i
<
this
.
swiper
.
slides
.
length
;
i
++
)
{
if
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-num'
])
{
parseInt
(
this
.
swiper
.
slides
[
i
].
attributes
[
'data-num'
].
nodeValue
)
===
parseInt
(
res
.
answers
.
answerPage
)
&&
(
this
.
swiper
.
slideTo
(
i
,
0
,
false
))
}
}
this
.
currentNum
=
res
.
answers
.
answerPage
this
.
currentNum
===
this
.
questionsData
.
sheet
.
question_count
?
this
.
nextBtnShow
=
false
:
this
.
nextBtnShow
=
true
this
.
currentNum
===
this
.
questionsData
.
sheet
.
question_count
?
this
.
nextBtnShow
=
false
:
this
.
nextBtnShow
=
true
}
,
100
)
})
}
}
const
datas
=
res
.
answers
const
datas
=
res
.
answers
if
(
datas
.
length
===
0
)
{
if
(
datas
.
length
===
0
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论