diff --git a/package.json b/package.json index 5a2d05ea..719a9545 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cn", - "version": "24.4.0", + "version": "24.8.0", "private": true, "scripts": { "serve": "vue-cli-service serve", @@ -14,6 +14,7 @@ "@amcharts/amcharts4-geodata": "^4.1.20", "@antv/g6": "^4.8.17", "@element-plus/icons-vue": "^2.3.1", + "@turf/turf": "^7.1.0", "axios": "^0.21.1", "babel-plugin-lodash": "~3.3.0", "codemirror": "^5.65.1", diff --git a/src/assets/css/components/views/location/location.scss b/src/assets/css/components/views/location/location.scss index 9be33b48..6afb7820 100644 --- a/src/assets/css/components/views/location/location.scss +++ b/src/assets/css/components/views/location/location.scss @@ -385,7 +385,7 @@ $color-highlight: #CC4444; } .legend-range { - margin-right: 40px; + margin-right: 30px; width: 54px; font-family: Helvetica; font-size: 12px; @@ -407,8 +407,9 @@ $color-highlight: #CC4444; .chart__statistics { display: flex; - height: 20px; + height: 30px; padding-left: 10px; + padding-bottom: 8px; .statistics-number { margin-right: 8px; @@ -434,11 +435,7 @@ $color-highlight: #CC4444; } .chart-line__drawing { - height: calc(100% - 32px); - } - - #activeSubscribersChart { - height: calc(100% - 52px); + height: calc(100% - 60px); } } diff --git a/src/utils/geo-utils.js b/src/utils/geo-utils.js new file mode 100644 index 00000000..299d6d0a --- /dev/null +++ b/src/utils/geo-utils.js @@ -0,0 +1,13 @@ +import * as turf from '@turf/turf' + +export function generateRectanglePolygon (minLongitude, minLatitude, maxLongitude, maxLatitude) { + return turf.polygon([ + [ + [minLongitude, minLatitude], + [minLongitude, maxLatitude], + [maxLongitude, maxLatitude], + [maxLongitude, minLatitude], + [minLongitude, minLatitude] + ] + ]) +} diff --git a/src/views/location/Index.vue b/src/views/location/Index.vue index 0e557312..239b89b4 100644 --- a/src/views/location/Index.vue +++ b/src/views/location/Index.vue @@ -87,12 +87,21 @@ @input="debounceSearch">
-
+ + +