This commit is contained in:
liqi 2025-04-26 12:18:47 +08:00
parent 61713f39e3
commit 63d0f9f5e4
6 changed files with 70 additions and 60 deletions

View File

@ -2,9 +2,9 @@ const isCamera = false; // 是否开启相机限制
const cameraLon = 116.3974; // 相机经度
const cameraLat = 39.9042; // 相机纬度
const cameraRadius = 40000; // 相机半径
const allPositionLon = 116.3974; // 全部防区跳转经度
const allPositionLat = 39.9042; // 全部防区跳转纬度
const allPositionAlt = 39.9042; // 全部防区跳转高度
const allPositionLon = 117.278262; // 全部防区跳转经度
const allPositionLat = 39.036963; // 全部防区跳转纬度
const allPositionAlt = 4000; // 全部防区跳转高度
const allPositionPitch = -90; // 全部防区跳转俯仰角
window.mapConfig = {

View File

@ -22,7 +22,6 @@ body {
-webkit-font-smoothing: antialiased;
text-rendering: optimizelegibility;
}
#app {
height: 100%;
overflow: hidden;
@ -615,19 +614,27 @@ body {
// background-color: red;
top: 48%;
left: 16%;
.user_input {
width: 87%;
height: 40px;
border: 1px solid #fff;
border-radius: 5px;
// input:-internal-autofill-previewed,
// input:-internal-autofill-selected {
// -webkit-text-fill-color: white;
// transition: background-color 5000s ease-out 0.5s;
// }
input:-internal-autofill-previewed,
input:-internal-autofill-selected {
-webkit-text-fill-color: white;
transition: background-color 5000s ease-out 0.5s;
}
.el-input__wrapper {
background: transparent !important;
border: 0;
box-shadow: 0 0 0 0px
var(--el-input-border-color, var(--el-border-color)) inset;
}
.el-input__inner {
height: 100%;
padding-left: 35px;
color: #fff !important;
}
.el-input__suffix {
width: 10%;
@ -651,20 +658,31 @@ body {
position: absolute;
top: 62%;
left: 16%;
background-color: transparent;
.user_input {
width: 87%;
height: 40px;
border: 1px solid #fff;
border-radius: 5px;
// input:-internal-autofill-previewed,
// input:-internal-autofill-selected {
// -webkit-text-fill-color: white;
// transition: background-color 5000s ease-out 0.5s;
// }
position: relative;
input:-internal-autofill-previewed,
input:-internal-autofill-selected {
-webkit-text-fill-color: white;
transition: background-color 5000s ease-out 0.5s;
}
.el-input__wrapper {
background: transparent !important;
border: 0;
box-shadow: 0 0 0 0px
var(--el-input-border-color, var(--el-border-color)) inset;
}
.el-input__inner {
height: 100%;
padding-left: 35px;
color: white;
}
.el-input__suffix {
width: 10%;
@ -677,7 +695,8 @@ body {
.el-input__suffix-inner {
font-size: 22px;
margin-top: 2px;
display: none;
position: absolute;
right: -870%;
}
}
}

View File

@ -197,9 +197,10 @@ export default {
allPositions(positionData, show, "all"); //
if (value === "click") {
let position = window.mapConfig;
console.log(position, "position");
window.marsMap.setCameraView({
lat: position.allPositionLon,
lng: position.allPositionLat,
lng: position.allPositionLon,
lat: position.allPositionLat,
alt: position.allPositionAlt + 800,
pitch: position.allPositionPitch
});
@ -258,6 +259,7 @@ export default {
// GeoJSON Feature
return {
type: "Feature",
id: item.id,
name: item.source,
geometry: {
type: "Polygon",

View File

@ -2,14 +2,12 @@ import route from "@/router/index";
import iconimg from "@/assets/img/dianweidingweiqizi.png";
export function allPositions(options, show, type, value) {
options.forEach((item, index) => {
let graphic = window.marsMap.getLayerById(
item.geometry.coordinates[0][0][0]
);
let graphic = window.marsMap.getLayerById(item.id);
// console.log(item,'item')
if (!graphic) {
//扩散效果
graphic = new mars3d.layer.GeoJsonLayer({
id: item.geometry.coordinates[0][0][0],
id: item.id,
name: "zhendi",
data: item,
symbol: {
@ -33,14 +31,15 @@ export function allPositions(options, show, type, value) {
window.marsMap.addLayer(graphic);
} else {
graphic.show = show;
graphic.setOptions({
data: item
});
}
let graphics = window.marsMap.getLayerById(
item.geometry.coordinates[0][0][0] + 10
);
let graphics = window.marsMap.getLayerById(item.id + 10);
if (!graphics) {
//区域
graphics = new mars3d.layer.GeoJsonLayer({
id: item.geometry.coordinates[0][0][0] + 10,
id: item.id + 10,
name: "zhendi",
data: item,
symbol: {
@ -63,23 +62,12 @@ export function allPositions(options, show, type, value) {
popup: item.name
});
window.marsMap.addLayer(graphics);
// let position = window.mapConfig;
// window.marsMap.setCameraView({
// lat: position.allPositionLon,
// lng: position.allPositionLat,
// alt: position.allPositionAlt + 800,
// pitch: position.allPositionPitch
// });
} else {
graphics.show = show;
graphics.setOptions({
data: item
});
if (type === "all") {
// let position = window.mapConfig;
// window.marsMap.setCameraView({
// lat: position.allPositionLon,
// lng: position.allPositionLat,
// alt: position.allPositionAlt + 800,
// pitch: position.allPositionPitch
// });
} else {
graphics.flyTo();
console.log(value, item, "valueitem");

View File

@ -6,15 +6,11 @@
<div class="text">低空安全防御系统</div>
</div>
<div class="login_user">
<!-- <el-input
class="user_input"
v-model="state.username"
placeholder="请输入账号"
/> -->
<el-input
class="user_input"
placeholder="请输入账号"
v-model="state.username"
autocomplete="off"
>
<i slot="suffix" class="el-input__icon"></i>
</el-input>
@ -25,6 +21,7 @@
placeholder="请输入密码"
v-model="state.password"
show-password
autocomplete="off"
>
</el-input>
</div>

View File

@ -226,27 +226,31 @@ export default {
this.$delete(params, "geoJson");
this.$delete(params, "center");
// this.$delete(params, "imageBriefUrl");
if (this.isType === "add") {
// console.log("");
devPositionAdd(params)
.then((res) => {
if (params.lon !== "" && params.lat !== "") {
if (this.isType === "add") {
// console.log("");
devPositionAdd(params)
.then((res) => {
if (res.code === 0) {
this.$message.success("新增成功");
this.headdenForm({}, "search");
}
})
.catch((err) => {
console.log(err);
});
} else if (this.isType === "edit") {
devPositionUpdate(params).then((res) => {
if (res.code === 0) {
this.$message.success("新增成功");
this.$message.success("编辑成功");
this.headdenForm({}, "search");
}
})
.catch((err) => {
console.log(err);
});
} else if (this.isType === "edit") {
devPositionUpdate(params).then((res) => {
if (res.code === 0) {
this.$message.success("编辑成功");
this.headdenForm({}, "search");
}
});
}
this.drawer = false;
} else {
this.$message.error("请选择地图上的经纬度");
}
this.drawer = false;
},
//
headdenForm(value, type) {