'first-commit'
@ -0,0 +1,31 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
public/lib/CesiumUnminified/
|
||||
packages/mars3d/dist/plugins/
|
||||
packages/mars3d/node_modules/
|
||||
mars3d-*src.*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
package-lock.json
|
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mars3D最简项目模版 - Vue3+Vite版</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "mars3d-vue-template",
|
||||
"version": "3.6.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"serve": "vite",
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@turf/turf": "^6.5.0",
|
||||
"axios": "^1.5.0",
|
||||
"echarts": "^5.4.3",
|
||||
"element-plus": "^2.3.14",
|
||||
"mars3d": "~3.6.0",
|
||||
"mars3d-cesium": "~1.109.0",
|
||||
"mitt": "^3.0.1",
|
||||
"vue": "^3.2.27"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^17.0.13",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.2",
|
||||
"less": "^4.1.2",
|
||||
"terser": "^5.16.1",
|
||||
"typescript": "4.5.5",
|
||||
"vite": "^4.3.9",
|
||||
"vite-plugin-mars3d": "^3.0.0",
|
||||
"vue-tsc": "^0.29.8"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/marsgis/mars3d-vue-template.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/marsgis/mars3d-vue-template/issues",
|
||||
"email": "wh@marsgis.cn"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 9.9 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 7.9 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 9.4 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 2.0 MiB |
After Width: | Height: | Size: 1.6 MiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 1.2 MiB |
After Width: | Height: | Size: 287 KiB |
@ -0,0 +1,305 @@
|
||||
.cesium-viewer-toolbar {
|
||||
top: auto !important;
|
||||
bottom: 35px !important;
|
||||
left: 12px !important;
|
||||
right: auto !important;
|
||||
}
|
||||
|
||||
.cesium-toolbar-button img {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.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.8);
|
||||
color: #e6e6e6;
|
||||
fill: #e6e6e6;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.cesium-button:hover {
|
||||
background: #3ea6ff;
|
||||
}
|
||||
|
||||
/**cesium 底图切换面板*/
|
||||
.cesium-baseLayerPicker-dropDown {
|
||||
bottom: 0;
|
||||
left: 40px;
|
||||
max-height: 700px;
|
||||
margin-bottom: 5px;
|
||||
background-color: rgba(23, 49, 71, 0.8);
|
||||
}
|
||||
|
||||
/**cesium 帮助面板*/
|
||||
.cesium-navigation-help {
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
left: 40px;
|
||||
transform-origin: left bottom;
|
||||
background: none;
|
||||
background-color: rgba(23, 49, 71, 0.8);
|
||||
|
||||
.cesium-navigation-help-instructions {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.cesium-navigation-button {
|
||||
background: none;
|
||||
}
|
||||
|
||||
.cesium-navigation-button-selected,
|
||||
.cesium-navigation-button-unselected:hover {
|
||||
background: rgba(0, 138, 255, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
/**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: 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-color: rgba(23, 49, 71, 0.8);
|
||||
}
|
||||
|
||||
.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);
|
||||
|
||||
>li>a:hover,
|
||||
>li>a:focus,
|
||||
>li>.active {
|
||||
background-color: #3ea6ff;
|
||||
}
|
||||
|
||||
>.active>a,
|
||||
>.active>a:hover,
|
||||
>.active>a:focus {
|
||||
background-color: #3ea6ff;
|
||||
}
|
||||
}
|
||||
|
||||
/* Popup样式*/
|
||||
.mars3d-popup-color {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.mars3d-popup-background {
|
||||
background: rgba(23, 49, 71, 0.8);
|
||||
}
|
||||
|
||||
.mars3d-popup-content {
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.mars3d-template-content label {
|
||||
padding-right: 6px;
|
||||
}
|
||||
|
||||
.mars3d-template-titile {
|
||||
border-bottom: 1px solid #3ea6ff;
|
||||
}
|
||||
|
||||
.mars3d-template-titile a {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.mars3d-tooltip {
|
||||
background: rgba(23, 49, 71, 0.8);
|
||||
border: 1px solid rgba(23, 49, 71, 0.8);
|
||||
}
|
||||
|
||||
.mars3d-popup-btn-custom {
|
||||
padding: 3px 10px;
|
||||
border: 1px solid #209ffd;
|
||||
background: #209ffd1c;
|
||||
}
|
||||
|
||||
.maptool-container {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 80px;
|
||||
width: 300px;
|
||||
height: 800px;
|
||||
background-color: #3d84a8;
|
||||
box-sizing: border-box;
|
||||
user-select: none;
|
||||
color: #fff;
|
||||
box-shadow: 0 10px 40px -10px rgba(0, 64, 128, 0.2);
|
||||
border-radius: 8px;
|
||||
&-title {
|
||||
text-align: left;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
padding-left: 20px;
|
||||
font-weight: bold;
|
||||
border-bottom: 2px solid #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.maptree {
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
height: calc(100% - 50px);
|
||||
|
||||
.el-tree {
|
||||
background-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-tree-node__expand-icon {
|
||||
font-size: 22px;
|
||||
color: #48466d;
|
||||
}
|
||||
|
||||
.el-tree-node__label {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.el-tree-node__content {
|
||||
// padding-left: 10px !important;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
background-color: transparent !important;
|
||||
border-bottom: 1px solid #48466d;
|
||||
}
|
||||
|
||||
.el-checkbox {
|
||||
--el-checkbox-input-height: 20px;
|
||||
--el-checkbox-input-width: 20px;
|
||||
}
|
||||
|
||||
.el-checkbox__inner::after {
|
||||
border: 2px solid transparent;
|
||||
border-left: 0;
|
||||
border-top: 0;
|
||||
height: 12px;
|
||||
left: 5px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.el-checkbox__inner::before {
|
||||
top: 8px !important;
|
||||
height: 4px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.maptree::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.maptree-node {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-right: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.maptree-index {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.mapfenxi {
|
||||
.maptool-container-btn {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 20px 5px;
|
||||
.el-button {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.measureView {
|
||||
position: absolute;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.sectionMeasureChartView {
|
||||
right: 20px;
|
||||
bottom: 50px;
|
||||
padding: 0 20px 30px;
|
||||
}
|
||||
.analysisMeasureContatiner {
|
||||
right: 20px;
|
||||
bottom: 50px;
|
||||
padding: 0 20px 30px;
|
||||
}
|
||||
.analysisMeasureLabel{
|
||||
line-height: 50px;
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<el-row class="map-control-btn">
|
||||
<el-button plain @click="handlerControl('TCGL')">图层管理</el-button>
|
||||
<el-button type="primary" plain @click="handlerControl('ZHFX')"
|
||||
>综合空间分析</el-button
|
||||
>
|
||||
<el-button type="success" plain>Success</el-button>
|
||||
<el-button type="info" plain>Info</el-button>
|
||||
<el-button type="warning" plain>Warning</el-button>
|
||||
<el-button type="danger" plain>Danger</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
<script setup>
|
||||
import { getCurrentInstance } from "vue";
|
||||
const instance = getCurrentInstance();
|
||||
//按钮控制
|
||||
const handlerControl = (key) => {
|
||||
switch (key) {
|
||||
case "TCGL":
|
||||
instance?.proxy?.$emitter.emit("showLayerTree");
|
||||
break;
|
||||
case "ZHFX":
|
||||
instance?.proxy?.$emitter.emit("showMapFenXi");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.map-control-btn {
|
||||
position: absolute;
|
||||
left: 20px;
|
||||
top: 20px;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,8 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
declare module '*.vue' {
|
||||
import { DefineComponent } from 'vue'
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>
|
||||
export default component
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
|
||||
import "mars3d-cesium/Build/Cesium/Widgets/widgets.css"
|
||||
import "mars3d/dist/mars3d.css"
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import mitt from "mitt"
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import "./style.css"
|
||||
const app = createApp(App)
|
||||
app.config.globalProperties.$emitter = mitt()
|
||||
app.use(ElementPlus)
|
||||
app.mount('#app')
|
@ -0,0 +1,64 @@
|
||||
body,
|
||||
html,
|
||||
#app {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bg-gis {
|
||||
background-size: auto;
|
||||
overflow: hidden;
|
||||
left: 0;
|
||||
width: "100%";
|
||||
position: absolute;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.collapsed {
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
a {
|
||||
color: #62a8ea;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: #89bceb;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
outline: thin dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline: none;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
ul,
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/*dark样式*/
|
||||
a {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: #cc3300;
|
||||
text-decoration: underline;
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
//删除数组某一项
|
||||
export const deleteArrayItem = (array, key) => {
|
||||
let index = array.indexOf(key);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
return array;
|
||||
};
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"useDefineForClassFields": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"strictNullChecks": false,
|
||||
"jsx": "preserve",
|
||||
"sourceMap": true,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": ["esnext", "dom"],
|
||||
"types": ["element-plus/global"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { mars3dPlugin } from "vite-plugin-mars3d"
|
||||
import vueJsx from "@vitejs/plugin-vue-jsx"
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
mars3dPlugin(),
|
||||
vueJsx()
|
||||
]
|
||||
});
|