diff --git a/src/request/map.js b/src/request/map.js
index 92baed3..5487198 100644
--- a/src/request/map.js
+++ b/src/request/map.js
@@ -9,6 +9,7 @@ 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);
export const getConfinedspaceWorkList = (params) =>
post("/map/getConfinedspaceWorkList", params);
diff --git a/src/views/BI/components/bottom_options.vue b/src/views/BI/components/bottom_options.vue
index 81a89a4..30856a0 100644
--- a/src/views/BI/components/bottom_options.vue
+++ b/src/views/BI/components/bottom_options.vue
@@ -43,6 +43,7 @@ import {
handleConfinedspaceWork,
handleHighWork
} from "@/views/BI/js/eight_work.js";
+import { handleCamera } from "@/views/BI/js/camera.js";
const props = defineProps({
leftCurrentComponent: {
@@ -113,6 +114,7 @@ const bottomOptionsList = [
).href,
title: "电子围栏",
type: "electronicFence",
+ check: false,
action: handleFence,
},
],
@@ -225,8 +227,9 @@ const bottomOptionsList = [
import.meta.url
).href,
title: "摄像头",
- type: "camera",
+ type: "workSafelyCamera",
check: false,
+ action: handleCamera,
},
],
},
@@ -342,7 +345,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 0217a6a..8ba6ce8 100644
--- a/src/views/BI/js/map.js
+++ b/src/views/BI/js/map.js
@@ -3,6 +3,7 @@ import userDialog from "../components/dialog/user_dialog.vue";
import hotworkDialog from "../components/dialog/hotwork_dialog.vue";
import confinedspaceDialog from "../components/dialog/confinedspace_dialog.vue";
import highworkDialog from "../components/dialog/highwork_dialog.vue";
+import cameraDialog from "../components/dialog/camera_dialog.vue";
import { Loadglb } from "./loadglb.js";
import { getUserByCardNo } from "@/request/map";
@@ -11,6 +12,7 @@ import {
getHighWorkView,
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;
@@ -67,7 +69,6 @@ const handleMouseClick = () => {
const $mouse = new window.CustomCesium.Mouse(window.$icy);
// 隐藏逻辑
$mouse.mouseLeft((model) => {
- console.log(model);
if (model._name === "建筑") {
clickBuilding(model);
}
@@ -83,6 +84,9 @@ const handleMouseClick = () => {
if (model._name.indexOf("高处作业") > -1) {
clickHighwork(model);
}
+ if (model._name.indexOf("八项作业摄像头") > -1) {
+ clickCamera(model);
+ }
});
};
@@ -196,6 +200,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;