Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 74fc57ea
authored
Jul 29, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化部分代码
1 parent
a2260850
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
69 deletions
linkwe-ui/src/layout/components/Navbar.vue
linkwe-ui/src/store/modules/user.js
linkwe-ui/src/views/conversation/component/chat.vue
linkwe-ui/src/views/conversation/component/curList.vue
linkwe-ui/src/views/conversation/component/customerList.vue
linkwe-ui/src/views/conversation/component/groupList.vue
linkwe-ui/src/views/conversation/component/insideList.vue
linkwe-ui/src/views/conversation/component/list.vue
linkwe-ui/src/views/index.vue
linkwe-ui/src/layout/components/Navbar.vue
View file @
74fc57e
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div
class=
"right-menu"
>
<div
class=
"right-menu"
>
<
template
v-if=
"device !== 'mobile'"
>
<
template
v-if=
"device !== 'mobile'"
>
<
search
id=
"header-search"
class=
"right-menu-item"
/
>
<
!--
<search
id=
"header-search"
class=
"right-menu-item"
/>
--
>
<el-tooltip
content=
"源码地址"
effect=
"dark"
placement=
"bottom"
>
<el-tooltip
content=
"源码地址"
effect=
"dark"
placement=
"bottom"
>
<div
class=
"right-menu-item hover-effect"
>
<div
class=
"right-menu-item hover-effect"
>
...
@@ -27,7 +27,8 @@
...
@@ -27,7 +27,8 @@
<el-tooltip
content=
"文档地址"
effect=
"dark"
placement=
"bottom"
>
<el-tooltip
content=
"文档地址"
effect=
"dark"
placement=
"bottom"
>
<div
class=
"right-menu-item hover-effect"
>
<div
class=
"right-menu-item hover-effect"
>
<svg-icon
icon-class=
"question"
@
click=
"goto(1)"
/>
<i
class=
"el-icon-reading document"
@
click=
"goto(1)"
></i>
<!--
<svg-icon
icon-class=
"question"
@
click=
"goto(1)"
/>
-->
</div>
</div>
</el-tooltip>
</el-tooltip>
...
@@ -71,7 +72,7 @@ export default {
...
@@ -71,7 +72,7 @@ export default {
components
:
{
components
:
{
Logo
,
Logo
,
Search
,
Search
,
screenfull
,
screenfull
},
},
computed
:
{
computed
:
{
...
mapGetters
([
'avatar'
,
'device'
,
'permission_routes'
]),
...
mapGetters
([
'avatar'
,
'device'
,
'permission_routes'
]),
...
@@ -82,10 +83,10 @@ export default {
...
@@ -82,10 +83,10 @@ export default {
set
(
val
)
{
set
(
val
)
{
this
.
$store
.
dispatch
(
'settings/changeSetting'
,
{
this
.
$store
.
dispatch
(
'settings/changeSetting'
,
{
key
:
'showSettings'
,
key
:
'showSettings'
,
value
:
val
,
value
:
val
})
})
}
,
}
}
,
}
},
},
mounted
()
{
mounted
()
{
// console.log(this.permission_routes)
// console.log(this.permission_routes)
...
@@ -95,7 +96,7 @@ export default {
...
@@ -95,7 +96,7 @@ export default {
this
.
$confirm
(
'确定注销并退出系统吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定注销并退出系统吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
this
.
$store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
href
=
'/'
location
.
href
=
'/'
...
@@ -115,8 +116,8 @@ export default {
...
@@ -115,8 +116,8 @@ export default {
}
else
{
}
else
{
window
.
open
(
path
,
'_blank'
)
window
.
open
(
path
,
'_blank'
)
}
}
}
,
}
}
,
}
}
}
</
script
>
</
script
>
...
@@ -159,6 +160,10 @@ export default {
...
@@ -159,6 +160,10 @@ export default {
background
:
rgba
(
0
,
0
,
0
,
0.025
);
background
:
rgba
(
0
,
0
,
0
,
0.025
);
}
}
}
}
.document
{
font-size
:
20px
;
}
}
}
.avatar-container
{
.avatar-container
{
...
...
linkwe-ui/src/store/modules/user.js
View file @
74fc57e
...
@@ -5,6 +5,7 @@ const user = {
...
@@ -5,6 +5,7 @@ const user = {
state
:
{
state
:
{
token
:
getToken
(),
token
:
getToken
(),
name
:
''
,
name
:
''
,
companyName
:
''
,
avatar
:
''
,
avatar
:
''
,
roles
:
[],
roles
:
[],
permissions
:
[]
permissions
:
[]
...
@@ -36,55 +37,66 @@ const user = {
...
@@ -36,55 +37,66 @@ const user = {
const
code
=
userInfo
.
code
const
code
=
userInfo
.
code
const
uuid
=
userInfo
.
uuid
const
uuid
=
userInfo
.
uuid
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
login
(
username
,
password
,
code
,
uuid
).
then
(
res
=>
{
login
(
username
,
password
,
code
,
uuid
)
setToken
(
res
.
token
)
.
then
((
res
)
=>
{
commit
(
'SET_TOKEN'
,
res
.
token
)
setToken
(
res
.
token
)
resolve
()
commit
(
'SET_TOKEN'
,
res
.
token
)
}).
catch
(
error
=>
{
resolve
()
reject
(
error
)
})
})
.
catch
((
error
)
=>
{
reject
(
error
)
})
})
})
},
},
// 获取用户信息
// 获取用户信息
GetInfo
({
commit
,
state
})
{
GetInfo
({
commit
,
state
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getInfo
(
state
.
token
).
then
(
res
=>
{
getInfo
(
state
.
token
)
const
user
=
res
.
user
.
then
((
res
)
=>
{
const
avatar
=
user
.
avatar
==
""
?
require
(
"@/assets/image/profile.jpg"
)
:
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
;
const
user
=
res
.
user
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
// 验证返回的roles是否是一个非空数组
const
avatar
=
commit
(
'SET_ROLES'
,
res
.
roles
)
user
.
avatar
==
''
commit
(
'SET_PERMISSIONS'
,
res
.
permissions
)
?
require
(
'@/assets/image/profile.jpg'
)
}
else
{
:
process
.
env
.
VUE_APP_BASE_API
+
user
.
avatar
commit
(
'SET_ROLES'
,
[
'ROLE_DEFAULT'
])
if
(
res
.
roles
&&
res
.
roles
.
length
>
0
)
{
}
// 验证返回的roles是否是一个非空数组
commit
(
'SET_NAME'
,
user
.
userName
)
commit
(
'SET_ROLES'
,
res
.
roles
)
commit
(
'SET_AVATAR'
,
avatar
)
commit
(
'SET_PERMISSIONS'
,
res
.
permissions
)
resolve
(
res
)
}
else
{
}).
catch
(
error
=>
{
commit
(
'SET_ROLES'
,
[
'ROLE_DEFAULT'
])
reject
(
error
)
}
})
commit
(
'SET_NAME'
,
user
.
userName
)
commit
(
'SET_AVATAR'
,
avatar
)
state
.
companyName
=
user
.
companyName
resolve
(
res
)
})
.
catch
((
error
)
=>
{
reject
(
error
)
})
})
})
},
},
// 退出系统
// 退出系统
LogOut
({
commit
,
state
})
{
LogOut
({
commit
,
state
})
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
logout
(
state
.
token
).
then
(()
=>
{
logout
(
state
.
token
)
commit
(
'SET_TOKEN'
,
''
)
.
then
(()
=>
{
commit
(
'SET_ROLES'
,
[])
commit
(
'SET_TOKEN'
,
''
)
commit
(
'SET_PERMISSIONS'
,
[])
commit
(
'SET_ROLES'
,
[])
removeToken
()
commit
(
'SET_PERMISSIONS'
,
[])
resolve
()
removeToken
()
}).
catch
(
error
=>
{
resolve
()
reject
(
error
)
})
})
.
catch
((
error
)
=>
{
reject
(
error
)
})
})
})
},
},
// 前端 登出
// 前端 登出
FedLogOut
({
commit
})
{
FedLogOut
({
commit
})
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
(
resolve
)
=>
{
commit
(
'SET_TOKEN'
,
''
)
commit
(
'SET_TOKEN'
,
''
)
removeToken
()
removeToken
()
resolve
()
resolve
()
...
...
linkwe-ui/src/views/conversation/component/chat.vue
View file @
74fc57e
...
@@ -200,11 +200,6 @@ export default {
...
@@ -200,11 +200,6 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
//
*
{
//
padding
:
0
;
//
margin
:
0
;
//
}
#videoPlayer
/
deep
/
.vjs-tech
{
#videoPlayer
/
deep
/
.vjs-tech
{
height
:
450px
;
height
:
450px
;
}
}
...
...
linkwe-ui/src/views/conversation/component/curList.vue
View file @
74fc57e
...
@@ -56,13 +56,6 @@ export default {
...
@@ -56,13 +56,6 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
//
*
{
//
padding
:
0
;
//
margin
:
0
;
//
}
.fl
{
float
:
left
;
}
.list
{
.list
{
overflow-y
:
scroll
;
overflow-y
:
scroll
;
height
:
652px
;
height
:
652px
;
...
@@ -73,9 +66,6 @@ export default {
...
@@ -73,9 +66,6 @@ export default {
/
deep
/
.el-loading-spinner
{
/
deep
/
.el-loading-spinner
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.fr
{
float
:
right
;
}
.gray
{
.gray
{
color
:
#999
;
color
:
#999
;
}
}
...
...
linkwe-ui/src/views/conversation/component/customerList.vue
View file @
74fc57e
...
@@ -66,9 +66,6 @@ export default {
...
@@ -66,9 +66,6 @@ export default {
/
deep
/
.el-loading-spinner
{
/
deep
/
.el-loading-spinner
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.fr
{
float
:
right
;
}
.gray
{
.gray
{
color
:
#999
;
color
:
#999
;
}
}
...
...
linkwe-ui/src/views/conversation/component/groupList.vue
View file @
74fc57e
...
@@ -101,9 +101,7 @@ export default {
...
@@ -101,9 +101,7 @@ export default {
/
deep
/
.el-loading-spinner
{
/
deep
/
.el-loading-spinner
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.fr
{
float
:
right
;
}
.gray
{
.gray
{
color
:
#999
;
color
:
#999
;
}
}
...
...
linkwe-ui/src/views/conversation/component/insideList.vue
View file @
74fc57e
...
@@ -59,9 +59,7 @@ export default {
...
@@ -59,9 +59,7 @@ export default {
/
deep
/
.el-loading-spinner
{
/
deep
/
.el-loading-spinner
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.fr
{
float
:
right
;
}
.gray
{
.gray
{
color
:
#999
;
color
:
#999
;
}
}
...
...
linkwe-ui/src/views/conversation/component/list.vue
View file @
74fc57e
...
@@ -57,9 +57,6 @@ export default {
...
@@ -57,9 +57,6 @@ export default {
/
deep
/
.el-loading-spinner
{
/
deep
/
.el-loading-spinner
{
margin-top
:
20px
;
margin-top
:
20px
;
}
}
.fr
{
float
:
right
;
}
.gray
{
.gray
{
color
:
#999
;
color
:
#999
;
}
}
...
...
linkwe-ui/src/views/index.vue
View file @
74fc57e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment