完成水电表列表

This commit is contained in:
Zy
2026-04-18 18:14:07 +08:00
parent 9a95e2b7e3
commit d0888c6afb
115 changed files with 2842 additions and 343 deletions

View File

@@ -0,0 +1,43 @@
<script setup lang="ts">
import { onMounted, onUnmounted } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader';
let map = null;
onMounted(() => {
window._AMapSecurityConfig = {
securityJsCode: '「你申请的安全密钥」'
};
AMapLoader.load({
key: '', // 申请好的Web端开发者Key首次调用 load 时必填
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
plugins: ['AMap.Scale'] //需要使用的的插件列表,如比例尺'AMap.Scale',支持添加多个如:['...','...']
})
.then((AMap) => {
map = new AMap.Map('container', {
// 设置地图容器id
viewMode: '3D', // 是否为3D地图模式
zoom: 11, // 初始化地图级别
center: [116.397428, 39.90923] // 初始化地图中心点位置
});
})
.catch((e) => {
console.log(e);
});
});
onUnmounted(() => {
map?.destroy();
});
</script>
<template>
<div id="container"></div>
</template>
<style scoped>
#container {
width: 100%;
height: 800px;
}
</style>

View File

@@ -6,7 +6,7 @@
<!-- 页面标题 -->
<div class="pageTitleBox flex items-center">
<div class="line"></div>
<div class="pagetitle">{{ props.title }}</div>
<div class="pagetitle">{{ title }}</div>
</div>
<!-- solt -->
<slot name="content" v-if="Boolean(showSlot.content)"></slot>
@@ -28,14 +28,15 @@ const showSlot = computed(() => {
operate: slots.operate ?? null
};
});
const route = useRoute();
const props = defineProps({
title: {
type: String,
default: '房屋管理'
default: ''
}
});
const title = computed(() => (props.title ? props.title : route.meta.title));
defineSlots<{
content?: () => void;
operate?: () => void;