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
cbefbc50
Commit
cbefbc50
authored
Mar 17, 2022
by
neogcg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_gcg' into dev
parents
edde900f
638c4f18
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
678 additions
and
439 deletions
+678
-439
App.vue
src/App.vue
+61
-36
Navbar.vue
src/layout/components/Navbar.vue
+5
-2
index.js
src/router/index.js
+2
-0
user.js
src/store/modules/user.js
+1
-0
request.js
src/utils/request.js
+1
-0
websocket.js
src/utils/websocket.js
+6
-7
index.vue
src/views/alarm/cableTime/index.vue
+50
-27
search.vue
src/views/alarm/device/components/search.vue
+76
-0
index.vue
src/views/alarm/device/index.vue
+37
-22
index.vue
src/views/history/deviceLinkRepair/index.vue
+58
-41
index.vue
src/views/history/deviceLinkStatus/index.vue
+61
-47
index.vue
src/views/history/leakyCableRepair/index.vue
+59
-45
index.vue
src/views/history/leakyCableStatus/index.vue
+56
-47
index.vue
src/views/login/index.vue
+3
-1
index.vue
src/views/monitor/equipment/index.vue
+84
-43
index.vue
src/views/monitor/leakageCable/index.vue
+58
-36
fsuTable.vue
src/views/setting/statistics/comp/fsuTable.vue
+11
-15
leakyTable.vue
src/views/setting/statistics/comp/leakyTable.vue
+13
-22
monitorTable.vue
src/views/setting/statistics/comp/monitorTable.vue
+9
-15
railWayTable.vue
src/views/setting/statistics/comp/railWayTable.vue
+9
-14
stationTable.vue
src/views/setting/statistics/comp/stationTable.vue
+5
-7
index.vue
src/views/user/userLog/index.vue
+12
-11
vue.config.js
vue.config.js
+1
-1
No files found.
src/App.vue
View file @
cbefbc50
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<router-view
/>
<router-view
/>
<audio
controls=
"controls"
id=
"my_audio"
src=
"./assets/audio/alarm.mp3"
style=
"display:none;"
hidden=
"hidden"
/>
<audio
<div
class=
"tips"
v-if=
"tflag"
>
controls=
"controls"
id=
"my_audio"
src=
"./assets/audio/alarm.mp3"
style=
"display: none"
hidden=
"hidden"
/>
<!--
<div
class=
"tips"
v-if=
"tflag"
>
<p>
提示
</p>
<p>
提示
</p>
<span>
有一条新告警
</span>
<span>
有一条新告警
</span>
</div>
</div>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
receiveMessage
}
from
'@/utils/websocket'
import
{
receiveMessage
}
from
"@/utils/websocket"
;
import
socket
from
'@/utils/websocket'
import
socket
from
"@/utils/websocket"
;
import
{
mapState
}
from
'vuex'
import
{
mapState
}
from
"vuex"
;
import
EventBus
from
'@/utils/bus'
import
EventBus
from
"@/utils/bus"
;
export
default
{
export
default
{
name
:
'App'
,
name
:
"App"
,
data
()
{
data
()
{
return
{
return
{
websocket
:
null
,
websocket
:
null
,
tflag
:
false
,
tflag
:
false
,
}
}
;
},
},
computed
:
{
computed
:
{
...
mapState
(
"user"
,
[
'userBaseInfo'
]),
...
mapState
(
"user"
,
[
"userBaseInfo"
,
"token"
]),
userId
()
{
userId
()
{
return
this
.
userBaseInfo
.
userId
return
this
.
userBaseInfo
.
userId
;
}
},
usertoken
()
{
return
this
.
token
;
},
},
},
methods
:
{
methods
:
{
receiveMessage
,
receiveMessage
,
closeWebsocket
()
{
closeWebsocket
()
{
if
(
this
.
websocket
)
{
if
(
this
.
websocket
)
{
this
.
websocket
.
close
()
this
.
websocket
.
close
()
;
}
}
},
},
},
},
mounted
()
{
mounted
()
{
this
.
websocket
=
socket
({
// this.websocket = socket({
onmessage
:
this
.
receiveMessage
// onmessage: this.receiveMessage,
})
// });
EventBus
.
$on
(
'dialogAlarm'
,
(
data
)
=>
{
EventBus
.
$on
(
"dialogAlarm"
,
(
data
)
=>
{
// 接收消息之后 声音弹窗显示
// 接收消息之后 声音弹窗显示
this
.
tflag
=
data
this
.
tflag
=
data
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
tflag
=
false
this
.
tflag
=
false
;
},
3000
)
},
3000
);
})
});
EventBus
.
$on
(
"cancelWS"
,
()
=>
{
this
.
websocket
.
close
();
});
// EventBus.$on("wsOpen", () => {
// this.websocket.onopen();
// });
},
},
watch
:
{
watch
:
{
user
Id
:
{
user
token
:
{
immediate
:
true
,
immediate
:
true
,
handler
(
newV
)
{
handler
(
newV
)
{
if
(
newV
)
{
if
(
newV
)
{
this
.
closeWebsocket
()
this
.
closeWebsocket
()
;
this
.
websocket
=
socket
({
this
.
websocket
=
socket
({
onmessage
:
this
.
receiveMessage
onmessage
:
this
.
receiveMessage
,
})
})
;
}
}
}
},
}
},
// userId: {
// immediate: true,
// handler(newV) {
// if (newV) {
// this.closeWebsocket();
// this.websocket = socket({
// onmessage: this.receiveMessage,
// });
// }
// },
// },
},
},
};
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
#app
{
#app
{
// & ::v-deep .el-table__body tr:hover>td{
// & ::v-deep .el-table__body tr:hover>td{
// background-color: #bed5ff !important;
// background-color: #bed5ff !important;
// }
// }
// & ::v-deep .el-table__body tr.current-row>td{
// & ::v-deep .el-table__body tr.current-row>td{
// background-color: #bed5ff !important;
// background-color: #bed5ff !important;
// }
// }
}
}
.tips
{
.tips
{
width
:
400px
;
width
:
400px
;
height
:
80px
;
height
:
80px
;
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0px
2px
14px
#888888
;
box-shadow
:
0px
2px
14px
#888888
;
border-radius
:
5px
;
border-radius
:
5px
;
padding
:
0
20px
20px
20px
;
padding
:
0
20px
20px
20px
;
position
:
absolute
;
position
:
absolute
;
text-align
:
center
;
text-align
:
center
;
top
:
calc
(
50
%
-
40px
)
;
top
:
calc
(
50%
-
40px
);
left
:calc
(
50
%
-
200px
)
left
:
calc
(
50%
-
200px
);
}
}
</
style
>
</
style
>
src/layout/components/Navbar.vue
View file @
cbefbc50
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<el-dropdown-item
divided
@
click
.
native=
"logout"
>
<el-dropdown-item
divided
@
click
.
native=
"logout"
>
<span
style=
"display:block;"
>
退出登录
</span>
<span
style=
"display:block;"
>
退出登录
</span>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown>
<span
style=
"color: white; padding-right: 10px"
>
{{
dateTime
}}
</span>
<span
style=
"color: white; padding-right: 10px"
>
{{
dateTime
}}
</span>
...
@@ -27,7 +27,7 @@ import Breadcrumb from '@/components/Breadcrumb'
...
@@ -27,7 +27,7 @@ import Breadcrumb from '@/components/Breadcrumb'
import
Hamburger
from
'@/components/Hamburger'
import
Hamburger
from
'@/components/Hamburger'
import
Sidebar
from
'./Sidebar/index.vue'
import
Sidebar
from
'./Sidebar/index.vue'
import
{
logout
}
from
'@/api/user'
import
{
logout
}
from
'@/api/user'
import
EventBus
from
'@/utils/bus'
export
default
{
export
default
{
data
()
{
data
()
{
let
timer
let
timer
...
@@ -57,8 +57,11 @@ export default {
...
@@ -57,8 +57,11 @@ export default {
logout
().
then
(()
=>
{
logout
().
then
(()
=>
{
this
.
$store
.
dispatch
(
'user/logout'
)
this
.
$store
.
dispatch
(
'user/logout'
)
this
.
$router
.
push
(
`/login`
)
this
.
$router
.
push
(
`/login`
)
EventBus
.
$emit
(
'cancelWS'
)
})
})
},
},
// 获取当前时间函数
// 获取当前时间函数
timeFormate
(
timeStamp
)
{
timeFormate
(
timeStamp
)
{
let
year
=
new
Date
(
timeStamp
).
getFullYear
()
let
year
=
new
Date
(
timeStamp
).
getFullYear
()
...
...
src/router/index.js
View file @
cbefbc50
...
@@ -34,12 +34,14 @@ export const constantRoutes = [
...
@@ -34,12 +34,14 @@ export const constantRoutes = [
{
{
path
:
'/login'
,
path
:
'/login'
,
component
:
()
=>
import
(
'@/views/login/index'
),
component
:
()
=>
import
(
'@/views/login/index'
),
meta
:{
title
:
"登录"
},
hidden
:
true
hidden
:
true
},
},
{
{
path
:
'/404'
,
path
:
'/404'
,
component
:
()
=>
import
(
'@/views/404'
),
component
:
()
=>
import
(
'@/views/404'
),
meta
:{
title
:
"404"
},
hidden
:
true
hidden
:
true
},
},
...
...
src/store/modules/user.js
View file @
cbefbc50
...
@@ -17,6 +17,7 @@ const mutations = {
...
@@ -17,6 +17,7 @@ const mutations = {
},
},
SET_TOKEN
:
(
state
,
token
)
=>
{
SET_TOKEN
:
(
state
,
token
)
=>
{
state
.
token
=
token
state
.
token
=
token
console
.
log
(
token
);
},
},
SET_BASEINFO
:
(
state
,
data
)
=>
{
SET_BASEINFO
:
(
state
,
data
)
=>
{
state
.
userBaseInfo
=
data
state
.
userBaseInfo
=
data
...
...
src/utils/request.js
View file @
cbefbc50
...
@@ -2,6 +2,7 @@ import axios from 'axios'
...
@@ -2,6 +2,7 @@ import axios from 'axios'
import
{
MessageBox
,
Message
}
from
'element-ui'
import
{
MessageBox
,
Message
}
from
'element-ui'
import
store
from
'@/store'
import
store
from
'@/store'
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
import
socket
from
"@/utils/websocket"
;
import
Vue
from
'vue'
import
Vue
from
'vue'
// create an axios instance
// create an axios instance
...
...
src/utils/websocket.js
View file @
cbefbc50
...
@@ -5,9 +5,10 @@ import EventBus from '@/utils/bus'
...
@@ -5,9 +5,10 @@ import EventBus from '@/utils/bus'
export
default
function
socket
(
handlerOptions
)
{
export
default
function
socket
(
handlerOptions
)
{
let
{
let
{
onmessage
,
onmessage
,
onopen
onopen
,
// socketUrl
}
=
handlerOptions
}
=
handlerOptions
let
socketUrl
=
'ws://8.142.143.40:8885/websocket/1'
let
socketUrl
=
'ws://8.142.143.40:8885/websocket/1
/1
'
let
websocket
let
websocket
if
(
"WebSocket"
in
window
)
{
if
(
"WebSocket"
in
window
)
{
websocket
=
new
WebSocket
(
socketUrl
)
websocket
=
new
WebSocket
(
socketUrl
)
...
@@ -21,13 +22,10 @@ export default function socket(handlerOptions) {
...
@@ -21,13 +22,10 @@ export default function socket(handlerOptions) {
console
.
info
(
"Websocket服务器连接错误"
)
console
.
info
(
"Websocket服务器连接错误"
)
}
}
window
.
onbeforeunload
=
function
()
{
websocket
.
close
()
}
//连接成功建立的回调方法
//连接成功建立的回调方法
websocket
.
onopen
=
function
()
{
websocket
.
onopen
=
function
()
{
console
.
info
(
"Websocket连接成功"
)
console
.
info
(
"Websocket连接成功"
)
console
.
log
(
websocket
.
readyState
);
heart
.
start
()
heart
.
start
()
onopen
&&
onopen
()
onopen
&&
onopen
()
}
}
...
@@ -45,7 +43,6 @@ export default function socket(handlerOptions) {
...
@@ -45,7 +43,6 @@ export default function socket(handlerOptions) {
}
}
return
websocket
return
websocket
}
}
function
heartCheck
(
websocket
)
{
function
heartCheck
(
websocket
)
{
return
{
return
{
timeout
:
15000
,
timeout
:
15000
,
...
@@ -56,8 +53,10 @@ function heartCheck(websocket) {
...
@@ -56,8 +53,10 @@ function heartCheck(websocket) {
},
},
start
:
function
()
{
start
:
function
()
{
this
.
timeoutObj
=
setInterval
(
function
()
{
this
.
timeoutObj
=
setInterval
(
function
()
{
// if(websocket.readyState==1){
websocket
.
send
(
"HeartBeat"
)
websocket
.
send
(
"HeartBeat"
)
console
.
info
(
"Websocket发送心跳:HeartBeat"
)
console
.
info
(
"Websocket发送心跳:HeartBeat"
)
// }
},
this
.
timeout
)
},
this
.
timeout
)
},
},
}
}
...
...
src/views/alarm/cableTime/index.vue
View file @
cbefbc50
...
@@ -13,13 +13,13 @@
...
@@ -13,13 +13,13 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -72,11 +72,17 @@
...
@@ -72,11 +72,17 @@
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
<el-button
type=
"text"
type=
"text"
v-if=
"scope.row.confirmStatus === 1"
v-if=
"
scope.row.confirmStatus === 1 &&
scope.row.alarmLevelName == '正常'
"
@
click=
"cancel2(scope.row)"
@
click=
"cancel2(scope.row)"
>
取消
</el-button
>
取消
</el-button
>
>
<el-button
type=
"text"
v-else
@
click=
"confirm2(scope.row)"
<el-button
type=
"text"
v-else-if=
"scope.row.confirmStatus === 0"
@
click=
"confirm2(scope.row)"
>
确认
</el-button
>
确认
</el-button
>
>
</
template
>
</
template
>
...
@@ -171,6 +177,7 @@ import { cableTimeList, cableConfirm, cableCancel } from "../api";
...
@@ -171,6 +177,7 @@ import { cableTimeList, cableConfirm, cableCancel } from "../api";
import
{
exportLeakyCable
}
from
"@/api/export"
;
import
{
exportLeakyCable
}
from
"@/api/export"
;
import
search
from
"@/views/monitor/leakageCable/components/search.vue"
;
import
search
from
"@/views/monitor/leakageCable/components/search.vue"
;
import
download
from
"@/utils/download"
;
import
download
from
"@/utils/download"
;
import
socket
from
"@/utils/websocket"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -200,6 +207,8 @@ export default {
...
@@ -200,6 +207,8 @@ export default {
],
],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{},
searchOption
:
{},
exids
:
[],
wsUrl
:
"ws://8.142.143.40:8885/websocket/1/1"
,
};
};
},
},
components
:
{
search
},
components
:
{
search
},
...
@@ -210,28 +219,41 @@ export default {
...
@@ -210,28 +219,41 @@ export default {
return
"emergency"
;
return
"emergency"
;
}
else
if
(
row
.
alarmLevelName
==
"重要"
&&
column
.
label
==
"告警级别"
)
{
}
else
if
(
row
.
alarmLevelName
==
"重要"
&&
column
.
label
==
"告警级别"
)
{
return
"important"
;
return
"important"
;
}
else
if
(
row
.
alarmLevelName
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
return
"common"
;
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
return
"stripe"
;
return
"stripe"
;
}
}
},
},
refresh
()
{
this
.
searchOption
=
{};
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
this
.
getTableData
();
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
this
.
getTableData
();
},
},
getTableData
(
option
)
{
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
()
{
let
type
=
this
.
confirmStatus
==
2
?
""
:
this
.
confirmStatus
;
let
type
=
this
.
confirmStatus
==
2
?
""
:
this
.
confirmStatus
;
let
param
=
{
let
param
=
{
confirmStatus
:
type
,
confirmStatus
:
type
,
...
this
.
params
,
...
this
.
params
,
...
o
ption
,
...
this
.
searchO
ption
,
};
};
cableTimeList
(
param
).
then
((
res
)
=>
{
cableTimeList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
});
},
},
confirm
(
dialogInfo
)
{
confirm
(
dialogInfo
)
{
...
@@ -271,38 +293,36 @@ export default {
...
@@ -271,38 +293,36 @@ export default {
...
this
.
params
,
...
this
.
params
,
...
this
.
searchOption
,
...
this
.
searchOption
,
};
};
exportLeakyCable
(
param
).
then
((
res
)
=>
{
exportLeakyCable
(
{
ids
:
this
.
exids
}
).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`漏缆监测告警.xls`
);
download
(
res
,
"vnd.ms-excel"
,
`漏缆监测告警.xls`
);
});
});
},
},
},
},
computed
:
{
computed
:
{
// getWsMsg:{
getWsMsg
:{
// get(){
get
(){
// return this.$store.state.websocket.webSocketMsg
return
this
.
$store
.
state
.
websocket
.
webSocketMsg
// },
},
// set(a){
set
(
a
){
// this.$store.state.websocket.webSocketMsg=a
this
.
$store
.
state
.
websocket
.
webSocketMsg
=
a
// }
}
// },
},
},
},
watch
:
{
watch
:
{
getWsMsg
:
{
//
getWsMsg: {
handler
(
newVal
)
{
//
handler(newVal) {
this
.
getWsMsg
=!!
newVal
//
this.getWsMsg=!!newVal
console
.
log
(
newVal
);
//
console.log(newVal);
// alert("接收到webSocket推送" + newVal);
//
// alert("接收到webSocket推送" + newVal);
},
//
},
},
//
},
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
();
this
.
getTableData
();
},
},
created
()
{
created
()
{
this
.
$ws
.
createWS
(
"2"
)
// socket({socketUrl:this.wsUrl});
}
}
,
};
};
</
script
>
</
script
>
...
@@ -338,6 +358,9 @@ export default {
...
@@ -338,6 +358,9 @@ export default {
&
:
:
v-deep
.
important
{
&
:
:
v-deep
.
important
{
background-color
:
#f89850
;
background-color
:
#f89850
;
}
}
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
}
.page
{
.page
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/alarm/device/components/search.vue
0 → 100644
View file @
cbefbc50
<
template
>
<div>
<el-form
class=
"search-form"
:model=
"form"
ref=
"form"
label-width=
"80px"
:inline=
"true"
size=
"mini"
>
<el-form-item
label=
"网元设备"
>
<el-input
v-model=
"form.pointDeviceName"
clearable
placeholder=
"请输入网元设备"
></el-input>
</el-form-item>
<el-form-item
label=
"上传时间"
>
<el-date-picker
v-model=
"dateRange"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
@
click=
"toSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset"
>
重置
</el-button>
</el-form-item>
</el-form>
</div>
</
template
>
<
script
>
import
{
ConnectStatusEnum
}
from
'@/const/index'
export
default
{
name
:
'search'
,
data
()
{
return
{
form
:
formInit
(),
ConnectStatusEnum
,
dateRange
:
[],
}
},
mounted
()
{
},
methods
:
{
toSearch
()
{
this
.
form
.
startUploadTime
=
this
.
dateRange
[
0
]
this
.
form
.
endUploadTime
=
this
.
dateRange
[
1
]
this
.
$emit
(
'search'
,
this
.
form
)
},
reset
()
{
this
.
dateRange
=
[]
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
},
}
}
function
formInit
()
{
return
{
pointDeviceName
:
''
,
pointConnectStatus
:
''
,
startUploadTime
:
''
,
endUploadTime
:
''
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.w200
{
width
:
200px
;
}
.search-form
{
padding
:
10px
;
background-color
:
#EAF1FE
;
margin-bottom
:
20px
;
border-radius
:
8px
;
.el-form-item--mini.el-form-item
,
.el-form-item--small.el-form-item
{
margin-bottom
:
0
;
}
}
</
style
>
\ No newline at end of file
src/views/alarm/device/index.vue
View file @
cbefbc50
...
@@ -13,14 +13,13 @@
...
@@ -13,14 +13,13 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -50,11 +49,17 @@
...
@@ -50,11 +49,17 @@
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<el-button
<el-button
type=
"text"
type=
"text"
v-if=
"scope.row.confirmStatus === 1"
v-if=
"
scope.row.confirmStatus === 1 &&
scope.row.connectStatusName == '连接正常'
"
@
click=
"cancel2(scope.row)"
@
click=
"cancel2(scope.row)"
>
取消
</el-button
>
取消
</el-button
>
>
<el-button
type=
"text"
v-else
@
click=
"confirm2(scope.row)"
<el-button
type=
"text"
v-else-if=
"scope.row.confirmStatus === 0"
@
click=
"confirm2(scope.row)"
>
确认
</el-button
>
确认
</el-button
>
>
</
template
>
</
template
>
...
@@ -129,15 +134,15 @@
...
@@ -129,15 +134,15 @@
</template>
</template>
<
script
>
<
script
>
import
{
deviceList
,
deviceConfirm
,
deviceCancel
}
from
"../api"
;
import
{
deviceList
,
deviceConfirm
,
deviceCancel
}
from
"../api"
;
import
{
exportConnet
}
from
"@/api/export"
;
import
{
exportConnet
}
from
"@/api/export"
;
import
search
from
"
@/views/monitor/equipment
/components/search.vue"
;
import
search
from
"
.
/components/search.vue"
;
import
download
from
"@/utils/download"
;
import
download
from
"@/utils/download"
;
import
socket
from
"@/utils/websocket"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
alarmInfo
:
''
,
alarmInfo
:
""
,
dialogInfo
:
[],
dialogInfo
:
[],
centerDialogVisible
:
false
,
centerDialogVisible
:
false
,
confirmStatus
:
2
,
confirmStatus
:
2
,
...
@@ -163,6 +168,8 @@ export default {
...
@@ -163,6 +168,8 @@ export default {
],
],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{},
searchOption
:
{},
exids
:
[],
wsUrl
:
"ws://8.142.143.40:8885/websocket/1/2"
,
};
};
},
},
components
:
{
search
},
components
:
{
search
},
...
@@ -186,22 +193,34 @@ export default {
...
@@ -186,22 +193,34 @@ export default {
return
"stripe"
;
return
"stripe"
;
}
}
},
},
refresh
()
{
this
.
searchOption
=
{};
this
.
getTableData
();
if
(
this
.
$refs
.
reset
!=
undefined
)
{
this
.
$refs
.
reset
.
reset
();
}
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
this
.
getTableData
();
},
},
getTableData
(
option
)
{
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
()
{
let
type
=
this
.
confirmStatus
==
2
?
""
:
this
.
confirmStatus
;
let
type
=
this
.
confirmStatus
==
2
?
""
:
this
.
confirmStatus
;
let
param
=
{
let
param
=
{
confirmStatus
:
type
,
confirmStatus
:
type
,
...
this
.
params
,
...
this
.
params
,
...
o
ption
,
...
this
.
searchO
ption
,
};
};
deviceList
(
param
).
then
((
res
)
=>
{
deviceList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
});
},
},
confirm2
(
row
)
{
confirm2
(
row
)
{
...
@@ -216,7 +235,6 @@ export default {
...
@@ -216,7 +235,6 @@ export default {
this
.
centerDialogVisible
=
false
;
this
.
centerDialogVisible
=
false
;
},
},
cancel2
(
row
)
{
cancel2
(
row
)
{
console
.
log
(
row
);
this
.
centerDialogVisible
=
true
;
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
this
.
dialogInfo
=
row
;
},
},
...
@@ -226,7 +244,6 @@ export default {
...
@@ -226,7 +244,6 @@ export default {
id
:
dialogInfo
.
id
,
id
:
dialogInfo
.
id
,
};
};
deviceCancel
(
query
).
then
((
res
)
=>
{
deviceCancel
(
query
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
getTableData
();
this
.
getTableData
();
});
});
this
.
centerDialogVisible
=
false
;
this
.
centerDialogVisible
=
false
;
...
@@ -244,20 +261,18 @@ export default {
...
@@ -244,20 +261,18 @@ export default {
...
this
.
params
,
...
this
.
params
,
...
this
.
searchOption
,
...
this
.
searchOption
,
};
};
exportConnet
(
param
).
then
((
res
)
=>
{
exportConnet
(
{
ids
:
this
.
exids
}
).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`设备连接告警.xls`
);
download
(
res
,
"vnd.ms-excel"
,
`设备连接告警.xls`
);
});
});
},
},
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
();
this
.
getTableData
();
},
},
created
(){
created
()
{
}
// socket({socketUrl:this.wsUrl});
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -290,16 +305,16 @@ export default {
...
@@ -290,16 +305,16 @@ export default {
}
}
}
}
}
}
.tips
{
.tips
{
width
:
400px
;
width
:
400px
;
height
:
80px
;
height
:
80px
;
background
:
#fff
;
background
:
#fff
;
box-shadow
:
0px
2px
14px
#888888
;
box-shadow
:
0px
2px
14px
#888888
;
border-radius
:
5px
;
border-radius
:
5px
;
padding
:
0
20px
20px
20px
;
padding
:
0
20px
20px
20px
;
position
:
absolute
;
position
:
absolute
;
text-align
:
center
;
text-align
:
center
;
top
:
calc
(
50
%
-
40px
)
;
top
:
calc
(
50%
-
40px
);
left
:calc
(
50
%
-
200px
)
left
:
calc
(
50%
-
200px
);
}
}
</
style
>
</
style
>
src/views/history/deviceLinkRepair/index.vue
View file @
cbefbc50
...
@@ -4,16 +4,17 @@
...
@@ -4,16 +4,17 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids>
>
删除
</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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
>
清空数据
</el-button>
<el-button
type=
"primary"
>
清空数据
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -23,7 +24,11 @@
...
@@ -23,7 +24,11 @@
@selection-change="handleSelectionChange"
@selection-change="handleSelectionChange"
>
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"pointConnectStatus_text"
prop=
"pointConnectStatus_text"
label=
"连接状态"
label=
"连接状态"
...
@@ -31,7 +36,11 @@
...
@@ -31,7 +36,11 @@
align=
"center"
align=
"center"
>
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
>
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"userName"
label=
"维修人员信息"
align=
"center"
>
<el-table-column
prop=
"userName"
label=
"维修人员信息"
align=
"center"
>
</el-table-column>
</el-table-column>
...
@@ -51,11 +60,11 @@
...
@@ -51,11 +60,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ConnectMaintainList
,
ConnectMaintainDelete
}
from
'../api'
import
{
ConnectMaintainList
,
ConnectMaintainDelete
}
from
"../api"
;
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
{
ConnectStatusEnum
}
from
"@/const/index"
;
import
search
from
'./components/search.vue'
import
search
from
"./components/search.vue"
;
import
download
from
'@/utils/download'
import
download
from
"@/utils/download"
;
import
{
exportConnectMaintainHistory
}
from
'@/api/export'
import
{
exportConnectMaintainHistory
}
from
"@/api/export"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -68,47 +77,59 @@ export default {
...
@@ -68,47 +77,59 @@ export default {
total
:
14
,
total
:
14
,
tableData
:
[],
tableData
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:
[],
};
};
},
},
components
:
{
components
:
{
search
search
,
},
},
methods
:
{
methods
:
{
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
(
item
=>
item
.
id
)
let
deleteIds
=
val
.
map
(
(
item
)
=>
item
.
id
);
this
.
multipleSelection
=
deleteIds
this
.
multipleSelection
=
deleteIds
;
},
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
();
},
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
(
this
.
$refs
.
reset
.
reset
())
:
(
this
.
getTableData
())
},
},
getTableData
(
option
)
{
getTableData
(
option
)
{
this
.
searchOption
=
option
this
.
searchOption
=
option
;
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
option
...
option
,
}
};
ConnectMaintainList
(
params
).
then
(
res
=>
{
ConnectMaintainList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[];
list
.
forEach
(
item
=>
{
list
.
forEach
((
item
)
=>
{
item
.
pointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
]
item
.
pointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
];
});
});
this
.
tableData
=
list
this
.
tableData
=
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
;
})
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
},
toDelete
()
{
toDelete
()
{
ConnectMaintainDelete
({
ids
:
this
.
multipleSelection
}).
then
(
res
=>
{
ConnectMaintainDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
$message
.
success
(
"删除成功!"
);
this
.
getTableData
()
this
.
getTableData
()
;
})
})
;
},
},
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
pointConnectStatus_text
==
"连接异常"
&&
column
.
label
==
"连接状态"
)
{
if
(
row
.
pointConnectStatus_text
==
"连接异常"
&&
column
.
label
==
"连接状态"
)
{
return
"emergency"
;
return
"emergency"
;
}
else
if
(
row
.
pointConnectStatus_text
==
"连接正常"
&&
column
.
label
==
"连接状态"
)
{
}
else
if
(
row
.
pointConnectStatus_text
==
"连接正常"
&&
column
.
label
==
"连接状态"
)
{
return
"normal"
;
return
"normal"
;
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
...
@@ -116,19 +137,15 @@ export default {
...
@@ -116,19 +137,15 @@ export default {
}
}
},
},
toExport
()
{
toExport
()
{
let
params
=
{
exportConnectMaintainHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
...
this
.
params
,
download
(
res
,
"vnd.ms-excel"
,
`设备连接维修历史.xls`
);
...
this
.
searchOption
});
}
exportConnectMaintainHistory
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备连接维修历史.xls`
)
})
},
},
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
},
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.leakage-cable
{
.leakage-cable
{
...
...
src/views/history/deviceLinkStatus/index.vue
View file @
cbefbc50
...
@@ -4,19 +4,17 @@
...
@@ -4,19 +4,17 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<delids
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
:multipleSelection2=
"multipleSelection"
@
click=
"toDelete"
>
删除
</delids
>
删除
</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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
>
清空数据
</el-button>
<el-button
type=
"primary"
>
清空数据
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -26,7 +24,11 @@
...
@@ -26,7 +24,11 @@
@selection-change="handleSelectionChange"
@selection-change="handleSelectionChange"
>
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"pointConnectStatus_text"
prop=
"pointConnectStatus_text"
label=
"连接状态"
label=
"连接状态"
...
@@ -34,7 +36,11 @@
...
@@ -34,7 +36,11 @@
align=
"center"
align=
"center"
>
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
>
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"uploadTime"
label=
"上传时间"
align=
"center"
/>
<el-table-column
prop=
"uploadTime"
label=
"上传时间"
align=
"center"
/>
<el-table-column
prop=
"cancelTime"
label=
"取消时间"
align=
"center"
/>
<el-table-column
prop=
"cancelTime"
label=
"取消时间"
align=
"center"
/>
...
@@ -54,11 +60,11 @@
...
@@ -54,11 +60,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
ConnectStatusList
,
ConnectStatusDelete
}
from
'../api'
import
{
ConnectStatusList
,
ConnectStatusDelete
}
from
"../api"
;
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
{
ConnectStatusEnum
}
from
"@/const/index"
;
import
search
from
'./components/search.vue'
import
search
from
"./components/search.vue"
;
import
{
exportConnectStatusHistory
}
from
'@/api/export'
import
{
exportConnectStatusHistory
}
from
"@/api/export"
;
import
download
from
'@/utils/download'
import
download
from
"@/utils/download"
;
export
default
{
export
default
{
props
:
[],
props
:
[],
data
()
{
data
()
{
...
@@ -72,47 +78,59 @@ export default {
...
@@ -72,47 +78,59 @@ export default {
total
:
10
,
total
:
10
,
tableData
:
[],
tableData
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
}
exids
:
[],
};
},
},
components
:
{
components
:
{
search
search
,
},
},
methods
:
{
methods
:
{
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
(
item
=>
item
.
id
)
let
deleteIds
=
val
.
map
(
(
item
)
=>
item
.
id
);
this
.
multipleSelection
=
deleteIds
this
.
multipleSelection
=
deleteIds
;
},
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
();
},
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
(
this
.
$refs
.
reset
.
reset
())
:
(
this
.
getTableData
())
},
},
getTableData
(
option
)
{
getTableData
(
option
)
{
this
.
searchOption
=
option
this
.
searchOption
=
option
;
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
option
...
option
,
}
};
ConnectStatusList
(
params
).
then
(
res
=>
{
ConnectStatusList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[];
list
.
forEach
(
item
=>
{
list
.
forEach
((
item
)
=>
{
item
.
pointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
]
item
.
pointConnectStatus_text
=
})
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
];
this
.
tableData
=
list
});
this
.
total
=
res
.
total
this
.
tableData
=
list
;
})
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
},
toDelete
()
{
toDelete
()
{
ConnectStatusDelete
({
ids
:
this
.
multipleSelection
}).
then
(
res
=>
{
ConnectStatusDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
$message
.
success
(
"删除成功!"
);
this
.
getTableData
()
this
.
getTableData
()
;
})
})
;
},
},
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
pointConnectStatus_text
==
"连接异常"
&&
column
.
label
==
"连接状态"
)
{
if
(
row
.
pointConnectStatus_text
==
"连接异常"
&&
column
.
label
==
"连接状态"
)
{
return
"emergency"
;
return
"emergency"
;
}
else
if
(
row
.
pointConnectStatus_text
==
"连接正常"
&&
column
.
label
==
"连接状态"
)
{
}
else
if
(
row
.
pointConnectStatus_text
==
"连接正常"
&&
column
.
label
==
"连接状态"
)
{
return
"normal"
;
return
"normal"
;
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
...
@@ -120,17 +138,13 @@ export default {
...
@@ -120,17 +138,13 @@ export default {
}
}
},
},
toExport
()
{
toExport
()
{
let
params
=
{
exportConnectStatusHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
...
this
.
params
,
download
(
res
,
"vnd.ms-excel"
,
`设备连接历史状态.xls`
);
...
this
.
searchOption
});
}
},
exportConnectStatusHistory
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备连接历史状态.xls`
)
})
}
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
},
};
};
</
script
>
</
script
>
...
...
src/views/history/leakyCableRepair/index.vue
View file @
cbefbc50
...
@@ -4,18 +4,16 @@
...
@@ -4,18 +4,16 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<delids
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"deleteCable"
:multipleSelection2=
"multipleSelection"
@
del=
"deleteCable"
>
删除
</delids
>
删除
</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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -38,11 +36,20 @@
...
@@ -38,11 +36,20 @@
width=
"180"
width=
"180"
align=
"center"
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>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"alarmMaintainTime"
label=
"告警维修时间"
align=
"center"
/>
<el-table-column
prop=
"alarmMaintainTime"
label=
"告警维修时间"
align=
"center"
/>
</el-table>
</el-table>
<Pagination
<Pagination
:limit=
"params.size"
:limit=
"params.size"
...
@@ -54,10 +61,10 @@
...
@@ -54,10 +61,10 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
MonitorMaintainList
,
MonitorMaintainDelete
}
from
'../api'
import
{
MonitorMaintainList
,
MonitorMaintainDelete
}
from
"../api"
;
import
search
from
'./components/search.vue'
import
search
from
"./components/search.vue"
;
import
download
from
'@/utils/download'
import
download
from
"@/utils/download"
;
import
{
exportLeakyMaintainHistory
}
from
'@/api/export'
import
{
exportLeakyMaintainHistory
}
from
"@/api/export"
;
export
default
{
export
default
{
props
:
[],
props
:
[],
data
()
{
data
()
{
...
@@ -70,62 +77,66 @@ export default {
...
@@ -70,62 +77,66 @@ export default {
total
:
10
,
total
:
10
,
tableData
:
[],
tableData
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
}
exids
:
[],
};
},
},
components
:
{
components
:
{
search
search
,
},
},
methods
:
{
methods
:
{
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
(
item
=>
item
.
id
)
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
);
this
.
multipleSelection
=
deleteIds
this
.
multipleSelection
=
deleteIds
;
},
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
();
},
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
(
this
.
$refs
.
reset
.
reset
())
:
(
this
.
getTableData
())
},
},
getTableData
(
option
)
{
getTableData
(
option
)
{
this
.
searchOption
=
option
this
.
searchOption
=
option
;
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
option
...
option
,
}
};
MonitorMaintainList
(
params
).
then
(
res
=>
{
MonitorMaintainList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
this
.
tableData
=
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
;
})
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
},
deleteCable
()
{
deleteCable
()
{
MonitorMaintainDelete
({
ids
:
this
.
multipleSelection
}).
then
(
res
=>
{
MonitorMaintainDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
$message
.
success
(
"删除成功!"
);
this
.
getTableData
()
this
.
getTableData
()
;
})
})
;
},
},
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
alarmLevelName
==
'紧急'
&&
column
.
label
==
'告警级别'
)
{
if
(
row
.
alarmLevelName
==
"紧急"
&&
column
.
label
==
"告警级别"
)
{
return
'emergency'
return
"emergency"
;
}
else
if
(
row
.
alarmLevelName
==
'重要'
&&
column
.
label
==
'告警级别'
)
{
}
else
if
(
row
.
alarmLevelName
==
"重要"
&&
column
.
label
==
"告警级别"
)
{
return
'important'
return
"important"
;
}
else
if
(
row
.
alarmLevelName
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
return
"common"
;
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
return
'stripe'
return
"stripe"
;
}
}
},
},
toExport
()
{
toExport
()
{
let
params
=
{
exportLeakyMaintainHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
...
this
.
params
,
download
(
res
,
"vnd.ms-excel"
,
`漏缆监测维修历史.xls`
);
...
this
.
searchOption
});
}
},
exportLeakyMaintainHistory
(
params
).
then
(
res
=>
{
},
download
(
res
,
'vnd.ms-excel'
,
`漏缆监测维修历史.xls`
)
mounted
()
{
})
this
.
getTableData
();
}
},
},
mounted
()
{
this
.
getTableData
()
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -160,6 +171,9 @@ export default {
...
@@ -160,6 +171,9 @@ export default {
&
:
:
v-deep
.
important
{
&
:
:
v-deep
.
important
{
background-color
:
#f89850
;
background-color
:
#f89850
;
}
}
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
}
.page
{
.page
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/history/leakyCableStatus/index.vue
View file @
cbefbc50
...
@@ -4,19 +4,19 @@
...
@@ -4,19 +4,19 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<div
class=
"operate-btn"
>
<delids
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"deleteCable"
:multipleSelection2=
"multipleSelection"
@
click=
"deleteCable"
>
删除
</delids
>
删除
</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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
>
图形报表
</el-button>
<el-button
:type=
"multipleSelection.length ? 'primary' : 'info'"
:disabled=
"!multipleSelection.length"
>
图形报表
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
</div>
<el-table
<el-table
ref=
"multipleTable"
ref=
"multipleTable"
...
@@ -32,6 +32,9 @@
...
@@ -32,6 +32,9 @@
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"uploadTime"
label=
"上传日期"
align=
"center"
/>
<el-table-column
prop=
"uploadTime"
label=
"上传日期"
align=
"center"
/>
<el-table-column
label=
"图形分析"
align=
"center"
>
<el-button
type=
"text"
>
生成图表
</el-button>
</el-table-column>
>
</el-table>
</el-table>
<Pagination
<Pagination
:limit=
"params.size"
:limit=
"params.size"
...
@@ -44,80 +47,83 @@
...
@@ -44,80 +47,83 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
MonitorStatusList
,
MonitorStatusDelete
}
from
'../api'
import
{
MonitorStatusList
,
MonitorStatusDelete
}
from
"../api"
;
import
search
from
'./components/search.vue'
import
search
from
"./components/search.vue"
;
import
download
from
'@/utils/download'
import
download
from
"@/utils/download"
;
import
{
exportLeakyStatusHistory
}
from
'@/api/export'
import
{
exportLeakyStatusHistory
}
from
"@/api/export"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
params
:
{
params
:
{
current
:
1
,
current
:
1
,
size
:
10
size
:
10
,
},
},
total
:
10
,
total
:
10
,
tableData
:
[],
tableData
:
[],
multipleSelection
:
[],
multipleSelection
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
}
exids
:
[],
};
},
},
components
:
{
components
:
{
search
search
,
},
},
methods
:
{
methods
:
{
// 表格背景图颜色
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
level
===
'紧急'
&&
column
.
label
===
'告警级别'
)
{
if
(
row
.
level
===
"紧急"
&&
column
.
label
===
"告警级别"
)
{
return
'emergency'
return
"emergency"
;
}
else
if
(
row
.
level
===
'重要'
&&
column
.
label
===
'告警级别'
)
{
}
else
if
(
row
.
level
===
"重要"
&&
column
.
label
===
"告警级别"
)
{
return
'important'
return
"important"
;
}
else
if
(
row
.
level
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
return
"common"
;
}
}
if
(
rowIndex
%
2
===
1
)
{
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
"stripe"
;
}
}
},
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
();
},
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
(
this
.
$refs
.
reset
.
reset
())
:
(
this
.
getTableData
())
},
},
getTableData
(
option
)
{
getTableData
(
option
)
{
this
.
searchOption
=
option
this
.
searchOption
=
option
;
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
option
...
option
,
}
};
MonitorStatusList
(
params
).
then
(
res
=>
{
MonitorStatusList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
this
.
tableData
=
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
;
})
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
(
item
=>
item
.
id
)
let
deleteIds
=
val
.
map
(
(
item
)
=>
item
.
id
);
this
.
multipleSelection
=
deleteIds
this
.
multipleSelection
=
deleteIds
;
},
},
deleteCable
()
{
deleteCable
()
{
MonitorStatusDelete
({
ids
:
this
.
multipleSelection
}).
then
(
res
=>
{
MonitorStatusDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
$message
.
success
(
"删除成功!"
);
this
.
getTableData
()
this
.
getTableData
()
;
})
})
;
},
},
toExport
()
{
toExport
()
{
let
params
=
{
exportLeakyStatusHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
...
this
.
params
,
download
(
res
,
"vnd.ms-excel"
,
`漏缆监测历史状态.xls`
);
...
this
.
searchOption
});
}
},
exportLeakyStatusHistory
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`漏缆监测历史状态.xls`
)
})
}
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
}
}
,
}
}
;
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -152,6 +158,9 @@ export default {
...
@@ -152,6 +158,9 @@ export default {
&
:
:
v-deep
.
important
{
&
:
:
v-deep
.
important
{
background-color
:
#f89850
;
background-color
:
#f89850
;
}
}
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
}
.page
{
.page
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/login/index.vue
View file @
cbefbc50
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
<
script
>
<
script
>
import
{
login
}
from
"@/api/user"
import
{
login
}
from
"@/api/user"
import
{
setToken
}
from
"@/utils/auth"
import
{
setToken
}
from
"@/utils/auth"
import
EventBus
from
'@/utils/bus'
export
default
{
export
default
{
name
:
"Login"
,
name
:
"Login"
,
data
()
{
data
()
{
...
@@ -160,6 +160,8 @@ export default {
...
@@ -160,6 +160,8 @@ export default {
this
.
$refs
.
loginForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
loginForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
toLogin
()
this
.
toLogin
()
// EventBus.$emit('wsOpen')
}
else
{
}
else
{
console
.
log
(
"error submit!!"
);
console
.
log
(
"error submit!!"
);
return
false
;
return
false
;
...
...
src/views/monitor/equipment/index.vue
View file @
cbefbc50
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div></div>
<div></div>
<div
class=
"operate-btn"
>
<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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -18,11 +18,31 @@
...
@@ -18,11 +18,31 @@
:cell-class-name=
"cellClassFn"
:cell-class-name=
"cellClassFn"
:header-cell-style=
"
{ background: '#EAF1FE', color: '#666666' }"
:header-cell-style=
"
{ background: '#EAF1FE', color: '#666666' }"
>
>
<el-table-column
prop=
"startPointDeviceName"
label=
"网元设备"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"startPointConnectStatus_text"
label=
"连接状态"
align=
"center"
/>
prop=
"startPointDeviceName"
<el-table-column
prop=
"endPointDeviceName"
label=
"网元设备"
align=
"center"
/>
label=
"网元设备"
<el-table-column
prop=
"endPointConnectStatus_text"
label=
"连接状态"
align=
"center"
/>
align=
"center"
<el-table-column
prop=
"lastPointDeviceName"
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-column
prop=
"uploadTime"
label=
"上传时间"
align=
"center"
/>
</el-table>
</el-table>
<Pagination
<Pagination
...
@@ -36,75 +56,96 @@
...
@@ -36,75 +56,96 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
DeviceStatusList
}
from
'../api'
import
{
DeviceStatusList
}
from
"../api"
;
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
{
ConnectStatusEnum
}
from
"@/const/index"
;
import
search
from
'./components/search.vue'
import
search
from
"./components/search.vue"
;
import
download
from
'@/utils/download'
import
download
from
"@/utils/download"
;
import
{
exportConnetTime
}
from
'@/api/export'
import
{
exportConnetTime
}
from
"@/api/export"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
ConnectStatusEnum
,
ConnectStatusEnum
,
params
:
{
params
:
{
current
:
1
,
current
:
1
,
size
:
10
size
:
10
,
},
},
total
:
10
,
total
:
10
,
tableData
:
[],
tableData
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:
[],
};
};
},
},
components
:
{
search
},
components
:
{
search
},
methods
:
{
methods
:
{
// 表格背景图颜色
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
((
row
.
startPointConnectStatus_text
==
'连接正常'
&&
column
.
property
==
'startPointConnectStatus_text'
))
{
if
(
return
'green'
row
.
startPointConnectStatus_text
==
"连接正常"
&&
column
.
property
==
"startPointConnectStatus_text"
)
{
return
"green"
;
}
}
if
((
row
.
startPointConnectStatus_text
==
'连接异常'
&&
column
.
property
==
'startPointConnectStatus_text'
))
{
if
(
return
'red'
row
.
startPointConnectStatus_text
==
"连接异常"
&&
column
.
property
==
"startPointConnectStatus_text"
)
{
return
"red"
;
}
}
if
((
row
.
endPointConnectStatus_text
==
'连接正常'
&&
column
.
property
==
'endPointConnectStatus_text'
))
{
if
(
return
'green'
row
.
endPointConnectStatus_text
==
"连接正常"
&&
}
else
if
((
row
.
endPointConnectStatus_text
==
'连接异常'
&&
column
.
property
==
'endPointConnectStatus_text'
))
{
column
.
property
==
"endPointConnectStatus_text"
return
'red'
)
{
return
"green"
;
}
else
if
(
row
.
endPointConnectStatus_text
==
"连接异常"
&&
column
.
property
==
"endPointConnectStatus_text"
)
{
return
"red"
;
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
return
'stripe'
return
"stripe"
;
}
}
},
},
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
(
this
.
$refs
.
reset
.
reset
())
:
(
this
.
getTableData
())
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
();
},
search
(
option
)
{
this
.
searchOption
=
option
;
this
.
getTableData
();
},
},
getTableData
(
option
)
{
getTableData
()
{
this
.
searchOption
=
option
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
option
...
this
.
searchOption
,
}
};
DeviceStatusList
(
params
).
then
(
res
=>
{
DeviceStatusList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[];
list
.
forEach
(
item
=>
{
list
.
forEach
((
item
)
=>
{
item
.
startPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
startPointConnectStatus
]
item
.
startPointConnectStatus_text
=
item
.
endPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
endPointConnectStatus
]
this
.
ConnectStatusEnum
[
item
.
startPointConnectStatus
];
item
.
endPointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
endPointConnectStatus
];
});
});
this
.
tableData
=
list
this
.
tableData
=
list
;
this
.
total
=
res
.
total
this
.
total
=
res
.
total
;
})
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
},
},
toExport
()
{
toExport
()
{
let
params
=
{
exportConnetTime
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
...
this
.
params
,
download
(
res
,
"vnd.ms-excel"
,
`设备实时.xls`
);
...
this
.
searchOption
});
}
},
exportConnetTime
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备实时.xls`
)
})
}
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
},
};
};
</
script
>
</
script
>
...
...
src/views/monitor/leakageCable/index.vue
View file @
cbefbc50
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"toExport"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"
getTableData
"
/>
<search
@
search=
"
search"
ref=
"reset
"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -31,11 +31,20 @@
...
@@ -31,11 +31,20 @@
width=
"180"
width=
"180"
align=
"center"
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>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"lateUploadTime"
label=
"最新上传时间"
align=
"center"
/>
<el-table-column
prop=
"lateUploadTime"
label=
"最新上传时间"
align=
"center"
/>
</el-table>
</el-table>
<Pagination
<Pagination
:limit=
"params.size"
:limit=
"params.size"
...
@@ -48,68 +57,78 @@
...
@@ -48,68 +57,78 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
CableStatusList
,
CableStatusExport
}
from
'../api'
import
{
CableStatusList
,
CableStatusExport
}
from
"../api"
;
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
{
ConnectStatusEnum
}
from
"@/const/index"
;
import
search
from
'./components/search.vue'
import
search
from
"./components/search.vue"
;
import
{
exportLeakyCableTime
}
from
'@/api/export'
import
{
exportLeakyCableTime
}
from
"@/api/export"
;
import
download
from
'@/utils/download'
import
download
from
"@/utils/download"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
ConnectStatusEnum
,
ConnectStatusEnum
,
params
:
{
params
:
{
curent
:
1
,
curent
:
1
,
size
:
10
size
:
10
,
},
},
total
:
10
,
total
:
10
,
tableData
:
[],
tableData
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:
[],
};
};
},
},
components
:
{
search
},
components
:
{
search
},
methods
:
{
methods
:
{
// 表格背景图颜色
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
alarmLevelName
==
'紧急'
&&
column
.
label
==
'告警级别'
)
{
if
(
row
.
alarmLevelName
==
"紧急"
&&
column
.
label
==
"告警级别"
)
{
return
'emergency'
return
"emergency"
;
}
else
if
(
row
.
alarmLevelName
==
'重要'
&&
column
.
label
==
'告警级别'
)
{
}
else
if
(
row
.
alarmLevelName
==
"重要"
&&
column
.
label
==
"告警级别"
)
{
return
'important'
return
"important"
;
}
else
if
(
row
.
alarmLevelName
==
"一般"
&&
column
.
label
==
"告警级别"
)
{
return
"common"
;
}
}
if
(
rowIndex
%
2
==
1
)
{
if
(
rowIndex
%
2
==
1
)
{
return
'stripe'
return
"stripe"
;
}
}
},
},
refresh
()
{
this
.
searchOption
=
{};
this
.
$refs
.
reset
!=
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
();
},
handlePageChange
(
pageData
)
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
curent
=
pageData
.
page
this
.
params
.
curent
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
()
;
},
},
getTableData
(
option
)
{
search
(
option
)
{
this
.
searchOption
=
option
this
.
searchOption
=
option
;
this
.
getTableData
();
},
getTableData
()
{
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
option
...
this
.
searchOption
,
}
}
;
CableStatusList
(
params
).
then
(
res
=>
{
CableStatusList
(
params
).
then
(
(
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[]
;
this
.
tableData
=
list
this
.
tableData
=
list
;
this
.
total
=
res
.
records
.
length
this
.
total
=
res
.
records
.
length
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
})
})
;
},
},
toExport
()
{
toExport
()
{
let
params
=
{
let
params
=
{
...
this
.
params
,
...
this
.
params
,
...
this
.
searchOption
...
this
.
searchOption
,
}
}
;
exportLeakyCableTime
(
params
).
then
(
res
=>
{
exportLeakyCableTime
(
{
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`漏缆实时.xls`
)
download
(
res
,
"vnd.ms-excel"
,
`漏缆实时.xls`
);
})
})
;
}
}
,
},
},
mounted
()
{
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
},
};
};
</
script
>
</
script
>
...
@@ -146,6 +165,9 @@ export default {
...
@@ -146,6 +165,9 @@ export default {
&
:
:
v-deep
.
important
{
&
:
:
v-deep
.
important
{
background-color
:
#f89850
;
background-color
:
#f89850
;
}
}
&
:
:
v-deep
.
common
{
background-color
:
#ead906
;
}
.page
{
.page
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/views/setting/statistics/comp/fsuTable.vue
View file @
cbefbc50
...
@@ -69,8 +69,8 @@
...
@@ -69,8 +69,8 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn
"
@
click=
"reset"
>
重置
</el-button>
<el-button
type=
"primary
"
@
click=
"reset"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
...
@@ -186,7 +186,7 @@ export default {
...
@@ -186,7 +186,7 @@ export default {
fsubatchDelete
({
ids
}).
then
((
res
)
=>
{
fsubatchDelete
({
ids
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
successAlert
(
"删除成功"
);
successAlert
(
"删除成功"
);
this
.
getTableData
();
this
.
getTableData
();
}
else
{
}
else
{
warningAlert
(
"删除失败"
);
warningAlert
(
"删除失败"
);
...
@@ -194,8 +194,7 @@ export default {
...
@@ -194,8 +194,7 @@ export default {
});
});
},
},
refresh
()
{
refresh
()
{
this
.
reset
();
this
.
reset
();
this
.
getTableData
();
},
},
searchQuery
()
{
searchQuery
()
{
this
.
istrue
=
1
;
this
.
istrue
=
1
;
...
@@ -203,24 +202,20 @@ export default {
...
@@ -203,24 +202,20 @@ export default {
},
},
reset
()
{
reset
()
{
this
.
FSUForm
=
formInit
();
this
.
FSUForm
=
formInit
();
this
.
getTableData
();
},
},
exportData
()
{
exportData
()
{
fsulist
({
size
:
this
.
total
}).
then
((
res
)
=>
{
// let ids = [];
let
list
=
res
.
records
||
[];
// this.ids.length != 0 ? (ids = this.ids) : (ids = this.exids);
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
exportFsu
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`FSU表.xls`
);
});
});
exportFsu
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`FSU表.xls`
);
});
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
},
handleView
(
row
)
{
handleView
(
row
)
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
"/detail"
,
path
:
"/detail"
,
...
@@ -240,6 +235,7 @@ export default {
...
@@ -240,6 +235,7 @@ export default {
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
!=
0
)
{
if
(
this
.
tableData
.
length
!=
0
)
{
...
...
src/views/setting/statistics/comp/leakyTable.vue
View file @
cbefbc50
...
@@ -109,8 +109,8 @@
...
@@ -109,8 +109,8 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
...
@@ -131,9 +131,6 @@
...
@@ -131,9 +131,6 @@
>
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"leakyCableDescribe"
prop=
"leakyCableDescribe"
label=
"漏缆描述"
label=
"漏缆描述"
...
@@ -146,19 +143,18 @@
...
@@ -146,19 +143,18 @@
show-overflow-tooltip
show-overflow-tooltip
align=
"center"
align=
"center"
/>
/>
<el-table-column
<el-table-column
prop=
"leakyCableMode"
prop=
"leakyCableMode"
label=
"漏缆型号"
label=
"漏缆型号"
show-overflow-tooltip
show-overflow-tooltip
align=
"center"
align=
"center"
/>
/>
<el-table-column
prop=
"railWayName"
label=
"所在铁路线"
align=
"center"
/>
<el-table-column
prop=
"railWayName"
label=
"所在铁路线"
align=
"center"
/>
<el-table-column
prop=
"siteName"
label=
"所在站点"
align=
"center"
/>
<el-table-column
prop=
"siteName"
label=
"所在站点"
align=
"center"
/>
<el-table-column
prop=
"fsuName"
label=
"所在FSU"
align=
"center"
/>
<el-table-column
prop=
"fsuName"
label=
"所在FSU"
align=
"center"
/>
<el-table-column
prop=
"equipName"
label=
"所在监测设备"
align=
"center"
/>
<el-table-column
prop=
"equipName"
label=
"所在监测设备"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"action"
prop=
"action"
label=
"详细信息"
label=
"详细信息"
...
@@ -247,7 +243,7 @@ export default {
...
@@ -247,7 +243,7 @@ export default {
leakyCablebatchDelete
({
ids
}).
then
((
res
)
=>
{
leakyCablebatchDelete
({
ids
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
successAlert
(
"删除成功"
);
successAlert
(
"删除成功"
);
this
.
getTableData
();
this
.
getTableData
();
}
else
{
}
else
{
warningAlert
(
"删除失败"
);
warningAlert
(
"删除失败"
);
...
@@ -255,8 +251,7 @@ export default {
...
@@ -255,8 +251,7 @@ export default {
});
});
},
},
refresh
()
{
refresh
()
{
this
.
reset
();
this
.
reset
();
this
.
getTableData
();
},
},
searchQuery
()
{
searchQuery
()
{
this
.
istrue
=
1
;
this
.
istrue
=
1
;
...
@@ -264,17 +259,13 @@ export default {
...
@@ -264,17 +259,13 @@ export default {
},
},
reset
()
{
reset
()
{
this
.
leakyCableForm
=
formInit
();
this
.
leakyCableForm
=
formInit
();
this
.
getTableData
();
},
},
exportData
()
{
exportData
()
{
leakyCablelist
({
size
:
this
.
total
}).
then
((
res
)
=>
{
exportLeaky
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
download
(
res
,
"vnd.ms-excel"
,
`漏缆表.xls`
);
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
});
exportLeaky
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`漏缆表.xls`
);
});
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
...
@@ -301,7 +292,7 @@ export default {
...
@@ -301,7 +292,7 @@ export default {
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
)
{
if
(
this
.
tableData
.
length
)
{
successAlert
(
"查询成功"
);
successAlert
(
"查询成功"
);
...
@@ -352,7 +343,7 @@ function formInit(data = {}) {
...
@@ -352,7 +343,7 @@ function formInit(data = {}) {
monitor
:
""
,
monitor
:
""
,
leakyCableCode
:
""
,
leakyCableCode
:
""
,
leakyCableDescribe
:
""
,
leakyCableDescribe
:
""
,
siteName
:
""
,
siteName
:
""
,
leakyCableMode
:
""
,
leakyCableMode
:
""
,
current
:
1
,
current
:
1
,
size
:
10
,
size
:
10
,
...
...
src/views/setting/statistics/comp/monitorTable.vue
View file @
cbefbc50
...
@@ -83,9 +83,9 @@
...
@@ -83,9 +83,9 @@
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"铁路名称:"
>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
...
@@ -197,7 +197,7 @@ export default {
...
@@ -197,7 +197,7 @@ export default {
monitorEquipbatchDelete
({
ids
}).
then
((
res
)
=>
{
monitorEquipbatchDelete
({
ids
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
successAlert
(
"删除成功"
);
successAlert
(
"删除成功"
);
this
.
getTableData
();
this
.
getTableData
();
}
else
{
}
else
{
warningAlert
(
"删除失败"
);
warningAlert
(
"删除失败"
);
...
@@ -206,7 +206,6 @@ export default {
...
@@ -206,7 +206,6 @@ export default {
},
},
refresh
()
{
refresh
()
{
this
.
reset
();
this
.
reset
();
this
.
getTableData
();
},
},
searchQuery
()
{
searchQuery
()
{
this
.
istrue
=
1
;
this
.
istrue
=
1
;
...
@@ -214,17 +213,13 @@ export default {
...
@@ -214,17 +213,13 @@ export default {
},
},
reset
()
{
reset
()
{
this
.
monitorForm
=
formInit
();
this
.
monitorForm
=
formInit
();
this
.
getTableData
();
},
},
exportData
()
{
exportData
()
{
monitorEquiplist
({
size
:
this
.
total
}).
then
((
res
)
=>
{
exportMonitorEquip
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
download
(
res
,
"vnd.ms-excel"
,
`监测设备表.xls`
);
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
});
exportMonitorEquip
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`监测设备表.xls`
);
});
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
...
@@ -251,7 +246,7 @@ export default {
...
@@ -251,7 +246,7 @@ export default {
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
)
{
if
(
this
.
tableData
.
length
)
{
successAlert
(
"查询成功"
);
successAlert
(
"查询成功"
);
...
@@ -288,7 +283,6 @@ export default {
...
@@ -288,7 +283,6 @@ export default {
};
};
function
formInit
(
data
=
{})
{
function
formInit
(
data
=
{})
{
return
{
return
{
wayId
:
""
,
wayId
:
""
,
parentId
:
""
,
parentId
:
""
,
ip
:
""
,
ip
:
""
,
...
...
src/views/setting/statistics/comp/railWayTable.vue
View file @
cbefbc50
...
@@ -49,9 +49,9 @@
...
@@ -49,9 +49,9 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
...
@@ -158,8 +158,7 @@ export default {
...
@@ -158,8 +158,7 @@ export default {
});
});
},
},
refresh
()
{
refresh
()
{
this
.
reset
();
this
.
reset
();
this
.
getTableData
();
},
},
searchQuery
()
{
searchQuery
()
{
this
.
istrue
=
1
;
this
.
istrue
=
1
;
...
@@ -167,17 +166,13 @@ export default {
...
@@ -167,17 +166,13 @@ export default {
},
},
reset
()
{
reset
()
{
this
.
railData
=
formInit
();
this
.
railData
=
formInit
();
this
.
getTableData
();
},
},
exportData
()
{
exportData
()
{
railWaylist
({
size
:
this
.
total
}).
then
((
res
)
=>
{
exportRailWay
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
download
(
res
,
"vnd.ms-excel"
,
`铁路线表.xls`
);
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
});
exportRailWay
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`铁路线表.xls`
);
});
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
multipleSelection
=
val
;
...
@@ -204,7 +199,7 @@ export default {
...
@@ -204,7 +199,7 @@ export default {
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
)
{
if
(
this
.
tableData
.
length
)
{
successAlert
(
"查询成功"
);
successAlert
(
"查询成功"
);
...
...
src/views/setting/statistics/comp/stationTable.vue
View file @
cbefbc50
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
></el-option>
</el-select
></el-option>
</el-select
></el-form-item>
></el-form-item>
<el-form-item>
<el-form-item>
<el-button
class=
"seabtn
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"success
"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
class=
"seabtn"
@
click=
"reset()
"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"reset
"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-table
<el-table
...
@@ -159,7 +159,7 @@ export default {
...
@@ -159,7 +159,7 @@ export default {
},
},
refresh
()
{
refresh
()
{
this
.
reset
();
this
.
reset
();
this
.
getTableData
();
},
},
searchQuery
()
{
searchQuery
()
{
this
.
istrue
=
1
;
this
.
istrue
=
1
;
...
@@ -167,12 +167,9 @@ export default {
...
@@ -167,12 +167,9 @@ export default {
},
},
reset
()
{
reset
()
{
this
.
siteForm
=
formInit
();
this
.
siteForm
=
formInit
();
this
.
getTableData
();
},
},
exportData
()
{
exportData
()
{
sitelist
({
size
:
this
.
total
}).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
});
exportSite
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
exportSite
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`站点表.xls`
);
download
(
res
,
"vnd.ms-excel"
,
`站点表.xls`
);
});
});
...
@@ -200,6 +197,7 @@ export default {
...
@@ -200,6 +197,7 @@ export default {
let
list
=
res
.
records
||
[];
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
)
{
if
(
this
.
tableData
.
length
)
{
successAlert
(
"查询成功"
);
successAlert
(
"查询成功"
);
...
...
src/views/user/userLog/index.vue
View file @
cbefbc50
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<div
class=
"leakage-top"
>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<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=
"isQuery = !isQuery"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"exportLog"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportLog"
>
导出
</el-button>
</div>
</div>
</div>
</div>
<div
v-if=
"isQuery"
>
<div
v-if=
"isQuery"
>
<search
@
search=
"getTableData"
/>
<search
@
search=
"getTableData"
ref=
"reset"
/>
</div>
</div>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
...
@@ -21,15 +21,15 @@
...
@@ -21,15 +21,15 @@
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
>
<el-table-column
prop=
"userName"
label=
"用户名"
align=
"center"
/>
<el-table-column
prop=
"userName"
label=
"用户名"
align=
"center"
/>
<el-table-column
prop=
"operateType
Valu
e"
label=
"操作类别"
align=
"center"
/>
<el-table-column
prop=
"operateType
Nam
e"
label=
"操作类别"
align=
"center"
/>
<el-table-column
prop=
"operateObj"
label=
"操作对象"
align=
"center"
/>
<el-table-column
prop=
"operateObj
Name
"
label=
"操作对象"
align=
"center"
/>
<el-table-column
prop=
"objectName"
label=
"对象名称"
align=
"center"
/>
<el-table-column
prop=
"objectName"
label=
"对象名称"
align=
"center"
/>
<el-table-column
<el-table-column
prop=
"operateContent"
prop=
"operateContent"
label=
"操作内容"
label=
"操作内容"
align=
"center"
align=
"center"
/>
/>
<el-table-column
prop=
"operateResult
Valu
e"
label=
"操作结果"
align=
"center"
/>
<el-table-column
prop=
"operateResult
Nam
e"
label=
"操作结果"
align=
"center"
/>
<el-table-column
prop=
"creationTime"
label=
"操作时间"
align=
"center"
/>
<el-table-column
prop=
"creationTime"
label=
"操作时间"
align=
"center"
/>
</el-table>
</el-table>
<Pagination
<Pagination
...
@@ -57,7 +57,8 @@ export default {
...
@@ -57,7 +57,8 @@ export default {
total
:
10
,
total
:
10
,
tableData
:
[],
tableData
:
[],
isQuery
:
false
,
isQuery
:
false
,
searchOption
:
{}
searchOption
:
{},
exids
:[]
};
};
},
},
components
:
{
components
:
{
...
@@ -68,6 +69,9 @@ export default {
...
@@ -68,6 +69,9 @@ export default {
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
this
.
getTableData
()
},
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
(
this
.
$refs
.
reset
.
reset
())
:
(
this
.
getTableData
())
},
},
getTableData
(
option
)
{
getTableData
(
option
)
{
this
.
searchOption
=
option
this
.
searchOption
=
option
...
@@ -79,17 +83,14 @@ export default {
...
@@ -79,17 +83,14 @@ export default {
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[]
this
.
tableData
=
list
this
.
tableData
=
list
this
.
total
=
res
.
total
this
.
total
=
res
.
total
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
})
})
},
},
tableRowClassName
({
row
,
rowIndex
})
{
tableRowClassName
({
row
,
rowIndex
})
{
return
rowIndex
%
2
===
0
?
''
:
'single-row'
return
rowIndex
%
2
===
0
?
''
:
'single-row'
},
},
exportLog
()
{
exportLog
()
{
let
params
=
{
exportLog
({
ids
:
this
.
exids
}).
then
(
res
=>
{
...
this
.
params
,
...
this
.
searchOption
}
exportLog
(
params
).
then
(
res
=>
{
download
(
res
,
'vnd.ms-excel'
,
`用户日志.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`用户日志.xls`
)
})
})
}
}
...
...
vue.config.js
View file @
cbefbc50
...
@@ -12,7 +12,7 @@ const port = process.env.port || process.env.npm_config_port || 8886 // dev port
...
@@ -12,7 +12,7 @@ const port = process.env.port || process.env.npm_config_port || 8886 // dev port
const
rewriteDefaultConfig
=
{
const
rewriteDefaultConfig
=
{
changeOrigin
:
true
,
changeOrigin
:
true
,
target
:
'http://8.142.143.40:8886'
,
target
:
'http://8.142.143.40:8886'
,
// target: 'http://192.168.0.1
11
:8886',
// target: 'http://192.168.0.1
23
:8886',
// ws: true,
// ws: true,
headers
:
{
headers
:
{
referer
:
'laddercloud.cn'
referer
:
'laddercloud.cn'
...
...
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