解决冲突

This commit is contained in:
zhaotiantian
2023-12-08 18:28:19 +08:00
24 changed files with 856 additions and 243 deletions
+61 -24
View File
@@ -4,11 +4,12 @@
<div class="inner">
<vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :limitScrollNum="4" v-bind="classOption">
<div class="item" v-for="(item, i) in scrollList" :key="i">
<span>{{ item?.realName }}</span>
<span>{{ item?.eventType_dictText }}</span>
<span class="fixed-width" :title="item?.realName">{{ item?.realName }}</span>
<span class="fixed-width" :title="item?.eventType_dictText">{{ item?.eventType_dictText }}</span>
<div class="time-icon">
<span>{{ item?.warnTime }}</span>
<span class="terminal-icon" @click="handlePolice(item)"></span>
<span class="terminal-icon" @click="handlePolice(item)" title="健康报警员工信息"></span>
<span class="position" @click="sendPosition(item)" title="员工定位"></span>
</div>
</div>
</vue3-seamless-scroll>
@@ -25,27 +26,27 @@
<div class="police-con">
<div class="con-item">
<span>姓名</span>
<span>{{ userInfo.name }}</span>
<span>{{ userInfo?.realName }}</span>
</div>
<div class="con-item">
<span>二级单位</span>
<span>{{ userInfo.unit }}</span>
<span>{{ userInfo?.orgName1 }}</span>
</div>
<div class="con-item">
<span>手机号码</span>
<span>{{ userInfo.iphone }}</span>
<span>{{ userInfo?.phone }}</span>
</div>
<div class="con-item">
<span>异常事件</span>
<span>{{ userInfo.abnormal }}</span>
<span>{{ userInfo?.eventType_dictText }}</span>
</div>
<div class="con-item">
<span>发生时间</span>
<span>{{ userInfo.time }}</span>
<span>{{ userInfo?.warnTime }}</span>
</div>
<div class="con-item">
<span>发生地点</span>
<span>{{ userInfo.address }}</span>
<span>{{ userInfo?.address }}</span>
</div>
</div>
</template>
@@ -54,24 +55,26 @@
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import $bus from '/@/utils/bus.ts';
import { columns } from '/@/components/body-d-right/bodyRightHooks.ts';
import PublicTitle from '/@/components/publicTitle.vue';
import Dialog from '/@/components/dialog/Dialog.vue';
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
import { getMonitorList } from '/@/components/body-d-right/right.api.ts';
import { Map } from '/@/assets/mapUtils/map.ts';
const classOption = {
const classOption = ref({
step: 0.3, // 速度
};
});
const open = ref<boolean>(false);
const openInfor = ref<boolean>(false);
const userInfo = ref({
name: '王苗',
unit: '长庆油田',
iphone: '1897263745',
abnormal: '体温异常',
time: '2023-11-23 16:23',
address: '陕西省西安市',
realName: '',
orgName1: '',
phone: '',
eventType_dictText: '',
warnTime: '',
address: '',
});
const dataSource = ref([
@@ -91,12 +94,21 @@
open.value = false;
}
function handlePolice() {
/**
* @desc open员工信息
*/
function handlePolice(item) {
userInfo.value = item;
openInfor.value = true;
classOption.value.step = 0;
}
/**
* @desc close员工信息
*/
function handlePoliceClose() {
openInfor.value = false;
classOption.value.step = 0.3;
}
onMounted(() => {
@@ -109,12 +121,19 @@
const scrollList = ref([]);
async function getScrollList() {
const { code, result } = await getMonitorList({});
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1 });
if (code == 200) {
scrollList.value = result;
scrollList.value = result.records;
}
}
console.log('dd', result);
function sendPosition(item) {
let { lon, lat } = item;
if (lon && lat) {
Map.createMarker(item, () => {
handlePolice(item);
});
}
}
</script>
<style scoped lang="less">
@@ -125,7 +144,7 @@
justify-content: center;
.scroll {
width: 90%;
width: 98%;
height: 88%;
overflow: hidden;
@@ -135,6 +154,14 @@
justify-content: space-between;
padding: 3% 0;
.fixed-width {
display: inline-flex;
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
span {
color: #ffffff;
font-size: 16px;
@@ -146,11 +173,21 @@
}
.terminal-icon {
margin-left: 20px;
margin-left: 15px;
display: inline-block;
width: 18px;
height: 18px;
background: url('../../assets/images/terminal.png') no-repeat;
background: url('/@/assets/images/terminal.png') no-repeat;
background-size: 100% 100%;
cursor: pointer;
}
.position {
margin-left: 5px;
display: inline-block;
width: 20px;
height: 20px;
background: url('/@/assets/img/position.png') no-repeat;
background-size: 100% 100%;
cursor: pointer;
}