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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
134 additions
and
23 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 @@
...
@@ -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
}
.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
\ No newline at end of file
src/components/menu.vue
View file @
616681de
...
@@ -8,7 +8,9 @@
...
@@ -8,7 +8,9 @@
<font
class=
"fl"
>
概况
</font>
<font
class=
"fl"
>
概况
</font>
</a>
</a>
<a
class=
"item fl"
:class=
"
{'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}" @click="tabUrl(item)" v-for="item in tabs">
<a
class=
"item fl"
:class=
"
{'act':(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))}"
@click="tabUrl(item)" v-for="item in tabs">
<font
class=
"fl"
>
{{
item
.
title
}}
</font>
<font
class=
"fl"
>
{{
item
.
title
}}
</font>
<span
class=
"icon iconfont fl"
@
click
.
stop=
"closetab(item.path)"
>
</span>
<span
class=
"icon iconfont fl"
@
click
.
stop=
"closetab(item.path)"
>
</span>
</a>
</a>
...
@@ -175,9 +177,11 @@
...
@@ -175,9 +177,11 @@
name
:
''
name
:
''
},
},
rules
:
{
rules
:
{
name
:
[
name
:
[{
{
required
:
true
,
message
:
'请输入活动名称'
,
trigger
:
'blur'
}
required
:
true
,
]
message
:
'请输入活动名称'
,
trigger
:
'blur'
}]
}
}
}
}
},
},
...
@@ -203,14 +207,25 @@
...
@@ -203,14 +207,25 @@
},
},
methods
:
{
methods
:
{
getData
()
{
getData
()
{
var
userInfo_
=
sessionStorage
.
getItem
(
'userInfox'
);
if
(
userInfo_
)
{
this
.
userinfo
=
JSON
.
parse
(
userInfo_
);
}
else
{
this
.
$http
(
'get'
,
"/api/user/getuserinfo"
).
then
(
res
=>
{
this
.
$http
(
'get'
,
"/api/user/getuserinfo"
).
then
(
res
=>
{
this
.
userinfo
=
res
.
data
;
this
.
userinfo
=
res
.
data
;
}).
catch
(
err
=>
{
if
(
res
.
data
){
sessionStorage
.
setItem
(
'userInfox'
,
JSON
.
stringify
(
res
.
data
));
}
})
})
}
},
},
tabUrl
(
item
)
{
tabUrl
(
item
)
{
this
.
$router
.
push
({
path
:
item
.
path
,
query
:
item
.
query
})
this
.
$router
.
push
({
path
:
item
.
path
,
query
:
item
.
query
})
},
},
changePwd
()
{
changePwd
()
{
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
...
@@ -288,6 +303,7 @@
...
@@ -288,6 +303,7 @@
Util
.
delCookie
(
'token'
);
Util
.
delCookie
(
'token'
);
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
window
.
location
.
href
=
'/#/login'
;
window
.
location
.
href
=
'/#/login'
;
sessionStorage
.
removeItem
(
'userInfox'
)
history
.
go
(
0
);
history
.
go
(
0
);
}
else
{
}
else
{
Message
(
res
.
err_msg
);
Message
(
res
.
err_msg
);
...
...
src/filters/index.js
View file @
616681de
import
{
dateTimeFormate
,
dateTimeFormate1
}
from
'./formate'
;
import
{
dateTimeFormate
}
from
'./formate'
;
export
default
{
export
default
{
dateTimeFormate
,
dateTimeFormate
,
dateTimeFormate1
,
};
};
src/main.js
View file @
616681de
...
@@ -40,6 +40,7 @@ router.afterEach((to, from, next) => {
...
@@ -40,6 +40,7 @@ router.afterEach((to, from, next) => {
title
:
to
.
meta
.
title
,
title
:
to
.
meta
.
title
,
query
:
to
.
query
query
:
to
.
query
}))
==
-
1
)
{
}))
==
-
1
)
{
console
.
log
(
tabOldJson
)
tabOldJson
.
push
({
tabOldJson
.
push
({
path
:
to
.
path
,
path
:
to
.
path
,
title
:
to
.
meta
.
title
,
title
:
to
.
meta
.
title
,
...
...
src/views/Info/message.vue
View file @
616681de
...
@@ -2,55 +2,122 @@
...
@@ -2,55 +2,122 @@
<div
class=
"messagexk pagex"
>
<div
class=
"messagexk pagex"
>
<div
class=
"message-box"
>
<div
class=
"message-box"
>
<div
class=
"h3"
>
基本信息
</div>
<div
class=
"h3"
>
基本信息
</div>
<el-form
:model=
"form"
label-width=
"90px"
>
<el-form
:model=
"userinfo"
label-width=
"90px"
>
<el-form-item
label=
"公司名称"
>
<el-form-item
label=
"公司名称"
>
<el-input
v-model=
"form.keyword
"
placeholder=
""
disabled
></el-input>
<el-input
v-model=
"userinfo.company_name
"
placeholder=
""
disabled
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"联系人"
>
<el-form-item
label=
"联系人"
>
<el-input
v-model=
"form.keyword
"
></el-input>
<el-input
v-model=
"userinfo.contacts_name
"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"联系人电话"
>
<el-form-item
label=
"联系人电话"
>
<el-input
v-model=
"form.keyword
"
disabled
></el-input>
<el-input
v-model=
"userinfo.mobile
"
disabled
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"邮箱"
>
<el-form-item
label=
"邮箱"
>
<el-input
v-model=
"form.keyword
"
></el-input>
<el-input
v-model=
"userinfo.email
"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
>
<el-form-item
>
<div
class=
"submits
"
>
确认
</div>
<div
class=
"submits"
@
click=
"submituser
"
>
确认
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<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>
<Menu
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
Menu
from
"@/components/menu.vue"
;
import
{
NODE_ENVS
}
from
"../../ajax"
;
import
{
import
{
Form
,
Form
,
FormItem
,
FormItem
,
Input
,
Input
,
Upload
,
Message
Message
}
from
'element-ui'
}
from
'element-ui'
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
Input
)
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
Input
)
.
use
(
Upload
)
export
default
{
export
default
{
name
:
"message"
,
name
:
"message"
,
data
()
{
data
()
{
return
{
return
{
form
:{
upUrl
:
NODE_ENVS
+
'/api/user/setavatar'
,
keyword
:
""
userinfo
:
{
company_name
:
''
,
contacts_name
:
''
,
mobile
:
''
,
email
:
''
,
avatar
:
'http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg'
}
}
};
};
},
},
watch
:
{},
watch
:
{},
created
()
{
created
()
{
this
.
getUseInfo
()
},
},
computed
:
{},
computed
:
{},
methods
:
{
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
:
{
components
:
{
...
...
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