2024-10-12 木垒-第一版本
This commit is contained in:
parent
c099525b4c
commit
788149e252
@ -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: "数字工地",
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 }
|
||||
});
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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
@ -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%;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user