fix: BUG修改

This commit is contained in:
kun 2023-11-23 19:07:23 +08:00
parent 38445f79e4
commit 4dbb8aa412
49 changed files with 420 additions and 133 deletions

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" fill="white" fill-opacity="0.01"/>
<path d="M34 10V4H8V38L14 35" stroke="#ffffff" stroke-width="4" stroke-linecap="round" stroke-linejoin="miter"/>
<path d="M14 44V10H40V44L27 37.7273L14 44Z" fill="" stroke="#ffffff" stroke-width="4" stroke-linejoin="miter"/>
</svg>

Before

Width:  |  Height:  |  Size: 437 B

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="40" height="40" viewBox="0 0 48 48" fill="#00f6ff" xmlns="http://www.w3.org/2000/svg">
<circle cx="24" cy="10" r="6" fill="#00f6ff" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M31 44V35L36 32L32 19C32 19 28 16 24 16C20 16 16 19 16 19L12 31L17 35V44" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

View File

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1626258518065" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12028" xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="300"><defs><style type="text/css"></style></defs><path d="M521.7792 49.7152a443.0848 443.0848 0 0 1 443.0848 443.136v40.2432a443.0848 443.0848 0 1 1-886.1696 0v-40.2432A443.0848 443.0848 0 0 1 521.728 49.664z" fill="#000D29" p-id="12029"></path><path d="M577.8432 29.9008a23.1424 23.1424 0 1 1-5.5296 46.0288 424.448 424.448 0 0 0-50.5344-3.072 23.1424 23.1424 0 1 1 0-46.2848c18.8416 0 37.5296 1.1264 56.064 3.328z m135.2704 37.632a23.1424 23.1424 0 1 1-19.0464 42.1888 416.768 416.768 0 0 0-47.2576-17.92 23.1424 23.1424 0 0 1 13.7728-44.2368c17.92 5.632 35.4304 12.288 52.5312 19.968z m120.32 78.5408a23.1424 23.1424 0 0 1-30.9248 34.4064 421.9904 421.9904 0 0 0-39.5776-31.488 23.1424 23.1424 0 0 1 26.624-37.888c15.36 10.752 30.0032 22.4256 43.9296 34.9696z m88.4736 107.264a23.1424 23.1424 0 1 1-39.7312 23.808 420.864 420.864 0 0 0-28.5696-41.728 23.1424 23.1424 0 0 1 36.608-28.416c11.4688 14.848 22.016 30.2592 31.6928 46.336z m54.272 134.5024a23.1424 23.1424 0 0 1-45.1584 10.3936 416.512 416.512 0 0 0-14.336-48.4864 23.1424 23.1424 0 1 1 43.5712-15.7696c6.4 17.5616 11.7248 35.584 15.872 53.8624z m11.8784 133.7856a23.1424 23.1424 0 1 1-46.336 0v-29.2352c0-7.7824-0.2048-15.5648-0.6656-23.296a23.1424 23.1424 0 0 1 46.2336-2.56c0.512 8.5504 0.768 17.152 0.768 25.856v29.2352z m-17.4592 138.2912a23.1424 23.1424 0 1 1-44.5952-12.5952c4.608-16.1792 8.192-32.6656 10.752-49.408a23.1424 23.1424 0 0 1 45.7728 7.1168c-2.8672 18.5856-6.8608 36.864-11.9296 54.8864z m-58.88 128.8704a23.1424 23.1424 0 1 1-38.7072-25.3952c9.2672-14.1312 17.664-28.7744 25.1904-43.8784a23.1424 23.1424 0 0 1 41.472 20.5824 465.7152 465.7152 0 0 1-27.9552 48.6912z m-93.4912 104.2432a23.1424 23.1424 0 0 1-29.4912-35.7376c13.056-10.752 25.3952-22.272 37.0688-34.4576a23.1424 23.1424 0 1 1 33.4848 31.9488c-12.9024 13.568-26.624 26.3168-41.0624 38.2464z m-123.5456 73.216a23.1424 23.1424 0 0 1-17.2032-43.008c15.6672-6.2464 30.9248-13.4656 45.7216-21.504a23.1424 23.1424 0 0 1 22.272 40.6016c-16.4352 8.96-33.3824 16.9984-50.7904 23.9104z m-133.4272 31.488a23.1424 23.1424 0 0 1-3.8912-46.1824c16.896-1.3824 33.5872-3.84 50.0736-7.2192a23.1424 23.1424 0 0 1 9.3696 45.3632c-18.2784 3.7888-36.864 6.4512-55.552 8.0384z m-141.1072-9.472a23.1424 23.1424 0 1 1 10.0352-45.2096c16.384 3.6352 33.0752 6.2976 49.92 7.936a23.1424 23.1424 0 0 1-4.5056 46.08 465.2544 465.2544 0 0 1-55.4496-8.8064zM288.6656 936.96a23.1424 23.1424 0 1 1 23.1936-40.1408c14.592 8.448 29.696 16.0256 45.2096 22.6304a23.1424 23.1424 0 0 1-18.176 42.6496 464.64 464.64 0 0 1-50.2272-25.1392z m-109.568-87.7056a23.1424 23.1424 0 0 1 34.048-31.3856c11.4688 12.3904 23.6544 24.064 36.5056 35.0208a23.1424 23.1424 0 1 1-30.0544 35.328 468.992 468.992 0 0 1-40.448-38.912z m-79.872-118.784a23.1424 23.1424 0 0 1 41.984-19.6096c7.168 15.2576 15.2576 30.1056 24.1664 44.3904a23.1424 23.1424 0 1 1-39.2704 24.576 465.2544 465.2544 0 0 1-26.8288-49.3568z m-39.1168-131.8912a23.1424 23.1424 0 1 1 45.8752-6.4512c2.3552 16.7424 5.6832 33.28 10.0352 49.5104a23.1424 23.1424 0 0 1-44.7488 11.9808 463.9744 463.9744 0 0 1-11.1616-55.04z m-3.328-139.9808a23.1424 23.1424 0 0 1 46.1824 3.3792c-0.7168 10.24-1.1264 20.48-1.1264 30.8224v20.8384a23.1424 23.1424 0 1 1-46.2848 0v-20.8384c0-11.4688 0.4096-22.8352 1.2288-34.2016z m31.0272-136.704a23.1424 23.1424 0 1 1 43.1104 16.9984c-6.144 15.6672-11.3664 31.744-15.616 48.128a23.1424 23.1424 0 0 1-44.8512-11.6736 462.848 462.848 0 0 1 17.408-53.4016z m72.2944-123.392a23.1424 23.1424 0 1 1 35.8912 29.2864c-10.6496 13.056-20.48 26.7776-29.5424 41.0624a23.1424 23.1424 0 1 1-39.1168-24.7296c9.984-15.872 20.9408-31.0784 32.768-45.568z m103.2192-93.7984a23.1424 23.1424 0 1 1 25.7024 38.5024 421.6832 421.6832 0 0 0-40.3456 30.5664 23.1424 23.1424 0 1 1-30.1056-35.1744c14.1824-12.1856 29.184-23.552 44.7488-33.8944zM394.5472 44.1856a23.1424 23.1424 0 0 1 12.5952 44.544c-16.2304 4.608-32.2048 10.1888-47.7184 16.6912a23.1424 23.1424 0 1 1-17.92-42.7008A462.8992 462.8992 0 0 1 394.5472 44.1856z m126.3616-17.6128a23.1424 23.1424 0 0 1 0.1024 46.336 424.96 424.96 0 0 0-43.008 2.2528 23.1424 23.1424 0 0 1-4.8128-46.08c15.8208-1.6384 31.744-2.4576 47.7184-2.5088zM363.5712 528.384l-54.4256-11.2128v244.1216l54.4256-20.1728v-85.1456H451.584l48.128-69.376-62.7712-35.7888-16.7424 53.76H363.52V528.384z m457.5744-12.5952L435.5584 249.2928H389.12L325.9392 355.072v35.9936l351.8976 227.328h29.5424v-2.2528l113.7664-100.352zM357.4272 427.8784l-31.488 36.608 349.7984 231.3216h31.4368l16.7424-18.3296 16.7424-52.6848s-46.08 36.608-48.1792 36.608c-18.7904-13.6704-33.536-20.5824-33.536-20.5824L357.376 427.8784z" fill="#00A0FF" p-id="12030"></path></svg>

Before

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="6" y="6" width="36" height="36" rx="3" fill="white" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="14" y="18" width="20" height="10" fill="none" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M24 14V35" stroke="#333" stroke-width="4" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 500 B

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="15" height="15" viewBox="0 0 48 48" fill="white" xmlns="http://www.w3.org/2000/svg">
<rect width="48" height="48" fill="white" fill-opacity="0.01"/>
<path d="M9 10V44H39V10H9Z" fill="none" stroke="white" stroke-width="4" stroke-linejoin="round"/>
<path d="M20 20V33" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M28 20V33" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 10H44" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M16 10L19.289 4H28.7771L32 10H16Z" fill="none" stroke="white" stroke-width="4" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="40" height="40" viewBox="0 0 48 48" fill="#ff6ac4" xmlns="http://www.w3.org/2000/svg">
<circle cx="24" cy="10" r="6" fill="#ff6ac4" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M27.2308 16H20.7692L10 36H38L27.2308 16Z" fill="#ff6ac4" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M27 36V44" stroke="#ff6ac4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M21 36V44" stroke="#ff6ac4" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 622 B

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.18898 22.1733C4.08737 21.0047 5.00852 20 6.18146 20H10C11.1046 20 12 20.8954 12 22V41C12 42.1046 11.1046 43 10 43H7.83363C6.79622 43 5.93102 42.2068 5.84115 41.1733L4.18898 22.1733Z" fill="white" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M18 21.3745C18 20.5388 18.5194 19.7908 19.2753 19.4345C20.9238 18.6574 23.7329 17.0938 25 14.9805C26.6331 12.2569 26.9411 7.33595 26.9912 6.20878C26.9982 6.05099 26.9937 5.89301 27.0154 5.73656C27.2861 3.78446 31.0543 6.06492 32.5 8.47612C33.2846 9.78471 33.3852 11.504 33.3027 12.8463C33.2144 14.2825 32.7933 15.6699 32.3802 17.0483L31.5 19.9845H42.3569C43.6832 19.9845 44.6421 21.2518 44.2816 22.5281L38.9113 41.5436C38.668 42.4051 37.8818 43 36.9866 43H20C18.8954 43 18 42.1046 18 41V21.3745Z" fill="none" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -1 +0,0 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1583467122765" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3603" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M579.463529 206.004706c-30.117647-146.974118-60.235294-162.635294-60.235294-162.635294-4.818824-4.818824-10.842353-4.818824-15.661176 0 0 0-30.117647 15.661176-60.235294 162.635294 0 0-19.275294 102.4-19.275294 185.524706V554.164706c0 45.778824 174.682353 40.96 174.682353 3.614118V391.529412c1.204706-83.124706-19.275294-185.524706-19.275295-185.524706zM566.211765 310.814118c0 6.023529-1.204706 4.818824-6.02353 6.023529h-10.842353s-14.456471-178.296471-27.708235-233.712941c0 0 48.188235 121.675294 44.574118 227.689412zM454.174118 836.065882l7.228235-209.618823c-6.023529-2.409412-10.842353-4.818824-15.661177-7.228235l8.432942 216.847058zM431.284706 748.122353l4.818823-136.131765c-3.614118-3.614118-7.228235-7.228235-9.637647-12.047059l4.818824 148.178824zM483.087059 895.096471l9.637647-261.421177c-6.023529 0-12.047059-1.204706-16.865882-2.409412l7.228235 263.830589zM573.44 832.451765l7.228235-215.642353c-3.614118 3.614118-8.432941 6.023529-14.45647 8.432941l7.228235 207.209412zM503.567059 634.88l9.637647 350.569412 9.637647-350.569412c-6.023529 0-13.251765 1.204706-19.275294 0zM592.715294 752.941176l4.818824-149.383529c-2.409412 3.614118-6.023529 6.023529-9.637647 9.637647l4.818823 139.745882zM544.527059 890.277647l9.637647-260.216471-18.070588 3.614118 8.432941 256.602353z" p-id="3604" fill="#d81e06"></path></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="19" height="19" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 6L43 25L24 27L13.9948 44L8 6Z" fill="none" stroke="white" stroke-width="4" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12" height="12" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="24" height="24" fill="white" fill-opacity="0.01"/>
<path d="M21 38C30.3888 38 38 30.3888 38 21C38 11.6112 30.3888 4 21 4C11.6112 4 4 11.6112 4 21C4 30.3888 11.6112 38 21 38Z" fill="none" stroke="white" stroke-width="4" stroke-linejoin="round"/>
<path d="M26.6568 14.3431C25.2091 12.8954 23.2091 12 21 12C18.7909 12 16.7909 12.8954 15.3431 14.3431" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M33.2218 33.2218L41.7071 41.7071" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -2,6 +2,18 @@
<layoutTop v-if="plusMenu.topAble"></layoutTop>
<div class="map-content" id="map-content">
<div id="mars3dContainer" class="mars3d-container"></div>
<!-- 飞行漫游操作按钮 -->
<!-- <div class="fly-operate" v-if="flyOperateShow">
<el-button type="primary" v-show="!formState.isStart" @click="flyPlay">开始</el-button>
<el-button type="primary" v-show="formState.isStart && !formState.isPause" @click="flyPause">暂停</el-button>
<el-button type="primary" v-show="formState.isStart && formState.isPause" @click="flyProceed">继续</el-button>
<el-button type="primary" v-show="formState.isStart" @click="flyStop">停止</el-button>
</div> -->
<!-- 视点飞行操作按钮 -->
<div class="fly-operate" v-if="flyOperateShow">
<el-button type="primary" v-show="isViewStart" @click="flyViewPause">暂停</el-button>
<el-button type="primary" v-show="!isViewStart" @click="flyViewProceed">继续</el-button>
</div>
<!-- 搜索框 -->
<div class="input-search" v-if="plusMenu.searchAble">
<el-input
@ -256,7 +268,7 @@
</template>
<script lang="ts" setup>
import { ref, onMounted, onUnmounted, computed, markRaw } from "vue";
import { ref, reactive, onMounted, onUnmounted, computed, markRaw } from "vue";
//cesium
import "mars3d-cesium/Build/Cesium/Widgets/widgets.css";
import * as Cesium from "mars3d-cesium";
@ -288,6 +300,17 @@ import {
gltfModelList,
updateSystemConfig
} from "@/api/modules/mapCommon";
const isViewStart = ref<boolean>(true);
interface FormState {
isStart: boolean;
isPause: boolean;
}
const formState = reactive<FormState>({
isStart: false,
isPause: false
});
const flyOperateShow = ref(false);
const toolListShow = ref(false);
const configJson = ref<any>({});
const layerJsonArr = ref<any>([]);
@ -381,6 +404,7 @@ let imgArr = [] as any; // canvas 图标数组
let timer: any; //
let mapSplit: any; //
let mapScreenSplit: any; //
let newRoutePath: any;
onMounted(async () => {
// const configUrl = "http://182.90.224.147:6080/file/config/config.json";
// const configUrl = "../config.json";
@ -418,36 +442,36 @@ onMounted(async () => {
configJson.value.basemaps = initBasemaps;
}
//
const resAlbuginea: any = await albugineaMapList({});
console.log(resAlbuginea, "白膜666666");
if (resAlbuginea.result && resAlbuginea.result.length > 0) {
let initAlbugineamaps: any = [{ id: 2040, name: "城市白模", type: "group" }];
albugineaList.value = resAlbuginea.result;
resAlbuginea.result.map((item: any) => {
let pushObj = {
pid: 2040,
id: item.id,
name: item.name,
type: "3dtiles",
url: item.url,
// maximumScreenSpaceError: 1,
style: {
color: {
conditions: [["true", "color('" + item.color + "')"]]
}
},
opacity: 1,
luminanceAtZenith: 1,
show: item.show ? item.show : false,
flyTo: item.flyTo ? item.flyTo : false
};
if (+item.lng || +item.lat || +item.alt) {
pushObj.position = { lng: +item.lng, lat: +item.lat, alt: +item.alt };
}
initAlbugineamaps.push(pushObj);
});
configJson.value.layers = initAlbugineamaps;
}
// const resAlbuginea: any = await albugineaMapList({});
// console.log(resAlbuginea, "666666");
// if (resAlbuginea.result && resAlbuginea.result.length > 0) {
// let initAlbugineamaps: any = [{ id: 2040, name: "", type: "group" }];
// albugineaList.value = resAlbuginea.result;
// resAlbuginea.result.map((item: any) => {
// let pushObj = {
// pid: 2040,
// id: item.id,
// name: item.name,
// type: "3dtiles",
// url: item.url,
// // maximumScreenSpaceError: 1,
// style: {
// color: {
// conditions: [["true", "color('" + item.color + "')"]]
// }
// },
// opacity: 1,
// luminanceAtZenith: 1,
// show: item.show ? item.show : false,
// flyTo: item.flyTo ? item.flyTo : false
// };
// if (+item.lng || +item.lat || +item.alt) {
// pushObj.position = { lng: +item.lng, lat: +item.lat, alt: +item.alt };
// }
// initAlbugineamaps.push(pushObj);
// });
// configJson.value.layers = initAlbugineamaps;
// }
// gltf
const resModel: any = await gltfModelList({});
console.log(resModel, "gltf模型666666");
@ -474,10 +498,105 @@ onMounted(async () => {
configJson.value.layers = configJson.value.layers.concat(initModel);
}
await initMars3d(configJson.value);
await initTree();
await getConfig();
// await initTree();
// await getConfig();
await getPlusConfig();
await loadModel();
});
//
const loadModel = () => {
const tiles3dLayer = new mars3d.layer.TilesetLayer({
name: "桥梁",
url: "http://jxjzw.zhgdyun.com:6080/model/tileset.json",
position: { lat: 23.808356, lng: 106.858628, alt: -30 },
maximumScreenSpaceError: 1
});
map.addLayer(tiles3dLayer);
// duration
const viewPoints = [
{ lat: 23.831044, lng: 106.793216, alt: 427.3, heading: 71.3, pitch: -33.7, duration: 8, stop: 0 },
{ lat: 23.830083, lng: 106.794651, alt: 427, heading: 71.3, pitch: -33.7, duration: 8, stop: 0 },
{ lat: 23.828878, lng: 106.796561, alt: 426.7, heading: 71.3, pitch: -33.7, duration: 8, stop: 0 },
{ lat: 23.827169, lng: 106.798838, alt: 426.2, heading: 71.3, pitch: -33.7, duration: 8, stop: 0 },
{ lat: 23.825388, lng: 106.802205, alt: 425.7, heading: 71.3, pitch: -33.7, duration: 8, stop: 0 },
{ lat: 23.824281, lng: 106.804617, alt: 456.9, heading: 71.3, pitch: -33.7, duration: 8, stop: 0 },
{ lat: 23.821516, lng: 106.808339, alt: 485.3, heading: 57.7, pitch: -28, duration: 8, stop: 0 },
{ lat: 23.821242, lng: 106.814418, alt: 485.2, heading: 57.7, pitch: -28, duration: 8, stop: 0 },
{ lat: 23.818508, lng: 106.82182, alt: 505.5, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.821839, lng: 106.830158, alt: 308.8, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.820424, lng: 106.834909, alt: 308.5, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.818261, lng: 106.838448, alt: 333.6, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.815063, lng: 106.836432, alt: 388.4, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.81156, lng: 106.834072, alt: 387.5, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.809098, lng: 106.831752, alt: 408.1, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.815342, lng: 106.839663, alt: 360, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.815394, lng: 106.844638, alt: 360, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.813412, lng: 106.848396, alt: 359.5, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.80955, lng: 106.853434, alt: 358.4, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.809136, lng: 106.857032, alt: 246.7, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.807034, lng: 106.862492, alt: 246.1, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.805454, lng: 106.868145, alt: 245.7, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.800031, lng: 106.879548, alt: 277.9, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.79379, lng: 106.886769, alt: 309, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.793509, lng: 106.892503, alt: 222.7, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.791219, lng: 106.89762, alt: 222, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.789014, lng: 106.901599, alt: 244.1, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.785644, lng: 106.907363, alt: 304.8, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.783747, lng: 106.910526, alt: 380.6, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.785193, lng: 106.912184, alt: 257.6, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.78331, lng: 106.918608, alt: 257.1, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.780304, lng: 106.913381, alt: 527.2, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.77936, lng: 106.90357, alt: 711, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.778552, lng: 106.880974, alt: 1234.2, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.788351, lng: 106.848678, alt: 1524.4, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.810244, lng: 106.836149, alt: 745.6, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.802507, lng: 106.82263, alt: 1410.7, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.818276, lng: 106.819818, alt: 539.9, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.819261, lng: 106.803758, alt: 540.2, heading: 34, pitch: -29, duration: 8, stop: 0 },
{ lat: 23.821358, lng: 106.7924, alt: 745.7, heading: 34, pitch: -29, duration: 8, stop: 0 }
];
//
map.setCameraViewList(viewPoints);
flyOperateShow.value = true;
};
//
const flyViewPause = () => {
isViewStart.value = false;
map.pauseCameraViewList();
};
//
const flyViewProceed = () => {
isViewStart.value = true;
map.proceedCameraViewList();
};
// //
// const flyPlay = () => {
// newRoutePath.start();
// udpateState();
// };
// //
// const flyPause = () => {
// newRoutePath.pause();
// udpateState();
// };
// //
// const flyProceed = () => {
// newRoutePath.proceed();
// udpateState();
// };
// //
// const flyStop = () => {
// newRoutePath.stop();
// udpateState();
// };
const udpateState = () => {
setTimeout(() => {
formState.isStart = newRoutePath.isStart;
formState.isPause = newRoutePath.isPause;
}, 100);
};
//
const getPlusConfig = async () => {
let requestData = {
@ -499,27 +618,33 @@ const showMapData = (arr: any) => {
arr.map(item => {
if (item.pitPrimitive && item.pitPrimitive.type == "pit") {
//
console.log(123456789);
if (item.pitPrimitive.style.imageBottom) {
const terrainClip = new mars3d.thing.TerrainClip({
diffHeight: item.pitPrimitive.style.diffHeight, //
image: new URL("../../../assets/images/Mars3DImg/textures/poly-stone.jpg", import.meta.url).href,
imageBottom: new URL("../../../assets/images/Mars3DImg/textures/poly-soil.jpg", import.meta.url).href,
splitNum: 80, //
enabled: true
});
map.addThing(terrainClip);
const positions = item.pitPrimitive.points || item.pitPrimitive.positions;
console.log(positions);
//
terrainClip.addArea(positions);
}
// console.log(123456789);
// if (item.pitPrimitive.style.imageBottom) {
// const terrainClip = new mars3d.thing.TerrainClip({
// diffHeight: item.pitPrimitive.style.diffHeight, //
// image: new URL("../../../assets/images/Mars3DImg/textures/poly-stone.jpg", import.meta.url).href,
// imageBottom: new URL("../../../assets/images/Mars3DImg/textures/poly-soil.jpg", import.meta.url).href,
// splitNum: 80, //
// enabled: true
// });
// map.addThing(terrainClip);
// const positions = item.pitPrimitive.points || item.pitPrimitive.positions;
// console.log(positions);
// //
// terrainClip.addArea(positions);
// }
} else if (item.type == "fixedRoute") {
const newRoutePath = new mars3d.graphic.FixedRoute({
newRoutePath = new mars3d.graphic.FixedRoute({
id: item.id,
name: item.name,
speed: 200,
positions: item.points || item.positions,
camera: {
type: "gs",
radius: 500,
followedX: 500,
followedZ: 500
},
// model: {
// url: "//data.mars3d.cn/gltf/mars/MQ-9-Predator.glb",
// scale: 1,
@ -563,10 +688,10 @@ const showMapData = (arr: any) => {
// //
// newRoutePath.flyTo();
// newRoutePath.start();
flyRoamShow.value = true;
flyOperateShow.value = true;
} else {
graphicLayer.addGraphic(item);
console.log("111111111111111");
// graphicLayer.addGraphic(item);
// console.log("111111111111111");
}
});
}
@ -997,6 +1122,15 @@ const initMars3d = (option: any) => {
key: ["ad31e514e7e740179d6d8f182720bcf5"]
// city: '',
});
//
map.flyHome({ duration: 0 });
map.openFlyAnimation({
// duration1:4,
// easingFunction1: Cesium.EasingFunction.QUINTIC_IN_OUT,
callback: function () {
//
}
});
map.on(mars3d.EventType.cameraChanged, cameraChanged);
//
graphicLayer = new mars3d.layer.GraphicLayer({
@ -1519,6 +1653,20 @@ onUnmounted(() => {
position: absolute;
right: 0px;
}
.fly-operate {
width: max-content;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
left: 50%;
bottom: 40px;
:deep() {
.el-button {
margin-left: 5px;
}
}
}
.input-search {
width: 260px;
position: absolute;

View File

@ -5,20 +5,33 @@
<el-icon size="16" color="#fff" @click="closeDiv"><Close /></el-icon>
</div>
<div class="operate-btn">
<el-button type="primary" @click="drawPoint"></el-button>
<div :class="operateIndex == 0 ? 'active-btn' : ''" @click="operateIndex = 0">基础配置</div>
<div :class="operateIndex == 1 ? 'active-btn' : ''" @click="operateIndex = 1">设备列表</div>
</div>
<div class="addHttpMqttServicePage">
<CodeMirror
v-model:code="code"
dark
:codeStyle="{ width: '100%', height: '200px', fontSize: '16px' }"
:disabled="false"
:extensions="extensions"
@ready="onReady"
@change="onChange"
@focus="onFocus"
@blur="onBlur"
/>
<div class="basic-config" v-if="operateIndex == 0">
<div class="switch-content">
<div>
<span>是否启用</span>
<el-switch v-model="formData.enable" />
</div>
</div>
<div class="popup-style">
<span>弹窗样式</span>
<CodeMirror
v-model:code="code"
dark
:codeStyle="{ width: '100%', height: '200px', fontSize: '16px' }"
:disabled="false"
:extensions="extensions"
@ready="onReady"
@change="onChange"
@focus="onFocus"
@blur="onBlur"
/>
</div>
<div class="btn-style">
<el-button type="primary">保存</el-button>
</div>
<!-- <codemirror
v-model="code"
placeholder="Code goes here..."
@ -34,6 +47,26 @@
/>
<component :is="previewComp"></component> -->
</div>
<div class="equip-list" v-if="operateIndex == 1">
<el-table
:data="tableData"
rowKey="id"
:header-cell-style="{ backgroundColor: '#3359B5', color: '#fff', borderColor: '#3F5C8E' }"
>
<el-table-column prop="name" align="center" label="名称" />
<el-table-column prop="name" align="center" label="url" />
<el-table-column prop="name" align="center" label="图标" />
<el-table-column align="center" label="操作">
<template #default="{ row, $index }">
<span style="color: white; cursor: pointer; margin-right: 10px">编辑</span>
<span style="color: white; cursor: pointer">删除</span>
</template>
</el-table-column>
</el-table>
<div class="btn-style">
<el-button type="primary">新增图上选点</el-button>
</div>
</div>
</div>
</template>
@ -53,6 +86,18 @@ import { oneDark } from "@codemirror/theme-one-dark";
import { loadModule } from "vue3-sfc-loader";
import { initVue3Popup } from "@/utils/file-util";
import QueryPopup from "./query-popup.vue";
import { ElMessage } from "element-plus";
import type { FormInstance, UploadProps } from "element-plus";
const tableData = ref<any>([]);
const baseUrl = import.meta.env.VITE_API_URL;
const formData = ref({
enable: false,
showType: false,
pointImage: "",
bgWidth: 0,
bgHeight: 0
});
const operateIndex = ref(0);
const code = ref("");
const previewComp = shallowRef();
const extensions = [vue(), oneDark];
@ -64,6 +109,25 @@ const form = ref({
});
let map: any = props.mapInstance;
let graphicLayer: any = props.graphicInstance;
const beforeAvatarUpload: UploadProps["beforeUpload"] = rawFile => {
if (rawFile.type !== "image/png" && rawFile.type !== "image/jpg" && rawFile.type !== "image/jpeg") {
console.log(rawFile.type);
ElMessage.error("请上传jpg或者png格式的图片");
return false;
}
//
// else if (rawFile.size / 1024 / 1024 > 2) {
// ElMessage.error('Avatar picture size can not exceed 2MB!')
// return false
// }
return true;
};
//
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile, index) => {
console.log(response.result.url);
console.log(response, uploadFile, index);
};
const addRandomGraphicByCount = () => {
const graphicImg = new mars3d.graphic.DivGraphic({
position: [117.077462, 31.657745, 60],
@ -197,7 +261,7 @@ onUnmounted(() => {
border-radius: 2px !important;
background-color: rgba(23, 49, 71, 0.8);
width: 500px;
height: 500px;
height: max-content;
box-shadow: 0 4px 15px 1px #02213bb3;
animation: fadeIn 1s;
&-title {
@ -219,20 +283,80 @@ onUnmounted(() => {
}
}
}
.addHttpMqttServicePage {
.operate-btn {
@include flex;
justify-content: center;
margin: 0 15px;
margin-top: 10px;
border-bottom: 1px solid #50a4e4;
div {
font-size: 16px;
color: white;
padding-bottom: 10px;
border-bottom: 2px solid transparent;
cursor: pointer;
}
div:nth-child(1) {
margin-right: 40px;
}
.active-btn {
color: #4f88e5;
border-color: #4f88e5;
}
}
.basic-config {
width: 100%;
height: 100%;
padding: 20px;
&-header {
font-size: 18px;
font-weight: bold;
padding: 15px 20px;
.switch-content {
@include flex;
margin: 0 5px;
> div {
@include flex;
span {
color: white;
font-size: 14px;
}
span:last-child {
margin-left: 5px;
}
}
}
&-body {
padding-top: 24px;
width: 50%;
.popup-style {
display: flex;
flex-direction: column;
justify-content: flex-start;
margin: 0 5px;
margin-top: 15px;
> span {
font-size: 14px;
color: white;
margin-bottom: 10px;
}
}
.btn-style {
@include flex;
margin: 0 5px;
margin-top: 15px;
:deep() {
.el-button {
width: 100%;
}
}
}
}
.equip-list {
width: 100%;
height: 100%;
padding: 15px 25px;
.btn-style {
@include flex;
margin: 0 5px;
margin-top: 15px;
:deep() {
.el-button {
width: 100%;
}
}
}
}
}
@ -255,6 +379,40 @@ onUnmounted(() => {
border-radius: 6px;
border: 0;
}
.el-table {
background-color: transparent;
tr {
background-color: transparent;
}
}
.el-table__border-left-patch {
background-color: #3f5c8e;
}
.el-table--border .el-table__inner-wrapper::after {
background-color: #3f5c8e;
}
.el-table--border::after {
background-color: #3f5c8e;
}
.el-table__inner-wrapper::before {
background-color: #3f5c8e;
}
.el-table td.el-table__cell {
border-color: #3f5c8e;
}
.el-table--border .el-table__cell {
border-color: #3f5c8e;
}
.cell {
color: white;
}
.el-table__row:hover {
background-color: transparent;
}
.el-table__body tr:hover > td {
// background-color: #008bff !important;
background-color: transparent !important;
}
.el-select,
.el-input,
.el-input__inner {

View File

@ -46,6 +46,13 @@
</el-dropdown> -->
</div>
</div>
<!-- 物联网设备操作 -->
<div class="equip-menu-operate" v-if="equipListShow">
<div class="tool-item" v-for="(item, index) in data[0].children" :key="index" @click="clickEquipMenu(item.name)">
<!-- <img :src="item.icon" alt="" srcset="" style="width: 14px; height: 14px" /> -->
<span>{{ item.name }}</span>
</div>
</div>
<!-- 工具菜单操作 -->
<div class="tool-menu-operate" v-if="toolListShow">
<div class="tool-item" v-for="(item, index) in data[2].children" :key="index" @click="clickMenu(item.name)">
@ -127,7 +134,7 @@
</div>
</div>
<!-- 设备添加弹框 -->
<EquipmentAdd :mapInstance="map" :graphicInstance="graphicLayer" v-if="equipmentShow" @hiddenConfim="equipmentShow = false" />
<EquipmentAdd :mapInstance="map" v-if="equipmentShow" @hiddenConfim="equipmentShow = false" />
<!-- 图上量算弹框 -->
<MapMeasurement :mapInstance="map" v-if="measurementShow" @hiddenConfim="measurementShow = false" />
<!-- 空间分析弹框 -->
@ -289,12 +296,12 @@ import {
gltfModelList,
updateSystemConfig
} from "@/api/modules/mapCommon";
const equipListShow = ref(false);
const toolListShow = ref(false);
const configJson = ref<any>({});
const layerJsonArr = ref<any>([]);
const layerId = ref<any>(null);
const screenComparisonShow = ref(false); //
const equipmentShow = ref(false); //
const leftRollerList = ref<any>([]);
const rightRollerList = ref<any>([]);
const rollerVal = ref({
@ -312,6 +319,7 @@ const regionalNavigationShow = ref(false); // 地区导航弹框
const pickingShow = ref(false); //
const analysisShow = ref(false); //
const measurementShow = ref(false); //
const equipmentShow = ref(false); //
const layersShow = ref(false); //
const basicMapShow = ref(false); //
const chkHasTerrain = ref(false);
@ -632,6 +640,14 @@ const lantianSkybox = new mars3d.GroundSkyBox({
}
});
const data = [
// {
// name: "",
// icon: new URL("@/assets/images/Mars3DIcon/gj.png", import.meta.url).href,
// children: [
// { name: "", icon: new URL("@/assets/images/Mars3DIcon/tsls.png", import.meta.url).href },
// { name: "", icon: new URL("@/assets/images/Mars3DIcon/kjfx.png", import.meta.url).href }
// ]
// },
{ name: "底图", icon: new URL("@/assets/images/Mars3DIcon/dt.png", import.meta.url).href },
{ name: "图层", icon: new URL("@/assets/images/Mars3DIcon/tc.png", import.meta.url).href },
{
@ -748,22 +764,35 @@ const changeBaseMaps = (id: string) => {
map.basemap = active.value = id;
};
const showWidget = (name: string) => {
if (name == "底图") {
if (name == "物联网设备") {
equipListShow.value = !equipListShow.value;
basicMapShow.value = false;
layersShow.value = false;
toolListShow.value = false;
} else if (name == "底图") {
equipListShow.value = false;
basicMapShow.value = true;
layersShow.value = false;
toolListShow.value = false;
} else if (name == "图层") {
equipListShow.value = false;
layersShow.value = true;
basicMapShow.value = false;
toolListShow.value = false;
} else if (name == "工具") {
equipListShow.value = false;
toolListShow.value = !toolListShow.value;
basicMapShow.value = false;
layersShow.value = false;
}
console.log(666);
};
//
const clickEquipMenu = (name: any) => {
console.log(name);
equipmentShow.value = true;
equipListShow.value = false;
};
const clickMenu = (name: any) => {
console.log(name);
if (name == "图上量算") {
@ -796,8 +825,6 @@ const clickMenu = (name: any) => {
screenComparison();
//
initSplitScreenTree();
} else if (name == "设备添加") {
equipmentShow.value = true;
}
toolListShow.value = false;
};
@ -1599,7 +1626,8 @@ onUnmounted(() => {
transform: none;
}
}
.tool-menu-operate {
.tool-menu-operate,
.equip-menu-operate {
@include flex;
position: absolute;
top: 56px;
@ -1640,6 +1668,10 @@ onUnmounted(() => {
background: rgba(51, 89, 181, 0.6);
}
}
.equip-menu-operate {
top: 56px;
right: 261px;
}
.basic-map {
position: absolute;
top: 60px;