Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
b936d57d
Commit
b936d57d
authored
Aug 11, 2022
by
yanzhongrong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code specification
parent
d591d068
Hide whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
1575 additions
and
1437 deletions
+1575
-1437
App.vue
src/App.vue
+31
-25
orgTree.vue
src/components/orgTree.vue
+6
-3
permission.js
src/permission.js
+1
-8
index.js
src/router/index.js
+0
-28
request.js
src/utils/request.js
+1
-1
websocket.js
src/utils/websocket.js
+0
-1
api.js
src/views/alarm/api.js
+7
-8
index.vue
src/views/alarm/cableTime/index.vue
+107
-76
search.vue
src/views/alarm/device/components/search.vue
+8
-9
index.vue
src/views/alarm/device/index.vue
+20
-12
api.js
src/views/dashboard/api.js
+9
-9
index.vue
src/views/dashboard/components/index.vue
+6
-6
mixins.js
src/views/dashboard/components/mixins.js
+1
-0
trendAnalysis.vue
src/views/dashboard/components/trendAnalysis.vue
+150
-129
type1.vue
src/views/dashboard/components/type1.vue
+41
-33
type2.vue
src/views/dashboard/components/type2.vue
+32
-40
type3.vue
src/views/dashboard/components/type3.vue
+33
-23
type4.vue
src/views/dashboard/components/type4.vue
+48
-45
type5.vue
src/views/dashboard/components/type5.vue
+81
-64
type6.vue
src/views/dashboard/components/type6.vue
+78
-66
index.vue
src/views/dashboard/index.vue
+22
-29
search.vue
src/views/history/deviceLinkRepair/components/search.vue
+1
-3
index.vue
src/views/history/deviceLinkRepair/index.vue
+60
-44
search.vue
src/views/history/deviceLinkStatus/components/search.vue
+10
-13
index.vue
src/views/history/deviceLinkStatus/index.vue
+57
-43
search.vue
src/views/history/leakyCableRepair/components/search.vue
+8
-8
index.vue
src/views/history/leakyCableRepair/index.vue
+43
-34
picAnalysis.vue
...views/history/leakyCableStatus/components/picAnalysis.vue
+47
-36
search.vue
src/views/history/leakyCableStatus/components/search.vue
+8
-7
index.vue
src/views/history/leakyCableStatus/index.vue
+12
-9
index.vue
src/views/login/index.vue
+34
-45
api.js
src/views/maintain/api.js
+4
-4
index.vue
src/views/maintain/oneself/index.vue
+73
-20
index.vue
src/views/maintain/parameter/index.vue
+8
-8
search.vue
src/views/monitor/equipment/components/search.vue
+5
-7
index.vue
src/views/monitor/equipment/index.vue
+30
-30
search.vue
src/views/monitor/leakageCable/components/search.vue
+7
-7
index.vue
src/views/monitor/leakageCable/index.vue
+31
-30
FSU.vue
src/views/setting/add/comp/FSU.vue
+25
-25
leakyCable.vue
src/views/setting/add/comp/leakyCable.vue
+8
-12
line.vue
src/views/setting/add/comp/line.vue
+14
-15
monitorEquip.vue
src/views/setting/add/comp/monitorEquip.vue
+10
-34
railWay.vue
src/views/setting/add/comp/railWay.vue
+0
-4
station.vue
src/views/setting/add/comp/station.vue
+7
-7
index.vue
src/views/setting/add/index.vue
+0
-3
api.js
src/views/setting/api.js
+42
-42
fsuTable.vue
src/views/setting/statistics/comp/fsuTable.vue
+36
-36
leakyTable.vue
src/views/setting/statistics/comp/leakyTable.vue
+37
-39
lineTable.vue
src/views/setting/statistics/comp/lineTable.vue
+33
-34
monitorTable.vue
src/views/setting/statistics/comp/monitorTable.vue
+32
-34
railWayTable.vue
src/views/setting/statistics/comp/railWayTable.vue
+33
-32
stationTable.vue
src/views/setting/statistics/comp/stationTable.vue
+29
-24
detail.vue
src/views/setting/statistics/detail.vue
+4
-9
index.vue
src/views/setting/statistics/index.vue
+0
-5
api.js
src/views/user/api.js
+5
-5
baseInfo.vue
src/views/user/updateUser/components/baseInfo.vue
+2
-3
password.vue
src/views/user/updateUser/components/password.vue
+6
-7
index.vue
src/views/user/updateUser/index.vue
+24
-19
editInfo.vue
src/views/user/userList/components/editInfo.vue
+11
-12
editPwd.vue
src/views/user/userList/components/editPwd.vue
+11
-14
index.vue
src/views/user/userList/index.vue
+21
-21
search.vue
src/views/user/userLog/components/search.vue
+52
-25
index.vue
src/views/user/userLog/index.vue
+13
-13
No files found.
src/App.vue
View file @
b936d57d
<
template
>
<div
id=
"app"
>
<router-view
/>
<audio
ref=
"audio"
src=
"./assets/audio/urgent.wav"
muted=
"true"
loop=
"false"
/>
<audio
ref=
"audio"
src=
"./assets/audio/urgent.wav"
muted=
"true"
loop=
"false"
/>
<transition
name=
"tipalerm"
>
<div
v-if=
"tflag"
class=
"tips"
>
<p>
提示
</p>
<span>
系统新增
{{
msg
.
count
}}
条
<span
>
系统新增
{{
msg
.
count
}}
条
<span
v-text=
"msg.type == 1 ? '设备连接' : '漏缆监测'"
/>
<span
id=
"alevel"
:style=
"alevel"
>
{{
msg
.
level
}}
</span>
告警消息,请及时查看!
<span
id=
"alevel"
:style=
"alevel"
>
{{
msg
.
level
}}
</span
>
告警消息,请及时查看!
</span>
</div>
</transition>
...
...
@@ -48,7 +55,7 @@ export default {
watch
:
{
$route
(
to
,
from
)
{
if
(
to
.
path
===
'/login'
)
{
setTimeout
(
this
.
closeWebsocket
(),
300
)
setTimeout
(
this
.
closeWebsocket
(),
300
)
;
}
},
usertoken
:
{
...
...
@@ -56,9 +63,9 @@ export default {
handler
(
newV
)
{
if
(
newV
)
{
if
(
newV
!==
''
)
{
this
.
websocket
=
socket
({
onmessage
:
this
.
receiveMessage
})
this
.
websocket
=
socket
({
onmessage
:
this
.
receiveMessage
})
;
}
else
{
this
.
closeWebsocket
()
this
.
closeWebsocket
()
;
}
}
}
...
...
@@ -67,11 +74,11 @@ export default {
handler
(
newV
)
{
if
(
newV
.
length
||
this
.
deviceList
.
length
)
{
setTimeout
(()
=>
{
this
.
$refs
.
audio
.
play
()
this
.
$refs
.
audio
.
loop
=
true
this
.
$refs
.
audio
.
play
()
;
this
.
$refs
.
audio
.
loop
=
true
;
},
500
)
}
else
{
this
.
$refs
.
audio
.
loop
=
false
this
.
$refs
.
audio
.
loop
=
false
;
}
}
}
...
...
@@ -80,35 +87,35 @@ export default {
document
.
body
.
addEventListener
(
'mousedown'
,
()
=>
{
this
.
$refs
.
audio
.
muted
=
false
document
.
body
.
removeEventListener
(
'mousedown'
,
()
=>
{
})
this
.
$refs
.
audio
.
muted
=
false
;
document
.
body
.
removeEventListener
(
'mousedown'
,
()
=>
{
});
},
false
)
EventBus
.
$on
(
'dialogAlarm'
,
(
data
)
=>
{
// 接收消息之后 声音弹窗显示
this
.
msg
=
data
this
.
levelcolor
()
this
.
tflag
=
true
this
.
msg
=
data
;
this
.
levelcolor
()
;
this
.
tflag
=
true
;
setTimeout
(()
=>
{
this
.
tflag
=
false
this
.
tflag
=
false
;
},
3000
)
})
EventBus
.
$on
(
'autioPlay'
,
(
data
)
=>
{
this
.
audioUrl
=
'./assets/audio/'
+
this
.
audioObj
[
data
.
level
]
this
.
audioUrl
=
'./assets/audio/'
+
this
.
audioObj
[
data
.
level
]
;
setTimeout
(()
=>
{
this
.
$refs
.
audio
.
play
()
this
.
$refs
.
audio
.
play
()
;
},
500
)
if
(
this
.
cableList
.
length
||
this
.
deviceList
.
length
)
{
this
.
$refs
.
audio
.
loop
=
true
this
.
$refs
.
audio
.
loop
=
true
;
}
})
EventBus
.
$on
(
'cancelWS'
,
()
=>
{
this
.
closeWebsocket
()
this
.
closeWebsocket
()
;
})
},
destroyed
()
{
document
.
body
.
removeEventListener
(
'mousedown'
,
()
=>
{
})
document
.
body
.
removeEventListener
(
'mousedown'
,
()
=>
{
});
},
methods
:
{
receiveMessage
,
...
...
@@ -119,20 +126,19 @@ export default {
},
levelcolor
()
{
if
(
this
.
msg
.
level
===
'正常'
||
this
.
msg
.
level
===
'连接正常'
)
{
this
.
alevel
.
color
=
'green'
this
.
alevel
.
color
=
'green'
;
}
else
if
(
this
.
msg
.
level
===
'紧急'
||
this
.
msg
.
level
===
'连接异常'
)
{
this
.
alevel
.
color
=
'#f00'
this
.
alevel
.
color
=
'#f00'
;
}
else
if
(
this
.
msg
.
level
===
'重要'
)
{
this
.
alevel
.
color
=
'#f89850'
this
.
alevel
.
color
=
'#f89850'
;
}
else
if
(
this
.
msg
.
level
===
'一般'
)
{
this
.
alevel
.
color
=
'#ead906'
this
.
alevel
.
color
=
'#ead906'
;
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
#app
{}
.tipalerm-enter-active
{
transition
:
0
.5s
;
}
...
...
src/components/orgTree.vue
View file @
b936d57d
...
...
@@ -52,7 +52,6 @@
:expand-on-click-node=
"false"
@
node-click=
"handleClick"
>
<!-- :current-node-key='id' -->
</el-tree>
</el-scrollbar>
</div>
...
...
@@ -95,6 +94,7 @@ export default {
this
.
getInit
();
},
methods
:
{
// 展开
toOpen
()
{
this
.
isOpen
=
!
this
.
isOpen
;
this
.
openOrNot
=
false
;
...
...
@@ -102,6 +102,7 @@ export default {
this
.
openOrNot
=
true
;
},
10
);
},
// 点击节点
handleClick
(
data
,
node
)
{
this
.
treeClickCount
++
;
if
(
this
.
treeClickCount
>=
2
)
{
...
...
@@ -119,6 +120,7 @@ export default {
},
300
)
},
// 初始化数据
getInit
()
{
this
.
loading
=
true
;
getTree
().
then
((
res
)
=>
{
...
...
@@ -130,6 +132,7 @@ export default {
}
});
},
// 动态渲染树
renderContent
(
h
,
{
node
,
data
,
store
})
{
return
(
<
div
>
...
...
@@ -143,9 +146,9 @@ export default {
<
/span
>
<
/div
>
);
}
,
}
},
}
;
}
</
script
>
<
style
lang=
"scss"
>
...
...
src/permission.js
View file @
b936d57d
...
...
@@ -8,16 +8,13 @@ import getPageTitle from '@/utils/get-page-title'
NProgress
.
configure
({
showSpinner
:
false
})
// NProgress Configuration
const
whiteList
=
[
'/login'
]
// no redirect whitelist
const
whiteList
=
[
'/login'
]
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
// start progress bar
NProgress
.
start
()
// set page title
document
.
title
=
getPageTitle
(
to
.
meta
.
title
)
// determine whether the user has logged in
const
hasToken
=
getToken
()
if
(
hasToken
)
{
...
...
@@ -25,21 +22,17 @@ router.beforeEach(async(to, from, next) => {
next
({
path
:
'/'
})
NProgress
.
done
()
}
else
{
// const hasGetUserInfo = store.getters.userName
const
hasRoles
=
store
.
state
.
user
&&
store
.
state
.
user
.
roles
.
length
>
0
if
(
hasRoles
)
{
next
()
}
else
{
try
{
// get user info
const
{
isAdmin
}
=
await
store
.
dispatch
(
'user/getInfo'
)
const
roles
=
isAdmin
==
1
?
[
'admin'
]
:
[
'editor'
]
const
accessRoutes
=
await
store
.
dispatch
(
'permission/generateRoutes'
,
roles
)
router
.
addRoutes
(
accessRoutes
)
next
({
...
to
,
replace
:
true
})
}
catch
(
error
)
{
// remove token and go to login page to re-login
await
store
.
dispatch
(
'user/resetToken'
)
Message
.
error
(
error
||
'Has Error'
)
next
(
`/login?redirect=
${
to
.
path
}
`
)
...
...
src/router/index.js
View file @
b936d57d
...
...
@@ -3,28 +3,8 @@ import Router from 'vue-router'
Vue
.
use
(
Router
)
/* Layout */
import
Layout
from
'@/layout'
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
*
* hidden: true if set true, item will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu
* if not set alwaysShow, when item has more than one children route,
* it will becomes nested mode, otherwise not show the root menu
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
roles: ['admin','editor'] control the page roles (you can set multiple roles)
title: 'title' the name show in sidebar and breadcrumb (recommend set)
icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
}
*/
/**
* constantRoutes
* a base page that does not have permission requirements
...
...
@@ -38,13 +18,6 @@ export const constantRoutes = [
hidden
:
true
},
// {
// path: '/404',
// component: () => import('@/views/404'),
// meta:{title:"404"},
// hidden: true
// },
{
path
:
'/'
,
component
:
Layout
,
...
...
@@ -249,7 +222,6 @@ const createRouter = () => new Router({
const
router
=
createRouter
()
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export
function
resetRouter
()
{
const
newRouter
=
createRouter
()
router
.
matcher
=
newRouter
.
matcher
// reset router
...
...
src/utils/request.js
View file @
b936d57d
...
...
@@ -84,7 +84,7 @@ service.interceptors.response.use(
return
res
},
error
=>
{
console
.
log
(
'err'
+
error
)
// for debug
//
console.log('err' + error) // for debug
if
(
error
.
response
)
{
endLoading
(
error
.
response
.
config
.
el
)
if
(
!
error
.
response
.
config
.
silence
)
{
...
...
src/utils/websocket.js
View file @
b936d57d
...
...
@@ -25,7 +25,6 @@ export default function socket(handlerOptions) {
//连接成功建立的回调方法
websocket
.
onopen
=
function
()
{
console
.
info
(
"Websocket连接成功"
)
console
.
log
(
websocket
.
readyState
);
heart
.
start
()
onopen
&&
onopen
()
}
...
...
src/views/alarm/api.js
View file @
b936d57d
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
;
const
path
=
{
cableTimeList
:
'sysMonitorAlarm/selectPage'
,
...
...
@@ -11,22 +11,21 @@ const path = {
}
export
function
cableTimeList
()
{
return
request
.
post
(
path
.
cableTimeList
,
...
arguments
)
return
request
.
post
(
path
.
cableTimeList
,
...
arguments
)
;
}
export
function
cableCancel
()
{
return
request
.
post
(
path
.
cableCancel
,
...
arguments
)
return
request
.
post
(
path
.
cableCancel
,
...
arguments
)
;
}
export
function
cableConfirm
()
{
return
request
.
post
(
path
.
cableConfirm
,
...
arguments
)
return
request
.
post
(
path
.
cableConfirm
,
...
arguments
)
;
}
export
function
deviceList
()
{
return
request
.
post
(
path
.
deviceList
,
...
arguments
)
return
request
.
post
(
path
.
deviceList
,
...
arguments
)
;
}
export
function
deviceConfirm
()
{
return
request
.
post
(
path
.
deviceConfirm
,
...
arguments
)
return
request
.
post
(
path
.
deviceConfirm
,
...
arguments
)
;
}
export
function
deviceCancel
()
{
return
request
.
post
(
path
.
deviceCancel
,
...
arguments
)
return
request
.
post
(
path
.
deviceCancel
,
...
arguments
)
;
}
src/views/alarm/cableTime/index.vue
View file @
b936d57d
...
...
@@ -7,7 +7,8 @@
:key=
"item.key"
:type=
"confirmStatus === item.key ? 'primary' : ''"
@
click=
"changeType(item)"
>
{{
item
.
label
}}
</el-button>
>
{{
item
.
label
}}
</el-button
>
</el-button-group>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
/>
...
...
@@ -45,14 +46,15 @@
width=
"150"
align=
"center"
/>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
<el-table-column
prop=
"alarmInfo"
label=
"告警信息"
align=
"center"
>
<template
slot-scope=
"scope"
>
<div
v-for=
"(item, index) in scope.row.alarmInfo"
:key=
"index"
:class=
"levelStyle[item.level]"
>
<span>
距离:
{{
item
.
distance
}}
</span>
<div
v-for=
"(item, index) in scope.row.alarmInfo"
:key=
"index"
:class=
"levelStyle[item.level]"
>
<span>
距离:
{{
item
.
distance
}}
</span
>
<span>
驻波比:
{{
item
.
value
}}
</span>
</div>
<div>
漏缆百米损耗:
{{
scope
.
row
.
lossValue
}}
</div>
...
...
@@ -70,22 +72,35 @@
align=
"center"
width=
"200"
/>
<el-table-column
prop=
"confirmPerson"
label=
"确认人"
width=
"100"
align=
"center"
/>
<el-table-column
prop=
"confirmTime"
label=
"确认时间"
width=
"180"
align=
"center"
/>
<el-table-column
prop=
"confirmPerson"
label=
"确认人"
width=
"100"
align=
"center"
/>
<el-table-column
prop=
"confirmTime"
label=
"确认时间"
width=
"180"
align=
"center"
/>
<el-table-column
label=
"操作"
align=
"center"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-button
v-if=
"
scope.row.confirmStatus === 1 && scope.row.alarmLevelName == '正常'
scope.row.confirmStatus === 1 &&
scope.row.alarmLevelName == '正常'
"
type=
"text"
@
click=
"cancel2(scope.row)"
>
取消
</el-button>
@
click=
"cancelAlarm(scope.row)"
>
取消
</el-button
>
<el-button
v-else-if=
"scope.row.confirmStatus === 0"
type=
"text"
@
click=
"confirm2(scope.row)"
>
确认
</el-button>
@
click=
"confirmAlarm(scope.row)"
>
确认
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -94,7 +109,7 @@
:visible
.
sync=
"centerDialogVisible"
width=
"30%"
center
>
>
<el-row
class=
"flex row_obj"
>
<div
class=
"text_header"
>
基站名称:
</div>
<div>
{{ dialogInfo.siteName }}
</div>
...
...
@@ -110,9 +125,14 @@
<el-row
class=
"flex row_obj"
>
<div
class=
"text_header"
>
告警信息:
</div>
<div>
<div
v-for=
"(item, index) in dialogInfo.alarmInfo"
style=
"font-weight:700;display: block;"
:key=
"index"
>
<span>
距离:{{ item.distance }}
</span>
<span>
驻波比:{{ item.value }}
</span>
<div
v-for=
"(item, index) in dialogInfo.alarmInfo"
style=
"font-weight: 700; display: block"
:key=
"index"
>
<span>
距离:{{ item.distance }}
</span
>
<span>
驻波比:{{ item.value }}
</span
>
</div>
<div>
漏缆百米损耗: {{ dialogInfo.lossValue }}
</div>
</div>
...
...
@@ -128,16 +148,19 @@
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
v-if=
"
dialogInfo.confirmStatus === 1 && dialogInfo.alarmLevelName === '正常'
dialogInfo.confirmStatus === 1 &&
dialogInfo.alarmLevelName === '正常'
"
type=
"primary"
@
click=
"cancel(dialogInfo)"
>
取消告警
</el-button>
>
取消告警
</el-button
>
<el-button
v-else-if=
"dialogInfo.confirmStatus !== 1"
type=
"primary"
@
click=
"confirm(dialogInfo)"
>
确认告警
</el-button>
>
确认告警
</el-button
>
</span>
</el-dialog>
<Pagination
...
...
@@ -151,12 +174,13 @@
</template>
<
script
>
import
{
cableTimeList
,
cableConfirm
,
cableCancel
}
from
'../api'
import
{
exportLeakyCable
}
from
'@/api/export'
import
search
from
'@/views/monitor/leakageCable/components/search.vue'
import
download
from
'@/utils/download'
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
import
{
levelStyle
}
from
'@/const/index'
import
{
cableTimeList
,
cableConfirm
,
cableCancel
}
from
'../api'
;
import
{
exportLeakyCable
}
from
'@/api/export'
;
import
search
from
'@/views/monitor/leakageCable/components/search.vue'
;
import
download
from
'@/utils/download'
;
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
;
import
{
levelStyle
}
from
'@/const/index'
;
export
default
{
components
:
{
search
},
data
()
{
...
...
@@ -187,43 +211,45 @@ export default {
levelStyle
}
},
mounted
()
{
this
.
getTableData
()
},
created
()
{
this
.
searchOption
=
this
.
$route
.
query
this
.
getTableData
();
this
.
searchOption
=
this
.
$route
.
query
;
},
methods
:
{
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
alarmLevelName
===
'紧急'
&&
column
.
property
===
'alarmLevelName'
)
{
return
'emergency'
return
'emergency'
;
}
else
if
(
row
.
alarmLevelName
===
'重要'
&&
column
.
property
===
'alarmLevelName'
)
{
return
'important'
return
'important'
;
}
else
if
(
row
.
alarmLevelName
===
'一般'
&&
column
.
property
===
'alarmLevelName'
)
{
return
'common'
return
'common'
;
}
else
if
(
row
.
alarmLevelName
===
'正常'
&&
column
.
property
===
'alarmLevelName'
)
{
return
'normal'
return
'normal'
;
}
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
'stripe'
;
}
},
// 刷新
refresh
()
{
this
.
$refs
.
reset
!==
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
()
:
this
.
getTableData
()
;
},
// 分页更改
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
current
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
;
},
// 查询
search
(
option
)
{
this
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
// 获取数据
getTableData
()
{
let
param
=
{
confirmStatus
:
this
.
confirmStatus
,
...
...
@@ -231,64 +257,69 @@ export default {
...
this
.
searchOption
}
cableTimeList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[]
;
list
.
forEach
(
item
=>
{
if
(
item
.
alarmInfo
!==
''
&&
item
.
alarmInfo
!=
null
)
{
item
.
alarmInfo
=
JSON
.
parse
(
item
.
alarmInfo
)
item
.
lossValue
=
eval
(
item
.
alarmInfo
.
map
(
k
=>
k
.
lossValue
).
join
(
'+'
))
item
.
alarmInfo
=
JSON
.
parse
(
item
.
alarmInfo
)
;
item
.
lossValue
=
eval
(
item
.
alarmInfo
.
map
(
k
=>
k
.
lossValue
).
join
(
'+'
))
;
}
})
this
.
tableData
=
list
this
.
total
=
res
.
total
this
.
exids
=
list
.
map
(
i
=>
i
.
id
)
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
(
i
=>
i
.
id
)
;
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
!=
0
)
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
}
else
{
warningAlert
(
'查询结果为空'
)
warningAlert
(
'查询结果为空'
)
;
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
})
},
// 编辑确认告警
confirm
(
dialogInfo
)
{
let
id
=
dialogInfo
.
id
let
id
=
dialogInfo
.
id
;
cableConfirm
({
id
:
id
}).
then
((
res
)
=>
{
this
.
getTableData
()
this
.
$store
.
dispatch
(
'alarm/getCableTime'
)
this
.
getTableData
()
;
this
.
$store
.
dispatch
(
'alarm/getCableTime'
)
;
})
this
.
centerDialogVisible
=
false
this
.
centerDialogVisible
=
false
;
},
confirm2
(
row
)
{
this
.
centerDialogVisible
=
true
this
.
dialogInfo
=
row
// 表格确认告警
confirmAlarm
(
row
)
{
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
},
// 编辑取消告警
cancel
(
dialogInfo
)
{
let
query
=
{
alarmLevelName
:
dialogInfo
.
alarmLevelName
,
id
:
dialogInfo
.
id
}
cableCancel
(
query
).
then
((
res
)
=>
{
this
.
getTableData
()
this
.
getTableData
()
;
})
this
.
centerDialogVisible
=
false
this
.
centerDialogVisible
=
false
;
},
cancel2
(
row
)
{
this
.
centerDialogVisible
=
true
this
.
dialogInfo
=
row
// 表格取消告警
cancelAlarm
(
row
)
{
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
},
// 切换是否确认告警
changeType
(
item
)
{
this
.
confirmStatus
=
item
.
key
this
.
getTableData
()
this
.
confirmStatus
=
item
.
key
;
this
.
getTableData
()
;
},
// 导出
exportList
()
{
if
(
this
.
exids
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无数据'
)
return
false
this
.
$message
.
warning
(
'暂无数据'
)
;
return
false
;
}
else
{
exportLeakyCable
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`漏缆监测告警.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`漏缆监测告警.xls`
)
;
})
}
}
...
...
@@ -308,7 +339,7 @@ export default {
.text_header
{
width
:
200px
;
font-weight
:
700
;
color
:
#666666
color
:
#666666
;
}
}
.leakage-cable
{
...
...
@@ -337,16 +368,16 @@ export default {
background-color
:
#eaf1fe
;
}
&
:
:
v-deep
.
emergency
{
background-color
:
#f00
!
important
;
background-color
:
#f00
!
important
;
}
&
:
:
v-deep
.
important
{
background-color
:
#f89850
!
important
;
background-color
:
#f89850
!
important
;
}
&
:
:
v-deep
.
common
{
background-color
:
#ead906
!
important
;
background-color
:
#ead906
!
important
;
}
&
:
:
v-deep
.
normal
{
background-color
:
green
!
important
;
background-color
:
green
!
important
;
}
.page
{
display
:
flex
;
...
...
src/views/alarm/device/components/search.vue
View file @
b936d57d
...
...
@@ -23,7 +23,8 @@
</
template
>
<
script
>
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
{
ConnectStatusEnum
}
from
'@/const/index'
;
export
default
{
name
:
'Search'
,
data
()
{
...
...
@@ -33,18 +34,16 @@ export default {
dateRange
:
[]
}
},
mounted
()
{
},
methods
:
{
toSearch
()
{
this
.
form
.
startUploadTime
=
this
.
dateRange
[
0
]
this
.
form
.
endUploadTime
=
this
.
dateRange
[
1
]
this
.
$emit
(
'search'
,
this
.
form
)
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'
)
this
.
dateRange
=
[]
;
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
}
}
}
...
...
src/views/alarm/device/index.vue
View file @
b936d57d
...
...
@@ -53,13 +53,13 @@
scope.row.confirmStatus === 1 &&
scope.row.connectStatusName == '连接正常'
"
@
click=
"cancel
2
(scope.row)"
@
click=
"cancel
Alarm
(scope.row)"
>
取消
</el-button
>
<el-button
type=
"text"
v-else-if=
"scope.row.confirmStatus === 0"
@
click=
"confirm
2
(scope.row)"
@
click=
"confirm
Alarm
(scope.row)"
>
确认
</el-button
>
</
template
>
...
...
@@ -121,6 +121,7 @@ import { exportConnet } from "@/api/export";
import
search
from
"./components/search.vue"
;
import
download
from
"@/utils/download"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
name
:
'device'
,
components
:
{
search
},
...
...
@@ -152,10 +153,8 @@ export default {
exids
:
[]
}
},
mounted
()
{
this
.
getTableData
()
},
created
()
{
this
.
getTableData
()
this
.
searchOption
=
this
.
$route
.
query
},
methods
:
{
...
...
@@ -177,26 +176,30 @@ export default {
return
"stripe"
;
}
},
// 刷新
refresh
()
{
this
.
$refs
.
reset
!=
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
();
},
// 分页更改
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
// 查询
search
(
option
)
{
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
();
},
// 获取数据
getTableData
()
{
let
param
=
{
confirmStatus
:
this
.
confirmStatus
,
...
this
.
params
,
...
this
.
searchOption
,
...
this
.
searchOption
};
deviceList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
...
...
@@ -213,38 +216,43 @@ export default {
}
});
},
confirm2
(
row
)
{
// 表格确认告警
confirmAlarm
(
row
)
{
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
},
// 编辑确认告警
confirm
(
dialogInfo
)
{
let
id
=
dialogInfo
.
id
;
deviceConfirm
({
id
:
id
}).
then
((
res
)
=>
{
this
.
getTableData
();
this
.
$store
.
dispatch
(
'alarm/getDevice'
)
this
.
$store
.
dispatch
(
'alarm/getDevice'
)
;
});
this
.
centerDialogVisible
=
false
;
},
cancel2
(
row
)
{
// 表格取消告警
cancelAlarm
(
row
)
{
this
.
centerDialogVisible
=
true
;
this
.
dialogInfo
=
row
;
},
// 编辑取消告警
cancel
(
dialogInfo
)
{
let
query
=
{
connectStatusName
:
dialogInfo
.
connectStatusName
,
id
:
dialogInfo
.
id
,
id
:
dialogInfo
.
id
};
deviceCancel
(
query
).
then
((
res
)
=>
{
this
.
getTableData
();
});
this
.
centerDialogVisible
=
false
;
},
// 切换是否确认告警
changeType
(
item
)
{
this
.
confirmStatus
=
item
.
key
;
this
.
params
.
current
=
1
this
.
params
.
current
=
1
;
this
.
getTableData
();
},
// 导出
exportList
()
{
if
(
this
.
exids
.
length
==
0
)
{
this
.
$message
.
warning
(
"暂无数据"
);
...
...
src/views/dashboard/api.js
View file @
b936d57d
...
...
@@ -14,30 +14,30 @@ const path = {
}
export
function
treeBaseInfo
()
{
return
request
.
post
(
path
.
treeBaseInfo
,
...
arguments
)
return
request
.
post
(
path
.
treeBaseInfo
,
...
arguments
)
;
}
export
function
railWayOpen
()
{
return
request
.
post
(
path
.
railWayOpen
,
...
arguments
)
return
request
.
post
(
path
.
railWayOpen
,
...
arguments
)
;
}
export
function
siteOpen
()
{
return
request
.
post
(
path
.
siteOpen
,
...
arguments
)
return
request
.
post
(
path
.
siteOpen
,
...
arguments
)
;
}
export
function
fsuOpen
()
{
return
request
.
post
(
path
.
fsuOpen
,
...
arguments
)
return
request
.
post
(
path
.
fsuOpen
,
...
arguments
)
;
}
export
function
monitorEquipOpen
()
{
return
request
.
post
(
path
.
monitorEquipOpen
,
...
arguments
)
return
request
.
post
(
path
.
monitorEquipOpen
,
...
arguments
)
;
}
export
function
leakyCableOpen
()
{
return
request
.
post
(
path
.
leakyCableOpen
,
...
arguments
)
return
request
.
post
(
path
.
leakyCableOpen
,
...
arguments
)
;
}
export
function
updateFeeder
()
{
return
request
.
post
(
path
.
updateFeeder
,
...
arguments
)
return
request
.
post
(
path
.
updateFeeder
,
...
arguments
)
;
}
export
function
getYear
()
{
return
request
.
post
(
path
.
getYear
,
...
arguments
)
return
request
.
post
(
path
.
getYear
,
...
arguments
)
;
}
export
function
getMonth
()
{
return
request
.
post
(
path
.
getMonth
,
...
arguments
)
return
request
.
post
(
path
.
getMonth
,
...
arguments
)
;
}
src/views/dashboard/components/index.vue
View file @
b936d57d
...
...
@@ -25,19 +25,19 @@ export default {
props
:
{
type
:
{
type
:
[
Number
,
String
],
defualt
:
null
,
defualt
:
null
},
curInfo
:
{
type
:
Object
,
default
:
()
=>
{}
,
default
:
()
=>
{}
},
curId
:
{
type
:
[
Number
,
String
],
defualt
:
null
,
defualt
:
null
},
selectId
:
{
type
:
[
Number
,
String
],
defualt
:
null
,
defualt
:
null
}
},
computed
:
{
...
...
@@ -59,7 +59,7 @@ export default {
},
cancel
()
{
this
.
$emit
(
"cancel"
);
}
,
}
,
}
}
};
</
script
>
\ No newline at end of file
src/views/dashboard/components/mixins.js
View file @
b936d57d
// 公共文件
import
{
formInit
}
from
'../const'
export
const
DetailMixins
=
{
...
...
src/views/dashboard/components/trendAnalysis.vue
View file @
b936d57d
<
template
>
<!-- 趋势分析 -->
<el-dialog
:title=
"finalyText"
:visible
.
sync=
"visible"
...
...
@@ -12,14 +12,32 @@
<el-radio-button
:label=
"2"
>
月
</el-radio-button>
</el-radio-group>
<div
v-if=
"date == 1"
class=
"date_show"
>
<el-button
icon=
"el-icon-arrow-left"
size=
"mini"
@
click=
"lastYear()"
></el-button>
{{
year
}}
年
<el-button
icon=
"el-icon-arrow-right"
:disabled=
"isDisableYear"
size=
"mini"
@
click=
"nextYear()"
></el-button>
<el-button
icon=
"el-icon-arrow-left"
size=
"mini"
@
click=
"lastYear()"
></el-button>
{{
year
}}
年
<el-button
icon=
"el-icon-arrow-right"
:disabled=
"isDisableYear"
size=
"mini"
@
click=
"nextYear()"
></el-button>
</div>
<div
v-else
class=
"date_show"
>
<el-button
icon=
"el-icon-arrow-left"
size=
"mini"
@
click=
"lastMonth()"
></el-button>
{{
year
}}
年
{{
month
}}
月
<el-button
icon=
"el-icon-arrow-right"
:disabled=
"isDisableMonth"
size=
"mini"
@
click=
"getNextMonth()"
></el-button>
<el-button
icon=
"el-icon-arrow-left"
size=
"mini"
@
click=
"lastMonth()"
></el-button>
{{
year
}}
年
{{
month
}}
月
<el-button
icon=
"el-icon-arrow-right"
:disabled=
"isDisableMonth"
size=
"mini"
@
click=
"getNextMonth()"
></el-button>
</div>
<div
ref=
"chartLine"
:key=
"componentKeys"
class=
"chartLine"
></div>
</div>
...
...
@@ -49,7 +67,7 @@ export default {
},
curInfo
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
},
data
()
{
...
...
@@ -62,201 +80,205 @@ export default {
month
:
now
.
getMonth
()
+
1
,
preMonth
:
now
.
getMonth
(),
nextMonth
:
now
.
getMonth
()
+
1
+
1
,
componentKeys
:
0
,
componentKeys
:
0
}
},
computed
:{
computed
:
{
finalyText
()
{
if
(
this
.
$route
.
query
.
name
)
{
return
'趋势分析图形('
+
this
.
$route
.
query
.
name
+
')'
}
else
if
(
this
.
type
==
0
)
{
return
'趋势分析图形('
+
this
.
curInfo
.
baseInfo
.
leakyCableDescribe
+
')'
if
(
this
.
$route
.
query
.
name
)
{
return
'趋势分析图形('
+
this
.
$route
.
query
.
name
+
')'
;
}
else
if
(
this
.
type
==
0
)
{
return
'趋势分析图形('
+
this
.
curInfo
.
baseInfo
.
leakyCableDescribe
+
')'
;
}
else
{
return
'趋势分析图形('
+
this
.
curInfo
.
baseInfo
.
feederDescribe
+
')'
return
'趋势分析图形('
+
this
.
curInfo
.
baseInfo
.
feederDescribe
+
')'
;
}
},
isDisableYear
()
{
return
this
.
year
>=
new
Date
().
getFullYear
()
return
this
.
year
>=
new
Date
().
getFullYear
()
;
},
isDisableMonth
()
{
return
this
.
month
>=
new
Date
().
getMonth
()
+
1
return
this
.
month
>=
new
Date
().
getMonth
()
+
1
;
}
},
watch
:
{
flag
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
visible
=
!!
newV
this
.
visible
=
!!
newV
;
}
},
date
(
newV
)
{
this
.
year
=
new
Date
().
getFullYear
()
,
this
.
month
=
new
Date
().
getMonth
()
+
1
,
this
.
init
(
newV
)
this
.
year
=
new
Date
().
getFullYear
()
;
this
.
month
=
new
Date
().
getMonth
()
+
1
;
this
.
init
(
newV
)
;
},
visible
(
newV
)
{
if
(
newV
)
{
this
.
componentKeys
++
if
(
newV
)
{
this
.
componentKeys
++
;
this
.
$nextTick
(()
=>
{
this
.
init
(
1
)
this
.
init
(
1
)
;
})
}
}
},
mounted
()
{
this
.
setNewDate
()
this
.
setNewDate
()
;
},
methods
:
{
// 获取时间
setNewDate
(){
//设置日期的方法
setNewDate
()
{
//设置日期的方法
let
now
=
new
Date
();
if
(
this
.
month
==
1
)
{
//当前月为1月时,上一个月显示为12月
if
(
this
.
month
==
1
)
{
//当前月为1月时,上一个月显示为12月
this
.
preMonth
=
12
;
}
if
(
this
.
month
==
12
)
{
//当前月为12月时,下一个月显示为1月
}
if
(
this
.
month
==
12
)
{
//当前月为12月时,下一个月显示为1月
this
.
nextMonth
=
1
;
}
now
.
setFullYear
(
this
.
year
,
this
.
month
,
0
);
now
.
setFullYear
(
this
.
year
,
this
.
month
-
1
,
0
);
},
}
now
.
setFullYear
(
this
.
year
,
this
.
month
,
0
);
now
.
setFullYear
(
this
.
year
,
this
.
month
-
1
,
0
);
},
// 上个月
lastMonth
()
{
this
.
month
=
this
.
preMonth
;
this
.
preMonth
=
this
.
month
-
1
;
this
.
nextMonth
=
this
.
month
+
1
;
if
(
this
.
month
==
12
)
{
//边界值判断
if
(
this
.
month
==
12
)
{
//边界值判断
this
.
year
--
;
}
this
.
setNewDate
()
this
.
init
(
2
)
this
.
setNewDate
()
;
this
.
init
(
2
)
;
},
// 下个月
getNextMonth
()
{
this
.
month
=
this
.
nextMonth
;
this
.
preMonth
=
this
.
month
-
1
;
this
.
nextMonth
=
this
.
month
+
1
;
if
(
this
.
month
==
1
)
{
//边界值判断
if
(
this
.
month
==
1
)
{
//边界值判断
this
.
year
++
;
}
this
.
setNewDate
()
this
.
init
(
2
)
this
.
setNewDate
()
;
this
.
init
(
2
)
;
},
// 上一年
lastYear
()
{
this
.
year
--
this
.
init
(
1
)
this
.
year
--
;
this
.
init
(
1
)
;
},
// 下一年
nextYear
()
{
this
.
year
++
this
.
init
(
1
)
this
.
year
++
;
this
.
init
(
1
)
;
},
// 初始化数据
init
(
type
)
{
let
params
=
{
type
:
this
.
type
,
applyId
:
this
.
$route
.
query
.
id
?
this
.
$route
.
query
.
id
:
this
.
selectId
,
creationTime
:
this
.
date
==
1
?
this
.
year
+
'-00-00 00:00:00'
:
this
.
year
+
'-'
+
this
.
month
creationTime
:
this
.
date
==
1
?
this
.
year
+
'-00-00 00:00:00'
:
this
.
year
+
'-'
+
this
.
month
}
if
(
type
==
1
)
{
if
(
type
==
1
)
{
getYear
(
params
).
then
(
res
=>
{
let
list
=
res
||
[]
this
.
getLine
(
list
)
let
list
=
res
||
[]
;
this
.
getLine
(
list
)
;
})
}
else
{
params
.
creationTime
=
this
.
year
+
'-'
+
(
this
.
month
<
10
?
'0'
+
(
this
.
month
)
:
this
.
month
)
params
.
creationTime
=
this
.
year
+
'-'
+
(
this
.
month
<
10
?
'0'
+
(
this
.
month
)
:
this
.
month
);
getMonth
(
params
).
then
(
res
=>
{
let
list
=
res
||
[]
this
.
getLine
(
list
)
let
list
=
res
||
[]
;
this
.
getLine
(
list
)
;
})
}
window
.
addEventListener
(
"resize"
,
()
=>
{
this
.
myChartLine
.
resize
()
this
.
myChartLine
.
resize
()
;
})
},
// 初始化图
getLine
(
data
)
{
this
.
myChartLine
=
echarts
.
init
(
this
.
$refs
.
chartLine
)
// 图例
let
X
=
Object
.
keys
(
data
)
let
dataList
=
Object
.
values
(
data
)
let
list
=
[]
let
dataObj
=
{
dataArr0
:
[],
dataArr1
:
[],
dataArr2
:
[],
// 图例
let
X
=
Object
.
keys
(
data
)
let
dataList
=
Object
.
values
(
data
)
let
list
=
[]
let
dataObj
=
{
dataArr0
:
[],
dataArr1
:
[],
dataArr2
:
[],
}
dataList
.
map
(
item
=>
{
dataObj
.
dataArr0
.
push
(
item
[
0
].
value
)
dataObj
.
dataArr1
.
push
(
item
[
1
].
value
)
dataObj
.
dataArr2
.
push
(
item
[
2
].
value
)
})
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
let
obj
=
{}
obj
=
{
name
:
`驻波比
${
i
+
1
}
`
,
type
:
'line'
,
data
:
dataObj
[
`dataArr
${
i
}
`
],
smooth
:
true
,
emphasis
:
{
focus
:
'series'
,
},
}
// let dataArr0 = []
// let dataArr1 = []
// let dataArr2 = []
dataList
.
map
(
item
=>
{
dataObj
.
dataArr0
.
push
(
item
[
0
].
value
)
dataObj
.
dataArr1
.
push
(
item
[
1
].
value
)
dataObj
.
dataArr2
.
push
(
item
[
2
].
value
)
})
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
let
obj
=
{}
obj
=
{
name
:
`驻波比
${
i
+
1
}
`
,
type
:
'line'
,
data
:
dataObj
[
`dataArr
${
i
}
`
],
smooth
:
true
,
emphasis
:
{
focus
:
'series'
},
list
.
push
(
obj
)
}
let
option
=
{
title
:
{
text
:
'趋势分析图形'
,
textStyle
:
{
color
:
'#fff'
,
}
list
.
push
(
obj
)
}
let
option
=
{
title
:
{
text
:
'趋势分析图形'
,
},
tooltip
:
{
trigger
:
'axis'
,
},
legend
:
{
data
:
[
'驻波比1'
,
'驻波比2'
,
'驻波比3'
]
},
animation
:
true
,
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'8%'
,
containLabel
:
true
,
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
true
,
data
:
X
,
axisLabel
:
{
show
:
true
,
textStyle
:
{
color
:
'#
fff'
color
:
'#
9D9FD6'
,
}
},
tooltip
:
{
trigger
:
'axis'
},
legend
:
{
data
:
[
'驻波比1'
,
'驻波比2'
,
'驻波比3'
]
},
animation
:
true
,
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'8%'
,
containLabel
:
true
},
xAxis
:
{
type
:
'category'
,
boundaryGap
:
true
,
data
:
X
,
axisLabel
:
{
show
:
true
,
textStyle
:
{
color
:
'#9D9FD6'
}
}
},
yAxis
:
{
name
:
'驻波比'
,
type
:
'value'
,
axisLine
:
{
show
:
true
},
splitLine
:
{
lineStyle
:
{
type
:
'dashed'
,
color
:
'#9D9FD6'
,
opacity
:
0.2
}
},
yAxis
:
{
name
:
'驻波比'
,
type
:
'value'
,
axisLine
:
{
show
:
true
},
splitLine
:
{
lineStyle
:
{
type
:
'dashed'
,
color
:
'#9D9FD6'
,
opacity
:
0.2
}
},
axisLabel
:
{
show
:
true
,
textStyle
:
{
color
:
'#9D9FD6'
}
axisLabel
:
{
show
:
true
,
textStyle
:
{
color
:
'#9D9FD6'
}
},
series
:
list
}
this
.
myChartLine
.
setOption
(
option
)
}
},
series
:
list
}
this
.
myChartLine
.
setOption
(
option
);
},
// 取消
cancel
()
{
this
.
visible
=
false
this
.
$emit
(
'cancel'
)
this
.
visible
=
false
;
this
.
$emit
(
'cancel'
)
;
}
}
}
...
...
@@ -270,7 +292,6 @@ export default {
position
:
relative
;
margin
:
0
20px
;
width
:
44%
;
// flex: 900;
.chartLine
{
height
:
100%
;
}
...
...
src/views/dashboard/components/type1.vue
View file @
b936d57d
...
...
@@ -56,13 +56,15 @@
<el-col
:span=
"10"
>
<el-button
v-if=
"
form.status.connectAlarm == '告警' || form.status.connectAlarm == '连接异常'
form.status.connectAlarm == '告警' ||
form.status.connectAlarm == '连接异常'
"
class=
"alarmbtn"
type=
"primary"
size=
"mini"
@
click=
"toalarm(form.status.connectAlarm)"
>
处理告警
</el-button>
>
处理告警
</el-button
>
</el-col>
</el-row>
</el-col>
...
...
@@ -78,12 +80,17 @@
}}
</el-col>
<el-col
:span=
"10"
>
<el-button
v-if=
"form.status.monitorAlarm != '正常' && form.status.monitorAlarm != '' && form.status.monitorAlarm != undefined"
v-if=
"
form.status.monitorAlarm != '正常' &&
form.status.monitorAlarm != '' &&
form.status.monitorAlarm != undefined
"
class=
"alarmbtn"
type=
"primary"
size=
"mini"
@
click=
"toalarm(form.status.monitorAlarm)"
>
处理告警
</el-button>
>
处理告警
</el-button
>
</el-col>
</el-row>
</el-col>
...
...
@@ -151,14 +158,16 @@
type=
"text"
class=
"savebtn"
@
click=
"editbtn()"
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button>
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
>
<el-button
v-else
style=
"float: right; padding: 3px 0; margin-right: 20px"
type=
"text"
class=
"savebtn"
@
click=
"savebtn()"
><svg-icon
icon-class=
"save"
/>
保存
</el-button>
><svg-icon
icon-class=
"save"
/>
保存
</el-button
>
</div>
<div>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -250,9 +259,10 @@
</
template
>
<
script
>
import
{
DetailMixins
}
from
'./mixins'
import
{
getUserName
}
from
'@/utils/auth'
import
{
railWayOpen
}
from
'../api'
import
{
DetailMixins
}
from
'./mixins'
;
import
{
getUserName
}
from
'@/utils/auth'
;
import
{
railWayOpen
}
from
'../api'
;
export
default
{
name
:
'Type1'
,
mixins
:
[
DetailMixins
],
...
...
@@ -269,7 +279,7 @@ export default {
},
computed
:
{
userName
()
{
return
getUserName
()
return
getUserName
()
;
}
},
watch
:
{
...
...
@@ -277,16 +287,17 @@ export default {
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
this
.
waylevelcolor
()
this
.
waylevelcolor2
()
this
.
waylevelcolor
()
;
this
.
waylevelcolor2
()
;
}
}
},
deep
:
true
},
methods
:
{
// 保存
savebtn
()
{
this
.
flag
=
true
this
.
flag
=
true
;
const
params
=
{
id
:
this
.
form
.
baseInfo
.
id
,
name
:
this
.
form
.
baseInfo
.
name
,
...
...
@@ -296,43 +307,45 @@ export default {
totalLong
:
this
.
form
.
baseInfo
.
totalLong
}
railWayOpen
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
'修改成功'
)
this
.
$message
.
success
(
'修改成功'
)
;
})
},
// 数据更新,判断状态更新
waylevelcolor
()
{
if
(
this
.
form
.
status
.
monitorAlarm
===
'正常'
)
{
this
.
acolor
.
color
=
'green'
this
.
acolor
.
color
=
'green'
;
}
else
if
(
this
.
form
.
status
.
monitorAlarm
===
'紧急'
)
{
this
.
acolor
.
color
=
'#f00'
this
.
form
.
status
.
monitorAlarm
=
'紧急告警'
this
.
acolor
.
color
=
'#f00'
;
this
.
form
.
status
.
monitorAlarm
=
'紧急告警'
;
}
else
if
(
this
.
form
.
status
.
monitorAlarm
===
'重要'
)
{
this
.
acolor
.
color
=
'#f89850'
this
.
form
.
status
.
monitorAlarm
=
'重要告警'
this
.
acolor
.
color
=
'#f89850'
;
this
.
form
.
status
.
monitorAlarm
=
'重要告警'
;
}
else
if
(
this
.
form
.
status
.
monitorAlarm
===
'一般'
)
{
this
.
acolor
.
color
=
'#ead906'
this
.
form
.
status
.
monitorAlarm
=
'一般告警'
this
.
acolor
.
color
=
'#ead906'
;
this
.
form
.
status
.
monitorAlarm
=
'一般告警'
;
}
},
// 数据更新,判断状态更新
waylevelcolor2
()
{
if
(
this
.
form
.
status
.
connectAlarm
===
'连接正常'
)
{
this
.
acolor3
.
color
=
'green'
this
.
acolor3
.
color
=
'green'
;
}
else
if
(
this
.
form
.
status
.
connectAlarm
===
'连接异常'
)
{
this
.
acolor3
.
color
=
'#f00'
this
.
form
.
status
.
connectAlarm
=
'告警'
this
.
acolor3
.
color
=
'#f00'
;
this
.
form
.
status
.
connectAlarm
=
'告警'
;
}
},
// 处理告警
toalarm
(
data
)
{
let
topath
=
''
let
topath
=
''
;
if
(
data
===
'告警'
)
{
topath
=
'/alarm/device'
topath
=
'/alarm/device'
;
}
else
{
topath
=
'/alarm/cableTime'
topath
=
'/alarm/cableTime'
;
}
this
.
$router
.
push
({
path
:
topath
,
query
:
{
wayId
:
this
.
form
.
baseInfo
.
id
}
})
}
...
...
@@ -364,11 +377,7 @@ export default {
position
:
absolute
;
right
:
2%
;
}
// .el-col {
// margin-bottom: 20px;
// }
.text
{
// display: flex;
padding
:
10px
20px
10px
20px
;
border-bottom
:
1px
solid
#e3e3e3
;
&
:last-child
{
...
...
@@ -390,7 +399,6 @@ export default {
margin-top
:
12px
;
margin-bottom
:
12px
;
}
.value_handle
{
margin-right
:
10px
;
min-width
:
52px
;
...
...
src/views/dashboard/components/type2.vue
View file @
b936d57d
...
...
@@ -127,7 +127,9 @@
<div
class=
"item_name"
>
站点经度
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
{{
changeToLngDFM
(
form
.
baseInfo
.
siteLatitude
)
}}
</div>
<div
class=
"item_data"
>
{{
changeToLngDFM
(
form
.
baseInfo
.
siteLatitude
)
}}
</div>
</el-col>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -135,17 +137,11 @@
<div
class=
"item_name"
>
站点纬度
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
{{
changeToLatDFM
(
form
.
baseInfo
.
siteLongitude
)
}}
</div>
<div
class=
"item_data"
>
{{
changeToLatDFM
(
form
.
baseInfo
.
siteLongitude
)
}}
</div>
</el-col>
</el-row>
<!--
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
站点监控时间
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
></div>
</el-col>
</el-row>
-->
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
漏缆根数
</div>
...
...
@@ -235,13 +231,12 @@
</
template
>
<
script
>
import
{
changeToLngDFM
,
changeToLatDFM
}
from
'@/utils/index'
import
{
changeToLngDFM
,
changeToLatDFM
}
from
'@/utils/index'
;
import
{
DetailMixins
}
from
"./mixins"
;
import
{
siteOpen
}
from
"../api"
;
export
default
{
name
:
"
Dashboard
"
,
name
:
"
Type2
"
,
mixins
:
[
DetailMixins
],
data
()
{
return
{
...
...
@@ -260,7 +255,7 @@ export default {
if
(
this
.
form
.
status
)
{
return
this
.
form
.
status
;
}
else
{
return
this
.
defaultList
return
this
.
defaultList
;
}
},
},
...
...
@@ -272,8 +267,6 @@ export default {
this
.
$nextTick
(
function
()
{
this
.
levelcolor2
();
});
}
},
},
...
...
@@ -281,40 +274,43 @@ export default {
methods
:
{
changeToLngDFM
,
changeToLatDFM
,
// 保存
savebtn
()
{
this
.
flag
=
true
;
siteOpen
(
this
.
info
()).
then
((
res
)
=>
{
this
.
$message
.
success
(
"修改成功"
);
});
},
// 实时告警判断状态
levelcolor2
()
{
let
la
=
document
.
getElementsByClassName
(
"levelData"
)
let
dom
=
document
.
getElementsByClassName
(
"levelData"
)
for
(
var
i
=
0
;
i
<
this
.
statusAlarmfun
.
length
;
i
++
)
{
if
(
la
[
i
].
innerHTML
==
"连接正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
la
[
i
].
innerHTML
=
"连接正常"
}
if
(
la
[
i
].
innerHTML
==
"连接异常"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"告警"
}
if
(
la
[
i
].
innerHTML
==
"正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
}
if
(
la
[
i
].
innerHTML
==
"紧急"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
}
if
(
la
[
i
].
innerHTML
==
"重要"
)
{
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
innerHTML
=
"重要告警"
}
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
innerHTML
=
"一般告警"
if
(
dom
[
i
].
innerHTML
==
"连接正常"
)
{
dom
[
i
].
style
.
color
=
"green"
;
dom
[
i
].
innerHTML
=
"连接正常"
;
}
if
(
dom
[
i
].
innerHTML
==
"连接异常"
)
{
dom
[
i
].
style
.
color
=
"#f00"
;
dom
[
i
].
innerHTML
=
"告警"
;
}
if
(
dom
[
i
].
innerHTML
==
"正常"
)
{
dom
[
i
].
style
.
color
=
"green"
;
}
if
(
dom
[
i
].
innerHTML
==
"紧急"
)
{
dom
[
i
].
style
.
color
=
"#f00"
;
}
if
(
dom
[
i
].
innerHTML
==
"重要"
)
{
dom
[
i
].
style
.
color
=
"#f89850"
;
dom
[
i
].
innerHTML
=
"重要告警"
;
}
if
(
dom
[
i
].
innerHTML
==
"一般"
)
{
dom
[
i
].
style
.
color
=
"#ead906"
;
dom
[
i
].
innerHTML
=
"一般告警"
;
}
}
},
// 处理告警
toalarm
(
data
)
{
let
topath
=
''
if
(
data
===
'设备状态'
)
{
topath
=
'/alarm/device'
topath
=
'/alarm/device'
;
}
else
{
topath
=
'/alarm/cableTime'
topath
=
'/alarm/cableTime'
;
}
this
.
$router
.
push
({
path
:
topath
,
...
...
@@ -331,7 +327,6 @@ export default {
::v-deep
.el-card
{
border
:
1px
solid
#e3e3e3
;
border-radius
:
8px
;
// min-height: 243px;
.el-card__header
{
font-size
:
18px
;
color
:
#333333
;
...
...
@@ -355,9 +350,7 @@ export default {
position
:
absolute
;
top
:
328px
;
}
.text
{
// display: flex;
padding
:
10px
20px
10px
20px
;
border-bottom
:
1px
solid
#e3e3e3
;
&
:last-child
{
...
...
@@ -379,7 +372,6 @@ export default {
margin-top
:
12px
;
margin-bottom
:
12px
;
}
.value_handle
{
color
:
red
;
margin-right
:
10px
;
...
...
src/views/dashboard/components/type3.vue
View file @
b936d57d
...
...
@@ -40,15 +40,13 @@
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix posa"
>
<span>
基础信息
</span>
<el-button
<el-button
style=
"float: right; padding: 3px 0; margin-right: 20px"
type=
"text"
class=
"savebtn"
v-if=
"flag == true"
@
click=
"editbtn()"
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
>
<el-button
style=
"float: right; padding: 3px 0; margin-right: 20px"
...
...
@@ -56,9 +54,7 @@
class=
"savebtn"
v-else
@
click=
"savebtn()"
><svg-icon
icon-class=
"save"
/>
保存
</el-button
><svg-icon
icon-class=
"save"
/>
保存
</el-button
>
</div>
<div>
...
...
@@ -222,7 +218,12 @@
<span>
当前状态
</span>
</div>
<div>
<el-row
v-for=
"(item, i) in statusList"
:key=
"i"
class=
"text"
:gutter=
"24"
>
<el-row
v-for=
"(item, i) in statusList"
:key=
"i"
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
{{
item
.
name
}}
</div>
</el-col>
...
...
@@ -231,12 +232,18 @@
</el-col>
<el-col
:span=
"6"
>
<el-button
v-if=
"item.value == '连接异常' || item.value == '紧急' || item.value == '重要' || item.value == '一般'"
v-if=
"
item.value == '连接异常' ||
item.value == '紧急' ||
item.value == '重要' ||
item.value == '一般'
"
class=
"alarmbtn"
type=
"primary"
size=
"mini"
@
click=
"toalarm(item)"
>
处理告警
</el-button>
>
处理告警
</el-button
>
</el-col>
</el-row>
</div>
...
...
@@ -247,10 +254,11 @@
</
template
>
<
script
>
import
{
DetailMixins
}
from
'./mixins'
import
{
fsuOpen
}
from
'../api'
import
{
DetailMixins
}
from
'./mixins'
;
import
{
fsuOpen
}
from
'../api'
;
export
default
{
name
:
'Type
5
'
,
name
:
'Type
3
'
,
mixins
:
[
DetailMixins
],
data
()
{
return
{
...
...
@@ -262,29 +270,31 @@ export default {
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
this
.
$nextTick
(
function
()
{
this
.
levelcolor
()
this
.
$nextTick
(
function
()
{
this
.
levelcolor
()
;
})
}
}
}
},
methods
:
{
// 保存
savebtn
()
{
this
.
flag
=
true
this
.
flag
=
true
;
fsuOpen
(
this
.
info
()).
then
((
res
)
=>
{
this
.
$message
.
success
(
'修改成功'
)
this
.
$message
.
success
(
'修改成功'
)
;
})
},
// 处理告警
toalarm
(
item
)
{
let
topath
=
''
let
toquery
=
{}
let
topath
=
''
;
let
toquery
=
{}
;
if
(
item
.
name
===
'设备状态'
)
{
topath
=
'/alarm/device'
toquery
=
{
fsuId
:
this
.
form
.
baseInfo
.
id
}
topath
=
'/alarm/device'
;
toquery
=
{
fsuId
:
this
.
form
.
baseInfo
.
id
}
;
}
else
{
topath
=
'/alarm/cableTime'
toquery
=
{
alarmTargetName
:
item
.
name
}
topath
=
'/alarm/cableTime'
;
toquery
=
{
alarmTargetName
:
item
.
name
}
;
}
this
.
$router
.
push
({
path
:
topath
,
...
...
src/views/dashboard/components/type4.vue
View file @
b936d57d
...
...
@@ -34,15 +34,13 @@
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"clearfix posa"
>
<span>
基础信息
</span>
<el-button
<el-button
style=
"float: right; padding: 3px 0; margin-right: 20px"
type=
"text"
class=
"savebtn"
v-if=
"flag == true"
@
click=
"editbtn()"
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
>
<el-button
style=
"float: right; padding: 3px 0; margin-right: 20px"
...
...
@@ -50,9 +48,7 @@
class=
"savebtn"
v-else
@
click=
"savebtn()"
><svg-icon
icon-class=
"save"
/>
保存
</el-button
><svg-icon
icon-class=
"save"
/>
保存
</el-button
>
</div>
<div>
...
...
@@ -197,11 +193,21 @@
<el-col
:span=
"8"
>
<div
class=
"item_data levelData"
>
{{
item
.
value
}}
</div>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"item.value == '连接异常' || item.value == '紧急' || item.value == '重要' || item.value == '一般'"
@
click=
"toalarm(item)"
>
处理告警
</el-button>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"
item.value == '连接异常' ||
item.value == '紧急' ||
item.value == '重要' ||
item.value == '一般'
"
@
click=
"toalarm(item)"
>
处理告警
</el-button
>
</el-col>
</el-row>
</div>
</el-card>
...
...
@@ -212,62 +218,60 @@
<
script
>
import
{
DetailMixins
}
from
"./mixins"
;
import
{
monitorEquipOpen
}
from
"../api"
;
export
default
{
name
:
"Dashboard"
,
name
:
"Type4"
,
mixins
:
[
DetailMixins
],
data
()
{
return
{
colspan
:
14
,
colspan
:
14
,
};
},
mixins
:
[
DetailMixins
],
watch
:
{
statusList
:
{
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
this
.
$nextTick
(
function
()
{
this
.
levelcolor
();
});
}
},
},
},
methods
:
{
// 保存
savebtn
()
{
this
.
flag
=
true
;
monitorEquipOpen
(
this
.
info
()).
then
((
res
)
=>
{
this
.
$message
.
success
(
"修改成功"
);
this
.
$message
.
success
(
"修改成功"
);
});
},
toalarm
(
item
){
let
topath
=
''
let
toquery
=
{}
if
(
item
.
name
==
'设备状态'
)
{
topath
=
'/alarm/device'
toquery
=
{
monitorEquipId
:
this
.
form
.
baseInfo
.
id
}
}
else
{
topath
=
'/alarm/cableTime'
toquery
=
{
alarmTargetName
:
item
.
name
}
}
// 处理告警
toalarm
(
item
)
{
let
topath
=
''
;
let
toquery
=
{};
if
(
item
.
name
==
'设备状态'
)
{
topath
=
'/alarm/device'
;
toquery
=
{
monitorEquipId
:
this
.
form
.
baseInfo
.
id
};
}
else
{
topath
=
'/alarm/cableTime'
;
toquery
=
{
alarmTargetName
:
item
.
name
};
}
this
.
$router
.
push
({
path
:
topath
,
query
:
toquery
,
});
},
},
watch
:
{
statusList
:
{
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
this
.
$nextTick
(
function
()
{
this
.
levelcolor
();
});
}
},
},
},
mounted
()
{},
};
}
</
script
>
<
style
lang=
"scss"
scoped
>
::v-deep
.el-card
{
border
:
1px
solid
#e3e3e3
;
border-radius
:
8px
;
// min-height: 243px;
.el-card__header
{
font-size
:
18px
;
color
:
#333333
;
...
...
@@ -312,7 +316,6 @@ export default {
margin-top
:
12px
;
margin-bottom
:
12px
;
}
.el-card
:last-child
.text
{
border-bottom
:
none
!
important
;
}
...
...
src/views/dashboard/components/type5.vue
View file @
b936d57d
...
...
@@ -35,12 +35,13 @@
<div
class=
"item_data"
>
{{
form
.
log
.
monitor
}}
条
</div>
</el-col>
<el-col
:span=
"6"
/>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
@
click=
"trendAnalysis"
>
趋势分析图形
</el-button>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
@
click=
"trendAnalysis"
>
趋势分析图形
</el-button
>
</el-row>
</div>
</el-card>
...
...
@@ -56,14 +57,16 @@
type=
"text"
class=
"savebtn"
@
click=
"editbtn()"
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button>
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
>
<el-button
v-else
style=
"float: right; padding: 3px 0; margin-right: 20px"
type=
"text"
class=
"savebtn"
@
click=
"savebtn()"
><svg-icon
icon-class=
"save"
/>
保存
</el-button>
><svg-icon
icon-class=
"save"
/>
保存
</el-button
>
</div>
<div>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -145,7 +148,8 @@
clearable
placeholder=
"请输入内容"
:disabled=
"flag"
><template
slot=
"append"
>
dB/m
</
template
></el-input>
><template
slot=
"append"
>
dB/m
</
template
></el-input
>
</div>
</el-col>
</el-row>
...
...
@@ -228,27 +232,33 @@
<span>
当前状态
</span>
</div>
<div>
<!-- === -->
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
漏缆状态
</div>
</el-col>
<el-col
:span=
"8"
>
<div
v-if=
"stat
usl
.length != 0"
v-if=
"stat
eEmergency
.length != 0"
class=
"item_data levelData"
:style=
"acolor"
>
{{statusl[0].value }}
</div>
>
{{ stateEmergency[0].value }}
</div>
</el-col>
<el-col
:span=
"6"
>
<el-button
v-if=
"form.status.length && (form.status[0].value == '紧急告警' || form.status[0].value == '重要告警' || form.status[0].value == '一般告警')
v-if=
"
form.status.length &&
(form.status[0].value == '紧急告警' ||
form.status[0].value == '重要告警' ||
form.status[0].value == '一般告警')
"
class=
"alarmbtn"
type=
"primary"
size=
"mini"
@
click=
"toalarm()"
>
处理告警
</el-button>
>
处理告警
</el-button
>
</el-col>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -256,13 +266,13 @@
<div
class=
"item_name"
>
最后更新时间
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
v-if=
"stat
usl
.length != 0"
class=
"item_data"
>
{{ stat
usl
[1].value }}
<div
v-if=
"stat
eEmergency
.length != 0"
class=
"item_data"
>
{{ stat
eEmergency
[1].value }}
</div>
</el-col>
</el-row>
<el-row
v-for=
"(item, i) in
long
"
v-for=
"(item, i) in
distanceList
"
:key=
"i"
class=
"text"
:gutter=
"24"
...
...
@@ -275,12 +285,9 @@
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
驻波比:{{
zhubobi
[i].value }}
</div>
<div
class=
"item_data"
>
驻波比:{{
standingWaveRatio
[i].value }}
</div>
</el-col>
</el-row>
<!-- ==== -->
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
百米损耗
</div>
...
...
@@ -296,57 +303,61 @@
type=
"success"
size=
"mini"
@
click=
"generateChart"
>
生成图形
</el-button>
>
生成图形
</el-button
>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
</el-row>
<picAnalysis
:flag=
"curflag"
:curInfo=
"curObj"
@
cancel=
"cancel"
/>
<trendAnalysis
:flag=
"trendflag"
:selectId=
"selectId"
:curInfo=
"curInfo"
:type=
"type==5 ? 0 : 1"
@
cancel=
"cancel"
/>
<trendAnalysis
:flag=
"trendflag"
:selectId=
"selectId"
:curInfo=
"curInfo"
:type=
"type == 5 ? 0 : 1"
@
cancel=
"cancel"
/>
</div>
</template>
<
script
>
import
{
DetailMixins
}
from
'./mixins'
import
{
leakyCableOpen
}
from
'../api'
import
picAnalysis
from
'@/views/history/leakyCableStatus/components/picAnalysis.vue'
import
trendAnalysis
from
'./trendAnalysis.vue'
import
{
DetailMixins
}
from
'./mixins'
;
import
{
leakyCableOpen
}
from
'../api'
;
import
picAnalysis
from
'@/views/history/leakyCableStatus/components/picAnalysis.vue'
;
import
trendAnalysis
from
'./trendAnalysis.vue'
;
export
default
{
name
:
'Type5'
,
mixins
:
[
DetailMixins
],
data
()
{
return
{
colspan
:
14
,
acolor
:
{
color
:
''
},
leakyList
:
[],
timeStatus
:
{},
zhubobi
:
[],
long
:
[],
statusl
:
[],
standingWaveRatio
:
[],
// 驻波比
distanceList
:
[],
// 距离数组
stateEmergency
:
[],
// 状态
curflag
:
0
,
trendflag
:
0
,
curObj
:
[]
}
},
components
:
{
picAnalysis
,
trendAnalysis
},
components
:
{
picAnalysis
,
trendAnalysis
},
computed
:
{
statusAlarmfun
()
{
return
this
.
form
.
status
||
[]
return
this
.
form
.
status
||
[]
;
}
},
watch
:
{
statusAlarmfun
:
{
handler
(
newV
)
{
if
(
newV
)
{
this
.
trans
()
this
.
$nextTick
(
function
()
{
this
.
leakylevelcolor
()
this
.
handleData
();
this
.
$nextTick
(
function
()
{
this
.
leakylevelcolor
()
;
})
}
}
...
...
@@ -354,74 +365,80 @@ export default {
deep
:
true
},
methods
:
{
// 趋势分析图形
trendAnalysis
()
{
this
.
trendflag
=
1
this
.
trendflag
=
1
;
},
// 生成图形
generateChart
()
{
this
.
curObj
=
[]
this
.
curflag
=
1
this
.
curObj
.
push
(
this
.
curInfo
.
baseInfo
.
leakyCableDescribe
)
this
.
curObj
=
[]
;
this
.
curflag
=
1
;
this
.
curObj
.
push
(
this
.
curInfo
.
baseInfo
.
leakyCableDescribe
)
;
},
// 取消
cancel
()
{
this
.
curflag
=
0
this
.
trendflag
=
0
this
.
curflag
=
0
;
this
.
trendflag
=
0
;
},
// 保存
savebtn
()
{
this
.
flag
=
true
this
.
flag
=
true
;
const
params
=
{
id
:
this
.
form
.
baseInfo
.
id
,
isOpen
:
this
.
form
.
baseInfo
.
isOpen
,
hundredMetersLoss
:
this
.
form
.
baseInfo
.
hundredMetersLoss
}
leakyCableOpen
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
'修改成功'
)
this
.
$message
.
success
(
'修改成功'
)
;
})
},
// 数据更改,判断状态更改
leakylevelcolor
()
{
if
(
this
.
form
.
status
[
0
].
value
===
'正常'
)
{
this
.
acolor
.
color
=
'green'
this
.
acolor
.
color
=
'green'
;
}
else
if
(
this
.
form
.
status
[
0
].
value
===
'紧急'
)
{
this
.
acolor
.
color
=
'#f00'
this
.
form
.
status
[
0
].
value
=
'紧急告警'
this
.
acolor
.
color
=
'#f00'
;
this
.
form
.
status
[
0
].
value
=
'紧急告警'
;
}
else
if
(
this
.
form
.
status
[
0
].
value
===
'重要'
)
{
this
.
acolor
.
color
=
'#f89850'
this
.
form
.
status
[
0
].
value
=
'重要告警'
this
.
acolor
.
color
=
'#f89850'
;
this
.
form
.
status
[
0
].
value
=
'重要告警'
;
}
else
if
(
this
.
form
.
status
[
0
].
value
===
'一般'
)
{
this
.
acolor
.
color
=
'#ead906'
this
.
form
.
status
[
0
].
value
=
'一般告警'
this
.
acolor
.
color
=
'#ead906'
;
this
.
form
.
status
[
0
].
value
=
'一般告警'
;
}
},
// 处理告警
toalarm
()
{
this
.
$router
.
push
({
path
:
'/alarm/cableTime'
,
query
:
{
alarmTargetName
:
this
.
form
.
baseInfo
.
leakyCableDescribe
}
})
},
trans
()
{
// 处理数据
handleData
()
{
const
arr1
=
[];
const
arr2
=
[];
const
arr3
=
[]
if
(
this
.
statusAlarmfun
.
length
!==
0
)
{
for
(
let
i
=
0
;
i
<
this
.
statusAlarmfun
.
length
;
i
++
)
{
if
(
i
%
2
!==
0
)
{
if
(
this
.
statusAlarmfun
[
i
].
name
===
'最后更新时间'
)
{
this
.
statusAlarmfun
[
i
].
value
=
this
.
dateFormat
(
this
.
statusAlarmfun
[
i
].
value
,
'yyyy-MM-dd HH:mm:ss'
)
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
this
.
statusAlarmfun
[
i
].
value
=
this
.
dateFormat
(
this
.
statusAlarmfun
[
i
].
value
,
'yyyy-MM-dd HH:mm:ss'
)
;
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
else
{
arr2
.
push
(
this
.
statusAlarmfun
[
i
])
arr2
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
}
else
{
if
(
this
.
statusAlarmfun
[
i
].
name
===
'漏缆状态'
)
{
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
else
{
arr3
.
push
(
this
.
statusAlarmfun
[
i
])
arr3
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
}
}
this
.
stat
usl
=
arr1
this
.
zhubobi
=
arr2
this
.
long
=
arr3
this
.
stat
eEmergency
=
arr1
;
this
.
standingWaveRatio
=
arr2
;
this
.
distanceList
=
arr3
;
}
}
}
...
...
src/views/dashboard/components/type6.vue
View file @
b936d57d
...
...
@@ -24,7 +24,8 @@
type=
"success"
size=
"mini"
@
click=
"trendAnalysis"
>
趋势分析图形
</el-button>
>
趋势分析图形
</el-button
>
</el-col>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -50,14 +51,16 @@
type=
"text"
class=
"savebtn"
@
click=
"editbtn()"
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button>
><svg-icon
icon-class=
"edit"
/>
编辑
</el-button
>
<el-button
v-else
style=
"float: right; padding: 3px 0; margin-right: 20px"
type=
"text"
class=
"savebtn"
@
click=
"savebtn()"
><svg-icon
icon-class=
"save"
/>
保存
</el-button>
><svg-icon
icon-class=
"save"
/>
保存
</el-button
>
</div>
<div>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -123,9 +126,7 @@
<div
class=
"item_name"
>
天馈线长度
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
{{
form
.
baseInfo
.
feederLength
}}
m
</div>
<div
class=
"item_data"
>
{{
form
.
baseInfo
.
feederLength
}}
m
</div>
</el-col>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -140,7 +141,8 @@
placeholder=
"请输入内容"
:disabled=
"flag"
>
<template
slot=
"append"
>
dB/m
</
template
></el-input>
<template
slot=
"append"
>
dB/m
</
template
></el-input
>
</div>
</el-col>
</el-row>
...
...
@@ -161,14 +163,6 @@
<div
class=
"item_data"
>
{{ form.baseInfo.sendPower }}
</div>
</el-col>
</el-row>
<!-- <el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">天馈线接头数量</div>
</el-col>
<el-col :span="colspan">
<div class="item_data">{{ form.baseInfo.kmSign }}</div>
</el-col>
</el-row> -->
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
跳线长度
</div>
...
...
@@ -220,20 +214,27 @@
</el-col>
<el-col
:span=
"8"
>
<div
v-if=
"stat
usl
.length != 0"
v-if=
"stat
eEmergency
.length != 0"
class=
"item_data levelData"
:style=
"acolor"
>
{{statusl[0].value}}
</div>
>
{{ stateEmergency[0].value }}
</div>
</el-col>
<el-col
:span=
"6"
>
<el-button
v-if=
"form.status.length && (form.status[0].value == '紧急告警' || form.status[0].value == '重要告警' || form.status[0].value == '一般告警')
v-if=
"
form.status.length &&
(form.status[0].value == '紧急告警' ||
form.status[0].value == '重要告警' ||
form.status[0].value == '一般告警')
"
class=
"alarmbtn"
type=
"primary"
size=
"mini"
@
click=
"toalarm()"
>
处理告警
</el-button>
>
处理告警
</el-button
>
</el-col>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
...
...
@@ -241,13 +242,13 @@
<div
class=
"item_name"
>
最后更新时间
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
v-if=
"stat
usl
.length != 0"
class=
"item_data"
>
{{ stat
usl
[1].value }}
<div
v-if=
"stat
eEmergency
.length != 0"
class=
"item_data"
>
{{ stat
eEmergency
[1].value }}
</div>
</el-col>
</el-row>
<el-row
v-for=
"(item, i) in
long
"
v-for=
"(item, i) in
distanceList
"
:key=
"i"
class=
"text"
:gutter=
"24"
...
...
@@ -260,12 +261,12 @@
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
驻波比:{{ zhubobi[i].value }}
</div>
<div
class=
"item_data"
>
驻波比:{{ standingWaveRatio[i].value }}
</div>
</el-col>
</el-row>
<!-- ==== -->
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
百米损耗
</div>
...
...
@@ -281,7 +282,8 @@
type=
"success"
size=
"mini"
@
click=
"generateChart"
>
生成图形
</el-button>
>
生成图形
</el-button
>
</el-col>
</el-row>
</div>
...
...
@@ -290,15 +292,21 @@
</el-row>
<picAnalysis
:flag=
"curflag"
:curInfo=
"curObj"
@
cancel=
"cancel"
/>
<trendAnalysis
:flag=
"trendflag"
:selectId=
"selectId"
:curInfo=
"curInfo"
:type=
"type==5 ? 0 : 1"
@
cancel=
"cancel"
/>
<trendAnalysis
:flag=
"trendflag"
:selectId=
"selectId"
:curInfo=
"curInfo"
:type=
"type == 5 ? 0 : 1"
@
cancel=
"cancel"
/>
</div>
</template>
<
script
>
import
{
DetailMixins
}
from
'./mixins'
import
{
updateFeeder
}
from
'../api'
import
picAnalysis
from
'@/views/history/leakyCableStatus/components/picAnalysis.vue'
import
trendAnalysis
from
'./trendAnalysis.vue'
import
{
DetailMixins
}
from
'./mixins'
;
import
{
updateFeeder
}
from
'../api'
;
import
picAnalysis
from
'@/views/history/leakyCableStatus/components/picAnalysis.vue'
;
import
trendAnalysis
from
'./trendAnalysis.vue'
;
export
default
{
mixins
:
[
DetailMixins
],
...
...
@@ -308,29 +316,27 @@ export default {
acolor
:
{
color
:
''
},
leakyList
:
[],
timeStatus
:
{},
zhubobi
:
[],
long
:
[],
statusl
:
[],
standingWaveRatio
:
[],
// 驻波比
distanceList
:
[],
// 距离数组
stateEmergency
:
[],
// 状态
curflag
:
0
,
trendflag
:
0
,
curObj
:
[]
}
},
components
:
{
picAnalysis
,
trendAnalysis
},
components
:
{
picAnalysis
,
trendAnalysis
},
computed
:
{
statusAlarmfun
()
{
return
this
.
form
.
status
||
[]
return
this
.
form
.
status
||
[]
;
}
},
watch
:
{
statusAlarmfun
:
{
handler
(
newV
)
{
if
(
newV
)
{
this
.
trans
()
this
.
$nextTick
(
function
()
{
this
.
leakylevelcolor
()
this
.
handleData
()
this
.
$nextTick
(
function
()
{
this
.
leakylevelcolor
()
;
})
}
}
...
...
@@ -338,43 +344,49 @@ export default {
deep
:
true
},
methods
:
{
// 趋势分析图形
trendAnalysis
()
{
this
.
trendflag
=
1
this
.
trendflag
=
1
;
},
// 生成图形
generateChart
()
{
this
.
curObj
=
[]
this
.
curflag
=
1
this
.
curObj
.
push
(
this
.
curInfo
.
baseInfo
.
feederDescribe
)
this
.
curObj
=
[]
;
this
.
curflag
=
1
;
this
.
curObj
.
push
(
this
.
curInfo
.
baseInfo
.
feederDescribe
)
;
},
// 取消
cancel
()
{
this
.
curflag
=
0
this
.
trendflag
=
0
this
.
curflag
=
0
;
this
.
trendflag
=
0
;
},
// 保存
savebtn
()
{
this
.
flag
=
true
this
.
flag
=
true
;
const
params
=
{
id
:
this
.
form
.
baseInfo
.
id
,
isOpen
:
this
.
form
.
baseInfo
.
isOpen
,
hundredMetersLoss
:
this
.
form
.
baseInfo
.
hundredMetersLoss
}
updateFeeder
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
'修改成功'
)
this
.
$message
.
success
(
'修改成功'
)
;
})
},
// 数据更改,判断状态更改
leakylevelcolor
()
{
if
(
this
.
form
.
status
[
0
].
value
===
'正常'
)
{
this
.
acolor
.
color
=
'green'
this
.
acolor
.
color
=
'green'
;
}
else
if
(
this
.
form
.
status
[
0
].
value
===
'紧急'
)
{
this
.
acolor
.
color
=
'#f00'
this
.
form
.
status
[
0
].
value
=
'紧急告警'
this
.
acolor
.
color
=
'#f00'
;
this
.
form
.
status
[
0
].
value
=
'紧急告警'
;
}
else
if
(
this
.
form
.
status
[
0
].
value
===
'重要'
)
{
this
.
acolor
.
color
=
'#f89850'
this
.
form
.
status
[
0
].
value
=
'重要告警'
this
.
acolor
.
color
=
'#f89850'
;
this
.
form
.
status
[
0
].
value
=
'重要告警'
;
}
else
if
(
this
.
form
.
status
[
0
].
value
===
'一般'
)
{
this
.
acolor
.
color
=
'#ead906'
this
.
form
.
status
[
0
].
value
=
'一般告警'
this
.
acolor
.
color
=
'#ead906'
;
this
.
form
.
status
[
0
].
value
=
'一般告警'
;
}
},
// 处理告警
toalarm
()
{
this
.
$router
.
push
({
path
:
'/alarm/cableTime'
,
...
...
@@ -383,28 +395,28 @@ export default {
}
})
},
trans
()
{
const
arr1
=
[];
const
arr2
=
[];
const
arr3
=
[]
handleData
()
{
const
arr1
=
[];
const
arr2
=
[];
const
arr3
=
[]
;
if
(
this
.
statusAlarmfun
.
length
!==
0
)
{
for
(
let
i
=
0
;
i
<
this
.
statusAlarmfun
.
length
;
i
++
)
{
if
(
i
%
2
!==
0
)
{
if
(
this
.
statusAlarmfun
[
i
].
name
===
'最后更新时间'
)
{
this
.
statusAlarmfun
[
i
].
value
=
this
.
dateFormat
(
this
.
statusAlarmfun
[
i
].
value
,
'yyyy-MM-dd HH:mm:ss'
)
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
this
.
statusAlarmfun
[
i
].
value
=
this
.
dateFormat
(
this
.
statusAlarmfun
[
i
].
value
,
'yyyy-MM-dd HH:mm:ss'
)
;
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
else
{
arr2
.
push
(
this
.
statusAlarmfun
[
i
])
arr2
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
}
else
{
if
(
this
.
statusAlarmfun
[
i
].
name
===
'天馈线状态'
)
{
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
else
{
arr3
.
push
(
this
.
statusAlarmfun
[
i
])
arr3
.
push
(
this
.
statusAlarmfun
[
i
])
;
}
}
}
this
.
stat
usl
=
arr1
this
.
zhubobi
=
arr2
this
.
long
=
arr3
this
.
stat
eEmergency
=
arr1
;
this
.
standingWaveRatio
=
arr2
;
this
.
distanceList
=
arr3
;
}
}
}
...
...
src/views/dashboard/index.vue
View file @
b936d57d
<
template
>
<!-- 首页 -->
<div
class=
"dashboard-container"
>
<!-- 首页 -->
<div>
<orgTree
ref=
"tree"
style=
"float:left"
@
selectItem=
"selectItem"
@
defaultSite=
"defaultSite"
@
dblClick=
"dblClick"
/>
<div
class=
"ml300"
>
<type
v-loading=
"loading"
:type=
"type"
:curInfo=
"curInfo"
:selectId=
"selectId"
:curId=
"curId"
/>
</div>
</div>
</div>
</
template
>
...
...
@@ -32,49 +31,53 @@ export default {
Type
,
},
methods
:
{
// 初始化选中第一条数据
defaultSite
(
data
){
this
.
getDetailNode
(
data
)
this
.
getDetailNode
(
data
)
;
},
// 单击树
selectItem
(
data
)
{
this
.
selectId
=
data
.
id
this
.
curId
=
data
.
code
this
.
type
=
data
.
type
this
.
getDetailNode
(
data
.
id
)
},
this
.
selectId
=
data
.
id
;
this
.
curId
=
data
.
code
;
this
.
type
=
data
.
type
;
this
.
getDetailNode
(
data
.
id
);
},
// 双击树
dblClick
(
data
,
node
)
{
this
.
changeTreeNodeStatus
(
node
)
this
.
changeTreeNodeStatus
(
node
)
;
},
// 双击树,收起节点
changeTreeNodeStatus
(
node
)
{
node
.
expanded
=
true
node
.
expanded
=
true
;
for
(
let
i
=
0
;
i
<
node
.
childNodes
.
length
;
i
++
)
{
// 改变节点的自身expanded状态
node
.
childNodes
[
i
].
expanded
=
true
node
.
childNodes
[
i
].
expanded
=
true
;
// 遍历子节点
if
(
node
.
childNodes
[
i
].
childNodes
.
length
>
0
)
{
this
.
changeTreeNodeStatus
(
node
.
childNodes
[
i
])
this
.
changeTreeNodeStatus
(
node
.
childNodes
[
i
])
;
}
}
},
// 获取节点的详情
getDetailNode
(
data
)
{
let
param
=
{
type
:
this
.
type
,
id
:
data
}
this
.
loading
=
true
this
.
loading
=
true
;
treeBaseInfo
(
param
).
then
(
res
=>
{
let
controlLimit
=
res
.
controlLimit
||
[]
let
controlLimit
=
res
.
controlLimit
||
[]
;
if
(
controlLimit
)
{
controlLimit
.
map
(
item
=>
{
res
[
`type
${
item
.
type
}
`
]
=
item
.
sum
res
[
`type
${
item
.
type
}
`
]
=
item
.
sum
;
})
}
this
.
curInfo
=
res
this
.
loading
=
false
this
.
curInfo
=
res
;
this
.
loading
=
false
;
})
}
,
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -112,11 +115,7 @@ export default {
position
:
absolute
;
right
:
2%
;
}
// .el-col {
// margin-bottom: 20px;
// }
.text
{
// display: flex;
padding
:
10px
20px
10px
20px
;
border-bottom
:
1px
solid
#e3e3e3
;
&
:last-child
{
...
...
@@ -139,8 +138,6 @@ export default {
margin-bottom
:
12px
;
}
.item_data
{
}
.value_handle
{
color
:
red
;
margin-right
:
10px
;
...
...
@@ -154,7 +151,6 @@ export default {
}
}
.text2
{
// display: flex;
padding
:
10px
20px
10px
20px
;
border-bottom
:
1px
solid
#e3e3e3
;
.item_name
,
...
...
@@ -173,9 +169,6 @@ export default {
margin-top
:
12px
;
margin-bottom
:
12px
;
}
.item_data
{
}
.value_handle
{
color
:
red
;
margin-right
:
10px
;
...
...
src/views/history/deviceLinkRepair/components/search.vue
View file @
b936d57d
...
...
@@ -31,11 +31,9 @@ export default {
data
()
{
return
{
form
:
formInit
(),
dateRange
:
[]
,
dateRange
:
[]
}
},
mounted
()
{
},
methods
:
{
toSearch
()
{
this
.
form
.
startConnectAlarmMaintainTime
=
this
.
dateRange
[
0
]
...
...
src/views/history/deviceLinkRepair/index.vue
View file @
b936d57d
...
...
@@ -2,13 +2,20 @@
<div
class=
"leakage-cable"
>
<!-- 设备连接维修历史 -->
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
key=
""
/>
<div
style=
"color: #666666"
/>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids
>
<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=
"isPermit==false ? 'primary' : 'info'"
:disabled=
"isPermit"
@
click=
"delAll"
>
清空数据
</el-button>
<el-button
:type=
"isPermit == false ? 'primary' : 'info'"
:disabled=
"isPermit"
@
click=
"delAll"
>
清空数据
</el-button
>
</div>
</div>
<div
v-if=
"isQuery"
>
...
...
@@ -38,7 +45,7 @@
label=
"网元设备"
align=
"center"
/>
<el-table-column
prop=
"userName"
label=
"维修人员信息"
align=
"center"
/>
<el-table-column
prop=
"userName"
label=
"维修人员信息"
align=
"center"
/>
<el-table-column
prop=
"connectAlarmMaintainTime"
label=
"连接告警维修时间"
...
...
@@ -54,18 +61,20 @@
/>
</div>
</
template
>
<
script
>
import
{
ConnectMaintainList
,
ConnectMaintainDelete
,
ConnectMaintainDeleteAll
}
from
'../api'
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
search
from
'./components/search.vue'
import
download
from
'@/utils/download'
import
{
exportConnectMaintainHistory
}
from
'@/api/export'
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
import
{
mapState
}
from
'vuex'
}
from
'../api'
;
import
{
ConnectStatusEnum
}
from
'@/const/index'
;
import
search
from
'./components/search.vue'
;
import
download
from
'@/utils/download'
;
import
{
exportConnectMaintainHistory
}
from
'@/api/export'
;
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
;
import
{
mapState
}
from
'vuex'
;
export
default
{
components
:
{
search
...
...
@@ -90,65 +99,72 @@ export default {
...
mapState
(
'user'
,
[
'userBaseInfo'
]),
isPermit
()
{
if
(
this
.
userBaseInfo
.
userId
===
1
)
{
return
false
return
false
;
}
else
{
return
true
return
true
;
}
}
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
methods
:
{
// 表格多选
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
)
this
.
multipleSelection
=
deleteIds
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
)
;
this
.
multipleSelection
=
deleteIds
;
},
// 分页更改
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
current
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
;
},
// 刷新
refresh
()
{
this
.
$refs
.
reset
!==
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
()
:
this
.
getTableData
()
;
},
// 查询
search
(
option
)
{
this
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
// 获取数据
getTableData
()
{
let
params
=
{
...
this
.
params
,
...
this
.
searchOption
}
ConnectMaintainList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[]
;
list
.
forEach
((
item
)
=>
{
item
.
pointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
]
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
]
;
})
this
.
tableData
=
list
this
.
total
=
res
.
total
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
;
if
(
this
.
istrue
===
1
)
{
if
(
this
.
tableData
.
length
!==
0
)
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
}
else
{
warningAlert
(
'查询结果为空'
)
warningAlert
(
'查询结果为空'
)
;
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
})
},
// 删除
toDelete
()
{
ConnectMaintainDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
getTableData
()
this
.
$message
.
success
(
'删除成功!'
)
;
this
.
getTableData
()
;
})
},
// 清空数据
delAll
()
{
this
.
$confirm
(
'继续操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -156,36 +172,38 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
ConnectMaintainDeleteAll
().
then
((
res
)
=>
{
this
.
$message
.
success
(
'清空成功!'
)
this
.
getTableData
()
this
.
$message
.
success
(
'清空成功!'
)
;
this
.
getTableData
()
;
})
}).
catch
(()
=>
{
warningAlert
(
'取消删除'
)
warningAlert
(
'取消删除'
)
;
})
},
// 表格背景
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
pointConnectStatus_text
===
'连接异常'
&&
column
.
label
===
'连接状态'
)
{
return
'emergency'
return
'emergency'
;
}
else
if
(
row
.
pointConnectStatus_text
===
'连接正常'
&&
column
.
label
===
'连接状态'
)
{
return
'normal'
return
'normal'
;
}
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
'stripe'
;
}
},
// 导出
toExport
()
{
if
(
this
.
exids
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无数据'
)
return
false
this
.
$message
.
warning
(
'暂无数据'
)
;
return
false
;
}
else
{
exportConnectMaintainHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备连接维修历史.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`设备连接维修历史.xls`
)
;
})
}
}
...
...
@@ -203,7 +221,6 @@ export default {
&
:
:
v-deep
.
cell
{
color
:
#333333
;
}
&
:
:
v-deep
.
stripe
{
background-color
:
#eaf1fe
;
}
...
...
@@ -216,7 +233,6 @@ export default {
&
:
:
v-deep
.
normal
{
background-color
:
green
!
important
;
}
.page
{
display
:
flex
;
align-items
:
center
;
...
...
src/views/history/deviceLinkStatus/components/search.vue
View file @
b936d57d
...
...
@@ -39,25 +39,22 @@ export default {
return
{
form
:
formInit
(),
uploadRange
:
[],
cancelRange
:
[]
,
cancelRange
:
[]
}
},
mounted
()
{
},
methods
:
{
toSearch
()
{
this
.
form
.
startUploadTime
=
this
.
uploadRange
[
0
]
this
.
form
.
endUploadTime
=
this
.
uploadRange
[
1
]
this
.
form
.
startCancelTime
=
this
.
cancelRange
[
0
]
this
.
form
.
endCancelTime
=
this
.
cancelRange
[
1
]
this
.
$emit
(
'search'
,
this
.
form
)
this
.
form
.
startUploadTime
=
this
.
uploadRange
[
0
]
;
this
.
form
.
endUploadTime
=
this
.
uploadRange
[
1
]
;
this
.
form
.
startCancelTime
=
this
.
cancelRange
[
0
]
;
this
.
form
.
endCancelTime
=
this
.
cancelRange
[
1
]
;
this
.
$emit
(
'search'
,
this
.
form
)
;
},
reset
()
{
this
.
uploadRange
=
[]
this
.
cancelRange
=
[]
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
this
.
uploadRange
=
[]
;
this
.
cancelRange
=
[]
;
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
},
}
}
...
...
src/views/history/deviceLinkStatus/index.vue
View file @
b936d57d
...
...
@@ -4,11 +4,18 @@
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
/>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"toDelete"
>
删除
</delids
>
<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=
"isPermit==false ? 'primary' : 'info'"
:disabled=
"isPermit"
@
click=
"delAll"
>
清空数据
</el-button>
<el-button
:type=
"isPermit == false ? 'primary' : 'info'"
:disabled=
"isPermit"
@
click=
"delAll"
>
清空数据
</el-button
>
</div>
</div>
<div
v-if=
"isQuery"
>
...
...
@@ -61,13 +68,13 @@ import {
ConnectStatusList
,
ConnectStatusDelete
,
ConnectStatusDeleteAll
}
from
'../api'
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
search
from
'./components/search.vue'
import
{
exportConnectStatusHistory
}
from
'@/api/export'
import
download
from
'@/utils/download'
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
import
{
mapState
}
from
'vuex'
}
from
'../api'
;
import
{
ConnectStatusEnum
}
from
'@/const/index'
;
import
search
from
'./components/search.vue'
;
import
{
exportConnectStatusHistory
}
from
'@/api/export'
;
import
download
from
'@/utils/download'
;
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
;
import
{
mapState
}
from
'vuex'
;
export
default
{
components
:
{
...
...
@@ -94,35 +101,40 @@ export default {
...
mapState
(
'user'
,
[
'userBaseInfo'
]),
isPermit
()
{
if
(
this
.
userBaseInfo
.
userId
===
1
)
{
return
false
return
false
;
}
else
{
return
true
return
true
;
}
}
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
methods
:
{
// 多选操作
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
)
this
.
multipleSelection
=
deleteIds
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
)
;
this
.
multipleSelection
=
deleteIds
;
},
// 分页更改
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
current
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
;
},
// 刷新
refresh
()
{
this
.
$refs
.
reset
!==
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
()
:
this
.
getTableData
()
;
},
// 查询
search
(
option
)
{
this
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
// 获取数据
getTableData
()
{
let
params
=
{
...
this
.
params
,
...
...
@@ -132,27 +144,29 @@ export default {
let
list
=
res
.
records
||
[]
list
.
forEach
((
item
)
=>
{
item
.
pointConnectStatus_text
=
this
.
ConnectStatusEnum
[
item
.
pointConnectStatus
]
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
)
if
(
this
.
istrue
===
1
)
{
if
(
this
.
tableData
.
length
!==
0
)
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
}
else
{
warningAlert
(
'查询结果为空'
)
warningAlert
(
'查询结果为空'
)
;
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
})
},
// 删除
toDelete
()
{
ConnectStatusDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
getTableData
()
this
.
$message
.
success
(
'删除成功!'
)
;
this
.
getTableData
()
;
})
},
// 清空
delAll
()
{
this
.
$confirm
(
'继续操作将永久删除, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
...
...
@@ -160,36 +174,38 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
ConnectStatusDeleteAll
().
then
((
res
)
=>
{
this
.
$message
.
success
(
'清空成功!'
)
this
.
getTableData
()
this
.
$message
.
success
(
'清空成功!'
)
;
this
.
getTableData
()
;
})
}).
catch
(()
=>
{
warningAlert
(
'取消删除'
)
warningAlert
(
'取消删除'
)
;
})
},
// 表格背景
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
pointConnectStatus_text
===
'连接异常'
&&
column
.
label
===
'连接状态'
)
{
return
'emergency'
return
'emergency'
;
}
else
if
(
row
.
pointConnectStatus_text
===
'连接正常'
&&
column
.
label
===
'连接状态'
)
{
return
'normal'
return
'normal'
;
}
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
'stripe'
;
}
},
// 导出
toExport
()
{
if
(
this
.
exids
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无数据'
)
return
false
this
.
$message
.
warning
(
'暂无数据'
)
;
return
false
;
}
else
{
exportConnectStatusHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备连接历史状态.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`设备连接历史状态.xls`
)
;
})
}
}
...
...
@@ -207,20 +223,18 @@ export default {
&
:
:
v-deep
.
cell
{
color
:
#333333
;
}
&
:
:
v-deep
.
stripe
{
background-color
:
#eaf1fe
;
}
&
:
:
v-deep
.
emergency
{
background-color
:
#f00
!
important
;
background-color
:
#f00
!
important
;
}
&
:
:
v-deep
.
important
{
background-color
:
#f89850
!
important
;
background-color
:
#f89850
!
important
;
}
&
:
:
v-deep
.
normal
{
background-color
:
green
!
important
;
background-color
:
green
!
important
;
}
.page
{
display
:
flex
;
align-items
:
center
;
...
...
src/views/history/leakyCableRepair/components/search.vue
View file @
b936d57d
...
...
@@ -31,8 +31,8 @@
</
template
>
<
script
>
import
{
commonQuery
}
from
'../../api'
import
{
alarmLeval
}
from
'@/const'
import
{
commonQuery
}
from
'../../api'
;
import
{
alarmLeval
}
from
'@/const'
;
export
default
{
name
:
'search'
,
...
...
@@ -45,20 +45,20 @@ export default {
}
},
mounted
()
{
this
.
getInit
()
this
.
getInit
()
;
},
methods
:
{
toSearch
()
{
this
.
$emit
(
'search'
,
this
.
form
)
this
.
$emit
(
'search'
,
this
.
form
)
;
},
reset
()
{
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
},
getInit
()
{
commonQuery
().
then
(
res
=>
{
this
.
siteList
=
res
.
siteList
||
[]
this
.
alarmObj
=
res
.
alarmObjectList
||
[]
this
.
siteList
=
res
.
siteList
||
[]
;
this
.
alarmObj
=
res
.
alarmObjectList
||
[]
;
})
}
}
...
...
src/views/history/leakyCableRepair/index.vue
View file @
b936d57d
...
...
@@ -67,12 +67,13 @@
</div>
</template>
<
script
>
import
{
MonitorMaintainList
,
MonitorMaintainDelete
}
from
'../api'
import
search
from
'./components/search.vue'
import
download
from
'@/utils/download'
import
{
exportLeakyMaintainHistory
}
from
'@/api/export'
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
import
{
levelStyle
}
from
'@/const/index'
import
{
MonitorMaintainList
,
MonitorMaintainDelete
}
from
'../api'
;
import
search
from
'./components/search.vue'
;
import
download
from
'@/utils/download'
;
import
{
exportLeakyMaintainHistory
}
from
'@/api/export'
;
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
;
import
{
levelStyle
}
from
'@/const/index'
;
export
default
{
components
:
{
search
...
...
@@ -95,77 +96,85 @@ export default {
}
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
methods
:
{
// 多选操作
handleSelectionChange
(
val
)
{
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
)
this
.
multipleSelection
=
deleteIds
let
deleteIds
=
val
.
map
((
item
)
=>
item
.
id
)
;
this
.
multipleSelection
=
deleteIds
;
},
// 分页更改
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
current
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
;
},
// 刷新
refresh
()
{
this
.
$refs
.
reset
!==
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
()
:
this
.
getTableData
()
;
},
// 查询
search
(
option
)
{
this
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
// 获取数据
getTableData
()
{
let
params
=
{
...
this
.
params
,
...
this
.
searchOption
}
MonitorMaintainList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[]
;
list
.
forEach
(
item
=>
{
item
.
alarmInfo
=
JSON
.
parse
(
item
.
alarmInfo
)
item
.
lossValue
=
eval
(
item
.
alarmInfo
.
map
(
k
=>
k
.
lossValue
).
join
(
'+'
))
item
.
alarmInfo
=
JSON
.
parse
(
item
.
alarmInfo
)
;
item
.
lossValue
=
eval
(
item
.
alarmInfo
.
map
(
k
=>
k
.
lossValue
).
join
(
'+'
))
;
})
this
.
tableData
=
list
this
.
total
=
res
.
total
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
;
if
(
this
.
istrue
===
1
)
{
if
(
this
.
tableData
.
length
!==
0
)
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
}
else
{
warningAlert
(
'查询结果为空'
)
warningAlert
(
'查询结果为空'
)
;
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
})
},
// 删除
deleteCable
()
{
MonitorMaintainDelete
({
ids
:
this
.
multipleSelection
}).
then
((
res
)
=>
{
this
.
$message
.
success
(
'删除成功!'
)
this
.
getTableData
()
this
.
$message
.
success
(
'删除成功!'
)
;
this
.
getTableData
()
;
})
},
// 表格背景
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
alarmLevelName
===
'紧急'
&&
column
.
label
===
'告警级别'
)
{
return
'emergency'
return
'emergency'
;
}
else
if
(
row
.
alarmLevelName
===
'重要'
&&
column
.
label
===
'告警级别'
)
{
return
'important'
return
'important'
;
}
else
if
(
row
.
alarmLevelName
===
'一般'
&&
column
.
label
===
'告警级别'
)
{
return
'common'
return
'common'
;
}
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
'stripe'
;
}
},
// 导出
toExport
()
{
if
(
this
.
exids
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无数据'
)
return
false
this
.
$message
.
warning
(
'暂无数据'
)
;
return
false
;
}
else
{
exportLeakyMaintainHistory
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`漏缆监测维修历史.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`漏缆监测维修历史.xls`
)
;
})
}
}
...
...
src/views/history/leakyCableStatus/components/picAnalysis.vue
View file @
b936d57d
...
...
@@ -5,8 +5,18 @@
width=
"1060px"
@
close=
"cancel"
>
<div
v-show=
"listData.length"
ref=
"chartLine"
class=
"chartLine"
:key=
"componentKeys"
></div>
<div
v-show=
"!listData.length"
style=
"font-size:20px;text-align:center"
><i
class=
"el-icon-warning"
style=
"color:orange;margin-right:10px"
/>
暂无数据
</div>
<div
v-show=
"listData.length"
ref=
"chartLine"
class=
"chartLine"
:key=
"componentKeys"
></div>
<div
v-show=
"!listData.length"
style=
"font-size: 20px; text-align: center"
>
<i
class=
"el-icon-warning"
style=
"color: orange; margin-right: 10px"
/>
暂无数据
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"cancel"
>
关 闭
</el-button>
</span>
...
...
@@ -14,8 +24,9 @@
</
template
>
<
script
>
import
{
pictorialStatement
}
from
'../../api.js'
import
*
as
echarts
from
"echarts"
import
{
pictorialStatement
}
from
'../../api.js'
;
import
*
as
echarts
from
"echarts"
;
export
default
{
props
:
{
flag
:
{
...
...
@@ -26,7 +37,7 @@ export default {
type
:
Array
,
default
:
()
=>
[]
}
},
},
data
()
{
return
{
visible
:
false
,
...
...
@@ -39,51 +50,51 @@ export default {
flag
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
visible
=
!!
newV
this
.
visible
=
!!
newV
;
}
},
curInfo
(
newV
)
{
if
(
newV
)
{
this
.
componentKeys
++
this
.
init
()
this
.
componentKeys
++
;
this
.
init
()
;
}
}
},
computed
:{
computed
:
{
finalyText
()
{
return
'驻波比图形分析('
+
this
.
title
+
')'
return
'驻波比图形分析('
+
this
.
title
+
')'
;
}
},
methods
:
{
init
()
{
pictorialStatement
(
this
.
curInfo
).
then
((
res
)
=>
{
if
(
JSON
.
stringify
(
res
.
collect
)
!==
'{}'
)
{
let
keyList
=
Object
.
keys
(
res
.
collect
)
let
valueList
=
Object
.
values
(
res
.
collect
)
let
finallyList
=
[]
this
.
title
=
keyList
.
length
>
1
?
''
:
keyList
[
0
]
if
(
JSON
.
stringify
(
res
.
collect
)
!==
'{}'
)
{
let
keyList
=
Object
.
keys
(
res
.
collect
)
;
let
valueList
=
Object
.
values
(
res
.
collect
)
;
let
finallyList
=
[]
;
this
.
title
=
keyList
.
length
>
1
?
''
:
keyList
[
0
]
;
for
(
var
i
=
0
;
i
<
keyList
.
length
;
i
++
)
{
let
obj
=
{}
let
source
=
[]
let
obj
=
{}
;
let
source
=
[]
;
valueList
[
i
].
map
(
item
=>
{
let
arr
=
[]
arr
.
push
(
parseFloat
(
item
.
distance
),
parseFloat
(
item
.
value
))
source
.
push
(
arr
)
let
arr
=
[]
;
arr
.
push
(
parseFloat
(
item
.
distance
),
parseFloat
(
item
.
value
))
;
source
.
push
(
arr
)
;
})
obj
.
dimensions
=
[
`
${
keyList
[
i
]}
`
]
obj
.
source
=
source
finallyList
.
push
(
obj
)
obj
.
dimensions
=
[
`
${
keyList
[
i
]}
`
]
;
obj
.
source
=
source
;
finallyList
.
push
(
obj
)
;
}
this
.
listData
=
finallyList
finallyList
.
length
?
this
.
getLine
(
finallyList
)
:
''
this
.
listData
=
finallyList
;
finallyList
.
length
?
this
.
getLine
(
finallyList
)
:
''
;
}
else
{
this
.
title
=
''
this
.
listData
=
[]
this
.
title
=
''
;
this
.
listData
=
[]
;
}
})
},
getLine
(
data
)
{
if
(
data
.
length
)
{
if
(
data
.
length
)
{
this
.
myChartLine
=
echarts
.
init
(
this
.
$refs
.
chartLine
)
let
option
=
{
legend
:
{},
...
...
@@ -94,16 +105,16 @@ export default {
let
str
=
params
[
0
].
data
[
0
]
+
"<br />"
params
.
forEach
(
item
=>
{
str
+=
'<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:'
+
item
.
color
+
'"></span>'
+
'<span style="display:inline-block;width:70px;margin-right:5px;">'
+
item
.
seriesName
+
'</span>'
+
" 驻波比"
+
'<span style="font-weight:700;">'
+
item
.
data
[
1
]
+
"</span><br />"
;
+
'<span style="display:inline-block;width:70px;margin-right:5px;">'
+
item
.
seriesName
+
'</span>'
+
" 驻波比"
+
'<span style="font-weight:700;">'
+
item
.
data
[
1
]
+
"</span><br />"
;
})
return
str
;
}
else
{
let
str
=
params
[
0
].
data
[
0
]
+
"<br />"
str
+=
'<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:'
+
params
[
0
].
color
+
'"></span>'
+
'<span style="display:inline-block;width:70px;margin-right:5px;">'
+
params
[
0
].
seriesName
+
'</span>'
+
" 驻波比"
+
'<span style="display:inline-block;width:70px;margin-right:5px;">'
+
params
[
0
].
seriesName
+
'</span>'
+
" 驻波比"
+
'<span style="font-weight:700;">'
+
params
[
0
].
data
[
1
]
+
"</span><br />"
;
return
str
;
}
...
...
@@ -131,7 +142,7 @@ export default {
color
:
"#195384"
,
},
},
},
yAxis
:
[
{
...
...
@@ -188,8 +199,8 @@ export default {
}
},
cancel
()
{
this
.
visible
=
false
this
.
$emit
(
'cancel'
)
this
.
visible
=
false
;
this
.
$emit
(
'cancel'
)
;
}
}
}
...
...
src/views/history/leakyCableStatus/components/search.vue
View file @
b936d57d
...
...
@@ -22,7 +22,8 @@
</
template
>
<
script
>
import
{
commonQuery
}
from
'../../api'
import
{
commonQuery
}
from
'../../api'
;
export
default
{
name
:
'search'
,
data
()
{
...
...
@@ -33,20 +34,20 @@ export default {
}
},
mounted
()
{
this
.
getInit
()
this
.
getInit
()
;
},
methods
:
{
toSearch
()
{
this
.
$emit
(
'search'
,
this
.
form
)
this
.
$emit
(
'search'
,
this
.
form
)
;
},
reset
()
{
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
},
getInit
()
{
commonQuery
().
then
(
res
=>
{
this
.
siteList
=
res
.
siteList
||
[]
this
.
alarmObj
=
res
.
alarmObjectList
||
[]
this
.
siteList
=
res
.
siteList
||
[]
;
this
.
alarmObj
=
res
.
alarmObjectList
||
[]
;
})
}
}
...
...
src/views/history/leakyCableStatus/index.vue
View file @
b936d57d
...
...
@@ -82,18 +82,23 @@ export default {
search
,
picAnalysis
},
mounted
()
{
this
.
getTableData
();
},
methods
:
{
// 图形报表
multiPic
()
{
this
.
flag
=
1
this
.
curInfo
=
this
.
multipleTarget
this
.
flag
=
1
;
this
.
curInfo
=
this
.
multipleTarget
;
},
// 生成图表
generateChart
(
row
)
{
this
.
curInfo
=
[]
this
.
flag
=
1
this
.
curInfo
.
push
(
row
.
alarmTarget
)
this
.
curInfo
=
[]
;
this
.
flag
=
1
;
this
.
curInfo
.
push
(
row
.
alarmTarget
)
;
},
cancel
()
{
this
.
flag
=
0
this
.
flag
=
0
;
},
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
...
...
@@ -157,9 +162,7 @@ export default {
}
},
},
mounted
()
{
this
.
getTableData
();
},
};
</
script
>
...
...
src/views/login/index.vue
View file @
b936d57d
...
...
@@ -69,23 +69,25 @@
class=
"loginbtn"
style=
"width: 100%; margin-top: 30px; margin-bottom: 30px"
@
click
.
native
.
prevent=
"handleLogin"
>
登录
</el-button>
>
登录
</el-button
>
</el-form>
</div>
</div>
</
template
>
<
script
>
import
{
login
}
from
'@/api/user'
import
{
setToken
,
setUserName
}
from
'@/utils/auth'
import
{
login
}
from
'@/api/user'
;
import
{
setToken
,
setUserName
}
from
'@/utils/auth'
;
export
default
{
name
:
'Login'
,
data
()
{
const
validatePassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<
6
)
{
callback
(
new
Error
(
'密码不能少于6位'
))
callback
(
new
Error
(
'密码不能少于6位'
))
;
}
else
{
callback
()
callback
()
;
}
}
return
{
...
...
@@ -108,35 +110,35 @@ export default {
},
watch
:
{
$route
:
{
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
handler
:
function
(
route
)
{
this
.
redirect
=
route
.
query
&&
route
.
query
.
redirect
;
},
immediate
:
true
}
},
created
()
{
var
that
=
this
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
===
13
)
{
that
.
handleLogin
()
that
.
handleLogin
()
;
}
}
},
methods
:
{
// 显示密码
showPwd
()
{
if
(
this
.
passwordType
===
'password'
)
{
this
.
passwordType
=
''
this
.
passwordType
=
''
;
}
else
{
this
.
passwordType
=
'password'
this
.
passwordType
=
'password'
;
}
this
.
$nextTick
(()
=>
{
this
.
$refs
.
password
.
focus
()
this
.
$refs
.
password
.
focus
()
;
})
},
async
toLogin
()
{
const
{
username
,
password
}
=
this
.
loginForm
const
{
username
,
password
}
=
this
.
loginForm
;
const
{
token
,
userId
}
=
await
login
(
{
userName
:
username
,
...
...
@@ -147,19 +149,18 @@ export default {
}
)
if
(
!
token
)
return
this
.
$store
.
commit
(
'user/SET_TOKEN'
,
token
)
this
.
$store
.
commit
(
'user/SET_USERID'
,
userId
)
// this.$store.dispatch('user/getInfo')
setToken
(
token
)
this
.
$router
.
push
({
path
:
'/'
})
this
.
$store
.
commit
(
'user/SET_TOKEN'
,
token
);
this
.
$store
.
commit
(
'user/SET_USERID'
,
userId
);
setToken
(
token
);
this
.
$router
.
push
({
path
:
'/'
});
},
handleLogin
()
{
this
.
$refs
.
loginForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
setUserName
(
this
.
loginForm
.
username
)
this
.
toLogin
()
setUserName
(
this
.
loginForm
.
username
)
;
this
.
toLogin
()
;
}
else
{
return
false
return
false
;
}
})
}
...
...
@@ -226,8 +227,7 @@ $light_gray: #eee;
.login-container
{
min-height
:
100%
;
width
:
100%
;
// background-color: $bg;
background-image
:
url("../../assets/img/login.png")
;
background-image
:
url('../../assets/img/login.png')
;
background-repeat
:
no-repeat
;
background-size
:
100%
100%
;
overflow
:
hidden
;
...
...
@@ -243,8 +243,7 @@ $light_gray: #eee;
transform
:
translateY
(
-82px
);
margin
:
0
;
box-sizing
:
border-box
;
font-family
:
"Source Sans Pro"
,
sans-serif
;
// background-image: url('../../assets/img/loginTitleBg.png');
font-family
:
'Source Sans Pro'
,
sans-serif
;
}
.loginBox
{
position
:
absolute
;
...
...
@@ -256,13 +255,11 @@ $light_gray: #eee;
width
:
464px
;
height
:
380px
;
background
:
rgba
(
0
,
0
,
0
,
0
.4
);
margin
:
0
;
padding
:
33px
21px
40px
;
box-sizing
:
border-box
;
border-radius
:
20px
;
font-family
:
"Source Sans Pro"
,
sans-serif
;
font-family
:
'Source Sans Pro'
,
sans-serif
;
.loginbtn
{
background
:
linear-gradient
(
180deg
,
#4082ff
0%
,
#0044c7
100%
);
color
:
#ffffff
;
...
...
@@ -276,7 +273,6 @@ $light_gray: #eee;
.login-form
{
position
:
relative
;
width
:
80%
;
padding
:
0px
;
margin
:
0
auto
;
overflow
:
hidden
;
...
...
@@ -286,14 +282,12 @@ $light_gray: #eee;
font-size
:
14px
;
color
:
#fff
;
margin-bottom
:
10px
;
span
{
&
:first-of-type
{
margin-right
:
16px
;
}
}
}
.svg-container
{
padding
:
4px
5px
10px
15px
;
color
:
$dark_gray
;
...
...
@@ -301,19 +295,16 @@ $light_gray: #eee;
width
:
30px
;
display
:
inline-block
;
}
.title-container
{
position
:
relative
;
margin-top
:
15px
;
margin-bottom
:
32px
;
.title
{
font-family
:
"Source Han Sans CN"
;
font-family
:
'Source Han Sans CN'
;
font-size
:
24px
;
color
:
$light_gray
;
margin
:
0px
auto
10px
auto
;
text-align
:
center
;
// font-weight: bold;
letter-spacing
:
5px
;
}
.titeng
{
...
...
@@ -344,18 +335,16 @@ $light_gray: #eee;
border-radius
:
20px
;
margin-top
:
50px
;
}
</
style
>
<
style
>
/* 自动填充样式修改 */
.login-container
.el-input
input
:-webkit-autofill
{
-webkit-box-shadow
:
0
0
0px
1000px
transparent
inset
!important
;
box-shadow
:
0
0
0px
1000px
transparent
inset
!important
;
/* 自动填充样式修改 */
.login-container
.el-input
input
:-webkit-autofill
{
-webkit-box-shadow
:
0
0
0px
1000px
transparent
inset
!important
;
box-shadow
:
0
0
0px
1000px
transparent
inset
!important
;
}
input
:-internal-autofill-previewed
,
input
:-internal-autofill-selected
{
-webkit-text-fill-color
:
#
FFFFFF
!important
;
-webkit-text-fill-color
:
#
ffffff
!important
;
transition
:
background-color
5000s
ease-in-out
0s
!important
;
}
</
style
>
src/views/maintain/api.js
View file @
b936d57d
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
;
const
path
=
{
cableTypeEnum
:
'equipParam/selectItem'
,
...
...
@@ -7,13 +7,13 @@ const path = {
}
export
function
cableTypeEnum
()
{
return
request
.
post
(
path
.
cableTypeEnum
,
...
arguments
)
return
request
.
post
(
path
.
cableTypeEnum
,
...
arguments
)
;
}
export
function
saveParam
()
{
return
request
.
post
(
path
.
saveParam
,
...
arguments
)
return
request
.
post
(
path
.
saveParam
,
...
arguments
)
;
}
export
function
selectEquipByType
()
{
return
request
.
post
(
path
.
selectEquipByType
,
...
arguments
)
return
request
.
post
(
path
.
selectEquipByType
,
...
arguments
)
;
}
src/views/maintain/oneself/index.vue
View file @
b936d57d
...
...
@@ -2,12 +2,27 @@
<div
class=
"oneself"
>
<div
class=
"content"
>
<div
class=
"content-title"
>
温馨提示:系统如无异常,请勿操作此界面
</div>
<el-form
ref=
"form1"
:model=
"formData1"
:rules=
"rules1"
label-width=
"180px"
class=
"content-form"
>
<el-form
ref=
"form1"
:model=
"formData1"
:rules=
"rules1"
label-width=
"180px"
class=
"content-form"
>
<el-form-item
label=
"服务器IP地址:"
prop=
"ip"
>
<el-input
v-model=
"formData1.ip"
style=
"width: 300px"
placeholder=
"请输入服务器IP地址"
/>
<el-input
v-model=
"formData1.ip"
style=
"width: 300px"
placeholder=
"请输入服务器IP地址"
/>
</el-form-item>
<el-form-item
label=
"基站名称:"
prop=
"baseStation"
>
<el-select
v-model=
"formData1.baseStation"
style=
"width: 300px"
filterable
placeholder=
"请选择基站"
>
<el-select
v-model=
"formData1.baseStation"
style=
"width: 300px"
filterable
placeholder=
"请选择基站"
>
<el-option
v-for=
"item in baseStationList"
:key=
"item.value"
...
...
@@ -17,7 +32,12 @@
</el-select>
</el-form-item>
<el-form-item
label=
"FSU:"
prop=
"fsu"
>
<el-select
v-model=
"formData1.fsu"
style=
"width: 300px"
filterable
placeholder=
"请选择FSU"
>
<el-select
v-model=
"formData1.fsu"
style=
"width: 300px"
filterable
placeholder=
"请选择FSU"
>
<el-option
v-for=
"item in fsuList"
:key=
"item.value"
...
...
@@ -27,7 +47,12 @@
</el-select>
</el-form-item>
<el-form-item
label=
"设备类型配置:"
prop=
"type"
>
<el-select
v-model=
"formData1.type"
style=
"width: 300px"
filterable
placeholder=
"请选择设备类型配置"
>
<el-select
v-model=
"formData1.type"
style=
"width: 300px"
filterable
placeholder=
"请选择设备类型配置"
>
<el-option
v-for=
"item in typeList"
:key=
"item.value"
...
...
@@ -37,33 +62,58 @@
</el-select>
</el-form-item>
</el-form>
<el-form
ref=
"form2"
:model=
"formData2"
:rules=
"rules2"
label-width=
"180px"
class=
"content-form"
>
<el-form
ref=
"form2"
:model=
"formData2"
:rules=
"rules2"
label-width=
"180px"
class=
"content-form"
>
<el-form-item
label=
"设备配置下发:"
prop=
"type"
>
<div
class=
"content-form-right"
>
<el-radio-group
v-model=
"formData2.type"
>
<el-row
style=
"margin-bottom: 10px"
>
<el-radio
:label=
"1"
>
复位重启FSU
</el-radio>
<el-radio
:label=
"2"
>
常规测试>>次数
<el-input-number
v-model=
"formData2.routineNum"
:min=
"1"
/>
<el-radio
:label=
"2"
>
常规测试>>次数
<el-input-number
v-model=
"formData2.routineNum"
:min=
"1"
/>
</el-radio>
</el-row>
<el-row>
<el-radio
:label=
"3"
>
请求实时连接
</el-radio>
<el-radio
:label=
"4"
>
自检测试>>次数
<el-input-number
v-model=
"formData2.selfNum"
:min=
"1"
/>
<el-radio
:label=
"4"
>
自检测试>>次数
<el-input-number
v-model=
"formData2.selfNum"
:min=
"1"
/>
</el-radio>
</el-row>
</el-radio-group>
<div
class=
"btn"
>
<el-button
style=
"width: 120px"
type=
"primary"
:loading=
"loading3"
@
click=
"sendContent"
>
发送查询内容
</el-button>
<el-button
style=
"width: 120px"
type=
"primary"
:loading=
"loading3"
@
click=
"sendContent"
>
发送查询内容
</el-button
>
</div>
</div>
</el-form-item>
</el-form>
<el-form
ref=
"form3"
:model=
"formData3"
:rules=
"rules3"
label-width=
"180px"
class=
"content-form"
>
<el-form
ref=
"form3"
:model=
"formData3"
:rules=
"rules3"
label-width=
"180px"
class=
"content-form"
>
<el-form-item
label=
"设备运行参数配置下发:"
prop=
"issue"
>
<div
class=
"content-form-right"
>
<el-select
v-model=
"formData3.issue"
style=
"width: 300px"
filterable
placeholder=
"请选择配置下发类型"
>
<el-select
v-model=
"formData3.issue"
style=
"width: 300px"
filterable
placeholder=
"请选择配置下发类型"
>
<el-option
v-for=
"item in issueList"
:key=
"item.value"
...
...
@@ -72,7 +122,13 @@
/>
</el-select>
<div
class=
"btn"
>
<el-button
style=
"width: 120px"
type=
"primary"
:loading=
"loading3"
@
click=
"sendData"
>
发送数据
</el-button>
<el-button
style=
"width: 120px"
type=
"primary"
:loading=
"loading3"
@
click=
"sendData"
>
发送数据
</el-button
>
</div>
</div>
</el-form-item>
...
...
@@ -109,7 +165,6 @@ export default {
type
:
[
{
required
:
true
,
message
:
'请选择设备配置类型'
,
trigger
:
'blur'
}
]
},
formData2
:
{
type
:
1
,
...
...
@@ -136,14 +191,12 @@ export default {
sendContent
()
{
this
.
$refs
.
form2
.
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
this
.
formData2
)
}
})
},
sendData
()
{
this
.
$refs
.
form3
.
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
this
.
formData3
)
}
})
}
...
...
@@ -170,11 +223,11 @@ export default {
margin-bottom
:
20px
;
}
.content-form
{
margin
:
0
auto
;
margin
:
0
auto
;
// padding: 20px 0;
width
:
800px
;
.content-form-right
{
border
:
1px
solid
#
DCDFE
6
;
border
:
1px
solid
#
dcdfe
6
;
padding
:
20px
;
border-radius
:
10px
;
display
:
flex
;
...
...
@@ -189,7 +242,7 @@ export default {
.tips
{
text-align
:
center
;
padding-top
:
50px
;
color
:
#1
E64F
6
;
color
:
#1
e64f
6
;
font-size
:
18px
;
font-weight
:
500
;
}
...
...
src/views/maintain/parameter/index.vue
View file @
b936d57d
...
...
@@ -52,8 +52,9 @@
</
template
>
<
script
>
import
{
rules
}
from
'./const'
import
{
cableTypeEnum
,
saveParam
,
selectEquipByType
}
from
'../api'
import
{
rules
}
from
'./const'
;
import
{
cableTypeEnum
,
saveParam
,
selectEquipByType
}
from
'../api'
;
export
default
{
data
()
{
return
{
...
...
@@ -69,27 +70,27 @@ export default {
}
},
mounted
()
{
this
.
getLeakyCablel
()
this
.
getLeakyCablel
()
;
},
methods
:
{
submit
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
saveParam
(
this
.
form
).
then
(
res
=>
{
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
;
})
}
})
},
getLeakyCablel
()
{
cableTypeEnum
().
then
(
res
=>
{
let
list
=
res
||
[]
this
.
equipTypeList
=
list
let
list
=
res
||
[]
;
this
.
equipTypeList
=
list
;
})
},
checkMode
(
data
)
{
selectEquipByType
({
equipType
:
data
}).
then
(
res
=>
{
this
.
form
=
res
this
.
form
=
res
;
})
},
}
...
...
@@ -132,5 +133,4 @@ export default {
}
}
}
</
style
>
src/views/monitor/equipment/components/search.vue
View file @
b936d57d
...
...
@@ -22,7 +22,8 @@
</
template
>
<
script
>
import
{
ConnectStatusEnum
}
from
'@/const/index'
import
{
ConnectStatusEnum
}
from
'@/const/index'
;
export
default
{
name
:
'search'
,
data
()
{
...
...
@@ -31,16 +32,13 @@ export default {
ConnectStatusEnum
,
}
},
mounted
()
{
},
methods
:
{
toSearch
()
{
this
.
$emit
(
'search'
,
this
.
form
)
this
.
$emit
(
'search'
,
this
.
form
)
;
},
reset
()
{
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
},
}
}
...
...
src/views/monitor/equipment/index.vue
View file @
b936d57d
...
...
@@ -56,12 +56,13 @@
</
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
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
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
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
;
export
default
{
components
:
{
search
},
data
()
{
...
...
@@ -80,7 +81,7 @@ export default {
}
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
methods
:
{
// 表格背景图颜色
...
...
@@ -89,44 +90,43 @@ export default {
row
.
startPointConnectStatus_text
===
'连接正常'
&&
column
.
property
===
'startPointConnectStatus_text'
)
{
return
'green'
return
'green'
;
}
if
(
row
.
startPointConnectStatus_text
===
'连接异常'
&&
column
.
property
===
'startPointConnectStatus_text'
)
{
return
'red'
return
'red'
;
}
if
(
row
.
endPointConnectStatus_text
===
'连接正常'
&&
column
.
property
===
'endPointConnectStatus_text'
)
{
return
'green'
return
'green'
;
}
else
if
(
row
.
endPointConnectStatus_text
===
'连接异常'
&&
column
.
property
===
'endPointConnectStatus_text'
)
{
return
'red'
return
'red'
;
}
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
'stripe'
;
}
},
refresh
()
{
this
.
$refs
.
reset
!==
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
()
:
this
.
getTableData
()
;
},
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
current
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
()
;
},
search
(
option
)
{
this
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
getTableData
()
{
let
params
=
{
...
...
@@ -134,33 +134,33 @@ export default {
...
this
.
searchOption
}
DeviceStatusList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
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
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
)
;
if
(
this
.
istrue
===
1
)
{
if
(
this
.
tableData
.
length
!==
0
)
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
}
else
{
warningAlert
(
'查询结果为空'
)
warningAlert
(
'查询结果为空'
)
;
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
})
},
toExport
()
{
if
(
this
.
exids
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无数据'
)
return
false
this
.
$message
.
warning
(
'暂无数据'
)
;
return
false
;
}
else
{
exportConnetTime
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`设备实时.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`设备实时.xls`
)
;
})
}
}
...
...
src/views/monitor/leakageCable/components/search.vue
View file @
b936d57d
...
...
@@ -31,8 +31,8 @@
</
template
>
<
script
>
import
{
commonQuery
}
from
'@/views/history/api'
import
{
alarmLeval
}
from
'@/const'
import
{
commonQuery
}
from
'@/views/history/api'
;
import
{
alarmLeval
}
from
'@/const'
;
export
default
{
name
:
'search'
,
...
...
@@ -44,19 +44,19 @@ export default {
}
},
mounted
()
{
this
.
getInit
()
this
.
getInit
()
;
},
methods
:
{
toSearch
()
{
this
.
$emit
(
'search'
,
this
.
form
)
this
.
$emit
(
'search'
,
this
.
form
)
;
},
reset
()
{
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
},
getInit
()
{
commonQuery
().
then
(
res
=>
{
this
.
siteList
=
res
.
siteList
||
[]
this
.
siteList
=
res
.
siteList
||
[]
;
})
}
}
...
...
src/views/monitor/leakageCable/index.vue
View file @
b936d57d
...
...
@@ -64,12 +64,13 @@
</template>
<
script
>
import
{
CableStatusList
}
from
'../api'
import
{
ConnectStatusEnum
,
levelStyle
}
from
'@/const/index'
import
search
from
'./components/search.vue'
import
{
exportLeakyCableTime
}
from
'@/api/export'
import
download
from
'@/utils/download'
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
import
{
CableStatusList
}
from
'../api'
;
import
{
ConnectStatusEnum
,
levelStyle
}
from
'@/const/index'
;
import
search
from
'./components/search.vue'
;
import
{
exportLeakyCableTime
}
from
'@/api/export'
;
import
download
from
'@/utils/download'
;
import
{
successAlert
,
warningAlert
}
from
'@/utils/alert'
;
export
default
{
components
:
{
search
},
data
()
{
...
...
@@ -95,33 +96,33 @@ export default {
// 表格背景图颜色
cellClassFn
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
row
.
alarmLevelName
===
'紧急'
&&
column
.
label
===
'告警级别'
)
{
return
'emergency'
return
'emergency'
;
}
else
if
(
row
.
alarmLevelName
===
'重要'
&&
column
.
label
===
'告警级别'
)
{
return
'important'
return
'important'
;
}
else
if
(
row
.
alarmLevelName
===
'一般'
&&
column
.
label
===
'告警级别'
)
{
return
'common'
return
'common'
;
}
else
if
(
row
.
alarmLevelName
===
'正常'
&&
column
.
label
===
'告警级别'
)
{
return
'normal'
return
'normal'
;
}
if
(
rowIndex
%
2
===
1
)
{
return
'stripe'
return
'stripe'
;
}
},
refresh
()
{
this
.
searchOption
=
{}
this
.
$refs
.
reset
!==
undefined
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
()
:
this
.
getTableData
()
;
},
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
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
getTableData
()
{
let
params
=
{
...
...
@@ -129,33 +130,33 @@ export default {
...
this
.
searchOption
,
}
CableStatusList
(
params
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[]
this
.
tableData
=
list
let
list
=
res
.
records
||
[]
;
this
.
tableData
=
list
;
list
.
forEach
(
item
=>
{
if
(
item
.
alarmInfo
!==
''
&&
item
.
alarmInfo
!=
null
)
{
item
.
alarmInfo
=
JSON
.
parse
(
item
.
alarmInfo
)
item
.
lossValue
=
eval
(
item
.
alarmInfo
.
map
(
k
=>
k
.
lossValue
).
join
(
'+'
))
item
.
alarmInfo
=
JSON
.
parse
(
item
.
alarmInfo
)
;
item
.
lossValue
=
eval
(
item
.
alarmInfo
.
map
(
k
=>
k
.
lossValue
).
join
(
'+'
))
;
}
})
this
.
total
=
res
.
records
.
length
this
.
exids
=
list
.
map
(
i
=>
i
.
id
)
this
.
total
=
res
.
records
.
length
;
this
.
exids
=
list
.
map
(
i
=>
i
.
id
)
;
if
(
this
.
istrue
===
1
)
{
if
(
this
.
tableData
.
length
!==
0
)
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
}
else
{
warningAlert
(
'查询结果为空'
)
warningAlert
(
'查询结果为空'
)
;
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
})
},
toExport
()
{
if
(
this
.
exids
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无数据'
)
return
false
this
.
$message
.
warning
(
'暂无数据'
)
;
return
false
;
}
else
{
exportLeakyCableTime
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
'vnd.ms-excel'
,
`漏缆实时.xls`
)
download
(
res
,
'vnd.ms-excel'
,
`漏缆实时.xls`
)
;
})
}
}
...
...
src/views/setting/add/comp/FSU.vue
View file @
b936d57d
...
...
@@ -112,7 +112,7 @@
/>
</el-form-item>
</el-form>
<div
class=
"btn"
v-if=
"isEdit
==
1"
>
<div
class=
"btn"
v-if=
"isEdit
==
1"
>
<el-button
type=
"primary"
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
</div>
...
...
@@ -133,14 +133,14 @@ export default {
},
curInfo
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
},
watch
:
{
curInfo
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
FSUForm
=
formInit
(
newV
)
this
.
FSUForm
=
formInit
(
newV
)
;
}
}
},
...
...
@@ -205,14 +205,14 @@ export default {
},
created
()
{
selectFsuItem
().
then
((
res
)
=>
{
this
.
backupModeSelect
=
res
[
"01"
]
this
.
connectModeSelect
=
res
[
"02"
]
this
.
equipTypeSelect
=
res
[
"03"
]
this
.
equipSubTypeSelect
=
res
[
"04"
]
this
.
backupModeSelect
=
res
[
"01"
]
;
this
.
connectModeSelect
=
res
[
"02"
]
;
this
.
equipTypeSelect
=
res
[
"03"
]
;
this
.
equipSubTypeSelect
=
res
[
"04"
]
;
})
},
mounted
()
{
this
.
getAllWay
()
this
.
getAllWay
()
;
},
methods
:
{
// 编辑的确认
...
...
@@ -220,17 +220,17 @@ export default {
let
params
=
{
...
this
.
FSUForm
}
delete
params
.
creationTime
delete
params
.
creationTime
;
updateFsuConf
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
;
}
this
.
cancel
(
true
)
this
.
cancel
(
true
)
;
})
},
cancel
(
refersh
)
{
this
.
$emit
(
'update'
,
refersh
)
this
.
reset
()
this
.
$emit
(
'update'
,
refersh
)
;
this
.
reset
()
;
},
changerailWay
()
{
selectForSite
({
wayId
:
this
.
FSUForm
.
wayId
}).
then
((
res
)
=>
{
...
...
@@ -239,34 +239,34 @@ export default {
},
readNodes
(
aaa
=
[],
arrarea
=
[])
{
for
(
let
item
of
aaa
)
{
arrarea
.
push
({
id
:
item
.
id
,
siteName
:
item
.
name
})
arrarea
.
push
({
id
:
item
.
id
,
siteName
:
item
.
name
})
;
if
(
item
.
children
)
{
this
.
readNodes
(
item
.
children
,
arrarea
)
this
.
readNodes
(
item
.
children
,
arrarea
)
;
}
}
return
arrarea
return
arrarea
;
},
reset
()
{
this
.
$refs
.
FSUForm
.
resetFields
()
this
.
$refs
.
FSUForm
.
resetFields
()
;
},
submit
()
{
this
.
$refs
.
FSUForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
FSUForm
.
parentId
=
this
.
FSUForm
.
siteId
this
.
FSUForm
.
fsuPort
=
Number
(
this
.
FSUForm
.
fsuPort
)
this
.
FSUForm
.
parentId
=
this
.
FSUForm
.
siteId
;
this
.
FSUForm
.
fsuPort
=
Number
(
this
.
FSUForm
.
fsuPort
)
;
fsusave
(
this
.
FSUForm
).
then
((
res
)
=>
{
successAlert
(
'操作成功'
)
successAlert
(
'操作成功'
)
;
})
}
this
.
FSUForm
=
formInit
()
this
.
FSUForm
=
formInit
()
;
})
},
getAllWay
()
{
railWaylist
(
this
.
params
).
then
((
res
)
=>
{
this
.
railWaySelect
=
res
.
records
||
[]
this
.
railWaySelect
=
res
.
records
||
[]
;
if
(
res
.
total
>
this
.
params
.
size
)
{
this
.
params
.
size
=
res
.
total
this
.
getAllWay
()
this
.
params
.
size
=
res
.
total
;
this
.
getAllWay
()
;
}
})
}
...
...
src/views/setting/add/comp/leakyCable.vue
View file @
b936d57d
...
...
@@ -144,6 +144,7 @@ import {
updateLeakyCableConf
}
from
"../../api"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
props
:
{
isEdit
:
{
...
...
@@ -159,7 +160,7 @@ export default {
curInfo
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
leakyCableForm
=
formInit
(
newV
)
this
.
leakyCableForm
=
formInit
(
newV
)
;
}
}
},
...
...
@@ -182,13 +183,9 @@ export default {
equipId
:
[
{
required
:
true
,
message
:
"请选择监测设备"
,
trigger
:
"blur"
},
],
antennaFeederLength
:
[
{
required
:
true
,
message
:
"请输入天馈线长度"
,
trigger
:
"blur"
},
],
// hundredMetersLoss: [
// { required: true, message: "请输入漏缆百米损耗", trigger: "blur" },
// ],
inserterLength
:
[
{
required
:
true
,
message
:
"请输入插入器长度"
,
trigger
:
"blur"
},
],
...
...
@@ -228,7 +225,9 @@ export default {
},
};
},
computed
:
{},
mounted
()
{
this
.
getAllWay
();
},
methods
:
{
// 编辑的确认
confirm
()
{
...
...
@@ -244,8 +243,8 @@ export default {
})
},
cancel
(
refersh
)
{
this
.
$emit
(
'update'
,
refersh
)
this
.
reset
()
this
.
$emit
(
'update'
,
refersh
)
;
this
.
reset
()
;
},
changerailWay
()
{
...
...
@@ -269,7 +268,6 @@ export default {
submit
()
{
this
.
$refs
.
leakyCableForm
.
validate
((
valid
)
=>
{
if
(
valid
)
{
console
.
log
(
this
.
leakyCableForm
);
this
.
leakyCableForm
.
parentId
=
this
.
leakyCableForm
.
equipId
;
leakyCablesave
(
this
.
leakyCableForm
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
...
...
@@ -292,10 +290,8 @@ export default {
});
},
},
mounted
()
{
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
parentId
:
""
,
...
...
src/views/setting/add/comp/line.vue
View file @
b936d57d
...
...
@@ -118,7 +118,7 @@
/>
</el-form-item>
</el-form>
<div
class=
"btn"
v-if=
"isEdit
==
1"
>
<div
class=
"btn"
v-if=
"isEdit
==
1"
>
<el-button
type=
"primary"
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
</div>
...
...
@@ -138,22 +138,23 @@ import {
updateFeederConf
}
from
"../../api"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
props
:
{
props
:
{
isEdit
:
{
type
:
Number
,
default
:
0
},
curInfo
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
},
watch
:
{
curInfo
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
leakyCableForm
=
formInit
(
newV
)
this
.
leakyCableForm
=
formInit
(
newV
)
;
}
}
},
...
...
@@ -179,9 +180,6 @@ export default {
feederLength
:
[
{
required
:
true
,
message
:
"请输入天馈线长度"
,
trigger
:
"blur"
},
],
// feederLossMeters: [
// { required: true, message: "请输入天馈线百米损耗", trigger: "blur" },
// ],
inserterLength
:
[
{
required
:
true
,
message
:
"请输入插入器长度"
,
trigger
:
"blur"
},
],
...
...
@@ -218,6 +216,9 @@ export default {
},
};
},
mounted
()
{
this
.
getAllWay
();
},
methods
:
{
// 编辑的确认
confirm
()
{
...
...
@@ -226,15 +227,15 @@ export default {
}
delete
params
.
creationTime
updateFeederConf
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
;
}
this
.
cancel
(
true
)
this
.
cancel
(
true
)
;
})
},
cancel
(
refersh
)
{
this
.
$emit
(
'update'
,
refersh
)
this
.
reset
()
this
.
$emit
(
'update'
,
refersh
)
;
this
.
reset
()
;
},
changerailWay
()
{
selectForSite
({
wayId
:
this
.
leakyCableForm
.
wayId
}).
then
((
res
)
=>
{
...
...
@@ -278,10 +279,8 @@ export default {
});
},
},
mounted
()
{
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
parentId
:
""
,
...
...
src/views/setting/add/comp/monitorEquip.vue
View file @
b936d57d
...
...
@@ -99,29 +99,6 @@
placeholder=
"请输入设备所在铁路公里标"
/>
</el-form-item>
<!--
<el-form-item
label=
"安装日期:"
prop=
"installDate"
>
<el-date-picker
v-model=
"monitorForm.installDate"
type=
"datetime"
placeholder=
"请选择安装日期"
format=
"yyyy-MM-dd HH:mm:ss"
style=
"width: 400px"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item
label=
" 维护日期:"
prop=
"repairDate"
>
<el-date-picker
v-model=
"monitorForm.repairDate"
type=
"datetime"
placeholder=
"请选择维护日期"
format=
"yyyy-MM-dd HH:mm:ss"
style=
"width: 400px"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
-->
</el-form>
<div
class=
"btn"
v-if=
"isEdit==1"
>
<el-button
type=
"primary"
@
click=
"cancel"
>
取 消
</el-button>
...
...
@@ -142,8 +119,8 @@ import {
selectForFsu
,
updateMonitorEquipConf
}
from
"../../api"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
props
:
{
isEdit
:
{
...
...
@@ -159,7 +136,7 @@ export default {
curInfo
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
monitorForm
=
formInit
(
newV
)
this
.
monitorForm
=
formInit
(
newV
)
;
}
}
},
...
...
@@ -214,6 +191,9 @@ export default {
},
};
},
mounted
()
{
this
.
getAllWay
();
},
methods
:
{
// 编辑的确认
confirm
()
{
...
...
@@ -223,14 +203,14 @@ export default {
delete
params
.
creationTime
updateMonitorEquipConf
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
this
.
$message
.
success
(
'保存成功!'
)
;
}
this
.
cancel
(
true
)
this
.
cancel
(
true
)
;
})
},
cancel
(
refersh
)
{
this
.
$emit
(
'update'
,
refersh
)
this
.
reset
()
this
.
$emit
(
'update'
,
refersh
)
;
this
.
reset
()
;
},
changerailWay
()
{
selectForSite
({
wayId
:
this
.
monitorForm
.
wayId
}).
then
((
res
)
=>
{
...
...
@@ -240,7 +220,6 @@ export default {
changesite
()
{
selectForFsu
({
siteId
:
this
.
monitorForm
.
siteId
}).
then
((
res
)
=>
{
this
.
fsuSelect2
=
res
;
console
.
log
(
this
.
fsuSelect2
);
});
},
reset
()
{
...
...
@@ -279,10 +258,8 @@ export default {
this
.
equipModeSelect
=
res
[
"09"
];
});
},
mounted
()
{
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
wayId
:
""
,
...
...
@@ -298,7 +275,6 @@ function formInit(data = {}) {
equipType
:
""
,
installDate
:
""
,
kmSign
:
""
,
repairDate
:
""
,
...
data
,
};
...
...
src/views/setting/add/comp/railWay.vue
View file @
b936d57d
...
...
@@ -40,8 +40,6 @@ import { railWaysave } from "../../api";
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
props
:
[],
components
:
{},
data
()
{
return
{
formData
:
formInit
(),
...
...
@@ -60,7 +58,6 @@ export default {
},
};
},
computed
:
{},
methods
:
{
reset
()
{
this
.
$refs
.
form
.
resetFields
();
...
...
@@ -80,7 +77,6 @@ export default {
});
},
},
mounted
()
{},
};
function
formInit
(
data
=
{})
{
return
{
...
...
src/views/setting/add/comp/station.vue
View file @
b936d57d
...
...
@@ -79,6 +79,7 @@
<
script
>
import
{
sitesave
,
railWaylist
,
updateSiteConf
}
from
"../../api"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
props
:
{
isEdit
:
{
...
...
@@ -94,7 +95,7 @@ export default {
curInfo
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
stationForm
=
formInit
(
newV
)
this
.
stationForm
=
formInit
(
newV
)
;
}
}
},
...
...
@@ -139,7 +140,9 @@ export default {
},
};
},
computed
:
{},
mounted
()
{
this
.
getAllWay
();
},
methods
:
{
// 编辑的确认
confirm
()
{
...
...
@@ -158,7 +161,6 @@ export default {
this
.
$emit
(
'update'
,
refersh
)
this
.
reset
()
},
readNodes
(
aaa
=
[],
arrarea
=
[])
{
for
(
let
item
of
aaa
)
{
arrarea
.
push
({
id
:
item
.
id
,
name
:
item
.
name
});
...
...
@@ -197,10 +199,8 @@ export default {
});
},
},
mounted
()
{
this
.
getAllWay
();
},
};
}
function
formInit
(
data
=
{})
{
return
{
parentId
:
""
,
...
...
src/views/setting/add/index.vue
View file @
b936d57d
...
...
@@ -8,7 +8,6 @@
<railWay
/>
</div>
</el-tab-pane>
<el-tab-pane
label=
"站点"
name=
"1"
>
<div
v-if=
"activeName === '1'"
class=
"content"
>
<div
class=
"content-title"
>
添加站点
</div>
...
...
@@ -91,8 +90,6 @@ export default {
]
}
},
methods
:
{
}
}
</
script
>
...
...
src/views/setting/api.js
View file @
b936d57d
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
;
const
path
=
{
railWaylist
:
'railWay/selectPage'
,
...
...
@@ -51,138 +51,138 @@ const path = {
}
// 铁路线
export
function
railWaylist
()
{
return
request
.
post
(
path
.
railWaylist
,
...
arguments
)
return
request
.
post
(
path
.
railWaylist
,
...
arguments
)
;
}
export
function
railWaydetail
()
{
return
request
.
post
(
path
.
railWaydetail
,
...
arguments
)
return
request
.
post
(
path
.
railWaydetail
,
...
arguments
)
;
}
export
function
railWaysave
()
{
return
request
.
post
(
path
.
railWaysave
,
...
arguments
)
return
request
.
post
(
path
.
railWaysave
,
...
arguments
)
;
}
export
function
railWaybatchDelete
()
{
return
request
.
post
(
path
.
railWaybatchDelete
,
...
arguments
)
return
request
.
post
(
path
.
railWaybatchDelete
,
...
arguments
)
;
}
export
function
railWayselectList
()
{
return
request
.
post
(
path
.
railWayselectList
,
...
arguments
)
return
request
.
post
(
path
.
railWayselectList
,
...
arguments
)
;
}
export
function
updateRailWay
()
{
return
request
.
post
(
path
.
updateRailWay
,
...
arguments
)
return
request
.
post
(
path
.
updateRailWay
,
...
arguments
)
;
}
//站点
export
function
selectForSite
()
{
return
request
.
post
(
path
.
selectForSite
,
...
arguments
)
return
request
.
post
(
path
.
selectForSite
,
...
arguments
)
;
}
export
function
sitelist
()
{
return
request
.
post
(
path
.
sitelist
,
...
arguments
)
return
request
.
post
(
path
.
sitelist
,
...
arguments
)
;
}
export
function
sitedetail
()
{
return
request
.
post
(
path
.
sitedetail
,
...
arguments
)
return
request
.
post
(
path
.
sitedetail
,
...
arguments
)
;
}
export
function
sitesave
()
{
return
request
.
post
(
path
.
sitesave
,
...
arguments
)
return
request
.
post
(
path
.
sitesave
,
...
arguments
)
;
}
export
function
sitebatchDelete
()
{
return
request
.
post
(
path
.
sitebatchDelete
,
...
arguments
)
return
request
.
post
(
path
.
sitebatchDelete
,
...
arguments
)
;
}
export
function
siteselectList
()
{
return
request
.
post
(
path
.
siteselectList
,
...
arguments
)
return
request
.
post
(
path
.
siteselectList
,
...
arguments
)
;
}
export
function
updateSiteConf
()
{
return
request
.
post
(
path
.
updateSiteConf
,
...
arguments
)
return
request
.
post
(
path
.
updateSiteConf
,
...
arguments
)
;
}
//fsu
export
function
selectForFsu
()
{
return
request
.
post
(
path
.
selectForFsu
,
...
arguments
)
return
request
.
post
(
path
.
selectForFsu
,
...
arguments
)
;
}
export
function
selectFsuItem
()
{
//fsu字典
return
request
.
post
(
path
.
selectFsuItem
,
...
arguments
)
return
request
.
post
(
path
.
selectFsuItem
,
...
arguments
)
;
}
export
function
fsulist
()
{
return
request
.
post
(
path
.
fsuList
,
...
arguments
)
return
request
.
post
(
path
.
fsuList
,
...
arguments
)
;
}
export
function
fsudetail
()
{
return
request
.
post
(
path
.
fsudetail
,
...
arguments
)
return
request
.
post
(
path
.
fsudetail
,
...
arguments
)
;
}
export
function
fsusave
()
{
return
request
.
post
(
path
.
fsusave
,
...
arguments
)
return
request
.
post
(
path
.
fsusave
,
...
arguments
)
;
}
export
function
fsubatchDelete
()
{
return
request
.
post
(
path
.
fsubatchDelete
,
...
arguments
)
return
request
.
post
(
path
.
fsubatchDelete
,
...
arguments
)
;
}
export
function
fsuselectList
()
{
return
request
.
post
(
path
.
fsuselectList
,
...
arguments
)
return
request
.
post
(
path
.
fsuselectList
,
...
arguments
)
;
}
export
function
updateFsuConf
()
{
return
request
.
post
(
path
.
updateFsuConf
,
...
arguments
)
return
request
.
post
(
path
.
updateFsuConf
,
...
arguments
)
;
}
//监测
export
function
selectMonitorItem
()
{
return
request
.
post
(
path
.
selectMonitorItem
,
...
arguments
)
return
request
.
post
(
path
.
selectMonitorItem
,
...
arguments
)
;
}
export
function
monitorEquiplist
()
{
return
request
.
post
(
path
.
monitorEquipList
,
...
arguments
)
return
request
.
post
(
path
.
monitorEquipList
,
...
arguments
)
;
}
export
function
monitorEquipdetail
()
{
return
request
.
post
(
path
.
monitorEquipdetail
,
...
arguments
)
return
request
.
post
(
path
.
monitorEquipdetail
,
...
arguments
)
;
}
export
function
monitorEquipsave
()
{
return
request
.
post
(
path
.
monitorEquipsave
,
...
arguments
)
return
request
.
post
(
path
.
monitorEquipsave
,
...
arguments
)
;
}
export
function
monitorEquipbatchDelete
()
{
return
request
.
post
(
path
.
monitorEquipbatchDelete
,
...
arguments
)
return
request
.
post
(
path
.
monitorEquipbatchDelete
,
...
arguments
)
;
}
export
function
monitorEquipselectList
()
{
return
request
.
post
(
path
.
monitorEquipselectList
,
...
arguments
)
return
request
.
post
(
path
.
monitorEquipselectList
,
...
arguments
)
;
}
export
function
selectForEquip
()
{
return
request
.
post
(
path
.
selectForEquip
,
...
arguments
)
return
request
.
post
(
path
.
selectForEquip
,
...
arguments
)
;
}
export
function
updateMonitorEquipConf
()
{
return
request
.
post
(
path
.
updateMonitorEquipConf
,
...
arguments
)
return
request
.
post
(
path
.
updateMonitorEquipConf
,
...
arguments
)
;
}
//漏缆
export
function
leakyCablelist
()
{
return
request
.
post
(
path
.
leakyCableList
,
...
arguments
)
return
request
.
post
(
path
.
leakyCableList
,
...
arguments
)
;
}
export
function
leakyCabledetail
()
{
return
request
.
post
(
path
.
leakyCabledetail
,
...
arguments
)
return
request
.
post
(
path
.
leakyCabledetail
,
...
arguments
)
;
}
export
function
leakyCablesave
()
{
return
request
.
post
(
path
.
leakyCablesave
,
...
arguments
)
return
request
.
post
(
path
.
leakyCablesave
,
...
arguments
)
;
}
export
function
leakyCablebatchDelete
()
{
return
request
.
post
(
path
.
leakyCablebatchDelete
,
...
arguments
)
return
request
.
post
(
path
.
leakyCablebatchDelete
,
...
arguments
)
;
}
export
function
leakyCableselectList
()
{
return
request
.
post
(
path
.
leakyCableselectList
,
...
arguments
)
return
request
.
post
(
path
.
leakyCableselectList
,
...
arguments
)
;
}
export
function
selectForCable
()
{
return
request
.
post
(
path
.
selectForCable
,
...
arguments
)
return
request
.
post
(
path
.
selectForCable
,
...
arguments
)
;
}
export
function
updateLeakyCableConf
()
{
return
request
.
post
(
path
.
updateLeakyCableConf
,
...
arguments
)
return
request
.
post
(
path
.
updateLeakyCableConf
,
...
arguments
)
;
}
// 天馈线
export
function
antennaFeederSave
()
{
return
request
.
post
(
path
.
antennaFeederSave
,
...
arguments
)
return
request
.
post
(
path
.
antennaFeederSave
,
...
arguments
)
;
}
export
function
antennaFeederDelete
()
{
return
request
.
post
(
path
.
antennaFeederDelete
,
...
arguments
)
return
request
.
post
(
path
.
antennaFeederDelete
,
...
arguments
)
;
}
export
function
antennaFeederDetail
()
{
return
request
.
post
(
path
.
antennaFeederDetail
,
...
arguments
)
return
request
.
post
(
path
.
antennaFeederDetail
,
...
arguments
)
;
}
export
function
antennaFeederList
()
{
return
request
.
post
(
path
.
antennaFeederList
,
...
arguments
)
return
request
.
post
(
path
.
antennaFeederList
,
...
arguments
)
;
}
export
function
updateFeederConf
()
{
return
request
.
post
(
path
.
updateFeederConf
,
...
arguments
)
return
request
.
post
(
path
.
updateFeederConf
,
...
arguments
)
;
}
\ No newline at end of file
src/views/setting/statistics/comp/fsuTable.vue
View file @
b936d57d
...
...
@@ -2,9 +2,10 @@
<div>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids
>
<el-button
type=
"primary"
@
click=
"refresh"
>
刷新
</el-button>
<el-button
type=
"primary"
@
click=
"block = !block"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"exportData"
>
导出
</el-button>
...
...
@@ -115,8 +116,12 @@
align=
"center"
>
<template
slot-scope=
"
{ row }">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -127,19 +132,18 @@
class=
"pagination"
@
pagination=
"handlePageChange"
/>
<el-dialog
<el-dialog
title=
"编辑-FSU"
:visible
.
sync=
"visible"
width=
"40%"
:close-on-click-modal=
"false"
>
<fsu
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
>
<fsu
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
</div>
</template>
<
script
>
import
fsu
from
'@/views/setting/add/comp/FSU.vue'
import
fsu
from
'@/views/setting/add/comp/FSU.vue'
;
import
{
fsulist
,
fsubatchDelete
,
...
...
@@ -149,9 +153,9 @@ import {
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
import
download
from
"@/utils/download"
;
import
{
exportFsu
}
from
"@/api/export"
;
export
default
{
props
:
[],
components
:
{
fsu
},
components
:
{
fsu
},
data
()
{
return
{
railWaySelect
:
[],
...
...
@@ -173,7 +177,19 @@ export default {
curInfo
:
{}
};
},
computed
:
{},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getAllWay
();
},
methods
:
{
toEdit
(
row
)
{
this
.
visible
=
true
...
...
@@ -181,7 +197,7 @@ export default {
},
update
(
data
)
{
this
.
visible
=
false
if
(
data
)
{
if
(
data
)
{
this
.
getTableData
()
}
},
...
...
@@ -209,7 +225,7 @@ export default {
});
},
refresh
()
{
this
.
reset
();
this
.
reset
();
},
searchQuery
()
{
this
.
istrue
=
1
;
...
...
@@ -220,20 +236,17 @@ export default {
this
.
searchQuery
();
},
exportData
()
{
// let ids = [];
// this.ids.length != 0 ? (ids = this.ids) : (ids = this.exids);
if
(
this
.
exids
.
length
==
0
)
{
if
(
this
.
exids
.
length
==
0
)
{
this
.
$message
.
warning
(
"暂无数据"
);
return
false
;
}
else
{
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
)
{
this
.
multipleSelection
=
val
;
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
handleView
(
row
)
{
...
...
@@ -256,7 +269,6 @@ export default {
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
!=
0
)
{
successAlert
(
"操作成功"
);
...
...
@@ -277,20 +289,8 @@ export default {
});
},
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
fsuCode
:
""
,
...
...
src/views/setting/statistics/comp/leakyTable.vue
View file @
b936d57d
...
...
@@ -2,7 +2,6 @@
<div>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids
...
...
@@ -130,7 +129,6 @@
@selection-change="handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
prop=
"leakyCableDescribe"
label=
"漏缆描述"
...
...
@@ -149,12 +147,10 @@
show-overflow-tooltip
align=
"center"
/>
<el-table-column
prop=
"railWayName"
label=
"所在铁路线"
align=
"center"
/>
<el-table-column
prop=
"siteName"
label=
"所在站点"
align=
"center"
/>
<el-table-column
prop=
"fsuName"
label=
"所在FSU"
align=
"center"
/>
<el-table-column
prop=
"equipName"
label=
"所在监测设备"
align=
"center"
/>
<el-table-column
prop=
"action"
label=
"操作"
...
...
@@ -162,8 +158,12 @@
align=
"center"
>
<template
slot-scope=
"
{ row }">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -180,13 +180,13 @@
:visible
.
sync=
"visible"
width=
"40%"
:close-on-click-modal=
"false"
>
<leakyCable
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
>
<leakyCable
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
</div>
</template>
<
script
>
import
leakyCable
from
'@/views/setting/add/comp/leakyCable.vue'
import
leakyCable
from
'@/views/setting/add/comp/leakyCable.vue'
;
import
{
leakyCablelist
,
leakyCablebatchDelete
,
...
...
@@ -199,8 +199,9 @@ import { cableTypeEnum } from "../../../maintain/api";
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
import
download
from
"@/utils/download"
;
import
{
exportLeaky
}
from
"@/api/export"
;
export
default
{
components
:
{
leakyCable
},
components
:
{
leakyCable
},
data
()
{
return
{
railWaySelect
:
[],
...
...
@@ -224,15 +225,29 @@ export default {
visible
:
false
};
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getLeakyCablel
();
this
.
getAllWay
();
},
methods
:
{
toEdit
(
row
)
{
this
.
visible
=
true
this
.
curInfo
=
row
this
.
visible
=
true
;
this
.
curInfo
=
row
;
},
update
(
data
)
{
this
.
visible
=
false
if
(
data
)
{
this
.
getTableData
()
this
.
visible
=
false
;
if
(
data
)
{
this
.
getTableData
()
;
}
},
changerailWay
()
{
...
...
@@ -261,7 +276,6 @@ export default {
leakyCablebatchDelete
({
ids
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
successAlert
(
"删除成功"
);
this
.
getTableData
();
}
else
{
warningAlert
(
"删除失败"
);
...
...
@@ -269,7 +283,7 @@ export default {
});
},
refresh
()
{
this
.
reset
();
this
.
reset
();
},
searchQuery
()
{
this
.
istrue
=
1
;
...
...
@@ -279,23 +293,20 @@ export default {
this
.
leakyCableForm
=
formInit
();
this
.
searchQuery
();
},
exportData
()
{
if
(
this
.
exids
.
length
==
0
)
{
if
(
this
.
exids
.
length
==
0
)
{
this
.
$message
.
warning
(
"暂无数据"
);
return
false
;
}
else
{
exportLeaky
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`漏缆表.xls`
);
});
exportLeaky
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`漏缆表.xls`
);
});
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
handleView
(
row
)
{
this
.
$router
.
push
({
path
:
"/detail"
,
...
...
@@ -343,21 +354,8 @@ export default {
});
},
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getLeakyCablel
();
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
wayId
:
""
,
...
...
src/views/setting/statistics/comp/lineTable.vue
View file @
b936d57d
...
...
@@ -2,7 +2,6 @@
<div>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids
...
...
@@ -130,7 +129,6 @@
@selection-change="handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
prop=
"feederDescribe"
label=
"天馈线描述"
...
...
@@ -149,12 +147,10 @@
show-overflow-tooltip
align=
"center"
/>
<el-table-column
prop=
"railWayName"
label=
"所在铁路线"
align=
"center"
/>
<el-table-column
prop=
"siteName"
label=
"所在站点"
align=
"center"
/>
<el-table-column
prop=
"fsuName"
label=
"所在FSU"
align=
"center"
/>
<el-table-column
prop=
"equipName"
label=
"所在监测设备"
align=
"center"
/>
<el-table-column
prop=
"action"
label=
"操作"
...
...
@@ -162,8 +158,12 @@
align=
"center"
>
<template
slot-scope=
"
{ row }">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -176,10 +176,10 @@
/>
<el-dialog
title=
"编辑-天馈线"
:visible
.
sync=
"visible"
width=
"40%"
:close-on-click-modal=
"false"
title=
"编辑-天馈线"
:visible
.
sync=
"visible"
width=
"40%"
:close-on-click-modal=
"false"
>
<lineVue
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
...
...
@@ -199,8 +199,9 @@ import { cableTypeEnum } from "../../../maintain/api";
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
import
download
from
"@/utils/download"
;
import
{
exportFeeder
}
from
"@/api/export"
;
export
default
{
components
:
{
lineVue
},
components
:
{
lineVue
},
data
()
{
return
{
railWaySelect
:
[],
...
...
@@ -224,15 +225,29 @@ export default {
visible
:
false
,
};
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getLeakyCablel
();
this
.
getAllWay
();
},
methods
:
{
toEdit
(
row
)
{
this
.
visible
=
true
this
.
curInfo
=
row
this
.
visible
=
true
;
this
.
curInfo
=
row
;
},
update
(
data
)
{
this
.
visible
=
false
if
(
data
)
{
this
.
getTableData
()
this
.
visible
=
false
;
if
(
data
)
{
this
.
getTableData
()
;
}
},
changerailWay
()
{
...
...
@@ -261,7 +276,6 @@ export default {
antennaFeederDelete
({
ids
}).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
successAlert
(
"删除成功"
);
this
.
getTableData
();
}
else
{
warningAlert
(
"删除失败"
);
...
...
@@ -279,7 +293,6 @@ export default {
this
.
form
=
formInit
();
this
.
searchQuery
();
},
exportData
()
{
if
(
this
.
exids
.
length
==
0
)
{
this
.
$message
.
warning
(
"暂无数据"
);
...
...
@@ -294,7 +307,6 @@ export default {
this
.
multipleSelection
=
val
;
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
handleView
(
row
)
{
this
.
$router
.
push
({
path
:
"/detail"
,
...
...
@@ -342,21 +354,8 @@ export default {
});
},
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getLeakyCablel
();
this
.
getAllWay
();
},
};
}
function
formInit
(
data
=
{})
{
return
{
wayId
:
""
,
...
...
src/views/setting/statistics/comp/monitorTable.vue
View file @
b936d57d
...
...
@@ -2,7 +2,6 @@
<div>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids
...
...
@@ -105,7 +104,6 @@
@selection-change="handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
align=
"center"
/>
<el-table-column
prop=
"equipName"
label=
"设备名"
...
...
@@ -124,8 +122,12 @@
align=
"center"
>
<template
slot-scope=
"
{ row }">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -137,15 +139,14 @@
@
pagination=
"handlePageChange"
/>
<el-dialog
title=
"编辑-监测设备"
:visible
.
sync=
"visible"
width=
"40%"
:close-on-click-modal=
"false"
>
<monitor
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
>
<monitor
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -161,7 +162,7 @@ import { successAlert, warningAlert } from "@/utils/alert";
import
download
from
"@/utils/download"
;
import
{
exportMonitorEquip
}
from
"@/api/export"
;
export
default
{
components
:
{
monitor
},
components
:
{
monitor
},
data
()
{
return
{
railWaySelect
:
[],
...
...
@@ -183,15 +184,28 @@ export default {
curInfo
:
{}
};
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getAllWay
();
},
methods
:
{
toEdit
(
row
)
{
this
.
visible
=
true
this
.
curInfo
=
row
this
.
visible
=
true
;
this
.
curInfo
=
row
;
},
update
(
data
)
{
this
.
visible
=
false
if
(
data
)
{
this
.
getTableData
()
this
.
visible
=
false
;
if
(
data
)
{
this
.
getTableData
()
;
}
},
changerailWay
()
{
...
...
@@ -232,23 +246,20 @@ export default {
this
.
monitorForm
=
formInit
();
this
.
searchQuery
();
},
exportData
()
{
if
(
this
.
exids
.
length
==
0
)
{
if
(
this
.
exids
.
length
==
0
)
{
this
.
$message
.
warning
(
"暂无数据"
);
return
false
;
}
else
{
exportMonitorEquip
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`监测设备表.xls`
);
});
exportMonitorEquip
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`监测设备表.xls`
);
});
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
handleView
(
row
)
{
this
.
$router
.
push
({
path
:
"/detail"
,
...
...
@@ -289,19 +300,6 @@ export default {
});
},
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
...
...
src/views/setting/statistics/comp/railWayTable.vue
View file @
b936d57d
...
...
@@ -2,7 +2,6 @@
<div>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids
...
...
@@ -28,7 +27,6 @@
>
</el-input>
</el-form-item>
<el-form-item
label=
"铁路起点站名:"
>
<el-input
placeholder=
"请输入起点站名"
...
...
@@ -49,7 +47,7 @@
</el-input>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"success"
@
click=
"searchQuery()"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset"
>
重置
</el-button>
</el-form-item>
...
...
@@ -96,8 +94,12 @@
align=
"center"
>
<template
slot-scope=
"
{ row }">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -109,13 +111,12 @@
@
pagination=
"handlePageChange"
/>
<el-dialog
title=
"编辑-铁路线"
:visible
.
sync=
"visible"
width=
"30%"
:close-on-click-modal=
"false"
>
>
<el-form
ref=
"formData"
:model=
"formData"
...
...
@@ -157,6 +158,7 @@ import { railWaylist, updateRailWay, railWaybatchDelete } from "../../api";
import
{
exportRailWay
}
from
"@/api/export"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
import
download
from
"@/utils/download"
;
export
default
{
data
()
{
return
{
...
...
@@ -182,13 +184,24 @@ export default {
endPointName
:
[
{
required
:
true
,
message
:
"请输入铁路线终点站名"
,
trigger
:
"blur"
},
],
totalLong
:
[
{
required
:
true
,
pattern
:
/^0
\.([
1-9
]
|
\d[
1-9
])
$|^
[
1-9
]\d{0,7}\.\d{0,2}
$|^
[
1-9
]\d{0,7}
$/
,
message
:
"最大输入8位整数(小数点后最多2位)"
,
trigger
:
"blur"
},
totalLong
:
[
{
required
:
true
,
pattern
:
/^0
\.([
1-9
]
|
\d[
1-9
])
$|^
[
1-9
]\d{0,7}\.\d{0,2}
$|^
[
1-9
]\d{0,7}
$/
,
message
:
"最大输入8位整数(小数点后最多2位)"
,
trigger
:
"blur"
},
],
},
};
},
computed
:
{},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
},
methods
:
{
tableRowClassName
({
row
,
rowIndex
})
{
return
rowIndex
%
2
===
0
?
""
:
"single-row"
;
...
...
@@ -205,7 +218,7 @@ export default {
});
},
refresh
()
{
this
.
reset
();
this
.
reset
();
},
searchQuery
()
{
this
.
istrue
=
1
;
...
...
@@ -213,27 +226,26 @@ export default {
},
reset
()
{
this
.
railData
=
formInit
();
this
.
searchQuery
();
this
.
searchQuery
();
},
toEdit
(
row
)
{
this
.
visible
=
true
this
.
formData
=
editForm
(
row
)
},
exportData
()
{
if
(
this
.
exids
.
length
==
0
)
{
if
(
this
.
exids
.
length
==
0
)
{
this
.
$message
.
warning
(
"暂无数据"
);
return
false
;
}
else
{
exportRailWay
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`铁路线表.xls`
);
});
exportRailWay
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`铁路线表.xls`
);
});
}
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
handleView
(
row
)
{
this
.
$router
.
push
({
path
:
"/detail"
,
...
...
@@ -265,8 +277,8 @@ export default {
});
},
confirm
()
{
updateRailWay
({
...
this
.
formData
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
updateRailWay
({
...
this
.
formData
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$message
.
success
(
'保存成功!'
)
}
this
.
getTableData
()
...
...
@@ -275,19 +287,8 @@ export default {
}
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
},
};
function
formInit
(
data
=
{})
{
return
{
endPointName
:
""
,
...
...
@@ -300,7 +301,7 @@ function formInit(data = {}) {
}
function
editForm
(
data
=
{})
{
return
{
return
{
endPointName
:
""
,
name
:
""
,
startPointName
:
""
,
...
...
src/views/setting/statistics/comp/stationTable.vue
View file @
b936d57d
...
...
@@ -2,7 +2,6 @@
<div>
<div
class=
"leakage-top"
>
<div
style=
"color: #666666"
></div>
<div
class=
"operate-btn"
>
<delids
:multipleSelection2=
"multipleSelection"
@
del=
"del()"
>
删除
</delids
...
...
@@ -94,8 +93,12 @@
align=
"center"
>
<template
slot-scope=
"
{ row }">
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"handleView(row)"
>
查看
</el-link
>
<el-link
type=
"primary"
:underline=
"false"
@
click=
"toEdit(row)"
>
编辑
</el-link
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -112,9 +115,9 @@
:visible
.
sync=
"visible"
width=
"40%"
:close-on-click-modal=
"false"
>
<station
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
>
<station
:curInfo=
"curInfo"
:isEdit=
"1"
@
update=
"update"
/>
</el-dialog>
</div>
</template>
<
script
>
...
...
@@ -123,8 +126,9 @@ import { sitelist, sitebatchDelete, railWaylist } from "../../api";
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
import
download
from
"@/utils/download"
;
import
{
exportSite
}
from
"@/api/export"
;
export
default
{
components
:
{
station
},
components
:
{
station
},
data
()
{
return
{
siteForm
:
formInit
(),
...
...
@@ -144,6 +148,19 @@ export default {
curInfo
:
{}
};
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getAllWay
();
},
methods
:
{
toEdit
(
row
)
{
this
.
visible
=
true
...
...
@@ -151,7 +168,7 @@ export default {
},
update
(
data
)
{
this
.
visible
=
false
if
(
data
)
{
if
(
data
)
{
this
.
getTableData
()
}
},
...
...
@@ -188,9 +205,9 @@ export default {
this
.
$message
.
warning
(
"暂无数据"
);
return
false
;
}
else
{
exportSite
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`站点表.xls`
);
});
exportSite
({
ids
:
this
.
exids
}).
then
((
res
)
=>
{
download
(
res
,
"vnd.ms-excel"
,
`站点表.xls`
);
});
}
},
handleSelectionChange
(
val
)
{
...
...
@@ -237,20 +254,8 @@ export default {
});
},
},
created
()
{
var
that
=
this
;
document
.
onkeydown
=
function
(
e
)
{
var
key
=
window
.
event
.
keyCode
;
if
(
key
==
13
)
{
that
.
searchQuery
();
}
};
},
mounted
()
{
this
.
getTableData
();
this
.
getAllWay
();
},
};
function
formInit
(
data
=
{})
{
return
{
wayId
:
""
,
...
...
src/views/setting/statistics/detail.vue
View file @
b936d57d
...
...
@@ -6,18 +6,19 @@
<
script
>
import
{
treeBaseInfo
}
from
"../../dashboard/api"
;
import
Type
from
"../../dashboard/components/index.vue"
;
export
default
{
props
:
[],
components
:
{
Type
},
data
()
{
return
{
titleinfo
:
""
,
type
:
1
,
curInfo
:
{},
};
},
computed
:
{},
created
()
{
this
.
getParams
();
},
methods
:
{
getParams
()
{
this
.
type
=
this
.
$route
.
query
.
type
;
...
...
@@ -26,7 +27,6 @@ export default {
type
:
this
.
type
,
name
:
this
.
$route
.
query
.
name
};
treeBaseInfo
(
params
).
then
((
res
)
=>
{
let
controlLimit
=
res
.
controlLimit
||
[]
if
(
controlLimit
)
{
...
...
@@ -38,10 +38,5 @@ export default {
});
},
},
created
()
{
this
.
getParams
();
},
mounted
()
{
},
};
</
script
>
src/views/setting/statistics/index.vue
View file @
b936d57d
<
template
>
<div
class=
"leakage-cable"
>
<el-button-group>
<el-button
...
...
@@ -84,10 +83,6 @@ export default {
changeType
(
item
)
{
this
.
activeName
=
item
.
key
},
refresh
()
{},
query
()
{},
exportData
()
{}
}
}
</
script
>
...
...
src/views/user/api.js
View file @
b936d57d
...
...
@@ -10,22 +10,22 @@ const path = {
}
export
function
list
()
{
return
request
.
post
(
path
.
list
,
...
arguments
)
return
request
.
post
(
path
.
list
,
...
arguments
)
;
}
export
function
create
()
{
return
request
.
post
(
path
.
create
,
...
arguments
)
return
request
.
post
(
path
.
create
,
...
arguments
)
;
}
export
function
updatePwd
()
{
return
request
.
post
(
path
.
updatePwd
,
...
arguments
)
return
request
.
post
(
path
.
updatePwd
,
...
arguments
)
;
}
export
function
updateInfo
()
{
return
request
.
post
(
path
.
updateInfo
,
...
arguments
)
return
request
.
post
(
path
.
updateInfo
,
...
arguments
)
;
}
export
function
logList
()
{
return
request
.
post
(
path
.
logList
,
...
arguments
)
return
request
.
post
(
path
.
logList
,
...
arguments
)
;
}
src/views/user/updateUser/components/baseInfo.vue
View file @
b936d57d
...
...
@@ -54,11 +54,10 @@ export default {
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
updateInfo
(
this
.
form
).
then
(
res
=>
{
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
;
})
}
else
{
console
.
log
(
'error submit!!'
)
return
false
return
false
;
}
})
}
...
...
src/views/user/updateUser/components/password.vue
View file @
b936d57d
...
...
@@ -22,16 +22,16 @@
</
template
>
<
script
>
import
{
updatePwd
}
from
'../../api'
import
{
updatePwd
}
from
'../../api'
;
export
default
{
data
()
{
var
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请再次输入新密码'
))
callback
(
new
Error
(
'请再次输入新密码'
))
;
}
else
if
(
value
!==
this
.
form
.
password
)
{
callback
(
new
Error
(
'两次输入密码不一致!'
))
callback
(
new
Error
(
'两次输入密码不一致!'
))
;
}
else
{
callback
()
callback
()
;
}
}
let
{
userId
,
userName
}
=
this
.
$store
.
state
.
user
.
userBaseInfo
...
...
@@ -56,11 +56,10 @@ export default {
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
updatePwd
(
this
.
form
).
then
(
res
=>
{
this
.
$message
.
success
(
'操作成功'
)
this
.
$message
.
success
(
'操作成功'
)
;
})
}
else
{
console
.
log
(
'error submit!!'
)
return
false
return
false
;
}
})
}
...
...
src/views/user/updateUser/index.vue
View file @
b936d57d
...
...
@@ -3,7 +3,13 @@
<div
class=
"update-user-container"
>
<div
class=
"header"
>
<div
class=
"tab"
>
<div
v-for=
"(item,index) in options"
:key=
"item.id"
class=
"tab-item"
:class=
"tabIndex === index ? 'tab-active' : ''"
@
click=
"radioChange(item.value,index)"
>
<div
v-for=
"(item, index) in options"
:key=
"item.id"
class=
"tab-item"
:class=
"tabIndex === index ? 'tab-active' : ''"
@
click=
"radioChange(item.value, index)"
>
{{
item
.
name
}}
</div>
</div>
...
...
@@ -15,8 +21,9 @@
</
template
>
<
script
>
import
baseInfo
from
'../updateUser/components/baseInfo.vue'
import
Password
from
'../updateUser/components/password.vue'
import
baseInfo
from
'../updateUser/components/baseInfo.vue'
;
import
Password
from
'../updateUser/components/password.vue'
;
export
default
{
components
:
{
baseInfo
,
Password
},
data
()
{
...
...
@@ -30,33 +37,31 @@ export default {
value
:
2
}],
tabIndex
:
0
}
},
methods
:
{
radioChange
(
val
,
index
)
{
this
.
tabIndex
=
index
this
.
tabIndex
=
index
;
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.header
{
display
:
flex
;
justify-content
:
center
;
margin-bottom
:
30px
;
.tab
{
display
:
flex
;
justify-content
:
center
;
margin-bottom
:
30px
;
.tab
{
display
:
flex
;
cursor
:
pointer
;
.tab-item
{
margin
:
0
50px
;
padding-bottom
:
10px
;
}
.tab-active
{
color
:
#038ed7
;
border-bottom
:
1px
solid
#038ed7
;
}
cursor
:
pointer
;
.tab-item
{
margin
:
0
50px
;
padding-bottom
:
10px
;
}
.tab-active
{
color
:
#038ed7
;
border-bottom
:
1px
solid
#038ed7
;
}
}
}
</
style
>
src/views/user/userList/components/editInfo.vue
View file @
b936d57d
...
...
@@ -54,9 +54,9 @@
</
template
>
<
script
>
import
{
formInit
,
rules
}
from
'../../const'
import
{
updateInfo
,
create
}
from
'../../api'
import
{
mapGetters
}
from
'vuex'
import
{
formInit
,
rules
}
from
'../../const'
;
import
{
updateInfo
,
create
}
from
'../../api'
;
import
{
mapGetters
}
from
'vuex'
;
export
default
{
name
:
'edit'
,
...
...
@@ -81,41 +81,40 @@ export default {
flag
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
visible
=
!!
newV
this
.
form
=
formInit
(
this
.
curInfo
)
this
.
visible
=
!!
newV
;
this
.
form
=
formInit
(
this
.
curInfo
)
;
},
},
},
computed
:
{
...
mapGetters
(
'depart'
,
[
'departList'
]),
editText
()
{
return
`
${
this
.
flag
===
1
?
'新增'
:
'编辑'
}
基本信息`
return
`
${
this
.
flag
===
1
?
'新增'
:
'编辑'
}
基本信息`
;
}
},
methods
:
{
cancel
()
{
this
.
form
=
formInit
()
this
.
$emit
(
'reset'
)
this
.
form
=
formInit
()
;
this
.
$emit
(
'reset'
)
;
},
confrim
()
{
let
apiMap
=
{
1
:
create
,
2
:
updateInfo
,
}
let
api
=
apiMap
[
this
.
flag
]
let
api
=
apiMap
[
this
.
flag
]
;
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
let
params
=
{
...
this
.
form
}
if
(
valid
)
{
api
(
params
).
then
(()
=>
{
this
.
$message
.
success
(
'操作成功'
)
this
.
$emit
(
'reset'
,
true
)
this
.
$message
.
success
(
'操作成功'
)
;
this
.
$emit
(
'reset'
,
true
)
;
})
}
})
}
}
}
</
script
>
src/views/user/userList/components/editPwd.vue
View file @
b936d57d
...
...
@@ -28,19 +28,19 @@
</
template
>
<
script
>
import
{
formInitPwd
}
from
'../../const'
import
{
updatePwd
}
from
'../../api'
import
{
formInitPwd
}
from
'../../const'
;
import
{
updatePwd
}
from
'../../api'
;
export
default
{
name
:
'editPwd'
,
data
()
{
var
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'请再次输入新密码'
))
callback
(
new
Error
(
'请再次输入新密码'
))
;
}
else
if
(
value
!==
this
.
form
.
password
)
{
callback
(
new
Error
(
'两次输入密码不一致!'
))
callback
(
new
Error
(
'两次输入密码不一致!'
))
;
}
else
{
callback
()
callback
()
;
}
}
return
{
...
...
@@ -68,17 +68,15 @@ export default {
flag1
:
{
immediate
:
true
,
handler
(
newV
)
{
this
.
visible
=
!!
newV
this
.
form
=
formInitPwd
(
this
.
curInfo
)
this
.
visible
=
!!
newV
;
this
.
form
=
formInitPwd
(
this
.
curInfo
)
;
},
},
},
computed
:
{
},
methods
:
{
cancel
()
{
this
.
form
=
formInitPwd
()
this
.
$emit
(
'reset'
)
this
.
form
=
formInitPwd
()
;
this
.
$emit
(
'reset'
)
;
},
confrim
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
...
...
@@ -87,13 +85,12 @@ export default {
}
if
(
valid
)
{
updatePwd
(
params
).
then
(()
=>
{
this
.
$message
.
success
(
'操作成功'
)
this
.
$emit
(
'reset'
,
true
)
this
.
$message
.
success
(
'操作成功'
)
;
this
.
$emit
(
'reset'
,
true
)
;
})
}
})
}
}
}
</
script
>
src/views/user/userList/index.vue
View file @
b936d57d
...
...
@@ -51,9 +51,9 @@
</template>
<
script
>
import
{
list
}
from
'../api'
import
edit
from
'./components/editInfo.vue'
import
ediPwd
from
'./components/editPwd.vue'
import
{
list
}
from
'../api'
;
import
edit
from
'./components/editInfo.vue'
;
import
ediPwd
from
'./components/editPwd.vue'
;
export
default
{
data
()
{
...
...
@@ -76,12 +76,12 @@ export default {
},
methods
:
{
tableRowClassName
({
row
,
rowIndex
})
{
return
rowIndex
%
2
===
0
?
''
:
'single-row'
return
rowIndex
%
2
===
0
?
''
:
'single-row'
;
},
handlePageChange
(
pageData
)
{
this
.
params
.
pageSize
=
pageData
.
size
this
.
params
.
pageNum
=
pageData
.
page
this
.
getTableData
()
this
.
params
.
pageSize
=
pageData
.
size
;
this
.
params
.
pageNum
=
pageData
.
page
;
this
.
getTableData
()
;
},
getTableData
()
{
let
params
=
{
...
...
@@ -89,36 +89,36 @@ export default {
size
:
this
.
params
.
pageSize
}
list
(
params
).
then
(
res
=>
{
let
list
=
res
.
records
||
[]
let
list
=
res
.
records
||
[]
;
list
.
forEach
(
item
=>
{
item
.
userId
=
item
.
id
item
.
userId
=
item
.
id
;
})
this
.
tableData
=
list
this
.
total
=
res
.
total
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
})
},
addUser
()
{
this
.
curInfo
=
{}
this
.
flag
=
1
this
.
curInfo
=
{}
;
this
.
flag
=
1
;
},
toEditInfo
(
row
)
{
this
.
curInfo
=
row
this
.
flag
=
2
this
.
curInfo
=
row
;
this
.
flag
=
2
;
},
toEditPwd
(
row
)
{
this
.
curInfo
=
row
this
.
flag1
=
3
this
.
curInfo
=
row
;
this
.
flag1
=
3
;
},
reset
(
needRefresh
)
{
this
.
flag
=
0
this
.
flag1
=
0
this
.
flag
=
0
;
this
.
flag1
=
0
;
if
(
needRefresh
)
{
this
.
getTableData
()
this
.
getTableData
()
;
}
}
},
mounted
()
{
this
.
getTableData
()
this
.
getTableData
()
;
},
}
</
script
>
...
...
src/views/user/userLog/components/search.vue
View file @
b936d57d
<
template
>
<div>
<el-form
class=
"search-form"
:model=
"form"
ref=
"form"
label-width=
"80px"
:inline=
"true"
size=
"mini"
>
<el-form-item
label=
"操作对象"
>
<el-select
v-model=
"form.operateObj"
placeholder=
"请选择操作对象"
clearable
>
<el-option
v-for=
"item in operatObj"
<el-form
class=
"search-form"
:model=
"form"
ref=
"form"
label-width=
"80px"
:inline=
"true"
size=
"mini"
>
<el-form-item
label=
"操作对象"
>
<el-select
v-model=
"form.operateObj"
placeholder=
"请选择操作对象"
clearable
>
<el-option
v-for=
"item in operatObj"
:key=
"item.dictValue"
:label=
"item.dictValue"
:value=
"+item.dictValue1"
>
:value=
"+item.dictValue1"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"操作内容"
>
<el-select
v-model=
"form.operateContent"
placeholder=
"请选择操作内容"
clearable
>
<el-option
v-for=
"item in operatContent"
<el-select
v-model=
"form.operateContent"
placeholder=
"请选择操作内容"
clearable
>
<el-option
v-for=
"item in operatContent"
:key=
"item.dictValue"
:label=
"item.dictValue"
:value=
"item.dictValue1"
>
:value=
"item.dictValue1"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"操作结果"
>
<el-select
v-model=
"form.operateResult"
placeholder=
"请选择操作结果"
clearable
>
<el-option
v-for=
"(val, key) in resultEnum"
<el-select
v-model=
"form.operateResult"
placeholder=
"请选择操作结果"
clearable
>
<el-option
v-for=
"(val, key) in resultEnum"
:key=
"val"
:label=
"val"
:value=
"+key"
>
:value=
"+key"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
@
click=
"toSearch"
>
查询
</el-button>
<el-button
type=
"primary"
@
click=
"reset"
>
重置
</el-button>
<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
{
selectDictType
}
from
'@/api/baseData'
import
{
selectDictType
}
from
'@/api/baseData'
;
export
default
{
name
:
'search'
,
data
()
{
...
...
@@ -58,20 +84,20 @@ export default {
},
methods
:
{
toSearch
()
{
this
.
$emit
(
'search'
,
this
.
form
)
this
.
$emit
(
'search'
,
this
.
form
)
;
},
reset
()
{
this
.
form
=
formInit
()
this
.
$emit
(
'search'
)
this
.
form
=
formInit
()
;
this
.
$emit
(
'search'
)
;
},
getInit
()
{
selectDictType
({
dictType
:
'06'
}).
then
(
res
=>
{
let
list
=
res
||
[]
this
.
operatContent
=
list
selectDictType
({
dictType
:
'06'
}).
then
(
res
=>
{
let
list
=
res
||
[]
;
this
.
operatContent
=
list
;
})
selectDictType
({
dictType
:
'07'
}).
then
(
res
=>
{
let
list
=
res
||
[]
this
.
operatObj
=
list
selectDictType
({
dictType
:
'07'
}).
then
(
res
=>
{
let
list
=
res
||
[]
;
this
.
operatObj
=
list
;
})
}
}
...
...
@@ -91,10 +117,11 @@ function formInit() {
}
.search-form
{
padding
:
10px
;
background-color
:
#
EAF1FE
;
background-color
:
#
eaf1fe
;
margin-bottom
:
20px
;
border-radius
:
8px
;
.el-form-item--mini.el-form-item
,
.el-form-item--small.el-form-item
{
.el-form-item--mini.el-form-item
,
.el-form-item--small.el-form-item
{
margin-bottom
:
0
;
}
}
...
...
src/views/user/userLog/index.vue
View file @
b936d57d
...
...
@@ -47,6 +47,7 @@ import search from "./components/search.vue";
import
{
exportLog
}
from
"@/api/export"
;
import
download
from
"@/utils/download"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
data
()
{
return
{
...
...
@@ -57,7 +58,7 @@ export default {
total
:
10
,
tableData
:
[],
isQuery
:
false
,
istrue
:
0
,
istrue
:
0
,
searchOption
:
{},
exids
:
[],
};
...
...
@@ -67,8 +68,8 @@ export default {
},
methods
:
{
handlePageChange
(
pageData
)
{
this
.
params
.
size
=
pageData
.
size
this
.
params
.
current
=
pageData
.
page
this
.
params
.
size
=
pageData
.
size
;
this
.
params
.
current
=
pageData
.
page
;
this
.
getTableData
();
},
refresh
()
{
...
...
@@ -76,14 +77,14 @@ export default {
?
this
.
$refs
.
reset
.
reset
()
:
this
.
getTableData
();
},
search
(
option
){
this
.
params
.
current
=
1
this
.
istrue
=
1
this
.
searchOption
=
option
this
.
getTableData
()
search
(
option
)
{
this
.
params
.
current
=
1
;
this
.
istrue
=
1
;
this
.
searchOption
=
option
;
this
.
getTableData
()
;
},
getTableData
()
{
let
params
=
{
...
this
.
params
,
...
this
.
searchOption
,
...
...
@@ -93,15 +94,14 @@ export default {
this
.
tableData
=
list
;
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
!=
0
)
{
if
(
this
.
istrue
==
1
)
{
if
(
this
.
tableData
.
length
!=
0
)
{
successAlert
(
"操作成功"
);
}
else
{
warningAlert
(
"查询结果为空"
);
}
this
.
istrue
=
0
this
.
istrue
=
0
;
}
});
},
tableRowClassName
({
row
,
rowIndex
})
{
...
...
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