|
@@ -16,25 +16,26 @@
|
|
|
<div class="ml-2 pl-2 pt-1 flex-1 flex flex-col justify-evenly">
|
|
|
<span>{{ item.label }}</span>
|
|
|
<div>
|
|
|
- <span>{{ item.value || '-' }}</span>
|
|
|
+ <span v-if="index === 2" :title="item.value.join(',')">{{ item.value.length === 0 ? '-' : item.value.length > 1 ?
|
|
|
+ item.value[0] + '...' : item.value[0] }}</span>
|
|
|
+ <span v-else>{{ item.value || '-' }}</span>
|
|
|
<span v-if="item.value" class="ml-1">{{ item.unit }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
</Transition>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { onBeforeMount, onMounted, ref, watch } from 'vue';
|
|
|
+import { setAqxs } from '@/echarts/options';
|
|
|
+import { queryGridByCode } from "@/service/map.js";
|
|
|
import useLayoutStore from '@/store/layout';
|
|
|
import { useMapStore } from "@/store/map.js";
|
|
|
-import { queryGridByCode } from "@/service/map.js";
|
|
|
import { getAssetsFile } from '@/utils/require';
|
|
|
-import { setAqxs } from '@/echarts/options';
|
|
|
+import { onMounted, ref, watch } from 'vue';
|
|
|
|
|
|
const mapStore = useMapStore();
|
|
|
const layoutStore = useLayoutStore()
|
|
@@ -42,23 +43,12 @@ const layoutStore = useLayoutStore()
|
|
|
const list = ref([
|
|
|
{ label: '高度', value: '', unit: '米' },
|
|
|
{ label: '是否占用', value: '', unit: '' },
|
|
|
- { label: '占用类型', value: '', unit: '' },
|
|
|
+ { label: '占用类型', value: [], unit: '' },
|
|
|
{ label: '人口', value: '', unit: '人' },
|
|
|
{ label: '河流上方', value: '', unit: '' },
|
|
|
{ label: '道路上方', value: '', unit: '' },
|
|
|
])
|
|
|
|
|
|
-// let form = ref({
|
|
|
-// safetyIndex: '',
|
|
|
-// river: '',
|
|
|
-// road: '',
|
|
|
-// collision: '',
|
|
|
-// green: '',
|
|
|
-// occupation: '',
|
|
|
-// airspaceType: '',
|
|
|
-// populationDensity: ''
|
|
|
-// })
|
|
|
-
|
|
|
function handleClose() {
|
|
|
layoutStore.toggleFloatPanel('cube', false)
|
|
|
}
|
|
@@ -72,10 +62,31 @@ function getGridData() {
|
|
|
const { element } = data
|
|
|
setAqxs(document.getElementById('c-chart'), data.weightValue || 0)
|
|
|
list.value[0].value = data.z.toFixed(2)
|
|
|
- list.value[4].value = element.river? '是': '否'
|
|
|
- list.value[5].value = element.road? '是': '否'
|
|
|
+ list.value[4].value = element.river ? '是' : '否'
|
|
|
+ list.value[5].value = element.road ? '是' : '否'
|
|
|
list.value[3].value = element.demographics
|
|
|
|
|
|
+ const occupyTypes = {
|
|
|
+ clearZone: '净空区',
|
|
|
+ clearZoneBuffer: '净空区缓冲区',
|
|
|
+ noFlyZone: '禁飞区',
|
|
|
+ noFlyZoneBuffer: '禁飞区缓冲区',
|
|
|
+ collision: '建筑物',
|
|
|
+ collisionBuffer: '建筑物缓冲区',
|
|
|
+ expand1: '起降场',
|
|
|
+ expand2: '航线',
|
|
|
+ }
|
|
|
+
|
|
|
+ list.value[1].value = '否'
|
|
|
+ let occupys = []
|
|
|
+ for (const [k, v] of Object.entries(occupyTypes)) {
|
|
|
+ if (element[k]) {
|
|
|
+ list.value[1].value = '是'
|
|
|
+ occupys.push(v)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ list.value[2].value = occupys
|
|
|
+
|
|
|
} else {
|
|
|
console.log("网格信息查询失败")
|
|
|
}
|