This commit is contained in:
parent
61713f39e3
commit
63d0f9f5e4
|
|
@ -2,9 +2,9 @@ const isCamera = false; // 是否开启相机限制
|
||||||
const cameraLon = 116.3974; // 相机经度
|
const cameraLon = 116.3974; // 相机经度
|
||||||
const cameraLat = 39.9042; // 相机纬度
|
const cameraLat = 39.9042; // 相机纬度
|
||||||
const cameraRadius = 40000; // 相机半径
|
const cameraRadius = 40000; // 相机半径
|
||||||
const allPositionLon = 116.3974; // 全部防区跳转经度
|
const allPositionLon = 117.278262; // 全部防区跳转经度
|
||||||
const allPositionLat = 39.9042; // 全部防区跳转纬度
|
const allPositionLat = 39.036963; // 全部防区跳转纬度
|
||||||
const allPositionAlt = 39.9042; // 全部防区跳转高度
|
const allPositionAlt = 4000; // 全部防区跳转高度
|
||||||
const allPositionPitch = -90; // 全部防区跳转俯仰角
|
const allPositionPitch = -90; // 全部防区跳转俯仰角
|
||||||
|
|
||||||
window.mapConfig = {
|
window.mapConfig = {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ body {
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
text-rendering: optimizelegibility;
|
text-rendering: optimizelegibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
@ -615,19 +614,27 @@ body {
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
top: 48%;
|
top: 48%;
|
||||||
left: 16%;
|
left: 16%;
|
||||||
|
|
||||||
.user_input {
|
.user_input {
|
||||||
width: 87%;
|
width: 87%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
// input:-internal-autofill-previewed,
|
input:-internal-autofill-previewed,
|
||||||
// input:-internal-autofill-selected {
|
input:-internal-autofill-selected {
|
||||||
// -webkit-text-fill-color: white;
|
-webkit-text-fill-color: white;
|
||||||
// transition: background-color 5000s ease-out 0.5s;
|
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 {
|
.el-input__inner {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-left: 35px;
|
padding-left: 35px;
|
||||||
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
.el-input__suffix {
|
.el-input__suffix {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
|
|
@ -651,20 +658,31 @@ body {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 62%;
|
top: 62%;
|
||||||
left: 16%;
|
left: 16%;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
.user_input {
|
.user_input {
|
||||||
width: 87%;
|
width: 87%;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
// input:-internal-autofill-previewed,
|
position: relative;
|
||||||
// input:-internal-autofill-selected {
|
|
||||||
// -webkit-text-fill-color: white;
|
input:-internal-autofill-previewed,
|
||||||
// transition: background-color 5000s ease-out 0.5s;
|
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 {
|
.el-input__inner {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-left: 35px;
|
padding-left: 35px;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
.el-input__suffix {
|
.el-input__suffix {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
|
|
@ -677,7 +695,8 @@ body {
|
||||||
.el-input__suffix-inner {
|
.el-input__suffix-inner {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
display: none;
|
position: absolute;
|
||||||
|
right: -870%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -197,9 +197,10 @@ export default {
|
||||||
allPositions(positionData, show, "all"); // 显示所有位置信息
|
allPositions(positionData, show, "all"); // 显示所有位置信息
|
||||||
if (value === "click") {
|
if (value === "click") {
|
||||||
let position = window.mapConfig;
|
let position = window.mapConfig;
|
||||||
|
console.log(position, "position");
|
||||||
window.marsMap.setCameraView({
|
window.marsMap.setCameraView({
|
||||||
lat: position.allPositionLon,
|
lng: position.allPositionLon,
|
||||||
lng: position.allPositionLat,
|
lat: position.allPositionLat,
|
||||||
alt: position.allPositionAlt + 800,
|
alt: position.allPositionAlt + 800,
|
||||||
pitch: position.allPositionPitch
|
pitch: position.allPositionPitch
|
||||||
});
|
});
|
||||||
|
|
@ -258,6 +259,7 @@ export default {
|
||||||
// 返回标准化的 GeoJSON Feature
|
// 返回标准化的 GeoJSON Feature
|
||||||
return {
|
return {
|
||||||
type: "Feature",
|
type: "Feature",
|
||||||
|
id: item.id,
|
||||||
name: item.source,
|
name: item.source,
|
||||||
geometry: {
|
geometry: {
|
||||||
type: "Polygon",
|
type: "Polygon",
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,12 @@ import route from "@/router/index";
|
||||||
import iconimg from "@/assets/img/dianweidingweiqizi.png";
|
import iconimg from "@/assets/img/dianweidingweiqizi.png";
|
||||||
export function allPositions(options, show, type, value) {
|
export function allPositions(options, show, type, value) {
|
||||||
options.forEach((item, index) => {
|
options.forEach((item, index) => {
|
||||||
let graphic = window.marsMap.getLayerById(
|
let graphic = window.marsMap.getLayerById(item.id);
|
||||||
item.geometry.coordinates[0][0][0]
|
|
||||||
);
|
|
||||||
// console.log(item,'item')
|
// console.log(item,'item')
|
||||||
if (!graphic) {
|
if (!graphic) {
|
||||||
//扩散效果
|
//扩散效果
|
||||||
graphic = new mars3d.layer.GeoJsonLayer({
|
graphic = new mars3d.layer.GeoJsonLayer({
|
||||||
id: item.geometry.coordinates[0][0][0],
|
id: item.id,
|
||||||
name: "zhendi",
|
name: "zhendi",
|
||||||
data: item,
|
data: item,
|
||||||
symbol: {
|
symbol: {
|
||||||
|
|
@ -33,14 +31,15 @@ export function allPositions(options, show, type, value) {
|
||||||
window.marsMap.addLayer(graphic);
|
window.marsMap.addLayer(graphic);
|
||||||
} else {
|
} else {
|
||||||
graphic.show = show;
|
graphic.show = show;
|
||||||
|
graphic.setOptions({
|
||||||
|
data: item
|
||||||
|
});
|
||||||
}
|
}
|
||||||
let graphics = window.marsMap.getLayerById(
|
let graphics = window.marsMap.getLayerById(item.id + 10);
|
||||||
item.geometry.coordinates[0][0][0] + 10
|
|
||||||
);
|
|
||||||
if (!graphics) {
|
if (!graphics) {
|
||||||
//区域
|
//区域
|
||||||
graphics = new mars3d.layer.GeoJsonLayer({
|
graphics = new mars3d.layer.GeoJsonLayer({
|
||||||
id: item.geometry.coordinates[0][0][0] + 10,
|
id: item.id + 10,
|
||||||
name: "zhendi",
|
name: "zhendi",
|
||||||
data: item,
|
data: item,
|
||||||
symbol: {
|
symbol: {
|
||||||
|
|
@ -63,23 +62,12 @@ export function allPositions(options, show, type, value) {
|
||||||
popup: item.name
|
popup: item.name
|
||||||
});
|
});
|
||||||
window.marsMap.addLayer(graphics);
|
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 {
|
} else {
|
||||||
graphics.show = show;
|
graphics.show = show;
|
||||||
|
graphics.setOptions({
|
||||||
|
data: item
|
||||||
|
});
|
||||||
if (type === "all") {
|
if (type === "all") {
|
||||||
// let position = window.mapConfig;
|
|
||||||
// window.marsMap.setCameraView({
|
|
||||||
// lat: position.allPositionLon,
|
|
||||||
// lng: position.allPositionLat,
|
|
||||||
// alt: position.allPositionAlt + 800,
|
|
||||||
// pitch: position.allPositionPitch
|
|
||||||
// });
|
|
||||||
} else {
|
} else {
|
||||||
graphics.flyTo();
|
graphics.flyTo();
|
||||||
console.log(value, item, "valueitem");
|
console.log(value, item, "valueitem");
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,11 @@
|
||||||
<div class="text">低空安全防御系统</div>
|
<div class="text">低空安全防御系统</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login_user">
|
<div class="login_user">
|
||||||
<!-- <el-input
|
|
||||||
class="user_input"
|
|
||||||
v-model="state.username"
|
|
||||||
placeholder="请输入账号"
|
|
||||||
/> -->
|
|
||||||
<el-input
|
<el-input
|
||||||
class="user_input"
|
class="user_input"
|
||||||
placeholder="请输入账号"
|
placeholder="请输入账号"
|
||||||
v-model="state.username"
|
v-model="state.username"
|
||||||
|
autocomplete="off"
|
||||||
>
|
>
|
||||||
<i slot="suffix" class="el-input__icon"></i>
|
<i slot="suffix" class="el-input__icon"></i>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
@ -25,6 +21,7 @@
|
||||||
placeholder="请输入密码"
|
placeholder="请输入密码"
|
||||||
v-model="state.password"
|
v-model="state.password"
|
||||||
show-password
|
show-password
|
||||||
|
autocomplete="off"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -226,27 +226,31 @@ export default {
|
||||||
this.$delete(params, "geoJson");
|
this.$delete(params, "geoJson");
|
||||||
this.$delete(params, "center");
|
this.$delete(params, "center");
|
||||||
// this.$delete(params, "imageBriefUrl");
|
// this.$delete(params, "imageBriefUrl");
|
||||||
if (this.isType === "add") {
|
if (params.lon !== "" && params.lat !== "") {
|
||||||
// console.log("新增");
|
if (this.isType === "add") {
|
||||||
devPositionAdd(params)
|
// console.log("新增");
|
||||||
.then((res) => {
|
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) {
|
if (res.code === 0) {
|
||||||
this.$message.success("新增成功");
|
this.$message.success("编辑成功");
|
||||||
this.headdenForm({}, "search");
|
this.headdenForm({}, "search");
|
||||||
}
|
}
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
} else if (this.isType === "edit") {
|
}
|
||||||
devPositionUpdate(params).then((res) => {
|
this.drawer = false;
|
||||||
if (res.code === 0) {
|
} else {
|
||||||
this.$message.success("编辑成功");
|
this.$message.error("请选择地图上的经纬度");
|
||||||
this.headdenForm({}, "search");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.drawer = false;
|
|
||||||
},
|
},
|
||||||
// 新增 搜索
|
// 新增 搜索
|
||||||
headdenForm(value, type) {
|
headdenForm(value, type) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue