Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
SHR
/
tFIMS
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 afef83c8
authored
Aug 27, 2019
by
wangql
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/glsx-web/tFIMS
2 parents
c8b0df1a
cbff9f9b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
231 additions
and
40 deletions
src/menu/aside.js
src/menu/header.js
src/router/routes.js
src/views/carManagement/index.vue
src/views/systemMonitor/index.vue
src/menu/aside.js
View file @
afef83c
// 菜单 侧边栏
// 菜单 侧边栏
export
default
[
export
default
[
{
path
:
'/index'
,
title
:
'
首页
'
,
icon
:
'desktop'
},
{
path
:
'/index'
,
title
:
'
系统监控
'
,
icon
:
'desktop'
},
{
{
title
:
'页面'
,
title
:
'页面'
,
icon
:
'folder-o'
,
icon
:
'folder-o'
,
...
@@ -9,10 +9,9 @@ export default [
...
@@ -9,10 +9,9 @@ export default [
{
path
:
'/page2'
,
title
:
'页面 2'
},
{
path
:
'/page2'
,
title
:
'页面 2'
},
{
path
:
'/page3'
,
title
:
'页面 3'
}
{
path
:
'/page3'
,
title
:
'页面 3'
}
]
]
},
},
{
{
title
:
'车辆管理'
,
title
:
'系统监控'
,
icon
:
'folder-o'
,
icon
:
'folder-o'
,
path
:
'/
systemMonitor
'
path
:
'/
carManagement
'
}
}
]
]
src/menu/header.js
View file @
afef83c
// 菜单 顶栏
// 菜单 顶栏
export
default
[
export
default
[
{
path
:
'/index'
,
title
:
'
首页
'
,
icon
:
'home'
},
{
path
:
'/index'
,
title
:
'
系统监控
'
,
icon
:
'home'
},
{
{
title
:
'页面'
,
title
:
'页面'
,
icon
:
'folder-o'
,
icon
:
'folder-o'
,
...
...
src/router/routes.js
View file @
afef83c
...
@@ -19,7 +19,7 @@ const frameIn = [
...
@@ -19,7 +19,7 @@ const frameIn = [
meta
:
{
meta
:
{
auth
:
true
auth
:
true
},
},
component
:
_import
(
'system
/index
'
)
component
:
_import
(
'system
Monitor
'
)
},
},
// 演示页面
// 演示页面
{
{
...
@@ -49,15 +49,15 @@ const frameIn = [
...
@@ -49,15 +49,15 @@ const frameIn = [
},
},
component
:
_import
(
'demo/page3'
)
component
:
_import
(
'demo/page3'
)
},
},
//
系统监控
//
车辆管理
{
{
path
:
'
systemMonitor
'
,
path
:
'
carManagement
'
,
name
:
'
systemMonitor
'
,
name
:
'
carManagement
'
,
meta
:
{
meta
:
{
title
:
'
系统监控
'
,
title
:
'
车辆管理
'
,
auth
:
true
auth
:
true
},
},
component
:
_import
(
'
systemMonitor
'
)
component
:
_import
(
'
carManagement
'
)
},
},
// 系统 前端日志
// 系统 前端日志
{
{
...
...
src/views/carManagement/index.vue
0 → 100644
View file @
afef83c
<!-- 车辆管理 -->
<
template
>
<d2-container
class=
"carManagement"
>
<el-form
:inline=
"true"
:model=
"searchForm"
label-width=
"85px"
>
<el-form-item
label=
"车辆编号"
>
<el-input
v-model=
"searchForm.carNum"
placeholder=
"请输入车辆编号"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"归属车辆段"
>
<el-select
v-model=
"searchForm.belongCar"
placeholder=
"请选择归属车辆段"
clearable
filterable
>
<el-option
label=
"青岛"
value=
"1"
></el-option>
<el-option
label=
"深圳"
value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"维修承包商"
>
<el-input
v-model=
"searchForm.repairContractor"
placeholder=
"请输入维修承包商"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"searchForm.status"
placeholder=
"请选择状态"
clearable
filterable
>
<el-option
label=
"在网"
value=
"1"
></el-option>
<el-option
label=
"离网"
value=
"2"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form>
<el-row
style=
"height: 40px; line-height: 40px"
>
<el-col
span=
"12"
>
车辆列表
</el-col>
<el-col
span=
"12"
style=
"text-align: right"
>
<el-button>
添加车辆
</el-button>
</el-col>
</el-row>
<el-table
:data=
"tableData"
border
style=
"margin: 20px 0;"
>
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.formatter"
>
{{
item
.
formatter
(
scope
.
row
)
}}
</
template
>
<
template
v-else
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</
template
>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</d2-container>
</template>
<
script
>
export
default
{
name
:
'carManagement'
,
data
()
{
return
{
searchForm
:
{
carNum
:
''
,
belongCar
:
''
,
repairContractor
:
''
,
status
:
''
},
tableData
:
[{
carNum
:
'CRH45661-5648'
,
belongCar
:
'青岛'
,
repairContractor
:
'长春通富机电设备有限公司'
,
interface
:
'1'
},
{
carNum
:
'CRH45661-5648'
,
belongCar
:
'青岛'
,
repairContractor
:
'长春通富机电设备有限公司'
,
interface
:
'0'
},
{
carNum
:
'CRH45661-5648'
,
belongCar
:
'青岛'
,
repairContractor
:
'长春通富机电设备有限公司'
,
interface
:
'1'
}],
tableColumns
:
[{
label
:
'车辆编号'
,
prop
:
'carNum'
},
{
label
:
'归属车辆段'
,
prop
:
'belongCar'
},
{
label
:
'维修承包商'
,
prop
:
'repairContractor'
},
{
label
:
'接口开放'
,
prop
:
'interface'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
interface
)
{
return
{
0
:
'否'
,
1
:
'是'
}[
cellValue
.
interface
]
}
}
}],
// 页码
currentPage
:
1
,
pageSize
:
10
,
total
:
30
}
},
methods
:
{
// 搜索
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
},
// 页码
handleSizeChange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
// 调接口
},
handleCurrentChange
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
// 调接口
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/views/systemMonitor/index.vue
View file @
afef83c
...
@@ -57,21 +57,32 @@
...
@@ -57,21 +57,32 @@
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-row
style=
"height: 40px; line-height: 40px"
>
<el-col
span=
"12"
>
车辆状态列表
</el-col>
<el-col
span=
"12"
style=
"text-align: right"
>
<el-button>
导出
</el-button>
</el-col>
</el-row>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
border
border
style=
"margin: 20px 0;"
>
>
<el-table-column
<el-table-column
align=
"center"
width=
"60px"
label=
"序号"
type=
'index'
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
v-for=
"(item, index) in tableColumns"
:key=
"index"
:key=
"index"
:label=
"item.label"
:label=
"item.label"
:prop=
"item.prop"
:prop=
"item.prop"
:width=
"item.width"
:width=
"item.width"
:type=
"item.index ? 'index' : ''"
:index=
"item.index"
align=
"center"
align=
"center"
>
>
<template
slot-scope=
"scope"
>
<template
v-if=
"item.prop"
slot-scope=
"scope"
>
<template
v-if=
"item.prop == 'subSystemStatus'"
>
<template
v-if=
"item.prop == 'subSystemStatus'"
>
<el-tag
v-if=
"tableData[scope.$index][item.prop] == '在网'"
type=
"success"
size=
"medium"
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</el-tag>
<el-tag
v-if=
"tableData[scope.$index][item.prop] == '在网'"
type=
"success"
size=
"medium"
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</el-tag>
<el-tag
v-else
type=
"info"
size=
"medium"
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</el-tag>
<el-tag
v-else
type=
"info"
size=
"medium"
>
{{
tableData
[
scope
.
$index
][
item
.
prop
]
}}
</el-tag>
...
@@ -82,6 +93,17 @@
...
@@ -82,6 +93,17 @@
</template>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10,20,30,40]"
:page-size=
"pageSize"
:total=
"total"
layout=
"sizes,total,->,prev,pager,next,jumper"
>
</el-pagination>
</div>
</div>
</d2-container>
</d2-container>
</template>
</template>
...
@@ -89,7 +111,7 @@
...
@@ -89,7 +111,7 @@
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'systemMonitor'
,
name
:
'systemMonitor'
,
data
()
{
data
()
{
return
{
return
{
subSystemRadio
:
'全部'
,
subSystemRadio
:
'全部'
,
systemTypeArr
:
[{
systemTypeArr
:
[{
...
@@ -123,13 +145,13 @@ export default {
...
@@ -123,13 +145,13 @@ export default {
}
}
},
},
data
:
[{
data
:
[{
name
:
'在网'
,
name
:
'在网'
,
value
:
0
,
value
:
0
,
itemStyle
:
{
itemStyle
:
{
color
:
'#18a689'
color
:
'#18a689'
}
}
},
{
},
{
name
:
'离网'
,
name
:
'离网'
,
value
:
0
,
value
:
0
,
itemStyle
:
{
itemStyle
:
{
color
:
'#999999'
color
:
'#999999'
...
@@ -147,13 +169,13 @@ export default {
...
@@ -147,13 +169,13 @@ export default {
}
}
},
},
data
:
[{
data
:
[{
name
:
'正常'
,
name
:
'正常'
,
value
:
0
,
value
:
0
,
itemStyle
:
{
itemStyle
:
{
color
:
'#99cc66'
color
:
'#99cc66'
}
}
},
{
},
{
name
:
'故障'
,
name
:
'故障'
,
value
:
0
,
value
:
0
,
itemStyle
:
{
itemStyle
:
{
color
:
'#ff0000'
color
:
'#ff0000'
...
@@ -201,12 +223,6 @@ export default {
...
@@ -201,12 +223,6 @@ export default {
text
:
'00x4561aa'
text
:
'00x4561aa'
}],
}],
tableColumns
:
[{
tableColumns
:
[{
label
:
'序号'
,
index
:
index
=>
{
++
index
return
index
}
},
{
label
:
'子系统编号'
,
label
:
'子系统编号'
,
prop
:
'subSystemNum'
prop
:
'subSystemNum'
},
{
},
{
...
@@ -215,25 +231,29 @@ export default {
...
@@ -215,25 +231,29 @@ export default {
},
{
},
{
label
:
'子系统状态'
,
label
:
'子系统状态'
,
prop
:
'subSystemStatus'
prop
:
'subSystemStatus'
}
,
{
},
{
label
:
'车辆编号'
,
label
:
'车辆编号'
,
prop
:
'carNum'
prop
:
'carNum'
}
,
{
},
{
label
:
'归属车辆段'
,
label
:
'归属车辆段'
,
prop
:
'belongCar'
prop
:
'belongCar'
}
,
{
},
{
label
:
'故障内容'
,
label
:
'故障内容'
,
prop
:
'text'
prop
:
'text'
}]
}],
// 翻页
currentPage
:
1
,
pageSize
:
10
,
total
:
20
}
}
},
},
mounted
()
{
mounted
()
{
this
.
drawPie
()
this
.
drawPie
()
},
},
methods
:
{
methods
:
{
drawPie
()
{
drawPie
()
{
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'totalEcharts'
))
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'totalEcharts'
))
this
.
totalOptions
.
series
[
0
].
data
[
0
].
value
=
400
this
.
totalOptions
.
series
[
0
].
data
[
0
].
value
=
400
this
.
totalOptions
.
series
[
0
].
data
[
1
].
value
=
45
this
.
totalOptions
.
series
[
0
].
data
[
1
].
value
=
45
...
@@ -244,18 +264,18 @@ export default {
...
@@ -244,18 +264,18 @@ export default {
this
.
totalECharts
.
setOption
(
this
.
totalOptions
)
this
.
totalECharts
.
setOption
(
this
.
totalOptions
)
},
},
radioChange
(
label
)
{
radioChange
(
label
)
{
console
.
log
(
label
)
console
.
log
(
label
)
// 请求后端数据--参数
// 请求后端数据--参数
var
value
=
''
var
value
=
''
for
(
var
i
in
this
.
systemTypeArr
)
{
for
(
var
i
in
this
.
systemTypeArr
)
{
if
(
this
.
systemTypeArr
[
i
].
label
==
label
)
{
if
(
this
.
systemTypeArr
[
i
].
label
=
==
label
)
{
value
=
this
.
systemTypeArr
[
i
].
value
value
=
this
.
systemTypeArr
[
i
].
value
break
break
}
}
}
}
// 调接口
// 调接口
if
(
value
==
'1'
)
{
if
(
value
=
==
'1'
)
{
this
.
totalOptions
.
series
[
0
].
data
[
0
].
value
=
400
this
.
totalOptions
.
series
[
0
].
data
[
0
].
value
=
400
this
.
totalOptions
.
series
[
0
].
data
[
1
].
value
=
45
this
.
totalOptions
.
series
[
0
].
data
[
1
].
value
=
45
...
@@ -271,13 +291,27 @@ export default {
...
@@ -271,13 +291,27 @@ export default {
this
.
totalECharts
.
setOption
(
this
.
totalOptions
)
this
.
totalECharts
.
setOption
(
this
.
totalOptions
)
},
},
handleSearch
()
{
// 搜索
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
console
.
log
(
this
.
searchForm
)
// 调接口
// 调接口
},
// 页码
handleSizeChange
(
value
)
{
console
.
log
(
value
)
this
.
pageSize
=
value
// 调接口
},
handleCurrentChange
(
value
)
{
console
.
log
(
value
)
this
.
currentPage
=
value
// 调接口
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
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