提交 2b196ef0 作者: 翁进城

fix: 1.修正无人机任务

2.修正无人机连接模型创建流程
feat: 智能识别移除交通指引与快速建模
上级 07e72614
<template>
<div class="control-bottom">
<div class="control-bottom-item" @click="onTakeOff">
<div class="control-bottom-item" @click="onStartTask">
<SymbolIcon icon="yijianrenwu" />
<span class="dib f8">一键任务</span>
</div>
......@@ -203,6 +203,7 @@ import { flightTaskAPI, Control_API } from "../../../../../../api";
export default {
name: "ControlBottom",
inject:['bus'],
data() {
return {
controlType: 0, //控制类型, 0: 自动 1: 摇杆 2: 键盘
......@@ -220,65 +221,8 @@ export default {
await Control_API.updateTakeOver(this.uav.id);
},
// 一键任务
onTakeOff() {
if (this.airlineData) {
this.$confirm("请确认是否进行一键任务操作?", "安全确认", {
cancelButtonText: "取消",
confirmButtonText: "确定",
customClass: "uav_controlPane",
showClose: false,
}).then(async () => {
try {
this.$store.dispatch("uavApplications/takeOff", {
callback: async (isOk) => {
if (isOk) {
this.$message.success("发出一键任务指令成功");
const res = await flightTaskAPI.editFlight({
...item,
changeSchedul: false,
deviceHardId: this.uav.hardId,
taskStatus: 1,
});
if (res.code == 200) {
this.$message({
showClose: true,
type: "success",
message: "操作成功",
duration: 1000,
});
const newItem = JSON.parse(JSON.stringify(item));
newItem.taskId = item.id;
newItem.hardId = this.uav.hardId;
// 打开任务列表
// await this.getTaskList(newItem);
// if (this.showTaskDetails) this.showTaskDetails = false;
// 打开任务列表
this.$store.commit("uavApplications/setState", {
key: "TaskList",
value: newItem,
});
} else {
this.$message({
showClose: true,
type: "error",
message: res.msg,
duration: 1000,
});
}
this.fly_control_unlock("fly_control_unlock");
} else {
return this.$message.warning("发出一键任务指令失败");
}
},
});
} catch (e) {
this.$message.warning("解析航线失败");
console.log("解析航线失败", e);
}
});
} else {
this.$message.error("请先选择任务");
}
onStartTask() {
this.bus.$emit('startTask');
},
fly_control_unlock(key) {
const seed = Date.now();
......
......@@ -39,7 +39,7 @@
</template>
<script>
import API from '@/api';
// import API from '@/api';
export default {
props: {
......@@ -80,7 +80,7 @@ export default {
},
async list_airway() {
let res = await API.AIRWAY.getApprovedTask();
/* let res = await API.AIRWAY.getApprovedTask();
if (res) {
let jqList = [],
ctList = [],
......@@ -114,7 +114,7 @@ export default {
},
];
this.airway_list = airway_list;
}
} */
},
}
}
......
......@@ -28,7 +28,7 @@
</template>
<script>
import API from '@/api';
// import API from '@/api';
export default {
props: {
......@@ -51,7 +51,7 @@ export default {
methods: {
async load(){
this.pageNo++
let res = await API.HOME.getflightvideoMsg({
/* let res = await API.HOME.getflightvideoMsg({
uavId: this.uavId,
pageNo: this.pageNo,
pageSize: this.pageSize
......@@ -66,7 +66,7 @@ export default {
}
this.list.push(res[i])
}
console.log(this.list,"list");
console.log(this.list,"list"); */
},
async getCarList(){
if(!this.uavId){
......
......@@ -89,7 +89,7 @@
</template>
<script>
import API from '@/api';
// import API from '@/api';
export default {
props: {
......@@ -125,7 +125,7 @@ export default {
methods: {
async load(){
this.pageNo++
let res = await API.HOME.getFaceuavvideoMsg({
/* let res = await API.HOME.getFaceuavvideoMsg({
uavId: this.uavId,
pageNo: this.pageNo,
pageSize: this.pageSize
......@@ -140,7 +140,7 @@ export default {
}
this.list.push(res[i])
}
console.log(this.list,"list");
console.log(this.list,"list"); */
},
async getFaceList(){
if(!this.uavId){
......@@ -199,14 +199,14 @@ export default {
.rate-img{
flex: 1;
height: 75px;
background-image: url('~@/assets/images/observe/faceAI_border1.png');
background-image: url('../../assets/images/faceAI_border1.png');
background-size: 100% 100%;
padding: 7px;
display: flex;
align-items: center;
&.rate-img--contrary {
background-image: url('~@/assets/images/observe/faceAI_border2.png');
background-image: url('../../assets/images/faceAI_border2.png');
justify-content: right;
}
......
import API from "@/api";
import { Utils } from "@/lib/cesium";
// import API from "@/api";
import { Utils } from "../../../../../../../../../lib/cesium";
let airline_entitys = [];
let air_line_preview = [];
export default {
createFn() {
this.$emit("createTaskClick");
},
// 航线数据
async list_airway() {
let res = await API.AIRWAY.getApprovedTask();
if (res) {
let jqList = [],
ctList = [],
lsList = [];
for (let i = 0; i < res.length; i++) {
if (res[i].taskCateId == 1) {
jqList.push(res[i]);
}
if (res[i].taskCateId == 2) {
ctList.push(res[i]);
}
if (res[i].taskCateId == 3) {
lsList.push(res[i]);
}
}
let airway_list = [
{
taskTitle: "选择航线自动生成任务",
id: 'z1322'
},
{
id: "警情任务",
taskTitle: "警情任务",
children: jqList,
},
{
id: "常态任务",
taskTitle: "常态任务",
children: ctList,
},
{
id: "临时任务",
taskTitle: "临时紧急任务",
children: lsList,
},
];
this.airway_list = airway_list;
}
let FlightLineList = await API.AIRWAY.Drd({sourceType:1});
this.flightList = FlightLineList
},
// // 获取任务列表
// async init() {
// let res = await API.AIRWAY.getNestApprovedTask();
// this.TaskList = [{
// taskTitle: "选择航线自动生成任务",
// id: 'z1322'
// }, ...res];
// },
// 预览航线
showRoute(item) {
this.distanceLine = 0
this.handleAirLinePreview(item, true)
},
changeBtn(item) {
this.taskType = item;
this.$emit('taskType',item)
if (this.taskType == "itemA") {
this.list_airway()
}
},
close() {
this.$nextTick(async () => {
let viewer = window.viewer;
if (airline_entitys?.length) {
airline_entitys.forEach((item) => {
viewer.entities.remove(item);
});
}
let res = {};
air_line_preview.forEach((item) => {
viewer.entities.remove(item);
});
await this.list_airway();
await this.initTask();
this.flightId = "";
this.flyTypeId = "";
this.flight = [
{
flightName: "",
},
];
this.taskCate = 1
});
},
task_update(status) {
API.DEVICE.task_update({
id: this.flyTypeId,
status,
deviceHardId: this.uav_This.uav.control.device.deviceHardId,
});
},
startFlight(data) {
// 开始任务
this.$emit(
"fn",
{
data,
type: 769,
},
"wrj"
);
},
end(item) {
// 结束任务
this.task_update(4)
this.$emit("fn", this.data[item].data, "wrj");
// 飞控结束任务
this.startFlight(null)
this.flyTypeId = null
this.list_airway()
this.flight = [
{
flightName: "",
},
],
sessionStorage.removeItem("waypointList");
this.$message.success("操作成功");
},
unlock() {
if (this.unlockValue) {
this.ws = new WebSocket("ws://127.0.0.1:8802");
this.ws.onmessage = (e) => {
let reader = new FileReader();
console.log(e.data, 'e.data');
reader.onload = (event) => {
let data = event.currentTarget.result;
data = JSON.parse(data).data;
this.$emit(
"fn",
{
type: 519,
data
}
);
}
reader.readAsText(e.data);
}
// 更改为定点模式
// this.$emit('fn', {
// type: 513,
// data: "POSITION",
// }, "wrj")
this.$message.success("操作成功");
}
},
plan() {
if (this.airwayUploadData.totalWaypointCount) {
return parseInt(
(this.airwayUploadData.uploadedWaypointIndex /
this.airwayUploadData.totalWaypointCount) *
100
);
} else {
return "";
}
},
handle_airway_change() {
if (!this.flyTypeId) return this.$message.warning("请选择任务");
this.$emit("airway-view", this.flight[0]);
},
upload__airway() {
if (!this.flyTypeId) return this.$message.warning("请选择任务");
this.$emit("fn", { type: 521, data: this.flightLineData.data }, "wrj")
this.$message.success("操作成功");
},
// 飞控选择其他模块时,关闭航线
// 关键字:关闭预设航线
async close_the_router(item, state){
......@@ -425,6 +242,4 @@ export default {
});
airline_entitys.push(label_entity);
},
}
\ No newline at end of file
......@@ -65,10 +65,10 @@
</template>
<script>
import Bus from "@/assets/ligature.js";
// import Bus from "@/assets/ligature.js";
import { saveAs } from "file-saver";
import Moment from "moment";
import API from "@/api";
// import API from "@/api";
export default {
props: {
......
<template>
<div class="left-bar" :class="{ collapse: listCollapse }">
<div class="left-bar-item item" @click="closeAI()">
<div class="left-bar-item item" @click="onClickTask">
<img class="left-bar-item__icon" src="./assets/images/task.svg" />
<div class="left-bar-item__text">任务</div>
</div>
<div
class="left-bar-item item"
@click="
openAIList = !openAIList;
$emit('changeTask', false);
"
>
<TaskList class="task-list" v-if="openTask"></TaskList>
<div class="left-bar-item item" @click="onClickAI">
<img class="left-bar-item__icon" src="./assets/images/ai.png" />
<div class="left-bar-item__text">智能识别</div>
</div>
<div class="ai-list" :class="{ active: openAIList }" @click.stop>
<div class="left-bar-item item" @click="switchAI(0)">
<div class="ai-list" :class="{ active: openAIList }">
<div class="left-bar-item item" @click.stop="switchAI(0)">
<img class="left-bar-item__icon" src="./assets/images/faceAI2.png" />
<div class="left-bar-item__text">人脸识别</div>
</div>
<Face v-if="openFace" class="ai-dialog" :uavId="uav.hardId" @close="openFace = false" />
<div class="left-bar-item item" @click="switchAI(1)">
<div class="left-bar-item item" @click.stop="switchAI(1)">
<img class="left-bar-item__icon" src="./assets/images/carAI2.png" />
<div class="left-bar-item__text">车辆识别</div>
</div>
<Car v-if="openPlate" class="ai-dialog" :uavId="uav.hardId" @close="openPlate = false" />
<div class="left-bar-item item" @click="switchAI(2)">
<!-- <div class="left-bar-item item" @click.stop="switchAI(2)">
<img class="left-bar-item__icon" src="./assets/images/traffic.png" />
<div class="left-bar-item__text">交通指引</div>
</div>
<div class="left-bar-item item" @click="switchAI(3)">
<div class="left-bar-item item" @click.stop="switchAI(3)">
<img class="left-bar-item__icon" src="./assets/images/ksjm.png" />
<div class="left-bar-item__text">快速建模</div>
</div>
<Jm v-if="jmflag" :device="device" class="jm-dialog" @close="jmflag = false"></Jm>
<Traffic v-if="openTraffic" class="ai-dialog" :uavId="uav.hardId" @close="openTraffic = false" />
</div> -->
<Face v-if="openFace" class="ai-dialog" :uavId="uav.hardId" @close="openFace = false" />
<Car v-if="openPlate" class="ai-dialog" :uavId="uav.hardId" @close="openPlate = false" />
<Traffic
v-if="openTraffic"
class="ai-dialog"
:uavId="uav.hardId"
@close="openTraffic = false"
/>
<Jm v-if="openModeling" :device="device" class="jm-dialog" @close="openModeling = false"></Jm>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import Car from "./components/car";
import Face from "./components/face";
import Jm from "./components/Jm";
import TaskList from "./components/taskList";
import Traffic from "./components/traffic";
export default {
name: "ControlLeft",
components: {
Car,
Jm,
TaskList,
Traffic,
Face,
},
data() {
return {
openTask: false, //打开任务
openAIList: false, //打开AI列表
openTraffic: false, //打开交通指引
openFace: false, //打开人脸识别
openPlate: false, //车牌识别
openModeling: false, //打开建模
};
},
computed: {
...mapState("MMCFlightControlCenter/uavApplications", [
"uav",
]),
...mapState("MMCFlightControlCenter/uavApplications", ["uav"]),
// 收起列表按钮
listCollapse: {
get() {
......@@ -70,6 +83,16 @@ export default {
},
},
methods: {
onClickTask() {
this.openTask = !this.openTask;
this.openAIList = false;
this.closeAI();
},
onClickAI() {
this.openTask = false;
this.openAIList = !this.openAIList;
this.closeAI();
},
/**
* 切换AI功能
*/
......@@ -77,6 +100,7 @@ export default {
this.openFace = false;
this.openPlate = false;
this.openTraffic = false;
this.openModeling = false;
switch (type) {
case 0:
this.openFace = !this.openFace;
......@@ -93,7 +117,7 @@ export default {
this.openTraffic = !this.openTraffic;
break;
case 3:
this.jmflag = !this.jmflag;
this.openModeling = !this.openModeling;
break;
}
......@@ -102,16 +126,22 @@ export default {
* 关闭所有ai
*/
closeAI() {
this.openAIList = false;
this.openFace = false;
this.openPlate = false;
this.openTraffic = false;
this.openModeling = false;
},
},
};
</script>
<style scoped lang="scss">
.task-list {
position: absolute;
left: 60px;
top: -30px;
cursor: initial;
}
.left-bar {
position: absolute;
......@@ -155,14 +185,21 @@ export default {
left: 65px;
top: 62px;
display: none;
gap: 4px;
&.active {
display: flex;
}
.left-bar-item {
margin-right: 4px;
padding-top: 3px;
}
}
}
.ai-dialog {
position: absolute;
top: 56px;
left: 0;
}
</style>
\ No newline at end of file
......@@ -49,7 +49,7 @@
width="30%"
:append-to-body="true"
style="margin-top: 20vh"
custom-class="mmc-dialog"
custom-class="mmc"
>
<div class="endrenwu">
<div class="tishiyu">紧急迫降</div>
......@@ -487,7 +487,7 @@ export default {
width: 100%;
height: 177px;
border: 1px solid #70daf9;
background: rgba(9, 32, 87, 0.7);
background: rgba(9, 32, 87, 0.7) !important;
}
.guideFlight::v-deep {
height: 240px;
......
......@@ -13,6 +13,7 @@
import cesiumLayout from "./components/cesium-layer";
import mapImageSwitch from "./components/mapImageSwitch";
import uavApplications from "./components/uavApplications";
import Vue from 'vue';
export default {
name: "MMCFlightControlCenter",
......@@ -27,10 +28,70 @@ export default {
type: Boolean,
default: false,
},
// 天目将登录用户信息
userInfo: {
type: Object,
default: null,
},
// 任务列表
taskList: {
type: Array,
default() {
return [
/* {
name: '任务',
id: 1,
children: [],
airway: {
name: '航线名称',
id: 1
}
} */
];
},
},
// 航线列表
airwayList: {
type: Array,
default() {
return [
/* {
name: '航线名称',
id: 1,
organizationName: '所属单位',
status: 1 //空域状态 1: 可用 2: 待申请 3: 待审批 4: 通过 5: 驳回
isSafe: 1 //空域状态 1: 安全 2: 待确定
labelName: '航线标签'
} */
];
},
},
},
provide() {
return {
rootNode: this, //根节点实例
bus: new Vue() //bus总线
};
},
watch: {
taskList: {
immediate: true,
handler(newVal) {
this.$store.commit("MMCFlightControlCenter/setState", {
key: "taskList",
value: newVal,
});
},
},
airwayList: {
immediate: true,
handler(newVal) {
this.$store.commit("MMCFlightControlCenter/setState", {
key: "airwayList",
value: newVal,
});
},
},
},
beforeCreate() {
if (!window.$mmc) {
......@@ -110,9 +171,152 @@ export default {
background-color: #182f5c;
}
}
.dialog1027 {
z-index: 1;
.dialog-header {
box-sizing: border-box;
padding-left: 35px;
padding-right: 16px;
background-position: 12px 4px;
height: 32px;
width: 100%;
background: linear-gradient(
180deg,
#9198ff 0%,
rgba(45, 81, 153, 0.45) 40%,
#05091a 100%
);
box-shadow: inset 0px 0px 10px 2px #3f9dff;
border-radius: 10px 10px 0px 0px;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
.dialog-header__icon {
position: absolute;
left: 12px;
top: 50%;
transform: translate(0, -50%);
background-image: url("./assets/images/jinye.png");
background-size: 100% 100%;
width: 19px;
height: 25px;
}
.dialog-header__title {
display: flex;
align-items: center;
font-size: 20px;
font-family: YouSheBiaoTiHei;
background-image: -webkit-linear-gradient(
right,
#e3aa77,
#f5cda9,
#f9ecd3,
#fcdbb1,
#edb07a
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
letter-spacing: 0;
font-weight: 700;
}
.dialog-header__close {
font-size: 14px;
font-family: MicrosoftYaHei;
color: #d2dfff;
line-height: 19px;
cursor: pointer;
}
}
.dialog-content {
background: rgba(12, 34, 73, 0.7);
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border: 1px solid rgba(26, 92, 246, 0.5);
backdrop-filter: blur(1px);
padding: 12px 12px 16px;
width: 100%;
font-size: 14px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #ffffff;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.dialog-content-item {
margin-bottom: 16px;
display: flex;
.dialog-content__label {
padding-top: 7px;
font-size: 14px;
font-family: SourceHanSansCN-Regular, SourceHanSansCN;
font-weight: 400;
color: #ffffff;
width: 110px;
text-align: right;
}
.dialog-content__text {
padding: 6px 12px;
width: 228px;
background: rgba(2, 23, 61, 1);
border-radius: 2px;
border: 1px solid #315ec7;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #00dfff;
line-height: 19px;
}
}
.el-input__inner {
// height: 32px;
background: #02173d !important;
border-radius: 2px;
border: 1px solid #315ec7 !important;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #ffffff;
}
.el-radio {
color: #fff;
}
.el-scrollbar {
background: #02173d !important;
border: 1px solid #315ec7 !important;
}
.el-textarea {
border: none !important;
}
.el-textarea__inner {
background: #02173d !important;
border: 1px solid #315ec7 !important;
}
.btn-box1027 {
padding: 16px 16px;
width: 100%;
}
}
}
}
.mmc {
.popper__arrow::after {
border-bottom-color: #161d2d !important;
}
// 所有下拉选择框样式
&.el-select-dropdown {
border: none !important;
......@@ -153,10 +357,6 @@ export default {
font-weight: 400 !important;
}
.popper__arrow::after {
border-bottom-color: #161d2d !important;
}
.el-scrollbar {
overflow: hidden;
position: relative;
......@@ -171,5 +371,32 @@ export default {
}
}
}
&.el-cascader__dropdown {
border: 1px solid #315ec7 !important;
.el-cascader-menu__list {
background: rgba(9, 32, 87, 1) !important;
max-height: 300px;
max-width: 327px;
}
.el-cascader-node {
background: rgba(9, 32, 87, 1) !important;
color: #00aeff;
}
}
&.el-dialog {
background: transparent;
.el-dialog__header {
padding: 0;
}
.el-dialog__body {
padding: 0;
}
}
}
</style>
\ No newline at end of file
......@@ -27,6 +27,33 @@ export default {
},
cesium3DModels: [], //cesium的3D模型
listCollapse: false, //无人机或盈巢列表是否折叠
// 任务列表
taskList: [
/* {
name: "任务",
id: 1,
children: [],
airway: {
name: "航线名称1",
id: 1,
content:
'{"filename":"肇庆航线20240318","line":{"baseSpeed":3},"content":[{"uuid":"1nmI-Fo18IagbcVJsia7Q","latitude":23.178153411812204,"longitude":112.57807281336807,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"9pTbBPlF8iIwbUNqusyHK","latitude":23.17783116525969,"longitude":112.57797543441967,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"s91IhN22wuaeyG-UQs0XR","latitude":23.17786413506686,"longitude":112.57824336604547,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"xS_JIl3wxQrhMPdpcjcSn","latitude":23.17820934975604,"longitude":112.5781357731637,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]}],"baseSpeed":3,"gimbalYaw":0,"gimbalPitch":0,"alt":100}',
},
}, */
],
// 航线列表
airwayList: [
/* {
name: "航线名称1",
id: 1,
organizationName: "所属单位1",
status: 1, //空域状态 1: 可用 2: 待申请 3: 待审批 4: 通过 5: 驳回
isSafe: 1, //空域状态 1: 安全 2: 待确定
labelName: "航线标签1",
content:
'{"filename":"肇庆航线20240318","line":{"baseSpeed":3},"content":[{"uuid":"1nmI-Fo18IagbcVJsia7Q","latitude":23.178153411812204,"longitude":112.57807281336807,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"9pTbBPlF8iIwbUNqusyHK","latitude":23.17783116525969,"longitude":112.57797543441967,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"s91IhN22wuaeyG-UQs0XR","latitude":23.17786413506686,"longitude":112.57824336604547,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"xS_JIl3wxQrhMPdpcjcSn","latitude":23.17820934975604,"longitude":112.5781357731637,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]}],"baseSpeed":3,"gimbalYaw":0,"gimbalPitch":0,"alt":100}',
}, */
],
},
mutations: {
/**
......
......@@ -414,9 +414,6 @@ const actions = {
topic: "PX4/RECEIVE/" + state.uav.hardId,
callback(ok) {
ok && console.log("mqtt订阅主题", "PX4/RECEIVE/" + state.uav.hardId);
dispatch("createUavModel");
dispatch("createAirline");
dispatch("flyToUavModel");
},
});
} else {
......@@ -424,12 +421,6 @@ const actions = {
"MMCGroundStation/subscribe",
state.uav.hardId
);
// 由于地面站连接没响应数据,1秒后再创建飞机对象
setTimeout(() => {
dispatch("createUavModel");
dispatch("createAirline");
dispatch("flyToUavModel");
}, 1000);
}
},
/**
......
<template>
<div>
<el-form>
<el-switch v-model="devMode" active-text="测试环境" inactive-text="正式环境" @change="onSwitch"></el-switch>
<el-form-item label="账号">
<el-input v-model="account"></el-input>
</el-form-item>
......@@ -14,7 +15,15 @@
<el-button>上左</el-button>
</el-tooltip>
<div style="margin-top: 1080px;">
<MMCFlightControlCenter style="width: 1920px; height: 1080px; position: absolute; left: 0; top: 600px;" v-if="userInfo" :userInfo="userInfo" :devMode="true"></MMCFlightControlCenter>
<MMCFlightControlCenter
style="width: 1920px; height: 1080px; position: absolute; left: 0; top: 600px;"
v-if="userInfo"
:userInfo="userInfo"
:devMode="devMode"
:taskList="taskList"
:airwayList="airwayList"
@startTask="onStartTask"
></MMCFlightControlCenter>
</div>
</div>
</template>
......@@ -26,19 +35,92 @@ export default {
name: "fkzx1",
data() {
return {
baseUrl: "https://test.tmj.mmcuav.cn",
devMode: false,
account: "mmctest@admin",
password: "test@Admin001",
userInfo: null,
taskList: [
{
name: "任务1",
id: 1,
children: [
{
name: "任务2",
id: 2,
// children: [],
airway: {
name: "航线名称2",
id: 2,
},
},
],
airway: {
name: "航线名称1",
id: 1,
content:
'{"filename":"肇庆航线20240318","line":{"baseSpeed":3},"content":[{"uuid":"1nmI-Fo18IagbcVJsia7Q","latitude":23.178153411812204,"longitude":112.57807281336807,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"9pTbBPlF8iIwbUNqusyHK","latitude":23.17783116525969,"longitude":112.57797543441967,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"s91IhN22wuaeyG-UQs0XR","latitude":23.17786413506686,"longitude":112.57824336604547,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"xS_JIl3wxQrhMPdpcjcSn","latitude":23.17820934975604,"longitude":112.5781357731637,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]}],"baseSpeed":3,"gimbalYaw":0,"gimbalPitch":0,"alt":100}',
},
},
{
name: "任务2",
id: 2,
children: [],
airway: {
name: "航线名称2",
id: 2,
content:
'{"filename":"肇庆航线20240318","line":{"baseSpeed":3},"content":[{"uuid":"1nmI-Fo18IagbcVJsia7Q","latitude":23.178153411812204,"longitude":112.57807281336807,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"9pTbBPlF8iIwbUNqusyHK","latitude":23.17783116525969,"longitude":112.57797543441967,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"s91IhN22wuaeyG-UQs0XR","latitude":23.17786413506686,"longitude":112.57824336604547,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"xS_JIl3wxQrhMPdpcjcSn","latitude":23.17820934975604,"longitude":112.5781357731637,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]}],"baseSpeed":3,"gimbalYaw":0,"gimbalPitch":0,"alt":100}',
},
},
],
airwayList: [
{
name: "航线名称1",
id: 1,
organizationName: "所属单位1",
status: 1, //空域状态 1: 可用 2: 待申请 3: 待审批 4: 通过 5: 驳回
isSafe: 1, //空域状态 1: 安全 2: 待确定
labelName: "航线标签1",
content:
'{"filename":"肇庆航线20240318","line":{"baseSpeed":3},"content":[{"uuid":"1nmI-Fo18IagbcVJsia7Q","latitude":23.178153411812204,"longitude":112.57807281336807,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"9pTbBPlF8iIwbUNqusyHK","latitude":23.17783116525969,"longitude":112.57797543441967,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"s91IhN22wuaeyG-UQs0XR","latitude":23.17786413506686,"longitude":112.57824336604547,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"xS_JIl3wxQrhMPdpcjcSn","latitude":23.17820934975604,"longitude":112.5781357731637,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]}],"baseSpeed":3,"gimbalYaw":0,"gimbalPitch":0,"alt":100}',
},
{
name: "航线名称2",
id: 2,
organizationName: "所属单位2",
status: 2, //空域状态 1: 可用 2: 待申请 3: 待审批 4: 通过 5: 驳回
isSafe: 2, //空域状态 1: 安全 2: 待确定
labelName: "航线标签2",
content:
'{"filename":"肇庆航线20240318","line":{"baseSpeed":3},"content":[{"uuid":"1nmI-Fo18IagbcVJsia7Q","latitude":23.178153411812204,"longitude":112.57807281336807,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"9pTbBPlF8iIwbUNqusyHK","latitude":23.17783116525969,"longitude":112.57797543441967,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"s91IhN22wuaeyG-UQs0XR","latitude":23.17786413506686,"longitude":112.57824336604547,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]},{"uuid":"xS_JIl3wxQrhMPdpcjcSn","latitude":23.17820934975604,"longitude":112.5781357731637,"alt":100,"yawAngle":0,"pitchAngle":0,"speed":3,"actions":[]}],"baseSpeed":3,"gimbalYaw":0,"gimbalPitch":0,"alt":100}',
},
],
};
},
computed: {},
async mounted() {},
methods: {
onSwitch() {
if (this.devMode) {
this.account = "mmctest@admin";
this.password = "test@Admin001";
this.baseUrl = "https://test.tmj.mmcuav.cn";
} else {
this.account = "mmcadmin@kbt001";
this.password = "TMJMMC@kbta0227&adm";
this.baseUrl = "https://tmj.mmcuav.cn";
}
},
onStartTask(uav, selectedTask, selectedAirway) {
console.log("一键任务事件", uav, selectedTask, selectedAirway);
// alert("一键任务事件");
},
async login() {
let formData = new FormData();
formData.append("userAccount", this.account);
formData.append("password", Base64.encode(this.password));
let res1 = await fetch("https://test.tmj.mmcuav.cn/crm/login", {
let res1 = await fetch(this.baseUrl + "/crm/login", {
method: "post",
headers: {
// "Content-Type": "multipart/form-data",
......@@ -48,7 +130,7 @@ export default {
let data1 = await res1.json();
if (data1.code == 200) {
await fetch("https://test.tmj.mmcuav.cn/crm/user/platformPermission", {
await fetch(this.baseUrl + "/crm/user/platformPermission", {
method: "get",
headers: {
Token: data1.data.token,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论