|
@@ -477,7 +477,7 @@
|
|
|
><label>{{ item.latitude }}</label>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span>海拔 </span
|
|
|
+ <span>海拔: </span
|
|
|
><label>{{ item.altitude }}</label>
|
|
|
</div>
|
|
|
<div>
|
|
@@ -596,7 +596,12 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div class="demo-drawer__footer">
|
|
|
- <el-button type="danger" @click="canvasInfoDel">删 除</el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ :disabled="this.addOrUpdate == 'add'"
|
|
|
+ @click="canvasInfoDel"
|
|
|
+ >删 除</el-button
|
|
|
+ >
|
|
|
<el-button type="primary" @click="handleDrawerSubmit"
|
|
|
>确 定</el-button
|
|
|
>
|
|
@@ -2300,32 +2305,30 @@ export default {
|
|
|
this.$modal
|
|
|
.confirm("是否确认删除该无人机")
|
|
|
.then(() => {
|
|
|
- // return delTask(bizIds);
|
|
|
this.formationInfoForm = this.ObjectStringToNumber(
|
|
|
this.formationInfoForm
|
|
|
);
|
|
|
let index = this.formationInfoList.findIndex(
|
|
|
(item) => item.number == this.formationInfoForm.number
|
|
|
);
|
|
|
- this.formationInfoList.splice(index, 1);
|
|
|
- this.formationInfoAirDataList = this.formationInfoAirDataList.filter(
|
|
|
- (item) => {
|
|
|
- return item.id !== this.formationInfoForm.number;
|
|
|
- }
|
|
|
- );
|
|
|
- this.formationAirPiXiApp.stage.children.forEach((child, index) => {
|
|
|
- // 检查 child 是否是 Container 类型
|
|
|
- if (child instanceof PIXI.Sprite) {
|
|
|
- if (child.id == this.formationInfoForm.number) {
|
|
|
- if (child.parent) {
|
|
|
- child.parent.removeChild(child);
|
|
|
+ if (index > -1) {
|
|
|
+ this.formationInfoAirDataList =
|
|
|
+ this.formationInfoAirDataList.filter((item) => {
|
|
|
+ return item.id !== this.formationInfoForm.number;
|
|
|
+ });
|
|
|
+ this.formationAirPiXiApp.stage.children.forEach((child, index) => {
|
|
|
+ // 检查 child 是否是 Container 类型
|
|
|
+ if (child instanceof PIXI.Sprite) {
|
|
|
+ if (child.id == this.formationInfoForm.number) {
|
|
|
+ if (child.parent) {
|
|
|
+ child.parent.removeChild(child);
|
|
|
+ }
|
|
|
+ child.destroy();
|
|
|
}
|
|
|
-
|
|
|
- // 可选:销毁精灵并释放资源
|
|
|
- child.destroy();
|
|
|
}
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ this.formationInfoList.splice(index, 1);
|
|
|
+ }
|
|
|
})
|
|
|
.then(() => {
|
|
|
this.drawerOpen = false;
|