Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_studentHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_studentHome
Commits
e4c862ac
提交
e4c862ac
authored
3月 21, 2023
作者:
Yroc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
'学生登录上传修改'
上级
507e4672
全部展开
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
340 行增加
和
60 行删除
+340
-60
user.js
src/api/user.js
+8
-2
index.vue
src/components/TestInfo/index.vue
+1
-1
index.vue
src/components/ViewHeader/index.vue
+20
-3
index.scss
src/styles/index.scss
+11
-2
index.vue
src/views/affirm/index.vue
+14
-5
index.vue
src/views/analysis/index.vue
+1
-1
index.vue
src/views/logon/index.vue
+0
-0
card-view.vue
src/views/personal/components/card-view.vue
+19
-6
index.vue
src/views/personal/index.vue
+165
-15
index.vue
src/views/test-result/index.vue
+13
-1
answer-view.vue
src/views/upload-result/components/answer-view.vue
+26
-0
index.vue
src/views/upload-result/index.vue
+62
-24
没有找到文件。
src/api/user.js
浏览文件 @
e4c862ac
...
...
@@ -2,7 +2,7 @@
* @Author: AnthonyD
* @Date: 2023-02-22 11:31:31
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
17 18:38:05
* @Last Modified time: 2023-03-
21 18:18:47
*/
import
request
from
'@/utils/request'
...
...
@@ -119,7 +119,13 @@ export function getCityIntfo(data) {
})
}
//获取烟草等级列表
export
function
getTobaccoList
()
{
return
request
({
url
:
'/student/tobacco_grades/all'
,
method
:
'get'
,
})
}
export
function
logout
()
{
return
request
({
...
...
src/components/TestInfo/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-01 15:29:44
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
13 16:33:45
* @Last Modified time: 2023-03-
21 20:19:14
*/
</
script
><
template
>
<div
class=
"header_container"
>
...
...
src/components/ViewHeader/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,18 +3,20 @@
* @Author: AnthonyD
* @Date: 2023-02-23 16:03:00
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
10 16:41:42
* @Last Modified time: 2023-03-
21 17:03:56
*/
</
script
><
template
>
<div
class=
"header_container"
>
<div
class=
"logo"
@
click=
"goPersonalCenter()"
style=
"cursor: pointer"
>
<img
src=
"/image/logo.svg"
alt=
""
/>
</div>
<div>
<div
class=
"header_box"
>
<h3>
国家烟草识别培训系统
</h3>
</div>
<div>
<el-button
type=
"primary"
class=
"btn"
@
click=
"logOut"
>
退出登录
</el-button>
<el-button
type=
"primary"
class=
"btn_box"
@
click=
"logOut"
>
退出登录
</el-button
>
</div>
</div>
</
template
>
...
...
@@ -56,4 +58,19 @@ export default {
}
}
}
// 移动端样式
@media
screen
and
(
max-width
:
600px
)
{
.header_container
{
.logo
{
display
:
none
;
}
.btn_box
{
display
:
none
;
}
.header_box
{
margin
:
auto
;
}
}
}
</
style
>
src/styles/index.scss
浏览文件 @
e4c862ac
...
...
@@ -2,7 +2,7 @@
* @Author: AnthonyD
* @Date: 2023-02-22 11:31:31
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
10 15:31:52
* @Last Modified time: 2023-03-
21 15:42:57
*/
@import
'./variables.scss'
;
@import
'./mixin.scss'
;
...
...
@@ -226,4 +226,12 @@ aside {
}
/* 输入框样式调整 */
/* 移动端样式 */
@media
screen
and
(
max-width
:
600px
)
{
.right_box
{
.el-timeline
{
padding
:
0
;
}
}
}
\ No newline at end of file
src/views/affirm/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-02-27 12:03:06
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
10 20:06:5
2
* @Last Modified time: 2023-03-
21 17:20:3
2
*/
</
script
><
template
>
<el-card
class=
"box-card"
>
...
...
@@ -69,12 +69,12 @@ export default {
}
.bgd_container
{
position
:
absolute
;
top
:
35%
;
left
:
0
;
width
:
100%
;
text-align
:
center
;
z-index
:
0
;
position
:
absolute
;
img
{
width
:
180px
;
...
...
@@ -85,9 +85,18 @@ export default {
.affirm_btn_box
{
width
:
220px
;
height
:
40px
;
position
:
absolute
;
bottom
:
15%
;
left
:
34%
;
margin
:
60%
auto
0
;
}
}
// 移动端样式
@media
screen
and
(
max-width
:
600px
)
{
.box-card
{
width
:
100%
;
margin
:
24px
0
0
0
;
.affirm_btn_box
{
margin
:
110%
auto
0
;
}
}
}
</
style
>
src/views/analysis/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-13 09:56:01
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
13 19:01:05
* @Last Modified time: 2023-03-
21 18:54:08
*/
</
script
>
<
template
>
...
...
src/views/logon/index.vue
0 → 100644
浏览文件 @
e4c862ac
差异被折叠。
点击展开。
src/views/personal/components/card-view.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-07 19:34:46
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
13 16:44:07
* @Last Modified time: 2023-03-
21 17:00:02
*/
</
script
>
<
template
>
...
...
@@ -14,14 +14,14 @@
<p
class=
"value_box"
>
{{
test_node
.
examination_questions
.
created_at
}}
</p>
<div
class=
"
W
ait_test"
>
<div
class=
"
w
ait_test"
>
<div
class=
"tab_box"
>
<div>
<h3
style=
"margin-top: 0px"
>
{{
test_node
.
examination_questions_title
}}
</h3>
<div>
<span
style=
"font-size"
<span
style=
"font-size"
class=
"begin_time_box"
>
开考时间:
{{
test_node
.
examination_questions
.
begin_date
}}
</span
...
...
@@ -35,7 +35,7 @@
test_node.status == 1
"
type=
"primary"
style=
"float: right; margin: 10px"
style=
"float: right; margin: 10px
0px 10px 10px
"
@
click=
"nextStep()"
>
开始考试
</el-button>
...
...
@@ -45,7 +45,7 @@
test_node.status == 1
"
type=
"primary"
style=
"float: right; margin: 10px"
style=
"float: right; margin: 10px
0px 10px 10px
"
disabled
>
待开始
</el-button>
...
...
@@ -99,7 +99,7 @@ export default {
width
:
calc
(
100%
-
20px
);
}
.
W
ait_test
{
.
w
ait_test
{
background-color
:
#ddf2ed
;
box-sizing
:
border-box
;
width
:
100%
;
...
...
@@ -169,4 +169,17 @@ export default {
.el-input__icon
{
cursor
:
pointer
;
}
// 移动端样式
@media
screen
and
(
max-width
:
600px
)
{
.wait_test
{
position
:
relative
;
height
:
120px
;
.begin_time_box
{
position
:
absolute
;
margin-top
:
15px
;
}
}
}
</
style
>
src/views/personal/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-02-23 15:52:52
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-21
11:43:10
* @Last Modified time: 2023-03-21
20:19:17
*/
</
script
><
template
>
<div
class=
"person_container"
>
...
...
@@ -74,7 +74,11 @@
<div
class=
"node_box_top"
>
<h2>
已考完场次
</h2>
</div>
<el-timeline
:reverse=
"reverse"
v-if=
"test_results.length > 0"
>
<el-timeline
:reverse=
"reverse"
v-if=
"test_results.length > 0"
class=
"timeLine_box"
>
<el-timeline-item
v-for=
"(item, index) in test_results"
:key=
"index"
...
...
@@ -100,7 +104,9 @@
</div>
<div
class=
"tab_box_tight"
>
<div
class=
"score_box"
>
<span
style=
"margin-left: 30px"
>
成绩:
</span>
<span
style=
"margin-left: 30px"
class=
"score_box_left"
>
成绩:
</span
>
<span
style=
"font-size: 48px; font-weight: bold"
v-if=
"
...
...
@@ -122,7 +128,10 @@
>
{{
item
.
score
}}
</span
>
</div>
<div
style=
"border-left: 1px solid #f4d6a9"
>
<div
style=
"border-left: 1px solid #f4d6a9"
class=
"score_btn_box"
>
<el-button
v-if=
"
(item.examination_questions.status == 4 &&
...
...
@@ -155,6 +164,95 @@
</div>
</el-timeline-item>
</el-timeline>
<!-- 移动端 -->
<div
:reverse=
"reverse"
v-if=
"test_results.length > 0"
class=
"mobile_box"
>
<div
v-for=
"(item, index) in test_results"
:key=
"index"
color=
"#eebe77"
v-show=
"
(item.examination_questions.status == 3 && item.status == 2) ||
(item.examination_questions.status == 5 && item.status == 3) ||
(item.examination_questions.status == 4 && item.status == 3)
"
>
<div
class=
"node_box_bottom"
>
<div
slot=
"header"
class=
"clearfix"
>
<p
class=
"value_box"
>
{{
item
.
examination_questions
.
created_at
}}
</p>
<div
class=
"Wait_test"
>
<div
class=
"tab_box"
>
<div>
<h3
class=
"title_card_box"
>
{{
item
.
examination_questions_title
}}
</h3>
</div>
<div
class=
"tab_box_tight"
>
<div
class=
"score_box"
>
<span>
成绩:
</span>
<span
style=
"font-size: 48px; font-weight: bold"
v-if=
"
(item.examination_questions.status == 4 &&
item.status == 2) ||
(item.examination_questions.status == 3 &&
item.status == 2)
"
>
***
</span
>
<span
v-else-if=
"
(item.examination_questions.status == 4 &&
item.status == 3) ||
(item.examination_questions.status == 5 &&
item.status == 3)
"
style=
"font-size: 48px; font-weight: bold"
>
{{
item
.
score
}}
</span
>
<div
style=
"border-left: 1px solid #f4d6a9"
>
<el-button
v-if=
"
(item.examination_questions.status == 4 &&
item.status == 3) ||
(item.examination_questions.status == 5 &&
item.status == 3)
"
@
click=
"route(item)"
type=
"warning"
class=
"finish_btn"
>
查看
</el-button>
<el-button
v-else-if=
"
(item.examination_questions.status == 4 &&
item.status == 2) ||
(item.examination_questions.status == 3 &&
item.status == 2)
"
type=
"warning"
class=
"finish_btn"
disabled
>
未发布
</el-button>
</div>
</div>
</div>
<span>
考试时间:
{{
item
.
answer_time
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<img
v-else
src=
"/image/empty.png"
class=
"none_img"
/>
</el-card>
</el-col>
...
...
@@ -182,6 +280,7 @@ export default {
this
.
user_info
=
this
.
$store
.
state
.
user
.
user
;
console
.
log
(
this
.
user_info
);
this
.
getListData
();
console
.
log
(
window
.
offsetw
);
//加密
// const test = this.$handleParams(this.info_test);
...
...
@@ -256,11 +355,11 @@ export default {
margin
:
0
auto
;
padding
:
20px
;
}
.test_list
{
width
:
1280px
;
height
:
266px
;
background-color
:
#fff
;
}
//
.test_list {
//
width: 1280px;
//
height: 266px;
//
background-color: #fff;
//
}
.box-card
{
width
:
calc
(
100%
-
20px
);
...
...
@@ -336,22 +435,30 @@ export default {
}
}
.phonto_name
{
position
:
absolute
;
text-align
:
center
;
margin-top
:
15px
;
font-size
:
50px
;
font-weight
:
bolder
;
right
:
35%
;
top
:
15%
;
}
}
.score_box_left
{
margin-left
:
30px
;
}
.score_btn_box
{
width
:
120px
;
}
.el-input__icon
{
cursor
:
pointer
;
}
.title_card_box
{
margin-top
:
0
;
}
.finish_btn
{
float
:
right
;
margin
:
10px
;
margin-left
:
30px
;
//
margin-left: 30px;
// background-color: #eebe77;
}
...
...
@@ -393,16 +500,59 @@ export default {
align-content
:
center
;
}
@media
screen
and
(
min-width
:
600px
)
{
.mobile_box
{
display
:
none
;
}
}
// 移动端样式
@media
screen
and
(
max-width
:
39
0px
)
{
@media
screen
and
(
max-width
:
60
0px
)
{
.left_card
{
display
:
none
;
}
.box-card
{
width
:
100%
;
}
.person_container
{
width
:
100%
;
.box-card
{
padding
:
0
;
.right_box
{
width
:
100%
;
}
.node_box_top
{
padding
:
0
;
}
.node_box_bottom
{
padding
:
0
;
}
.timeLine_box
{
display
:
none
;
}
.tab_box
{
display
:
block
;
.score_box
{
position
:
relative
;
margin
:
0
0
5px
0
;
border-left
:
1px
solid
#faecd8
;
.score_box_left
{
margin-left
:
0
;
margin-bottom
:
0
;
}
.finish_btn
{
margin
:
0
;
position
:
absolute
;
right
:
45px
;
top
:
10px
;
}
}
}
.tab_box_tight
{
display
:
block
;
}
}
.title_card_box
{
margin-bottom
:
10px
;
}
}
</
style
>
src/views/test-result/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-02-28 10:03:17
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-
14 16:19:46
* @Last Modified time: 2023-03-
21 17:39:58
*/
</
script
><
template
>
<div
class=
"content_container"
>
...
...
@@ -129,4 +129,16 @@ export default {
margin
:
0
px
;
}
}
@
media
screen
and
(
max
-
width
:
600
px
)
{
.
picture_container
{
width
:
50
%
;
}
.
result_container
{
width
:
100
%
;
.
tag_warning
{
width
:
100
%
;
}
}
}
<
/style
>
src/views/upload-result/components/answer-view.vue
0 → 100644
浏览文件 @
e4c862ac
<
script
>
/**
* @Author: AnthonyD
* @Date: 2023-03-21 18:22:06
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-21 18:26:57
*/
</
script
><
template
>
<div
class=
"answer_box"
>
<el-popover
placement=
"right"
width=
"400"
trigger=
"click"
>
<el-table>
</el-table>
</el-popover>
</div>
</
template
>
<
script
>
export
default
{
name
:
''
,
data
()
{
return
{};
},
};
</
script
>
<
style
lang=
""
scoped
>
</
style
>
src/views/upload-result/index.vue
浏览文件 @
e4c862ac
...
...
@@ -3,7 +3,7 @@
* @Author: AnthonyD
* @Date: 2023-03-01 16:25:21
* @Last Modified by: AnthonyD
* @Last Modified time: 2023-03-21
12:23:35
* @Last Modified time: 2023-03-21
20:05:50
*/
</
script
>
...
...
@@ -61,14 +61,55 @@
}}
</div>
<div
class=
"right_data"
>
<el-input
<
!--
<
el-input
v-if=
"test_result_sub_data[e + (i - 1) * 5 - 1]"
v-model=
"
test_result_sub_data[e + (i - 1) * 5 - 1].value
"
style=
"width: 100%"
class=
"input_box"
></el-input>
>
</el-input>
-->
<el-popover
style=
"display: block; width: 100%; height: 100%"
v-if=
"test_result_sub_data[e + (i - 1) * 5 - 1]"
placement=
"bottom"
width=
"300"
v-model=
"
test_result_sub_data[e + (i - 1) * 5 - 1].visible
"
trigger=
"click"
>
<div>
<el-row>
<el-radio-group
v-model=
"
test_result_sub_data[e + (i - 1) * 5 - 1]
.value
"
>
<el-col
:span=
"6"
v-for=
"(i, index) in tobacco_grades_data"
:key=
"index"
>
<el-radio
:label=
"i.grade_code"
>
{{
i
.
grade_code
}}
</el-radio>
</el-col>
</el-radio-group>
</el-row>
</div>
<el-button
type=
"text"
style=
"color: #303133; width: 70px"
slot=
"reference"
>
{{
test_result_sub_data
[
e
+
(
i
-
1
)
*
5
-
1
].
value
}}
</el-button>
</el-popover>
</div>
</div>
</div>
...
...
@@ -111,8 +152,6 @@
<h3
class=
"photo_header_title"
>
上传纸质考试照片
</h3>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right"
>
<!-- :on-success="handleAvatarSuccess" -->
<!-- :http-request="uploadSubmit" -->
<el-upload
name=
"image"
:accept=
"'image/*'"
...
...
@@ -130,19 +169,9 @@
>
重新上传
</el-button
>
</el-upload>
<!-- <el-upload
v-else
action="https://jsonplaceholder.typicode.com/posts/"
style="display: inline-block; margin-right: 15px"
>
<el-button class="photo_header_button"
>上传考试结果</el-button
>
</el-upload> -->
</el-col>
</el-row>
<div
class=
"grid-content_upload"
v-loading=
"is_loading"
>
<div
class=
"grid-content_upload"
v-loading=
"is_loading"
>
<div
class=
"upload_btn"
>
<div
class=
"img_box"
...
...
@@ -168,7 +197,7 @@
将文件拖到此处,或
<em>
点击上传
</em>
</div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传jpg/png文件
,
且不超过20MB
只能上传jpg/png文件
,
且不超过20MB
</div>
</el-upload>
</div>
...
...
@@ -187,11 +216,12 @@
<
script
>
import
TestInfo
from
'@/components/TestInfo/index'
;
import
{
getResultsData
,
uploadTestResults
}
from
'@/api/user'
;
import
{
getResultsData
,
uploadTestResults
,
getTobaccoList
}
from
'@/api/user'
;
import
{
getToken
}
from
'@/utils/auth'
;
import
AnswerView
from
'./components/answer-view.vue'
;
export
default
{
name
:
''
,
components
:
{
TestInfo
},
components
:
{
TestInfo
,
AnswerView
},
data
()
{
return
{
headers
:
{
Authorization
:
' Bearer '
+
getToken
()
},
...
...
@@ -205,6 +235,7 @@ export default {
test_card_info
:
{},
is_force
:
false
,
is_loading
:
false
,
tobacco_grades_data
:
[],
};
},
created
()
{
...
...
@@ -213,6 +244,7 @@ export default {
mounted
()
{
this
.
user_info
=
this
.
$store
.
state
.
user
.
user
;
this
.
getTestData
();
this
.
getTobaccoInfo
();
},
methods
:
{
sub
(
is_submit
=
true
,
is_force
=
false
)
{
...
...
@@ -260,8 +292,8 @@ export default {
begin_answer_time
:
res
.
begin_answer_time
,
duration
:
res
.
examination_questions
.
duration
*
60
,
const_down
:
res
.
examination_questions
.
duration
*
60
-
(
res
.
begin_answer_duration
?
res
.
begin_answer_duration
:
0
),
res
.
examination_questions
.
duration
*
-
(
res
.
begin_answer_duration
?
res
.
begin_answer_duration
:
0
),
status
:
res
.
status
,
title
:
res
.
examination_questions_title
,
};
...
...
@@ -270,6 +302,7 @@ export default {
for
(
let
i
in
this
.
test_results
.
examination_questions
.
examination_question_detail
)
{
this
.
test_result_sub_data
.
push
({
visible
:
false
,
id
:
this
.
test_results
.
examination_questions
.
examination_question_detail
[
i
].
id
,
value
:
this
.
test_results
.
test_results
[
...
...
@@ -317,14 +350,19 @@ export default {
}
},
uploadSubmit
(
file
,
fileList
)
{
console
.
log
(
file
.
status
)
console
.
log
(
file
.
status
)
;
// uploading ready error
if
(
file
&&
(
file
.
status
==
"success"
||
file
.
status
==
"error"
))
{
if
(
file
&&
(
file
.
status
==
'success'
||
file
.
status
==
'error'
))
{
this
.
is_loading
=
false
;
}
else
{
}
else
{
this
.
is_loading
=
true
;
}
},
getTobaccoInfo
()
{
getTobaccoList
().
then
((
res
)
=>
{
this
.
tobacco_grades_data
=
res
;
});
},
},
};
</
script
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论