添加打包命令 区分 冀北还是其他地方的页面
This commit is contained in:
@@ -26,7 +26,14 @@
|
||||
</div>
|
||||
|
||||
<!-- 地图 -->
|
||||
<!-- <Map ref="mapRef" @changeValue="changeValue" :lineInfo="lineInfo" @drop="drop" @show="infoShow" /> -->
|
||||
<Map
|
||||
v-if="VITE_FLAG"
|
||||
ref="mapRef"
|
||||
@changeValue="changeValue"
|
||||
:lineInfo="lineInfo"
|
||||
@drop="drop"
|
||||
@show="infoShow"
|
||||
/>
|
||||
<div v-show="lineInfo">
|
||||
<!-- 省级 -->
|
||||
<div v-show="control == 1">
|
||||
@@ -48,7 +55,7 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, nextTick, ref, provide } from 'vue'
|
||||
import Area from '@/components/form/area/index.vue'
|
||||
// import Map from './components/map.vue'
|
||||
import Map from './components/map.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { Search, Refresh } from '@element-plus/icons-vue'
|
||||
@@ -56,14 +63,15 @@ import mapL from './components/mapL.vue'
|
||||
import mapR from './components/mapR.vue'
|
||||
import cityMapL from './components/cityMapL.vue'
|
||||
import cityMapR from './components/cityMapR.vue'
|
||||
|
||||
import Info from './components/line/info.vue'
|
||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
|
||||
const dictData = useDictData()
|
||||
defineOptions({
|
||||
name: 'panorama'
|
||||
})
|
||||
|
||||
const datePickerRef = ref()
|
||||
const areaRef = ref()
|
||||
const lineInfo = ref(true)
|
||||
@@ -73,6 +81,7 @@ const InfoRef = ref()
|
||||
const mapRRef = ref()
|
||||
const cityMapLRef = ref()
|
||||
const cityMapRRef = ref()
|
||||
|
||||
// const list: any = [dictData.state.area[0], ...dictData.state.area[0].children]
|
||||
const options: any = ref([
|
||||
{
|
||||
@@ -95,8 +104,7 @@ const form: any = ref({
|
||||
const height = mainHeight(10)
|
||||
// 获取区域名称
|
||||
const changeValue = (e: any) => {
|
||||
console.log('🚀 ~ changeValue ~ e:', e.data)
|
||||
// mapRef.value.locatePositions(e)
|
||||
VITE_FLAG ? mapRef.value.locatePositions(e) : ''
|
||||
form.value.orgNo = e.data.id //list.filter((item: any) => item.code == e.orgId)[0]?.id || dictData.state.area[0].id
|
||||
form.value.areaName = e.data.name
|
||||
options.value[0].name = e.data.areaName
|
||||
@@ -121,7 +129,7 @@ const infoShow = (e: boolean) => {
|
||||
}
|
||||
// 地图控制图层
|
||||
const LookMap = (row: any, key?: any) => {
|
||||
// mapRef.value.addMarkers({ ...row, type: 1 }, key)
|
||||
VITE_FLAG ? mapRef.value.addMarkers({ ...row, type: 1 }, key) : ''
|
||||
}
|
||||
const LngLat = [
|
||||
{
|
||||
@@ -162,14 +170,14 @@ const LngLat = [
|
||||
]
|
||||
//区域统计展示切换
|
||||
const GridDiagram = (k?: number, num?: number) => {
|
||||
// mapRef.value.radiusPop(k)
|
||||
VITE_FLAG ? mapRef.value.radiusPop(k) : ''
|
||||
if (num == 3) {
|
||||
// form.value.areaName
|
||||
let value = LngLat.filter(item => item.name == form.value.areaName)[0]
|
||||
|
||||
// if (value) mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom)
|
||||
if (value) VITE_FLAG ? mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom) : ''
|
||||
} else {
|
||||
// mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425)
|
||||
VITE_FLAG ? mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425) : ''
|
||||
}
|
||||
}
|
||||
const info = () => {
|
||||
@@ -180,7 +188,7 @@ const info = () => {
|
||||
|
||||
form.value.type = datePickerRef.value.interval
|
||||
|
||||
// mapRef.value.grids(form.value)
|
||||
VITE_FLAG ? mapRef.value.grids(form.value) : ''
|
||||
if (control.value == 1) {
|
||||
mapLRef.value.info(form.value)
|
||||
mapRRef.value.info(form.value)
|
||||
|
||||
Reference in New Issue
Block a user