Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
video-monitoring
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘怀志
video-monitoring
Commits
13251f73
Commit
13251f73
authored
Aug 06, 2024
by
拾柒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
格式代码
parent
2951a6d9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
39 deletions
+118
-39
.env.development
.env.development
+1
-1
index.vue
src/components/TopNav/index.vue
+115
-36
index.vue
src/views/employee/index.vue
+1
-1
vue.config.js
vue.config.js
+1
-1
No files found.
.env.development
View file @
13251f73
...
...
@@ -5,7 +5,7 @@ VUE_APP_TITLE = 悦优享视频监控管理系统
ENV = 'development'
# 悦优享视频监控管理系统/开发环境
VUE_APP_BASE_API = '/
dev-
api'
VUE_APP_BASE_API = '/api'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
src/components/TopNav/index.vue
View file @
13251f73
...
...
@@ -6,29 +6,87 @@
@
select=
"handleSelect"
style=
"margin-right: 120px"
>
<template
v-for=
"(item, index) in newTopNev"
>
<el-menu-item
class=
"menuStyle"
style=
"font-size: small;background-color: #F6F6FA;border-top-right-radius: 15px;border-top-left-radius: 15px;text-align: center;margin-left: 1px"
:index=
"item.path"
:key=
"index"
<template>
<el-menu-item
class=
"menuStyle"
style=
"
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index=
"/monitoring/video"
>
<i
:class=
"item.icon"
style=
"width: 10px;height: 10px;margin-top: -12px"
></i>
{{
item
.
name
}}
</el-menu-item
<i
style=
"width: 10px; height: 10px; margin-top: -12px"
></i>
首页
</el-menu-item>
<el-menu-item
class=
"menuStyle"
style=
"
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index=
"/employee/employee"
>
<i
style=
"width: 10px; height: 10px; margin-top: -12px"
></i>
员工信息
</el-menu-item>
<el-menu-item
class=
"menuStyle"
style=
"
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index=
"/monitoringhistory/history"
v-if=
"!this.backTag"
>
<i
style=
"width: 10px; height: 10px; margin-top: -12px"
></i>
历史记录
</el-menu-item>
<el-menu-item
class=
"menuStyle"
style=
"
font-size: small;
background-color: #f6f6fa;
border-top-right-radius: 15px;
border-top-left-radius: 15px;
text-align: center;
margin-left: 1px;
"
index=
"/monitoringhistory/history"
v-if=
"this.backTag"
@
click=
"changeBackTag()"
>
<i
style=
"width: 10px; height: 10px; margin-top: -12px"
></i>
返回历史记录
</el-menu-item>
</
template
>
<!-- 顶部菜单超出数量折叠 -->
<!-- <el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">-->
<!-- <template slot="title">更多菜单</template>-->
<!-- <template v-for="(item, index) in topMenus">-->
<!-- <el-menu-item-->
<!-- :index="item.path"-->
<!-- :key="index"-->
<!-- v-if="index >= visibleNumber">-->
<!-- <svg-icon-->
<!-- v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"-->
<!-- :icon-class="item.meta.icon"/>-->
<!-- {{ item.meta.title }}-->
<!-- </el-menu-item>-->
<!-- </template>-->
<!-- </el-submenu>-->
<!-- <el-submenu :style="{'--theme': theme}" index="more" v-if="topMenus.length > visibleNumber">-->
<!-- <template slot="title">更多菜单</template>-->
<!-- <template v-for="(item, index) in topMenus">-->
<!-- <el-menu-item-->
<!-- :index="item.path"-->
<!-- :key="index"-->
<!-- v-if="index >= visibleNumber">-->
<!-- <svg-icon-->
<!-- v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"-->
<!-- :icon-class="item.meta.icon"/>-->
<!-- {{ item.meta.title }}-->
<!-- </el-menu-item>-->
<!-- </template>-->
<!-- </el-submenu>-->
</el-menu>
</template>
...
...
@@ -37,12 +95,13 @@ import { constantRoutes } from "@/router";
import
Menu
from
"@/views/system/menu/index.vue"
;
// 隐藏侧边栏路由
const
hideList
=
[
'/index'
,
'/user/profile'
];
const
hideList
=
[
"/index"
,
"/user/profile"
];
export
default
{
components
:
{
Menu
},
components
:
{
Menu
},
data
()
{
return
{
backTag
:
false
,
newTopNev
:
[
{
path
:
'/monitoring/video'
,
...
...
@@ -95,11 +154,12 @@ export default {
this
.
routers
.
map
((
router
)
=>
{
for
(
var
item
in
router
.
children
)
{
if
(
router
.
children
[
item
].
parentPath
===
undefined
)
{
if
(
router
.
path
===
"/"
)
{
if
(
router
.
path
===
"/"
)
{
router
.
children
[
item
].
path
=
"/"
+
router
.
children
[
item
].
path
;
}
else
{
if
(
!
this
.
ishttp
(
router
.
children
[
item
].
path
))
{
router
.
children
[
item
].
path
=
router
.
path
+
"/"
+
router
.
children
[
item
].
path
;
if
(
!
this
.
ishttp
(
router
.
children
[
item
].
path
))
{
router
.
children
[
item
].
path
=
router
.
path
+
"/"
+
router
.
children
[
item
].
path
;
}
}
router
.
children
[
item
].
parentPath
=
router
.
path
;
...
...
@@ -138,7 +198,17 @@ export default {
this
.
$store
.
dispatch
(
'app/toggleSideBarHide'
,
true
);
this
.
setVisibleNumber
();
},
created
()
{
this
.
getinfo
();
},
methods
:
{
changeBackTag
()
{
this
.
backTag
=
false
;
},
getinfo
()
{
let
self
=
this
;
self
.
backTag
=
this
.
$router
.
params
.
backTag
;
},
// 根据宽度计算设置显示栏数
setVisibleNumber
()
{
const
width
=
document
.
body
.
getBoundingClientRect
().
width
/
3
;
...
...
@@ -220,48 +290,57 @@ export default {
// padding: 0 5px !important;
// margin: 0 10px !important;
//}
.menuStyle
{
box-shadow
:
0
0
8px
#
D4D9E
5
;
.menuStyle
{
box-shadow
:
0
0
8px
#
d4d9e
5
;
height
:
60px
;
border-bottom
:
transparent
;
}
.menuStyle
:hover
{
color
:
#30B08F
;
.menuStyle
:hover
{
color
:
#30b08f
;
border-bottom
:
0px
transparent
;
}
::v-deep
.el-menu
::before
{
::v-deep
.el-menu
::before
{
color
:
transparent
;
}
::v-deep
.el-submenu
{
::v-deep
.el-submenu
{
height
:
60px
;
}
.el-menu--horizontal
>
.el-menu-item
{
.el-menu--horizontal
>
.el-menu-item
{
margin-top
:
19px
;
height
:
60px
;
line-height
:
35px
;
}
.el-menu--horizontal
>
.el-menu-item.is-active
{
.el-menu--horizontal
>
.el-menu-item.is-active
{
margin-top
:
12px
;
}
//.el-menu--horizontal > .el-menu-item.is-active{
// //margin-top: 30px;
// height: 60px;
// line-height: 30px;
//}
.el-menu-item.is-active
{
.el-menu-item.is-active
{
font-weight
:
bolder
;
line-height
:
45px
;
color
:
white
!
important
;
background-color
:
#0
D8EEE
!
important
;
background-color
:
#0
d8eee
!
important
;
}
.el-menu-item
{
width
:
130px
;
color
:
#2
E2E2E
!
important
;
background-color
:
#F6F6FA
!
important
;
color
:
#2
e2e2e
!
important
;
background-color
:
#f6f6fa
!
important
;
}
.el-menu--horizontal
>
.el-submenu
{
.el-menu--horizontal
>
.el-submenu
{
height
:
10px
;
}
//.el-menu--horizontal > .el-submenu.is-active{
// height: 80px;
//}
...
...
src/views/employee/index.vue
View file @
13251f73
...
...
@@ -170,7 +170,7 @@
<el-table-column
label=
"状态"
align=
"center"
key=
"status"
width=
"190"
v-if=
"columns[5].visible"
>
<
template
slot-scope=
"scope"
>
<span
:class=
"
{ 'status-enabled': scope.row.status === '0', 'status-disabled': scope.row.status === '1' }">
{{
scope
.
row
.
status
===
'0'
?
'
.已启用'
:
'.
已禁用'
}}
{{
scope
.
row
.
status
===
'0'
?
'
·已启用'
:
'·
已禁用'
}}
</span>
</
template
>
</el-table-column>
...
...
vue.config.js
View file @
13251f73
...
...
@@ -35,7 +35,7 @@ module.exports = {
proxy
:
{
// detail: https://cli.vuejs.org/config/#devserver-proxy
[
process
.
env
.
VUE_APP_BASE_API
]:
{
target
:
`http://127.0.0.1:808
0
`
,
target
:
`http://127.0.0.1:808
7
`
,
changeOrigin
:
true
,
pathRewrite
:
{
[
"^"
+
process
.
env
.
VUE_APP_BASE_API
]:
""
,
...
...
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