Commit c60e4531 authored by ninglx's avatar ninglx

调整部分目录结构

parent 5dbc76c2
......@@ -85,10 +85,10 @@ protobuf.load("../wj-manage-web/RealtimeCarInfo.proto", (event, root) => {
FrameList = root.lookupType("com.wanji.holo.proto.FrameList");
});
const typeOptions = ["不流畅车", "减速车", "直行汇车", "右转汇车"];
import pathMap from "./pathMap.vue";
import * as trackApi from "../../../../dao/historyTrack";
import * as mapTools from "../../../../utils/mapboxTools";
import { orgConflict } from "../../../../dao/organization";
import pathMap from "./mapComponent.vue";
import * as trackApi from "../../dao/historyTrack";
import * as mapTools from "../../utils/mapboxTools";
import { orgConflict } from "../../dao/organization";
export default {
name: "pathMapCtrl",
components: { pathMap },
......@@ -493,7 +493,7 @@ export default {
bottom: 15px;
padding: 0 16px;
transform: translateX(-50%);
background: url("../../../../assets/images/signal/map-slider-bg.png")
background: url("../../assets/images/signal/map-slider-bg.png")
no-repeat;
background-size: 100% 100%;
.el-slider {
......@@ -512,10 +512,10 @@ export default {
width: 24px;
height: 24px;
cursor: pointer;
background: url("../../../../assets/images/signal/play-icon.svg") no-repeat;
background: url("../../assets/images/signal/play-icon.svg") no-repeat;
background-size: 100% 100%;
&.active {
background: url("../../../../assets/images/signal/play-icon-active.svg")
background: url("../..//assets/images/signal/play-icon-active.svg")
no-repeat;
background-size: 100% 100%;
}
......
......@@ -8,7 +8,7 @@ let vehicleModelTypes = {},
fullTrack = [],
dillPath = [],
lastFrame = { carInfo: [] };
import dict from "../../../../config/holo/dictionary";
import dict from "../../config/holo/dictionary";
// Point MultiPoint LineString MultiLineString Polygon MultiPolygon
export default {
name: "wMap",
......
<template>
<div class="cameraVideo">
<div class="loading-mask" v-show="cameraLoading">
<div style="position: relative">
<div class="el-icon-loading"></div>
<div>加载中...</div>
</div>
</div>
<!-- <div class="videoControl" @loadstart="loadstart($event)"-->
<!-- @canplay="canplay($event)" :id="videoData"></div>-->
<video
@loadstart="loadstart($event)"
@canplay="canplay($event)"
class="videoControl"
muted
:id="videoData"
ref="myCameraVideoPlayer"
></video>
</div>
</template>
<script>
export default {
name: "cameraVideo",
props: ["videoData"],
watch: {},
methods: {
canplay() {
this.cameraLoading = false;
this.$emit("vidCanplay", this.videoData);
},
loadstart() {
// this.cameraLoading = true;
},
loadVideo() {
console.log("video init...", this.videoData);
// let el = document.getElementById(this.videoData)
this.player && this.destroy();
this.player = flvjs.createPlayer({
type: "flv",
isLive: true,
url: this.videoData,
hasAudio: false,
hasVideo: true,
cors: true, // 是否跨域
});
// console.log('el', el, this.player)
let el = document.getElementById(this.videoData);
this.player?.attachMediaElement(el);
this.player?.load();
this.bindEvents();
if (this.player) {
this.player?.play();
}
},
bindEvents() {
//视频出错后销毁重新创建
this.player.on(flvjs.Events.ERROR, this.handleErr);
this.player.on(flvjs.Events.LOADING_COMPLETE, this.handleErr);
},
handleErr() {
if (this.player) {
try {
this.player?.pause();
this.player?.unload();
this.player?.detachMediaElement();
this.player?.destroy();
this.player = null;
} catch (error) {}
this.$nextTick(() => {
this.loadVideo();
});
}
},
pause() {
this.player && this.player?.pause();
},
destroy() {
if (this.player) {
this.player?.pause();
this.player?.unload();
this.player?.detachMediaElement();
this.player?.destroy();
this.player = null;
}
if (this.interval) {
clearInterval(this.interval);
}
},
},
data() {
return {
cameraLoading: true,
supported: false,
player: null,
interval: null,
};
},
mounted() {
// console.log('videoData', this.videoData);
this.player = null;
this.supported = flvjs.isSupported();
this.$nextTick(() => {
this.loadVideo();
});
this.interval = setInterval(() => {
if (this.cameraLoading) {
this.handleErr();
} else {
clearInterval(this.interval);
}
}, 5000);
},
beforeDestroy() {
this.destroy();
},
};
</script>
<style lang="less" scoped>
.loading-mask {
border-radius: 4px;
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(8, 22, 35, 0.7);
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
color: #fcfcfc;
}
.cameraVideo {
position: relative;
.videoControl {
// display: none;
position: absolute;
height: 100%;
width: 100%;
}
// .vIsVisible {
// display: unset;
// }
}
::v-deep .el-icon-loading {
position: absolute;
left: 30%;
top: -14px;
transform: translateX(-50%);
}
</style>
......@@ -72,7 +72,6 @@ export default {
sources: [
{
src: `${this.ownVideoData.videoUrl}`,
// src:'http://112.113.230.26:83/openUrl/eRqwh35/live.m3u8',
type: "application/x-mpegURL",
},
],
......@@ -92,24 +91,6 @@ export default {
// this.player = null;
this.ownVideoData = targetCamera;
setTimeout(() => {
// this.player = Videojs(document.getElementById(this.ownVideoData.oid), {
// autoplay: "muted", //自动播放
// controls: true, //用户可以与之交互的控件
// loop: true, //视频一结束就重新开始
// fill: true,
// techOrder: ["html5", "flvjs"], // 兼容顺序
// html5: {
// hls: {
// withCredentials: true,
// },
// },
// sources: [
// {
// src: targetCamera.videoUrl,
// type: "application/x-mpegURL",
// },
// ],
// });
this.player.src([
{
src: targetCamera.videoUrl,
......
<template>
<div class="track3D-container" :id="cId"></div>
</template>
<script>
let viewer = null;
export default {
name: "cesiumMap",
props: ["cId", "loadTileset"],
components: {},
watch: {},
data() {
return {};
},
computed: {},
methods: {
loadMap() {
Cesium.Ion.defaultAccessToken =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1OWE5YzQ2ZS05NDYzLTQ3NTEtYTZhOC0yNDhmMmIyY2I5ZTAiLCJpZCI6MTA0MTAyLCJpYXQiOjE2ODU2MTMxOTB9.JxmgXnf8_-V1eM9we2W8VfiP37vyGMJJDSWF4Br6hKU";
viewer = new Cesium.Viewer(this.cId, {
targetFrameRate: 30, // 目标帧率
animation: false, // 隐藏动画控件
baseLayerPicker: false, // 隐藏图层选择控件
fullscreenButton: false, // 隐藏全屏按钮
vrButton: false, // 隐藏VR按钮,默认false
geocoder: false, // 隐藏地名查找控件
homeButton: false, // 隐藏Home按钮
// infoBox: true, // 隐藏点击要素之后显示的信息窗口
infoBox: false, // 隐藏点击要素之后显示的信息窗口
sceneModePicker: false, // 隐藏场景模式选择控件
selectionIndicator: false, // 显示实体对象选择框,默认true
timeline: true, // 时间线控件
navigationHelpButton: false, // 隐藏帮助按钮
scene3DOnly: true, // 每个几何实例将只在3D中呈现,以节省GPU内存
shouldAnimate: true, // 开启动画自动播放
sceneMode: 3, // 初始场景模式 1:2D 2:2D循环 3:3D,默认3
requestRenderMode: true, // 减少Cesium渲染新帧总时间并减少Cesium在应用程序中总体CPU使用率
imageryProvider: false,
// 如场景中的元素没有随仿真时间变化,请考虑将设置maximumRenderTimeChange为较高的值,例如Infinity
// maximumRenderTimeChange: Infinity,
// shadows: true, // 阴影
// imageryProvider: new Cesium.UrlTemplateImageryProvider({
// url: cesium_config.baseMap,
// fileExtension: "png"
// }),
// imageryProvider:new Cesium.ArcGisMapServerImageryProvider({
// url: 'https://server.arcgisonline.com/arcgis/rest/services/World_Terrain_Base/MapServer'
// }),
});
viewer.scene.globe.baseColor = Cesium.Color.fromCssColorString("#112e4a"); //改变空球的颜色
// 添加光源
viewer.scene.light = new Cesium.DirectionalLight({
direction: new Cesium.Cartesian3(0.354925, -0.890918, -0.283358),
intensity: cesium_config.tilesetIntensity || 0.5,
});
if (this.loadTileset) {
const tileset = new Cesium.Cesium3DTileset({
url: cesium_config.tile3dURL,
skipLevelOfDetail: true,
baseScreenSpaceError: 1024,
skipScreenSpaceErrorFactor: 16,
skipLevels: 1,
immediatelyLoadDesiredLevelOfDetail: false,
loadSiblings: false,
cullWithChildrenBounds: true,
dynamicScreenSpaceError: true,
dynamicScreenSpaceErrorDensity: 0.00278,
dynamicScreenSpaceErrorFactor: 4.0,
dynamicScreenSpaceErrorHeightFalloff: 0.25,
});
tileset.readyPromise.then(() => {
window.tileset = tileset;
this.$emit("tilesetReady");
//计算tileset的绑定范围
let boundingSphere = tileset.boundingSphere;
//计算中心点位置
let cartographic = Cesium.Cartographic.fromCartesian(
boundingSphere.center
);
//计算中心点位置的地表坐标
let surface = Cesium.Cartesian3.fromRadians(
cartographic.longitude,
cartographic.latitude,
0.0
);
console.log("tileset自身center : ", [
Cesium.Math.toDegrees(cartographic.longitude),
Cesium.Math.toDegrees(cartographic.latitude),
]);
// 偏移tileset到指定位置
let heightOffset = cesium_config.tilesetHeightOffset;
let x = Cesium.Math.toDegrees(cartographic.longitude);
let y = Cesium.Math.toDegrees(cartographic.latitude);
let offset = Cesium.Cartesian3.fromRadians(
cesium_config.tilesetOffsetX
? Cesium.Math.toRadians(x + cesium_config.tilesetOffsetX)
: cartographic.longitude,
cesium_config.tilesetOffsetY
? Cesium.Math.toRadians(y + cesium_config.tilesetOffsetY)
: cartographic.latitude,
heightOffset
);
let translation = Cesium.Cartesian3.subtract(
offset,
surface,
new Cesium.Cartesian3()
);
//tileset.modelMatrix转换
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation);
});
viewer.scene.primitives.add(tileset);
}
viewer.cesiumWidget.creditContainer.style.display = "none";
// 以下设置为了使cesium地图鼠标控制符合mapbox习惯
// 关闭双击事件
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(
Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
);
// 鼠标右键旋转
viewer.scene.screenSpaceCameraController.tiltEventTypes = [
Cesium.CameraEventType.RIGHT_DRAG,
];
// 中键滚动缩放
viewer.scene.screenSpaceCameraController.zoomEventTypes = [
Cesium.CameraEventType.WHEEL,
];
// 鼠标左键平移
viewer.scene.screenSpaceCameraController.rotateEventTypes = [
Cesium.CameraEventType.LEFT_DRAG,
];
viewer.scene.globe.enableLighting = true;
viewer.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(
...cesium_config.center,
cesium_config.zoomHeight
),
orientation: {
heading: Cesium.Math.toRadians(0), // 旋转角度
pitch: Cesium.Math.toRadians(-90.0), // 相机方向
},
duration: 0.5,
});
return viewer;
},
},
mounted() {},
created() {},
beforeDestroy() {
viewer?.destroy();
},
};
</script>
<style>
.cesium-viewer-timelineContainer {
z-index: 15;
left: 625px !important;
width: 1025px !important;
bottom: 35px !important;
height: 40px !important;
}
.cesium-timeline-bar {
height: 30px;
}
.cesium-timeline-main {
height: inherit;
}
.cesium-timeline-trackContainer {
height: unset !important;
}
/* pop框css*/
.cesium-popup-panel {
opacity: 0.8;
position: absolute;
z-index: 0;
}
.cesium-popup-close-btn > svg:hover {
color: #00fcf9 !important;
}
.cesium-popup-close-btn > svg {
display: none;
user-select: auto;
color: #4674d6;
cursor: pointer;
width: 15px;
}
.cesium-viewer {
position: unset;
}
</style>
......@@ -45,7 +45,7 @@ let map11, map12;
import mapAssets from "../../../../config/holo/mapAssets";
import * as mapTools from "../../../../utils/mapboxTools";
import { getTurnFlow, getTurnLines } from "../../../../dao/analysis";
import wMap from "../../../../components/Standard/map/index.vue";
import wMap from "../../../../components/Standard/mapMapbox.vue";
export default {
name: "part1",
components: { wMap },
......
......@@ -9,10 +9,9 @@
</template>
<script>
import wMap from "../../../../components/Standard/map/index.vue";
import { getPart5Text } from "../../../../dao/analysis";
export default {
components: { wMap },
components: { },
name: "part5",
props: ["currentCross", "queryParams","Vises"],
data() {
......
......@@ -130,7 +130,7 @@
</template>
<script>
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import Pigination from "../../components/Standard/pigination.vue";
export default {
name: "reportArea",
......
......@@ -130,7 +130,7 @@
</template>
<script>
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import Pigination from "../../components/Standard/pigination.vue";
export default {
name: "reportArtery",
......
......@@ -174,7 +174,7 @@
<script>
import mapAssets from "../../config/holo/mapAssets";
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import Pigination from "../../components/Standard/pigination.vue";
import Reports from "./historyReports/index.vue";
import {
......
......@@ -279,7 +279,7 @@ import {
passerbyEfficiency,
vehicleEfficiency,
} from "../../dao/efficiency";
import PathMapCtrl from "../../components/Standard/map/pathMap/index.vue";
import PathMapCtrl from "../../components/PathMap/index.vue";
export default {
components: {
......
......@@ -80,7 +80,7 @@
<script>
import { getEfficiencyRank } from "../../dao/efficiency";
import MsgCard from "../../components/Standard/msg-card.vue";
import WMap from "../../components/Standard/map/index.vue";
import WMap from "../../components/Standard/mapMapbox.vue";
import mapAssets from "../../config/holo/mapAssets";
import {
addOrUpdateCross,
......
......@@ -190,7 +190,7 @@ import {
orgCrossPolygon,
helmetRateImages,
} from "../../dao/organization";
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import MapFlow from "./mapFlow.vue";
import MapConflict from "./mapConflict.vue";
import MapTrack from "./mapTrack.vue";
......
......@@ -56,7 +56,7 @@
<script>
import MsgCard from "../../components/Standard/msg-card.vue";
import WMap from "../../components/Standard/map/index.vue";
import WMap from "../../components/Standard/mapMapbox.vue";
import { orgRank } from "../../dao/organization";
import mapAssets from "../../config/holo/mapAssets";
import {
......
......@@ -24,7 +24,7 @@
let map;
const conflictOptions = ["机非", "人非", "机机", "人机"];
import { orgConflict } from "../../dao/organization";
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import { addOrUpdateEventHeat } from "../../utils/mapboxTools";
export default {
name: "mapConflict",
......
......@@ -17,7 +17,7 @@ import {
orgFlowByLane,
orgLaneLine,
} from "../../dao/organization";
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import mapAssets from "../../config/holo/mapAssets";
import {
addOrUpdateFlowLine,
......
......@@ -12,7 +12,7 @@
<script>
let map;
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import { addOrUpdateTrackPointVector } from "../../utils/mapboxTools";
export default {
name: "mapTrack",
......
......@@ -120,7 +120,7 @@ import {
safetyPieData,
safetySeveralCycle,
} from "../../dao/safety";
import PathMapCtrl from "../../components/Standard/map/pathMap/index.vue";
import PathMapCtrl from "../../components/PathMap/index.vue";
export default {
name: "anaTypes",
props: ["compId", "total", "crossData", "dayType", "dataType"],
......
......@@ -128,7 +128,7 @@ import MsgCard from "../../components/Standard/msg-card.vue";
import AnaTypes from "./analysisTypes.vue";
import { safetyCompare } from "../../dao/safety";
import BottomCameras from "./bottomCameras.vue";
import PathMapCtrl from "../../components/Standard/map/pathMap/index.vue";
import PathMapCtrl from "../../components/PathMap/index.vue";
import LoopVideo from "../../components/Standard/loopVideo.vue";
export default {
......
......@@ -77,7 +77,7 @@
<script>
import MsgCard from "../../components/Standard/msg-card.vue";
import WMap from "../../components/Standard/map/index.vue";
import WMap from "../../components/Standard/mapMapbox.vue";
import mapAssets from "../../config/holo/mapAssets";
import { safetyRank } from "../../dao/safety";
import {
......
......@@ -146,7 +146,7 @@ import crossContent from "./crossContent.vue";
import { api_evaluateCrossDetail, api_evaluateMetrics } from "@/dao/signal.js";
import timeSlider from "./timeSlider.vue";
// import MapCompWithCtrl from "../../components/Standard/map/mapCompWithCtrl.vue";
import PathMapCtrl from "../../components/Standard/map/pathMap/index.vue";
import PathMapCtrl from "../../components/PathMap/index.vue";
let signalMap = null;
export default {
name: "dialogCross",
......
......@@ -65,7 +65,7 @@
<script>
import Vue from "vue";
import wMap from "../../components/Standard/map/index.vue";
import wMap from "../../components/Standard/mapMapbox.vue";
import LayersSwitch from "./switchers/layersSwitch.vue";
import MessageBoxes from "./floatData/messageBoxes.vue";
import CrossDetail from "./crossDetail.vue";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment