Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_studentHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_studentHome
Commits
e229ada9
提交
e229ada9
authored
3月 11, 2023
作者:
zfl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
试题提交
上级
91444907
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
117 行增加
和
64 行删除
+117
-64
index.vue
src/components/TestInfo/index.vue
+6
-7
index.vue
src/views/login/index.vue
+22
-13
index.vue
src/views/personal/index.vue
+11
-3
index.vue
src/views/test-result/index.vue
+47
-6
index.vue
src/views/upload-result/index.vue
+31
-35
没有找到文件。
src/components/TestInfo/index.vue
浏览文件 @
e229ada9
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
>
>
<span
class=
"test_info"
<span
class=
"test_info"
>
证件号
<span
class=
"test_info_show"
>
{{
>
证件号
<span
class=
"test_info_show"
>
{{
user_info
.
idcard
user_info
.
idcard
.
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
}}
<
/span></
span
}}
<
/span></
span
>
>
<
span
class
=
"test_info"
<
span
class
=
"test_info"
...
@@ -64,12 +64,12 @@
...
@@ -64,12 +64,12 @@
<
div
<
div
v
-
for
=
"(item, index) in data_keys"
v
-
for
=
"(item, index) in data_keys"
:
key
=
"index"
:
key
=
"index"
class=
"info_unit"
class
=
"info_unit"
v
-
if
=
"item.key"
v
-
show
=
"examination_questions_info[item.key]"
v
-
show
=
"examination_questions_info[item.key]"
>
>
<
span
class
=
"test_info"
>
{{
item
.
label
}}
<
/span
>
<
span
class
=
"test_info"
>
{{
item
.
label
}}
<
/span
>
<
span
class
=
"test_info_show"
>
{{
<
span
class
=
"test_info_show"
>
{{
examination_questions_info
[
item
.
key
]
||
'暂无'
item
.
key
==
'idcard'
?
examination_questions_info
[
item
.
key
].
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
:(
examination_questions_info
[
item
.
key
]
||
'暂无'
)
}}
<
/span
>
}}
<
/span
>
<
/div
>
<
/div
>
<
/el-card
>
<
/el-card
>
...
@@ -110,9 +110,6 @@ export default {
...
@@ -110,9 +110,6 @@ export default {
this
.
examination_questions_info
=
{
...
this
.
testdata
}
;
this
.
examination_questions_info
=
{
...
this
.
testdata
}
;
}
,
}
,
mounted
()
{
mounted
()
{
// console.log(this.user_info);
// console.log(secondsToMinutes(timer));
// console.log(this.testdata.const_down);
this
.
time
=
secondsToMinutes
(
this
.
testdata
.
const_down
);
this
.
time
=
secondsToMinutes
(
this
.
testdata
.
const_down
);
this
.
countDownTimer
();
this
.
countDownTimer
();
}
,
}
,
...
@@ -122,10 +119,12 @@ export default {
...
@@ -122,10 +119,12 @@ export default {
}
,
}
,
countDownTimer
()
{
countDownTimer
()
{
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
testdata
.
const_down
)
{
if
(
this
.
testdata
.
const_down
>
0
)
{
this
.
time
=
secondsToMinutes
(
this
.
testdata
.
const_down
--
);
this
.
time
=
secondsToMinutes
(
this
.
testdata
.
const_down
--
);
if
(
parseInt
(
this
.
testdata
.
const_down
/
10
)
==
this
.
testdata
.
const_down
/
10
){
this
.
$emit
(
'sub'
,
false
,
false
);
}
}
else
{
}
else
{
clearTimeout
(
this
.
timer
);
clearTimeout
(
this
.
timer
);
this
.
$emit
(
'sub'
,
true
,
true
);
}
}
}
,
1000
);
}
,
1000
);
}
,
}
,
...
...
src/views/login/index.vue
浏览文件 @
e229ada9
...
@@ -29,12 +29,12 @@
...
@@ -29,12 +29,12 @@
<el-form-item
prop=
"username"
>
<el-form-item
prop=
"username"
>
<!-- 手机号 -->
<!-- 手机号 -->
<div>
<div>
<p
style=
"font-weight: bold"
class=
"pointer"
>
手机号
</p>
<p
style=
"font-weight: bold"
class=
"pointer"
>
邮箱
</p>
<div>
<div>
<el-input
<el-input
ref=
"username"
ref=
"username"
v-model=
"loginForm.phone"
v-model=
"loginForm.phone"
placeholder=
"输入
手机号
"
placeholder=
"输入
邮箱
"
name=
"username"
name=
"username"
type=
"text"
type=
"text"
tabindex=
"1"
tabindex=
"1"
...
@@ -53,9 +53,6 @@
...
@@ -53,9 +53,6 @@
prop=
"password"
prop=
"password"
style=
"padding-right: 10px"
style=
"padding-right: 10px"
>
>
<!--
-->
<el-input
<el-input
:key=
"passwordType"
:key=
"passwordType"
ref=
"password"
ref=
"password"
...
@@ -79,7 +76,7 @@
...
@@ -79,7 +76,7 @@
@
click=
"sendMessage"
@
click=
"sendMessage"
type=
"warning"
type=
"warning"
style=
"background-color: #e6a23c"
style=
"background-color: #e6a23c"
>
发送短信
</el-button
>
{{
timer
?(
time
+
'秒'
):
"获取验证码"
}}
</el-button
>
>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -104,7 +101,7 @@
...
@@ -104,7 +101,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
validUsername
}
from
'@/utils/validate'
;
import
{
validUsername
,
validEmail
}
from
'@/utils/validate'
;
import
SocialSign
from
'./components/SocialSignin'
;
import
SocialSign
from
'./components/SocialSignin'
;
import
{
getCode
}
from
'@/api/user.js'
;
import
{
getCode
}
from
'@/api/user.js'
;
export
default
{
export
default
{
...
@@ -112,14 +109,14 @@ export default {
...
@@ -112,14 +109,14 @@ export default {
components
:
{
SocialSign
},
components
:
{
SocialSign
},
data
()
{
data
()
{
const
validateUsername
=
(
rule
,
value
,
callback
)
=>
{
const
validateUsername
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
valid
Username
(
value
))
{
if
(
!
valid
Email
(
value
))
{
callback
(
new
Error
(
'
手机
号错误,请重新输入'
));
callback
(
new
Error
(
'
邮箱
号错误,请重新输入'
));
}
else
{
}
else
{
callback
();
callback
();
}
}
};
};
const
validatePassword
=
(
rule
,
value
,
callback
)
=>
{
const
validatePassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<
6
)
{
if
(
value
.
length
<
4
)
{
callback
(
new
Error
(
'验证码错误,请重新输入'
));
callback
(
new
Error
(
'验证码错误,请重新输入'
));
}
else
{
}
else
{
callback
();
callback
();
...
@@ -147,6 +144,8 @@ export default {
...
@@ -147,6 +144,8 @@ export default {
showDialog
:
false
,
showDialog
:
false
,
redirect
:
undefined
,
redirect
:
undefined
,
otherQuery
:
{},
otherQuery
:
{},
timer
:
null
,
time
:
60
,
};
};
},
},
watch
:
{
watch
:
{
...
@@ -175,6 +174,18 @@ export default {
...
@@ -175,6 +174,18 @@ export default {
// window.removeEventListener('storage', this.afterQRScan)
// window.removeEventListener('storage', this.afterQRScan)
},
},
methods
:
{
methods
:
{
countDown
(){
this
.
time
-=
1
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
time
>
0
)
{
this
.
time
-=
1
}
else
{
this
.
time
=
60
clearTimeout
(
this
.
timer
);
this
.
timer
=
null
}
},
1000
);
},
checkCapslock
(
e
)
{
checkCapslock
(
e
)
{
const
{
key
}
=
e
;
const
{
key
}
=
e
;
this
.
capsTooltip
=
key
&&
key
.
length
===
1
&&
key
>=
'A'
&&
key
<=
'Z'
;
this
.
capsTooltip
=
key
&&
key
.
length
===
1
&&
key
>=
'A'
&&
key
<=
'Z'
;
...
@@ -272,11 +283,9 @@ export default {
...
@@ -272,11 +283,9 @@ export default {
// }
// }
// }
// }
sendMessage
()
{
sendMessage
()
{
console
.
log
(
'触发'
);
getCode
({
email
:
this
.
loginForm
.
phone
}).
then
((
res
)
=>
{
getCode
({
email
:
this
.
loginForm
.
phone
}).
then
((
res
)
=>
{
console
.
log
(
'验证码'
);
console
.
log
(
res
);
this
.
loginForm
.
eamil_key
=
res
.
key
||
null
;
this
.
loginForm
.
eamil_key
=
res
.
key
||
null
;
this
.
countDown
()
});
});
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
ruleForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
src/views/personal/index.vue
浏览文件 @
e229ada9
...
@@ -146,8 +146,8 @@
...
@@ -146,8 +146,8 @@
{{
item
.
examination_questions_title
}}
{{
item
.
examination_questions_title
}}
</h3>
</h3>
<span
<span
>
开考
时间:
{{
>
考试
时间:
{{
item
.
examination_questions
.
begin_dat
e
item
.
answer_tim
e
}}
</span
}}
</span
>
>
</div>
</div>
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<div
class=
"score_box"
>
<div
class=
"score_box"
>
<span
style=
"margin-left: 30px"
>
成绩:
</span>
<span
style=
"margin-left: 30px"
>
成绩:
</span>
<span
style=
"font-size: 48px; font-weight: bold"
>
{{
<span
style=
"font-size: 48px; font-weight: bold"
>
{{
item
.
examination_questions
.
score
item
.
score
}}
</span>
}}
</span>
</div>
</div>
<div
style=
"border-left: 1px solid #f4d6a9"
>
<div
style=
"border-left: 1px solid #f4d6a9"
>
...
@@ -164,6 +164,7 @@
...
@@ -164,6 +164,7 @@
item.examination_questions.status == 4 &&
item.examination_questions.status == 4 &&
item.status == 3
item.status == 3
"
"
@
click=
"route(item)"
type=
"warning"
type=
"warning"
class=
"finish_btn"
class=
"finish_btn"
>
查看
>
查看
...
@@ -259,6 +260,13 @@ export default {
...
@@ -259,6 +260,13 @@ export default {
// );
// );
},
},
methods
:
{
methods
:
{
route
(
row
){
this
.
$router
.
push
({
path
:
'/analysis'
,
query
:
{
id
:
row
.
id
,},
});
},
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
},
...
...
src/views/test-result/index.vue
浏览文件 @
e229ada9
...
@@ -11,11 +11,28 @@
...
@@ -11,11 +11,28 @@
<img
src=
"image/Frame.png"
/>
<img
src=
"image/Frame.png"
/>
</div>
</div>
<div
class=
"result_container"
>
<div
class=
"result_container"
>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
v-if=
"test_result.examination_questions_title"
>
<h2>
**中烟评级技能提升甩把测试
</h2>
<h2>
{{
test_result
.
examination_questions_title
}}
</h2>
<div
class=
"tag_warning"
>
标签四
</div>
<p
style=
"text-align: center;padding:20px 0px;"
>
<span
style=
"padding-left:23px;"
>
用户名
{{
test_result
.
name
}}
</span>
<span
style=
"padding-left:23px;"
>
证件号
{{
test_result
.
idcard
.
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
}}
<
/span
>
<
span
style
=
"padding-left:23px;"
>
考试开始时间
{{
test_result
.
begin_answer_time
}}
<
/span
>
<
span
style
=
"padding-left:23px;"
>
时长
{{
test_result
.
examination_questions
.
duration
}}
分
<
/span
>
<
/p
>
<
div
class
=
"tag_warning"
>
<
el
-
row
style
=
"text-align: center;"
>
<
el
-
col
:
span
=
"12"
>
<
p
style
=
"padding:20px 0px;"
>
本次考试成绩
<
/p
>
<
p
style
=
"font-size: 24px;color:rgb(225, 76, 76)"
>
{{
test_result
.
score
}}
<
/p
>
<
/el-col
>
<
el
-
col
:
span
=
"12"
>
<
p
style
=
"padding:20px 0px;"
>
用时(分钟)
<
/p
>
<
p
style
=
"font-size: 24px;"
>
{{
secondsToMinutesfun
(
test_result
.
answer_duration
)
}}
<
/p
>
<
/el-col
>
<
/el-row
>
<
/div
>
<
div
class
=
"back_btn"
>
<
div
class
=
"back_btn"
>
<el-button
@
click
.
native=
"start"
type=
"primary"
>
返回首页
</el-button>
<
el
-
button
style
=
"padding:10px 40px"
@
click
.
native
=
"start"
type
=
"primary"
>
返回首页
<
/el-button
>
<
/div
>
<
/div
>
<
/el-card
>
<
/el-card
>
<
/div
>
<
/div
>
...
@@ -23,11 +40,36 @@
...
@@ -23,11 +40,36 @@
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
secondsToMinutes
}
from
'@/utils/tool'
;
import
{
getResultsData
}
from
'@/api/user'
;
export
default
{
export
default
{
name
:
''
,
name
:
''
,
data
()
{
data
()
{
return
{};
return
{
result_id
:
null
,
test_result
:{
}
,
}
;
}
,
created
()
{
this
.
result_id
=
this
.
$route
.
query
.
id
;
}
,
mounted
()
{
this
.
getTestData
();
}
,
methods
:
{
start
(){
this
.
$router
.
push
({
path
:
'/personal'
}
);
}
,
}
,
secondsToMinutesfun
(
time
){
return
secondsToMinutes
(
time
)
}
,
getTestData
()
{
getResultsData
(
this
.
result_id
).
then
((
res
)
=>
{
this
.
test_result
=
res
}
);
}
,
}
}
;
}
;
<
/script
>
<
/script
>
...
@@ -49,7 +91,6 @@ export default {
...
@@ -49,7 +91,6 @@ export default {
text
-
align
:
center
;
text
-
align
:
center
;
width
:
160
px
;
width
:
160
px
;
height
:
40
px
;
height
:
40
px
;
background-color
:
#00a580
;
}
}
.
tag_warning
{
.
tag_warning
{
width
:
380
px
;
width
:
380
px
;
...
...
src/views/upload-result/index.vue
浏览文件 @
e229ada9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<
template
>
<
template
>
<div>
<div>
<test-info
v-if=
"test_card_info
"
:testdata=
"test_card_info
"
></test-info>
<test-info
v-if=
"test_card_info
.title"
:testdata=
"test_card_info"
@
sub=
"sub
"
></test-info>
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<el-row
v-if=
"false"
>
<el-row
v-if=
"false"
>
<el-col
:span=
"15"
>
<el-col
:span=
"15"
>
...
@@ -29,7 +29,10 @@
...
@@ -29,7 +29,10 @@
<el-row
class=
"box_card_header"
v-if=
"true"
>
<el-row
class=
"box_card_header"
v-if=
"true"
>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
>
<div
class=
"grid-content"
>
<div
class=
"grid-content"
>
<h3
class=
"photo_header_title"
>
考试结果
</h3>
<div>
<h3
class=
"photo_header_title"
style=
"display: inline-block;"
>
考试结果
</h3>
<el-button
type=
"primary"
@
click=
"sub(false)"
style=
"float:right;"
>
保存
</el-button>
</div>
<div
class=
"list_container"
>
<div
class=
"list_container"
>
<el-row>
<el-row>
<template>
<template>
...
@@ -111,9 +114,7 @@
...
@@ -111,9 +114,7 @@
:headers=
"headers"
:headers=
"headers"
:show-file-list=
"false"
:show-file-list=
"false"
>
>
<el-button
type=
"primary"
style=
"margin-left: 159px"
<el-button
type=
"primary"
style=
"margin-left: 159px"
>
重新上传
</el-button>
>
重新上传
</el-button
>
</el-upload>
</el-upload>
<!-- <el-upload
<!-- <el-upload
...
@@ -160,9 +161,7 @@
...
@@ -160,9 +161,7 @@
</el-col>
</el-col>
</el-row>
</el-row>
<div
class=
"btn_upload_result"
>
<div
class=
"btn_upload_result"
>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"sub()"
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"sub()"
>
提交
</el-button>
>
提交
</el-button
>
</div>
</div>
</el-card>
</el-card>
</div>
</div>
...
@@ -187,6 +186,7 @@ export default {
...
@@ -187,6 +186,7 @@ export default {
result_id
:
null
,
result_id
:
null
,
imgrul
:
null
,
imgrul
:
null
,
test_card_info
:
{},
test_card_info
:
{},
is_force
:
false
,
};
};
},
},
created
()
{
created
()
{
...
@@ -194,42 +194,38 @@ export default {
...
@@ -194,42 +194,38 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
user_info
=
this
.
$store
.
state
.
user
.
user
;
this
.
user_info
=
this
.
$store
.
state
.
user
.
user
;
// console.log(getToken());
// this.getListData();
this
.
getTestData
();
this
.
getTestData
();
// this.splitArr();
// this.getResults();
},
},
methods
:
{
methods
:
{
sub
()
{
sub
(
is_submit
=
true
,
is_force
=
false
)
{
var
data
=
{};
var
data
=
{};
let
is_tip
=
false
for
(
let
i
of
this
.
test_result_sub_data
)
{
for
(
let
i
of
this
.
test_result_sub_data
)
{
data
[
i
.
id
]
=
i
.
value
;
data
[
i
.
id
]
=
i
.
value
;
if
(
!
i
.
value
){
is_tip
=
true
}
}
uploadTestResults
(
this
.
result_id
,
{
}
is_submit
:
true
,
if
(
is_submit
&&
is_tip
&&
!
is_force
){
test_results
:
data
,
this
.
$confirm
(
'您还有题目未答完成,是否强制提交?'
,
'提示'
,
{
}).
then
((
res
)
=>
{
confirmButtonText
:
'确定'
,
console
.
log
(
res
);
cancelButtonText
:
'取消'
,
if
(
res
.
code
==
200
)
{
type
:
'warning'
,
}).
then
(
()
=>
{
this
.
sub
(
is_submit
,
true
)
})
return
}
uploadTestResults
(
this
.
result_id
,
{
is_submit
:
is_submit
,
test_results
:
data
,}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
&&
is_submit
)
{
this
.
$message
.
success
(
res
.
message
);
this
.
$message
.
success
(
res
.
message
);
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/test-result'
,
path
:
'/test-result'
,
query
:
{
query
:
{
id
:
this
.
result_id
,},
id
:
this
.
result_id
,
},
});
});
}
}
});
});
console
.
log
(
'@@@@@@@'
+
data
);
},
},
// getListData() {
// getResults().then((res) => {
// console.log('测试结果信息');
// this.test_results = res || [];
// console.log(res);
// });
// },
getTestData
()
{
getTestData
()
{
getResultsData
(
this
.
result_id
,
{
is_begin
:
true
}).
then
((
res
)
=>
{
getResultsData
(
this
.
result_id
,
{
is_begin
:
true
}).
then
((
res
)
=>
{
console
.
log
(
'开始考试详情'
);
console
.
log
(
'开始考试详情'
);
...
@@ -238,11 +234,11 @@ export default {
...
@@ -238,11 +234,11 @@ export default {
this
.
test_card_info
=
{
this
.
test_card_info
=
{
idcard
:
res
.
idcard
,
idcard
:
res
.
idcard
,
name
:
res
.
name
,
name
:
res
.
name
,
score
:
res
.
score
,
//
score: res.score,
begin_answer_time
:
res
.
begin_answer_time
,
begin_answer_time
:
res
.
begin_answer_time
,
duration
:
res
.
examination_questions
.
duration
,
duration
:
res
.
examination_questions
.
duration
,
const_down
:
const_down
:
res
.
examination_questions
.
duration
*
60
-
res
.
begin_answer_duration
,
res
.
examination_questions
.
duration
*
60
-
(
res
.
begin_answer_duration
?
res
.
begin_answer_duration
:
0
)
,
status
:
res
.
status
,
status
:
res
.
status
,
title
:
res
.
examination_questions_title
,
title
:
res
.
examination_questions_title
,
};
};
...
@@ -253,10 +249,10 @@ export default {
...
@@ -253,10 +249,10 @@ export default {
this
.
test_result_sub_data
.
push
({
this
.
test_result_sub_data
.
push
({
id
:
this
.
test_results
.
examination_questions
id
:
this
.
test_results
.
examination_questions
.
examination_question_detail
[
i
].
id
,
.
examination_question_detail
[
i
].
id
,
value
:
this
.
test_results
.
test_results
[
i
.
id
]
value
:
this
.
test_results
.
test_results
[
this
.
test_results
.
examination_questions
.
examination_question_detail
[
i
].
id
]
?
this
.
test_results
.
test_results
[
?
this
.
test_results
.
test_results
[
this
.
test_results
.
examination_questions
this
.
test_results
.
examination_questions
.
examination_question_detail
[
i
].
id
.
examination_question_detail
[
i
].
id
]
]
:
''
,
:
''
,
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论