Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
holo-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinkong
holo-web
Commits
640491ab
Commit
640491ab
authored
Feb 13, 2023
by
ninglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修正避免gltf模型重复加载报错
parent
e5509379
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
142 deletions
+37
-142
location-red.png
wj-manage-web/src/assets/images/holo/location-red.png
+0
-0
location-yellow.png
wj-manage-web/src/assets/images/holo/location-yellow.png
+0
-0
mapConfig.js
wj-manage-web/src/config/holo/mapConfig.js
+9
-0
reportArea.vue
wj-manage-web/src/views/analysis/reportArea.vue
+1
-30
reportArtery.vue
wj-manage-web/src/views/analysis/reportArtery.vue
+1
-30
reportCross.vue
wj-manage-web/src/views/analysis/reportCross.vue
+1
-1
index.vue
wj-manage-web/src/views/situation/index.vue
+2
-2
index1.vue
wj-manage-web/src/views/situation/index1.vue
+2
-2
indexback.vue
wj-manage-web/src/views/situation/indexback.vue
+16
-75
l7Tools.js
wj-manage-web/src/views/situation/l7Tools.js
+5
-2
No files found.
wj-manage-web/src/assets/images/holo/location-red.png
0 → 100644
View file @
640491ab
3.06 KB
wj-manage-web/src/assets/images/holo/location-yellow.png
0 → 100644
View file @
640491ab
3.08 KB
wj-manage-web/src/config/holo/mapConfig.js
View file @
640491ab
...
...
@@ -10,6 +10,15 @@ export default {
maxZoom
:
20.5
,
pitch
:
60
,
},
mapIcons
:
{
cross
:
require
(
'
../../assets/images/holo/location-yellow.png
'
),
event
:
require
(
'
../../assets/images/holo/事件-点标.svg
'
),
milli
:
require
(
'
../../assets/images/holo/毫米波雷达.png
'
),
laser
:
require
(
'
../../assets/images/holo/激光雷达.png
'
),
weather
:
require
(
'
../../assets/images/holo/气象监测仪.png
'
),
camera
:
require
(
'
../../assets/images/holo/视频相机.png
'
),
sign
:
require
(
'
../../assets/images/holo/信号机.png
'
),
},
// rasterRoad: 'http://10.100.1.59:8883/tile?lid=traffic&get=map&cache=off&x={x}&y={y}&z={z}',
rasterRoad
:
'
http://10.100.4.14:8883/tile?lid=traffic&get=map&cache=on&x={x}&y={y}&z={z}
'
,
}
wj-manage-web/src/views/analysis/reportArea.vue
View file @
640491ab
...
...
@@ -185,11 +185,7 @@ export default {
this
.
$destroy
();
next
();
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initMap
();
});
},
mounted
()
{},
methods
:
{
checkallChange
(
e
)
{
if
(
e
)
{
...
...
@@ -207,31 +203,6 @@ export default {
}
},
getList
()
{},
initMap
()
{
mapMethods
=
this
.
$refs
.
wMap
;
map
=
mapMethods
.
initMap
();
scene
=
new
Scene
({
logoVisible
:
false
,
map
:
new
Mapbox
({
mapInstance
:
map
,
}),
});
scene
.
on
(
"
loaded
"
,
()
=>
{
scene
.
addImage
(
"
cross
"
,
require
(
"
../../assets/images/holo/路况-黄.svg
"
)
);
});
map
.
on
(
"
click
"
,
(
e
)
=>
{
console
.
log
(
e
.
lngLat
);
});
scene
.
on
(
"
zoomend
"
,
(
e
)
=>
{
console
.
log
(
map
.
getZoom
());
});
scene
.
on
(
"
moveend
"
,
(
e
)
=>
{
console
.
log
(
map
.
getPitch
());
});
},
},
beforeDestroy
()
{},
...
...
wj-manage-web/src/views/analysis/reportArtery.vue
View file @
640491ab
...
...
@@ -185,11 +185,7 @@ export default {
this
.
$destroy
();
next
();
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initMap
();
});
},
mounted
()
{},
methods
:
{
checkallChange
(
e
)
{
if
(
e
)
{
...
...
@@ -207,31 +203,6 @@ export default {
}
},
getList
()
{},
initMap
()
{
mapMethods
=
this
.
$refs
.
wMap
;
map
=
mapMethods
.
initMap
();
scene
=
new
Scene
({
logoVisible
:
false
,
map
:
new
Mapbox
({
mapInstance
:
map
,
}),
});
scene
.
on
(
"
loaded
"
,
()
=>
{
scene
.
addImage
(
"
cross
"
,
require
(
"
../../assets/images/holo/路况-黄.svg
"
)
);
});
map
.
on
(
"
click
"
,
(
e
)
=>
{
console
.
log
(
e
.
lngLat
);
});
scene
.
on
(
"
zoomend
"
,
(
e
)
=>
{
console
.
log
(
map
.
getZoom
());
});
scene
.
on
(
"
moveend
"
,
(
e
)
=>
{
console
.
log
(
map
.
getPitch
());
});
},
},
beforeDestroy
()
{},
...
...
wj-manage-web/src/views/analysis/reportCross.vue
View file @
640491ab
...
...
@@ -472,7 +472,7 @@ export default {
this
.
sceneLoaded
=
true
;
scene
.
addImage
(
"
cross
"
,
require
(
"
../../assets/images/holo/
路况-黄.sv
g
"
)
require
(
"
../../assets/images/holo/
location-yellow.pn
g
"
)
);
crossInfo
().
then
((
res
)
=>
{
// debugger;
...
...
wj-manage-web/src/views/situation/index.vue
View file @
640491ab
...
...
@@ -78,8 +78,8 @@ export default {
},
},
mapImgUrls
:
{
carSymbolImage
:
require
(
"
../../assets/images/shop-15.png
"
),
passerbyImage
:
require
(
"
../../assets/images/passerby.png
"
),
//
carSymbolImage: require("../../assets/images/shop-15.png"),
//
passerbyImage: require("../../assets/images/passerby.png"),
},
vehicleDetailData
:
{},
dialogVisible
:
{
...
...
wj-manage-web/src/views/situation/index1.vue
View file @
640491ab
...
...
@@ -83,8 +83,8 @@ export default {
},
},
mapImgUrls
:
{
carSymbolImage
:
require
(
"
../../assets/images/shop-15.png
"
),
passerbyImage
:
require
(
"
../../assets/images/passerby.png
"
),
//
carSymbolImage: require("../../assets/images/shop-15.png"),
//
passerbyImage: require("../../assets/images/passerby.png"),
},
vehicleDetailData
:
{},
dialogVisible
:
{
...
...
wj-manage-web/src/views/situation/indexback.vue
View file @
640491ab
...
...
@@ -115,7 +115,6 @@ let map,
},
modelArr
=
[],
lightModels
=
[],
passerbyModel
,
lightModel
,
vehicleTypeNum
=
0
,
vehicleModels
=
{};
...
...
@@ -135,6 +134,7 @@ export default {
computed
:
{},
data
()
{
return
{
mapConfig
,
boxesShow
:
true
,
crossDetailData
:
""
,
currentCheck
:
""
,
...
...
@@ -173,14 +173,6 @@ export default {
map
.
setZoom
(
18
);
map
.
setPitch
(
0
);
map
.
setMinZoom
(
17.5
);
// this.regisAndSendWs("callPasserby", {
// dataType: "5",
// ...this.getBoundsLnglat(),
// });
// this.regisAndSendWs("callLight", {
// dataType: "4",
// ...this.getBoundsLnglat(),
// });
},
updateHeatMap
(
type
,
content
)
{
// console.log(type);
...
...
@@ -373,55 +365,24 @@ export default {
[
map
,
scene
]
=
mapMethods
.
initMap
();
scene
.
on
(
"
loaded
"
,
()
=>
{
this
.
sceneLoaded
=
true
;
scene
.
addImage
(
"
cross
"
,
require
(
"
../../assets/images/holo/路况-黄.svg
"
)
);
scene
.
addImage
(
"
event
"
,
require
(
"
../../assets/images/holo/事件-点标.svg
"
)
);
scene
.
addImage
(
"
milli
"
,
require
(
"
../../assets/images/holo/毫米波雷达.png
"
)
);
scene
.
addImage
(
"
laser
"
,
require
(
"
../../assets/images/holo/激光雷达.png
"
)
);
scene
.
addImage
(
"
weather
"
,
require
(
"
../../assets/images/holo/气象监测仪.png
"
)
);
scene
.
addImage
(
"
camera
"
,
require
(
"
../../assets/images/holo/视频相机.png
"
)
);
scene
.
addImage
(
"
sign
"
,
require
(
"
../../assets/images/holo/信号机.png
"
));
for
(
let
key
in
dict
.
vehicleTypes
)
{
console
.
log
(
"
key
"
,
key
);
loader
.
load
(
`gltf/car
${
key
}
.gltf`
,
(
gltf
)
=>
{
vehicleModels
[
`car
${
key
}
`
]
=
gltf
.
scene
;
vehicleTypeNum
++
;
gltf
=
null
;
for
(
let
key
in
mapConfig
.
mapIcons
)
{
scene
.
addImage
(
key
,
mapConfig
.
mapIcons
[
key
]);
}
if
(
!
vehicleModels
.
car0
)
{
for
(
let
key
in
dict
.
vehicleTypes
)
{
console
.
log
(
"
key
"
,
key
);
loader
.
load
(
`gltf/car
${
key
}
.gltf`
,
(
gltf
)
=>
{
vehicleModels
[
`car
${
key
}
`
]
=
gltf
.
scene
;
vehicleTypeNum
++
;
gltf
=
null
;
});
}
this
.
loadModuleByDRACOLoader
(
"
gltf/
"
,
"
Ludeng.glb
"
).
then
((
res
)
=>
{
lightModel
=
res
;
});
}
// this.loadModuleByDRACOLoader("gltf/", "smallcar.glb").then((res) => {
// vehicleModel = res;
//
// this.switchfirst();
// });
this
.
loadModuleByDRACOLoader
(
"
gltf/
"
,
"
passerby.gltf
"
).
then
((
res
)
=>
{
passerbyModel
=
res
;
});
this
.
loadModuleByDRACOLoader
(
"
gltf/
"
,
"
Ludeng.glb
"
).
then
((
res
)
=>
{
// console.log("res", res);
lightModel
=
res
;
// map.flyTo({ zoom: 18 });
});
this
.
switchfirst
();
});
this
.
switchfirst
();
scene
.
on
(
"
click
"
,
(
e
)
=>
{
console
.
log
(
e
.
lngLat
);
});
...
...
@@ -457,22 +418,6 @@ export default {
console
.
log
(
"
allCrossInfo
"
,
res
.
content
);
});
}
// 路口图层 点击 flyto 展示视频
// if (scene.getZoom() >= 17) {
// console.log("cc", map.getCenter());
// for (let cross of this.allCrossInfo)
// if (
// turf.distance(
// [map.getCenter().lng, map.getCenter().lat],
// [cross.location.split(",")[0], cross.location.split(",")[1]],
// {
// units: "kilometers",
// }
// )
<
0.05
// ) {
// console.log("yyyyyyyyyyyyyyy");
// }
// }
// 层级>=17 展示行人 & 灯态
if
(
scene
.
getZoom
()
>=
17
)
{
// this.showCard = false;
...
...
@@ -1000,14 +945,12 @@ export default {
}
}
},
// 可关闭弹框关闭事件
actionFinished
(
id
,
success
)
{
this
.
dialogVisible
[
id
]
=
false
;
if
(
success
)
{
}
},
// 比较车辆ws前后两次数据差异
diff
(
oldData
,
newData
)
{
// id 只在 newData 中存在且不在 oldData 中存在的即为 add
...
...
@@ -1018,7 +961,6 @@ export default {
const
commen
=
oldData
.
filter
((
e
)
=>
newData
.
find
((
c
)
=>
c
.
id
===
e
.
id
));
return
{
add
,
dele
,
commen
};
},
// videoList 删除单个 video
deleteVideo
(
item
)
{
let
index
=
this
.
videoListData
.
indexOf
(
item
);
...
...
@@ -1080,7 +1022,6 @@ export default {
layers
[
key
][
layer
]
=
null
;
}
}
// scene.removeAllLayer();
if
(
scene
)
{
scene
.
removeAllLayer
();
scene
.
destroy
();
...
...
wj-manage-web/src/views/situation/l7Tools.js
View file @
640491ab
...
...
@@ -70,8 +70,11 @@ export function addCrossPoint(scene, msg, offset, callback) {
offsets
:
offset
,
})
.
shape
(
'
cross
'
)
.
size
(
12
)
.
active
(
true
)
.
size
(
16
)
.
active
({
color
:
'
#ffffff
'
,
mix
:
0.6
,
})
.
on
(
'
click
'
,
(
e
)
=>
{
callback
(
e
)
})
...
...
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