Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cert-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
cert-show-h5
Commits
41752b87
提交
41752b87
authored
7月 09, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bug
上级
62075f7e
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
77 行增加
和
8 行删除
+77
-8
account.js
src/api/account.js
+5
-1
index.vue
src/pages/shms/score/index.vue
+1
-1
profile.vue
src/pages/shms/status/components/profile.vue
+58
-3
index.vue
src/pages/shms/status/index.vue
+13
-3
没有找到文件。
src/api/account.js
浏览文件 @
41752b87
...
@@ -20,7 +20,11 @@ export function getScore(params) {
...
@@ -20,7 +20,11 @@ export function getScore(params) {
export
function
getCerts
(
params
)
{
export
function
getCerts
(
params
)
{
return
httpRequest
.
get
(
'/api/certs/v1/student/get-certificate'
,
{
params
})
return
httpRequest
.
get
(
'/api/certs/v1/student/get-certificate'
,
{
params
})
}
}
//
//
登出
// 登出
export
function
logout
()
{
export
function
logout
()
{
return
httpRequest
.
get
(
'/api/passport/rest/logout'
)
return
httpRequest
.
get
(
'/api/passport/rest/logout'
)
}
}
// 更新邮箱
export
function
updateInfo
(
data
)
{
return
httpRequest
.
post
(
'/api/certs/v1/student/update-info'
,
data
)
}
src/pages/shms/score/index.vue
浏览文件 @
41752b87
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
:show-layout=
"false"
:show-layout=
"false"
:float-layout=
"false"
:float-layout=
"false"
:enable-download=
"true"
:enable-download=
"true"
:preview-modal=
"
tru
e"
:preview-modal=
"
fals
e"
:manual-pagination=
"true"
:manual-pagination=
"true"
:paginate-elements-by-height=
"500"
:paginate-elements-by-height=
"500"
filename=
"file"
filename=
"file"
...
...
src/pages/shms/status/components/profile.vue
浏览文件 @
41752b87
<
template
>
<
template
>
<div>
<div>
<div
class=
"profile-title"
>
{{
$t
(
'shmsLang.status.proTitle'
)
}}
</div>
<div
class=
"profile-title"
>
{{
$t
(
'shmsLang.status.proTitle'
)
}}
</div>
<div
class=
"profile-content
"
>
<div
:class=
"isPdf ? 'profile-content is-pdf' : 'profile-content'
"
>
<div
class=
"photo"
>
<div
class=
"photo"
>
<img
:src=
"info.head_img"
/>
<img
:src=
"info.head_img"
/>
</div>
</div>
...
@@ -16,6 +16,12 @@
...
@@ -16,6 +16,12 @@
<div
class=
"info-temp m-t33"
>
<div
class=
"info-temp m-t33"
>
<div
class=
"name w120"
>
{{
$t
(
'shmsLang.status.email'
)
}}
</div>
<div
class=
"name w120"
>
{{
$t
(
'shmsLang.status.email'
)
}}
</div>
<div
class=
"value"
>
{{
info
.
email
}}
</div>
<div
class=
"value"
>
{{
info
.
email
}}
</div>
<div
@
click=
"dialogVisible = true"
v-if=
"!isPdf"
class=
"email-icon el-icon-edit-outline"
style=
"color: #4eaeea"
></div>
</div>
</div>
</div>
</div>
<div
class=
"info-box"
>
<div
class=
"info-box"
>
...
@@ -41,17 +47,31 @@
...
@@ -41,17 +47,31 @@
</div>
</div>
</div>
</div>
</div>
</div>
<el-dialog
title=
"email"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<el-input
v-model=
"emailValue"
autocomplete=
"off"
></el-input>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"updateInfo"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
*
as
api
from
'@/api/account.js'
export
default
{
export
default
{
props
:
{
props
:
{
info
:
{
info
:
{
type
:
Object
type
:
Object
},
isPdf
:
{
type
:
Boolean
}
}
},
},
data
()
{
data
()
{
return
{}
return
{
emailValue
:
''
,
dialogVisible
:
false
}
},
},
computed
:
{
computed
:
{
setSex
()
{
setSex
()
{
...
@@ -78,9 +98,30 @@ export default {
...
@@ -78,9 +98,30 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
emailValue
=
this
.
info
.
email
this
.
setDate
()
this
.
setDate
()
},
},
methods
:
{
methods
:
{
updateInfo
()
{
const
reg
=
/^
([
a-zA-Z
]
|
[
0-9
])(\w
|-
)
+@
[
a-zA-Z0-9
]
+
\.([
a-zA-Z
]{2,4})
$/
if
(
!
reg
.
test
(
this
.
emailValue
))
{
this
.
$message
({
message
:
'The email format is incorrect'
,
type
:
'warning'
})
return
false
}
api
.
updateInfo
({
email
:
this
.
emailValue
})
.
then
(
response
=>
{
if
(
response
.
code
===
0
)
{
this
.
dialogVisible
=
false
this
.
info
.
email
=
this
.
emailValue
this
.
$forceUpdate
()
}
})
.
finally
(()
=>
{})
},
setDate
()
{
setDate
()
{
const
substringDate
=
'2021-01-01'
.
substring
(
0
,
'2021-01-01 01:01:00'
.
indexOf
(
' '
))
const
substringDate
=
'2021-01-01'
.
substring
(
0
,
'2021-01-01 01:01:00'
.
indexOf
(
' '
))
const
splitDate
=
substringDate
.
split
(
'-'
)
const
splitDate
=
substringDate
.
split
(
'-'
)
...
@@ -104,6 +145,16 @@ export default {
...
@@ -104,6 +145,16 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
// ::v-deep {
// .el-dialog__wrapper {
// background: rgba(0,0,0,0.3) !important;
// }
// }
.email-icon
{
color
:
'#4EAEEA'
;
font-size
:
20px
;
margin-left
:
10px
;
}
.profile-title
{
.profile-title
{
font-size
:
20px
;
font-size
:
20px
;
line-height
:
24px
;
line-height
:
24px
;
...
@@ -115,6 +166,11 @@ export default {
...
@@ -115,6 +166,11 @@ export default {
border-bottom
:
1px
solid
#e8e8e8
;
border-bottom
:
1px
solid
#e8e8e8
;
display
:
flex
;
display
:
flex
;
justify-content
:
space-around
;
justify-content
:
space-around
;
&
.is-pdf
{
.value
{
max-width
:
100px
!
important
;
}
}
.photo
{
.photo
{
width
:
146px
;
width
:
146px
;
min-width
:
146px
;
min-width
:
146px
;
...
@@ -165,7 +221,6 @@ export default {
...
@@ -165,7 +221,6 @@ export default {
text-align
:
right
;
text-align
:
right
;
}
}
.value
{
.value
{
max-width
:
100px
;
font-size
:
16px
;
font-size
:
16px
;
color
:
#838383
;
color
:
#838383
;
margin-left
:
19px
;
margin-left
:
19px
;
...
...
src/pages/shms/status/index.vue
浏览文件 @
41752b87
...
@@ -17,19 +17,24 @@
...
@@ -17,19 +17,24 @@
</div>
</div>
<div
class=
"btn"
@
click=
"generateReport"
>
{{
$t
(
'shmsLang.downloadBtn'
)
}}
</div>
<div
class=
"btn"
@
click=
"generateReport"
>
{{
$t
(
'shmsLang.downloadBtn'
)
}}
</div>
</div>
</div>
<div
class=
"pdf-down_box"
>
<profile
:info=
"info"
@
changes=
"changes"
/>
<degrees
:degreesItem=
"degreesItem"
/>
</div>
<vue-html2pdf
<vue-html2pdf
:show-layout=
"false"
:show-layout=
"false"
:float-layout=
"
fals
e"
:float-layout=
"
tru
e"
:enable-download=
"true"
:enable-download=
"true"
:preview-modal=
"
tru
e"
:preview-modal=
"
fals
e"
:paginate-elements-by-height=
"1000"
:paginate-elements-by-height=
"1000"
:manual-pagination=
"true"
filename=
"file"
filename=
"file"
pdf-content-width=
"100%"
pdf-content-width=
"100%"
ref=
"html2Pdf"
ref=
"html2Pdf"
>
>
<section
slot=
"pdf-content"
>
<section
slot=
"pdf-content"
>
<div
class=
"pdf-down_box"
>
<div
class=
"pdf-down_box"
>
<profile
:info=
"info"
@
changes=
"changes"
/>
<profile
:info=
"info"
:isPdf=
"true"
@
changes=
"changes"
/>
<degrees
:degreesItem=
"degreesItem"
/>
<degrees
:degreesItem=
"degreesItem"
/>
</div>
</div>
</section>
</section>
...
@@ -85,6 +90,11 @@ export default {
...
@@ -85,6 +90,11 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
::v-deep
{
.vue-html2pdf
{
display
:
none
;
}
}
.pdf-down_box
{
.pdf-down_box
{
padding
:
0
30px
;
padding
:
0
30px
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论