MiddleSection.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <div class="middle-section">
  3. <div class="search-button">
  4. <el-button type="primary" @click="handleQuery1">备战防御</el-button>
  5. <el-button type="primary" @click="handleQuery2">指挥调度</el-button>
  6. </div>
  7. <!-- <Dialog id="selectMap" v-model="mapDialogVisible" title="气象图" width="700px" height="600px" @close="dialogClose">-->
  8. <company-map v-model:visible="mapDialogVisible" :address="form.address" style="height: 1500px" @confirm="handleMapChange"></company-map>
  9. <!-- </Dialog>-->
  10. <GlobalMap is-component width="3894" height="2140" />
  11. </div>
  12. </template>
  13. <script lang="ts" setup>
  14. import GlobalMap from '../globalMap/index.vue';
  15. import { ref } from 'vue';
  16. // import Dialog from "@/components/Dialog/index2.vue";
  17. import CompanyMap from '@/components/Map/company-map.vue';
  18. const form = ref({
  19. address: '',
  20. lon: '',
  21. lat: ''
  22. });
  23. const mapDialogVisible = ref(false);
  24. const handleQuery1 = () => {
  25. console.log('备战防御被点击');
  26. };
  27. const handleQuery2 = () => {
  28. mapDialogVisible.value = true;
  29. };
  30. const handleMapChange = (data) => {
  31. form.value.drillAddress = data.address;
  32. form.value.lon = data.lnglat[0];
  33. form.value.lat = data.lnglat[1];
  34. mapDialogVisible.value = false;
  35. };
  36. </script>
  37. <style lang="scss" scoped>
  38. .middle-section {
  39. margin: 0 91px;
  40. flex: 1;
  41. height: 2140px;
  42. animation: slideAndFade 1.5s;
  43. position: relative;
  44. }
  45. .search-button {
  46. position: absolute;
  47. top: 60px;
  48. left: 900px;
  49. z-index: 10;
  50. }
  51. .el-button {
  52. width: 360px;
  53. height: 100px;
  54. padding: 20px 40px;
  55. font-size: 48px;
  56. }
  57. @keyframes slideAndFade {
  58. 0% {
  59. transform: translateY(218px);
  60. opacity: 0;
  61. }
  62. 100% {
  63. transform: translateX(0);
  64. opacity: 1;
  65. }
  66. }
  67. </style>