Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
8fd1b106
Commit
8fd1b106
authored
Sep 07, 2021
by
纪泽龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_jzl'
parents
f4a0802f
516fcf63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
16 deletions
+68
-16
index.vue
gassafety-web/src/views/enterprise/mapView/index.vue
+68
-16
No files found.
gassafety-web/src/views/enterprise/mapView/index.vue
View file @
8fd1b106
...
@@ -162,12 +162,17 @@
...
@@ -162,12 +162,17 @@
</div>
</div>
<div
<div
class=
"deviceList"
class=
"deviceList"
:class=
"
{ topActive: index == 0 }"
v-for=
"(iten, index) in item.list"
v-for=
"(iten, index) in item.list"
:class=
"
{
topActive: index == 0,
textRed: iten.alarmState == 1,
}"
:key="iten.deviceId + `` + index"
:key="iten.deviceId + `` + index"
@click.stop="panToo(iten, item)"
@click.stop="panToo(iten, item)"
>
>
<div
class=
"no"
>
{{
iten
.
no
+
1
}}
</div>
<div
class=
"no"
>
{{
iten
.
no
+
1
}}
</div>
<div
:title=
"iten.code"
class=
"code"
>
<div
:title=
"iten.code"
class=
"code"
>
{{
iten
.
code
}}
{{
iten
.
code
}}
</div>
</div>
...
@@ -404,11 +409,11 @@ export default {
...
@@ -404,11 +409,11 @@ export default {
// });
// });
},
},
watch
:
{
watch
:
{
changeBtnData
:
{
//
changeBtnData: {
handler
(
newName
,
oldName
)
{},
//
handler(newName, oldName) {},
deep
:
true
,
//
deep: true,
// immediate: true,
//
// immediate: true,
},
//
},
},
},
methods
:
{
methods
:
{
onResize
()
{
onResize
()
{
...
@@ -456,9 +461,11 @@ export default {
...
@@ -456,9 +461,11 @@ export default {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
==
200
)
{
if
(
res
==
200
)
{
// 所有设备上图结束之后,左边的抽屉加载数据
// 所有设备上图结束之后,左边的抽屉加载数据
this
.
pipeList
();
this
.
pipeList
().
then
((
res
)
=>
{
console
.
log
(
"开始报警准备"
);
this
.
getSelectAlarmDevice
();
});
// 获取报警资源
// 获取报警资源
this
.
getSelectAlarmDevice
();
}
}
});
});
},
},
...
@@ -536,7 +543,7 @@ export default {
...
@@ -536,7 +543,7 @@ export default {
},
},
// 获取报警资源,并且改变图上的状态
// 获取报警资源,并且改变图上的状态
getSelectAlarmDevice
()
{
getSelectAlarmDevice
()
{
selectAlarmDevice
().
then
((
res
)
=>
{
return
selectAlarmDevice
().
then
((
res
)
=>
{
if
(
res
.
length
>
0
)
{
if
(
res
.
length
>
0
)
{
}
}
console
.
log
(
"报警设备"
,
res
);
console
.
log
(
"报警设备"
,
res
);
...
@@ -565,8 +572,10 @@ export default {
...
@@ -565,8 +572,10 @@ export default {
const
pipeId
=
item
.
getExtData
().
lineData
.
pipeId
;
const
pipeId
=
item
.
getExtData
().
lineData
.
pipeId
;
return
deviceId
==
pipeId
;
return
deviceId
==
pipeId
;
})[
0
];
})[
0
];
if
(
polyline
)
{
if
(
polyline
)
{
let
options
=
polyline
.
getExtData
();
let
options
=
polyline
.
getExtData
();
// 增加一个报警状态
// 增加一个报警状态
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
// 如果有endtime说明状态已经不是报警状态了,要归位,所有东西都要变回来
options
.
lineData
.
view
=
this
;
options
.
lineData
.
view
=
this
;
...
@@ -590,6 +599,15 @@ export default {
...
@@ -590,6 +599,15 @@ export default {
console
.
log
(
"管道报警"
);
console
.
log
(
"管道报警"
);
}
}
polyline
.
setExtData
(
options
);
polyline
.
setExtData
(
options
);
const
myP
=
this
.
allList
[
0
].
filter
((
item
)
=>
{
console
.
log
(
item
.
selfData
.
alarmState
);
return
item
.
selfData
.
alarmState
;
})[
0
];
// console.log("this.allList[0]", this.allList[0]);
// console.log("myP", myP);
// 改变左侧列表的状态(1报警,0,正常)
myP
.
alarmState
=
options
.
lineData
.
alarmState
;
}
}
});
});
}
}
...
@@ -628,6 +646,19 @@ export default {
...
@@ -628,6 +646,19 @@ export default {
options
.
alarmValue
=
alarmValue
;
options
.
alarmValue
=
alarmValue
;
}
}
device
.
setExtData
(
options
);
device
.
setExtData
(
options
);
// 找到是列表里的哪个,改变它的状态,让列表里的这个设备变成红色
const
myDevice
=
this
.
allList
.
filter
((
item
)
=>
{
for
(
let
i
=
0
;
i
<
item
.
length
;
i
++
)
{
const
iten
=
item
[
i
];
// 不是隐患也不是值班人员
if
(
!
iten
.
troubleId
&&
!
iten
.
userId
)
{
return
iten
.
deviceId
==
device
.
getExtData
().
deviceId
;
}
}
})[
0
][
0
];
// console.log("myDevice", myDevice);
myDevice
.
alarmState
=
options
.
alarmState
;
// const imageName = device.getExtData()
// const imageName = device.getExtData()
// console.log(imageName)
// console.log(imageName)
...
@@ -866,7 +897,6 @@ export default {
...
@@ -866,7 +897,6 @@ export default {
this
.
diveceInfoWindowShow
(
iten
,
lat
,
lng
);
this
.
diveceInfoWindowShow
(
iten
,
lat
,
lng
);
}
}
},
},
// 如果是线条飞过去出现infowindow
// 如果是线条飞过去出现infowindow
polylineInfoWindowShow
(
iten
,
lat
,
lng
)
{
polylineInfoWindowShow
(
iten
,
lat
,
lng
)
{
const
target
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
const
target
=
this
.
gaoMap
.
polyLines
.
filter
((
item
)
=>
{
...
@@ -991,6 +1021,8 @@ export default {
...
@@ -991,6 +1021,8 @@ export default {
deviceType
:
"0"
,
deviceType
:
"0"
,
deviceName
:
item
.
pipeName
,
deviceName
:
item
.
pipeName
,
code
:
item
.
pipeCode
,
code
:
item
.
pipeCode
,
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
selfData
:
item
,
};
};
});
});
this
.
allList
[
0
]
=
pipeArr
;
this
.
allList
[
0
]
=
pipeArr
;
...
@@ -1011,6 +1043,8 @@ export default {
...
@@ -1011,6 +1043,8 @@ export default {
deviceType
:
item
.
deviceType
,
deviceType
:
item
.
deviceType
,
deviceName
:
item
.
deviceName
,
deviceName
:
item
.
deviceName
,
code
:
item
.
iotNo
,
code
:
item
.
iotNo
,
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
selfData
:
item
,
};
};
});
});
// 所有阀门井数据
// 所有阀门井数据
...
@@ -1026,6 +1060,8 @@ export default {
...
@@ -1026,6 +1060,8 @@ export default {
deviceType
:
item
.
deviceType
,
deviceType
:
item
.
deviceType
,
deviceName
:
item
.
deviceName
,
deviceName
:
item
.
deviceName
,
code
:
item
.
iotNo
,
code
:
item
.
iotNo
,
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
selfData
:
item
,
};
};
});
});
// 所有流量计数据
// 所有流量计数据
...
@@ -1041,6 +1077,8 @@ export default {
...
@@ -1041,6 +1077,8 @@ export default {
deviceType
:
item
.
deviceType
,
deviceType
:
item
.
deviceType
,
deviceName
:
item
.
deviceName
,
deviceName
:
item
.
deviceName
,
code
:
item
.
iotNo
,
code
:
item
.
iotNo
,
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
selfData
:
item
,
};
};
});
});
// 所有压力表数据
// 所有压力表数据
...
@@ -1056,6 +1094,8 @@ export default {
...
@@ -1056,6 +1094,8 @@ export default {
deviceType
:
item
.
deviceType
,
deviceType
:
item
.
deviceType
,
deviceName
:
item
.
deviceName
,
deviceName
:
item
.
deviceName
,
code
:
item
.
iotNo
,
code
:
item
.
iotNo
,
alarmState
:
item
.
alarmState
?
item
.
alarmState
:
"0"
,
selfData
:
item
,
};
};
});
});
// console.log("设备", tyxArr, fmjArr, lljArr, ylbArr);
// console.log("设备", tyxArr, fmjArr, lljArr, ylbArr);
...
@@ -1093,7 +1133,7 @@ export default {
...
@@ -1093,7 +1133,7 @@ export default {
this
.
allList
[
6
]
=
workManArr
;
this
.
allList
[
6
]
=
workManArr
;
},
},
// 左边设备翻页
// 左边设备翻页
pipeList
(
pageNum
)
{
async
pipeList
(
pageNum
)
{
const
num
=
pageNum
?
pageNum
:
10
;
const
num
=
pageNum
?
pageNum
:
10
;
// const { nowPage } = this.changeBtnData[0];
// const { nowPage } = this.changeBtnData[0];
// this.changeBtnData[0].list = this.allList[0].filter((item, index) => {
// this.changeBtnData[0].list = this.allList[0].filter((item, index) => {
...
@@ -1265,6 +1305,7 @@ export default {
...
@@ -1265,6 +1305,7 @@ export default {
}
else
{
}
else
{
// 左边全选
// 左边全选
this
.
leftBarNum
=
[
1
,
2
,
3
,
4
,
7
,
8
,
9
];
this
.
leftBarNum
=
[
1
,
2
,
3
,
4
,
7
,
8
,
9
];
// this.arrowRightNum=[];
// 右转箭头的样式active判定
// 右转箭头的样式active判定
// this.arrowRightNum = [];
// this.arrowRightNum = [];
// 清空左边列表
// 清空左边列表
...
@@ -1278,12 +1319,13 @@ export default {
...
@@ -1278,12 +1319,13 @@ export default {
await
this
.
getInspectorLocations
({
userName
:
this
.
keyWord
});
await
this
.
getInspectorLocations
({
userName
:
this
.
keyWord
});
await
this
.
getMapHiddenTroublelist
({
troubleName
:
this
.
keyWord
});
await
this
.
getMapHiddenTroublelist
({
troubleName
:
this
.
keyWord
});
// 设备报警
this
.
getSelectAlarmDevice
();
this
.
changeBtnData
.
forEach
((
item
)
=>
{
this
.
changeBtnData
.
forEach
((
item
)
=>
{
item
.
nowPage
=
1
;
item
.
nowPage
=
1
;
});
});
this
.
pipeList
();
this
.
pipeList
().
then
(()
=>
{
// 设备报警
this
.
getSelectAlarmDevice
();
});
}
}
},
},
// 清空左边列表
// 清空左边列表
...
@@ -1640,7 +1682,7 @@ input[type="radio"] {
...
@@ -1640,7 +1682,7 @@ input[type="radio"] {
}
}
.deviceList
{
.deviceList
{
cursor
:
pointer
;
cursor
:
pointer
;
margin-bottom
:
2
px
;
margin-bottom
:
10
px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
border-bottom
:
1px
solid
#053b6a
00
;
border-bottom
:
1px
solid
#053b6a
00
;
color
:
#1d1d1d
;
color
:
#1d1d1d
;
...
@@ -1682,6 +1724,16 @@ input[type="radio"] {
...
@@ -1682,6 +1724,16 @@ input[type="radio"] {
width
:
100px
;
width
:
100px
;
text-align
:
center
;
text-align
:
center
;
}
}
.textRed
{
.no
,
.name
,
.code
{
color
:
red
;
}
&
:hover
{
border-bottom
:
1px
solid
red
;
}
}
}
}
.box
{
.box
{
width
:
348px
;
width
:
348px
;
...
...
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