From c6eec67e71f3a89bb2391bc7e59e379708dd8103 Mon Sep 17 00:00:00 2001
From: fangjiakai <450850793@qq.com>
Date: Sat, 3 Feb 2024 10:17:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=A5=A8=E5=9C=B0=E5=9B=BE?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/request/map.js | 7 +
src/views/BI/components/bottom_options.vue | 12 +-
.../dialog/confinedspace_dialog.vue | 412 ++++++++++++++++++
.../BI/components/dialog/highwork_dialog.vue | 401 +++++++++++++++++
.../BI/components/dialog/hotwork_dialog.vue | 4 +-
src/views/BI/components/work_safely.vue | 37 +-
src/views/BI/js/eight_work.js | 70 ++-
src/views/BI/js/map.js | 26 +-
src/views/BI/js/trajectory.js | 52 ++-
9 files changed, 980 insertions(+), 41 deletions(-)
create mode 100644 src/views/BI/components/dialog/confinedspace_dialog.vue
create mode 100644 src/views/BI/components/dialog/highwork_dialog.vue
diff --git a/src/request/map.js b/src/request/map.js
index 81d5b34..92baed3 100644
--- a/src/request/map.js
+++ b/src/request/map.js
@@ -1,9 +1,16 @@
import { post } from "./axios";
export const getRealTimeList = (params) => post("/map/getRealTimeList", params); // 获取在线人员列表
+export const getFenceList = (params) => post("/map/getFenceList", params); // 获取围栏列表
+
export const getUserByCardNo = (params) =>
post("/user/getUserByCardNo", params);
export const getEightWorks = (params) => post("/map/getEightWorks", params);
export const getHotworkList = (params) => post("/map/getHotworkList", params);
+
+export const getConfinedspaceWorkList = (params) =>
+ post("/map/getConfinedspaceWorkList", params);
+
+export const getHighWorkList = (params) => post("/map/getHighWorkList", params);
diff --git a/src/views/BI/components/bottom_options.vue b/src/views/BI/components/bottom_options.vue
index 69a8190..81a89a4 100644
--- a/src/views/BI/components/bottom_options.vue
+++ b/src/views/BI/components/bottom_options.vue
@@ -37,8 +37,12 @@ import GraveDangerous from "@/views/BI/components/grave_dangerous.vue";
import VideoAIAnalysis from "@/views/BI/components/video_ai_analysis.vue";
import VideoAIAnalysisRight from "@/views/BI/components/video_ai_analysisRight.vue";
import { useVModels } from "@vueuse/core";
-import { handleTrajectory } from "@/views/BI/js/trajectory.js";
-import { handleHortwork } from "@/views/BI/js/eight_work.js";
+import { handleTrajectory,handleFence } from "@/views/BI/js/trajectory.js";
+import {
+ handleHortwork,
+ handleConfinedspaceWork,
+ handleHighWork
+} from "@/views/BI/js/eight_work.js";
const props = defineProps({
leftCurrentComponent: {
@@ -109,7 +113,7 @@ const bottomOptionsList = [
).href,
title: "电子围栏",
type: "electronicFence",
- check: false,
+ action: handleFence,
},
],
},
@@ -144,6 +148,7 @@ const bottomOptionsList = [
title: "受限空间作业",
type: "acceptance",
check: false,
+ action: handleConfinedspaceWork,
},
{
img: new URL("/src/assets/images/map/bottom/ico6.png", import.meta.url)
@@ -166,6 +171,7 @@ const bottomOptionsList = [
title: "高处作业",
type: "workAtHeight",
check: false,
+ action: handleHighWork,
},
{
img: new URL("/src/assets/images/map/bottom/ico8.png", import.meta.url)
diff --git a/src/views/BI/components/dialog/confinedspace_dialog.vue b/src/views/BI/components/dialog/confinedspace_dialog.vue
new file mode 100644
index 0000000..fabe2a3
--- /dev/null
+++ b/src/views/BI/components/dialog/confinedspace_dialog.vue
@@ -0,0 +1,412 @@
+
+
+
+
+
+
+
+ 受限空间安全作业票
+
+ 编号:{{ data.info.CHECK_NO }}
+ |
+
+
+
+ 作业申请单位 |
+ {{ data.info.APPLY_DEPARTMENT_NAME }} |
+ 作业申请时间 |
+ {{ data.info.CREATTIME }} |
+
+
+ 受限空间名称 |
+ {{ data.info.LIMITSPACE_NAME }} |
+ 受限空间内原有介质名称 |
+ {{ data.info.MEDIUM_NAME }} |
+
+
+ 作业内容 |
+ {{ data.info.WORK_CONTENT }} |
+
+
+ 作业单位 |
+ {{ data.info.CONFIRM_DEPARTMENT_NAME }} |
+ 作业负责人 |
+ {{ data.info.CONFIRM_USER_NAME }} |
+
+
+
+ 关联的其他特殊作业及安全作业票编号 |
+ {{ data.info.SPECIAL_WORK }} |
+
+
+ 风险辨识结果 |
+ {{ data.info.RISK_IDENTIFICATION }} |
+
+
+ 气体分析 |
+ 分析项目 |
+ 有毒有害气体名称 |
+ 可燃气体名称 |
+ 氧气含量 |
+ 取样分析时间 |
+ 分析部位 |
+ 分析人 |
+
+
+
+ {{ data.gas.GAS_NAME1 }}
+ |
+
+ {{ data.gas.GAS_NAME2 }}
+ |
+
+ {{ data.gas.GAS_NAME3 }}
+ |
+
+ {{ data.gas.GAS_NAME4 }}
+ |
+
+
+ 合格标准 |
+ {{ data.gas.GAS_STANDARD1 }} |
+ {{ data.gas.GAS_STANDARD2 }} |
+ {{ data.gas.GAS_STANDARD3 }} |
+ {{ data.gas.GAS_STANDARD4 }} |
+ 19.5% 〜21%(体积分数) |
+
+
+
+ 分析数据
+ |
+
+ {{ item.DATA1 }}
+ |
+
+ {{ item.DATA2 }}
+ |
+
+ {{ item.DATA3 }}
+ |
+
+ {{ item.DATA4 }}
+ |
+ {{ item.OXYGEN_CONTENT }} |
+ {{ item.ANALYZE_TIME }} |
+ {{ item.ANALYZE_PLACE }} |
+ {{ item.ANALYZE_USER }} |
+
+
+ 作业实施时间 |
+
+ {{ data.info.WORK_START_DATE }}至{{ data.info.WORK_END_DATE }}止
+ |
+
+
+
+
+
+ 序号 |
+ 安全措施 |
+ 是否涉及 |
+ 确认人 |
+
+
+ {{ index + 1 }} |
+
+ {{ item.PROTECTIVE_MEASURES }}
+
+
+
+
+
+ |
+
+ 涉 及
+ 不涉及
+ |
+
+
+ |
+
+
+
+ {{ data.measuresList.length + 1 + index }} |
+
+
+ 其他安全措施: {{ item.DESCR }}
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+ 监护人:
+
+ 签字:
+
+ {{ data.signs.GUARDIAN[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 安全交底人:
+
+
+
+
+
+
+
+ 签字:
+
+ {{ data.signs.CONFESS[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 接受交底人:
+
+ 签字:
+
+ {{ data.signs.ACCEPT_CONFESS[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 作业负责人意见:{{ data.signs.CONFIRM[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.CONFIRM[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 作业人:
+
+ 签字:
+
+ {{ data.signs.WORK_USER[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 所在单位意见:{{ data.signs.LEADER[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.LEADER[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 完工验收:{{ data.signs.ACCEPT[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.ACCEPT[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
diff --git a/src/views/BI/components/dialog/highwork_dialog.vue b/src/views/BI/components/dialog/highwork_dialog.vue
new file mode 100644
index 0000000..1e72f25
--- /dev/null
+++ b/src/views/BI/components/dialog/highwork_dialog.vue
@@ -0,0 +1,401 @@
+
+
+
+
+
+
+ 高处安全作业票
+ 编号:{{ data.info.CHECK_NO }}
+ |
+
+
+
+ 作业申请单位 |
+ {{ data.info.APPLY_DEPARTMENT_NAME }} |
+ 作业申请时间 |
+ {{ data.info.CREATTIME }} |
+
+
+ 作业地点 |
+ {{ data.info.WORK_PLACE }} |
+ 作业内容 |
+ {{ data.info.WORK_CONTENT }} |
+
+
+ 作业高度 |
+ {{ data.info.WORK_HIGH }} |
+ 高处作业级别 |
+
+ {{ data.info.WORK_LEVEL === 1 ? "I级高处作业" : "" }}
+ {{ data.info.WORK_LEVEL === 2 ? "II级高处作业" : "" }}
+ {{ data.info.WORK_LEVEL === 3 ? "III级高处作业" : "" }}
+ {{ data.info.WORK_LEVEL === 4 ? "IV级高处作业" : "" }}
+ |
+
+
+ 作业单位 |
+ {{ data.info.CONFIRM_DEPARTMENT_NAME }} |
+ 作业负责人 |
+ {{ data.info.CONFIRM_USER_NAME }} |
+
+
+
+ 关联的其他特殊作业及安全作业票编号 |
+ {{ data.info.SPECIAL_WORK }} |
+
+
+ 风险辨识结果 |
+ {{ data.info.RISK_IDENTIFICATION }} |
+
+
+ 作业实施时间 |
+
+ {{ data.info.WORK_START_DATE }}至{{ data.info.WORK_END_DATE }}止
+ |
+
+
+
+
+
+ 序号 |
+ 安全措施 |
+ 是否涉及 |
+ 确认人 |
+
+
+ {{ index + 1 }} |
+
+ {{ item.PROTECTIVE_MEASURES }}
+
+
+
+
+
+ |
+
+ 涉 及
+ 不涉及
+ |
+
+
+ |
+
+
+
+ {{ data.measuresList.length + 1 + index }} |
+
+
+ 其他安全措施: {{ item.DESCR }}
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+ 监护人:
+
+ 签字:
+
+ {{ data.signs.GUARDIAN[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 安全交底人:
+
+
+
+
+
+
+
+ 签字:
+
+ {{ data.signs.CONFESS[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 接受交底人:
+
+ 签字:
+
+ {{ data.signs.ACCEPT_CONFESS[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 作业负责人意见:{{ data.signs.CONFIRM[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.CONFIRM[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 作业人:
+
+ 签字:
+
+ {{ data.signs.WORK_USER[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 所在单位意见:{{ data.signs.LEADER[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.LEADER[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+ 审核部门意见:{{ data.signs.AUDIT[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.AUDIT[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 审批部门意见:{{ data.signs.APPROVE[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.APPROVE[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 完工验收:{{ data.signs.ACCEPT[0].DESCR }}
+
+ 签字:
+
+ {{ data.signs.ACCEPT[0].SIGN_TIME[index] }}
+
+ |
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
diff --git a/src/views/BI/components/dialog/hotwork_dialog.vue b/src/views/BI/components/dialog/hotwork_dialog.vue
index e9ac3c8..c5d8225 100644
--- a/src/views/BI/components/dialog/hotwork_dialog.vue
+++ b/src/views/BI/components/dialog/hotwork_dialog.vue
@@ -363,11 +363,9 @@ const props = defineProps({
default: () => ({}),
},
});
-
+const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const data = reactive({
info: {},
- imgList: [],
- imgList1: [],
measuresList: [],
gasList: [],
signs: [],
diff --git a/src/views/BI/components/work_safely.vue b/src/views/BI/components/work_safely.vue
index aef0c39..53b24d4 100644
--- a/src/views/BI/components/work_safely.vue
+++ b/src/views/BI/components/work_safely.vue
@@ -32,22 +32,24 @@
下一步操作人
-
{{ index + 1 }}
-
- {{
- formatWork(item)
- }}
-
-
- {{
- item.STEP_NAME
- }}
-
-
- {{
- item.NEXT_STEP_NAME
- }}
-
+
+ {{ index + 1 }}
+
+ {{
+ formatWork(item)
+ }}
+
+
+ {{
+ item.STEP_NAME
+ }}
+
+
+ {{
+ item.NEXT_STEP_NAME
+ }}
+
+
@@ -102,6 +104,9 @@ const formatWork = (work) => {
case "CONFINEDSPACE":
type = "受限空间作业";
break;
+ case "HIGHWORK":
+ type = "高处作业";
+ break;
}
return type + "编号:" + work.CHECK_NO;
};
diff --git a/src/views/BI/js/eight_work.js b/src/views/BI/js/eight_work.js
index 5b19820..4467dee 100644
--- a/src/views/BI/js/eight_work.js
+++ b/src/views/BI/js/eight_work.js
@@ -1,7 +1,13 @@
-import { getHotworkList } from "@/request/map";
+import {
+ getHotworkList,
+ getConfinedspaceWorkList,
+ getHighWorkList,
+} from "@/request/map";
import { addEntity } from "./map.js";
let hotworkList = [];
+let confinedspaceList = [];
+let highWorkList = [];
export const handleHortwork = (b) => {
if (b) {
@@ -33,3 +39,65 @@ const showHotworkList = async () => {
});
hotworkList.show(true);
};
+
+export const handleConfinedspaceWork = (b) => {
+ if (b) {
+ showConfinedspaceWorkList();
+ } else {
+ if (confinedspaceList) {
+ confinedspaceList.children.forEach((e) => {
+ e.destroy();
+ });
+ }
+ }
+};
+
+const showConfinedspaceWorkList = async () => {
+ confinedspaceList = new window.CustomCesium.GroupModel("受限空间作业");
+
+ const { varList } = await getConfinedspaceWorkList();
+ varList.forEach(({ CONFINEDSPACE_ID, CHECK_NO, WORK_POSITION }) => {
+ addEntity(
+ confinedspaceList,
+ CONFINEDSPACE_ID,
+ "受限空间作业",
+ CHECK_NO,
+ WORK_POSITION.split(",")[0],
+ WORK_POSITION.split(",")[1],
+ WORK_POSITION.split(",")[2],
+ "/src/assets/images/map/bottom/ico5_on.png"
+ );
+ });
+ confinedspaceList.show(true);
+};
+
+export const handleHighWork = (b) => {
+ if (b) {
+ showHighWorkList();
+ } else {
+ if (highWorkList) {
+ highWorkList.children.forEach((e) => {
+ e.destroy();
+ });
+ }
+ }
+};
+
+const showHighWorkList = async () => {
+ highWorkList = new window.CustomCesium.GroupModel("高处作业");
+
+ const { varList } = await getHighWorkList();
+ varList.forEach(({ HIGHWORK_ID, CHECK_NO, WORK_POSITION }) => {
+ addEntity(
+ highWorkList,
+ HIGHWORK_ID,
+ "高处作业",
+ CHECK_NO,
+ WORK_POSITION.split(",")[0],
+ WORK_POSITION.split(",")[1],
+ WORK_POSITION.split(",")[2],
+ "/src/assets/images/map/bottom/ico7_on.png"
+ );
+ });
+ highWorkList.show(true);
+};
diff --git a/src/views/BI/js/map.js b/src/views/BI/js/map.js
index 34daa9e..0217a6a 100644
--- a/src/views/BI/js/map.js
+++ b/src/views/BI/js/map.js
@@ -1,10 +1,16 @@
import { h, render, ref } from "vue";
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 { Loadglb } from "./loadglb.js";
import { getUserByCardNo } from "@/request/map";
-import { getHotWorkView } from "@/request/eight_work.js";
+import {
+ getConfinedSpaceView,
+ getHighWorkView,
+ getHotWorkView,
+} from "@/request/eight_work.js";
// const mapUrl =
// "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}";
const loadMap = 2;
@@ -71,6 +77,12 @@ const handleMouseClick = () => {
if (model._name.indexOf("动火作业") > -1) {
clickHotwork(model);
}
+ if (model._name.indexOf("受限空间作业") > -1) {
+ clickConfinedspaceWork(model);
+ }
+ if (model._name.indexOf("高处作业") > -1) {
+ clickHighwork(model);
+ }
});
};
@@ -191,6 +203,18 @@ const clickHotwork = async (model) => {
handleDialog(hotworkDialog, pd);
};
+const clickConfinedspaceWork = async (model) => {
+ const id = model._id;
+ const pd = await getConfinedSpaceView({ CONFINEDSPACE_ID: id });
+ handleDialog(confinedspaceDialog, pd);
+};
+
+const clickHighwork = async (model) => {
+ const id = model._id;
+ const pd = await getHighWorkView({ HIGHWORK_ID: id });
+ handleDialog(highworkDialog, pd);
+};
+
const handleDialog = (component, pd) => {
const visible = ref(false);
// 创建一个新节点,用来容纳 modal
diff --git a/src/views/BI/js/trajectory.js b/src/views/BI/js/trajectory.js
index 8b9fb04..59d3186 100644
--- a/src/views/BI/js/trajectory.js
+++ b/src/views/BI/js/trajectory.js
@@ -30,6 +30,16 @@ const { open, close } = useWebSocket(
addNewPerson(decodedMsg.data);
}
},
+ onDisconnected: () => {
+ if (entityArr) {
+ entityArr.children.forEach((e) => {
+ e.destroy();
+ });
+ billboardArr.children.forEach((e) => {
+ e.destroy();
+ });
+ }
+ },
}
);
export const handleTrajectory = (b) => {
@@ -37,14 +47,6 @@ export const handleTrajectory = (b) => {
getOnlineUser();
open();
} else {
- if (entityArr) {
- entityArr.children.forEach((e) => {
- e.destroy();
- });
- billboardArr.children.forEach((e) => {
- e.destroy();
- });
- }
close();
}
};
@@ -52,17 +54,29 @@ export const handleTrajectory = (b) => {
const getOnlineUser = async () => {
entityArr = new window.CustomCesium.GroupModel("人物模型");
billboardArr = new window.CustomCesium.GroupModel("人物姓名");
-
- const { data } = await getRealTimeList();
- let userList = data.data;
- userList = [
- { id: "8379", name: "大大", lng: 119.44768654, lat: 39.91745908 },
- { id: "9979", name: "小小小小", lng: 119.44758754, lat: 39.91745908 },
+ await getRealTimeList();
+ // const { data } = await getRealTimeList();
+ // let userList = data.data;
+ const userList = [
+ {
+ cardNo: "8379",
+ name: "大大",
+ longitude: 119.44768654,
+ latitude: 39.91745908,
+ altitude: 0,
+ },
+ {
+ cardNo: "9979",
+ name: "小小小小",
+ longitude: 119.44758754,
+ latitude: 39.91745908,
+ altitude: 0,
+ },
];
- userList.forEach(({ id, name, lng, lat }) => {
- addEntity(id, name, lng, lat, 0);
- addBillboard(id, name, lng, lat, 0 + 2);
+ userList.forEach(({ cardNo, name, longitude, latitude, altitude }) => {
+ addEntity(cardNo, name, longitude, latitude, altitude);
+ addBillboard(cardNo, name, longitude, latitude, altitude + 2);
});
entityArr.show(true);
billboardArr.show(true);
@@ -202,3 +216,7 @@ function peoMovement(moveData) {
}
});
}
+
+export const handleFence = () => {
+
+};