Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
whp-xl
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
lizhichao
whp-xl
Commits
fce42eb1
Commit
fce42eb1
authored
Jul 06, 2021
by
lizhichao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://111.61.77.35:15/lizhichao/whp-xl
parents
a2a6ab23
79980e0f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
21 deletions
+41
-21
qyMap.vue
dcit-hcsystem-hcsystem-master/src/views/qyMap/qyMap.vue
+41
-21
No files found.
dcit-hcsystem-hcsystem-master/src/views/qyMap/qyMap.vue
View file @
fce42eb1
...
@@ -143,8 +143,12 @@ export default class GIS extends Vue {
...
@@ -143,8 +143,12 @@ export default class GIS extends Vue {
};
};
/* 地图 */
/* 地图 */
@
Provide
()
markers
:
any
=
[];
@
Provide
()
markers
:
any
=
[];
@
Provide
()
markers1
:
any
=
[];
@
Provide
()
markers2
:
any
=
[];
@
Provide
()
mapData
:
any
=
[];
@
Provide
()
mapData
:
any
=
[];
@
Provide
()
windowsArr
:
any
=
[];
@
Provide
()
windowsArr
:
any
=
[];
@
Provide
()
windowsArr1
:
any
=
[];
@
Provide
()
windowsArr2
:
any
=
[];
@
Provide
()
currentWindow
:
any
=
""
;
@
Provide
()
currentWindow
:
any
=
""
;
// @Provide() searchOption: any = {
// @Provide() searchOption: any = {
// city: "石家庄",
// city: "石家庄",
...
@@ -310,9 +314,11 @@ export default class GIS extends Vue {
...
@@ -310,9 +314,11 @@ export default class GIS extends Vue {
events
:
{
events
:
{
click
:
(
e
:
any
)
=>
{
click
:
(
e
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
// console.log(ele,"ele")
ele
.
visible
=
false
;
ele
.
visible
=
false
;
});
});
that
.
$nextTick
(()
=>
{
that
.
$nextTick
(()
=>
{
// console.log(ele,"ele")
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
.
visible
=
true
;
that
.
currentWindow
.
visible
=
true
;
});
});
...
@@ -343,11 +349,11 @@ export default class GIS extends Vue {
...
@@ -343,11 +349,11 @@ export default class GIS extends Vue {
offset
:
[
-
13
,
-
2
],
offset
:
[
-
13
,
-
2
],
events
:
{
events
:
{
click
:
(
e
:
any
)
=>
{
click
:
(
e
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
that
.
windowsArr
1
.
forEach
((
ele
:
any
)
=>
{
ele
.
visible
=
false
;
ele
.
visible
=
false
;
});
});
that
.
$nextTick
(()
=>
{
that
.
$nextTick
(()
=>
{
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
=
that
.
windowsArr
1
[
index
];
that
.
currentWindow
.
visible
=
true
;
that
.
currentWindow
.
visible
=
true
;
});
});
},
},
...
@@ -377,11 +383,11 @@ export default class GIS extends Vue {
...
@@ -377,11 +383,11 @@ export default class GIS extends Vue {
offset
:
[
-
13
,
-
2
],
offset
:
[
-
13
,
-
2
],
events
:
{
events
:
{
click
:
(
e
:
any
)
=>
{
click
:
(
e
:
any
)
=>
{
that
.
windowsArr
.
forEach
((
ele
:
any
)
=>
{
that
.
windowsArr
2
.
forEach
((
ele
:
any
)
=>
{
ele
.
visible
=
false
;
ele
.
visible
=
false
;
});
});
that
.
$nextTick
(()
=>
{
that
.
$nextTick
(()
=>
{
that
.
currentWindow
=
that
.
windowsArr
[
index
];
that
.
currentWindow
=
that
.
windowsArr
2
[
index
];
that
.
currentWindow
.
visible
=
true
;
that
.
currentWindow
.
visible
=
true
;
});
});
},
},
...
@@ -406,6 +412,20 @@ export default class GIS extends Vue {
...
@@ -406,6 +412,20 @@ export default class GIS extends Vue {
that
.
markers
[
index
].
visible
=
false
;
that
.
markers
[
index
].
visible
=
false
;
}
}
});
});
that
.
wxymapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
if
(
ele
.
dataType
==
v
||
v
==
0
)
{
that
.
markers1
[
index
].
visible
=
true
;
}
else
{
that
.
markers1
[
index
].
visible
=
false
;
}
});
that
.
shipinmapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
if
(
ele
.
dataType
==
v
||
v
==
0
)
{
that
.
markers2
[
index
].
visible
=
true
;
}
else
{
that
.
markers2
[
index
].
visible
=
false
;
}
});
}
}
/* 搜索 */
/* 搜索 */
...
@@ -539,38 +559,38 @@ export default class GIS extends Vue {
...
@@ -539,38 +559,38 @@ export default class GIS extends Vue {
// });
// });
if
(
res
.
code
==
0
&&
res
.
data
.
goodsList
.
length
>
0
)
{
if
(
res
.
code
==
0
&&
res
.
data
.
goodsList
.
length
>
0
)
{
that
.
mapData
=
res
.
data
.
goodsList
;
that
.
wxy
mapData
=
res
.
data
.
goodsList
;
let
latSum
=
0
;
let
wxy
latSum
=
0
;
let
lngSum
=
0
;
let
wxy
lngSum
=
0
;
that
.
mapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
wxy
mapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
wxyaddMark
(
ele
,
index
);
that
.
wxyaddMark
(
ele
,
index
);
lngSum
+=
ele
.
longitude
;
wxy
lngSum
+=
ele
.
longitude
;
latSum
+=
ele
.
latitude
;
wxy
latSum
+=
ele
.
latitude
;
});
});
let
center
=
[
let
center
=
[
lngSum
/
that
.
mapData
.
length
,
wxylngSum
/
that
.
wxy
mapData
.
length
,
latSum
/
that
.
mapData
.
length
,
wxylatSum
/
that
.
wxy
mapData
.
length
,
];
];
that
.
Mutil
.
setViewF
({
that
.
Mutil
.
setViewF
({
center
:
center
center
:
center
})
})
}
}
if
(
res
.
code
==
0
&&
res
.
data
.
cameraList
.
length
>
0
)
{
if
(
res
.
code
==
0
&&
res
.
data
.
cameraList
.
length
>
0
)
{
let
shipinmapData
=
res
.
data
.
cameraList
;
that
.
shipinmapData
=
res
.
data
.
cameraList
;
let
shipinlatSum
=
0
;
let
shipinlatSum
=
0
;
let
shipinlngSum
=
0
;
let
shipinlngSum
=
0
;
shipinmapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
shipinmapData
.
forEach
((
ele
:
any
,
index
:
any
)
=>
{
that
.
shipinaddMark
(
ele
,
index
);
that
.
shipinaddMark
(
ele
,
index
);
shipinlngSum
+=
ele
.
longitude
;
shipinlngSum
+=
ele
.
longitude
;
shipinlatSum
+=
ele
.
latitude
;
shipinlatSum
+=
ele
.
latitude
;
});
});
//
let center = [
let
center
=
[
//
shipinlngSum / that.shipinmapData.length,
shipinlngSum
/
that
.
shipinmapData
.
length
,
//
shipinlatSum / that.shipinmapData.length,
shipinlatSum
/
that
.
shipinmapData
.
length
,
//
];
];
//
that.Mutil.setViewF({
that
.
Mutil
.
setViewF
({
//
center: center
center
:
center
//
})
})
}
}
}
}
}
}
...
...
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