Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_studentHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_studentHome
Commits
d1750965
提交
d1750965
authored
3月 13, 2023
作者:
Yroc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
学生端功能
上级
e229ada9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
206 行增加
和
188 行删除
+206
-188
user.js
src/api/user.js
+9
-1
index.vue
src/components/TestInfo/index.vue
+62
-12
index.js
src/router/index.js
+6
-1
tool.js
src/utils/tool.js
+18
-1
popover-view.vue
src/views/analysis/components/popover-view.vue
+0
-135
index.vue
src/views/analysis/index.vue
+0
-0
card-view.vue
src/views/personal/components/card-view.vue
+2
-2
index.vue
src/views/personal/index.vue
+11
-13
index.vue
src/views/test/index.vue
+57
-0
index.vue
src/views/upload-result/index.vue
+41
-23
没有找到文件。
src/api/user.js
浏览文件 @
d1750965
...
...
@@ -2,7 +2,7 @@
* @Author: AnthonyD
* @Date: 2023-02-22 11:31:31
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-1
1 15:51:01
* @Last Modified time: 2023-03-1
3 10:11:24
*/
import
request
from
'@/utils/request'
...
...
@@ -83,6 +83,14 @@ export function uploadTestResults(id,data) {
})
}
//考试结果查看
export
function
viewExamResults
(
id
)
{
return
request
({
url
:
`/student/test_results/getResults/
${
id
}
`
,
method
:
'get'
,
})
}
export
function
logout
()
{
return
request
({
url
:
'/vue-element-admin/user/logout'
,
...
...
src/components/TestInfo/index.vue
浏览文件 @
d1750965
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-01 15:29:44
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-1
1 16:59:11
* @Last Modified time: 2023-03-1
3 16:33:45
*/
</
script
><
template
>
<div
class=
"header_container"
>
...
...
@@ -31,6 +31,7 @@
>
{{
e
.
label
}}
</el-tag
>
<el-tag
v-if=
"time"
type=
"warning"
style=
"margin-left: 30px; backgound-color: #fcf6ec"
>
{{
time
}}
</el-tag
...
...
@@ -44,9 +45,14 @@
}}
</span></span
>
<span
class=
"test_info"
>
证件号
<span
class=
"test_info_show"
>
{{
user_info
.
idcard
.
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
}}
<
/span></
span
>
证件号
<span
class=
"test_info_show"
>
<!--
{{
user_info
.
idcard
.
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
||
'暂无'
}}
-->
{{
id_card
(
user_info
.
idcard
)
}}
<
/spa
n
><
/spa
n
>
<
span
class
=
"test_info"
>
考试时间
<
span
class
=
"test_info_show"
>
{{
...
...
@@ -64,13 +70,30 @@
<
div
v
-
for
=
"(item, index) in data_keys"
:
key
=
"index"
class
=
"info_unit"
v
-
if
=
"item.key"
class
=
"info_unit"
v
-
if
=
"item.key"
v
-
show
=
"examination_questions_info[item.key]"
>
<!--
examination_questions_info
[
item
.
key
].
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
-->
<
span
class
=
"test_info"
>
{{
item
.
label
}}
<
/span
>
<
span
class
=
"test_info_show"
>
{{
item
.
key
==
'idcard'
?
examination_questions_info
[
item
.
key
].
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
)
:(
examination_questions_info
[
item
.
key
]
||
'暂无'
)
}}
<
/span
>
<
span
class
=
"test_info_show"
>
<!--
{{
item
.
key
==
'idcard'
?
id_card
(
examination_questions_info
[
item
.
key
])
:
examination_questions_info
[
item
.
key
]
||
'暂无'
}}
-->
<
span
v
-
if
=
"item.key == 'idcard'"
>
{{
id_card
(
examination_questions_info
[
'idcard'
])
}}
<
/span
>
<
span
v
-
else
-
if
=
"item.key == 'duration'"
>
{{
change_time
(
examination_questions_info
[
'duration'
])
}}
<
/span
>
<
span
v
-
else
>
{{
examination_questions_info
[
item
.
key
]
}}
<
/span
>
<
/span
>
<
/div
>
<
/el-card
>
<
/div
>
...
...
@@ -79,7 +102,7 @@
<
script
>
import
{
secondsToMinutes
}
from
'@/utils/tool'
;
export
default
{
name
:
''
,
name
:
'
TestInfo
'
,
props
:
[
'testdata'
],
data
()
{
return
{
...
...
@@ -119,15 +142,42 @@ export default {
}
,
countDownTimer
()
{
this
.
timer
=
setInterval
(()
=>
{
if
(
this
.
testdata
.
const_down
>
0
)
{
if
(
this
.
testdata
.
const_down
>
0
)
{
this
.
time
=
secondsToMinutes
(
this
.
testdata
.
const_down
--
);
if
(
parseInt
(
this
.
testdata
.
const_down
/
10
)
==
this
.
testdata
.
const_down
/
10
){
this
.
$emit
(
'sub'
,
false
,
false
);
}
if
(
parseInt
(
this
.
testdata
.
const_down
/
10
)
==
this
.
testdata
.
const_down
/
10
)
{
this
.
$emit
(
'sub'
,
false
,
false
);
}
}
else
{
clearTimeout
(
this
.
timer
);
this
.
$emit
(
'sub'
,
true
,
true
);
this
.
$emit
(
'sub'
,
true
,
true
);
}
}
,
1000
);
}
,
//
id_card
(
str
)
{
if
(
str
)
{
return
str
.
replace
(
/
(\w
{4
}
)\w
*
(\w
{4
}
)
/
,
'$1********$2'
);
}
else
{
return
'暂无'
;
}
}
,
// id_card_next(str)
{
// if (str)
{
// return str.replace(/(\w
{
4
}
)
\
w
*
(
\
w
{
4
}
)
/
,
'$1********$2'
);
//
}
else
{
// return '暂无';
//
}
//
}
,
change_time
(
str
)
{
if
(
str
)
{
return
secondsToMinutes
(
str
);
}
else
{
return
'暂无'
;
}
}
,
}
,
}
;
<
/script
>
...
...
src/router/index.js
浏览文件 @
d1750965
...
...
@@ -2,7 +2,7 @@
* @Author: AnthonyD
* @Date: 2023-02-22 11:31:31
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
07 10:40:29
* @Last Modified time: 2023-03-
13 16:35:08
*/
import
Vue
from
'vue'
import
Router
from
'vue-router'
...
...
@@ -153,6 +153,11 @@ export const asyncRoutes = [
name
:
'analysis'
,
component
:
()
=>
import
(
'@/views/analysis/index.vue'
),
},
{
path
:
'test'
,
name
:
'test'
,
component
:
()
=>
import
(
'@/views/test/index.vue'
),
},
]
},
...
...
src/utils/tool.js
浏览文件 @
d1750965
...
...
@@ -2,9 +2,10 @@
* @Author: AnthonyD
* @Date: 2023-03-11 11:04:16
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-1
1 12:09:07
* @Last Modified time: 2023-03-1
3 14:26:44
*/
export
function
secondsToMinutes
(
sec
){
if
(
!
sec
)
return
false
const
totalSeconds
=
sec
;
/* 获取完整分钟数 */
const
minutes
=
Math
.
floor
(
totalSeconds
/
60
);
...
...
@@ -19,3 +20,19 @@ const padTo2Digits = (num)=> {
const
result
=
`
${
padTo2Digits
(
minutes
)}
分
${
padTo2Digits
(
seconds
)}
秒`
;
return
result
;
}
//一维转换二维数组
export
function
array_conversion
(
arr
,
nums
)
{
const
length
=
arr
.
length
;
const
n
=
nums
// 假设每段显示n个
const
Num
=
length
%
n
===
0
?
length
/
n
:
Math
.
floor
((
length
/
n
)
+
1
)
//得出多少份
const
res
=
[]
//定义数组接受最终的数据
for
(
let
i
=
0
;
i
<
Num
;
i
++
)
{
// slice() 方法返回一个从开始到结束(不包括结束)的数组。且原始数组不会被修改。
const
newArr
=
arr
.
slice
(
i
*
n
,
i
*
n
+
n
)
//得到每份的数据
res
.
push
(
JSON
.
parse
(
JSON
.
stringify
(
newArr
)))
//往res数组里加数据
}
return
res
;
}
src/views/analysis/components/popover-view.vue
deleted
100644 → 0
浏览文件 @
e229ada9
<
script
>
/**
* @Author: AnthonyD
* @Date: 2023-03-03 17:24:48
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-04 17:01:03
*/
</
script
><
template
>
<div
class=
"hover_card"
>
<el-row>
<el-col
:span=
"12"
>
<h3
class=
"card_header_title"
>
错误点分析
</h3>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-button
class=
"card_header_button"
icon=
"el-icon-close"
>
关闭
</el-button
>
</el-col>
</el-row>
<div
class=
"table_box"
>
<div
v-for=
"(e, i) in 6"
:key=
"i"
class=
"table_line"
>
<div
class=
"left"
>
1
</div>
<div
class=
"right"
>
2
</div>
</div>
</div>
<!--
<el-table
:data=
"gridData"
class=
"hover_card"
>
<el-table-column
width=
"150"
prop=
"date"
label=
"日期"
></el-table-column>
<el-table-column
width=
"100"
prop=
"name"
label=
"姓名"
></el-table-column>
<el-table-column
width=
"300"
prop=
"address"
label=
"地址"
></el-table-column>
</el-table>
-->
<!--
<div>
</div>
<div>
<div
class=
"row_box"
v-for=
"e in 4"
:key=
"e"
>
<div
class=
"row_line row_header"
>
<div
class=
"left"
>
序号
</div>
<div
class=
"right"
>
结果
</div>
</div>
</div>
</div>
-->
</div>
</
template
>
<
script
>
export
default
{
props
:
[
'gridData'
],
name
:
''
,
data
()
{
return
{
info_data
:
{
result
:
'C3F'
,
area
:
'南方'
,
conclusion
:
'C2F'
,
breed
:
'中烟'
,
detail
:
'1111'
,
image
:
''
,
},
};
},
mounted
()
{
// console.log(this.gridData);
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.hover_card
{
width
:
100%
;
height
:
400px
;
}
.card_header_title
{
margin
:
8px
0
;
color
:
#000
;
}
.card_header_button
{
background-color
:
#ebedf0
;
padding
:
5px
16px
;
margin
:
8px
0
;
color
:
#000
;
}
/* .row_box {
width: 100%;
display: inline-block;
.row_line .left {
width: 60px;
display: inline-block;
background-color: #f5f7fa;
}
.row_line .right {
width: calc(100% - 60px);
display: inline-block;
padding: 8px 25px;
}
}
*/
.table_box
{
border
:
1px
solid
#e5e7ed
;
border-radius
:
4px
;
overflow
:
hidden
;
.table_line
{
border-bottom
:
1px
solid
#e5e7ed
;
.left
{
width
:
130px
;
padding
:
10px
15px
;
box-sizing
:
border-box
;
float
:
left
;
background
:
#f5f7fa
;
border-right
:
1px
solid
#e5e7ed
;
}
.right
{
width
:
calc
(
100%
-
130px
);
padding
:
10px
15px
;
box-sizing
:
border-box
;
float
:
left
;
}
}
.
table_line
:
:
after
{
content
:
''
;
display
:
block
;
clear
:
both
;
}
}
.table_box
:last-child
{
border-bottom
:
none
;
}
</
style
>
src/views/analysis/index.vue
浏览文件 @
d1750965
差异被折叠。
点击展开。
src/views/personal/components/card-view.vue
浏览文件 @
d1750965
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-07 19:34:46
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-1
0 20:07:00
* @Last Modified time: 2023-03-1
3 16:44:07
*/
</
script
>
<
template
>
...
...
@@ -31,7 +31,7 @@
<div>
<el-button
v-if=
"
test_node.examination_questions.status ==
2
&&
test_node.examination_questions.status ==
3
&&
test_node.status == 1
"
type=
"primary"
...
...
src/views/personal/index.vue
浏览文件 @
d1750965
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-02-23 15:52:52
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-1
1 09:57:16
* @Last Modified time: 2023-03-1
3 18:55:27
*/
</
script
><
template
>
<div
class=
"person_container"
>
...
...
@@ -145,11 +145,7 @@
<h3
style=
"margin-top: 0px"
>
{{
item
.
examination_questions_title
}}
</h3>
<span
>
考试时间:
{{
item
.
answer_time
}}
</span
>
<span>
考试时间:
{{
item
.
answer_time
}}
</span>
</div>
<div
class=
"tab_box_tight"
>
<div
class=
"score_box"
>
...
...
@@ -161,8 +157,10 @@
<div
style=
"border-left: 1px solid #f4d6a9"
>
<el-button
v-if=
"
item.examination_questions.status == 4 &&
item.status == 3
(item.examination_questions.status == 4 &&
item.status == 3) ||
(item.examination_questions.status == 5 &&
item.status == 3)
"
@
click=
"route(item)"
type=
"warning"
...
...
@@ -260,13 +258,13 @@ export default {
// );
},
methods
:
{
route
(
row
){
route
(
row
)
{
this
.
$router
.
push
({
path
:
'/analysis'
,
query
:
{
id
:
row
.
id
,
},
});
path
:
'/analysis'
,
query
:
{
id
:
row
.
id
},
});
},
handleAvatarSuccess
(
res
,
file
)
{
this
.
imageUrl
=
URL
.
createObjectURL
(
file
.
raw
);
},
...
...
src/views/test/index.vue
0 → 100644
浏览文件 @
d1750965
<
script
>
/**
* @Author: AnthonyD
* @Date: 2023-03-13 16:34:30
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-13 18:15:25
*/
</
script
>
<
template
>
<div
class=
"person_container"
>
<div
class=
"table_box"
>
<div
class=
"left"
></div>
<div
class=
"right"
><el-input></el-input></div>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
''
,
data
()
{
return
{
// test_arr: [
// { as },
// { bs },
// { cs },
// { ds },
// { es },
// { fs },
// { gs },
// { hs },
// { is },
// { gs },
// { as },
// { bs },
// { cs },
// { ds },
// { es },
// { fs },
// { gs },
// { hs },
// { is },
// { gs },
// ],
};
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.table_box
{
width
:
1000px
;
height
:
100px
;
border
:
1px
solid
#000
;
margin
:
0px
auto
;
}
</
style
>
src/views/upload-result/index.vue
浏览文件 @
d1750965
...
...
@@ -3,13 +3,17 @@
* @Author: AnthonyD
* @Date: 2023-03-01 16:25:21
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-1
1 17:07:10
* @Last Modified time: 2023-03-1
3 14:22:51
*/
</
script
>
<
template
>
<div>
<test-info
v-if=
"test_card_info.title"
:testdata=
"test_card_info"
@
sub=
"sub"
></test-info>
<test-info
v-if=
"test_card_info.title"
:testdata=
"test_card_info"
@
sub=
"sub"
></test-info>
<el-card
class=
"box-card"
>
<el-row
v-if=
"false"
>
<el-col
:span=
"15"
>
...
...
@@ -30,8 +34,12 @@
<el-col
:span=
"14"
>
<div
class=
"grid-content"
>
<div>
<h3
class=
"photo_header_title"
style=
"display: inline-block;"
>
考试结果
</h3>
<el-button
type=
"primary"
@
click=
"sub(false)"
style=
"float:right;"
>
保存
</el-button>
<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"
>
<el-row>
...
...
@@ -114,7 +122,9 @@
:headers=
"headers"
:show-file-list=
"false"
>
<el-button
type=
"primary"
style=
"margin-left: 159px"
>
重新上传
</el-button>
<el-button
type=
"primary"
style=
"margin-left: 159px"
>
重新上传
</el-button
>
</el-upload>
<!-- <el-upload
...
...
@@ -161,7 +171,9 @@
</el-col>
</el-row>
<div
class=
"btn_upload_result"
>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"sub()"
>
提交
</el-button>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"sub()"
>
提交
</el-button
>
</div>
</el-card>
</div>
...
...
@@ -171,7 +183,6 @@
import
TestInfo
from
'@/components/TestInfo/index'
;
import
{
getResultsData
,
uploadTestResults
}
from
'@/api/user'
;
import
{
getToken
}
from
'@/utils/auth'
;
import
{
secondsToMinutes
}
from
'@/utils/tool'
;
export
default
{
name
:
''
,
components
:
{
TestInfo
},
...
...
@@ -186,7 +197,7 @@ export default {
result_id
:
null
,
imgrul
:
null
,
test_card_info
:
{},
is_force
:
false
,
is_force
:
false
,
};
},
created
()
{
...
...
@@ -197,31 +208,34 @@ export default {
this
.
getTestData
();
},
methods
:
{
sub
(
is_submit
=
true
,
is_force
=
false
)
{
sub
(
is_submit
=
true
,
is_force
=
false
)
{
var
data
=
{};
let
is_tip
=
false
let
is_tip
=
false
;
for
(
let
i
of
this
.
test_result_sub_data
)
{
data
[
i
.
id
]
=
i
.
value
;
if
(
!
i
.
value
)
{
is_tip
=
true
if
(
!
i
.
value
)
{
is_tip
=
true
;
}
}
if
(
is_submit
&&
is_tip
&&
!
is_force
)
{
if
(
is_submit
&&
is_tip
&&
!
is_force
)
{
this
.
$confirm
(
'您还有题目未答完成,是否强制提交?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(
()
=>
{
this
.
sub
(
is_submit
,
true
)
})
return
}).
then
(()
=>
{
this
.
sub
(
is_submit
,
true
);
})
;
return
;
}
uploadTestResults
(
this
.
result_id
,
{
is_submit
:
is_submit
,
test_results
:
data
,}).
then
((
res
)
=>
{
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
.
$router
.
push
({
path
:
'/test-result'
,
query
:
{
id
:
this
.
result_id
,
},
query
:
{
id
:
this
.
result_id
},
});
}
});
...
...
@@ -238,7 +252,8 @@ export default {
begin_answer_time
:
res
.
begin_answer_time
,
duration
:
res
.
examination_questions
.
duration
,
const_down
:
res
.
examination_questions
.
duration
*
60
-
(
res
.
begin_answer_duration
?
res
.
begin_answer_duration
:
0
),
res
.
examination_questions
.
duration
*
60
-
(
res
.
begin_answer_duration
?
res
.
begin_answer_duration
:
0
),
status
:
res
.
status
,
title
:
res
.
examination_questions_title
,
};
...
...
@@ -249,10 +264,13 @@ export default {
this
.
test_result_sub_data
.
push
({
id
:
this
.
test_results
.
examination_questions
.
examination_question_detail
[
i
].
id
,
value
:
this
.
test_results
.
test_results
[
this
.
test_results
.
examination_questions
.
examination_question_detail
[
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
.
examination_questions
.
examination_question_detail
[
i
].
id
this
.
test_results
.
examination_questions
.
examination_question_detail
[
i
].
id
]
:
''
,
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论