diff --git a/src/request/map.js b/src/request/map.js
index 81d5b34..b084647 100644
--- a/src/request/map.js
+++ b/src/request/map.js
@@ -7,3 +7,4 @@ export const getUserByCardNo = (params) =>
export const getEightWorks = (params) => post("/map/getEightWorks", params);
export const getHotworkList = (params) => post("/map/getHotworkList", params);
+export const getCameraList = (params) => post("/map/getCameraList", params);
diff --git a/src/views/BI/components/bottom_options.vue b/src/views/BI/components/bottom_options.vue
index 69a8190..29e9cfd 100644
--- a/src/views/BI/components/bottom_options.vue
+++ b/src/views/BI/components/bottom_options.vue
@@ -39,6 +39,7 @@ import VideoAIAnalysisRight from "@/views/BI/components/video_ai_analysisRight.v
import { useVModels } from "@vueuse/core";
import { handleTrajectory } from "@/views/BI/js/trajectory.js";
import { handleHortwork } from "@/views/BI/js/eight_work.js";
+import { handleCamera } from "@/views/BI/js/camera.js";
const props = defineProps({
leftCurrentComponent: {
@@ -219,8 +220,9 @@ const bottomOptionsList = [
import.meta.url
).href,
title: "摄像头",
- type: "camera",
+ type: "workSafelyCamera",
check: false,
+ action: handleCamera,
},
],
},
@@ -336,7 +338,7 @@ const fnBottomChildOptionsListChange = (index, item1, index1) => {
data.bottomOptionsList[index].list[index1].check =
!data.bottomOptionsList[index].list[index1].check;
data.bottomOptionsList[index].list[index1].action(
- data.bottomOptionsList[index].list[index1].check
+ data.bottomOptionsList[index].list[index1].check,item1.type
);
};
diff --git a/src/views/BI/components/dialog/camera_dialog.vue b/src/views/BI/components/dialog/camera_dialog.vue
new file mode 100644
index 0000000..ac7c784
--- /dev/null
+++ b/src/views/BI/components/dialog/camera_dialog.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+ {{ data.info.cameraType }}
+
+ 摄像头名称:{{ data.info.VIDEONAME }}
+ |
+
+
+
+ 摄像头编码 |
+ {{ data.info.CODE }} |
+
+
+
+
+
+
+ |
+
+
+
+ 关闭
+
+
+
+
+
+
+
diff --git a/src/views/BI/components/video_ai_analysisRight.vue b/src/views/BI/components/video_ai_analysisRight.vue
index 03304a4..07404b7 100644
--- a/src/views/BI/components/video_ai_analysisRight.vue
+++ b/src/views/BI/components/video_ai_analysisRight.vue
@@ -36,8 +36,8 @@
{{ item.WARNING_TIME }}
- {{ "摄像头名称" + item.VIDEONAME }}
- {{ "摄像头编号" + item.CODE }}
+ {{ "摄像头名称:" + item.VIDEONAME }}
+ {{ "摄像头编号:" + item.CODE }}
diff --git a/src/views/BI/js/camera.js b/src/views/BI/js/camera.js
new file mode 100644
index 0000000..9d6c526
--- /dev/null
+++ b/src/views/BI/js/camera.js
@@ -0,0 +1,37 @@
+import { getCameraList } from "@/request/map";
+import { addEntity } from "./map.js";
+
+let cameraList = [];
+
+export const handleCamera = (b, type) => {
+ if (b) {
+ showCameraList(type);
+ } else {
+ if (cameraList) {
+ cameraList.children.forEach((e) => {
+ e.destroy();
+ });
+ }
+ }
+};
+
+const showCameraList = async (mapPointName) => {
+ cameraList = new window.CustomCesium.GroupModel(mapPointName);
+ const { varList } = await getCameraList({ CAMREA_TYPE: mapPointName });
+ const NAME_POINT = {
+ workSafelyCamera: "八项作业摄像头",
+ };
+ varList.forEach(({ VIDEOMANAGER_ID, VIDEONAME, lon, lat, alt }) => {
+ addEntity(
+ cameraList,
+ VIDEOMANAGER_ID,
+ NAME_POINT[mapPointName],
+ VIDEONAME,
+ lon,
+ lat,
+ alt,
+ "/src/assets/images/map/bottom/ico12_on.png"
+ );
+ });
+ cameraList.show(true);
+};
diff --git a/src/views/BI/js/map.js b/src/views/BI/js/map.js
index 34daa9e..196c645 100644
--- a/src/views/BI/js/map.js
+++ b/src/views/BI/js/map.js
@@ -1,10 +1,12 @@
import { h, render, ref } from "vue";
import userDialog from "../components/dialog/user_dialog.vue";
import hotworkDialog from "../components/dialog/hotwork_dialog.vue";
+import cameraDialog from "../components/dialog/camera_dialog.vue";
import { Loadglb } from "./loadglb.js";
import { getUserByCardNo } from "@/request/map";
import { getHotWorkView } from "@/request/eight_work.js";
+import { getVideoManagerView } from "@/request/video_manager.js";
// const mapUrl =
// "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}";
const loadMap = 2;
@@ -61,6 +63,7 @@ const handleMouseClick = () => {
const $mouse = new window.CustomCesium.Mouse(window.$icy);
// 隐藏逻辑
$mouse.mouseLeft((model) => {
+ console.log("model");
console.log(model);
if (model._name === "建筑") {
clickBuilding(model);
@@ -71,6 +74,9 @@ const handleMouseClick = () => {
if (model._name.indexOf("动火作业") > -1) {
clickHotwork(model);
}
+ if (model._name.indexOf("八项作业摄像头") > -1) {
+ clickCamera(model);
+ }
});
};
@@ -184,6 +190,13 @@ const clickPerson = async (model) => {
const { pd } = await getUserByCardNo({ CARDNO: cacrdNo });
handleDialog(userDialog, pd);
};
+const clickCamera = async (model) => {
+ const id = model._id;
+ const pd = await getVideoManagerView({ VIDEOMANAGER_ID: id });
+ pd.pd.cameraType = model._name;
+ console.log(pd);
+ handleDialog(cameraDialog, pd);
+};
const clickHotwork = async (model) => {
const id = model._id;