增加地图元素清空功能,完成附近医院路线规划功能

This commit is contained in:
zk
2024-05-23 15:05:34 +08:00
parent 1599ffd6d8
commit 0eb5fad72f
11 changed files with 611 additions and 31 deletions
+33 -5
View File
@@ -3,7 +3,7 @@
<Dialog :openVis="visible" width="30%" :title="title" @close="closeDialog" :maskClosable="false">
<template #container>
<div class="police-con">
<div class="sub-text">有一个员工刚刚发起应急求助,请马上处理!</div>
<div class="sub-text"> 有一个员工刚刚发起应急求助,请马上处理</div>
<div class="con-item">
<span>姓名</span>
<span>{{ userInfo?.realName }}</span>
@@ -13,25 +13,41 @@
<span>{{ userInfo?.age }}</span>
</div>
<div class="con-item">
<span>二级单位</span>
<span>单位</span>
<span>{{ userInfo?.departName }}</span>
</div>
<div class="con-item">
<span>部门</span>
<span>{{ userInfo?.orgName }}</span>
</div>
</div>
<div class="btn-box">
<a-button type="primary" @click="confirmHelp">确认</a-button>
</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';
import { watch, ref, Ref } from 'vue';
const props = defineProps({
record: Object,
});
const userInfo = ref({});
const emit = defineEmits(['confirmHelp']);
interface UserInfo {
realName?: string;
age?: string;
departName?: string;
orgName?: string;
}
const userInfo: Ref<UserInfo> = ref({});
watch(
() => props.record,
(nVal) => {
(nVal: UserInfo) => {
userInfo.value = nVal;
}
);
@@ -40,6 +56,12 @@
defineExpose({
openDialog,
});
//确认帮助
function confirmHelp() {
closeDialog();
emit('confirmHelp', userInfo.value);
}
</script>
<style scoped lang="less">
.police-con {
@@ -51,6 +73,7 @@
.sub-text {
font-weight: bold;
margin-left: 8px;
font-size: 16px;
}
.con-item {
@@ -72,4 +95,9 @@
}
}
}
.btn-box {
text-align: center;
margin-top: 2%;
}
</style>