update 对接底部数据,添加地图公共less
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<Dialog :openVis="visible" width="30%" :title="title" @close="closeDialog" :maskClosable="false">
|
||||
<template #container>
|
||||
<div class="police-con">
|
||||
<div class="sub-text">有一个员工健康监测发生异常!</div>
|
||||
<div class="con-item">
|
||||
<span>异常事件:</span>
|
||||
<span>{{ userInfo?.eventType_dictText }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>姓名:</span>
|
||||
<span>{{ userInfo?.realName }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>二级单位:</span>
|
||||
<span>{{ userInfo?.orgName }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>手机号码:</span>
|
||||
<span>{{ userInfo?.phone }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>发生时间:</span>
|
||||
<span>{{ userInfo?.warnTime }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>发生地点:</span>
|
||||
<span>{{ userInfo?.address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
import { useDialog } from '/@/views/components/dialogHooks.ts';
|
||||
import { watch, ref } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
record: Object,
|
||||
});
|
||||
const userInfo = ref({});
|
||||
watch(
|
||||
() => props.record,
|
||||
(nVal) => {
|
||||
userInfo.value = nVal;
|
||||
}
|
||||
);
|
||||
const { visible, title, closeDialog, openDialog } = useDialog({ title: '健康监测工具报警' });
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.police-con {
|
||||
color: #ffffff;
|
||||
background-color: #00152b;
|
||||
border: 1px solid #129bff;
|
||||
padding: 2% 0 2% 5%;
|
||||
|
||||
.sub-text {
|
||||
font-weight: bold;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.con-item {
|
||||
padding: 1.3% 0;
|
||||
display: flex;
|
||||
|
||||
span:nth-child(1) {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,6 +2,11 @@
|
||||
<Dialog :openVis="visible" width="30%" :title="title" @close="closeDialog" :maskClosable="false">
|
||||
<template #container>
|
||||
<div class="police-con">
|
||||
<div class="sub-text">有一个员工健康监测发生异常!</div>
|
||||
<div class="con-item">
|
||||
<span>异常事件:</span>
|
||||
<span>{{ userInfo?.eventType_dictText }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>姓名:</span>
|
||||
<span>{{ userInfo?.realName }}</span>
|
||||
@@ -14,10 +19,6 @@
|
||||
<span>手机号码:</span>
|
||||
<span>{{ userInfo?.phone }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>异常事件:</span>
|
||||
<span>{{ userInfo?.eventType_dictText }}</span>
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<span>发生时间:</span>
|
||||
<span>{{ userInfo?.warnTime }}</span>
|
||||
@@ -45,7 +46,7 @@
|
||||
userInfo.value = nVal;
|
||||
}
|
||||
);
|
||||
const { visible, title, closeDialog, openDialog } = useDialog({ title: '健康报警员工信息' });
|
||||
const { visible, title, closeDialog, openDialog } = useDialog({ title: '健康监测工具报警' });
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
@@ -58,18 +59,27 @@
|
||||
border: 1px solid #129bff;
|
||||
padding: 2% 0 2% 5%;
|
||||
|
||||
.sub-text {
|
||||
font-weight: bold;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.con-item {
|
||||
padding: 1.3% 0;
|
||||
display: flex;
|
||||
|
||||
span:nth-child(1) {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 20%;
|
||||
text-align: right;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
padding-left: 2%;
|
||||
padding-right: 2%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+50
-4
@@ -22,8 +22,9 @@
|
||||
<three-r />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-d"></div>
|
||||
<div class="bottom-d" @click="test"></div>
|
||||
<EmployeeDialog ref="employeeDialogRef" :record="socketData" />
|
||||
<EmergencyDialog ref="emergencyDialogRef" :record="emergencyData" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -36,8 +37,9 @@
|
||||
import ThreeR from '../components/body-d-right/threeR.vue';
|
||||
import ChinaMap from '../components/chinaMap/chinaMap.vue';
|
||||
import EmployeeDialog from '/@/views/components/employeeDialog.vue';
|
||||
import EmergencyDialog from '/@/views/components/emergencyDialog.vue';
|
||||
import { useTopTime } from '/@/utils/utils.ts';
|
||||
import { useSocket } from '/@/utils/socket.ts';
|
||||
import { basicPath, emergencyPath, useSocket } from '/@/utils/socket.ts';
|
||||
|
||||
const dayTimeO = ref();
|
||||
const dayTimeT = ref();
|
||||
@@ -60,10 +62,10 @@
|
||||
clearInterval(interval.value);
|
||||
});
|
||||
init();
|
||||
const { socketData, setSocketData } = useSocket();
|
||||
// 健康监测工具报警
|
||||
const { socketData, setSocketData } = useSocket(basicPath);
|
||||
const employeeDialogRef = ref();
|
||||
watch(socketData, (nVal) => {
|
||||
console.log('nval', nVal);
|
||||
if (nVal) {
|
||||
nextTick(() => {
|
||||
setSocketData(nVal);
|
||||
@@ -71,6 +73,50 @@
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//应急求助
|
||||
const { socketData: emergencyData, setSocketData: setEmergencyData } = useSocket(emergencyPath);
|
||||
const emergencyDialogRef = ref();
|
||||
|
||||
watch(emergencyData, (nVal) => {
|
||||
if (nVal) {
|
||||
nextTick(() => {
|
||||
setEmergencyData(nVal);
|
||||
emergencyDialogRef.value.openDialog;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function test() {
|
||||
let nVal = {
|
||||
watchNo: 'CRFTQ22C03000080',
|
||||
eventType: 'heart_rate',
|
||||
bindUserId: 'fd358031299d4816b5d304fd818ecc73',
|
||||
createBy: null,
|
||||
createDate: null,
|
||||
dataValue: '999',
|
||||
address:
|
||||
'一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字一段文字',
|
||||
lon: 108.6666,
|
||||
lat: 29.8888,
|
||||
dataDate: '2023-12-07',
|
||||
warnTime: '2023-12-07',
|
||||
gpsErrorMsg: '',
|
||||
lonGd: 108.67084314886117,
|
||||
latGd: 29.88607705672868,
|
||||
addressGd: null,
|
||||
sendFlag: '0',
|
||||
largeScreenFlag: '0',
|
||||
orgCode: null,
|
||||
orgName: '冯地坑采油作业区',
|
||||
realName: '王志文',
|
||||
phone: '15229020494',
|
||||
};
|
||||
nextTick(() => {
|
||||
setSocketData(nVal);
|
||||
employeeDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.outer {
|
||||
|
||||
Reference in New Issue
Block a user