2024-10-12 木垒-第一版本

This commit is contained in:
Rain 2024-10-12 19:17:13 +08:00
parent c099525b4c
commit 788149e252
7 changed files with 2588 additions and 82 deletions

View File

@ -1868,13 +1868,18 @@ export const DLJBMenu: Array<any> = [
export const ZMMLMenu: Array<any> = [
{
moduleName: "综合管理",
modulePath: "/projectOverview",
menuList: [
{
menuName: "工程概况",
companyPath: "/projectOverview"
}
]
modulePath: "/projectOverviewer",
// menuList: [
// {
// menuName: "工程概况",
// companyPath: "/projectOverviewer"
// },
// {
// menuName: "工程概况",
// companyPath: "/projectOverview"
// }
// ]
},
{
moduleName: "数字工地",

View File

@ -70,6 +70,11 @@
<!-- </Card> -->
<Card title="项目展示" @click="toggleMapSwitch">
<div class="fullScreen">
<el-icon :size="20" color="#fff">
<FullScreen />
</el-icon>
</div>
<!-- 地图页面 -->
<ProjectShow v-if="swtichboxmap" />
</Card>
@ -382,6 +387,12 @@ onMounted(async () => {
top: 55%;
z-index: 10;
}
.fullScreen {
position: absolute;
right: 24px;
top: 8px;
cursor: pointer;
}
.top-tab {
position: absolute;

View File

@ -24,6 +24,9 @@ import "mars3d-cesium/Build/Cesium/Widgets/widgets.css";
let props = defineProps({
parentFunc: {
type: Function
},
parentFuncer: {
type: Function
}
});
@ -42,6 +45,7 @@ const store = GlobalStore();
import { arealistmap } from "@/api/modules/projectshow";
import { statBigScreeneq } from "@/api/modules/vehicle";
import { selectEnableVideoItemList } from "@/api/modules/projectshow";
import resultdata from "./mulei.json";
//
const areadata = ref([]);
@ -86,8 +90,9 @@ onMounted(async () => {
},
control: {
// baseLayerPicker: true // basemaps
logo: false, //
logo: false //
// baseLayerPicker: true
// fullscreenButton: true
},
// terrain: {
// url: "//data.mars3d.cn/terrain",
@ -108,13 +113,24 @@ onMounted(async () => {
// // url: "http://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
// // subdomains: ["1", "2", "3", "4"],
// // show: true //
// },
// }
{
name: "天地图影像",
icon: "img/basemaps/tdt_img.png",
// http://mars3d.cn/example/img/basemaps/tdt_img.png
type: "tdt",
layer: "img_d",
show: true,
show: true
}
],
//
layers: [
{
name: "天地图注记",
type: "tdt",
// layer: "ter_z", // 线
layer: "vec_z", //
show: true
}
]
});
@ -147,22 +163,91 @@ onMounted(async () => {
// console.log("123");
// }, 5000);
graphicLayer = new mars3d.layer.GraphicLayer();
map.addLayer(graphicLayer);
//
// var locations = [
// { name: "", position: [90.628882, 44.285162] },
// { name: "", position: [90.90433, 44.388033] }
// // { name: "鸿", position: [90.667185, 44.354859] }
// ];
// locations.forEach(location => {
// //
// // const point = new mars3d.graphic.PointPrimitive({
// // position: location.position, //
// // style: {
// // color: "#FF0000", //
// // pixelSize: 10, //
// // outline: true, //
// // outlineColor: "#FFFFFF", //
// // outlineWidth: 2 //
// // }
// // });
// //
// const label = new mars3d.graphic.LabelPrimitive({
// position: location.position, //
// style: {
// text: location.name, //
// font: "16px sans-serif", //
// fillColor: "#FFFFFF", //
// outlineColor: "#1f1f1f", //
// outlineWidth: 5, //
// scale: 1.0, //
// horizontalOrigin: mars3d.Cesium.HorizontalOrigin.CENTER, //
// verticalOrigin: mars3d.Cesium.VerticalOrigin.BOTTOM //
// }
// });
// //
// // graphicLayer.addGraphic(point);
// graphicLayer.addGraphic(label);
// });
// json-
// const geojsonLayer = new mars3d.layer.GeoJsonLayer({
// url: "resultdata",
// style: {
// color: "#ff0000",
// opacity: 0.5,
// outline: true,
// outlineColor: "#0000ff",
// outlineWidth: 2
// }
// });
// map.addLayer(geojsonLayer);
window.addEventListener("keydown", handleKeyDown);
});
//
onBeforeUnmount(() => {
// map?.destroy();
window.removeEventListener("keydown", handleKeyDown);
// window.removeEventListener("keydown", handleKeyDown);
});
const handleKeyDown = (event: KeyboardEvent) => {
console.log("=====================", event);
console.log("=====================", event.key);
console.log("=====================", event.repeat);
// Esc
if (event.key === "Escape") {
console.log("Esc 键被按下===================");
//
EntityMap.Mapswitch = true;
}
// F11
if (event.key === "F11") {
console.log("F11 键被按下===================");
//
props.parentFuncer();
}
};
const datatitle = ref(1);
@ -266,13 +351,15 @@ const getareadata = async () => {
}
//
const geojsonLayer = JSON.parse(item.regionValue);
console.log("geojsonLayer", geojsonLayer);
if (item.regionValue && item.regionValue.length > 1) {
const geojsonLayer = JSON.parse(item.regionValue);
console.log("geojsonLayer", geojsonLayer);
geojsonLayer.features.forEach(item => {
console.log("每块区域", item);
addDemoGraphic14(item);
});
geojsonLayer.features.forEach(item => {
console.log("每块区域", item);
addDemoGraphic14(item);
});
}
});
} else {
graphicLayer = new mars3d.layer.GraphicLayer();
@ -354,18 +441,19 @@ function addDemoGraphic2(item) {
scale: Number(item.scale) + Number(200) || 200,
// scale: item.scale || 200,
clampToGround: false, //
clampToGround: item.clampToGround == 1 ? true : false, //
heading: item.heading, // Z
pitch: item.pitch, // X
roll: item.roll // Y
// label: {
// text: item.name,
// font_size: 10,
// color: "#1f1f1f",
// verticalOrigin: Cesium.VerticalOrigin.TOP, //
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER, //
// pixelOffset: new Cesium.Cartesian2(0, -100) // 20
// }
roll: item.roll, // Y
label: {
text: item.name,
font_size: 12,
color: "#eaeff0",
verticalOrigin: Cesium.VerticalOrigin.TOP,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER
// pixelOffset: new Cesium.Cartesian2(0, -50),
// scaleByDistance: new Cesium.NearFarScalar(1000, 1.0, 1000000, 0.1)
}
},
attr: { remark: item.name, id: item.id, name: item.name, code: item.code, treeId: item.qualityRegionId }
});

View File

@ -32,7 +32,7 @@
<div class="left-icon" />
<div class="left-shi" />
</div>
<div class="video-con">
<div class="video-con" v-if="videolistdiaswtich">
<VideoPreview v-if="!EntityMap.Mapswitch" ref="videoPreviewRef" />
</div>
</div>
@ -172,7 +172,7 @@
<el-table-column prop="workerName" label="人员姓名" align="center" />
<el-table-column label="照片" align="center">
<template #default="scope">
<el-popover placement="top" trigger="click" width="auto">
<el-popover placement="right" trigger="click" width="auto">
<template #reference>
<el-image
style="width: 50px; height: 50px"
@ -181,11 +181,11 @@
/>
</template>
<!-- <el-image
<el-image
:src=" BASEURL + '/image/' + scope.row.fieldAcquisitionUrl"
fit="contain"
style="max-width: 80vw; max-height: 80vh"
/>-->
/>
</el-popover>
</template>
</el-table-column>
@ -275,7 +275,7 @@
<div class="dialog-potential dialog-box direction-map" v-if="potentialswitch">
<div class="dialog-title justifyitems-map">
隐患记录
<div class="but-rectify">超期整改</div>
<div class="but-rectify" v-if="safetytableobj.overTime == true && safetytableobj.status != 6">超期</div>
<div class="delete-icon" @click="ondirection(1,1,false)"></div>
</div>
@ -688,7 +688,7 @@ const unitdutydata = [
},
{
value: "7",
label: "超期未关闭"
label: "已撤回"
}
];
@ -712,7 +712,7 @@ const getvideolist = async item => {
});
videoList.value = res.result.list;
if (videoList.value.length > 1) {
if (videoList.value.length > 1 && item.length > 1) {
console.log("所有摄像头数据123", videoList.value);
//
@ -824,7 +824,7 @@ const handleEditxiazia = item => {
let data = JSON.parse(item.fileUrl);
console.log("data", data);
const url = BASEURL + "/image/" + data.fileUrl; // URL
const url = BASEURL + "/image/" + data.filename; // URL
// const link = document.createElement("a");
// link.href = url;
// link.download = item.fileUrl; //
@ -960,11 +960,13 @@ const ondirection = (index, row, item) => {
if (EntityMap.Mapswitch) return;
potentialswitch.value = item;
if (item) {
// videoPreviewRef.value.handleHide();
videoPreviewRef.value.handleHide();
console.log("查看详情数据", row);
safetytableobj.value = row;
} else {
// videoPreviewRef.value.handleShow();
setTimeout(() => {
videoPreviewRef.value.handleShow();
}, 1000);
safetytableobj.value = {};
}
};
@ -985,7 +987,9 @@ const onticket = item => {
if (item) {
videoPreviewRef.value.handleHide();
} else {
videoPreviewRef.value.handleShow();
setTimeout(() => {
videoPreviewRef.value.handleShow();
}, 1000);
}
};
@ -994,13 +998,13 @@ const getareasafetyHatFence = async item => {
const res: any = await areasaWorker({
projectSn: store.sn,
// id
qualityRegionId: item
id: item
});
console.log("查询区域人数", res);
console.log("res.result[0].workerNum", res.result[0].workerNum);
console.log("res.result[0].workerNum", res.result);
publicpeoper.value = res.result[0].workerNum;
publicpeoper.value = res.result;
};
//
@ -1024,6 +1028,19 @@ const getTeamInfoList = async () => {
console.log("查询班组", res);
teamdutydata.value = res.result.list;
};
//
const videolistdiaswtich = ref(true);
const ondialogswtich = () => {
console.log("摄像头中转销毁");
videoPreviewRef.value.oncloseRequestInterface();
};
defineExpose({
getvideolist,
ondialogswtich
});
</script>
<style lang="scss" scoped>
@ -1449,7 +1466,7 @@ const getTeamInfoList = async () => {
height: 670px;
left: 50%;
top: 52%;
transform: translate(-50%, -60%);
transform: translate(-50%, -56%);
padding: 30px;
.dialog-title {

View File

@ -103,7 +103,7 @@ const onplayvideo = async () => {
};
onBeforeUnmount(() => {
if (oWebControl.value != null) {
if (oWebControl.value) {
//
oWebControl.JS_HideWnd();
//
@ -298,11 +298,25 @@ const handleShow = () => {
oWebControl.JS_ShowWnd();
};
const oncloseRequestInterface = () => {
console.log("执行====================oWebControl.value", oWebControl.value);
console.log("执行摄像头销毁");
//
oWebControl.JS_HideWnd();
//
oWebControl.JS_RequestInterface({ funcName: "destroyWnd" });
//
oWebControl.JS_Disconnect();
};
// 便访
defineExpose({
handleHide,
handleShow,
previewVideo
previewVideo,
oncloseRequestInterface
});
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
<template>
<div class="project-box">
<!-- 地图背景 -->
<MapBack :parentFunc="ondialogopen" />
<MapBack :parentFunc="ondialogopen" :parentFuncer="onclosemapf" />
<!-- <div :class="dialogstyleswtich ? 'dialog-box' : 'dialoger-box'" v-if="dialogswtich"> -->
<div class="dialog-box" v-if="dialogswtich">
<!-- <div class="dialog-box"> -->
<MapDialog ref="MapDialogbox" :parentFunc="onclosedualog" />
@ -30,6 +31,8 @@ const MapDialogbox = ref(null);
//
const dialogswtich = ref(false);
const dialogstyleswtich = ref(true);
//
const ondialogopen = item => {
console.log("风机数据", item);
@ -38,6 +41,15 @@ const ondialogopen = item => {
EntityMap.draughtdata = item;
};
const onclosemapf = () => {
if (dialogswtich.value) {
MapDialogbox.value.ondialogswtich();
}
dialogswtich.value = false;
// dialogstyleswtich.value = false;
};
//
const onclosedualog = () => {
dialogswtich.value = false;
@ -53,8 +65,8 @@ const onclosedualog = () => {
// background: skyblue;
.dialog-box {
width: 70%;
height: 72%;
width: 1230px;
height: 708px;
position: absolute;
// position: relative;
left: 48%;
@ -64,6 +76,18 @@ const onclosedualog = () => {
z-index: 999;
}
.dialoger-box {
width: 1230px;
height: 708px;
position: absolute;
// position: relative;
left: 48%;
top: 47%;
transform: translate(-50%, -60%);
// background: yellow;
z-index: 999;
}
//
.project-but {
width: 100%;