|
@@ -46,7 +46,7 @@ const list = ref([
|
|
|
{ label: '是否占用', value: '', unit: '' },
|
|
|
{ label: '占用类型', value: [], unit: '' },
|
|
|
// { label: '人口密度', value: '', unit: '人/km²' },
|
|
|
- { label: '人口密度', value: '', unit: '人' },
|
|
|
+ { label: '人口密度', value: '', unit: '人/km²' },
|
|
|
{ label: '河流上方', value: '', unit: '' },
|
|
|
{ label: '道路上方', value: '', unit: '' },
|
|
|
])
|
|
@@ -67,14 +67,21 @@ function getGridData() {
|
|
|
list.value[4].value = element.river ? '是' : '否'
|
|
|
list.value[5].value = element.road ? '是' : '否'
|
|
|
// list.value[3].value = +element.demographics * 100
|
|
|
+ debugger
|
|
|
list.value[3].value = element.demographics
|
|
|
|
|
|
- // if(list.value[3].value > 99999) {
|
|
|
- // list.value[3].value = Math.round(list.value[3].value / 10000)
|
|
|
- // list.value[3].unit = '万人/km²'
|
|
|
- // } else {
|
|
|
- // list.value[3].unit = '人/km²'
|
|
|
- // }
|
|
|
+ let beishu = 1
|
|
|
+ for (let i = 0; i < 24 - data.level; i++) {
|
|
|
+ beishu = beishu * 4
|
|
|
+ }
|
|
|
+ list.value[3].value = ((element.demographics * 100) / beishu).toFixed(0)
|
|
|
+ //
|
|
|
+ if (list.value[3].value > 9999) {
|
|
|
+ list.value[3].value = Math.round(list.value[3].value / 10000)
|
|
|
+ list.value[3].unit = '万人/km²'
|
|
|
+ } else {
|
|
|
+ list.value[3].unit = '人/km²'
|
|
|
+ }
|
|
|
|
|
|
const occupyTypes = {
|
|
|
clearZone: '净空区',
|