Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
616681de
authored
May 18, 2021
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
741b75b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
32 deletions
src/assets/css/info/message.less
src/assets/css/info/message.min.css
src/components/menu.vue
src/filters/index.js
src/main.js
src/views/Info/message.vue
src/assets/css/info/message.less
View file @
616681de
...
...
@@ -45,6 +45,32 @@
}
}
}
.up-box{
position: relative;
margin-left: 90px;
padding-top: 37px;
.avatar-uploader{
width: 98px;
height: 34px;
border-radius: 2px;
border: 1px solid #BEC9DF;
overflow: hidden;
line-height: 34px;
font-size: 14px;
color:#646B78;
.iconfont{font-size: 18px;position: relative;top:-1px;margin-left: 10px;}
&:hover,.el-upload--picture-card:hover, .el-upload:focus{
color:#1969F9!important;
border-color: #1969F9!important;
}
}
.imspre{
width:100px;
height:100px;
border-radius: 50px;
margin-bottom: 16px;
}
}
}
}
\ No newline at end of file
src/assets/css/info/message.min.css
View file @
616681de
.messagexk
.message-box
{
background
:
#fff
;
padding
:
20px
;
height
:
calc
(
100vh
-
136px
)}
.messagexk
.message-box
.h3
{
font-size
:
16px
;
color
:
#333
;
font-weight
:
bold
;
position
:
relative
}
.messagexk
.message-box
.h3
::before
{
content
:
""
;
width
:
3px
;
height
:
100%
;
background
:
#1969F9
;
position
:
absolute
;
left
:
-20px
;
top
:
0px
}
.messagexk
.message-box
.el-form
{
float
:
left
;
padding-top
:
35px
}
.messagexk
.message-box
.el-form
.el-form-item__label
{
color
:
#333
}
.messagexk
.message-box
.el-form
.el-input
{
width
:
280px
;
color
:
#333
}
.messagexk
.message-box
.el-form
.el-input.is-disabled
.el-input__inner
{
background
:
#F1F4FA
;
border
:
1px
solid
#F1F4FA
;
color
:
#333
}
.messagexk
.message-box
.el-form
.submits
{
margin-top
:
26px
;
cursor
:
pointer
;
width
:
76px
;
height
:
37px
;
line-height
:
37px
;
background
:
#1969F9
;
border-radius
:
2px
;
font-size
:
14px
;
color
:
#fff
;
text-align
:
center
}
.messagexk
.message-box
.el-form
.submits
:hover
{
background
:
#0050E0
}
\ No newline at end of file
.messagexk
.message-box
{
background
:
#fff
;
padding
:
20px
;
height
:
calc
(
100vh
-
136px
)}
.messagexk
.message-box
.h3
{
font-size
:
16px
;
color
:
#333
;
font-weight
:
bold
;
position
:
relative
}
.messagexk
.message-box
.h3
::before
{
content
:
""
;
width
:
3px
;
height
:
100%
;
background
:
#1969F9
;
position
:
absolute
;
left
:
-20px
;
top
:
0px
}
.messagexk
.message-box
.el-form
{
float
:
left
;
padding-top
:
35px
}
.messagexk
.message-box
.el-form
.el-form-item__label
{
color
:
#333
}
.messagexk
.message-box
.el-form
.el-input
{
width
:
280px
;
color
:
#333
}
.messagexk
.message-box
.el-form
.el-input.is-disabled
.el-input__inner
{
background
:
#F1F4FA
;
border
:
1px
solid
#F1F4FA
;
color
:
#333
}
.messagexk
.message-box
.el-form
.submits
{
margin-top
:
26px
;
cursor
:
pointer
;
width
:
76px
;
height
:
37px
;
line-height
:
37px
;
background
:
#1969F9
;
border-radius
:
2px
;
font-size
:
14px
;
color
:
#fff
;
text-align
:
center
}
.messagexk
.message-box
.el-form
.submits
:hover
{
background
:
#0050E0
}
.messagexk
.message-box
.up-box
{
position
:
relative
;
margin-left
:
90px
;
padding-top
:
37px
}
.messagexk
.message-box
.up-box
.avatar-uploader
{
width
:
98px
;
height
:
34px
;
border-radius
:
2px
;
border
:
1px
solid
#BEC9DF
;
overflow
:
hidden
;
line-height
:
34px
;
font-size
:
14px
;
color
:
#646B78
}
.messagexk
.message-box
.up-box
.avatar-uploader
.iconfont
{
font-size
:
18px
;
position
:
relative
;
top
:
-1px
;
margin-left
:
10px
}
.messagexk
.message-box
.up-box
.avatar-uploader
:hover
,
.messagexk
.message-box
.up-box
.avatar-uploader
.el-upload--picture-card
:hover
,
.messagexk
.message-box
.up-box
.avatar-uploader
.el-upload
:focus
{
color
:
#1969F9
!important
;
border-color
:
#1969F9
!important
}
.messagexk
.message-box
.up-box
.imspre
{
width
:
100px
;
height
:
100px
;
border-radius
:
50px
;
margin-bottom
:
16px
}
\ No newline at end of file
src/components/menu.vue
View file @
616681de
This diff is collapsed.
Click to expand it.
src/filters/index.js
View file @
616681de
import
{
dateTimeFormate
,
dateTimeFormate1
}
from
'./formate'
;
import
{
dateTimeFormate
}
from
'./formate'
;
export
default
{
dateTimeFormate
,
dateTimeFormate1
,
};
src/main.js
View file @
616681de
...
...
@@ -40,6 +40,7 @@ router.afterEach((to, from, next) => {
title
:
to
.
meta
.
title
,
query
:
to
.
query
}))
==
-
1
)
{
console
.
log
(
tabOldJson
)
tabOldJson
.
push
({
path
:
to
.
path
,
title
:
to
.
meta
.
title
,
...
...
src/views/Info/message.vue
View file @
616681de
<
template
>
<div
class=
"messagexk pagex"
>
<div
class=
"message-box"
>
<div
class=
"h3"
>
基本信息
</div>
<el-form
:model=
"form"
label-width=
"90px"
>
<el-form-item
label=
"公司名称"
>
<el-input
v-model=
"form.keyword
"
placeholder=
""
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"联系人"
>
<el-input
v-model=
"form.keyword
"
></el-input>
</el-form-item>
<el-form-item
label=
"联系人电话"
>
<el-input
v-model=
"form.keyword
"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"邮箱"
>
<el-input
v-model=
"form.keyword
"
></el-input>
</el-form-item>
<el-form-item
>
<div
class=
"submits
"
>
确认
</div>
</el-form-item>
<div
class=
"messagexk pagex"
>
<div
class=
"message-box"
>
<div
class=
"h3"
>
基本信息
</div>
<el-form
:model=
"userinfo"
label-width=
"90px"
>
<el-form-item
label=
"公司名称"
>
<el-input
v-model=
"userinfo.company_name
"
placeholder=
""
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"联系人"
>
<el-input
v-model=
"userinfo.contacts_name
"
></el-input>
</el-form-item>
<el-form-item
label=
"联系人电话"
>
<el-input
v-model=
"userinfo.mobile
"
disabled
></el-input>
</el-form-item>
<el-form-item
label=
"邮箱"
>
<el-input
v-model=
"userinfo.email
"
></el-input>
</el-form-item>
<el-form-item
>
<div
class=
"submits"
@
click=
"submituser
"
>
确认
</div>
</el-form-item>
</el-form>
</div>
<Menu/>
<div
class=
"fl up-box"
>
<img
:src=
"userinfo.avatar"
class=
"imspre"
/>
<el-upload
class=
"avatar-uploader"
:action=
"upUrl"
:show-file-list=
"false"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
>
<span
class=
"icon iconfont fl"
>
</span>
<div
class=
"fl"
>
更换头像
</div>
</el-upload>
</div>
</div>
<Menu
/>
</div>
</
template
>
<
script
>
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
{
NODE_ENVS
}
from
"../../ajax"
;
import
{
Form
,
FormItem
,
Input
,
Message
Upload
,
Message
}
from
'element-ui'
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
Input
)
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
Input
)
.
use
(
Upload
)
export
default
{
name
:
"message"
,
data
()
{
return
{
form
:{
keyword
:
""
upUrl
:
NODE_ENVS
+
'/api/user/setavatar'
,
userinfo
:
{
company_name
:
''
,
contacts_name
:
''
,
mobile
:
''
,
email
:
''
,
avatar
:
'http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg'
}
};
},
watch
:
{},
created
()
{
this
.
getUseInfo
()
},
computed
:
{},
methods
:
{
getUseInfo
()
{
var
userInfo_
=
sessionStorage
.
getItem
(
'userInfox'
);
if
(
userInfo_
)
{
this
.
userinfo
=
JSON
.
parse
(
userInfo_
);
}
else
{
this
.
$http
(
'get'
,
"/api/user/getuserinfo"
).
then
(
res
=>
{
this
.
userinfo
=
res
.
data
;
if
(
res
.
data
)
{
sessionStorage
.
setItem
(
'userInfox'
,
JSON
.
stringify
(
res
.
data
));
}
})
}
},
submituser
()
{
this
.
$http
(
'post'
,
"/api/user/setuserinfo"
,
{
email
:
this
.
userinfo
.
email
,
contacts_name
:
this
.
userinfo
.
contacts_name
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
Message
(
"提交成功"
);
sessionStorage
.
removeItem
(
'userInfox'
)
}
else
{
Message
(
res
.
err_msg
);
}
})
},
handleAvatarSuccess
(
res
,
file
)
{
if
(
res
.
err_code
===
0
)
{
Message
(
"设置成功"
)
this
.
userinfo
.
avatar
=
URL
.
createObjectURL
(
file
.
raw
);
sessionStorage
.
removeItem
(
'userInfox'
)
}
else
{
Message
(
res
.
err_msg
);
}
},
beforeAvatarUpload
(
file
)
{
const
isJPG
=
file
.
type
===
'image/jpeg'
||
'image/png'
||
'image/jpg'
||
'image/gif'
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
5
;
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG、PNG、GIF 格式!'
);
}
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'上传头像图片大小不能超过 5MB!'
);
}
return
isJPG
&&
isLt2M
;
}
},
components
:
{
...
...
@@ -59,5 +126,5 @@
};
</
script
>
<
style
scoped
>
@import
"../../assets/css/info/message.min.css"
;
@import
"../../assets/css/info/message.min.css"
;
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment