Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
Project
Project
Details
Activity
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
Administrator
web-monitor
Commits
1744317b
Commit
1744317b
authored
Mar 16, 2022
by
neogcg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
5c404997
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
254 additions
and
133 deletions
+254
-133
App.vue
src/App.vue
+22
-9
Navbar.vue
src/layout/components/Navbar.vue
+1
-1
user.js
src/store/modules/user.js
+1
-0
index.vue
src/views/alarm/cableTime/index.vue
+17
-6
index.vue
src/views/alarm/device/index.vue
+18
-8
index.vue
src/views/history/deviceLinkRepair/index.vue
+8
-2
index.vue
src/views/history/deviceLinkStatus/index.vue
+8
-2
index.vue
src/views/history/leakyCableRepair/index.vue
+9
-3
index.vue
src/views/history/leakyCableStatus/index.vue
+8
-2
index.vue
src/views/monitor/equipment/index.vue
+87
-43
index.vue
src/views/monitor/leakageCable/index.vue
+59
-39
fsuTable.vue
src/views/setting/statistics/comp/fsuTable.vue
+2
-2
leakyTable.vue
src/views/setting/statistics/comp/leakyTable.vue
+2
-2
monitorTable.vue
src/views/setting/statistics/comp/monitorTable.vue
+3
-3
railWayTable.vue
src/views/setting/statistics/comp/railWayTable.vue
+3
-3
stationTable.vue
src/views/setting/statistics/comp/stationTable.vue
+2
-2
index.vue
src/views/user/userLog/index.vue
+4
-6
No files found.
src/App.vue
View file @
1744317b
...
...
@@ -29,10 +29,13 @@ export default {
};
},
computed
:
{
...
mapState
(
"user"
,
[
"userBaseInfo"
]),
...
mapState
(
"user"
,
[
"userBaseInfo"
,
"token"
]),
userId
()
{
return
this
.
userBaseInfo
.
userId
;
},
usertoken
()
{
return
this
.
token
;
},
},
methods
:
{
receiveMessage
,
...
...
@@ -43,9 +46,9 @@ export default {
},
},
mounted
()
{
this
.
websocket
=
socket
({
onmessage
:
this
.
receiveMessage
,
});
//
this.websocket = socket({
//
onmessage: this.receiveMessage,
//
});
EventBus
.
$on
(
"dialogAlarm"
,
(
data
)
=>
{
// 接收消息之后 声音弹窗显示
...
...
@@ -54,16 +57,15 @@ export default {
this
.
tflag
=
false
;
},
3000
);
});
//
EventBus.$on("cancelWS", () => {
//
this.websocket.close();
//
});
EventBus
.
$on
(
"cancelWS"
,
()
=>
{
this
.
websocket
.
close
();
});
// EventBus.$on("wsOpen", () => {
// this.websocket.onopen();
// });
},
watch
:
{
user
Id
:
{
user
token
:
{
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
...
...
@@ -74,6 +76,17 @@ export default {
}
},
},
// userId: {
// immediate: true,
// handler(newV) {
// if (newV) {
// this.closeWebsocket();
// this.websocket = socket({
// onmessage: this.receiveMessage,
// });
// }
// },
// },
},
};
</
script
>
...
...
src/layout/components/Navbar.vue
View file @
1744317b
...
...
@@ -57,7 +57,7 @@ export default {
logout
().
then
(()
=>
{
this
.
$store
.
dispatch
(
'user/logout'
)
this
.
$router
.
push
(
`/login`
)
//
EventBus.$emit('cancelWS')
EventBus
.
$emit
(
'cancelWS'
)
})
},
...
...
src/store/modules/user.js
View file @
1744317b
...
...
@@ -17,6 +17,7 @@ const mutations = {
},
SET_TOKEN
:
(
state
,
token
)
=>
{
state
.
token
=
token
console
.
log
(
token
);
},
SET_BASEINFO
:
(
state
,
data
)
=>
{
state
.
userBaseInfo
=
data
...
...
src/views/alarm/cableTime/index.vue
View file @
1744317b
...
...
@@ -13,13 +13,13 @@
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -207,6 +207,7 @@ export default {
],
isQuery
:
false
,
searchOption
:
{},
exids
:
[],
wsUrl
:
"ws://8.142.143.40:8885/websocket/1/1"
,
};
},
...
...
@@ -225,23 +226,34 @@ export default {
return
"stripe"
;
}
},
refresh
()
{
this
.
searchOption
=
{};
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
this
.
getTableData
();
},
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
getTableData
(
option
)
{
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
()
{
let
type
=
this
.
confirmStatus
==
2
?
""
:
this
.
confirmStatus
;
let
param
=
{
confirmStatus
:
type
,
...
this
.
params
,
...
o
ption
,
...
this
.
searchO
ption
,
};
cableTimeList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
confirm
(
dialogInfo
)
{
...
...
@@ -266,7 +278,6 @@ export default {
this
.
centerDialogVisible
=
false
;
},
cancel2
(
row
)
{
console
.
log
(
row
);
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
},
...
...
@@ -282,7 +293,7 @@ export default {
...
this
.
params
,
...
this
.
searchOption
,
};
exportLeakyCable
(
param
).
then
((
res
)
=>
{
exportLeakyCable
(
{
ids
:
this
.
exids
}
).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`漏缆监测告警.xls`
);
});
},
...
...
src/views/alarm/device/index.vue
View file @
1744317b
...
...
@@ -13,13 +13,13 @@
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -168,6 +168,7 @@ export default {
],
isQuery
:
false
,
searchOption
:
{},
exids
:
[],
wsUrl
:
"ws://8.142.143.40:8885/websocket/1/2"
,
};
},
...
...
@@ -192,22 +193,34 @@ export default {
return
"stripe"
;
}
},
refresh
()
{
this
.
searchOption
=
{};
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
getTableData
(
option
)
{
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
()
{
let
type
=
this
.
confirmStatus
==
2
?
""
:
this
.
confirmStatus
;
let
param
=
{
confirmStatus
:
type
,
...
this
.
params
,
...
o
ption
,
...
this
.
searchO
ption
,
};
deviceList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
confirm2
(
row
)
{
...
...
@@ -222,7 +235,6 @@ export default {
this
.
centerDialogVisible
=
false
;
},
cancel2
(
row
)
{
console
.
log
(
row
);
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
},
...
...
@@ -232,8 +244,6 @@ export default {
id
:
dialogInfo
.
id
,
};
deviceCancel
(
query
).
then
((
res
)
=>
{
console
.
log
(
query
);
console
.
log
(
res
);
this
.
getTableData
();
});
this
.
centerDialogVisible
=
false
;
...
...
@@ -251,7 +261,7 @@ export default {
...
this
.
params
,
...
this
.
searchOption
,
};
exportConnet
(
param
).
then
((
res
)
=>
{
exportConnet
(
{
ids
:
this
.
exids
}
).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`设备连接告警.xls`
);
});
},
...
...
src/views/history/deviceLinkRepair/index.vue
View file @
1744317b
...
...
@@ -7,14 +7,14 @@
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
>
清空数据
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -94,6 +94,12 @@ export default {
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
refresh
()
{
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
getTableData
(
option
)
{
this
.
searchOption
=
option
;
let
params
=
{
...
...
src/views/history/deviceLinkStatus/index.vue
View file @
1744317b
...
...
@@ -7,14 +7,14 @@
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
>
清空数据
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -95,6 +95,12 @@ export default {
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
refresh
()
{
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
getTableData
(
option
)
{
this
.
searchOption
=
option
;
let
params
=
{
...
...
src/views/history/leakyCableRepair/index.vue
View file @
1744317b
...
...
@@ -7,13 +7,13 @@
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"deleteCable"
>
删除
</delids
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -94,6 +94,12 @@ export default {
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
refresh
()
{
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
getTableData
(
option
)
{
this
.
searchOption
=
option
;
let
params
=
{
...
...
@@ -168,7 +174,7 @@ export default {
&
:
:
v-deep
.
important
{
background-color
:
#f89850
;
}
&
:
:
v-deep
.
common
{
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
}
.page
{
...
...
src/views/history/leakyCableStatus/index.vue
View file @
1744317b
...
...
@@ -7,14 +7,14 @@
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"deleteCable"
>
删除
</delids
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
>
图形报表
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
<el-table
ref=
"multipleTable"
...
...
@@ -83,6 +83,12 @@ export default {
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
refresh
()
{
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
getTableData
(
option
)
{
this
.
searchOption
=
option
;
let
params
=
{
...
...
src/views/monitor/equipment/index.vue
View file @
1744317b
...
...
@@ -4,13 +4,13 @@
<div
class=
"leakage-top"
>
<div></div>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -18,11 +18,31 @@
:cell-class-name=
"cellClassFn"
:header-cell-style=
"
{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"startPointConnectStatus_text"
label=
"连接状态"
align=
"center"
/>
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"endPointConnectStatus_text"
label=
"连接状态"
align=
"center"
/>
<el-table-column
prop=
"lastPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"startPointConnectStatus_text"
label=
"连接状态"
align=
"center"
/>
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"endPointConnectStatus_text"
label=
"连接状态"
align=
"center"
/>
<el-table-column
prop=
"lastPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"uploadTime"
label=
"上传时间"
align=
"center"
/>
</el-table>
<Pagination
...
...
@@ -36,75 +56,99 @@
</
template
>
<
script
>
import
{
DeviceStatusList
}
from
'../api'
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
search
from
'./components/search.vue'
import
download
from
'@/utils/download'
import
{
exportConnetTime
}
from
'@/api/export'
import
{
DeviceStatusList
}
from
"../api"
;
import
{
ConnectStatusEnum
}
from
"@/const/index"
;
import
search
from
"./components/search.vue"
;
import
download
from
"@/utils/download"
;
import
{
exportConnetTime
}
from
"@/api/export"
;
export
default
{
data
()
{
return
{
ConnectStatusEnum
,
params
:
{
current
:
1
,
size
:
10
size
:
10
,
},
total
:
10
,
tableData
:
[],
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:
[],
};
},
components
:
{
search
},
methods
:
{
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
((
row
.
startPointConnectStatus_text
==
'连接正常'
&&
column
.
property
==
'startPointConnectStatus_text'
))
{
return
'green'
if
(
row
.
startPointConnectStatus_text
==
"连接正常"
&&
column
.
property
==
"startPointConnectStatus_text"
)
{
return
"green"
;
}
if
((
row
.
startPointConnectStatus_text
==
'连接异常'
&&
column
.
property
==
'startPointConnectStatus_text'
))
{
return
'red'
if
(
row
.
startPointConnectStatus_text
==
"连接异常"
&&
column
.
property
==
"startPointConnectStatus_text"
)
{
return
"red"
;
}
if
((
row
.
endPointConnectStatus_text
==
'连接正常'
&&
column
.
property
==
'endPointConnectStatus_text'
))
{
return
'green'
}
else
if
((
row
.
endPointConnectStatus_text
==
'连接异常'
&&
column
.
property
==
'endPointConnectStatus_text'
))
{
return
'red'
if
(
row
.
endPointConnectStatus_text
==
"连接正常"
&&
column
.
property
==
"endPointConnectStatus_text"
)
{
return
"green"
;
}
else
if
(
row
.
endPointConnectStatus_text
==
"连接异常"
&&
column
.
property
==
"endPointConnectStatus_text"
)
{
return
"red"
;
}
if
(
rowIndex
%
2
==
1
)
{
return
'stripe'
return
"stripe"
;
}
},
refresh
()
{
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
()
;
},
getTableData
(
option
)
{
this
.
searchOption
=
option
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
()
{
let
params
=
{
...
this
.
params
,
...
option
}
DeviceStatusList
(
params
).
then
(
res
=>
{
let
list
=
res
.
records
||
[]
list
.
forEach
(
item
=>
{
item
.
startPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
startPointConnectStatus
]
item
.
endPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
endPointConnectStatus
]
...
this
.
searchOption
,
};
DeviceStatusList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
list
.
forEach
((
item
)
=>
{
item
.
startPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
startPointConnectStatus
];
item
.
endPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
endPointConnectStatus
];
});
this
.
tableData
=
list
this
.
total
=
res
.
total
})
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
toExport
()
{
let
params
=
{
...
this
.
params
,
...
this
.
searchOption
}
exportConnetTime
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备实时.xls`
)
})
}
exportConnetTime
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`设备实时.xls`
);
});
},
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
};
</
script
>
...
...
src/views/monitor/leakageCable/index.vue
View file @
1744317b
...
...
@@ -4,13 +4,13 @@
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<el-button
type=
"primary"
@
click=
"
getTableData
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"
refresh
"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
</div>
</div>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
<el-table
:data=
"tableData"
...
...
@@ -31,11 +31,20 @@
width=
"180"
align=
"center"
/>
<el-table-column
prop=
"alarmLevelName"
label=
"告警级别"
width=
"150"
align=
"center"
>
<el-table-column
prop=
"alarmLevelName"
label=
"告警级别"
width=
"150"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
</el-table-column>
<el-table-column
prop=
"lateUploadTime"
label=
"最新上传时间"
align=
"center"
/>
<el-table-column
prop=
"lateUploadTime"
label=
"最新上传时间"
align=
"center"
/>
</el-table>
<Pagination
:limit=
"params.size"
...
...
@@ -48,70 +57,81 @@
</
template
>
<
script
>
import
{
CableStatusList
,
CableStatusExport
}
from
'../api'
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
search
from
'./components/search.vue'
import
{
exportLeakyCableTime
}
from
'@/api/export'
import
download
from
'@/utils/download'
import
{
CableStatusList
,
CableStatusExport
}
from
"../api"
;
import
{
ConnectStatusEnum
}
from
"@/const/index"
;
import
search
from
"./components/search.vue"
;
import
{
exportLeakyCableTime
}
from
"@/api/export"
;
import
download
from
"@/utils/download"
;
export
default
{
data
()
{
return
{
ConnectStatusEnum
,
params
:
{
curent
:
1
,
size
:
10
size
:
10
,
},
total
:
10
,
tableData
:
[],
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:
[],
};
},
components
:
{
search
},
methods
:
{
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
alarmLevelName
==
'紧急'
&&
column
.
label
==
'告警级别'
)
{
return
'emergency'
}
else
if
(
row
.
alarmLevelName
==
'重要'
&&
column
.
label
==
'告警级别'
)
{
return
'important'
}
else
if
(
row
.
alarmLevelName
==
'一般'
&&
column
.
label
==
'告警级别'
)
{
return
'common'
if
(
row
.
alarmLevelName
==
"紧急"
&&
column
.
label
==
"告警级别"
)
{
return
"emergency"
;
}
else
if
(
row
.
alarmLevelName
==
"重要"
&&
column
.
label
==
"告警级别"
)
{
return
"important"
;
}
else
if
(
row
.
alarmLevelName
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
return
"common"
;
}
if
(
rowIndex
%
2
==
1
)
{
return
'stripe'
return
"stripe"
;
}
},
refresh
()
{
this
.
searchOption
=
{};
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
curent
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
curent
=
pageData
.
page
;
this
.
getTableData
();
},
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
(
option
)
{
this
.
searchOption
=
option
getTableData
()
{
let
params
=
{
...
this
.
params
,
...
option
}
CableStatusList
(
params
).
then
(
res
=>
{
let
list
=
res
.
records
||
[]
this
.
tableData
=
list
this
.
total
=
res
.
records
.
length
})
...
this
.
searchOption
,
}
;
CableStatusList
(
params
).
then
(
(
res
)
=>
{
let
list
=
res
.
records
||
[]
;
this
.
tableData
=
list
;
this
.
total
=
res
.
records
.
length
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
})
;
},
toExport
()
{
let
params
=
{
...
this
.
params
,
...
this
.
searchOption
}
exportLeakyCableTime
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`漏缆实时.xls`
)
})
}
...
this
.
searchOption
,
}
;
exportLeakyCableTime
(
{
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`漏缆实时.xls`
);
})
;
}
,
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
};
</
script
>
...
...
@@ -148,7 +168,7 @@ export default {
&
:
:
v-deep
.
important
{
background-color
:
#f89850
;
}
&
:
:
v-deep
.
common
{
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
}
.page
{
...
...
src/views/setting/statistics/comp/fsuTable.vue
View file @
1744317b
...
...
@@ -69,8 +69,8 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn
"
@
click=
"reset"
>
重置
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"primary
"
@
click=
"reset"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
...
...
src/views/setting/statistics/comp/leakyTable.vue
View file @
1744317b
...
...
@@ -109,8 +109,8 @@
</el-select>
</el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
...
...
src/views/setting/statistics/comp/monitorTable.vue
View file @
1744317b
...
...
@@ -83,9 +83,9 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"铁路名称:"
>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-form-item>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
...
...
src/views/setting/statistics/comp/railWayTable.vue
View file @
1744317b
...
...
@@ -49,9 +49,9 @@
</el-input>
</el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-form-item>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
...
...
src/views/setting/statistics/comp/stationTable.vue
View file @
1744317b
...
...
@@ -57,8 +57,8 @@
></el-option>
</el-select
></el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-table
...
...
src/views/user/userLog/index.vue
View file @
1744317b
...
...
@@ -57,7 +57,8 @@ export default {
total
:
10
,
tableData
:
[],
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:[]
};
},
components
:
{
...
...
@@ -79,17 +80,14 @@ export default {
let
list
=
res
.
records
||
[]
this
.
tableData
=
list
this
.
total
=
res
.
total
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
})
},
tableRowClassName
({
row
,
rowIndex
})
{
return
rowIndex
%
2
===
0
?
''
:
'single-row'
},
exportLog
()
{
let
params
=
{
...
this
.
params
,
...
this
.
searchOption
}
exportLog
(
params
).
then
(
res
=>
{
exportLog
({
ids
:
this
.
exids
}).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`用户日志.xls`
)
})
}
...
...
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