Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-exam-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-exam-show
Commits
004db84a
提交
004db84a
authored
10月 28, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
考试开发
上级
c60e006e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
199 行增加
和
27 行删除
+199
-27
question.vue
src/components/exam/question.vue
+69
-22
examAnswer.vue
src/pages/exam/examAnswer.vue
+130
-5
没有找到文件。
src/components/exam/question.vue
浏览文件 @
004db84a
<
template
>
<div>
<template
v-if=
"true"
>
<!-- 单选多选判断题(题目描述dom结构一样,只那选项区分) -->
<template
v-if=
"questionData.type === 1 || questionData.type === 2 || questionData.type === 3"
>
<div
class=
"title"
>
<span>
1.
</span>
将以下5个句子重新排列组合,排列组合最连贯的是( )。
<span>
{{
questionData
.
orderNum
}}
.
</span>
{{
questionData
.
title
}}
</div>
<div
class=
"describe"
>
甘露寺正位于北固山,所以移徒这段漕路,势必要紧贴北固山与山根的顽石打交手战,这样的工程自非一日之功。甘露寺正位于北固山,所以移徒这段漕路,势必要紧贴北固山与山根的顽石打交手战,这样的工程自非一日之功。
</div>
<ul
class=
"check-option"
>
<!-- radio-option check-option -->
<li
class=
"active"
>
<div
class=
"icon"
></div>
<div
class=
"txt"
>
A.⑤④②③①
</div>
</li>
<li>
<div
class=
"icon"
></div>
<div
class=
"txt"
>
A.⑤④②③①
</div>
</li>
<li>
<div
class=
"icon"
></div>
<div
class=
"txt"
>
A.⑤④②③①
</div>
</li>
<li>
<div
class=
"icon"
></div>
<div
class=
"txt"
>
A.⑤④②③①
</div>
</li>
<div
class=
"describe"
v-html=
"questionData.des"
></div>
<ul
:class=
"questionData.type === 2 ? 'check-option' : 'radio-option'"
>
<template
v-for=
"(item, index) in questionData.opt"
>
<li
:key=
"index"
@
click=
"changeOptions(questionData.type, questionData.id, item.id)"
:class=
"questionParams.answerRecord[questionData.id]
? questionParams.answerRecord[questionData.id].answer.find(id =>
{ return id === item.id })
? 'active'
: ''
: ''"
>
<div
class=
"icon"
></div>
<div
class=
"txt"
>
{{
item
.
text
}}
</div>
</li>
</
template
>
</ul>
</template>
<
template
v-if=
"false"
>
<!-- 复合题 -->
<
template
v-if=
"questionData.type === 4"
>
<div
class=
"case-que"
>
<div
class=
"stem"
>
李克强在讲话中首先代表党中央、国务院,向受命名的地方和受表彰的单位与个人
表示热烈祝贺,向人民解放军指战员、武警官兵、民兵预备役人员、部队职工,向烈军
...
...
@@ -90,9 +90,54 @@
<
script
>
export
default
{
props
:
{
contentHeight
:
{
type
:
Number
,
default
:
()
=>
{}
}
contentHeight
:
{
type
:
Number
,
default
:
()
=>
{}
},
questionParams
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
questionData
:
{}
}
},
mounted
()
{
this
.
questionData
=
this
.
questionParams
.
list
[
this
.
questionParams
.
questionIndex
]
},
methods
:
{
changeOptions
(
type
,
id
,
cId
)
{
if
(
type
!==
2
)
{
this
.
questionParams
.
answerRecord
[
id
]
?
this
.
questionParams
.
answerRecord
[
id
].
answer
=
[
cId
]
:
(()
=>
{
this
.
questionParams
.
answeredCount
++
this
.
questionParams
.
answerRecord
[
id
]
=
{
answer
:
[
cId
]
}
})()
}
else
{
if
(
this
.
questionParams
.
answerRecord
[
id
])
{
const
optChack
=
this
.
questionParams
.
answerRecord
[
id
].
answer
.
findIndex
(
item
=>
{
return
item
===
cId
})
optChack
===
-
1
?
(()
=>
{
this
.
questionParams
.
answerRecord
[
id
].
answer
.
length
===
0
&&
(
this
.
questionParams
.
answeredCount
++
)
this
.
questionParams
.
answerRecord
[
id
].
answer
.
push
(
cId
)
})()
:
this
.
questionParams
.
answerRecord
[
id
].
answer
.
splice
(
optChack
,
1
)
this
.
questionParams
.
answerRecord
[
id
].
answer
.
length
===
0
&&
(
this
.
questionParams
.
answeredCount
--
)
}
else
{
this
.
questionParams
.
answeredCount
++
this
.
questionParams
.
answerRecord
[
id
]
=
{
answer
:
[
cId
]
}
}
}
this
.
$forceUpdate
()
}
},
computed
:
{
changeQuestionIndex
()
{
return
this
.
questionParams
.
questionIndex
}
},
watch
:
{
changeQuestionIndex
(
newV
,
oldV
)
{
this
.
questionData
=
this
.
questionParams
.
list
[
this
.
questionParams
.
questionIndex
]
console
.
log
(
this
.
questionData
)
}
}
}
</
script
>
...
...
@@ -120,6 +165,7 @@ export default {
margin
:
0
;
list-style
:
none
;
li
{
cursor
:
pointer
;
margin-bottom
:
20px
;
display
:
flex
;
align-items
:
center
;
...
...
@@ -130,6 +176,7 @@ export default {
border-radius
:
50%
;
}
.txt
{
width
:
95%
;
font-size
:
18px
;
color
:
#222222
;
line-height
:
18px
;
...
...
src/pages/exam/examAnswer.vue
浏览文件 @
004db84a
...
...
@@ -4,7 +4,7 @@
<div
class=
"head"
id=
"head-h"
>
<div
class=
"title"
>
全国统一高考试卷A
</div>
<div
class=
"right"
>
<div
class=
"count"
>
已答
1/100
</div>
<div
class=
"count"
>
已答
{{
questionParams
.
answeredCount
}}
/
{{
questionParams
.
list
.
length
+
1
}}
</div>
<div
class=
"time"
>
<div
class=
"icon"
></div>
<div
class=
"mun"
>
60:00
</div>
...
...
@@ -13,7 +13,10 @@
</div>
<div
class=
"exam-main"
:style=
"
{height: this.contentHeight + 'px'}">
<div
class=
"left"
>
<question
:contentHeight=
"contentHeight"
></question>
<question
:contentHeight=
"contentHeight"
:questionParams=
"questionParams"
></question>
</div>
<div
class=
"right"
>
<answer-card></answer-card>
...
...
@@ -21,8 +24,14 @@
</div>
<div
class=
"foot"
id=
"foot-h"
>
<div
class=
"exam-btn"
>
<div>
上一题
</div>
<div
class=
"active"
>
下一题
</div>
<div
@
click=
"changeIndex('prev')"
:class=
"this.questionParams.questionIndex !== 0 ? 'active' : ''"
>
上一题
</div>
<div
:class=
"questionParams.questionIndex !== questionParams.list.length - 1 ? 'active' : ''"
@
click=
"changeIndex('next')"
>
下一题
</div>
</div>
<div
class=
"rigth-btn"
>
<div
class=
"sign"
>
...
...
@@ -50,7 +59,114 @@ export default {
},
data
()
{
return
{
contentHeight
:
0
contentHeight
:
0
,
// 题的数据所需的参数
questionParams
:
{
answeredCount
:
0
,
// 用户选择的选项 --- 提交后台的数据
answerRecord
:
{},
// 当前题的下标
questionIndex
:
0
,
// 所有题
list
:
[
{
id
:
1
,
type
:
1
,
orderNum
:
'1'
,
title
:
'将以下5个句子重新排列组合:'
,
des
:
'①宋代《新唐书音训》云:“京口在润州城东北甘露寺侧。<br/>②这也就是李白《丁督护歌》中所描绘的“万人凿磐石,无由达江浒”的施工场面。<br/>③而要开辟一条通京口的新漕路却是十分艰辛的。<br/>④甘露寺正位于北固山,所以移徙这段漕路,势必要紧贴着北固山下与山根的顽石打交手战,这样的工程自非一日之功。<br/>⑤瓜洲浦成为便利的津渡是由于它正对南岸江边的京口,而京口的漕路是在开元二十五年齐浣迁润州后才兴修的,换句话说,旧漕路原来并不通京口。'
,
opt
:
[
{
id
:
1
,
text
:
'A、⑤④①③②'
},
{
id
:
2
,
text
:
'B、④①②③⑤'
},
{
id
:
3
,
text
:
'C、⑤③①④②'
},
{
id
:
4
,
text
:
'D、④①③②⑤'
}
]
},
{
id
:
2
,
type
:
2
,
orderNum
:
'2'
,
title
:
'下列关于国际税法内容的陈述,正确的有( )。'
,
des
:
'甘露寺正位于北固山,所以移徒这段漕路。'
,
opt
:
[
{
id
:
1
,
text
:
'A、国际避税的基本方式就是跨国纳税人通过错用或滥用有关国家税法、国际税收协定,利用它们的差别、漏洞、特例和缺陷,规避纳税主体和纳税客体的纳税义务,不纳税或少纳税。'
},
{
id
:
2
,
text
:
'B、税收情报交换是国际反避税的合作的主要内容'
},
{
id
:
3
,
text
:
'C、加强国际税收合作,防止国际避税和逃税,这是国际税收协定的基本内容'
},
{
id
:
4
,
text
:
'D、税收协定不能限制有关国家对跨国投资者提供更为优惠的税收待遇'
},
{
id
:
5
,
text
:
'E、税收协定可以干预协约国对税法的修订和调整'
}
]
},
{
id
:
3
,
type
:
3
,
orderNum
:
'3'
,
title
:
'八月十五是中秋节?'
,
des
:
'甘露寺正位于北固山,所以移徒这段漕路。'
,
opt
:
[
{
id
:
1
,
text
:
'A、正确'
},
{
id
:
2
,
text
:
'B、错误'
}
]
},
{
id
:
4
,
type
:
4
,
orderNum
:
'4'
,
title
:
'将以下5个句子重新排列组合'
,
des
:
'甘露寺正位于北固山,所以移徒这段漕路。'
,
opt
:
[
{
id
:
1
,
text
:
'选项A'
},
{
id
:
2
,
text
:
'选项B'
},
{
id
:
3
,
text
:
'选项C'
},
{
id
:
4
,
text
:
'选项D'
}
]
}
]
}
}
},
mounted
()
{
...
...
@@ -59,6 +175,14 @@ export default {
methods
:
{
getDom
(
id
)
{
return
document
.
getElementById
(
id
)
},
changeIndex
(
type
)
{
if
(
type
===
'prev'
)
{
this
.
questionParams
.
questionIndex
>
0
&&
(
this
.
questionParams
.
questionIndex
--
)
}
else
{
this
.
questionParams
.
questionIndex
!==
this
.
questionParams
.
list
.
length
-
1
&&
(
this
.
questionParams
.
questionIndex
++
)
console
.
log
(
this
.
questionParams
.
questionIndex
)
}
}
}
}
...
...
@@ -144,6 +268,7 @@ export default {
.exam-btn
{
display
:
flex
;
padding-left
:
40px
;
cursor
:
pointer
;
div
{
width
:
100px
;
height
:
40px
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论