|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="project-tsa-wrapper ">
|
|
<div class="project-tsa-wrapper ">
|
|
|
- <div class="scrollbar" :style="{ height: scorllHeight + 'px' }">
|
|
|
|
|
|
|
+ <div class="scrollbar" :style="{ height: '100%' }">
|
|
|
<a-collapse style="background: #232323;" :bordered="false" expandIconPosition="right" accordion
|
|
<a-collapse style="background: #232323;" :bordered="false" expandIconPosition="right" accordion
|
|
|
v-model:activeKey="state.activeKey">
|
|
v-model:activeKey="state.activeKey">
|
|
|
<a-collapse-panel style="border-bottom: 1px solid #4f4f4f;" :key="EDeviceTypeName.Dock" header="机场">
|
|
<a-collapse-panel style="border-bottom: 1px solid #4f4f4f;" :key="EDeviceTypeName.Dock" header="机场">
|
|
@@ -8,8 +8,7 @@
|
|
|
<a-empty :image="noData" :image-style="{ height: '60px' }" />
|
|
<a-empty :image="noData" :image-style="{ height: '60px' }" />
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else class="fz12" style="color: white;">
|
|
<div v-else class="fz12" style="color: white;">
|
|
|
- <div v-for="dock in onlineDocks.data" :key="dock.sn"
|
|
|
|
|
- style="background: #3c3c3c; height: 90px; width: 250px; margin-bottom: 10px;">
|
|
|
|
|
|
|
+ <div class="airport-item" v-for="dock in onlineDocks.data" :key="dock.sn">
|
|
|
<div style="border-radius: 2px; height: 100%; width: 100%;"
|
|
<div style="border-radius: 2px; height: 100%; width: 100%;"
|
|
|
class="flex-row flex-justify-between flex-align-center">
|
|
class="flex-row flex-justify-between flex-align-center">
|
|
|
<div style="float: left; padding: 0px 5px 8px 8px; width: 88%">
|
|
<div style="float: left; padding: 0px 5px 8px 8px; width: 88%">
|
|
@@ -159,8 +158,7 @@
|
|
|
<a-empty :image="noData" :image-style="{ height: '60px' }" />
|
|
<a-empty :image="noData" :image-style="{ height: '60px' }" />
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else class="fz12" style="color: white;">
|
|
<div v-else class="fz12" style="color: white;">
|
|
|
- <div
|
|
|
|
|
- :class="['device-item', (state.selectedDeviceList.includes(device.gateway.sn) && 'device-item-selected')]"
|
|
|
|
|
|
|
+ <div :class="['device-item', (state.selectedDevice === device.gateway.sn && 'device-item-selected')]"
|
|
|
v-for="device in onlineDevices.data" :key="device.sn" @click="onClickSelectedDevice(device)">
|
|
v-for="device in onlineDevices.data" :key="device.sn" @click="onClickSelectedDevice(device)">
|
|
|
<div class="battery-slide" v-if="deviceInfo[device.sn]">
|
|
<div class="battery-slide" v-if="deviceInfo[device.sn]">
|
|
|
<div style="background: #535759; width: 100%;"></div>
|
|
<div style="background: #535759; width: 100%;"></div>
|
|
@@ -230,11 +228,11 @@
|
|
|
</a-collapse-panel>
|
|
</a-collapse-panel>
|
|
|
</a-collapse>
|
|
</a-collapse>
|
|
|
</div>
|
|
</div>
|
|
|
- <div style="width: 100%;padding-top: 10px; display: flex;justify-content: center;align-items: center;">
|
|
|
|
|
|
|
+ <!-- <div style="width: 100%;padding-top: 10px; display: flex;justify-content: center;align-items: center;">
|
|
|
<a-button style="margin-right: 10px;" type="primary" @click="onClickGoHome">
|
|
<a-button style="margin-right: 10px;" type="primary" @click="onClickGoHome">
|
|
|
返回
|
|
返回
|
|
|
</a-button>
|
|
</a-button>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -269,7 +267,7 @@ const onlineDocks = reactive({
|
|
|
|
|
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
|
activeKey: -1,
|
|
activeKey: -1,
|
|
|
- selectedDeviceList: [] as string[],
|
|
|
|
|
|
|
+ selectedDevice: '',
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const mapClickElement = computed(() => store.state.mapClickElement)
|
|
const mapClickElement = computed(() => store.state.mapClickElement)
|
|
@@ -309,18 +307,13 @@ onMounted(() => {
|
|
|
// 点击选中设备
|
|
// 点击选中设备
|
|
|
const onClickSelectedDevice = (record: OnlineDevice) => {
|
|
const onClickSelectedDevice = (record: OnlineDevice) => {
|
|
|
const sn = record.gateway.sn;
|
|
const sn = record.gateway.sn;
|
|
|
- const list = state.selectedDeviceList;
|
|
|
|
|
- if (list.includes(sn)) {// 取消选中
|
|
|
|
|
- state.selectedDeviceList = list.filter(item => item != sn)
|
|
|
|
|
- } else {// 选中后
|
|
|
|
|
- state.selectedDeviceList = [...list, sn]
|
|
|
|
|
- const gatewayInfo = store.state.deviceState.gatewayInfo[sn]
|
|
|
|
|
- if (gatewayInfo) {
|
|
|
|
|
- const coordinate = wgs84togcj02(gatewayInfo.longitude, gatewayInfo.latitude)
|
|
|
|
|
- // 最后点击的进行地图视角跟进
|
|
|
|
|
- root.$map.setCenter(coordinate)
|
|
|
|
|
- console.log('触发绘画实时轨迹');
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ state.selectedDevice = sn;
|
|
|
|
|
+ const gatewayInfo = store.state.deviceState.gatewayInfo[sn];
|
|
|
|
|
+ if (gatewayInfo) {
|
|
|
|
|
+ const coordinate = wgs84togcj02(gatewayInfo.longitude, gatewayInfo.latitude);
|
|
|
|
|
+ // 地图视角平移
|
|
|
|
|
+ root.$map.setCenter(coordinate)
|
|
|
|
|
+ console.log('触发绘画实时轨迹');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -438,6 +431,18 @@ function openLivestreamAgora() {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
|
+.airport-item {
|
|
|
|
|
+ background: #3c3c3c;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ padding-top: 10px;
|
|
|
|
|
+ border-radius: 2px;
|
|
|
|
|
+ border: 2px solid transparent;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ margin-top: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.device-item {
|
|
.device-item {
|
|
|
background: #3c3c3c;
|
|
background: #3c3c3c;
|
|
|
width: 100%;
|
|
width: 100%;
|