Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
web-monitor
Commits
b8ac4422
Commit
b8ac4422
authored
Mar 31, 2022
by
neogcg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug
parent
16496d8a
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
238 additions
and
133 deletions
+238
-133
App.vue
src/App.vue
+3
-2
common.scss
src/styles/common.scss
+4
-1
index.vue
src/views/alarm/cableTime/index.vue
+3
-19
index.vue
src/views/alarm/device/index.vue
+3
-5
api.js
src/views/dashboard/api.js
+5
-5
mixins.js
src/views/dashboard/components/mixins.js
+5
-1
picdialog.vue
src/views/dashboard/components/picdialog.vue
+34
-0
type1.vue
src/views/dashboard/components/type1.vue
+37
-12
type2.vue
src/views/dashboard/components/type2.vue
+23
-6
type3.vue
src/views/dashboard/components/type3.vue
+15
-3
type4.vue
src/views/dashboard/components/type4.vue
+17
-36
type5.vue
src/views/dashboard/components/type5.vue
+79
-36
index.vue
src/views/dashboard/index.vue
+3
-1
fsuTable.vue
src/views/setting/statistics/comp/fsuTable.vue
+0
-1
detail.vue
src/views/setting/statistics/detail.vue
+7
-5
No files found.
src/App.vue
View file @
b8ac4422
...
...
@@ -91,7 +91,8 @@ export default {
watch
:
{
$route
(
to
,
from
)
{
if
(
to
.
path
==
"/login"
)
{
this
.
websocket
.
close
();
setTimeout
(
this
.
websocket
.
close
(),
500
)
console
.
log
(
"在登录页"
);
}
},
...
...
@@ -137,7 +138,7 @@ export default {
transform
:
translateX
(
200px
);
}
.tips
{
width
:
1
5
0px
;
width
:
1
6
0px
;
height
:
120px
;
font-size
:
14px
;
letter-spacing
:
1px
;
...
...
src/styles/common.scss
View file @
b8ac4422
...
...
@@ -103,8 +103,11 @@
opacity
:
1
;
margin-bottom
:
20px
;
}
.alarmbtn
{
.alarmbtn
,
.picbtn
{
margin-top
:
6px
;
margin-bottom
:
6px
;
}
.levelData
{
min-width
:
52px
;
}
src/views/alarm/cableTime/index.vue
View file @
b8ac4422
...
...
@@ -18,7 +18,7 @@
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
</div>
</div>
<div
v-
if
=
"isQuery"
>
<div
v-
show
=
"isQuery"
>
<search
@
search=
"search"
ref=
"reset"
/>
</div>
<el-table
...
...
@@ -177,7 +177,6 @@ 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
socket
from
"@/utils/websocket"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
data
()
{
...
...
@@ -210,7 +209,6 @@ export default {
istrue
:
0
,
searchOption
:
{},
exids
:
[],
wsUrl
:
"ws://8.142.143.40:8885/websocket/1/1"
,
};
},
components
:
{
search
},
...
...
@@ -315,29 +313,15 @@ export default {
},
},
computed
:
{
// getWsMsg:{
// get(){
// return this.$store.state.websocket.webSocketMsg
// },
// set(a){
// this.$store.state.websocket.webSocketMsg=a
// }
// },
},
watch
:
{
// getWsMsg: {
// handler(newVal) {
// this.getWsMsg=!!newVal
// console.log(newVal);
// // alert("接收到webSocket推送" + newVal);
// },
// },
},
mounted
()
{
this
.
getTableData
();
},
created
()
{
// socket({socketUrl:this.wsUrl});
console
.
log
(
this
.
$route
.
query
);
this
.
searchOption
=
this
.
$route
.
query
},
};
</
script
>
...
...
src/views/alarm/device/index.vue
View file @
b8ac4422
...
...
@@ -18,7 +18,7 @@
<el-button
type=
"primary"
@
click=
"exportList"
>
导出
</el-button>
</div>
</div>
<div
v-
if
=
"isQuery"
>
<div
v-
show
=
"isQuery"
>
<search
@
search=
"search"
ref=
"reset"
/>
</div>
<el-table
...
...
@@ -138,7 +138,6 @@ import { deviceList, deviceConfirm, deviceCancel } from "../api";
import
{
exportConnet
}
from
"@/api/export"
;
import
search
from
"./components/search.vue"
;
import
download
from
"@/utils/download"
;
import
socket
from
"@/utils/websocket"
;
import
{
successAlert
,
warningAlert
}
from
"@/utils/alert"
;
export
default
{
data
()
{
...
...
@@ -171,7 +170,6 @@ export default {
istrue
:
0
,
searchOption
:
{},
exids
:
[],
wsUrl
:
"ws://8.142.143.40:8885/websocket/1/2"
,
};
},
components
:
{
search
},
...
...
@@ -220,7 +218,6 @@ export default {
deviceList
(
param
).
then
((
res
)
=>
{
let
list
=
res
.
records
||
[];
this
.
tableData
=
list
;
console
.
log
(
this
.
tableData
);
this
.
total
=
res
.
total
;
this
.
exids
=
list
.
map
((
i
)
=>
i
.
id
);
if
(
this
.
istrue
==
1
)
{
...
...
@@ -285,7 +282,8 @@ export default {
this
.
getTableData
();
},
created
()
{
// socket({socketUrl:this.wsUrl});
console
.
log
(
this
.
$route
.
query
);
this
.
searchOption
=
this
.
$route
.
query
},
};
</
script
>
...
...
src/views/dashboard/api.js
View file @
b8ac4422
...
...
@@ -2,11 +2,11 @@ import request from '@/utils/request'
const
path
=
{
treeBaseInfo
:
'/home/treeBaseInfo'
,
railWayOpen
:
'/railWay/update
IsOpen
'
,
siteOpen
:
'/site/update
IsOpen
'
,
fsuOpen
:
'/fsu/update
IsOpen
'
,
monitorEquipOpen
:
'/monitorEquip/update
IsOpen
'
,
leakyCableOpen
:
'/leakyCable/update
IsOpen
'
,
railWayOpen
:
'/railWay/update
RailWay
'
,
siteOpen
:
'/site/update
Site
'
,
fsuOpen
:
'/fsu/update
Fsu
'
,
monitorEquipOpen
:
'/monitorEquip/update
MonitorEquip
'
,
leakyCableOpen
:
'/leakyCable/update
LeakyCable
'
,
}
...
...
src/views/dashboard/components/mixins.js
View file @
b8ac4422
...
...
@@ -71,15 +71,19 @@ export const DetailMixins = {
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"连接异常"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"告警"
}
else
if
(
la
[
i
].
innerHTML
==
"正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"紧急"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"紧急告警"
}
else
if
(
la
[
i
].
innerHTML
==
"重要"
)
{
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
innerHTML
=
"重要告警"
}
else
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
la
[
i
].
style
.
color
=
"#ead906"
;
}
la
[
i
].
innerHTML
=
"一般告警"
}
}
},
dateFormat
(
date
,
format
)
{
...
...
src/views/dashboard/components/picdialog.vue
0 → 100644
View file @
b8ac4422
<
template
>
<div>
<el-dialog
title=
"告警详情"
width=
"30%"
center
>
<h1>
这是弹窗组件
</h1>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
>
关闭
</el-button
>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
props
:
[],
components
:
{},
data
()
{
return
{};
},
computed
:
{
},
methods
:
{
},
mounted
()
{},
};
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/dashboard/components/type1.vue
View file @
b8ac4422
...
...
@@ -52,10 +52,8 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"10"
class=
"value_handle"
:style=
"acolor3"
>
{{
form
.
status
.
connectAlarm
}}
</el-col>
<el-col
:span=
"10"
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"form.status.connectAlarm != '连接正常'"
>
处理告警
</el-button
></el-col
>
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"form.status.connectAlarm == '告警'"
@
click=
"toalarm(form.status.connectAlarm)"
>
处理告警
</el-button></el-col>
</el-row>
</el-col>
</el-row>
...
...
@@ -67,10 +65,8 @@
<el-row
:gutter=
"20"
>
<el-col
:span=
"10"
class=
"value_handle"
:style=
"acolor"
>
{{
form
.
status
.
monitorAlarm
}}
</el-col>
<el-col
:span=
"10"
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"form.status.monitorAlarm != '正常'"
>
处理告警
</el-button
></el-col
>
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"form.status.monitorAlarm != '正常' && form.status.monitorAlarm != '' && form.status.monitorAlarm != undefined"
@
click=
"toalarm(form.status.monitorAlarm)"
>
处理告警
</el-button></el-col>
</el-row>
</el-col>
...
...
@@ -264,8 +260,17 @@ export default {
methods
:
{
savebtn
()
{
this
.
flag
=
true
;
railWayOpen
(
this
.
info
()).
then
((
res
)
=>
{
console
.
log
(
"铁路线"
);
let
params
=
{
id
:
this
.
form
.
baseInfo
.
id
,
name
:
this
.
form
.
baseInfo
.
name
,
isOpen
:
this
.
form
.
baseInfo
.
isOpen
,
startPointName
:
this
.
form
.
baseInfo
.
startPointName
,
endPointName
:
this
.
form
.
baseInfo
.
endPointName
,
totalLong
:
this
.
form
.
baseInfo
.
totalLong
}
railWayOpen
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
"修改成功"
);
});
},
levelcolor2
()
{
...
...
@@ -273,19 +278,39 @@ export default {
this
.
acolor
.
color
=
'green'
}
else
if
(
this
.
form
.
status
.
monitorAlarm
==
'紧急'
)
{
this
.
acolor
.
color
=
'#f00'
this
.
form
.
status
.
monitorAlarm
=
'紧急告警'
}
else
if
(
this
.
form
.
status
.
monitorAlarm
==
'重要'
)
{
this
.
acolor
.
color
=
'#f89850'
}
else
if
(
this
.
form
.
status
.
monitorAlarm
==
'一般'
)
{
this
.
form
.
status
.
monitorAlarm
=
'重要告警'
}
else
if
(
this
.
form
.
status
.
monitorAlarm
==
'一般'
)
{
this
.
acolor
.
color
=
'#ead906'
}
this
.
form
.
status
.
monitorAlarm
=
'一般告警'
}
},
levelcolor3
()
{
if
(
this
.
form
.
status
.
connectAlarm
==
'连接正常'
)
{
this
.
acolor3
.
color
=
'green'
}
else
if
(
this
.
form
.
status
.
connectAlarm
==
'连接异常'
)
{
this
.
acolor3
.
color
=
'#f00'
this
.
form
.
status
.
connectAlarm
=
'告警'
}
},
toalarm
(
data
){
console
.
log
(
data
);
let
topath
=
''
if
(
data
==
'告警'
)
{
topath
=
'/alarm/device'
}
else
{
topath
=
'/alarm/cableTime'
}
this
.
$router
.
push
({
path
:
topath
,
query
:
{
wayId
:
this
.
form
.
baseInfo
.
id
},
});
},
},
computed
:
{
userName
()
{
...
...
src/views/dashboard/components/type2.vue
View file @
b8ac4422
...
...
@@ -204,12 +204,12 @@
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
{{
item
.
name
}}
</div>
</el-col>
<el-col
:span=
"
5
"
>
<el-col
:span=
"
8
"
>
<div
class=
"item_data levelData"
>
{{
item
.
value
}}
</div>
</el-col>
<el-col
:span=
"
9
"
><el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
>
处理告警
</el-button
<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.value)"
>
处理告警
</el-button
></el-col
>
</el-row>
...
...
@@ -230,14 +230,14 @@ export default {
return
{
flag
:
true
,
colspan
:
14
,
};
},
methods
:
{
savebtn
()
{
this
.
flag
=
true
;
siteOpen
(
this
.
info
()).
then
((
res
)
=>
{
console
.
log
(
"站点
"
);
this
.
$message
.
success
(
"修改成功
"
);
});
},
levelcolor2
()
{
...
...
@@ -257,9 +257,26 @@ export default {
la
[
i
].
innerHTML
=
"重要告警"
}
else
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
innerHTML
=
"一般告警"
}
}
},
toalarm
(
data
){
console
.
log
(
data
);
let
topath
=
''
if
(
data
==
'告警'
)
{
topath
=
'/alarm/device'
}
else
{
topath
=
'/alarm/cableTime'
}
this
.
$router
.
push
({
path
:
topath
,
query
:
{
siteId
:
this
.
form
.
baseInfo
.
id
},
});
},
},
mounted
()
{},
computed
:
{
...
...
src/views/dashboard/components/type3.vue
View file @
b8ac4422
...
...
@@ -259,11 +259,23 @@ export default {
savebtn
()
{
this
.
flag
=
true
;
fsuOpen
(
this
.
info
()).
then
((
res
)
=>
{
console
.
log
(
"fsu
"
);
this
.
$message
.
success
(
"修改成功
"
);
});
},
toalarm
(
item
){
console
.
log
(
item
);
toalarm
(
item
){
let
topath
=
''
let
toquery
=
{}
if
(
item
.
name
==
'设备状态'
)
{
topath
=
'/alarm/device'
toquery
=
{
fsuId
:
this
.
form
.
baseInfo
.
id
}
}
else
{
topath
=
'/alarm/cableTime'
toquery
=
{
alarmTargetName
:
item
.
name
}
}
this
.
$router
.
push
({
path
:
topath
,
query
:
toquery
,
});
},
},
...
...
src/views/dashboard/components/type4.vue
View file @
b8ac4422
...
...
@@ -190,7 +190,7 @@
<span>
当前状态
</span>
</div>
<div>
<el-row
v-for=
"(item, i) in
testl
ist"
class=
"text"
:gutter=
"24"
>
<el-row
v-for=
"(item, i) in
statusL
ist"
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
{{
item
.
name
}}
</div>
</el-col>
...
...
@@ -219,16 +219,6 @@ export default {
data
()
{
return
{
colspan
:
14
,
testlist
:[
{
name
:
'eqwe'
,
value
:
"连接正常"
},
{
name
:
'eq二位we'
,
value
:
"连接异常"
},
{
name
:
'eq二个位we'
,
value
:
"2022-12-25"
},
{
name
:
'eq2二位we'
,
value
:
"正常"
},
{
name
:
'eq二21位we'
,
value
:
"2022-12-36"
},
{
name
:
'eq444二位we'
,
value
:
"重要"
},
{
name
:
'eq444二位we'
,
value
:
"一般"
},
{
name
:
'eq444二位we'
,
value
:
"紧急"
},
]
};
},
mixins
:
[
DetailMixins
],
...
...
@@ -237,41 +227,32 @@ export default {
savebtn
()
{
this
.
flag
=
true
;
monitorEquipOpen
(
this
.
info
()).
then
((
res
)
=>
{
console
.
log
(
"监测设备
"
);
this
.
$message
.
success
(
"修改成功
"
);
});
},
toalarm
(
item
){
console
.
log
(
item
);
},
levelcolor1
()
{
let
la
=
document
.
getElementsByClassName
(
"levelData"
);
for
(
var
i
=
0
;
i
<
this
.
testlist
.
length
;
i
++
)
{
if
(
la
[
i
].
innerHTML
==
"连接正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"连接异常"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
}
else
if
(
la
[
i
].
innerHTML
==
"正常"
)
{
la
[
i
].
style
.
color
=
"green"
;
}
else
if
(
la
[
i
].
innerHTML
==
"紧急"
)
{
la
[
i
].
style
.
color
=
"#f00"
;
la
[
i
].
innerHTML
=
"紧急告警"
}
else
if
(
la
[
i
].
innerHTML
==
"重要"
)
{
la
[
i
].
style
.
color
=
"#f89850"
;
la
[
i
].
innerHTML
=
"重要告警"
}
else
if
(
la
[
i
].
innerHTML
==
"一般"
)
{
la
[
i
].
style
.
color
=
"#ead906"
;
la
[
i
].
innerHTML
=
"一般告警"
}
}
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
:
{
testl
ist
:
{
statusL
ist
:
{
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
this
.
$nextTick
(
function
()
{
this
.
levelcolor
1
();
this
.
levelcolor
();
});
}
...
...
src/views/dashboard/components/type5.vue
View file @
b8ac4422
...
...
@@ -15,9 +15,12 @@
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
历史记录
</div>
</el-col>
<el-col
:span=
"
10
"
>
<el-col
:span=
"
8
"
>
<div
class=
"item_data"
>
{{
form
.
log
.
all
}}
条
</div>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
>
趋势分析图形
</el-button>
</el-col>
</el-row>
<el-row
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
...
...
@@ -225,11 +228,11 @@
<div
class=
"item_name"
>
漏缆状态
</div>
</el-col>
<el-col
:span=
"8"
>
<div
class=
"item_data levelData"
:style=
"acolor"
>
{{
this
.
timeStatus
.
level
}}
</div>
<div
class=
"item_data levelData"
:style=
"acolor"
v-if=
"statusl.length!=0"
>
{{
this
.
statusl
[
0
].
value
}}
</div>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"alarmbtn"
type=
"primary"
size=
"mini"
v-if=
"this.timeStatus.level
!= '正常
'"
v-if=
"this.timeStatus.level
== '紧急告警' || this.timeStatus.level == '重要告警' || this.timeStatus.level == '一般告警
'"
@
click=
"toalarm()"
>
处理告警
</el-button>
</el-col>
</el-row>
...
...
@@ -238,19 +241,19 @@
<div
class=
"item_name"
>
最后更新时间
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
{{
this
.
timeStatus
.
tim
e
}}
</div>
<div
class=
"item_data"
v-if=
"statusl.length!=0"
>
{{
this
.
statusl
[
1
].
valu
e
}}
</div>
</el-col>
</el-row>
<el-row
v-for=
"(item, i) in l
eakyList
"
class=
"text"
:gutter=
"24"
>
<el-row
v-for=
"(item, i) in l
ong
"
class=
"text"
:gutter=
"24"
>
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
距(
{{
form
.
baseInfo
.
leakyCableDescribe
}}
方向)
{{
item
.
nam
e
item
.
valu
e
}}
米
</div>
</el-col>
<el-col
:span=
"colspan"
>
<div
class=
"item_data"
>
驻波比:
{{
item
.
value
}}
</div>
<div
class=
"item_data"
>
驻波比:
{{
zhubobi
[
i
]
.
value
}}
</div>
</el-col>
</el-row>
...
...
@@ -260,11 +263,15 @@
<el-col
:span=
"10"
>
<div
class=
"item_name"
>
百米损耗
</div>
</el-col>
<el-col
:span=
"
colspan
"
>
<el-col
:span=
"
8
"
>
<div
class=
"item_data"
>
{{
form
.
baseInfo
.
hundredMetersLoss
}}
</div>
</el-col>
<el-col
:span=
"6"
>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
@
click=
"isQuery = !isQuery"
>
生成图形
</el-button>
<el-button
class=
"picbtn"
type=
"success"
size=
"mini"
@
click=
"trans()"
>
生成图形
</el-button>
</el-col>
</el-row>
</div>
</el-card>
...
...
@@ -275,27 +282,47 @@
<
script
>
import
{
DetailMixins
}
from
"./mixins"
;
import
{
leakyCableOpen
}
from
"../api"
;
export
default
{
name
:
"Dashboard"
,
data
()
{
return
{
isQuery
:
false
,
colspan
:
14
,
acolor
:{
color
:
""
},
leakyList
:
[],
timeStatus
:
{},
testasd
:[
{
name
:
"设备状态"
,
value
:
"紧急"
},
{
name
:
"时间"
,
value
:
"2022-12-14"
},
{
name
:
"距离"
,
value
:
"01"
},
{
name
:
"驻波比"
,
value
:
"1"
},
{
name
:
"距离"
,
value
:
"02"
},
{
name
:
"驻波比"
,
value
:
"2"
},
{
name
:
"距离"
,
value
:
"03"
},
{
name
:
"驻波比"
,
value
:
"3"
},
{
name
:
"距离"
,
value
:
"04"
},
{
name
:
"驻波比"
,
value
:
"4"
},
],
zhubobi
:[],
long
:[],
statusl
:[]
};
},
mixins
:
[
DetailMixins
],
methods
:
{
savebtn
()
{
this
.
flag
=
true
;
console
.
log
(
this
.
info
());
leakyCableOpen
(
this
.
info
()).
then
((
res
)
=>
{
console
.
log
(
"漏缆"
);
let
params
=
{
id
:
this
.
form
.
baseInfo
.
id
,
isOpen
:
this
.
form
.
baseInfo
.
isOpen
,
hundredMetersLoss
:
this
.
form
.
baseInfo
.
hundredMetersLoss
}
leakyCableOpen
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
"修改成功"
);
});
},
levelcolor2
()
{
...
...
@@ -303,58 +330,74 @@ export default {
this
.
acolor
.
color
=
'green'
}
else
if
(
this
.
timeStatus
.
level
==
'紧急'
)
{
this
.
acolor
.
color
=
'#f00'
this
.
timeStatus
.
level
=
'紧急告警'
}
else
if
(
this
.
timeStatus
.
level
==
'重要'
)
{
this
.
acolor
.
color
=
'#f89850'
this
.
timeStatus
.
level
=
'重要告警'
}
else
if
(
this
.
timeStatus
.
level
==
'一般'
)
{
this
.
acolor
.
color
=
'#ead906'
this
.
timeStatus
.
level
=
'一般告警'
}
},
toalarm
(){
console
.
log
(
this
.
form
.
baseInfo
.
id
);
this
.
$router
.
push
({
path
:
"/alarm/cableTime"
,
query
:
{
id
:
this
.
form
.
baseInfo
.
id
,
alarmTargetName
:
this
.
form
.
baseInfo
.
leakyCableDescribe
},
});
},
trans
()
{
var
temp
=
[];
var
asd
=
[];
var
isNull
=
(
JSON
.
stringify
(
this
.
form
.
status
)
==
"{}"
);
if
(
isNull
==
false
)
{
for
(
var
i
in
this
.
form
.
status
)
{
for
(
var
j
in
this
.
form
.
status
[
i
])
{
asd
.
push
({
name
:
j
,
value
:
this
.
form
.
status
[
i
][
j
]
});
}
temp
.
push
({
name
:
i
,
value
:
this
.
form
.
status
[
i
]
});
}
asd
.
shift
();
for
(
var
i
in
temp
[
0
].
value
)
{
this
.
timeStatus
=
{
level
:
i
,
time
:
temp
[
0
].
value
[
i
]
};
}
this
.
leakyList
=
asd
;
}
else
{
this
.
leakyList
=
[]
this
.
timeStatus
=
{}
let
arr1
=
[],
arr2
=
[],
arr3
=
[]
if
(
this
.
statusAlarmfun
.
length
!=
0
)
{
for
(
let
i
=
0
;
i
<
this
.
statusAlarmfun
.
length
;
i
++
){
if
(
i
%
2
!=
0
)
{
if
(
this
.
statusAlarmfun
[
i
].
name
==
'时间'
)
{
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
}
else
{
arr2
.
push
(
this
.
statusAlarmfun
[
i
])
}
}
else
{
if
(
this
.
statusAlarmfun
[
i
].
name
==
'设备状态'
)
{
arr1
.
push
(
this
.
statusAlarmfun
[
i
])
}
else
{
arr3
.
push
(
this
.
statusAlarmfun
[
i
])
}
}
}
this
.
statusl
=
arr1
this
.
zhubobi
=
arr2
this
.
long
=
arr3
}
},
},
computed
:
{
statusAlarmfun
()
{
if
(
this
.
form
.
status
)
{
return
this
.
form
.
status
;
}
},
},
computed
:
{},
watch
:
{
form
:
{
statusAlarmfun
:
{
immediate
:
true
,
handler
(
newV
)
{
if
(
newV
)
{
this
.
trans
();
this
.
levelcolor2
()
this
.
$nextTick
(
function
()
{
// this.levelcolor2();
});
}
},
},
deep
:
true
,
},
mounted
()
{},
mounted
()
{
},
};
</
script
>
...
...
src/views/dashboard/index.vue
View file @
b8ac4422
...
...
@@ -7,6 +7,7 @@
<type
:type=
"type"
:curInfo=
"curInfo"
/>
</div>
</div>
</div>
</
template
>
...
...
@@ -14,6 +15,7 @@
import
{
treeBaseInfo
}
from
'./api'
import
orgTree
from
'@/components/orgTree.vue'
import
Type
from
'./components/index.vue'
export
default
{
name
:
'Dashboard'
,
data
()
{
...
...
@@ -24,7 +26,7 @@ export default {
},
components
:
{
orgTree
,
Type
Type
,
},
computed
:
{
},
...
...
src/views/setting/statistics/comp/fsuTable.vue
View file @
b8ac4422
...
...
@@ -222,7 +222,6 @@ export default {
this
.
ids
=
this
.
multipleSelection
.
map
((
i
)
=>
i
.
id
);
},
handleView
(
row
)
{
console
.
log
(
row
);
this
.
$router
.
push
({
path
:
"/detail"
,
query
:
{
...
...
src/views/setting/statistics/detail.vue
View file @
b8ac4422
...
...
@@ -15,7 +15,6 @@ export default {
type
:
1
,
curInfo
:
{},
listData
:
[],
};
},
computed
:
{},
...
...
@@ -28,11 +27,14 @@ export default {
};
treeBaseInfo
(
params
).
then
((
res
)
=>
{
let
controlLimit
=
res
.
controlLimit
;
controlLimit
.
map
((
item
)
=>
{
res
[
`type
${
item
.
type
}
`
]
=
item
.
sum
;
});
let
controlLimit
=
res
.
controlLimit
||
[]
if
(
controlLimit
)
{
controlLimit
.
map
(
item
=>
{
res
[
`type
${
item
.
type
}
`
]
=
item
.
sum
})
}
this
.
curInfo
=
res
;
console
.
log
(
res
);
});
},
},
...
...
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