Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-exam-show
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-exam-show
Commits
43b579a0
提交
43b579a0
authored
11月 12, 2020
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
9cc398bf
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
167 行增加
和
57 行删除
+167
-57
base_api.js
src/api/base_api.js
+7
-1
answerCard.vue
src/components/exam/answerCard.vue
+2
-2
question.vue
src/components/exam/question.vue
+38
-18
examAnswer.vue
src/pages/exam/examAnswer.vue
+17
-3
confirmInfo.vue
src/pages/login/confirmInfo.vue
+97
-22
index.vue
src/pages/login/index.vue
+6
-11
没有找到文件。
src/api/base_api.js
浏览文件 @
43b579a0
...
@@ -87,7 +87,13 @@ export default class API {
...
@@ -87,7 +87,13 @@ export default class API {
if
(
res
.
code
===
'ECONNABORTED'
)
{
if
(
res
.
code
===
'ECONNABORTED'
)
{
err
=
new
Error
(
'网络超时,请稍后重试'
)
err
=
new
Error
(
'网络超时,请稍后重试'
)
}
else
if
(
res
.
response
)
{
}
else
if
(
res
.
response
)
{
res
.
response
.
data
.
code
===
0
?
err
=
res
.
response
.
data
:
err
=
new
Error
(
JSON
.
stringify
(
res
.
response
))
if
(
res
.
response
.
data
)
{
res
.
response
.
data
.
code
===
0
?
err
=
res
.
response
.
data
:
new
Error
(
JSON
.
stringify
(
res
.
response
))
}
else
if
(
res
.
response
.
status
===
500
)
{
err
=
new
Error
(
'网络超时,请稍后重试'
)
}
else
{
new
Error
(
JSON
.
stringify
(
res
.
response
))
}
}
else
{
}
else
{
err
=
new
Error
(
'msg:'
+
res
.
message
+
'stack:'
+
res
.
stack
)
err
=
new
Error
(
'msg:'
+
res
.
message
+
'stack:'
+
res
.
stack
)
err
.
code
=
500
err
.
code
=
500
...
...
src/components/exam/answerCard.vue
浏览文件 @
43b579a0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"shape"
>
<div
class=
"shape"
>
<img
:src=
"info.id_photo"
alt=
""
>
<img
:src=
"info.id_photo
? info.id_photo : 'https://zws-imgs-pub.ezijing.com/static/public/e0c63e4d4554f0852e1558426aad20d1.png'
"
alt=
""
>
</div>
</div>
<div
class=
"right"
>
<div
class=
"right"
>
<div
class=
"name"
>
{{
info
.
name
}}
</div>
<div
class=
"name"
>
{{
info
.
name
}}
</div>
...
@@ -137,7 +137,7 @@ export default {
...
@@ -137,7 +137,7 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
}
}
img
{
img
{
width
:
75px
;
width
:
100%
;
// transform: scale(1);
// transform: scale(1);
display
:
block
;
display
:
block
;
}
}
...
...
src/components/exam/question.vue
浏览文件 @
43b579a0
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
>
>
<div
@
click=
"changeOptions(questionData.question_item_type, questionData.question_item_id, questionData.id, item.id)"
>
<div
@
click=
"changeOptions(questionData.question_item_type, questionData.question_item_id, questionData.id, item.id)"
>
<div
class=
"icon"
></div>
<div
class=
"icon"
></div>
<div
class=
"txt"
>
{{
item
.
option
}}
</div>
<div
class=
"txt"
v-html=
"item.option"
>
</div>
</div>
</div>
</li>
</li>
</
template
>
</
template
>
...
@@ -75,15 +75,18 @@
...
@@ -75,15 +75,18 @@
</template>
</template>
<
script
>
<
script
>
import
action
from
'@action'
import
action
from
'@action'
import
Bus
from
'
../..
/components/common/bus.js'
import
Bus
from
'
@
/components/common/bus.js'
export
default
{
export
default
{
components
:
{
},
props
:
{
props
:
{
contentHeight
:
{
type
:
Number
,
default
:
()
=>
{}
},
contentHeight
:
{
type
:
Number
,
default
:
()
=>
{}
},
questionParams
:
{
type
:
Object
,
default
:
()
=>
{}
}
questionParams
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
},
data
()
{
data
()
{
return
{
return
{
questionData
:
{}
questionData
:
{},
clearTime
:
null
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -178,9 +181,23 @@ export default {
...
@@ -178,9 +181,23 @@ export default {
}
}
action
.
Exam
.
setCache
(
this
.
$route
.
params
.
examId
,
param
).
then
(
res
=>
{
action
.
Exam
.
setCache
(
this
.
$route
.
params
.
examId
,
param
).
then
(
res
=>
{
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
$alert
(
err
.
message
,
{
if
(
err
.
message
===
'网络超时,请稍后重试'
)
{
callback
:
action
=>
{}
this
.
$confirm
(
'网络异常,请保持网络通畅'
,
'提示'
,
{
})
confirmButtonText
:
'重新提交'
,
cancelButtonText
:
'退出考试'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
setCache
()
}).
catch
(()
=>
{
this
.
$router
.
replace
({
path
:
`/login/
${
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'examInfo'
)).
exam_id
}
`
})
})
}
else
{
this
.
$alert
(
err
.
message
,
{
callback
:
action
=>
{}
})
}
})
})
},
},
// 标记
// 标记
...
@@ -290,20 +307,23 @@ export default {
...
@@ -290,20 +307,23 @@ export default {
float
:
left
;
float
:
left
;
cursor
:
pointer
;
cursor
:
pointer
;
.icon
{
.icon
{
width
:
18px
;
width
:
18px
;
height
:
18px
;
height
:
18px
;
border
:
1px
solid
#999999
;
border
:
1px
solid
#999999
;
border-radius
:
50%
;
border-radius
:
50%
;
margin-top
:
3px
;
margin-top
:
3px
;
float
:
left
;
float
:
left
;
}
}
.txt
{
.txt
{
max-width
:
95%
;
max-width
:
95%
;
font-size
:
18px
;
font-size
:
18px
;
color
:
#222222
;
color
:
#222222
;
line-height
:
28px
;
line-height
:
28px
;
margin-left
:
10px
;
margin-left
:
10px
;
float
:
left
;
float
:
left
;
&
:
:
v-deep
p
{
margin
:
0
;
}
}
}
}
}
// .icon{
// .icon{
...
...
src/pages/exam/examAnswer.vue
浏览文件 @
43b579a0
...
@@ -124,9 +124,23 @@ export default {
...
@@ -124,9 +124,23 @@ export default {
})
})
window
.
sessionStorage
.
setItem
(
'showflag'
,
'true'
)
window
.
sessionStorage
.
setItem
(
'showflag'
,
'true'
)
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
$alert
(
err
.
message
,
{
if
(
err
.
message
===
'网络超时,请稍后重试'
)
{
callback
:
action
=>
{}
this
.
$confirm
(
'网络异常,请保持网络通畅'
,
'提示'
,
{
})
confirmButtonText
:
'重新提交'
,
cancelButtonText
:
'退出考试'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
endExamRequest
()
}).
catch
(()
=>
{
this
.
$router
.
replace
({
path
:
`/login/
${
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'examInfo'
)).
exam_id
}
`
})
})
}
else
{
this
.
$alert
(
err
.
message
,
{
callback
:
action
=>
{}
})
}
})
})
},
},
countDown
(
time
)
{
countDown
(
time
)
{
...
...
src/pages/login/confirmInfo.vue
浏览文件 @
43b579a0
...
@@ -7,17 +7,37 @@
...
@@ -7,17 +7,37 @@
<div
class=
"tit"
>
基本信息确认
</div>
<div
class=
"tit"
>
基本信息确认
</div>
<ul>
<ul>
<template
v-for=
"(item, index) in allForm"
>
<template
v-for=
"(item, index) in allForm"
>
<li
:key=
"index"
v-if=
"item.key != 'gender'"
>
<li
:key=
"index"
v-if=
"item.key == 'gender'"
>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<input
:type=
"typeInput(item.key)"
v-model=
"form[item.key]"
@
keydown=
"keydown($event)"
>
</li>
<li
:key=
"index"
v-else
>
<div
class=
"name"
>
性别
</div>
<div
class=
"name"
>
性别
</div>
<div
class=
"select-btn"
>
<div
class=
"select-btn"
>
<div
:class=
"form.gender == 1 && 'active'"
@
click=
"selectGender(1)"
>
男
</div>
<div
:class=
"form.gender == 1 && 'active'"
@
click=
"selectGender(1
, item.enabled_edit
)"
>
男
</div>
<div
:class=
"form.gender == 2 && 'active'"
@
click=
"selectGender(2)"
>
女
</div>
<div
:class=
"form.gender == 2 && 'active'"
@
click=
"selectGender(2
, item.enabled_edit
)"
>
女
</div>
</div>
</div>
</li>
</li>
<li
:key=
"index"
v-else-if=
"item.key == 'educational_background'"
>
<div
class=
"name"
>
学历
</div>
<el-select
v-model=
"form.educational_background"
placeholder=
"请选择"
style=
"width:100%"
v-if=
"item.enabled_edit"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-select
disabled
v-model=
"form.educational_background"
placeholder=
"请选择"
style=
"width:100%"
v-else
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
</li>
<li
:key=
"index"
v-else
>
<div
class=
"name"
>
{{
item
.
name
}}
</div>
<input
:type=
"typeInput(item.key)"
v-model=
"form[item.key]"
@
keydown=
"keydown($event)"
v-if=
"item.enabled_edit"
>
<input
:type=
"typeInput(item.key)"
v-model=
"form[item.key]"
@
keydown=
"keydown($event)"
disabled
v-else
>
</li>
</
template
>
</
template
>
</ul>
</ul>
<div
class=
"confirm-btn"
@
click=
"confirmInfo"
>
确定
</div>
<div
class=
"confirm-btn"
@
click=
"confirmInfo"
>
确定
</div>
...
@@ -27,7 +47,10 @@
...
@@ -27,7 +47,10 @@
<div
class=
"explain-box"
v-if=
"isTreaty"
>
<div
class=
"explain-box"
v-if=
"isTreaty"
>
<div
class=
"head"
>
{{ examInfo.name }}
</div>
<div
class=
"head"
>
{{ examInfo.name }}
</div>
<div
class=
"exp-text"
>
<div
class=
"exp-text"
>
<p>
为保证本考试的公平性和严肃性,本次考试将会:{{examInfo.config.promise_message}}
</p>
<div
class=
"t"
>
<div
class=
"fl"
>
为保证本考试的公平性和严肃性,本次考试将会:
</div>
<div
class=
"fl"
v-html=
"examInfo.config.promise_message"
>
为保证本考试的公平性和严肃性,本次考试将会:
</div>
</div>
<!-- <p v-html="examInfo.config.promise_message"></p> -->
<!-- <p v-html="examInfo.config.promise_message"></p> -->
</div>
</div>
<div
class=
"exp-btn"
>
<div
class=
"exp-btn"
>
...
@@ -47,9 +70,34 @@ export default {
...
@@ -47,9 +70,34 @@ export default {
return
{
return
{
sInfo
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'studentInfo'
)),
sInfo
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'studentInfo'
)),
examInfo
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'examInfo'
)),
examInfo
:
JSON
.
parse
(
window
.
sessionStorage
.
getItem
(
'examInfo'
)),
form
:
{},
form
:
{
educational_background
:
''
},
allForm
:
[],
allForm
:
[],
isTreaty
:
false
isTreaty
:
false
,
value
:
''
,
options
:
[
{
value
:
'专科'
,
label
:
'专科'
},
{
value
:
'本科'
,
label
:
'本科'
},
{
value
:
'硕士'
,
label
:
'硕士'
},
{
value
:
'博士'
,
label
:
'博士'
},
{
value
:
'其他'
,
label
:
'其他'
}
]
}
}
},
},
created
()
{
created
()
{
...
@@ -75,8 +123,16 @@ export default {
...
@@ -75,8 +123,16 @@ export default {
this
.
form
[
key
[
i
]]
=
''
this
.
form
[
key
[
i
]]
=
''
value
[
i
].
key
=
key
[
i
]
value
[
i
].
key
=
key
[
i
]
}
}
this
.
allForm
=
value
this
.
allForm
=
this
.
dataFilter
(
value
)
console
.
log
(
this
.
allForm
)
// console.log(this.form, '===')
// this.allForm = value
},
dataFilter
(
data
)
{
return
data
.
filter
(
item
=>
{
if
(
item
.
enabled_visible
)
{
return
item
}
})
},
},
// 禁止input输入空格
// 禁止input输入空格
keydown
(
event
)
{
keydown
(
event
)
{
...
@@ -110,16 +166,22 @@ export default {
...
@@ -110,16 +166,22 @@ export default {
return
countTime
return
countTime
},
},
// 选择男女
// 选择男女
selectGender
(
t
)
{
selectGender
(
t
,
isInput
)
{
this
.
form
.
gender
=
t
if
(
isInput
)
{
this
.
$forceUpdate
()
this
.
form
.
gender
=
t
console
.
log
(
this
.
form
)
this
.
$forceUpdate
()
console
.
log
(
this
.
form
)
}
},
},
// 默认信息获取
// 默认信息获取
defaultInto
()
{
defaultInto
()
{
const
key
=
Object
.
keys
(
this
.
form
)
const
key
=
Object
.
keys
(
this
.
form
)
key
.
map
(
item
=>
{
key
.
map
(
item
=>
{
this
.
form
[
item
]
=
this
.
sInfo
.
info
[
item
]
this
.
form
[
item
]
=
item
===
'age'
?
parseInt
(
this
.
sInfo
.
info
[
item
])
===
0
?
''
:
this
.
sInfo
.
info
[
item
]
:
this
.
sInfo
.
info
[
item
]
})
})
},
},
// 确认信息
// 确认信息
...
@@ -139,10 +201,17 @@ export default {
...
@@ -139,10 +201,17 @@ export default {
// 验证信息是否为空
// 验证信息是否为空
verification
()
{
verification
()
{
for
(
let
i
=
0
;
i
<
this
.
allForm
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
allForm
.
length
;
i
++
)
{
if
(
!
this
.
allForm
[
i
].
required
)
{
if
(
this
.
allForm
[
i
].
required
)
{
if
(
this
.
form
[
this
.
allForm
[
i
].
key
]
===
''
)
{
if
(
this
.
allForm
[
i
].
key
===
'educational_background'
)
{
this
.
$alert
(
'请完善信息'
)
if
(
this
.
form
.
educational_background
===
''
)
{
return
false
this
.
$alert
(
'请完善信息'
)
return
false
}
}
else
{
if
(
this
.
form
[
this
.
allForm
[
i
].
key
]
===
''
)
{
this
.
$alert
(
'请完善信息'
)
return
false
}
}
}
}
}
}
}
...
@@ -160,6 +229,7 @@ export default {
...
@@ -160,6 +229,7 @@ export default {
background-attachment
:fixed
;
background-attachment
:fixed
;
background-position
:
0
0
;
background-position
:
0
0
;
padding-bottom
:
100px
;
padding-bottom
:
100px
;
min-height
:
100%
;
}
}
.confirm-mian
{
.confirm-mian
{
width
:
100%
;
width
:
100%
;
...
@@ -180,6 +250,7 @@ export default {
...
@@ -180,6 +250,7 @@ export default {
padding-left
:
30px
;
padding-left
:
30px
;
}
}
.info-form
{
.info-form
{
height
:
max-content
;
margin-top
:
40px
;
margin-top
:
40px
;
width
:
400px
;
width
:
400px
;
background
:
#FFFFFF
;
background
:
#FFFFFF
;
...
@@ -278,11 +349,15 @@ export default {
...
@@ -278,11 +349,15 @@ export default {
padding
:
40px
40px
80px
;
padding
:
40px
40px
80px
;
margin
:
40px
auto
0
;
margin
:
40px
auto
0
;
margin-top
:
40px
;
margin-top
:
40px
;
p
{
.t
{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#222222
;
color
:
#222222
;
line-height
:
25px
;
line-height
:
25px
;
display
:
flex
;
&
:
:
v-deep
p
{
margin
:
0
;
}
}
}
}
}
.exp-btn
{
.exp-btn
{
...
...
src/pages/login/index.vue
浏览文件 @
43b579a0
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
:class=
"loginParam.is ? 'form prohibit' : 'form'"
>
<div
:class=
"loginParam.is ? 'form prohibit' : 'form'"
>
<div
class=
"tips"
>
{{
tips
}}
</div>
<div
class=
"tips"
>
{{
tips
}}
</div>
<!-- 您登录的次数已超过最大限制 -->
<!-- 您登录的次数已超过最大限制 -->
<input
type=
"
number
"
@
click=
"fullScreen"
v-model=
"examineeNumber"
placeholder=
"请输入准考证号"
v-show=
"!loginParam.is"
@
keydown=
"keydown($event)"
>
<input
type=
"
text
"
@
click=
"fullScreen"
v-model=
"examineeNumber"
placeholder=
"请输入准考证号"
v-show=
"!loginParam.is"
@
keydown=
"keydown($event)"
>
<input
type=
"text"
@
click=
"fullScreen"
placeholder=
"请输入准考证号"
readonly=
"readonly"
class=
"prohibit"
v-show=
"loginParam.is"
>
<input
type=
"text"
@
click=
"fullScreen"
placeholder=
"请输入准考证号"
readonly=
"readonly"
class=
"prohibit"
v-show=
"loginParam.is"
>
<div
class=
"btn"
@
click=
"login"
>
登录
</div>
<div
class=
"btn"
@
click=
"login"
>
登录
</div>
<!--
<div
class=
"btn prohibit"
>
登录
</div>
-->
<!--
<div
class=
"btn prohibit"
>
登录
</div>
-->
...
@@ -25,12 +25,6 @@
...
@@ -25,12 +25,6 @@
</div>
</div>
</div>
</div>
<div
class=
"welcome-msg mian-cont900"
v-if=
"data"
v-html=
"data.config.welcome_message"
></div>
<div
class=
"welcome-msg mian-cont900"
v-if=
"data"
v-html=
"data.config.welcome_message"
></div>
<!--
<my-dia
:title=
"title"
:prompt=
"prompt"
:isPopup=
"isPopup"
v-if=
"isPopup"
@
close=
"closePop"
>
<template
v-slot:button
>
<button
@
click=
"closePop"
>
我知道了
</button>
<button>
好的
</button>
</
template
>
</my-dia>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -131,7 +125,10 @@ export default {
...
@@ -131,7 +125,10 @@ export default {
},
},
// 禁止input输入空格
// 禁止input输入空格
keydown
(
event
)
{
keydown
(
event
)
{
event
.
keyCode
===
32
&&
(
event
.
returnValue
=
false
)
console
.
log
(
event
.
keyCode
)
if
(
event
.
keyCode
===
32
||
event
.
keyCode
===
187
)
{
event
.
returnValue
=
false
}
},
},
// 点击登录
// 点击登录
login
()
{
login
()
{
...
@@ -148,9 +145,7 @@ export default {
...
@@ -148,9 +145,7 @@ export default {
name
:
'confirmInfo'
name
:
'confirmInfo'
})
})
}
}
status
===
1
&&
(
this
.
$alert
(
'已提交考卷'
,
{
status
===
1
&&
(
this
.
$alert
(
'已提交考卷'
))
callback
:
action
=>
{}
}))
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
$alert
(
err
.
message
,
{
this
.
$alert
(
err
.
message
,
{
callback
:
action
=>
{}
callback
:
action
=>
{}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论