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> = [ export const ZMMLMenu: Array<any> = [
{ {
moduleName: "综合管理", moduleName: "综合管理",
modulePath: "/projectOverview", modulePath: "/projectOverviewer",
menuList: [ // menuList: [
{ // {
menuName: "工程概况", // menuName: "工程概况",
companyPath: "/projectOverview" // companyPath: "/projectOverviewer"
} // },
] // {
// menuName: "工程概况",
// companyPath: "/projectOverview"
// }
// ]
}, },
{ {
moduleName: "数字工地", moduleName: "数字工地",

View File

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

View File

@ -24,6 +24,9 @@ import "mars3d-cesium/Build/Cesium/Widgets/widgets.css";
let props = defineProps({ let props = defineProps({
parentFunc: { parentFunc: {
type: Function type: Function
},
parentFuncer: {
type: Function
} }
}); });
@ -42,6 +45,7 @@ const store = GlobalStore();
import { arealistmap } from "@/api/modules/projectshow"; import { arealistmap } from "@/api/modules/projectshow";
import { statBigScreeneq } from "@/api/modules/vehicle"; import { statBigScreeneq } from "@/api/modules/vehicle";
import { selectEnableVideoItemList } from "@/api/modules/projectshow"; import { selectEnableVideoItemList } from "@/api/modules/projectshow";
import resultdata from "./mulei.json";
// //
const areadata = ref([]); const areadata = ref([]);
@ -86,8 +90,9 @@ onMounted(async () => {
}, },
control: { control: {
// baseLayerPicker: true // basemaps // baseLayerPicker: true // basemaps
logo: false, // logo: false //
// baseLayerPicker: true // baseLayerPicker: true
// fullscreenButton: true
}, },
// terrain: { // terrain: {
// url: "//data.mars3d.cn/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}", // // url: "http://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
// // subdomains: ["1", "2", "3", "4"], // // subdomains: ["1", "2", "3", "4"],
// // show: true // // // show: true //
// }, // }
{ {
name: "天地图影像", name: "天地图影像",
icon: "img/basemaps/tdt_img.png", icon: "img/basemaps/tdt_img.png",
// http://mars3d.cn/example/img/basemaps/tdt_img.png
type: "tdt", type: "tdt",
layer: "img_d", 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"); // console.log("123");
// }, 5000); // }, 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); window.addEventListener("keydown", handleKeyDown);
}); });
// //
onBeforeUnmount(() => { onBeforeUnmount(() => {
// map?.destroy(); // map?.destroy();
window.removeEventListener("keydown", handleKeyDown); // window.removeEventListener("keydown", handleKeyDown);
}); });
const handleKeyDown = (event: KeyboardEvent) => { const handleKeyDown = (event: KeyboardEvent) => {
console.log("=====================", event);
console.log("=====================", event.key);
console.log("=====================", event.repeat);
// Esc // Esc
if (event.key === "Escape") { if (event.key === "Escape") {
console.log("Esc 键被按下==================="); console.log("Esc 键被按下===================");
// //
EntityMap.Mapswitch = true; EntityMap.Mapswitch = true;
} }
// F11
if (event.key === "F11") {
console.log("F11 键被按下===================");
//
props.parentFuncer();
}
}; };
const datatitle = ref(1); const datatitle = ref(1);
@ -266,13 +351,15 @@ const getareadata = async () => {
} }
// //
const geojsonLayer = JSON.parse(item.regionValue); if (item.regionValue && item.regionValue.length > 1) {
console.log("geojsonLayer", geojsonLayer); const geojsonLayer = JSON.parse(item.regionValue);
console.log("geojsonLayer", geojsonLayer);
geojsonLayer.features.forEach(item => { geojsonLayer.features.forEach(item => {
console.log("每块区域", item); console.log("每块区域", item);
addDemoGraphic14(item); addDemoGraphic14(item);
}); });
}
}); });
} else { } else {
graphicLayer = new mars3d.layer.GraphicLayer(); graphicLayer = new mars3d.layer.GraphicLayer();
@ -354,18 +441,19 @@ function addDemoGraphic2(item) {
scale: Number(item.scale) + Number(200) || 200, scale: Number(item.scale) + Number(200) || 200,
// scale: item.scale || 200, // scale: item.scale || 200,
clampToGround: false, // clampToGround: item.clampToGround == 1 ? true : false, //
heading: item.heading, // Z heading: item.heading, // Z
pitch: item.pitch, // X pitch: item.pitch, // X
roll: item.roll // Y roll: item.roll, // Y
// label: { label: {
// text: item.name, text: item.name,
// font_size: 10, font_size: 12,
// color: "#1f1f1f", color: "#eaeff0",
// verticalOrigin: Cesium.VerticalOrigin.TOP, // verticalOrigin: Cesium.VerticalOrigin.TOP,
// horizontalOrigin: Cesium.HorizontalOrigin.CENTER, // horizontalOrigin: Cesium.HorizontalOrigin.CENTER
// pixelOffset: new Cesium.Cartesian2(0, -100) // 20 // 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 } 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-icon" />
<div class="left-shi" /> <div class="left-shi" />
</div> </div>
<div class="video-con"> <div class="video-con" v-if="videolistdiaswtich">
<VideoPreview v-if="!EntityMap.Mapswitch" ref="videoPreviewRef" /> <VideoPreview v-if="!EntityMap.Mapswitch" ref="videoPreviewRef" />
</div> </div>
</div> </div>
@ -172,7 +172,7 @@
<el-table-column prop="workerName" label="人员姓名" align="center" /> <el-table-column prop="workerName" label="人员姓名" align="center" />
<el-table-column label="照片" align="center"> <el-table-column label="照片" align="center">
<template #default="scope"> <template #default="scope">
<el-popover placement="top" trigger="click" width="auto"> <el-popover placement="right" trigger="click" width="auto">
<template #reference> <template #reference>
<el-image <el-image
style="width: 50px; height: 50px" style="width: 50px; height: 50px"
@ -181,11 +181,11 @@
/> />
</template> </template>
<!-- <el-image <el-image
:src=" BASEURL + '/image/' + scope.row.fieldAcquisitionUrl" :src=" BASEURL + '/image/' + scope.row.fieldAcquisitionUrl"
fit="contain" fit="contain"
style="max-width: 80vw; max-height: 80vh" style="max-width: 80vw; max-height: 80vh"
/>--> />
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
@ -275,7 +275,7 @@
<div class="dialog-potential dialog-box direction-map" v-if="potentialswitch"> <div class="dialog-potential dialog-box direction-map" v-if="potentialswitch">
<div class="dialog-title justifyitems-map"> <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 class="delete-icon" @click="ondirection(1,1,false)"></div>
</div> </div>
@ -688,7 +688,7 @@ const unitdutydata = [
}, },
{ {
value: "7", value: "7",
label: "超期未关闭" label: "已撤回"
} }
]; ];
@ -712,7 +712,7 @@ const getvideolist = async item => {
}); });
videoList.value = res.result.list; videoList.value = res.result.list;
if (videoList.value.length > 1) { if (videoList.value.length > 1 && item.length > 1) {
console.log("所有摄像头数据123", videoList.value); console.log("所有摄像头数据123", videoList.value);
// //
@ -824,7 +824,7 @@ const handleEditxiazia = item => {
let data = JSON.parse(item.fileUrl); let data = JSON.parse(item.fileUrl);
console.log("data", data); console.log("data", data);
const url = BASEURL + "/image/" + data.fileUrl; // URL const url = BASEURL + "/image/" + data.filename; // URL
// const link = document.createElement("a"); // const link = document.createElement("a");
// link.href = url; // link.href = url;
// link.download = item.fileUrl; // // link.download = item.fileUrl; //
@ -960,11 +960,13 @@ const ondirection = (index, row, item) => {
if (EntityMap.Mapswitch) return; if (EntityMap.Mapswitch) return;
potentialswitch.value = item; potentialswitch.value = item;
if (item) { if (item) {
// videoPreviewRef.value.handleHide(); videoPreviewRef.value.handleHide();
console.log("查看详情数据", row); console.log("查看详情数据", row);
safetytableobj.value = row; safetytableobj.value = row;
} else { } else {
// videoPreviewRef.value.handleShow(); setTimeout(() => {
videoPreviewRef.value.handleShow();
}, 1000);
safetytableobj.value = {}; safetytableobj.value = {};
} }
}; };
@ -985,7 +987,9 @@ const onticket = item => {
if (item) { if (item) {
videoPreviewRef.value.handleHide(); videoPreviewRef.value.handleHide();
} else { } else {
videoPreviewRef.value.handleShow(); setTimeout(() => {
videoPreviewRef.value.handleShow();
}, 1000);
} }
}; };
@ -994,13 +998,13 @@ const getareasafetyHatFence = async item => {
const res: any = await areasaWorker({ const res: any = await areasaWorker({
projectSn: store.sn, projectSn: store.sn,
// id // id
qualityRegionId: item id: item
}); });
console.log("查询区域人数", res); 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); console.log("查询班组", res);
teamdutydata.value = res.result.list; teamdutydata.value = res.result.list;
}; };
//
const videolistdiaswtich = ref(true);
const ondialogswtich = () => {
console.log("摄像头中转销毁");
videoPreviewRef.value.oncloseRequestInterface();
};
defineExpose({
getvideolist,
ondialogswtich
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -1449,7 +1466,7 @@ const getTeamInfoList = async () => {
height: 670px; height: 670px;
left: 50%; left: 50%;
top: 52%; top: 52%;
transform: translate(-50%, -60%); transform: translate(-50%, -56%);
padding: 30px; padding: 30px;
.dialog-title { .dialog-title {

View File

@ -103,7 +103,7 @@ const onplayvideo = async () => {
}; };
onBeforeUnmount(() => { onBeforeUnmount(() => {
if (oWebControl.value != null) { if (oWebControl.value) {
// //
oWebControl.JS_HideWnd(); oWebControl.JS_HideWnd();
// //
@ -298,11 +298,25 @@ const handleShow = () => {
oWebControl.JS_ShowWnd(); 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({ defineExpose({
handleHide, handleHide,
handleShow, handleShow,
previewVideo previewVideo,
oncloseRequestInterface
}); });
</script> </script>

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
<template> <template>
<div class="project-box"> <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" v-if="dialogswtich">
<!-- <div class="dialog-box"> --> <!-- <div class="dialog-box"> -->
<MapDialog ref="MapDialogbox" :parentFunc="onclosedualog" /> <MapDialog ref="MapDialogbox" :parentFunc="onclosedualog" />
@ -30,6 +31,8 @@ const MapDialogbox = ref(null);
// //
const dialogswtich = ref(false); const dialogswtich = ref(false);
const dialogstyleswtich = ref(true);
// //
const ondialogopen = item => { const ondialogopen = item => {
console.log("风机数据", item); console.log("风机数据", item);
@ -38,6 +41,15 @@ const ondialogopen = item => {
EntityMap.draughtdata = item; EntityMap.draughtdata = item;
}; };
const onclosemapf = () => {
if (dialogswtich.value) {
MapDialogbox.value.ondialogswtich();
}
dialogswtich.value = false;
// dialogstyleswtich.value = false;
};
// //
const onclosedualog = () => { const onclosedualog = () => {
dialogswtich.value = false; dialogswtich.value = false;
@ -53,8 +65,8 @@ const onclosedualog = () => {
// background: skyblue; // background: skyblue;
.dialog-box { .dialog-box {
width: 70%; width: 1230px;
height: 72%; height: 708px;
position: absolute; position: absolute;
// position: relative; // position: relative;
left: 48%; left: 48%;
@ -64,6 +76,18 @@ const onclosedualog = () => {
z-index: 999; 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 { .project-but {
width: 100%; width: 100%;