Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart-office-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart-office-platform
Commits
3c68eb62
Commit
3c68eb62
authored
Aug 02, 2023
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tui
parent
bff937dd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
228 additions
and
158 deletions
+228
-158
smart-office-manager-ui/admin/.env
smart-office-manager-ui/admin/.env
+1
-0
smart-office-manager-ui/admin/public/index.html
smart-office-manager-ui/admin/public/index.html
+13
-7
smart-office-manager-ui/admin/src/components/Header.vue
smart-office-manager-ui/admin/src/components/Header.vue
+141
-98
smart-office-manager-ui/admin/src/views/SSO.vue
smart-office-manager-ui/admin/src/views/SSO.vue
+26
-15
smart-office-manager-ui/admin/src/views/login/login.vue
smart-office-manager-ui/admin/src/views/login/login.vue
+20
-12
smart-office-manager-ui/admin/vue.config.js
smart-office-manager-ui/admin/vue.config.js
+27
-26
No files found.
smart-office-manager-ui/admin/.env
View file @
3c68eb62
...
...
@@ -14,3 +14,4 @@ VUE_APP_PORTAL_PORT = 21085
# 站点请求地址
VUE_APP_SITETREE_URL = http://8.136.255.30:11078/base/site/siteTree
VUE_APP_API_appName = '智慧办公管理平台'
\ No newline at end of file
smart-office-manager-ui/admin/public/index.html
View file @
3c68eb62
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
智慧办公平台
</title>
<link
rel=
"stylesheet"
href=
"https://unpkg.com/element-ui@2.15.5/lib/theme-chalk/index.css"
>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
/>
<title><
%=
VUE_APP_API_appName
%
></title>
<link
rel=
"stylesheet"
href=
"https://unpkg.com/element-ui@2.15.5/lib/theme-chalk/index.css"
/>
</head>
<body>
<noscript>
<strong>
We're sorry but app doesn't work properly without JavaScript enabled. Please enable it to continue.
</strong>
<strong
>
We're sorry but app doesn't work properly without JavaScript enabled.
Please enable it to continue.
</strong
>
</noscript>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
...
...
smart-office-manager-ui/admin/src/components/Header.vue
View file @
3c68eb62
...
...
@@ -6,36 +6,48 @@
<div
class=
"layout-menu flex flex-1"
>
<!-- logo -->
<div
class=
"layout-logo flex"
>
<i
class=
"el-icon-menu"
@
click=
'showMobileMenu=!showMobileMenu'
>
</i>
<i
class=
"el-icon-menu"
@
click=
"showMobileMenu = !showMobileMenu"
>
</i>
<router-link
to=
"/"
>
<img
src=
"../assets/images/logo.png"
style=
"margin-bottom:5px"
height=
"40"
alt=
""
>
<b
style=
"color:white;font-size:18px;"
>
智慧办公系统
</b>
<img
:src=
"sysLogo ? sysLogo : require('../assets/images/logo.png')"
style=
"margin-bottom:5px"
height=
"40"
alt=
""
/>
<b
style=
"color:white;font-size:18px;"
>
{{
sysName
?
sysName
:
"
智慧办公系统
"
}}
</b
>
</router-link>
</div>
<!-- 一级菜单 -->
<ul
class=
"menu-list flex"
>
<li
v-for=
'item in menu'
:key=
'item.id'
>
<router-link
:to=
"item.path"
:active=
'submenu.path === item.path'
:title=
"item.name"
>
<i
:class=
"'el-icon-'+item.icon"
></i>
{{
item
.
name
}}
<li
v-for=
"item in menu"
:key=
"item.id"
>
<router-link
:to=
"item.path"
:active=
"submenu.path === item.path"
:title=
"item.name"
>
<i
:class=
"'el-icon-' + item.icon"
></i>
{{
item
.
name
}}
</router-link>
</li>
</ul>
</div>
<div
class=
"layout-profile"
>
<!--
<span
class=
"el-dropdown-link"
>
<!--
<span
class=
"el-dropdown-link"
>
{{
userData
.
currUserName
}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
-->
<el-dropdown
@
command=
"handleCommand"
>
<el-dropdown
@
command=
"handleCommand"
>
<span
class=
"el-dropdown-link"
style=
"color:white"
>
{{
userData
.
currUserName
}}
{{
userData
.
currUserName
}}
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"update"
>
修改密码
</el-dropdown-item>
<el-dropdown-item
command=
"logout"
>
退出登录
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -44,23 +56,33 @@
</div>
<!-- 一级菜单 -->
<ul
class=
"mobile-menu-list flex flex-pack-justify"
v-if=
'showMobileMenu'
>
<li
v-for=
'item in menu'
:key=
'item.id'
>
<router-link
:to=
"item.path"
:active=
'submenu.path === item.path'
:title=
"item.name"
>
<i
:class=
"'el-icon-'+item.icon"
></i>
{{
item
.
name
}}
<ul
class=
"mobile-menu-list flex flex-pack-justify"
v-if=
"showMobileMenu"
>
<li
v-for=
"item in menu"
:key=
"item.id"
>
<router-link
:to=
"item.path"
:active=
"submenu.path === item.path"
:title=
"item.name"
>
<i
:class=
"'el-icon-' + item.icon"
></i>
{{
item
.
name
}}
</router-link>
</li>
</ul>
<!-- 二级菜单 -->
<div
class=
"layout-submenu-wrapper flex"
v-if=
'submenu.children && submenu.children.length'
>
<div
class=
"layout-submenu-wrapper flex"
v-if=
"submenu.children && submenu.children.length"
>
<div
class=
"layout-submenu"
>
<ul
class=
"submenu-list flex"
>
<li
v-for=
'item in submenu.children'
:key=
'item.id'
>
<a
:href=
"item.path"
target=
"blank"
v-if=
'item.isOut'
>
{{
item
.
name
}}
</a>
<router-link
:to=
"item.path"
:active=
'group === item.path'
v-else
>
{{
item
.
name
}}
</router-link>
<li
v-for=
"item in submenu.children"
:key=
"item.id"
>
<a
:href=
"item.path"
target=
"blank"
v-if=
"item.isOut"
>
{{
item
.
name
}}
</a>
<router-link
:to=
"item.path"
:active=
"group === item.path"
v-else
>
{{
item
.
name
}}
</router-link>
</li>
</ul>
</div>
...
...
@@ -73,161 +95,182 @@ export default {
name
:
"
Header
"
,
methods
:
{
handleCommand
(
key
)
{
if
(
key
===
'
update
'
)
{
this
.
$router
.
push
(
'
/login/updatePwd
'
)
if
(
key
===
"
update
"
)
{
this
.
$router
.
push
(
"
/login/updatePwd
"
);
}
if
(
key
===
'
logout
'
)
{
this
.
logout
()
if
(
key
===
"
logout
"
)
{
this
.
logout
()
;
}
},
// 退出登录
logout
()
{
this
.
$post
(
'
/login/logout
'
).
then
(
data
=>
{}).
catch
(
error
=>
{}).
then
(()
=>
{
this
.
$message
.
success
(
'
已退出登录
'
);
this
.
$store
.
commit
(
'
logout
'
);
this
.
$router
.
replace
(
'
/login
'
);
})
}
this
.
$post
(
"
/login/logout
"
)
.
then
((
data
)
=>
{})
.
catch
((
error
)
=>
{})
.
then
(()
=>
{
this
.
$message
.
success
(
"
已退出登录
"
);
this
.
$store
.
commit
(
"
logout
"
);
this
.
$router
.
replace
(
"
/login
"
);
});
},
},
beforeDestroy
()
{
console
.
log
(
"
beforeDestroy
"
);
//window.removeEventListener("message", this.getsocketData, false);
},
mounted
()
{
},
created
()
{},
computed
:
{
group
()
{
const
relativeGroup
=
this
.
$store
.
state
.
group
;
if
(
relativeGroup
)
{
if
(
relativeGroup
)
{
return
relativeGroup
;
}
let
groupArray
=
this
.
$route
.
path
.
split
(
'
/
'
);
let
groupArray
=
this
.
$route
.
path
.
split
(
"
/
"
);
let
group
=
this
.
$route
.
path
;
let
type
=
groupArray
.
pop
();
if
([
'
add
'
,
'
edit
'
,
'
view
'
,
'
new
'
,
'
importView
'
,
'
resetPwdView
'
].
indexOf
(
type
)
>
-
1
){
groupArray
.
push
(
'
list
'
);
group
=
groupArray
.
join
(
'
/
'
)
if
(
[
"
add
"
,
"
edit
"
,
"
view
"
,
"
new
"
,
"
importView
"
,
"
resetPwdView
"
].
indexOf
(
type
)
>
-
1
)
{
groupArray
.
push
(
"
list
"
);
group
=
groupArray
.
join
(
"
/
"
);
}
return
group
;
},
relativeGroup
()
{
return
this
.
$store
.
state
.
group
return
this
.
$store
.
state
.
group
;
},
flat
()
{
return
this
.
userData
.
flat
return
this
.
userData
.
flat
;
},
menu
()
{
console
.
log
(
"
userData
"
,
this
.
userData
)
if
(
!
this
.
userData
.
barList
)
return
[];
return
this
.
userData
.
barList
.
map
(
item
=>
{
const
url
=
item
.
url
?
item
.
url
:
(
item
.
childList
[
0
]
?
(
item
.
childList
[
0
].
url
||
''
)
:
''
);
console
.
log
(
"
userData
"
,
this
.
userData
);
if
(
!
this
.
userData
.
barList
)
return
[];
return
this
.
userData
.
barList
.
map
((
item
)
=>
{
const
url
=
item
.
url
?
item
.
url
:
item
.
childList
[
0
]
?
item
.
childList
[
0
].
url
||
""
:
""
;
return
{
name
:
item
.
name
,
path
:
url
,
id
:
item
.
id
,
icon
:
item
.
imgPath
,
children
:
item
.
childList
.
map
(
sub
=>
{
children
:
item
.
childList
.
map
(
(
sub
)
=>
{
return
{
name
:
sub
.
name
,
path
:
sub
.
url
?
sub
.
url
:
(
sub
.
childList
[
0
]
?
(
sub
.
childList
[
0
].
url
||
0
)
:
''
),
path
:
sub
.
url
?
sub
.
url
:
sub
.
childList
[
0
]
?
sub
.
childList
[
0
].
url
||
0
:
""
,
id
:
sub
.
id
,
parentId
:
sub
.
parentId
,
icon
:
sub
.
imgPath
,
isOut
:
/^https
?\:\/\/
/
.
test
(
sub
.
url
)
}
})
}
})
isOut
:
/^https
?\:\/\/
/
.
test
(
sub
.
url
)
,
}
;
})
,
}
;
})
;
},
submenu
()
{
if
(
!
this
.
menu
.
length
)
return
{};
if
(
!
this
.
menu
.
length
)
return
{};
let
matchMenu
=
{};
this
.
menu
.
forEach
(
item
=>
{
this
.
menu
.
forEach
(
(
item
)
=>
{
const
menu
=
item
;
item
.
children
.
forEach
(
item
=>
{
if
(
item
.
path
===
this
.
group
)
{
item
.
children
.
forEach
(
(
item
)
=>
{
if
(
item
.
path
===
this
.
group
)
{
matchMenu
=
menu
;
return
;
}
})
})
return
matchMenu
})
;
})
;
return
matchMenu
;
},
userData
()
{
return
this
.
$store
.
state
.
userData
;
}
}
,
},
data
()
{
return
{
showMobileMenu
:
false
,
}
}
}
sysName
:
localStorage
.
getItem
(
"
sysName
"
)
?
localStorage
.
getItem
(
"
sysName
"
)
:
""
,
sysLogo
:
localStorage
.
getItem
(
"
sysLogo
"
)
?
localStorage
.
getItem
(
"
sysLogo
"
)
:
""
,
};
},
};
</
script
>
<
style
lang=
"less"
>
.layout-header{
.mobile-menu-list{display: none}
.layout-menu-wrapper{
.layout-header {
.mobile-menu-list {
display: none;
}
.layout-menu-wrapper {
height: 50px;
line-height: 50px;
font-size: 14px;
color: #eee;
background: #1848c8;
.layout-logo{
.layout-logo {
height: 50px;
.el-icon-menu{display: none}
a{
.el-icon-menu {
display: none;
}
a {
margin: auto;
}
img{
img
{
vertical-align: middle;
}
}
.menu-list{
li{
a{
.menu-list
{
li
{
a
{
display: block;
padding: 0 12px;
height: 100%;
color: #eee;
&.router-link-active,
&[active]{
&[active]
{
//background: #1890ff;
color: #fff;
list-style-type:none;
border-bottom:3px solid #fff;
list-style-type:
none;
border-bottom:
3px solid #fff;
padding-bottom: 2px;
}
}
}
}
.layout-profile{
.layout-profile
{
padding-right: 30px;
}
}
.layout-submenu-wrapper{
.layout-submenu-wrapper
{
padding-left: 20px;
background: #fff;
height: 42px;
border-bottom: 1px solid #ededed;
.layout-title{
.layout-title
{
font-size: 18px;
height: 40px;
line-height: 40px;
color: #333;
}
.layout-submenu{
.layout-submenu
{
margin-left: 15px;
white-space: nowrap;
overflow: auto;
li{
a{
li
{
a
{
display: block;
padding: 0 10px;
height: 40px;
...
...
@@ -235,7 +278,7 @@ export default {
font-size: 14px;
color: #666;
&.router-link-active,
&[active]{
&[active]
{
color: #1890ff;
border-bottom: 2px solid #1890ff;
}
...
...
@@ -245,48 +288,48 @@ export default {
}
}
@media screen and (max-width: 800px){
@media screen and (max-width: 800px)
{
.layout-header {
.mobile-menu-list{
.mobile-menu-list
{
display: flex;
background: #222333;
padding: 0 10px;
li{
li
{
padding: 8px 5px;
a{
a
{
width: 1em;
display: block;
color: #eee;
font-size: 14px;
word-break: break-all;
&.router-link-active,
&[active]{
&[active]
{
color: #1890ff;
}
}
}
}
.layout-submenu-wrapper{
.layout-submenu-wrapper
{
padding-left: 0;
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.layout-menu-wrapper {
width: 100%;
.layout-logo{
.layout-logo
{
width: 40px;
.el-icon-menu{
.el-icon-menu
{
margin: auto;
display: inline-block;
}
a{
a
{
display: none;
}
}
.menu-list{
.menu-list
{
display: none;
}
li{
li
{
width: 100%;
}
}
...
...
smart-office-manager-ui/admin/src/views/SSO.vue
View file @
3c68eb62
...
...
@@ -7,23 +7,34 @@
<
script
>
export
default
{
mounted
()
{
let
token
=
this
.
$route
.
query
.
token
console
.
log
(
"
token:
"
+
token
)
if
(
token
)
{
let
token
=
this
.
$route
.
query
.
token
;
if
(
token
)
{
this
.
$route
.
query
.
sysName
?
localStorage
.
setItem
(
"
sysName
"
,
this
.
$route
.
query
.
sysName
)
:
""
;
this
.
$route
.
query
.
sysLogo
?
localStorage
.
setItem
(
"
sysLogo
"
,
this
.
$route
.
query
.
sysLogo
)
:
""
;
process
.
env
.
VUE_APP_API_appName
=
this
.
$route
.
query
.
sysName
?
this
.
$route
.
query
.
sysName
:
process
.
env
.
VUE_APP_API_appName
;
window
.
sessionStorage
.
setItem
(
"
token
"
,
token
);
this
.
$router
.
push
(
'
/index
'
)
// 有token直接跳转首页
}
else
{
this
.
$router
.
push
(
"
/index
"
);
// 有token直接跳转首页
}
else
{
this
.
$message
({
message
:
'
没有权限,正在跳转登录页面...
'
,
center
:
true
});
setTimeout
(
function
(){
window
.
location
.
href
=
process
.
env
.
VUE_APP_PORTAL_URL
==
'
undefined
'
?
'
http://192.168.0.98:11072
'
:
process
.
env
.
VUE_APP_PORTAL_URL
//this.$router.push('/login')
},
1000
)
message
:
"
没有权限,正在跳转登录页面...
"
,
center
:
true
,
});
setTimeout
(
function
()
{
window
.
location
.
href
=
process
.
env
.
VUE_APP_PORTAL_URL
==
"
undefined
"
?
"
http://192.168.0.98:11072
"
:
process
.
env
.
VUE_APP_PORTAL_URL
;
//this.$router.push('/login')
},
1000
);
}
}
}
}
,
}
;
</
script
>
<
style
>
...
...
@@ -31,4 +42,4 @@ export default {
width
:
300px
;
height
:
100px
;
}
</
style
>
\ No newline at end of file
</
style
>
smart-office-manager-ui/admin/src/views/login/login.vue
View file @
3c68eb62
...
...
@@ -3,32 +3,40 @@
<
template
>
<div
class=
"page page-login flex flex-v"
>
<div
class=
"form-wrap flex flex-1"
>
<el-form
@
submit.prevent=
'onSubmit'
ref=
"form"
:model=
"form"
label-width=
"80px"
size=
"small"
>
<h1>
智慧办公管理平台
</h1>
<el-form
@
submit.prevent=
"onSubmit"
ref=
"form"
:model=
"form"
label-width=
"80px"
size=
"small"
>
<h1>
{{
sysName
}}
</h1>
<el-form-item
label=
"用户名"
>
<el-input
v-model=
"form.loginName"
></el-input>
</el-form-item>
<el-form-item
label=
"密码"
>
<el-input
v-model=
"form.password"
type=
'password'
></el-input>
<el-input
v-model=
"form.password"
type=
"password"
></el-input>
</el-form-item>
<el-form-item
size=
"large"
>
<el-button
type=
"primary"
native-type=
'submit'
:loading=
'loading'
@
click=
'onSubmit'
>
登录
</el-button>
<el-button
type=
"primary"
native-type=
"submit"
:loading=
"loading"
@
click=
"onSubmit"
>
登录
</el-button
>
</el-form-item>
</el-form>
</div>
<div
class=
"footer"
>
</div>
<div
class=
"footer"
></div>
</div>
</
template
>
<
script
>
export
default
{
name
:
"
login
"
,
created
()
{
},
created
()
{},
methods
:
{
login
()
{
this
.
loading
=
true
;
...
...
@@ -38,7 +46,7 @@ export default {
},
loginSuccess
({
data
})
{
this
.
$store
.
commit
(
"
setUserData
"
,
data
);
console
.
log
(
"
userData
"
,
this
.
$store
.
state
.
userData
)
console
.
log
(
"
userData
"
,
this
.
$store
.
state
.
userData
);
this
.
$router
.
replace
({
path
:
this
.
redirect
,
});
...
...
@@ -72,6 +80,7 @@ export default {
loginName
:
""
,
password
:
""
,
},
sysName
:
process
.
env
.
VUE_APP_API_appName
,
};
},
};
...
...
@@ -120,4 +129,3 @@ export default {
}
}
</
style
>
smart-office-manager-ui/admin/vue.config.js
View file @
3c68eb62
module
.
exports
=
{
productionSourceMap
:
false
,
assetsDir
:
'
s
'
,
configureWebpack
:
{
externals
:
{
vue
:
"
Vue
"
,
vuex
:
"
Vuex
"
,
"
vue-router
"
:
"
VueRouter
"
,
"
element-ui
"
:
"
ELEMENT
"
},
},
lintOnSave
:
false
,
devServer
:
{
inline
:
true
,
disableHostCheck
:
true
,
port
:
8085
,
hot
:
true
,
//自动保存
proxy
:
{
'
/office
'
:
{
target
:
'
http://8.136.255.30:11078
'
,
changeOrigin
:
true
,
secure
:
false
,
cookieDomainRewrite
:
'
localhost
'
,
}
}
}
}
productionSourceMap
:
false
,
assetsDir
:
"
s
"
,
configureWebpack
:
{
externals
:
{
vue
:
"
Vue
"
,
vuex
:
"
Vuex
"
,
"
vue-router
"
:
"
VueRouter
"
,
"
element-ui
"
:
"
ELEMENT
"
,
},
},
lintOnSave
:
false
,
devServer
:
{
inline
:
true
,
disableHostCheck
:
true
,
port
:
8085
,
hot
:
true
,
//自动保存
proxy
:
{
"
/office
"
:
{
target
:
"
http://192.168.0.98:11072
"
,
// target: 'http://8.136.255.30:11078',
changeOrigin
:
true
,
secure
:
false
,
cookieDomainRewrite
:
"
localhost
"
,
},
},
},
};
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