update
1.修改部分问题(路线等问题) 2.添加定时器
This commit is contained in:
+108
-8
@@ -7,14 +7,14 @@
|
||||
<div class="content">
|
||||
<div class="content-item">
|
||||
<template v-if="scrollList.length > 0">
|
||||
<vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :copyNum="3" :limitScrollNum="5" v-bind="{ step: 0.2 }">
|
||||
<vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :copyNum="3" :limitScrollNum="5" v-bind="{ step: step }">
|
||||
<div class="item-d" v-for="(item, index) in scrollList" :key="index">
|
||||
<div>{{ item.realName }}</div>
|
||||
<div style="color: #f6ff00">{{ item.eventType_dictText }}{{ item.dataValue ? `(${item.dataValue})` : '' }}</div>
|
||||
<div>{{ item.warnTime }}</div>
|
||||
<div class="item-d-img">
|
||||
<img :src="pointPng" alt="" />
|
||||
<img :src="addressPng" alt="" />
|
||||
<img :src="pointPng" alt="" @click="handlePolice(item)" />
|
||||
<img :src="addressPng" alt="" @click="sendPosition(item)" />
|
||||
</div>
|
||||
</div>
|
||||
</vue3-seamless-scroll>
|
||||
@@ -26,22 +26,78 @@
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<Dialog :openVis="openInfor" width="30%" title="健康报警员工信息" @close="handlePoliceClose">
|
||||
<template #container>
|
||||
<div class="police-con" :class="[themeType]">
|
||||
<Row style="font-size: 14px; font-weight: bold"> 个人信息 </Row>
|
||||
<Row>
|
||||
<Col :span="8">姓名:{{ userInfo?.realName || '--' }}</Col>
|
||||
<Col :span="8">性别:{{ userInfo?.sex_dictText || '--' }}</Col>
|
||||
<Col :span="8">年龄:{{ userInfo?.age || '--' }}</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col :span="8">二级单位:{{ userInfo?.orgName2 || '--' }}</Col>
|
||||
<Col :span="8">部门:{{ userInfo?.orgName || '--' }}</Col>
|
||||
<Col :span="8">手机号码:{{ userInfo?.phone || '--' }}</Col>
|
||||
</Row>
|
||||
<Row style="font-size: 14px; font-weight: bold"> 健康信息 </Row>
|
||||
<Row> 异常事件:{{ userInfo?.eventType_dictText || '--' }} </Row>
|
||||
<Row>
|
||||
<Col :span="8">异常值:{{ userInfo?.dataValue || '--' }}</Col>
|
||||
<Col :span="16">发生时间:{{ userInfo?.warnTime || '--' }}</Col>
|
||||
</Row>
|
||||
<div style="display: flex">
|
||||
<div>发生地点:</div>
|
||||
<div style="padding-left: 10px; display: flex; overflow-wrap: anywhere" :style="{ color: userInfo?.address || 'red' }">
|
||||
{{ userInfo?.address || userInfo?.gpsErrorMsg || '--' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
|
||||
import { Empty } from 'ant-design-vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { Empty, message } from 'ant-design-vue';
|
||||
import { ref, onMounted, watch } from 'vue';
|
||||
import pointPng from '/@/assets/indexSun/point.png';
|
||||
import addressPng from '/@/assets/indexSun/address.png';
|
||||
import { oneRApi } from '/@/views/indexSun/indexSun.api.ts';
|
||||
const loading = ref(true);
|
||||
const scrollList = ref<any[]>([]);
|
||||
import { Row, Col } from 'ant-design-vue';
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { Map } from '/@/assets/mapUtils/map.ts';
|
||||
|
||||
const emit = defineEmits(['handleView']);
|
||||
const { themeType } = useTheme();
|
||||
const step = ref(0.2);
|
||||
const scrollList = ref<any[]>([]);
|
||||
const openInfor = ref<boolean>(false); //弹窗显示
|
||||
const userInfo = ref({
|
||||
realName: '',
|
||||
orgName1: '',
|
||||
phone: '',
|
||||
eventType_dictText: '',
|
||||
warnTime: '',
|
||||
address: '',
|
||||
dataValue: '',
|
||||
});
|
||||
|
||||
const props = defineProps({
|
||||
bKey: {
|
||||
type: Number,
|
||||
default: () => 0,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['handleView', 'showReset']);
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
watch(props, () => {
|
||||
getList();
|
||||
});
|
||||
function getList() {
|
||||
oneRApi({}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@@ -49,6 +105,26 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
function handlePolice(item) {
|
||||
userInfo.value = item;
|
||||
openInfor.value = true;
|
||||
step.value = 0;
|
||||
}
|
||||
function handlePoliceClose() {
|
||||
openInfor.value = false;
|
||||
step.value = 0.2;
|
||||
}
|
||||
function sendPosition(item) {
|
||||
let { lon, lat } = item;
|
||||
if (lon && lat) {
|
||||
Map.createMarker(item, () => {
|
||||
handlePolice(item);
|
||||
});
|
||||
emit('showReset');
|
||||
} else {
|
||||
message.warn('暂无经纬度信息!');
|
||||
}
|
||||
}
|
||||
function handleView() {
|
||||
emit('handleView');
|
||||
}
|
||||
@@ -104,4 +180,28 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.police-con {
|
||||
padding: 2% 5% 2% 5%;
|
||||
display: grid;
|
||||
color: #ffffff;
|
||||
|
||||
.con-item {
|
||||
padding: 1.3% 0;
|
||||
display: flex;
|
||||
|
||||
div:nth-child(1) {
|
||||
font-weight: bold;
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div:nth-child(2) {
|
||||
width: calc(100% - 100px);
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-row {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user