This commit is contained in:
parent
beb068d607
commit
603b8a4dae
Binary file not shown.
|
|
@ -1,11 +1,11 @@
|
|||
Model Information:
|
||||
* title: Flying Drone
|
||||
* source: https://sketchfab.com/3d-models/flying-drone-2ecfb55304a043a2a86353f70cc1cf92
|
||||
* author: DogexorRexUwU (https://sketchfab.com/oscar.lopez.riviello)
|
||||
* title: uAV
|
||||
* source: https://sketchfab.com/3d-models/uav-97650de1d69a4a04b46ad6aaa85aebf9
|
||||
* author: Phoenix... (https://sketchfab.com/projectend0005)
|
||||
|
||||
Model License:
|
||||
* license type: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
|
||||
* requirements: Author must be credited. Commercial use is allowed.
|
||||
|
||||
If you use this 3D model in your project be sure to copy paste this credit wherever you share it:
|
||||
This work is based on "Flying Drone" (https://sketchfab.com/3d-models/flying-drone-2ecfb55304a043a2a86353f70cc1cf92) by DogexorRexUwU (https://sketchfab.com/oscar.lopez.riviello) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
|
||||
This work is based on "uAV" (https://sketchfab.com/3d-models/uav-97650de1d69a4a04b46ad6aaa85aebf9) by Phoenix... (https://sketchfab.com/projectend0005) licensed under CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)
|
||||
Binary file not shown.
34675
public/uav/scene.gltf
34675
public/uav/scene.gltf
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 638 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 MiB |
Binary file not shown.
|
|
@ -388,11 +388,14 @@ export default {
|
|||
},
|
||||
deviceDrid(lon, lat) {
|
||||
// this.clearDraw();
|
||||
this.graphicLayer.eachGraphic((item) => {
|
||||
if (item.name === "贴地点") {
|
||||
this.graphicLayer.removeGraphic(item);
|
||||
}
|
||||
});
|
||||
console.log(this.graphicLayer, "this.graphicLayer");
|
||||
if (this.graphicLayer) {
|
||||
this.graphicLayer.eachGraphic((item) => {
|
||||
if (item.name === "贴地点") {
|
||||
this.graphicLayer.removeGraphic(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const graphic = new mars3d.graphic.BillboardEntity({
|
||||
position: new mars3d.LngLatPoint(lon, lat),
|
||||
|
|
|
|||
|
|
@ -101,67 +101,18 @@ export default {
|
|||
}
|
||||
},
|
||||
mapNorth() {
|
||||
let graphicLayer = new mars3d.layer.GraphicLayer();
|
||||
window.marsMap.addLayer(graphicLayer);
|
||||
const fixedRoute = new mars3d.graphic.FixedRoute({
|
||||
name: "贴地表表面漫游",
|
||||
position: {
|
||||
type: "time", // 时序动态坐标
|
||||
speed: 160,
|
||||
list: [
|
||||
[116.043233, 30.845286, 392.48],
|
||||
[116.046833, 30.846863, 411.33],
|
||||
[116.052137, 30.848801, 439.45],
|
||||
[116.060838, 30.850918, 442.91],
|
||||
[116.069013, 30.852035, 435.14],
|
||||
[116.18739, 30.854441, 244.53],
|
||||
[116.205214, 30.859332, 300.96]
|
||||
]
|
||||
},
|
||||
clockLoop: false, // 是否循环播放
|
||||
camera: {
|
||||
type: "gs",
|
||||
pitch: -30,
|
||||
radius: 500
|
||||
},
|
||||
// model: {
|
||||
// show: true,
|
||||
// url: "https://data.mars3d.cn/gltf/mars/qiche.gltf",
|
||||
// scale: 0.2,
|
||||
// minimumPixelSize: 50
|
||||
// },
|
||||
model: {
|
||||
scale: 1,
|
||||
url: "/uav/scene.gltf",
|
||||
heading: 90,
|
||||
mergeOrientation: true, // 用于设置模型不是标准的方向时的纠偏处理,在orientation基础的方式值上加上设置是heading值
|
||||
minimumPixelSize: 50
|
||||
},
|
||||
polyline: {
|
||||
color: "rgba(255,0,0,0.5)",
|
||||
width: 2,
|
||||
showAll: true
|
||||
},
|
||||
path: {
|
||||
color: "rgba(255,255,0,1.0)",
|
||||
width: 4,
|
||||
leadTime: 0
|
||||
}
|
||||
});
|
||||
graphicLayer.addGraphic(fixedRoute);
|
||||
fixedRoute.start();
|
||||
// 1. 获取当前视角
|
||||
// const currentView = window.marsMap.getCameraView();
|
||||
const currentView = window.marsMap.getCameraView();
|
||||
|
||||
// // 2. 修改视角的heading为0(正北),保留其他参数
|
||||
// window.marsMap.setCameraView({
|
||||
// lat: currentView.lat,
|
||||
// lng: currentView.lng,
|
||||
// alt: currentView.alt,
|
||||
// heading: 0, // 指北
|
||||
// pitch: currentView.pitch,
|
||||
// roll: currentView.roll
|
||||
// });
|
||||
// 2. 修改视角的heading为0(正北),保留其他参数
|
||||
window.marsMap.setCameraView({
|
||||
lat: currentView.lat,
|
||||
lng: currentView.lng,
|
||||
alt: currentView.alt,
|
||||
heading: 0, // 指北
|
||||
pitch: currentView.pitch,
|
||||
roll: currentView.roll
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -240,6 +240,11 @@ export default {
|
|||
model: "address",
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: "是否移动",
|
||||
type: "switch",
|
||||
model: "isMove"
|
||||
},
|
||||
{
|
||||
label: "位置",
|
||||
type: "marsMapmap",
|
||||
|
|
|
|||
|
|
@ -36,6 +36,22 @@
|
|||
@changePage="handlePageChange"
|
||||
@selectionChange="handleSelectionChange"
|
||||
>
|
||||
<template #operate="{ data }">
|
||||
<el-link
|
||||
type="primary"
|
||||
:underline="false"
|
||||
@click="handleClick(data, 'edit')"
|
||||
>
|
||||
修改
|
||||
</el-link>
|
||||
<el-link
|
||||
type="danger"
|
||||
:underline="false"
|
||||
@click="handleClick(data, 'delete')"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</my-table>
|
||||
</div>
|
||||
<el-drawer
|
||||
|
|
@ -78,7 +94,7 @@ export default {
|
|||
return {
|
||||
formList: [
|
||||
{
|
||||
label: "名称",
|
||||
label: "sn",
|
||||
type: "input",
|
||||
model: "key"
|
||||
}
|
||||
|
|
@ -88,13 +104,33 @@ export default {
|
|||
{
|
||||
type: "text",
|
||||
label: "sn",
|
||||
prop: "sn",
|
||||
width: 150
|
||||
prop: "sn"
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
label: "描述",
|
||||
prop: "message"
|
||||
label: "是否全天",
|
||||
prop: "allDay"
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
label: "所属单位",
|
||||
prop: "company"
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
label: "机型",
|
||||
prop: "model"
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
label: "备注",
|
||||
prop: "mark"
|
||||
},
|
||||
{
|
||||
slot: "operate",
|
||||
label: "操作",
|
||||
width: 250,
|
||||
fixed: "right"
|
||||
}
|
||||
],
|
||||
paginationParam: {
|
||||
|
|
@ -110,6 +146,12 @@ export default {
|
|||
model: "sn",
|
||||
rules: [{ required: true, message: "请输入sn" }]
|
||||
},
|
||||
{
|
||||
label: "机型",
|
||||
type: "input",
|
||||
model: "model",
|
||||
rules: [{ required: true, message: "请输入机型" }]
|
||||
},
|
||||
{
|
||||
label: "是否全天",
|
||||
type: "select",
|
||||
|
|
@ -128,10 +170,24 @@ export default {
|
|||
model: "positionId",
|
||||
options: [],
|
||||
disabled: false,
|
||||
multiple: true,
|
||||
rules: [
|
||||
{ required: true, message: "请选择关联防区", trigger: "change" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "所属单位",
|
||||
type: "input",
|
||||
model: "company"
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
type: "textarea",
|
||||
maxLenght: 100,
|
||||
rowsHeight: 15,
|
||||
placeholder: "请输入内容",
|
||||
model: "mark"
|
||||
},
|
||||
{
|
||||
label: "时间日期",
|
||||
type: "datetimerange",
|
||||
|
|
@ -165,12 +221,12 @@ export default {
|
|||
if (value === "0") {
|
||||
if (lastItem.label === "时间日期") {
|
||||
this.formDrawerList.pop();
|
||||
this.$set(this.fromItem, "date", null); // 清除 date 数据
|
||||
// this.$set(this.fromItem, "date", null); // 清除 date 数据
|
||||
}
|
||||
} else if (value === "1") {
|
||||
if (lastItem.label !== "时间日期") {
|
||||
this.formDrawerList.push(dateTimeItem);
|
||||
this.$set(this.fromItem, "date", []); // 初始化 date 数据
|
||||
// this.$set(this.fromItem, "date", []); // 初始化 date 数据
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -211,7 +267,11 @@ export default {
|
|||
this.$delete(params, "dateRange");
|
||||
whitListList(params).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.items;
|
||||
this.tableData = res.data.items.map((item) => {
|
||||
return item.allDay
|
||||
? { ...item, allDay: "是" }
|
||||
: { ...item, allDay: "否" };
|
||||
});
|
||||
this.paginationParam.total = res.data.total;
|
||||
}
|
||||
});
|
||||
|
|
@ -231,10 +291,10 @@ export default {
|
|||
console.log(params, "params");
|
||||
|
||||
// 设置 positionName
|
||||
const position = this.PositionList.find(
|
||||
(item) => item.id === params.positionId
|
||||
);
|
||||
params.positionName = position ? position.name : "";
|
||||
// const position = this.PositionList.find(
|
||||
// (item) => item.id === params.positionId
|
||||
// );
|
||||
// params.positionName = position ? position.name : "";
|
||||
|
||||
// 处理 allDay 和时间
|
||||
if (params.allDay === "0") {
|
||||
|
|
@ -281,6 +341,7 @@ export default {
|
|||
this.title = "编辑白名单";
|
||||
this.isEditFlag = false;
|
||||
this.fromItem = { ...value };
|
||||
this.fromItem.positionId = value.positionIds;
|
||||
this.formDrawerList = this.getDefaultFormDrawerList();
|
||||
value.allDay = value.allDay ? "0" : "1";
|
||||
this.changeSelect(value.allDay); // 根据 allDay 调整时间日期字段
|
||||
|
|
@ -338,6 +399,12 @@ export default {
|
|||
model: "sn",
|
||||
rules: [{ required: true, message: "请输入sn" }]
|
||||
},
|
||||
{
|
||||
label: "机型",
|
||||
type: "input",
|
||||
model: "model",
|
||||
rules: [{ required: true, message: "请输入机型" }]
|
||||
},
|
||||
{
|
||||
label: "是否全天",
|
||||
type: "select",
|
||||
|
|
@ -356,10 +423,24 @@ export default {
|
|||
model: "positionId",
|
||||
options: [],
|
||||
disabled: false,
|
||||
multiple: true,
|
||||
rules: [
|
||||
{ required: true, message: "请选择关联防区", trigger: "change" }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "所属单位",
|
||||
type: "input",
|
||||
model: "company"
|
||||
},
|
||||
{
|
||||
label: "备注",
|
||||
type: "textarea",
|
||||
maxLenght: 100,
|
||||
rowsHeight: 15,
|
||||
placeholder: "请输入内容",
|
||||
model: "mark"
|
||||
},
|
||||
{
|
||||
label: "时间日期",
|
||||
type: "datetimerange",
|
||||
|
|
|
|||
Loading…
Reference in New Issue