From 90f976c3682282779327cfb796a91e1bac31863c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Thu, 20 Apr 2023 10:46:21 +0800 Subject: [PATCH 01/51] Merge branch 'main' of http://47.92.168.204:3000/VoRDM/vordm-admin into main --- package-lock.json | 200 +++++++++++++++++- src/components/Map.vue | 9 +- .../responseManagement/userResponse/index.vue | 11 +- 3 files changed, 211 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index ceda835..4970686 100644 --- a/package-lock.json +++ b/package-lock.json @@ -329,11 +329,6 @@ "fastq": "^1.6.0" } }, - "@popperjs/core": { - "version": "npm:@sxzz/popperjs-es@2.11.7", - "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", - "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" - }, "@rollup/pluginutils": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", @@ -483,6 +478,15 @@ "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.2.47.tgz", "integrity": "sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==" }, + "@vueup/vue-quill": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/@vueup/vue-quill/-/vue-quill-1.1.1.tgz", + "integrity": "sha512-1INx+pr+AK/5SrfFwJIojO+VhYrv6ZHwaYCxO5Irp+vjpm/z4v8zLpUIA86ideX7cNA8Tai+nkrGlWKnAeM0RQ==", + "requires": { + "quill": "^1.3.7", + "quill-delta": "^4.2.2" + } + }, "@vueuse/core": { "version": "9.13.0", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.13.0.tgz", @@ -708,6 +712,11 @@ "tiny-emitter": "^2.0.0" } }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/clone/-/clone-2.1.2.tgz", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==" + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -866,12 +875,48 @@ "ms": "2.1.2" } }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + } + } + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "dependencies": { + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -951,6 +996,13 @@ "lodash-unified": "^1.0.2", "memoize-one": "^6.0.0", "normalize-wheel-es": "^1.2.0" + }, + "dependencies": { + "@popperjs/core": { + "version": "npm:@sxzz/popperjs-es@2.11.7", + "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz", + "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==" + } } }, "esbuild": { @@ -1156,6 +1208,16 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "eventemitter3": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, "falafel": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz", @@ -1183,6 +1245,11 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-diff": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==" + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1291,6 +1358,11 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" + }, "get-intrinsic": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", @@ -1367,11 +1439,27 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "requires": { + "get-intrinsic": "^1.1.1" + } + }, "has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "requires": { + "has-symbols": "^1.0.2" + } + }, "iconv-lite": { "version": "0.2.11", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz", @@ -1420,6 +1508,15 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -1437,6 +1534,14 @@ "has": "^1.0.3" } }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -1473,6 +1578,15 @@ "@types/estree": "*" } }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -1583,6 +1697,16 @@ "resolved": "https://registry.npmjs.org/lodash-unified/-/lodash-unified-1.0.3.tgz", "integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==" }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==" + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -1690,6 +1814,15 @@ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==" }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmmirror.com/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "object-keys": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", @@ -1752,6 +1885,11 @@ "p-limit": "^3.0.2" } }, + "parchment": { + "version": "1.1.4", + "resolved": "https://registry.npmmirror.com/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==" + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -1876,6 +2014,48 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "quill": { + "version": "1.3.7", + "resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "requires": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + }, + "dependencies": { + "quill-delta": { + "version": "3.6.3", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "requires": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + } + } + } + }, + "quill-delta": { + "version": "4.2.2", + "resolved": "https://registry.npmmirror.com/quill-delta/-/quill-delta-4.2.2.tgz", + "integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==", + "requires": { + "fast-diff": "1.2.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + }, + "dependencies": { + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" + } + } + }, "quote-stream": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", @@ -1909,6 +2089,16 @@ "picomatch": "^2.2.1" } }, + "regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + } + }, "resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", diff --git a/src/components/Map.vue b/src/components/Map.vue index fb287ff..6e4adde 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -139,7 +139,14 @@ onMounted(() => { */ const mapOperations = { wktParseToMap: (res) => { - return omnivore.wkt.parse(res).addTo(homeMap) + return omnivore.wkt.parse(res).addTo(featureLayerG_point) + // if(omnivore.wkt.parse(res) instanceof L.Marker){ + + // } + // else{ + // return omnivore.wkt.parse(res).addTo(featureLayerG_area ) + // } + }, /** 添加点标注 * Object param 参数集合 diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index c485c29..1980bd6 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -224,7 +224,11 @@ const onOpenEditRole = (type, row) => { state.dialogVisible = true; nextTick(() => { state.radio = "1" + // mapRef.value.mapOperations.removeAll() //赋值地图范围,并且可以修改点或者区域 + if(state.wktPoint){ + mapRef.value.mapOperations.removeLayer( state.wktPoint) + } state.wktPoint= mapRef.value.mapOperations.wktParseToMap(row.geometry) // mapRef.value.mapOperations.on("click", (res)=>{ // mapRef.value.mapOperations.clearPolygon() @@ -239,6 +243,7 @@ const mapEvents = (ev)=>{ if(ev == '1'){ mapRef.value.mapOperations.clearPolygon() mapRef.value.mapOperations.on("click", mapClick) + mapRef.value.mapOperations.on("mousemove", changelatlon) }else{ mapRef.value.mapOperations.off("click",mapClick); mapRef.value.mapOperations.drawPolygon() @@ -282,7 +287,7 @@ const onMapClick = (e) => { state.lat = e.latlng.lat.toFixed(3); state.lon = e.latlng.lng.toFixed(3); - map.value.mapOperations.addInteractMarker(state.lat, state.lon) + mapRef.value.mapOperations.addInteractMarker(state.lat, state.lon) } const changelatlon = (e) => { //深拷贝e @@ -335,13 +340,13 @@ onMounted(() => { }); watchEffect(() => { if (state.radio== "1") { - // map.value.mapOperations.on("click", onMapClick) + // mapRef.value.mapOperations.on("click", onMapClick) // map.value.mapOperations.clearPolygon() // map.value.mapOperations.on("mousemove", changelatlon) // variableStore.polygoncontrol = "option1" } else { - // map.value.mapOperations.off("click", onMapClick) + // mapRef.value.mapOperations.off("click", onMapClick) // map.value.mapOperations.drawPolygon() // map.value.mapOperations.drawCreated() // variableStore.polygoncontrol = "option2" From c8575781746f21c0f7558310cc8a0d9d47d7cb72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Thu, 20 Apr 2023 10:58:37 +0800 Subject: [PATCH 02/51] npm install Leaflet-Geoman --- package-lock.json | 224 ++++++++++++++++++ package.json | 1 + src/components/Map.vue | 2 + .../responseManagement/userResponse/index.vue | 2 + 4 files changed, 229 insertions(+) diff --git a/package-lock.json b/package-lock.json index 4970686..6f10cb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -224,6 +224,19 @@ "@floating-ui/core": "^1.2.4" } }, + "@geoman-io/leaflet-geoman-free": { + "version": "2.14.2", + "resolved": "https://registry.npmmirror.com/@geoman-io/leaflet-geoman-free/-/leaflet-geoman-free-2.14.2.tgz", + "integrity": "sha512-6lIyG8RvSVdFjVjiQgBPyNASjymSyqzsiUeBW0pA+q41lB5fAg4SDC6SfJvWdEyDHa81Jb5FWjUkCc9O+u0gbg==", + "requires": { + "@turf/boolean-contains": "^6.5.0", + "@turf/kinks": "^6.5.0", + "@turf/line-intersect": "^6.5.0", + "@turf/line-split": "^6.5.0", + "lodash": "4.17.21", + "polygon-clipping": "0.15.3" + } + }, "@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -339,6 +352,172 @@ "picomatch": "^2.2.2" } }, + "@turf/bbox": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/bbox/-/bbox-6.5.0.tgz", + "integrity": "sha512-RBbLaao5hXTYyyg577iuMtDB8ehxMlUqHEJiMs8jT1GHkFhr6sYre3lmLsPeYEi/ZKj5TP5tt7fkzNdJ4GIVyw==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, + "@turf/bearing": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/bearing/-/bearing-6.5.0.tgz", + "integrity": "sha512-dxINYhIEMzgDOztyMZc20I7ssYVNEpSv04VbMo5YPQsqa80KO3TFvbuCahMsCAW5z8Tncc8dwBlEFrmRjJG33A==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/boolean-contains": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/boolean-contains/-/boolean-contains-6.5.0.tgz", + "integrity": "sha512-4m8cJpbw+YQcKVGi8y0cHhBUnYT+QRfx6wzM4GI1IdtYH3p4oh/DOBJKrepQyiDzFDaNIjxuWXBh0ai1zVwOQQ==", + "requires": { + "@turf/bbox": "^6.5.0", + "@turf/boolean-point-in-polygon": "^6.5.0", + "@turf/boolean-point-on-line": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/boolean-point-in-polygon": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-6.5.0.tgz", + "integrity": "sha512-DtSuVFB26SI+hj0SjrvXowGTUCHlgevPAIsukssW6BG5MlNSBQAo70wpICBNJL6RjukXg8d2eXaAWuD/CqL00A==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/boolean-point-on-line": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/boolean-point-on-line/-/boolean-point-on-line-6.5.0.tgz", + "integrity": "sha512-A1BbuQ0LceLHvq7F/P7w3QvfpmZqbmViIUPHdNLvZimFNLo4e6IQunmzbe+8aSStH9QRZm3VOflyvNeXvvpZEQ==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/destination": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/destination/-/destination-6.5.0.tgz", + "integrity": "sha512-4cnWQlNC8d1tItOz9B4pmJdWpXqS0vEvv65bI/Pj/genJnsL7evI0/Xw42RvEGROS481MPiU80xzvwxEvhQiMQ==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/distance": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/distance/-/distance-6.5.0.tgz", + "integrity": "sha512-xzykSLfoURec5qvQJcfifw/1mJa+5UwByZZ5TZ8iaqjGYN0vomhV9aiSLeYdUGtYRESZ+DYC/OzY+4RclZYgMg==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/helpers": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/helpers/-/helpers-6.5.0.tgz", + "integrity": "sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw==" + }, + "@turf/invariant": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/invariant/-/invariant-6.5.0.tgz", + "integrity": "sha512-Wv8PRNCtPD31UVbdJE/KVAWKe7l6US+lJItRR/HOEW3eh+U/JwRCSUl/KZ7bmjM/C+zLNoreM2TU6OoLACs4eg==", + "requires": { + "@turf/helpers": "^6.5.0" + } + }, + "@turf/kinks": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/kinks/-/kinks-6.5.0.tgz", + "integrity": "sha512-ViCngdPt1eEL7hYUHR2eHR662GvCgTc35ZJFaNR6kRtr6D8plLaDju0FILeFFWSc+o8e3fwxZEJKmFj9IzPiIQ==", + "requires": { + "@turf/helpers": "^6.5.0" + } + }, + "@turf/line-intersect": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/line-intersect/-/line-intersect-6.5.0.tgz", + "integrity": "sha512-CS6R1tZvVQD390G9Ea4pmpM6mJGPWoL82jD46y0q1KSor9s6HupMIo1kY4Ny+AEYQl9jd21V3Scz20eldpbTVA==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/line-segment": "^6.5.0", + "@turf/meta": "^6.5.0", + "geojson-rbush": "3.x" + } + }, + "@turf/line-segment": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/line-segment/-/line-segment-6.5.0.tgz", + "integrity": "sha512-jI625Ho4jSuJESNq66Mmi290ZJ5pPZiQZruPVpmHkUw257Pew0alMmb6YrqYNnLUuiVVONxAAKXUVeeUGtycfw==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, + "@turf/line-split": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/line-split/-/line-split-6.5.0.tgz", + "integrity": "sha512-/rwUMVr9OI2ccJjw7/6eTN53URtGThNSD5I0GgxyFXMtxWiloRJ9MTff8jBbtPWrRka/Sh2GkwucVRAEakx9Sw==", + "requires": { + "@turf/bbox": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/line-intersect": "^6.5.0", + "@turf/line-segment": "^6.5.0", + "@turf/meta": "^6.5.0", + "@turf/nearest-point-on-line": "^6.5.0", + "@turf/square": "^6.5.0", + "@turf/truncate": "^6.5.0", + "geojson-rbush": "3.x" + } + }, + "@turf/meta": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/meta/-/meta-6.5.0.tgz", + "integrity": "sha512-RrArvtsV0vdsCBegoBtOalgdSOfkBrTJ07VkpiCnq/491W67hnMWmDu7e6Ztw0C3WldRYTXkg3SumfdzZxLBHA==", + "requires": { + "@turf/helpers": "^6.5.0" + } + }, + "@turf/nearest-point-on-line": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/nearest-point-on-line/-/nearest-point-on-line-6.5.0.tgz", + "integrity": "sha512-WthrvddddvmymnC+Vf7BrkHGbDOUu6Z3/6bFYUGv1kxw8tiZ6n83/VG6kHz4poHOfS0RaNflzXSkmCi64fLBlg==", + "requires": { + "@turf/bearing": "^6.5.0", + "@turf/destination": "^6.5.0", + "@turf/distance": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/line-intersect": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, + "@turf/square": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/square/-/square-6.5.0.tgz", + "integrity": "sha512-BM2UyWDmiuHCadVhHXKIx5CQQbNCpOxB6S/aCNOCLbhCeypKX5Q0Aosc5YcmCJgkwO5BERCC6Ee7NMbNB2vHmQ==", + "requires": { + "@turf/distance": "^6.5.0", + "@turf/helpers": "^6.5.0" + } + }, + "@turf/truncate": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/truncate/-/truncate-6.5.0.tgz", + "integrity": "sha512-pFxg71pLk+eJj134Z9yUoRhIi8vqnnKvCYwdT4x/DQl/19RVdq1tV3yqOT3gcTQNfniteylL5qV1uTBDV5sgrg==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, "@types/estree": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", @@ -1363,6 +1542,25 @@ "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, + "geojson-rbush": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/geojson-rbush/-/geojson-rbush-3.2.0.tgz", + "integrity": "sha512-oVltQTXolxvsz1sZnutlSuLDEcQAKYC/uXt9zDzJJ6bu0W+baTI8LZBaTup5afzibEH4N3jlq2p+a152wlBJ7w==", + "requires": { + "@turf/bbox": "*", + "@turf/helpers": "6.x", + "@turf/meta": "6.x", + "@types/geojson": "7946.0.8", + "rbush": "^3.0.1" + }, + "dependencies": { + "@types/geojson": { + "version": "7946.0.8", + "resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.8.tgz", + "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" + } + } + }, "get-intrinsic": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", @@ -1942,6 +2140,14 @@ "vue-demi": "*" } }, + "polygon-clipping": { + "version": "0.15.3", + "resolved": "https://registry.npmmirror.com/polygon-clipping/-/polygon-clipping-0.15.3.tgz", + "integrity": "sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg==", + "requires": { + "splaytree": "^3.1.0" + } + }, "polyline": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/polyline/-/polyline-0.2.0.tgz", @@ -2014,6 +2220,11 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "quickselect": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz", + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + }, "quill": { "version": "1.3.7", "resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz", @@ -2066,6 +2277,14 @@ "through2": "^2.0.0" } }, + "rbush": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/rbush/-/rbush-3.0.1.tgz", + "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", + "requires": { + "quickselect": "^2.0.0" + } + }, "readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -2268,6 +2487,11 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "splaytree": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/splaytree/-/splaytree-3.1.1.tgz", + "integrity": "sha512-9FaQ18FF0+sZc/ieEeXHt+Jw2eSpUgUtTLDYB/HXKWvhYVyOc7h1hzkn5MMO3GPib9MmXG1go8+OsBBzs/NMww==" + }, "static-eval": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-0.2.4.tgz", diff --git a/package.json b/package.json index d890010..826ed3d 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.1.0", + "@geoman-io/leaflet-geoman-free": "^2.14.2", "@mapbox/leaflet-omnivore": "^0.3.4", "@vueup/vue-quill": "^1.0.0-alpha.40", "axios": "^1.3.4", diff --git a/src/components/Map.vue b/src/components/Map.vue index 6e4adde..5aea370 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -11,6 +11,8 @@ import L from 'leaflet' import 'leaflet/dist/leaflet.css' import 'leaflet-draw/dist/leaflet.draw' import 'leaflet-draw/dist/leaflet.draw.css' +import '@geoman-io/leaflet-geoman-free'; +import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css'; import 'Leaflet-ImageOverlay-Rotated' import { useVariableStore } from '/@/stores/index.ts' import * as omnivore from '@mapbox/leaflet-omnivore' diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 1980bd6..4b0a9a8 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -148,6 +148,8 @@ - \ No newline at end of file + \ No newline at end of file From 0f7539c39b8467d4011582cfec00176dcb72a1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Thu, 20 Apr 2023 16:56:43 +0800 Subject: [PATCH 04/51] npm install Leaflet-Geoman --- package-lock.json | 224 ++++++++++++++++++ package.json | 1 + src/components/Map.vue | 2 + .../responseManagement/userResponse/index.vue | 2 + 4 files changed, 229 insertions(+) diff --git a/package-lock.json b/package-lock.json index 4970686..6f10cb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -224,6 +224,19 @@ "@floating-ui/core": "^1.2.4" } }, + "@geoman-io/leaflet-geoman-free": { + "version": "2.14.2", + "resolved": "https://registry.npmmirror.com/@geoman-io/leaflet-geoman-free/-/leaflet-geoman-free-2.14.2.tgz", + "integrity": "sha512-6lIyG8RvSVdFjVjiQgBPyNASjymSyqzsiUeBW0pA+q41lB5fAg4SDC6SfJvWdEyDHa81Jb5FWjUkCc9O+u0gbg==", + "requires": { + "@turf/boolean-contains": "^6.5.0", + "@turf/kinks": "^6.5.0", + "@turf/line-intersect": "^6.5.0", + "@turf/line-split": "^6.5.0", + "lodash": "4.17.21", + "polygon-clipping": "0.15.3" + } + }, "@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", @@ -339,6 +352,172 @@ "picomatch": "^2.2.2" } }, + "@turf/bbox": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/bbox/-/bbox-6.5.0.tgz", + "integrity": "sha512-RBbLaao5hXTYyyg577iuMtDB8ehxMlUqHEJiMs8jT1GHkFhr6sYre3lmLsPeYEi/ZKj5TP5tt7fkzNdJ4GIVyw==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, + "@turf/bearing": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/bearing/-/bearing-6.5.0.tgz", + "integrity": "sha512-dxINYhIEMzgDOztyMZc20I7ssYVNEpSv04VbMo5YPQsqa80KO3TFvbuCahMsCAW5z8Tncc8dwBlEFrmRjJG33A==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/boolean-contains": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/boolean-contains/-/boolean-contains-6.5.0.tgz", + "integrity": "sha512-4m8cJpbw+YQcKVGi8y0cHhBUnYT+QRfx6wzM4GI1IdtYH3p4oh/DOBJKrepQyiDzFDaNIjxuWXBh0ai1zVwOQQ==", + "requires": { + "@turf/bbox": "^6.5.0", + "@turf/boolean-point-in-polygon": "^6.5.0", + "@turf/boolean-point-on-line": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/boolean-point-in-polygon": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-6.5.0.tgz", + "integrity": "sha512-DtSuVFB26SI+hj0SjrvXowGTUCHlgevPAIsukssW6BG5MlNSBQAo70wpICBNJL6RjukXg8d2eXaAWuD/CqL00A==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/boolean-point-on-line": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/boolean-point-on-line/-/boolean-point-on-line-6.5.0.tgz", + "integrity": "sha512-A1BbuQ0LceLHvq7F/P7w3QvfpmZqbmViIUPHdNLvZimFNLo4e6IQunmzbe+8aSStH9QRZm3VOflyvNeXvvpZEQ==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/destination": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/destination/-/destination-6.5.0.tgz", + "integrity": "sha512-4cnWQlNC8d1tItOz9B4pmJdWpXqS0vEvv65bI/Pj/genJnsL7evI0/Xw42RvEGROS481MPiU80xzvwxEvhQiMQ==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/distance": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/distance/-/distance-6.5.0.tgz", + "integrity": "sha512-xzykSLfoURec5qvQJcfifw/1mJa+5UwByZZ5TZ8iaqjGYN0vomhV9aiSLeYdUGtYRESZ+DYC/OzY+4RclZYgMg==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0" + } + }, + "@turf/helpers": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/helpers/-/helpers-6.5.0.tgz", + "integrity": "sha512-VbI1dV5bLFzohYYdgqwikdMVpe7pJ9X3E+dlr425wa2/sMJqYDhTO++ec38/pcPvPE6oD9WEEeU3Xu3gza+VPw==" + }, + "@turf/invariant": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/invariant/-/invariant-6.5.0.tgz", + "integrity": "sha512-Wv8PRNCtPD31UVbdJE/KVAWKe7l6US+lJItRR/HOEW3eh+U/JwRCSUl/KZ7bmjM/C+zLNoreM2TU6OoLACs4eg==", + "requires": { + "@turf/helpers": "^6.5.0" + } + }, + "@turf/kinks": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/kinks/-/kinks-6.5.0.tgz", + "integrity": "sha512-ViCngdPt1eEL7hYUHR2eHR662GvCgTc35ZJFaNR6kRtr6D8plLaDju0FILeFFWSc+o8e3fwxZEJKmFj9IzPiIQ==", + "requires": { + "@turf/helpers": "^6.5.0" + } + }, + "@turf/line-intersect": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/line-intersect/-/line-intersect-6.5.0.tgz", + "integrity": "sha512-CS6R1tZvVQD390G9Ea4pmpM6mJGPWoL82jD46y0q1KSor9s6HupMIo1kY4Ny+AEYQl9jd21V3Scz20eldpbTVA==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/line-segment": "^6.5.0", + "@turf/meta": "^6.5.0", + "geojson-rbush": "3.x" + } + }, + "@turf/line-segment": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/line-segment/-/line-segment-6.5.0.tgz", + "integrity": "sha512-jI625Ho4jSuJESNq66Mmi290ZJ5pPZiQZruPVpmHkUw257Pew0alMmb6YrqYNnLUuiVVONxAAKXUVeeUGtycfw==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, + "@turf/line-split": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/line-split/-/line-split-6.5.0.tgz", + "integrity": "sha512-/rwUMVr9OI2ccJjw7/6eTN53URtGThNSD5I0GgxyFXMtxWiloRJ9MTff8jBbtPWrRka/Sh2GkwucVRAEakx9Sw==", + "requires": { + "@turf/bbox": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/line-intersect": "^6.5.0", + "@turf/line-segment": "^6.5.0", + "@turf/meta": "^6.5.0", + "@turf/nearest-point-on-line": "^6.5.0", + "@turf/square": "^6.5.0", + "@turf/truncate": "^6.5.0", + "geojson-rbush": "3.x" + } + }, + "@turf/meta": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/meta/-/meta-6.5.0.tgz", + "integrity": "sha512-RrArvtsV0vdsCBegoBtOalgdSOfkBrTJ07VkpiCnq/491W67hnMWmDu7e6Ztw0C3WldRYTXkg3SumfdzZxLBHA==", + "requires": { + "@turf/helpers": "^6.5.0" + } + }, + "@turf/nearest-point-on-line": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/nearest-point-on-line/-/nearest-point-on-line-6.5.0.tgz", + "integrity": "sha512-WthrvddddvmymnC+Vf7BrkHGbDOUu6Z3/6bFYUGv1kxw8tiZ6n83/VG6kHz4poHOfS0RaNflzXSkmCi64fLBlg==", + "requires": { + "@turf/bearing": "^6.5.0", + "@turf/destination": "^6.5.0", + "@turf/distance": "^6.5.0", + "@turf/helpers": "^6.5.0", + "@turf/invariant": "^6.5.0", + "@turf/line-intersect": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, + "@turf/square": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/square/-/square-6.5.0.tgz", + "integrity": "sha512-BM2UyWDmiuHCadVhHXKIx5CQQbNCpOxB6S/aCNOCLbhCeypKX5Q0Aosc5YcmCJgkwO5BERCC6Ee7NMbNB2vHmQ==", + "requires": { + "@turf/distance": "^6.5.0", + "@turf/helpers": "^6.5.0" + } + }, + "@turf/truncate": { + "version": "6.5.0", + "resolved": "https://registry.npmmirror.com/@turf/truncate/-/truncate-6.5.0.tgz", + "integrity": "sha512-pFxg71pLk+eJj134Z9yUoRhIi8vqnnKvCYwdT4x/DQl/19RVdq1tV3yqOT3gcTQNfniteylL5qV1uTBDV5sgrg==", + "requires": { + "@turf/helpers": "^6.5.0", + "@turf/meta": "^6.5.0" + } + }, "@types/estree": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz", @@ -1363,6 +1542,25 @@ "resolved": "https://registry.npmmirror.com/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" }, + "geojson-rbush": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/geojson-rbush/-/geojson-rbush-3.2.0.tgz", + "integrity": "sha512-oVltQTXolxvsz1sZnutlSuLDEcQAKYC/uXt9zDzJJ6bu0W+baTI8LZBaTup5afzibEH4N3jlq2p+a152wlBJ7w==", + "requires": { + "@turf/bbox": "*", + "@turf/helpers": "6.x", + "@turf/meta": "6.x", + "@types/geojson": "7946.0.8", + "rbush": "^3.0.1" + }, + "dependencies": { + "@types/geojson": { + "version": "7946.0.8", + "resolved": "https://registry.npmmirror.com/@types/geojson/-/geojson-7946.0.8.tgz", + "integrity": "sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA==" + } + } + }, "get-intrinsic": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", @@ -1942,6 +2140,14 @@ "vue-demi": "*" } }, + "polygon-clipping": { + "version": "0.15.3", + "resolved": "https://registry.npmmirror.com/polygon-clipping/-/polygon-clipping-0.15.3.tgz", + "integrity": "sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg==", + "requires": { + "splaytree": "^3.1.0" + } + }, "polyline": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/polyline/-/polyline-0.2.0.tgz", @@ -2014,6 +2220,11 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "quickselect": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz", + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + }, "quill": { "version": "1.3.7", "resolved": "https://registry.npmmirror.com/quill/-/quill-1.3.7.tgz", @@ -2066,6 +2277,14 @@ "through2": "^2.0.0" } }, + "rbush": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/rbush/-/rbush-3.0.1.tgz", + "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", + "requires": { + "quickselect": "^2.0.0" + } + }, "readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -2268,6 +2487,11 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "splaytree": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/splaytree/-/splaytree-3.1.1.tgz", + "integrity": "sha512-9FaQ18FF0+sZc/ieEeXHt+Jw2eSpUgUtTLDYB/HXKWvhYVyOc7h1hzkn5MMO3GPib9MmXG1go8+OsBBzs/NMww==" + }, "static-eval": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-0.2.4.tgz", diff --git a/package.json b/package.json index d890010..826ed3d 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.1.0", + "@geoman-io/leaflet-geoman-free": "^2.14.2", "@mapbox/leaflet-omnivore": "^0.3.4", "@vueup/vue-quill": "^1.0.0-alpha.40", "axios": "^1.3.4", diff --git a/src/components/Map.vue b/src/components/Map.vue index 6e4adde..5aea370 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -11,6 +11,8 @@ import L from 'leaflet' import 'leaflet/dist/leaflet.css' import 'leaflet-draw/dist/leaflet.draw' import 'leaflet-draw/dist/leaflet.draw.css' +import '@geoman-io/leaflet-geoman-free'; +import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css'; import 'Leaflet-ImageOverlay-Rotated' import { useVariableStore } from '/@/stores/index.ts' import * as omnivore from '@mapbox/leaflet-omnivore' diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 1980bd6..4b0a9a8 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -148,6 +148,8 @@ + \ No newline at end of file diff --git a/src/views/dataService/multimediaData/index.vue b/src/views/dataService/multimediaData/index.vue index cb4a81a..ee46835 100644 --- a/src/views/dataService/multimediaData/index.vue +++ b/src/views/dataService/multimediaData/index.vue @@ -17,9 +17,8 @@ @@ -35,20 +34,23 @@
diff --git a/src/views/dataService/remoteSensingData/components/retrievalCondition.vue b/src/views/dataService/remoteSensingData/components/retrievalCondition.vue index a091222..cca3d07 100644 --- a/src/views/dataService/remoteSensingData/components/retrievalCondition.vue +++ b/src/views/dataService/remoteSensingData/components/retrievalCondition.vue @@ -25,12 +25,12 @@
@@ -96,7 +96,7 @@ clearable placeholder="Select resolution" /> - + @@ -640,4 +640,8 @@ const searchDisasterDate = () => { .el-pagination { padding-left: 1%; } +.mt15 { + float: right; + margin-bottom: 15px; +} \ No newline at end of file diff --git a/src/views/dataService/remoteSensingData/components/searchCondition.vue b/src/views/dataService/remoteSensingData/components/searchCondition.vue index 72b9bda..2d7fbae 100644 --- a/src/views/dataService/remoteSensingData/components/searchCondition.vue +++ b/src/views/dataService/remoteSensingData/components/searchCondition.vue @@ -7,7 +7,7 @@ Select time range - + Start time @@ -19,7 +19,7 @@ - + End time diff --git a/src/views/dataService/visualData/index.vue b/src/views/dataService/visualData/index.vue index 4c97f1c..d21517d 100644 --- a/src/views/dataService/visualData/index.vue +++ b/src/views/dataService/visualData/index.vue @@ -1,44 +1,28 @@ @@ -158,7 +105,7 @@ import HotspotForm from './component/hotspotForm.vue'; import WordClouds from './component/wordCloudForm.vue'; import EditHotspotForm from './component/editHotspotForm.vue'; import EditWordCloudsForm from './component/editWordCloudForm.vue'; -import {getWordClouds,getHotspot,getDisasterPage,delData} from '/@/api/data/visualData.js'; +import { getWordClouds, getHotspot, getDisasterPage, delData } from '/@/api/data/visualData.js'; import en from 'element-plus/dist/locale/en.mjs' const activeName = ref('first'); const hotspotRef = ref(); @@ -176,10 +123,10 @@ const uploadRef = ref(); // 定义变量内容 const roleDialogRef = ref(); const state = reactive({ - multipleWord:[], - multipleHotspot:[], - tabVal:'first', - disasterId:null, + multipleWord: [], + multipleHotspot: [], + tabVal: 'first', + disasterId: null, disasterData: { data: [], total: 0, @@ -211,7 +158,7 @@ const handleSelectionHotspotChange = (val) => { } const handleClick = (tab) => { state.tabVal = tab; - state. tableData={ + state.tableData = { data: [], total: 0, loading: false, @@ -225,7 +172,7 @@ const handleClick = (tab) => { }; const auditData = (row) => { let id = row.id - auditRef.value.openDialog([{"id":id}]); + auditRef.value.openDialog([{ "id": id }]); } //格式化字节 const formatSize = (size) => { @@ -250,8 +197,8 @@ const formatSize = (size) => { const formatSizeUnits = (size) => { if (size === 0) return '0 B'; var k = 1000, // or 1024 - sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], - i = Math.floor(Math.log(size) / Math.log(k)); + sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], + i = Math.floor(Math.log(size) / Math.log(k)); return (size / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i]; } @@ -263,7 +210,7 @@ const tableClick = (row, column, event) => { // 初始化灾害表格数据 const getDisasterData = () => { state.disasterData.loading = true; - getDisasterPage(state.disasterData.param.pageNum,state.disasterData.param.pageSize,{}).then(res=>{ + getDisasterPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, {}).then(res => { state.disasterData.data = res.records; state.disasterData.total = res.total; state.disasterData.loading = false; @@ -273,13 +220,13 @@ const getDisasterData = () => { // 初始化表格数据 const getTableData = () => { state.tableData.loading = true; - if(state.tabVal == 'first'){ - getWordClouds(state.tableData.param.pageNum,state.tableData.param.pageSize,{"disasterId_equal":state.disasterId,"isDeleted_equal":0}).then(res=>{ + if (state.tabVal == 'first') { + getWordClouds(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId_equal": state.disasterId, "isDeleted_equal": 0 }).then(res => { state.tableData.data = res.records; state.tableData.total = res.total; }) - }else { - getHotspot(state.tableData.param.pageNum,state.tableData.param.pageSize,{"disasterId_equal":state.disasterId,"isDeleted_equal":0}).then(res=>{ + } else { + getHotspot(state.tableData.param.pageNum, state.tableData.param.pageSize, { "disasterId_equal": state.disasterId, "isDeleted_equal": 0 }).then(res => { state.tableData.data = res.records; state.tableData.total = res.total; }) @@ -290,7 +237,7 @@ const getTableData = () => { }; // 打开上传弹窗 const uploadData = () => { - if(state.disasterId == null){ + if (state.disasterId == null) { ElMessage.warning("Please select the disaster first") return false; } @@ -306,11 +253,11 @@ const editWordCloud = (row) => { }; //批量删除词云或者热点数据 const batchDel = () => { - if(state.tabVal == 'first' && state.multipleWord.length == 0){ + if (state.tabVal == 'first' && state.multipleWord.length == 0) { ElMessage.warning("Select the data to be operated first"); return false; } - if(state.tabVal == 'second' && state.multipleHotspot.length == 0){ + if (state.tabVal == 'second' && state.multipleHotspot.length == 0) { ElMessage.warning("Select the data to be operated first"); return false; } @@ -319,24 +266,24 @@ const batchDel = () => { cancelButtonText: 'cancel', type: 'warning', }) - .then(() => { - if(state.tabVal == 'first'){ - //删除词云 - let id = state.multipleWord.map(item=>item.id) - delData(id.join(),1).then(res=>{ - getTableData(); - ElMessage.success('delete successfully'); - }) - }else{ - //删除热点 - let id = state.multipleHotspot.map(item=>item.id) - delData(id.join(),2).then(res=>{ - getTableData(); - ElMessage.success('delete successfully'); - }) - } - }) - .catch(() => {}); + .then(() => { + if (state.tabVal == 'first') { + //删除词云 + let id = state.multipleWord.map(item => item.id) + delData(id.join(), 1).then(res => { + getTableData(); + ElMessage.success('delete successfully'); + }) + } else { + //删除热点 + let id = state.multipleHotspot.map(item => item.id) + delData(id.join(), 2).then(res => { + getTableData(); + ElMessage.success('delete successfully'); + }) + } + }) + .catch(() => { }); } // 删除词云 const delWordCloud = (row) => { @@ -345,13 +292,13 @@ const delWordCloud = (row) => { cancelButtonText: 'cancel', type: 'warning', }) - .then(() => { - delData(row.id,1).then(res=>{ - getTableData(); - ElMessage.success('delete successfully'); - }) + .then(() => { + delData(row.id, 1).then(res => { + getTableData(); + ElMessage.success('delete successfully'); }) - .catch(() => {}); + }) + .catch(() => { }); }; // 删除热点 @@ -361,13 +308,13 @@ const delHotspot = (row) => { cancelButtonText: 'cancel', type: 'warning', }) - .then(() => { - delData(row.id,2).then(res=>{ - getTableData(); - ElMessage.success('delete successfully'); - }) + .then(() => { + delData(row.id, 2).then(res => { + getTableData(); + ElMessage.success('delete successfully'); }) - .catch(() => {}); + }) + .catch(() => { }); }; // 分页改变 const onHandleDisasterSizeChange = (val) => { @@ -396,7 +343,7 @@ onMounted(() => { }); diff --git a/src/views/dataUploadAndRetrieval/dataRetrieval/index.vue b/src/views/dataUploadAndRetrieval/dataRetrieval/index.vue index 19a2608..6c9c624 100644 --- a/src/views/dataUploadAndRetrieval/dataRetrieval/index.vue +++ b/src/views/dataUploadAndRetrieval/dataRetrieval/index.vue @@ -90,12 +90,12 @@ @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15" - :pager-count="5" + :pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background v-model:page-size="state.tableData.param.pageSize" - layout="total, sizes, prev, pager, next, jumper" + layout="total, sizes, prev, pager, next" :total="state.tableData.total" > --> diff --git a/src/views/dataUploadAndRetrieval/dataUpload/index.vue b/src/views/dataUploadAndRetrieval/dataUpload/index.vue index 0443ea4..dd14be8 100644 --- a/src/views/dataUploadAndRetrieval/dataUpload/index.vue +++ b/src/views/dataUploadAndRetrieval/dataUpload/index.vue @@ -90,12 +90,12 @@ @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15" - :pager-count="5" + :pager-count="3" :page-sizes="[10, 20, 30]" v-model:current-page="state.tableData.param.pageNum" background v-model:page-size="state.tableData.param.pageSize" - layout="total, sizes, prev, pager, next, jumper" + layout="total, sizes, prev, pager, next" :total="state.tableData.total" > --> diff --git a/src/views/login/component/account.vue b/src/views/login/component/account.vue index 3171e20..1a4d878 100644 --- a/src/views/login/component/account.vue +++ b/src/views/login/component/account.vue @@ -24,7 +24,7 @@ @@ -217,3 +217,10 @@ onMounted(() => { }); + diff --git a/src/views/responseManagement/dataUpload/index.vue b/src/views/responseManagement/dataUpload/index.vue index 26e130e..842c47e 100644 --- a/src/views/responseManagement/dataUpload/index.vue +++ b/src/views/responseManagement/dataUpload/index.vue @@ -12,9 +12,9 @@ @@ -50,8 +50,8 @@ @@ -241,4 +241,8 @@ onMounted(() => { } } } +.mt15 { + float: right; + margin-bottom: 15px; +} diff --git a/src/views/responseManagement/tool/index.vue b/src/views/responseManagement/tool/index.vue index 1d6781a..873e22e 100644 --- a/src/views/responseManagement/tool/index.vue +++ b/src/views/responseManagement/tool/index.vue @@ -62,10 +62,10 @@ + layout="total, sizes, prev, pager, next" :total="state.tableData.total"> @@ -171,3 +171,10 @@ onMounted(() => { }); + \ No newline at end of file diff --git a/src/views/responseManagement/userResponse/component/selectUser.vue b/src/views/responseManagement/userResponse/component/selectUser.vue index 8ac07f5..832f27f 100644 --- a/src/views/responseManagement/userResponse/component/selectUser.vue +++ b/src/views/responseManagement/userResponse/component/selectUser.vue @@ -18,9 +18,9 @@ + layout="total, sizes, prev, pager, next" :total="state.tableData.total"> - diff --git a/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue b/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue index 7a28152..9837df0 100644 --- a/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue +++ b/src/views/systemManagement/chiefAdministrator/component/disasterInfo.vue @@ -126,7 +126,7 @@ defineExpose({ \ No newline at end of file diff --git a/src/views/systemManagement/chiefAdministrator/component/manageDisaster.vue b/src/views/systemManagement/chiefAdministrator/component/manageDisaster.vue index 0fa702b..31f38f5 100644 --- a/src/views/systemManagement/chiefAdministrator/component/manageDisaster.vue +++ b/src/views/systemManagement/chiefAdministrator/component/manageDisaster.vue @@ -1,75 +1,62 @@ + + \ No newline at end of file diff --git a/src/utils/request.js b/src/utils/request.js index 23898cb..8e4e748 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -3,8 +3,8 @@ import { ElMessage, ElMessageBox } from 'element-plus'; import qs from 'qs'; import { Session } from '/@/utils/storage'; -// export const moduleName = 'zqq-biz-vordm'; -export const moduleName = 'biz-vordm'; +export const moduleName = 'zqq-biz-vordm'; +// export const moduleName = 'biz-vordm'; export const crawlModule = 'vordm-crawl'; // 配置新建一个 axios 实例 const service = axios.create({ diff --git a/src/views/dataService/remoteSensingData/components/searchCondition.vue b/src/views/dataService/remoteSensingData/components/searchCondition.vue index 2d7fbae..406ad6e 100644 --- a/src/views/dataService/remoteSensingData/components/searchCondition.vue +++ b/src/views/dataService/remoteSensingData/components/searchCondition.vue @@ -7,7 +7,7 @@ Select time range - + Start time @@ -15,11 +15,12 @@ v-model="state.startTime" type="datetime" placeholder="Select start time" - :shortcuts="shortcuts" /> + value-format="YYYY-MM-DD HH:mm:ss" + :shortcuts="state.shortcuts" /> - + End time @@ -27,7 +28,8 @@ v-model="state.endTime" type="datetime" placeholder="Select end time" - :shortcuts="shortcuts" /> + value-format="YYYY-MM-DD HH:mm:ss" + :shortcuts="state.shortcuts" /> @@ -43,8 +45,8 @@ {{ - 'Lat: ' + parseFloat(coordinate.Lat).toFixed(4) + ',  Lng: ' + parseFloat(coordinate.Lng).toFixed(4) - }} + 'Lat: ' + parseFloat(coordinate.Lat).toFixed(4) + ',  Lng: ' + parseFloat(coordinate.Lng).toFixed(4) + }} Select satellite type - @@ -118,160 +120,24 @@ - + + - - - From 71db5daf8016f1ca45de5a170b58ffaae5b7fd61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Sun, 23 Apr 2023 16:54:46 +0800 Subject: [PATCH 20/51] . --- src/views/responseManagement/userResponse/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index 974a15e..8b6098d 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -276,7 +276,7 @@ const ClearSubmit = () => { const mapClick=(res)=>{ // mapRef.value.mapOperations.removeLayer( state.wktPoint_Poly ) changelatlon(res); - state.wktPoint_Poly=mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3)) + mapRef.value.mapOperations.addInteractMarker(res.latlng.lat.toFixed(3),res.latlng.lng.toFixed(3)) // console.log(state.wktPoint_Poly) } const reviews = (index) => { From 5b1b8b3f89ff316e597552fc4d924fe4f35f19af Mon Sep 17 00:00:00 2001 From: yyhouc <792163605@qq.com> Date: Sun, 23 Apr 2023 17:17:36 +0800 Subject: [PATCH 21/51] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../multimediaData/component/boot.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/views/dataService/multimediaData/component/boot.vue b/src/views/dataService/multimediaData/component/boot.vue index 52a460a..2d90d5d 100644 --- a/src/views/dataService/multimediaData/component/boot.vue +++ b/src/views/dataService/multimediaData/component/boot.vue @@ -1,21 +1,21 @@ -->
From ba83f4e478c7c271eac7589f2872a79ac5133d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Mon, 24 Apr 2023 17:29:34 +0800 Subject: [PATCH 35/51] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map.vue | 262 +++++------- .../responseManagement/userResponse/index.vue | 388 ++++++++---------- 2 files changed, 280 insertions(+), 370 deletions(-) diff --git a/src/components/Map.vue b/src/components/Map.vue index b22f2fd..6c4740c 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -2,27 +2,25 @@
- - - \ No newline at end of file + diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index d473e3b..a8c324b 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -1,46 +1,45 @@ - From 97f9ceec6911af888b8b45d62a21d61e6b58312e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=97=8B?= <723607471@qq.com> Date: Mon, 24 Apr 2023 17:30:35 +0800 Subject: [PATCH 36/51] =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/responseManagement/userResponse/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/responseManagement/userResponse/index.vue b/src/views/responseManagement/userResponse/index.vue index a8c324b..c44ee4d 100644 --- a/src/views/responseManagement/userResponse/index.vue +++ b/src/views/responseManagement/userResponse/index.vue @@ -99,7 +99,7 @@ From a11a10b1d39cd36cfd74d510e7b93e49c57cebb4 Mon Sep 17 00:00:00 2001 From: why <986973311@qq.com> Date: Mon, 24 Apr 2023 18:46:06 +0800 Subject: [PATCH 37/51] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/disasterInfo/index.js | 9 +- src/views/home/index.vue | 865 ++++++++++++++++++++-------------- 2 files changed, 521 insertions(+), 353 deletions(-) diff --git a/src/api/disasterInfo/index.js b/src/api/disasterInfo/index.js index f7ed885..03c4b13 100644 --- a/src/api/disasterInfo/index.js +++ b/src/api/disasterInfo/index.js @@ -50,15 +50,18 @@ export function review(data) { /** * 首页 dashborad */ -export function statistics(){ +export function statistics(param){ return request({ url: '/api/'+moduleName+'/ui/disasterInfo/statistics', - method: 'get' + method: 'get', + params:{ + year:param + } }); } export const getUserList = (name,current,size) => { return request({ - url: '/api/yyhouc-system-manager/user/list', + url: '/api/system-manager/user/list', method: 'get', params: { name, diff --git a/src/views/home/index.vue b/src/views/home/index.vue index c337e2e..69f8071 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1,74 +1,140 @@ @@ -79,9 +145,15 @@ import * as echarts from 'echarts'; import { storeToRefs } from 'pinia'; import { useThemeConfig } from '/@/stores/themeConfig'; import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; -import { statistics } from '/@/api/disasterInfo/index.js'; +import {statistics} from '/@/api/disasterInfo/index.js'; // 定义变量内容 +//响应量 发起量 const homeLineRef = ref(); +//访问量和下载量 +const homeVandDRef = ref(); +//上传次数统计 +const homeUploadRef = ref(); + const homePieRef = ref(); const homePieRef2 = ref(); const homeBarRef = ref(); @@ -90,9 +162,14 @@ const storesThemeConfig = useThemeConfig(); const { themeConfig } = storeToRefs(storesThemeConfig); const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes); const state = reactive({ - + param:{ + year:'' + }, + year:new Date, global: { homeChartOne: null, + homeVandD:null, + homeUpload:null, homeChartTwo: null, homeCharThree: null, homeChartFour: null, @@ -136,104 +213,55 @@ const state = reactive({ color3: '--el-color-danger', }, ], - homeThree: [ - { - icon: 'iconfont icon-yangan', - label: '浅粉红', - value: '2.1%OBS/M', - iconColor: '#F72B3F', - }, - { - icon: 'iconfont icon-wendu', - label: '深红(猩红)', - value: '30℃', - iconColor: '#91BFF8', - }, - { - icon: 'iconfont icon-shidu', - label: '淡紫红', - value: '57%RH', - iconColor: '#88D565', - }, - { - icon: 'iconfont icon-shidu', - label: '弱紫罗兰红', - value: '107w', - iconColor: '#88D565', - }, - { - icon: 'iconfont icon-zaosheng', - label: '中紫罗兰红', - value: '57DB', - iconColor: '#FBD4A0', - }, - { - icon: 'iconfont icon-zaosheng', - label: '紫罗兰', - value: '57PV', - iconColor: '#FBD4A0', - }, - { - icon: 'iconfont icon-zaosheng', - label: '暗紫罗兰', - value: '517Cpd', - iconColor: '#FBD4A0', - }, - { - icon: 'iconfont icon-zaosheng', - label: '幽灵白', - value: '12kg', - iconColor: '#FBD4A0', - }, - { - icon: 'iconfont icon-zaosheng', - label: '海军蓝', - value: '64fm', - iconColor: '#FBD4A0', - }, - ], + homeThree: [], myCharts: [], charts: { theme: '', bgColor: '', color: '#303133', }, + countryTable:[], + typeTable:[] }); -// 折线图 -const initLineChart = (xData, data) => { - console.log(xData) - console.log(data) + +// 响应量和发起量 +const initLineChart = (xData,data1, data2) => { if (!state.global.dispose.some((b) => b === state.global.homeChartOne)) state.global.homeChartOne.dispose(); state.global.homeChartOne = markRaw(echarts.init(homeLineRef.value, state.charts.theme)); const option = { backgroundColor: state.charts.bgColor, title: { - text: 'Annual user application statistics', + text: 'Annual user response application statistics', x: 'left', textStyle: { fontSize: '15', color: state.charts.color }, }, grid: { top: 70, right: 20, bottom: 30, left: 30 }, tooltip: { trigger: 'axis' }, - legend: { data: ['响应量'], right: 0 }, + legend: { data: ['response','initiate'], right: 0 }, xAxis: { - data: xData, + data: xData }, yAxis: [ { type: 'value', - name: '响应量', + name: 'response', splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, }, + { + type: 'value', + name: 'initiate', + splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, + } ], series: [ { - name: '响应量', + name: 'response', type: 'line', symbolSize: 6, symbol: 'circle', smooth: true, - data: data, + data: data1, lineStyle: { color: '#fe9a8b' }, itemStyle: { color: '#fe9a8b', borderColor: '#fe9a8b' }, areaStyle: { @@ -242,12 +270,200 @@ const initLineChart = (xData, data) => { { offset: 1, color: '#fe9a8b03' }, ]), }, - }, + },{ + name: 'initiate', + type: 'line', + symbolSize: 6, + symbol: 'circle', + smooth: true, + data: data2, + lineStyle: { color: '#44c05b' }, + itemStyle: { color: '#44c05b', borderColor: '#44c05b' }, + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#44c05b' }, + { offset: 1, color: '#44c05b' }, + ]), + }, + } ], }; state.global.homeChartOne.setOption(option); state.myCharts.push(state.global.homeChartOne); }; +// 访问量 和下载次数 +const initLineVandDChart = (xData,data1, data2) => { + if (!state.global.dispose.some((b) => b === state.global.homeVandD)) state.global.homeVandD.dispose(); + state.global.homeVandD = markRaw(echarts.init(homeVandDRef.value, state.charts.theme)); + const option = { + backgroundColor: state.charts.bgColor, + title: { + text: 'Annual disaster type visits and downloads statistics', + x: 'left', + textStyle: { fontSize: '15', color: state.charts.color }, + }, + grid: { top: 70, right: 20, bottom: 30, left: 30 }, + tooltip: { trigger: 'axis' }, + legend: { data: ['visit','download'], right: 0 }, + xAxis: { + data: xData, + }, + yAxis: [ + { + type: 'value', + name: 'visit', + splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, + }, + { + type: 'value', + name: 'download', + splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } }, + } + ], + series: [ + { + name: 'visit', + type: 'line', + symbolSize: 6, + symbol: 'circle', + smooth: true, + data: data2, + lineStyle: { color: '#3d91e7' }, + itemStyle: { color: '#3d91e7', borderColor: '#3d91e7' }, + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#3d91e7' }, + { offset: 1, color: '#3d91e7' }, + ]), + }, + },{ + name: 'download', + type: 'line', + symbolSize: 6, + symbol: 'circle', + smooth: true, + data: data1, + lineStyle: { color: '#e78d3d' }, + itemStyle: { color: '#e78d3d', borderColor: '#e78d3d' }, + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#e78d3d' }, + { offset: 1, color: '#e78d3d' }, + ]), + }, + } + ], + }; + state.global.homeVandD.setOption(option); + state.myCharts.push(state.global.homeVandD); +}; + +// Chief 管理 +const initChiefChart = (xData,yData) => { + if (!state.global.dispose.some((b) => b === state.global.homeUpload)) state.global.homeUpload.dispose(); + state.global.homeUpload = echarts.init(homeUploadRef.value, state.charts.theme); + const option = { + backgroundColor: state.charts.bgColor, + title: { + text: 'Annual Chief Management Statistics TOP10', + x: 'left', + textStyle: { fontSize: '15', color: state.charts.color }, + }, + //tooltip: { trigger: 'item', formatter: '{c}' }, + tooltip: { + show:true + // trigger: 'axis', + // axisPointer: { + // type: 'shadow' + // }, + // formatter: '{c}' + }, + legend: { data: ['chief'], right: 0 }, + grid: { top: 70, right: 80, bottom: 30, left: 80 }, + xAxis: [ + { + type: 'category', + data: xData + }, + ], + yAxis: [ + { + type:'value' + } + ], + series: [ + { + name: 'chief', + type: 'bar', + barWidth: 30, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: '#fe9a8bb3' }, + { offset: 1, color: '#fe9a8b03' }, + ]), + //柱状图圆角 + borderRadius: [30, 30, 0, 0], + }, + data: yData + } + ], + }; + state.global.homeUpload.setOption(option); + state.myCharts.push(state.global.homeUpload); +}; +// administrators 管理 +const initAdministratorsChart = (xData,yData) => { + if (!state.global.dispose.some((b) => b === state.global.homeCharThree)) state.global.homeCharThree.dispose(); + state.global.homeCharThree = echarts.init(homeBarRef.value, state.charts.theme); + const option = { + backgroundColor: state.charts.bgColor, + title: { + text: 'Annual Administrators Management Statistics TOP10', + x: 'left', + textStyle: { fontSize: '15', color: state.charts.color }, + }, + tooltip: { trigger: 'item', formatter: '{c}' }, + legend: { data: ['administrators'], right: 0 }, + grid: { top: 70, right: 80, bottom: 30, left: 80 }, + xAxis: [ + { + type: 'category', + data: xData, + boundaryGap: true, + axisTick: { show: false }, + }, + ], + yAxis: [ + { + nameLocation: 'middle', + nameTextStyle: { padding: [50, 4, 5, 6] }, + splitLine: { show: false }, + axisLine: { show: false }, + axisTick: { show: false }, + axisLabel: { color: state.charts.color, formatter: '{value} ' }, + }, + ], + series: [ + { + name: 'administrators', + type: 'bar', + barWidth: 30, + yAxisIndex: 0, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { offset: 0, color: 'rgba(108,80,243,0.3)' }, + { offset: 1, color: 'rgba(108,80,243,0)' }, + ]), + //柱状图圆角 + borderRadius: [30, 30, 0, 0], + }, + data: yData, + }, + ], + }; + state.global.homeCharThree.setOption(option); + state.myCharts.push(state.global.homeCharThree); +}; //homePieRef 灾害发生区域占比 饼图 const initPieChart = (data) => { if (!state.global.dispose.some((b) => b === state.global.homeChartTwo)) state.global.homeChartTwo.dispose(); @@ -262,7 +478,7 @@ const initPieChart = (data) => { const option = { backgroundColor: state.charts.bgColor, title: { - text: 'Proportion of Disaster Occurred Areas', + text: 'Proportion of Disaster Occurred Areas TOP15', x: 'left', textStyle: { fontSize: '15', color: state.charts.color }, }, @@ -330,7 +546,6 @@ const initPieChart = (data) => { }; //homePieRef2 灾害类型占比 饼图 const initPieChart2 = (data) => { - console.log("pie2", data) if (!state.global.dispose.some((b) => b === state.global.homeChartFour)) state.global.homeChartFour.dispose(); state.global.homeChartFour = markRaw(echarts.init(homePieRef2.value, state.charts.theme)); // var getname = ['房屋及结构物', '专用设备', '通用设备', '文物和陈列品', '图书、档案']; @@ -365,36 +580,6 @@ const initPieChart2 = (data) => { }, ], }, - // legend: { - // type: 'scroll', - // orient: 'vertical', - // right: '0%', - // left: '65%', - // top: 'center', - // itemWidth: 14, - // itemHeight: 14, - // data: getname, - // textStyle: { - // rich: { - // name: { - // fontSize: 14, - // fontWeight: 400, - // width: 200, - // height: 35, - // padding: [0, 0, 0, 60], - // color: state.charts.color, - // }, - // rate: { - // fontSize: 15, - // fontWeight: 500, - // height: 35, - // width: 40, - // padding: [0, 0, 0, 30], - // color: state.charts.color, - // }, - // }, - // }, - // }, series: [ { type: 'pie', @@ -409,59 +594,6 @@ const initPieChart2 = (data) => { state.global.homeChartFour.setOption(option); state.myCharts.push(state.global.homeChartFour); }; -// 柱状图 -const initBarChart = (xData, yData) => { - if (!state.global.dispose.some((b) => b === state.global.homeCharThree)) state.global.homeCharThree.dispose(); - state.global.homeCharThree = echarts.init(homeBarRef.value, state.charts.theme); - const option = { - backgroundColor: state.charts.bgColor, - title: { - text: 'Disaster response monthly distribution change', - x: 'left', - textStyle: { fontSize: '15', color: state.charts.color }, - }, - tooltip: { trigger: 'item', formatter: '{c}' }, - legend: { data: ['申请量'], top: 0 }, - grid: { top: 70, right: 80, bottom: 30, left: 80 }, - xAxis: [ - { - type: 'category', - data: xData, - boundaryGap: true, - axisTick: { show: false }, - }, - ], - yAxis: [ - { - nameLocation: 'middle', - nameTextStyle: { padding: [50, 4, 5, 6] }, - splitLine: { show: false }, - axisLine: { show: false }, - axisTick: { show: false }, - axisLabel: { color: state.charts.color, formatter: '{value} ' }, - }, - ], - series: [ - { - name: '申请量', - type: 'bar', - barWidth: 30, - yAxisIndex: 0, - itemStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { offset: 0, color: 'rgba(108,80,243,0.3)' }, - { offset: 1, color: 'rgba(108,80,243,0)' }, - ]), - //柱状图圆角 - borderRadius: [30, 30, 0, 0], - }, - data: yData, - }, - ], - }; - state.global.homeCharThree.setOption(option); - state.myCharts.push(state.global.homeCharThree); -}; // 批量设置 echarts resize const initEchartsResizeFun = () => { nextTick(() => { @@ -483,47 +615,63 @@ const setHeadData = (data) => { state.homeOne[3].num1 = data.downloadCount } /** - * 设置发生区域灾害占比 - * @param data - */ -const setDisasterArea = (data) => { - let arr = []; - for (let [k, v] of Object.entries(data)) { - arr.push({ name: k, value: v }); - } - initPieChart(arr); -} -/** - * 设置灾害响应月份分布量 + * 设置响应量和发起量 * @param data */ -const setResponseDisaster = (data) => { +const setLineChart = (data) => { let xData = []; - let yData = []; - data.forEach(item => { - for (let [k, v] of Object.entries(item)) { - xData.push(k); - yData.push(v.value); - } + //let yData = []; + let data1 = [];//initiate + let data2 = [];//response + data.forEach(item=>{ + xData.push(item.key) + data1.push(item.initiate) + data2.push(item.response) }) - initLineChart(xData, yData); + // 响应量和发起量 + initLineChart(xData,data1,data2); } /** - * 设置灾害申请月份分布量 + * 设置访问量 和下载次数 * @param data */ -const setApplyDisaster = (data) => { + const setLineVandDChart = (data) => { + let xData = []; + let data1 = []; + let data2 = []; + data.forEach(item=>{ + xData.push(item.dict_value) + data1.push(item.download) + data2.push(item.visit) + }) + //访问量 和下载次数 + initLineVandDChart(xData,data1, data2) +} +/** + * 管理员管理量 + * @param data + */ +const setAdministratorsChart = (data) => { let xData = []; let yData = []; - data.forEach(item => { - for (let [k, v] of Object.entries(item)) { - xData.push(k); - yData.push(v.value); - } + data.forEach(item=>{ + xData.push(item.name) + yData.push(item.val) }) - setTimeout(() => { - initBarChart(xData, yData); - }, 700); + initAdministratorsChart(xData,yData); +} +/** + * 管理员管理量 + * @param data + */ + const setChiefChart = (data) => { + let xData = []; + let yData = []; + data.forEach(item=>{ + xData.push(item.name) + yData.push(item.val) + }) + initChiefChart(xData,yData); } /** * 设置灾种数量占比 @@ -531,20 +679,46 @@ const setApplyDisaster = (data) => { */ const setDisasterType = (data) => { let arr = []; - for (let [k, v] of Object.entries(data)) { - arr.push({ name: k, value: v }); - } + data.forEach(item=>{ + arr.push({ name: item.name, value: item.val}); + }) + // for(let [k , v] of Object.entries(data)){ + // arr.push({ name: k, value: v}); + + // } + state.typeTable = arr initPieChart2(arr) } + +/** + * 设置发生区域灾害占比 Proportion of Disaster Occurred Areas TOP15 + * @param data + */ + const setDisasterArea = (data) => { + let arr = []; + for(let [k , v] of Object.entries(data)){ + arr.push({ name: k, value: v}); + } + state.countryTable = arr + initPieChart(arr); +} //获取控制台数据 const getDashBoradData = () => { - statistics().then(res => { + state.param.year = state.year.getFullYear() + statistics(state.param.year).then(res=>{ console.log(res); + //第一栏 setHeadData(res.header); - setDisasterArea(res.country); - setResponseDisaster(res.responseMonth); - setApplyDisaster(res.applyMonth); + //第二栏 + setLineChart(res.line) + setLineVandDChart(res.vandd); + //第三栏 + setAdministratorsChart(res.admin) + setChiefChart(res.chief) + //第四栏 setDisasterType(res.disasterNum); + //第5栏 + setDisasterArea(res.country); }) } // 批量设置 echarts resize @@ -575,18 +749,18 @@ watch( state.charts.theme = isIsDark ? 'dark' : ''; state.charts.bgColor = isIsDark ? 'transparent' : ''; state.charts.color = isIsDark ? '#dadada' : '#303133'; - setTimeout(() => { - //initLineChart(); - }, 500); - setTimeout(() => { - //initPieChart(); - }, 700); - setTimeout(() => { - //initPieChart2(); - }, 700); - setTimeout(() => { - initBarChart(); - }, 1000); + // setTimeout(() => { + // //initLineChart(); + // }, 500); + // setTimeout(() => { + // //initPieChart(); + // }, 700); + // setTimeout(() => { + // //initPieChart2(); + // }, 700); + // setTimeout(() => { + // initBarChart(); + // }, 1000); }); }, { @@ -598,103 +772,94 @@ watch( From c587d3218a1165354fac86efb541b2d856e7b6c5 Mon Sep 17 00:00:00 2001 From: qqGroup0 <253114712@qq.com> Date: Tue, 25 Apr 2023 10:14:11 +0800 Subject: [PATCH 38/51] =?UTF-8?q?zqq:=E9=81=A5=E6=84=9F=E5=BD=B1=E5=83=8F?= =?UTF-8?q?=E9=A1=B5=E7=BB=98=E5=88=B6=E7=9F=A9=E5=BD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map.vue | 83 +++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/src/components/Map.vue b/src/components/Map.vue index 6c4740c..69608f1 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -11,8 +11,8 @@ import L from 'leaflet' import 'leaflet/dist/leaflet.css' import 'leaflet-draw/dist/leaflet.draw' import 'leaflet-draw/dist/leaflet.draw.css' -import '@geoman-io/leaflet-geoman-free'; -import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css'; +import '@geoman-io/leaflet-geoman-free'; +import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css'; import 'Leaflet-ImageOverlay-Rotated' import { useVariableStore } from '/@/stores/index.ts' import * as omnivore from '@mapbox/leaflet-omnivore' @@ -21,6 +21,8 @@ const map = ref() let homeMap = null let featureLayerG_area = null let featureLayerG_point = null +let layerRectangle = null + onMounted(() => { homeMap = L.map(map.value, { @@ -42,7 +44,7 @@ onMounted(() => { tileSize: 256, zoomOffset: 1, }).addTo(homeMap) - + featureLayerG_area = L.layerGroup().addTo(homeMap) featureLayerG_point = L.layerGroup().addTo(homeMap) @@ -58,32 +60,32 @@ const mapOperations = { wktParseToMap: (res) => { let layer = omnivore.wkt.parse(res) layer.addTo(featureLayerG_point) - - let attr=Object.values(layer._layers) - + + let attr = Object.values(layer._layers) + // 判断审核的数据类型,如果是点则直接flyTo - if(attr[0].feature.geometry.type.indexOf('Polygon')==-1){ - homeMap.flyTo([attr[0].feature.geometry.coordinates[1],attr[0].feature.geometry.coordinates[0]],3) + if (attr[0].feature.geometry.type.indexOf('Polygon') == -1) { + homeMap.flyTo([attr[0].feature.geometry.coordinates[1], attr[0].feature.geometry.coordinates[0]], 3) } - // 判断审核的数据类型,如果是面则计算中心点 然后再fly - else{ - let polygons=[]; - for(let i=0;i turf.centroid(polygon)); // console.log(centers) - let features=[] - for(let i=0;i{ + homeMap.pm.enableDraw('Polygon', { snappable: false }); + let polygon = null; + homeMap.on("pm:create", (e) => { featureLayerG_area.clearLayers() e.layer.setStyle({ color: '#FF0080', opacity: 1, }) - e.layer.addTo(featureLayerG_area) - polygon=e.layer - }) + e.layer.addTo(featureLayerG_area) + polygon = e.layer + }) // featureLayerG_area.clearLayers() // variableStore.layerGroupPoly=null; return polygon }, clearPolygon: () => { // console.log('1-2') - + featureLayerG_area.clearLayers() variableStore.layerGroupPoly = null homeMap.pm.disableDraw(); @@ -326,7 +328,7 @@ const mapOperations = { // featureLayerG_point.clearLayers() }, drawCreated: () => { - + // homeMap.on('draw:created', function (elll) { // featureLayerG_area.clearLayers() // variableStore.layerGroupPoly = null @@ -342,14 +344,14 @@ const mapOperations = { // }) // variableStore.layerGroupPoly = // variableStore.layerGroupPoly.join('\n') - + // }) }, Edit: () => { homeMap.pm.enableGlobalEditMode({ allowSelfIntersection: false, }) - if(featureLayerG_area.getLayers().length==1){ + if (featureLayerG_area.getLayers().length == 1) { featureLayerG_area.eachLayer(function (layer) { layer.on('pm:edit', (e) => { let features = featureLayerG_area.toGeoJSON().features @@ -360,7 +362,7 @@ const mapOperations = { }); }); } - else if(featureLayerG_point.getLayers().length==1){ + else if (featureLayerG_point.getLayers().length == 1) { featureLayerG_point.eachLayer(function (layer) { layer.on('pm:edit', (e) => { let features = featureLayerG_point.toGeoJSON().features @@ -371,12 +373,27 @@ const mapOperations = { }); }); } - else{ + else { console.log('error') } - - }, + drawRectangle: () => { + if (layerRectangle != null) { + homeMap.removeLayer(layerRectangle) + layerRectangle = null + } + homeMap.pm.enableDraw('Rectangle', { + snappable: true, + snapDistance: 20, + }); + homeMap.on('pm:create', (e) => { + L.PM.reInitLayer(e.layer); + layerRectangle = e.layer + }); + }, + deleteRectangle: () => { + homeMap.removeLayer(layerRectangle) + } } //omnivore.wkt.parse('POINT(-80 0)').addTo(homeMap); From df9f19e6ab1d3676cd33cb082df4e059a3ca5258 Mon Sep 17 00:00:00 2001 From: glj Date: Tue, 25 Apr 2023 10:58:09 +0800 Subject: [PATCH 39/51] =?UTF-8?q?glj-=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dataService/multimediaData/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/dataService/multimediaData/index.vue b/src/views/dataService/multimediaData/index.vue index 4bc323b..0c4354e 100644 --- a/src/views/dataService/multimediaData/index.vue +++ b/src/views/dataService/multimediaData/index.vue @@ -6,7 +6,7 @@
- + - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/dataService/pictureInfo/index.vue b/src/views/dataService/pictureInfo/index.vue index 39b678e..d82d1b4 100644 --- a/src/views/dataService/pictureInfo/index.vue +++ b/src/views/dataService/pictureInfo/index.vue @@ -65,16 +65,6 @@ -