skyouc
2024-12-21 c635d78b479510ebe2556a420948effcd30a0731
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<script setup>
import { getCurrentInstance, ref, computed, reactive } from 'vue';
import { useRouter } from "vue-router";
import { get, post, postBlob } from '@/utils/request.js'
import { message, Modal } from 'ant-design-vue';
import { logout } from '@/config.js';
import { formatMessage } from '@/utils/localeUtils.js';
import MapView from '@/components/loc/map/index.vue'
import LocMapView from './locMap.vue'
import {
    FormOutlined,
    CameraOutlined,
} from "@ant-design/icons-vue";
 
const currentPage = ref("map")
 
const switchPage = () => {
    let tmp = ''
    if (currentPage.value == 'map') {
        tmp = 'locMap'
    }
    if (currentPage.value == 'locMap') {
        tmp = 'map'
    }
    currentPage.value = tmp;
}
 
</script>
 
<script>
export default {
    name: '库位地图'
}
</script>
 
<template>
    <a-float-button :style="{
        right: '24px',
        bottom: '100px'
    }" @click="switchPage()">
        <template #icon>
            <div v-if="currentPage == 'map'">
                <FormOutlined />
            </div>
            <div v-else>
                <CameraOutlined />
            </div>
        </template>
    </a-float-button>
    <MapView v-if="currentPage == 'map'" />
    <LocMapView v-else />
</template>
 
<style></style>