update
1.修改socket弹窗等
This commit is contained in:
@@ -19,22 +19,22 @@
|
||||
<a-button class="search-btn" @click="searchRoute" :loading="searchFlag" :disabled="searchFlag"> 路线规划 </a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div v-show="showRoutePanel" v-click-outside="outClick" class="line-container">
|
||||
<div v-show="routeList.length" class="has-data">
|
||||
<div class="line-title"> {{ panelTitle }}</div>
|
||||
<div class="line-content">
|
||||
<div class="start">起点</div>
|
||||
<div class="line-body">
|
||||
<div class="line"></div>
|
||||
<div class="line-desc">
|
||||
<p v-for="(item, i) in routeList" :key="i">{{ item }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="showRoutePanel" v-click-outside="outClick" class="line-container">
|
||||
<div v-show="routeList.length" class="has-data">
|
||||
<div class="line-title"> {{ panelTitle }}</div>
|
||||
<div class="line-content">
|
||||
<div class="start">起点</div>
|
||||
<div class="line-body">
|
||||
<div class="line"></div>
|
||||
<div class="line-desc">
|
||||
<p v-for="(item, i) in routeList" :key="i">{{ item }}</p>
|
||||
</div>
|
||||
<div class="end">终点</div>
|
||||
</div>
|
||||
<div class="end">终点</div>
|
||||
</div>
|
||||
<div v-show="!routeList.length" class="empty-data"> 暂无数据</div>
|
||||
</div>
|
||||
<div v-show="!routeList.length" class="empty-data"> 暂无数据</div>
|
||||
</div>
|
||||
<div class="map">
|
||||
<div style="flex: 1; overflow: hidden">
|
||||
@@ -59,10 +59,18 @@
|
||||
<div class="text">累计处置</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hospital-list" :class="[themeType]" v-if="showHospitalList">
|
||||
<div class="hospital-item" v-for="(item, index) in hospitalList" :key="index" @click="showDrivingLine(item)">
|
||||
<div>{{ item.name }}</div>
|
||||
<div>相距{{ item.distance }}</div>
|
||||
<div>驾车大约{{ item.driveTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { nextTick, onMounted, ref } from 'vue';
|
||||
import { infoContent, legendList, tabList } from '/@/views/indexSun/indexSun.ts';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { innerLineLight, outerLineOption } from '/@/assets/mapUtils/mapConstant.ts';
|
||||
@@ -71,7 +79,8 @@
|
||||
import { useDetailStore } from '/@/store/modules/detailData.ts';
|
||||
import $bus from '/@/utils/bus.ts';
|
||||
import { earlyWarning } from '/@/utils/busConstant.ts';
|
||||
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
const { themeType } = useTheme();
|
||||
const list = ref(tabList);
|
||||
const currentIndex = ref(0);
|
||||
let searchFlag = ref(false);
|
||||
@@ -87,11 +96,25 @@
|
||||
return true;
|
||||
},
|
||||
},
|
||||
//是否展示最近的三个医院
|
||||
showHospitalList: {
|
||||
type: Boolean,
|
||||
default: () => {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
hospitalList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
});
|
||||
const useDetail = useDetailStore();
|
||||
const showRoutePanel = ref(false);
|
||||
const panelTitle = ref();
|
||||
const level = ref(0);
|
||||
const drivingTitle = ref('');
|
||||
const routeList = ref([]);
|
||||
const emits = defineEmits(['clearHospitalList']);
|
||||
const showDrivingPanel = ref(false);
|
||||
@@ -121,6 +144,19 @@
|
||||
});
|
||||
});
|
||||
|
||||
function showDrivingLine(item) {
|
||||
nextTick(() => {
|
||||
panelTitle.value = '全程' + item.driveTime + item.distance;
|
||||
routeList.value = item.routeList?.map((item) => item?.instruction);
|
||||
showDrivingPanel.value = true;
|
||||
if (item.lon) {
|
||||
Map.clearNaviLine();
|
||||
Map.createNaviLine(item.userLocation, [item.lon, item.lat]);
|
||||
}
|
||||
showRoutePanel.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
function setLevel() {
|
||||
//获取当前地图级别
|
||||
level.value = Map.map.getZoom();
|
||||
@@ -377,88 +413,6 @@
|
||||
background: #6d8bf1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.line-container {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 54px;
|
||||
width: 288px;
|
||||
padding: 9px 18px;
|
||||
min-height: 200px;
|
||||
max-height: 473px;
|
||||
overflow: auto;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
border-radius: 2px;
|
||||
//border: 1px solid #1b7ef2;
|
||||
|
||||
.line-title {
|
||||
margin-bottom: 9px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: var(--cardFontColor);
|
||||
}
|
||||
|
||||
.line-content {
|
||||
font-size: 12px;
|
||||
color: var(--cardFontColor);
|
||||
|
||||
.start {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
content: '起';
|
||||
color: var(--cardFontFFF);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 7px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
background: var(--circelBg);
|
||||
}
|
||||
}
|
||||
|
||||
.end {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
content: '终';
|
||||
color: var(--cardFontFFF);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 7px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
background: var(--circelBg);
|
||||
}
|
||||
}
|
||||
|
||||
.line-body {
|
||||
display: flex;
|
||||
color: var(--cardFontColor);
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 1px;
|
||||
background-color: var(--circelBg);
|
||||
margin: 5px 19px 5px 8px;
|
||||
}
|
||||
|
||||
.line-desc {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-data {
|
||||
margin-top: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.map {
|
||||
@@ -578,5 +532,113 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hospital-list {
|
||||
position: absolute;
|
||||
bottom: 160px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
|
||||
.hospital-item {
|
||||
background: #0a1d36;
|
||||
border: 1px solid #0a1d36;
|
||||
box-shadow: 0 0 3px 3px #0a1d36;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
gap: 20px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
margin: 0 10px;
|
||||
font-size: 16px;
|
||||
border-radius: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.line-container {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 54px;
|
||||
width: 288px;
|
||||
padding: 9px 18px;
|
||||
min-height: 200px;
|
||||
max-height: 473px;
|
||||
overflow: auto;
|
||||
background: #0a1d36;
|
||||
border-radius: 2px;
|
||||
//border: 1px solid #1b7ef2;
|
||||
|
||||
.line-title {
|
||||
margin-bottom: 9px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
background: #0a1d36 !important;
|
||||
color: var(--cardFontColor);
|
||||
}
|
||||
|
||||
.line-content {
|
||||
font-size: 12px;
|
||||
color: var(--cardFontColor);
|
||||
|
||||
.start {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
content: '起';
|
||||
color: var(--cardFontFFF);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 7px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
background: var(--circelBg);
|
||||
}
|
||||
}
|
||||
|
||||
.end {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&::before {
|
||||
content: '终';
|
||||
color: var(--cardFontFFF);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 7px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 50%;
|
||||
background: var(--circelBg);
|
||||
}
|
||||
}
|
||||
|
||||
.line-body {
|
||||
display: flex;
|
||||
color: var(--cardFontColor);
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 1px;
|
||||
background-color: var(--circelBg);
|
||||
margin: 5px 19px 5px 8px;
|
||||
}
|
||||
|
||||
.line-desc {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-data {
|
||||
margin-top: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user