From c4b0411f73a569b932808560104be7fcc650d613 Mon Sep 17 00:00:00 2001 From: kun <1422840143@qq.com> Date: Tue, 31 Oct 2023 19:05:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/mapCommon.ts | 20 + src/components/layoutTop/index.vue | 7 +- src/components/testMap/index.scss | 278 ++++++++++++ src/components/testMap/index.vue | 145 ++++++ src/views/goverment/largeScreen/index.vue | 19 +- src/views/jxjview/configManagement/index.vue | 28 +- .../components/operateDialog.vue | 422 ++++-------------- src/views/jxjview/layerManagement/index.vue | 118 +++-- 8 files changed, 632 insertions(+), 405 deletions(-) create mode 100644 src/components/testMap/index.scss create mode 100644 src/components/testMap/index.vue diff --git a/src/api/modules/mapCommon.ts b/src/api/modules/mapCommon.ts index 76a18f5..372b268 100644 --- a/src/api/modules/mapCommon.ts +++ b/src/api/modules/mapCommon.ts @@ -18,3 +18,23 @@ export const getSystemConfig = (params: any) => { export const updateSystemConfig = (params: any) => { return http.post(BASEURL + `/xmgl/systemConfig/edit`, params); }; +// 底图图层分页列表 +export const baseMapPage = (params: any) => { + return http.post(BASEURL + `/base/baseMap/page`, params); +}; +// 底图图层新增 +export const baseMapAdd = (params: any) => { + return http.post(BASEURL + `/base/baseMap/add`, params); +}; +// 底图图层详细信息 +export const baseMapDetails = (params: any) => { + return http.post(BASEURL + `/base/baseMap/queryById`, params); +}; +// 底图图层编辑 +export const baseMapEdit = (params: any) => { + return http.post(BASEURL + `/base/baseMap/edit`, params); +}; +// 底图图层删除 +export const baseMapDelete = (params: any) => { + return http.post(BASEURL + `/base/baseMap/delete`, params); +}; diff --git a/src/components/layoutTop/index.vue b/src/components/layoutTop/index.vue index c9838d1..26399e5 100644 --- a/src/components/layoutTop/index.vue +++ b/src/components/layoutTop/index.vue @@ -11,7 +11,7 @@
-
+
首页
@@ -30,9 +30,14 @@ import { useRoute, useRouter } from "vue-router"; import { GlobalStore } from "@/stores"; import { HOME_URL } from "@/enums/Home"; import ToolBarRight from "@/layouts/components/Header/ToolBarRight.vue"; +const emits = defineEmits(["toCenter"]); const router = useRouter(); const globalStore = GlobalStore(); const moduleTitle = globalStore.moduleName; +const backCenter = () => { + emits("toCenter"); + router.push("/largeScreen"); +}; const goHome = () => { router.push(HOME_URL[globalStore.accountType - 1]); }; diff --git a/src/components/testMap/index.scss b/src/components/testMap/index.scss new file mode 100644 index 0000000..d19e207 --- /dev/null +++ b/src/components/testMap/index.scss @@ -0,0 +1,278 @@ +@mixin flex { + display: flex; + align-items: center; +} +.map-content { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 100; + background-color: #ccc; + overflow: hidden; + .mars3d-container { + height: 100%; + width: 100%; + margin: 0; + padding: 0; + border: none; + overflow: hidden; + } + .layer-config { + width: 360px; + height: auto; + min-width: 360px; + min-height: 420px; + border: 1px solid #fff; + position: absolute; + top: 10px; + left: 10px; + padding: 10px 30px 20px; + .property-column-item { + display: flex; + flex-direction: column; + > span { + color: #fff; + font-size: 14px; + } + } + .property-row-item { + display: flex; + align-items: center; + margin-bottom: 10px; + > span { + color: #fff; + font-size: 14px; + margin-right: 5px; + } + } + .operate-btn { + margin-top: 20px; + } + } + .close-btn { + position: absolute; + top: 0; + right: 0; + cursor: pointer; + } +} +:deep() { + // 全局基础样式 + .cesium-viewer-toolbar { + top: auto; + bottom: 35px; + left: 12px; + right: auto; + } + + .cesium-toolbar-button img { + height: 100%; + vertical-align: middle; + } + + .cesium-viewer-toolbar > .cesium-toolbar-button, + .cesium-navigationHelpButton-wrapper, + .cesium-viewer-geocoderContainer { + margin-bottom: 5px; + float: left; + clear: both; + text-align: center; + } + + .cesium-button { + background-color: rgba(23, 49, 71, 0.7); + border: none; + color: #ffffff; + fill: #e6e6e6; + line-height: 32px; + } + + .cesium-button:hover { + background-color: rgba(0, 138, 255, 0.7); + box-shadow: none; + border: none; + } + + /**cesium 底图切换面板*/ + .cesium-baseLayerPicker-dropDown { + bottom: 0; + left: 40px; + max-height: 700px; + margin-bottom: 5px; + background-color: rgba(23, 49, 71, 0.7); + } + + /**cesium 帮助面板*/ + .cesium-navigation-help { + top: auto; + bottom: 0; + left: 40px; + transform-origin: left bottom; + } + + .cesium-navigation-help-instructions, + .cesium-navigation-button { + background-color: rgba(23, 49, 71, 0.8); + } + + .cesium-navigation-button-selected, + .cesium-navigation-button-unselected:hover { + background-color: rgba(23, 49, 71, 1); + } + + /**cesium 二维三维切换*/ + .cesium-sceneModePicker-wrapper { + width: auto; + } + + .cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon { + float: right; + margin: 0 3px; + } + + /**cesium POI查询输入框*/ + .cesium-viewer-geocoderContainer .search-results { + left: 0; + right: 40px; + width: auto; + z-index: 9999; + } + + .cesium-geocoder-searchButton { + background-color: rgba(23, 49, 71, 0.8); + } + + .cesium-viewer-geocoderContainer .cesium-geocoder-input { + background-color: rgba(63, 72, 84, 0.7); + } + + .cesium-viewer-geocoderContainer .cesium-geocoder-input:focus { + background-color: var(--mars-bg-base, rgba(63, 72, 84, 0.9)); + } + + .cesium-viewer-geocoderContainer .search-results { + background-color: rgba(23, 49, 71, 0.8); + } + + /**cesium info信息框*/ + .cesium-infoBox { + top: 50px; + background: var(--mars-bg-base, rgba(63, 72, 84, 0.9)); + } + + .cesium-infoBox-title { + background-color: rgba(23, 49, 71, 0.8); + } + + /**cesium 任务栏的FPS信息*/ + .cesium-performanceDisplay-defaultContainer { + top: auto; + bottom: 35px; + right: 50px; + } + + .cesium-performanceDisplay-ms, + .cesium-performanceDisplay-fps { + color: #fff; + } + + /**cesium tileset调试信息面板*/ + .cesium-viewer-cesiumInspectorContainer { + top: 10px; + left: 10px; + right: auto; + } + + .cesium-cesiumInspector { + background-color: rgba(23, 49, 71, 0.8); + } + + /**覆盖mars3d内部控件的颜色等样式*/ + .mars3d-compass .mars3d-compass-outer { + fill: rgba(23, 49, 71, 0.8); + } + + .mars3d-contextmenu-ul, + .mars3d-sub-menu { + background-color: rgba(23, 49, 71, 0.8); + } + + .mars3d-contextmenu-ul > li > a:hover, + .mars3d-sub-menu > li > a:hover, + .mars3d-contextmenu-ul > li > a:focus, + .mars3d-sub-menu > li > a:focus, + .mars3d-contextmenu-ul > li > .active, + .mars3d-sub-menu > li > .active { + background-color: var(--mars-hover-btn-bg, #3ea6ff); + } + + .mars3d-contextmenu-ul > .active > a, + .mars3d-sub-menu > .active > a, + .mars3d-contextmenu-ul > .active > a:hover, + .mars3d-sub-menu > .active > a:hover, + .mars3d-contextmenu-ul > .active > a:focus, + .mars3d-sub-menu > .active > a:focus { + background-color: var(--mars-hover-btn-bg, #3ea6ff); + } + + /* Popup样式*/ + .mars3d-popup-color { + color: var(--mars-text-color, #ffffff); + } + + .mars3d-popup-background { + background: var(--mars-bg-base, rgba(63, 72, 84, 0.9)); + } + + .mars3d-tooltip { + color: var(--mars-text-color, #ffffff); + background: var(--mars-bg-base, rgba(63, 72, 84, 0.9)); + border: 1px solid var(--mars-bg-base, rgba(63, 72, 84, 0.9)); + } + + .mars3d-tooltip-top:before { + border-top-color: var(--mars-bg-base, rgba(23, 49, 71, 0.8)); + } + + .mars3d-tooltip-bottom:before { + border-bottom-color: var(--mars-bg-base, rgba(23, 49, 71, 0.8)); + } + + .mars3d-tooltip-left:before { + border-left-color: var(--mars-bg-base, rgba(23, 49, 71, 0.8)); + } + + .mars3d-tooltip-right:before { + border-right-color: var(--mars-bg-base, rgba(23, 49, 71, 0.8)); + } + + .mars3d-template-content label { + padding-right: 6px; + } + + .mars3d-template-titile { + color: var(--mars-base-color, #ffffff); + border-bottom: 1px solid var(--mars-hover-btn-bg, #3ea6ff); + } + + .mars3d-template-titile a { + font-size: 16px; + color: var(--mars-msg-title-color, #c7d3dd); + } + + .mars3d-popup-btn-custom { + padding: 3px 10px; + border: 1px solid #209ffd; + background: #209ffd1c; + } + + .mars3d-popup-content { + margin: 15px; + } + + .mars3d-divGraphic:hover { + z-index: 999 !important; + } +} diff --git a/src/components/testMap/index.vue b/src/components/testMap/index.vue new file mode 100644 index 0000000..6ae3798 --- /dev/null +++ b/src/components/testMap/index.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/src/views/goverment/largeScreen/index.vue b/src/views/goverment/largeScreen/index.vue index 9369cc8..26dd1ac 100644 --- a/src/views/goverment/largeScreen/index.vue +++ b/src/views/goverment/largeScreen/index.vue @@ -1,5 +1,5 @@