|
@@ -1,152 +1,155 @@
|
|
|
<template>
|
|
|
- <Transition name="fade">
|
|
|
- <div class="f-panel-left panel-cube" :class="{ 'collapse': layoutStore.leftCollapse }">
|
|
|
- <i @click="handleClose" class="absolute right-4 top-4 text-white size-6 cursor-pointer hover:scale-110">
|
|
|
- <img src="@/assets/images/svg/close.svg" alt="">
|
|
|
- </i>
|
|
|
-
|
|
|
- <h2 class="c-title">{{ mapStore.gridCode || '-' }}</h2>
|
|
|
-
|
|
|
- <div class="flex flex-1">
|
|
|
- <div id="c-chart"></div>
|
|
|
-
|
|
|
- <ul class="c-list ml-4 flex-1 flex flex-wrap justify-between content-between">
|
|
|
- <li v-for="(item, index) in list" class=" flex w-1/2">
|
|
|
- <img :src="getAssetsFile(`page/icon-cube-${index + 1}.png`)" alt="">
|
|
|
- <div class="ml-2 pl-2 pt-1 flex-1 flex flex-col justify-evenly">
|
|
|
- <span>{{ item.label }}</span>
|
|
|
- <div>
|
|
|
- <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>
|
|
|
+ <Transition name="fade">
|
|
|
+ <div class="f-panel-left panel-cube" :class="{ collapse: layoutStore.leftCollapse }">
|
|
|
+ <i @click="handleClose" class="absolute right-4 top-4 text-white size-6 cursor-pointer hover:scale-110">
|
|
|
+ <img src="@/assets/images/svg/close.svg" alt="" />
|
|
|
+ </i>
|
|
|
+
|
|
|
+ <h2 class="c-title">{{ mapStore.gridCode || '-' }}</h2>
|
|
|
+
|
|
|
+ <div class="flex flex-1">
|
|
|
+ <div id="c-chart"></div>
|
|
|
+
|
|
|
+ <ul class="c-list ml-4 flex-1 flex flex-wrap justify-between content-between">
|
|
|
+ <li v-for="(item, index) in list" class="flex w-1/2">
|
|
|
+ <img :src="getAssetsFile(`page/icon-cube-${index + 1}.png`)" alt="" />
|
|
|
+ <div class="ml-2 pl-2 pt-1 flex-1 flex flex-col justify-evenly">
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
+ <div>
|
|
|
+ <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 { setAqxs } from '@/echarts/options';
|
|
|
-import { queryGridByCode } from "@/service/map.js";
|
|
|
-import useLayoutStore from '@/store/layout';
|
|
|
-import { useMapStore } from "@/store/map.js";
|
|
|
-import { getAssetsFile } from '@/utils/require';
|
|
|
-import { onMounted, ref, watch } from 'vue';
|
|
|
-
|
|
|
-const mapStore = useMapStore();
|
|
|
+import { setAqxs } from '@/echarts/options'
|
|
|
+import { queryGridByCode } from '@/service/map.js'
|
|
|
+import useLayoutStore from '@/store/layout'
|
|
|
+import { useMapStore } from '@/store/map.js'
|
|
|
+import { getAssetsFile } from '@/utils/require'
|
|
|
+import { onMounted, ref, watch } from 'vue'
|
|
|
+
|
|
|
+const mapStore = useMapStore()
|
|
|
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: '米' },
|
|
|
+ { label: '是否占用', value: '', unit: '' },
|
|
|
+ { label: '占用类型', value: [], unit: '' },
|
|
|
+ { label: '人口', value: '', unit: '人' },
|
|
|
+ { label: '河流上方', value: '', unit: '' },
|
|
|
+ { label: '道路上方', value: '', unit: '' },
|
|
|
])
|
|
|
|
|
|
function handleClose() {
|
|
|
- layoutStore.toggleFloatPanel('cube', false)
|
|
|
+ layoutStore.toggleFloatPanel('cube', false)
|
|
|
}
|
|
|
|
|
|
function getGridData() {
|
|
|
- queryGridByCode({
|
|
|
- code: mapStore.gridCode
|
|
|
- }).then(res => {
|
|
|
- if (res.data.code == "200") {
|
|
|
- const { data } = res.data
|
|
|
- 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[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("网格信息查询失败")
|
|
|
- }
|
|
|
- })
|
|
|
+ queryGridByCode({
|
|
|
+ code: mapStore.gridCode,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.code == '200') {
|
|
|
+ const { data } = res.data
|
|
|
+ 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[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('网格信息查询失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
- getGridData()
|
|
|
+ getGridData()
|
|
|
})
|
|
|
|
|
|
-watch(() => mapStore.gridCode, (val) => {
|
|
|
- getGridData()
|
|
|
-}, {
|
|
|
- deep: true
|
|
|
-})
|
|
|
+watch(
|
|
|
+ () => mapStore.gridCode,
|
|
|
+ (val) => {
|
|
|
+ getGridData()
|
|
|
+ },
|
|
|
+ {
|
|
|
+ deep: true,
|
|
|
+ }
|
|
|
+)
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.panel-cube {
|
|
|
- width: 624px;
|
|
|
- height: 307px;
|
|
|
- padding: 20px 20px 35px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- background: url('../../../assets/images/page/bg-dialog-wide.png');
|
|
|
- background-size: 100% 100% !important;
|
|
|
+ width: 624px;
|
|
|
+ height: 307px;
|
|
|
+ padding: 20px 20px 35px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ background: url('../../../assets/images/page/bg-dialog-wide.png');
|
|
|
+ background-size: 100% 100% !important;
|
|
|
}
|
|
|
|
|
|
.c-title {
|
|
|
- width: 90%;
|
|
|
- overflow: hidden;
|
|
|
- white-space: nowrap;
|
|
|
- text-overflow: ellipsis;
|
|
|
- margin-bottom: 5px;
|
|
|
- font-size: 26px;
|
|
|
- background: linear-gradient(186deg, rgba(128, 155, 237, 1) 0%, rgba(255, 255, 255, 1) 100%);
|
|
|
- -webkit-background-clip: text;
|
|
|
- -webkit-text-fill-color: transparent;
|
|
|
+ width: 90%;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ margin-bottom: 5px;
|
|
|
+ font-size: 26px;
|
|
|
+ background: linear-gradient(186deg, rgba(128, 155, 237, 1) 0%, rgba(255, 255, 255, 1) 100%);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ -webkit-text-fill-color: transparent;
|
|
|
}
|
|
|
|
|
|
#c-chart {
|
|
|
- width: 210px;
|
|
|
- height: 100%;
|
|
|
+ width: 210px;
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
|
|
|
.c-list {
|
|
|
- li {
|
|
|
- height: 57px;
|
|
|
-
|
|
|
- &>div {
|
|
|
- background: url('../../../assets/images/page/bg-des.png');
|
|
|
- background-size: 100% 100%;
|
|
|
-
|
|
|
- &>span {
|
|
|
- background: linear-gradient(0deg, #7F9FFF 30%, #FFFFFF 100%);
|
|
|
- -webkit-background-clip: text;
|
|
|
- -webkit-text-fill-color: transparent;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+ li {
|
|
|
+ height: 57px;
|
|
|
+
|
|
|
+ & > div {
|
|
|
+ background: url('../../../assets/images/page/bg-des.png');
|
|
|
+ background-size: 100% 100%;
|
|
|
+
|
|
|
+ & > span {
|
|
|
+ background: linear-gradient(0deg, #7f9fff 30%, #ffffff 100%);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ -webkit-text-fill-color: transparent;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|