|  |  | 
 |  |  | <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> | 
 |  |  | <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>
 |