forked from integrated_whb/integrated_whb_vue
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/request/map.js # src/views/BI/components/bottom_options.vue # src/views/BI/js/map.jspull/1/head
commit
f4490f70b7
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
);
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
<template>
|
||||
<el-dialog v-model="visible" title="摄像头">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="10" style="border: none">
|
||||
<el-divider content-position="left">
|
||||
{{ data.info.cameraType }}
|
||||
</el-divider>
|
||||
<div class="tr">摄像头名称:{{ data.info.VIDEONAME }}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td class="title">摄像头编码</td>
|
||||
<td>{{ data.info.CODE }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="10">
|
||||
<div class="video">
|
||||
<iframe
|
||||
:src="data.info.VIDEOURL"
|
||||
style="width: 100%; height: 100%"
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<template #footer>
|
||||
<el-button @click="fnClose">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useVModels } from "@vueuse/core";
|
||||
import { reactive, onMounted } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
visible: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
pd: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({}),
|
||||
},
|
||||
});
|
||||
|
||||
const data = reactive({
|
||||
info: {},
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
data.info = props.pd.pd;
|
||||
});
|
||||
|
||||
const emits = defineEmits(["update:visible"]);
|
||||
const { visible } = useVModels(props, emits);
|
||||
const fnClose = () => {
|
||||
visible.value = false;
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
.video {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border: 2px solid #11acd7;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
border: 1px solid var(--el-border-color);
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title {
|
||||
background: var(--el-fill-color-light);
|
||||
width: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -36,8 +36,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="time">{{ item.WARNING_TIME }}</div>
|
||||
<div class="text">{{ "摄像头名称" + item.VIDEONAME }}</div>
|
||||
<div class="text">{{ "摄像头编号" + item.CODE }}</div>
|
||||
<div class="text">{{ "摄像头名称:" + item.VIDEONAME }}</div>
|
||||
<div class="text">{{ "摄像头编号:" + item.CODE }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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);
|
||||
};
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue