作业票地图显示

pull/1/head
fangjiakai 2024-02-03 10:17:02 +08:00
parent 8c7cb413fe
commit c6eec67e71
9 changed files with 980 additions and 41 deletions

View File

@ -1,9 +1,16 @@
import { post } from "./axios"; import { post } from "./axios";
export const getRealTimeList = (params) => post("/map/getRealTimeList", params); // 获取在线人员列表 export const getRealTimeList = (params) => post("/map/getRealTimeList", params); // 获取在线人员列表
export const getFenceList = (params) => post("/map/getFenceList", params); // 获取围栏列表
export const getUserByCardNo = (params) => export const getUserByCardNo = (params) =>
post("/user/getUserByCardNo", params); post("/user/getUserByCardNo", params);
export const getEightWorks = (params) => post("/map/getEightWorks", params); export const getEightWorks = (params) => post("/map/getEightWorks", params);
export const getHotworkList = (params) => post("/map/getHotworkList", 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);

View File

@ -37,8 +37,12 @@ import GraveDangerous from "@/views/BI/components/grave_dangerous.vue";
import VideoAIAnalysis from "@/views/BI/components/video_ai_analysis.vue"; import VideoAIAnalysis from "@/views/BI/components/video_ai_analysis.vue";
import VideoAIAnalysisRight from "@/views/BI/components/video_ai_analysisRight.vue"; import VideoAIAnalysisRight from "@/views/BI/components/video_ai_analysisRight.vue";
import { useVModels } from "@vueuse/core"; import { useVModels } from "@vueuse/core";
import { handleTrajectory } from "@/views/BI/js/trajectory.js"; import { handleTrajectory,handleFence } from "@/views/BI/js/trajectory.js";
import { handleHortwork } from "@/views/BI/js/eight_work.js"; import {
handleHortwork,
handleConfinedspaceWork,
handleHighWork
} from "@/views/BI/js/eight_work.js";
const props = defineProps({ const props = defineProps({
leftCurrentComponent: { leftCurrentComponent: {
@ -109,7 +113,7 @@ const bottomOptionsList = [
).href, ).href,
title: "电子围栏", title: "电子围栏",
type: "electronicFence", type: "electronicFence",
check: false, action: handleFence,
}, },
], ],
}, },
@ -144,6 +148,7 @@ const bottomOptionsList = [
title: "受限空间作业", title: "受限空间作业",
type: "acceptance", type: "acceptance",
check: false, check: false,
action: handleConfinedspaceWork,
}, },
{ {
img: new URL("/src/assets/images/map/bottom/ico6.png", import.meta.url) img: new URL("/src/assets/images/map/bottom/ico6.png", import.meta.url)
@ -166,6 +171,7 @@ const bottomOptionsList = [
title: "高处作业", title: "高处作业",
type: "workAtHeight", type: "workAtHeight",
check: false, check: false,
action: handleHighWork,
}, },
{ {
img: new URL("/src/assets/images/map/bottom/ico8.png", import.meta.url) img: new URL("/src/assets/images/map/bottom/ico8.png", import.meta.url)

View File

@ -0,0 +1,412 @@
<template>
<el-dialog v-model="visible" title="作业票信息">
<table>
<thead>
<tr>
<td colspan="10" style="border: none">
<el-divider content-position="left">
受限空间安全作业票
</el-divider>
<div class="tr">编号:{{ data.info.CHECK_NO }}</div>
</td>
</tr>
</thead>
<tr>
<td class="title">作业申请单位</td>
<td colspan="5">{{ data.info.APPLY_DEPARTMENT_NAME }}</td>
<td class="title">作业申请时间</td>
<td colspan="3">{{ data.info.CREATTIME }}</td>
</tr>
<tr>
<td class="title">受限空间名称</td>
<td colspan="5">{{ data.info.LIMITSPACE_NAME }}</td>
<td class="title">受限空间内原有介质名称</td>
<td colspan="3">{{ data.info.MEDIUM_NAME }}</td>
</tr>
<tr>
<td class="title">作业内容</td>
<td colspan="9">{{ data.info.WORK_CONTENT }}</td>
</tr>
<tr>
<td class="title">作业单位</td>
<td colspan="5">{{ data.info.CONFIRM_DEPARTMENT_NAME }}</td>
<td class="title">作业负责人</td>
<td colspan="3">{{ data.info.CONFIRM_USER_NAME }}</td>
</tr>
<tr>
<td class="title">关联的其他特殊作业及安全作业票编号</td>
<td colspan="9">{{ data.info.SPECIAL_WORK }}</td>
</tr>
<tr>
<td class="title">风险辨识结果</td>
<td colspan="9">{{ data.info.RISK_IDENTIFICATION }}</td>
</tr>
<tr>
<td :rowspan="3 + data.gasList.length" class="title">气体分析</td>
<td class="title" rowspan="2">分析项目</td>
<td class="title" colspan="2">有毒有害气体名称</td>
<td class="title" colspan="2">可燃气体名称</td>
<td class="title" rowspan="2">氧气含量</td>
<td class="title" rowspan="3">取样分析时间</td>
<td class="title" rowspan="3">分析部位</td>
<td class="title" rowspan="3">分析人</td>
</tr>
<tr>
<td :style="{ padding: data.gas.GAS_NAME1 ? '8px' : '16px' }">
{{ data.gas.GAS_NAME1 }}
</td>
<td :style="{ padding: data.gas.GAS_NAME2 ? '8px' : '16px' }">
{{ data.gas.GAS_NAME2 }}
</td>
<td :style="{ padding: data.gas.GAS_NAME3 ? '8px' : '16px' }">
{{ data.gas.GAS_NAME3 }}
</td>
<td :style="{ padding: data.gas.GAS_NAME4 ? '8px' : '16px' }">
{{ data.gas.GAS_NAME4 }}
</td>
</tr>
<tr>
<td class="title">合格标准</td>
<td>{{ data.gas.GAS_STANDARD1 }}</td>
<td>{{ data.gas.GAS_STANDARD2 }}</td>
<td>{{ data.gas.GAS_STANDARD3 }}</td>
<td>{{ data.gas.GAS_STANDARD4 }}</td>
<td>19.5% 21%体积分数</td>
</tr>
<tr v-for="(item, index) in data.gasList" :key="index">
<td v-if="index === 0" :rowspan="data.gasList.length" class="title">
分析数据
</td>
<td>
<span v-if="data.gas.GAS_NAME1">{{ item.DATA1 }}</span>
</td>
<td>
<span v-if="data.gas.GAS_NAME2">{{ item.DATA2 }}</span>
</td>
<td>
<span v-if="data.gas.GAS_NAME3">{{ item.DATA3 }}</span>
</td>
<td>
<span v-if="data.gas.GAS_NAME4">{{ item.DATA4 }}</span>
</td>
<td>{{ item.OXYGEN_CONTENT }}</td>
<td>{{ item.ANALYZE_TIME }}</td>
<td>{{ item.ANALYZE_PLACE }}</td>
<td>{{ item.ANALYZE_USER }}</td>
</tr>
<tr>
<td class="title">作业实施时间</td>
<td colspan="9">
{{ data.info.WORK_START_DATE }}{{ data.info.WORK_END_DATE }}
</td>
</tr>
<tr>
<td colspan="10">
<table class="table-ui">
<tr>
<td style="width: 80px">序号</td>
<td>安全措施</td>
<td style="width: 100px">是否涉及</td>
<td style="width: 100px">确认人</td>
</tr>
<tr v-for="(item, index) in data.measuresList" :key="index">
<td>{{ index + 1 }}</td>
<td>
{{ item.PROTECTIVE_MEASURES }}
<div v-if="item.IMG_PATH">
<template v-for="img in item.IMG_PATH.split(',')" :key="img">
<img
v-viewer
:src="VITE_FILE_URL + img"
alt=""
width="100"
height="100"
/>
</template>
</div>
</td>
<td>
<span v-if="item.STATUS === '1'"> &nbsp;&nbsp;&nbsp; </span>
<span v-if="item.STATUS === '-1'"> </span>
</td>
<td>
<img
v-if="item.SIGN_PATH"
v-viewer
:src="VITE_FILE_URL + item.SIGN_PATH"
alt=""
width="100"
height="100"
/>
</td>
</tr>
<template v-if="data.signs.MEASURES_CONFIRM">
<tr
v-for="(item, index) in data.signs.MEASURES_CONFIRM"
:key="item.BUS_CONFINEDSPACE_MEASURES_ID"
>
<td>{{ data.measuresList.length + 1 + index }}</td>
<td colspan="2">
<div style="display: flex; justify-content: space-between">
<span> 其他安全措施 {{ item.DESCR }} </span>
</div>
</td>
<td>
<img
v-if="item.SIGN_PATH[0]"
v-viewer
:src="VITE_FILE_URL + item.SIGN_PATH[0]"
alt=""
width="100"
height="100"
/>
</td>
</tr>
</template>
</table>
</td>
</tr>
<tr v-if="data.signs.GUARDIAN">
<td colspan="10">
<div>监护人</div>
<div
v-for="(item, index) in data.signs.GUARDIAN[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.GUARDIAN[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.GUARDIAN[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.CONFESS">
<td colspan="10">
<div>
安全交底人
<div v-if="data.signs.CONFESS[0].IMG_PATH">
<template
v-for="img in data.signs.CONFESS[0].IMG_PATH"
:key="img"
>
<img
v-viewer
:src="VITE_FILE_URL + img"
alt=""
width="100"
height="100"
/>
</template>
</div>
</div>
<div
v-for="(item, index) in data.signs.CONFESS[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.CONFESS[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.CONFESS[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.ACCEPT_CONFESS">
<td colspan="10">
<div>接受交底人</div>
<div
v-for="(item, index) in data.signs.ACCEPT_CONFESS[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="
VITE_FILE_URL + data.signs.ACCEPT_CONFESS[0].SIGN_PATH[index]
"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.ACCEPT_CONFESS[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.CONFIRM">
<td colspan="10">
<div>作业负责人意见{{ data.signs.CONFIRM[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.CONFIRM[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.CONFIRM[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.CONFIRM[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.WORK_USER">
<td colspan="10">
<div>作业人</div>
<div
v-for="(item, index) in data.signs.WORK_USER[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.WORK_USER[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.WORK_USER[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.LEADER">
<td colspan="10">
<div>所在单位意见{{ data.signs.LEADER[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.LEADER[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.LEADER[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.LEADER[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.ACCEPT">
<td colspan="10">
<div>完工验收{{ data.signs.ACCEPT[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.ACCEPT[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.ACCEPT[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.ACCEPT[0].SIGN_TIME[index] }}</span>
</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";
import { findCharIndex } from "@/assets/js/utils.js";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
pd: {
type: Object,
required: true,
default: () => ({}),
},
});
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const data = reactive({
info: {},
imgList: [],
imgList1: [],
measuresList: [],
gasList: [],
signs: [],
});
onMounted(() => {
data.info = props.pd.pd;
const measuresList = props.pd.measuresList;
for (let i = 0; i < measuresList.length; i++) {
const PROTECTIVE_MEASURES = measuresList[i].PROTECTIVE_MEASURES.split("");
for (let j = 1; j <= 3; j++) {
if (findCharIndex(PROTECTIVE_MEASURES, "", j) !== -1) {
PROTECTIVE_MEASURES.splice(
findCharIndex(PROTECTIVE_MEASURES, "", j) + 1,
0,
measuresList[i]["ANSWER" + j]
);
}
}
measuresList[i].PROTECTIVE_MEASURES = PROTECTIVE_MEASURES.join("");
}
data.measuresList = measuresList;
data.gasList = props.pd.gasList;
data.gas = props.pd.gas || {};
data.signs = props.pd.signs;
});
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%;
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>

View File

@ -0,0 +1,401 @@
<template>
<el-dialog v-model="visible" title="作业票信息">
<table>
<thead>
<tr>
<td colspan="10" style="border: none">
<el-divider content-position="left"> 高处安全作业票 </el-divider>
<div class="tr">编号:{{ data.info.CHECK_NO }}</div>
</td>
</tr>
</thead>
<tr>
<td class="title">作业申请单位</td>
<td>{{ data.info.APPLY_DEPARTMENT_NAME }}</td>
<td class="title">作业申请时间</td>
<td>{{ data.info.CREATTIME }}</td>
</tr>
<tr>
<td class="title">作业地点</td>
<td>{{ data.info.WORK_PLACE }}</td>
<td class="title">作业内容</td>
<td>{{ data.info.WORK_CONTENT }}</td>
</tr>
<tr>
<td class="title">作业高度</td>
<td>{{ data.info.WORK_HIGH }}</td>
<td class="title">高处作业级别</td>
<td>
{{ data.info.WORK_LEVEL === 1 ? "I级高处作业" : "" }}
{{ data.info.WORK_LEVEL === 2 ? "II级高处作业" : "" }}
{{ data.info.WORK_LEVEL === 3 ? "III级高处作业" : "" }}
{{ data.info.WORK_LEVEL === 4 ? "IV级高处作业" : "" }}
</td>
</tr>
<tr>
<td class="title">作业单位</td>
<td>{{ data.info.CONFIRM_DEPARTMENT_NAME }}</td>
<td class="title">作业负责人</td>
<td>{{ data.info.CONFIRM_USER_NAME }}</td>
</tr>
<tr>
<td class="title">关联的其他特殊作业及安全作业票编号</td>
<td colspan="3">{{ data.info.SPECIAL_WORK }}</td>
</tr>
<tr>
<td class="title">风险辨识结果</td>
<td colspan="3">{{ data.info.RISK_IDENTIFICATION }}</td>
</tr>
<tr>
<td class="title">作业实施时间</td>
<td colspan="3">
{{ data.info.WORK_START_DATE }}{{ data.info.WORK_END_DATE }}
</td>
</tr>
<tr>
<td colspan="4">
<table class="table-ui">
<tr>
<td style="width: 80px">序号</td>
<td>安全措施</td>
<td style="width: 100px">是否涉及</td>
<td style="width: 100px">确认人</td>
</tr>
<tr v-for="(item, index) in data.measuresList" :key="index">
<td>{{ index + 1 }}</td>
<td>
{{ item.PROTECTIVE_MEASURES }}
<div v-if="item.IMG_PATH">
<template v-for="img in item.IMG_PATH.split(',')" :key="img">
<img
v-viewer
:src="VITE_FILE_URL + img"
alt=""
width="100"
height="100"
/>
</template>
</div>
</td>
<td>
<span v-if="item.STATUS === '1'"> &nbsp;&nbsp;&nbsp; </span>
<span v-if="item.STATUS === '-1'"> </span>
</td>
<td>
<img
v-if="item.SIGN_PATH"
v-viewer
:src="VITE_FILE_URL + item.SIGN_PATH"
alt=""
width="100"
height="100"
/>
</td>
</tr>
<template v-if="data.signs.MEASURES_CONFIRM">
<tr
v-for="(item, index) in data.signs.MEASURES_CONFIRM"
:key="item.BUS_HOTWORK_MEASURES_ID"
>
<td>{{ data.measuresList.length + 1 + index }}</td>
<td colspan="2">
<div style="display: flex; justify-content: space-between">
<span> 其他安全措施 {{ item.DESCR }} </span>
</div>
</td>
<td>
<img
v-if="item.SIGN_PATH[0]"
v-viewer
:src="VITE_FILE_URL + item.SIGN_PATH[0]"
alt=""
width="100"
height="100"
/>
</td>
</tr>
</template>
</table>
</td>
</tr>
<tr v-if="data.signs.GUARDIAN">
<td colspan="10">
<div>监护人</div>
<div
v-for="(item, index) in data.signs.GUARDIAN[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.GUARDIAN[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.GUARDIAN[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.CONFESS">
<td colspan="10">
<div>
安全交底人
<div v-if="data.signs.CONFESS[0].IMG_PATH">
<template
v-for="img in data.signs.CONFESS[0].IMG_PATH"
:key="img"
>
<img
v-viewer
:src="VITE_FILE_URL + img"
alt=""
width="100"
height="100"
/>
</template>
</div>
</div>
<div
v-for="(item, index) in data.signs.CONFESS[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.CONFESS[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.CONFESS[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.ACCEPT_CONFESS">
<td colspan="10">
<div>接受交底人</div>
<div
v-for="(item, index) in data.signs.ACCEPT_CONFESS[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="
VITE_FILE_URL + data.signs.ACCEPT_CONFESS[0].SIGN_PATH[index]
"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.ACCEPT_CONFESS[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.CONFIRM">
<td colspan="10">
<div>作业负责人意见{{ data.signs.CONFIRM[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.CONFIRM[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.CONFIRM[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.CONFIRM[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.WORK_USER">
<td colspan="10">
<div>作业人</div>
<div
v-for="(item, index) in data.signs.WORK_USER[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.WORK_USER[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.WORK_USER[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.LEADER">
<td colspan="10">
<div>所在单位意见{{ data.signs.LEADER[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.LEADER[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.LEADER[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.LEADER[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.AUDIT">
<td colspan="10">
<div>审核部门意见{{ data.signs.AUDIT[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.AUDIT[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.AUDIT[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.AUDIT[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.APPROVE">
<td colspan="10">
<div>审批部门意见{{ data.signs.APPROVE[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.APPROVE[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.APPROVE[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.APPROVE[0].SIGN_TIME[index] }}</span>
</div>
</td>
</tr>
<tr v-if="data.signs.ACCEPT">
<td colspan="10">
<div>完工验收{{ data.signs.ACCEPT[0].DESCR }}</div>
<div
v-for="(item, index) in data.signs.ACCEPT[0].SIGN_TIME"
:key="index"
class="tr"
>
<span>签字</span>
<img
v-viewer
:src="VITE_FILE_URL + data.signs.ACCEPT[0].SIGN_PATH[index]"
alt=""
width="100"
height="100"
/>
<span>{{ data.signs.ACCEPT[0].SIGN_TIME[index] }}</span>
</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";
import { findCharIndex } from "@/assets/js/utils.js";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
pd: {
type: Object,
required: true,
default: () => ({}),
},
});
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const data = reactive({
info: {},
measuresList: [],
gasList: [],
signs: [],
});
onMounted(() => {
data.info = props.pd.pd;
const measuresList = props.pd.measuresList;
for (let i = 0; i < measuresList.length; i++) {
const PROTECTIVE_MEASURES = measuresList[i].PROTECTIVE_MEASURES.split("");
for (let j = 1; j <= 3; j++) {
if (findCharIndex(PROTECTIVE_MEASURES, "", j) !== -1) {
PROTECTIVE_MEASURES.splice(
findCharIndex(PROTECTIVE_MEASURES, "", j) + 1,
0,
measuresList[i]["ANSWER" + j]
);
}
}
measuresList[i].PROTECTIVE_MEASURES = PROTECTIVE_MEASURES.join("");
}
data.measuresList = measuresList;
data.signs = props.pd.signs;
});
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%;
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>

View File

@ -363,11 +363,9 @@ const props = defineProps({
default: () => ({}), default: () => ({}),
}, },
}); });
const VITE_FILE_URL = import.meta.env.VITE_FILE_URL;
const data = reactive({ const data = reactive({
info: {}, info: {},
imgList: [],
imgList1: [],
measuresList: [], measuresList: [],
gasList: [], gasList: [],
signs: [], signs: [],

View File

@ -32,22 +32,24 @@
<div class="td">下一步操作人</div> <div class="td">下一步操作人</div>
</div> </div>
<div class="tr" v-for="(item, index) in data.block3List" :key="index"> <div class="tr" v-for="(item, index) in data.block3List" :key="index">
<div class="td">{{ index + 1 }}</div> <template v-if="index < 10">
<div class="td line-1"> <div class="td">{{ index + 1 }}</div>
<el-tooltip :content="formatWork(item)">{{ <div class="td line-1">
formatWork(item) <el-tooltip :content="formatWork(item)">{{
}}</el-tooltip> formatWork(item)
</div> }}</el-tooltip>
<div class="td line-1"> </div>
<el-tooltip :content="item.STEP_NAME">{{ <div class="td line-1">
item.STEP_NAME <el-tooltip :content="item.STEP_NAME">{{
}}</el-tooltip> item.STEP_NAME
</div> }}</el-tooltip>
<div class="td line-1"> </div>
<el-tooltip :content="item.NEXT_STEP_NAME">{{ <div class="td line-1">
item.NEXT_STEP_NAME <el-tooltip :content="item.NEXT_STEP_NAME">{{
}}</el-tooltip> item.NEXT_STEP_NAME
</div> }}</el-tooltip>
</div>
</template>
</div> </div>
</div> </div>
</div> </div>
@ -102,6 +104,9 @@ const formatWork = (work) => {
case "CONFINEDSPACE": case "CONFINEDSPACE":
type = "受限空间作业"; type = "受限空间作业";
break; break;
case "HIGHWORK":
type = "高处作业";
break;
} }
return type + "编号:" + work.CHECK_NO; return type + "编号:" + work.CHECK_NO;
}; };

View File

@ -1,7 +1,13 @@
import { getHotworkList } from "@/request/map"; import {
getHotworkList,
getConfinedspaceWorkList,
getHighWorkList,
} from "@/request/map";
import { addEntity } from "./map.js"; import { addEntity } from "./map.js";
let hotworkList = []; let hotworkList = [];
let confinedspaceList = [];
let highWorkList = [];
export const handleHortwork = (b) => { export const handleHortwork = (b) => {
if (b) { if (b) {
@ -33,3 +39,65 @@ const showHotworkList = async () => {
}); });
hotworkList.show(true); 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);
};

View File

@ -1,10 +1,16 @@
import { h, render, ref } from "vue"; import { h, render, ref } from "vue";
import userDialog from "../components/dialog/user_dialog.vue"; import userDialog from "../components/dialog/user_dialog.vue";
import hotworkDialog from "../components/dialog/hotwork_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 { Loadglb } from "./loadglb.js";
import { getUserByCardNo } from "@/request/map"; import { getUserByCardNo } from "@/request/map";
import { getHotWorkView } from "@/request/eight_work.js"; import {
getConfinedSpaceView,
getHighWorkView,
getHotWorkView,
} from "@/request/eight_work.js";
// const mapUrl = // const mapUrl =
// "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}"; // "https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}";
const loadMap = 2; const loadMap = 2;
@ -71,6 +77,12 @@ const handleMouseClick = () => {
if (model._name.indexOf("动火作业") > -1) { if (model._name.indexOf("动火作业") > -1) {
clickHotwork(model); 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); 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 handleDialog = (component, pd) => {
const visible = ref(false); const visible = ref(false);
// 创建一个新节点,用来容纳 modal // 创建一个新节点,用来容纳 modal

View File

@ -30,6 +30,16 @@ const { open, close } = useWebSocket(
addNewPerson(decodedMsg.data); addNewPerson(decodedMsg.data);
} }
}, },
onDisconnected: () => {
if (entityArr) {
entityArr.children.forEach((e) => {
e.destroy();
});
billboardArr.children.forEach((e) => {
e.destroy();
});
}
},
} }
); );
export const handleTrajectory = (b) => { export const handleTrajectory = (b) => {
@ -37,14 +47,6 @@ export const handleTrajectory = (b) => {
getOnlineUser(); getOnlineUser();
open(); open();
} else { } else {
if (entityArr) {
entityArr.children.forEach((e) => {
e.destroy();
});
billboardArr.children.forEach((e) => {
e.destroy();
});
}
close(); close();
} }
}; };
@ -52,17 +54,29 @@ export const handleTrajectory = (b) => {
const getOnlineUser = async () => { const getOnlineUser = async () => {
entityArr = new window.CustomCesium.GroupModel("人物模型"); entityArr = new window.CustomCesium.GroupModel("人物模型");
billboardArr = new window.CustomCesium.GroupModel("人物姓名"); billboardArr = new window.CustomCesium.GroupModel("人物姓名");
await getRealTimeList();
const { data } = await getRealTimeList(); // const { data } = await getRealTimeList();
let userList = data.data; // let userList = data.data;
userList = [ const userList = [
{ id: "8379", name: "大大", lng: 119.44768654, lat: 39.91745908 }, {
{ id: "9979", name: "小小小小", lng: 119.44758754, lat: 39.91745908 }, 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 }) => { userList.forEach(({ cardNo, name, longitude, latitude, altitude }) => {
addEntity(id, name, lng, lat, 0); addEntity(cardNo, name, longitude, latitude, altitude);
addBillboard(id, name, lng, lat, 0 + 2); addBillboard(cardNo, name, longitude, latitude, altitude + 2);
}); });
entityArr.show(true); entityArr.show(true);
billboardArr.show(true); billboardArr.show(true);
@ -202,3 +216,7 @@ function peoMovement(moveData) {
} }
}); });
} }
export const handleFence = () => {
};