|
|
|
@ -89,28 +89,17 @@
|
|
|
|
|
<a-select-option value="noland">全部禁降区</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-select
|
|
|
|
|
v-model:value="areastatus"
|
|
|
|
|
v-model:value="areastate"
|
|
|
|
|
style="width: 120px"
|
|
|
|
|
@change="handleChangeAreaSelect"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option value="all">全部状态</a-select-option>
|
|
|
|
|
<a-select-option value="enable">已启用</a-select-option>
|
|
|
|
|
<a-select-option value="disable">已禁用</a-select-option>
|
|
|
|
|
<a-select-option value="0">已启用</a-select-option>
|
|
|
|
|
<a-select-option value="1">已禁用</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 列表 -->
|
|
|
|
|
<div
|
|
|
|
|
v-for="show in showMenuInfoList"
|
|
|
|
|
:key="show.id"
|
|
|
|
|
@mouseenter="
|
|
|
|
|
show.mouse = true;
|
|
|
|
|
show.deleteClickNum = 0;
|
|
|
|
|
"
|
|
|
|
|
@mouseleave="
|
|
|
|
|
show.mouse = false;
|
|
|
|
|
show.deleteClickNum = 0;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<div v-for="show in showMenuInfoList" :key="show.id">
|
|
|
|
|
<!-- 地图标注 -->
|
|
|
|
|
<div
|
|
|
|
|
v-if="showMenuInfoName == '地图标注'"
|
|
|
|
@ -123,20 +112,31 @@
|
|
|
|
|
? '#393939'
|
|
|
|
|
: '',
|
|
|
|
|
}"
|
|
|
|
|
@mouseenter="
|
|
|
|
|
show.mouse = true;
|
|
|
|
|
show.deleteClickNum = 0;
|
|
|
|
|
"
|
|
|
|
|
@mouseleave="
|
|
|
|
|
show.mouse = false;
|
|
|
|
|
show.deleteClickNum = 0;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<div @click="setNowShowMarkData(show)">
|
|
|
|
|
<AntDesignOutlined v-if="show.resource.type == '0'" />
|
|
|
|
|
<ExpandAltOutlined v-if="show.resource.type == '1'" />
|
|
|
|
|
<BorderOutlined v-if="show.resource.type == '2'" />
|
|
|
|
|
<LogoutOutlined v-if="show.resource.type == '3'" />
|
|
|
|
|
<AntDesignOutlined v-if="show.type == '0'" />
|
|
|
|
|
<ExpandAltOutlined v-if="show.type == '1'" />
|
|
|
|
|
<BorderOutlined v-if="show.type == '2'" />
|
|
|
|
|
<LogoutOutlined v-if="show.type == '3'" />
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
class="eye"
|
|
|
|
|
@click="show.status = !show.status"
|
|
|
|
|
:style="{ background: show.status ? '#2d8cf0' : '#000000' }"
|
|
|
|
|
@click="show.status == 0 ? (show.status = 1) : (show.status = 0)"
|
|
|
|
|
:style="{ background: show.status == 1 ? '#2d8cf0' : '#000000' }"
|
|
|
|
|
>
|
|
|
|
|
<EyeOutlined v-if="show.status" style="color: #ffffff; font-size: 16px" />
|
|
|
|
|
<EyeInvisibleOutlined v-if="!show.status" style="color: #ffffff; font-size: 16px" />
|
|
|
|
|
<EyeOutlined v-if="show.status == 1" style="color: #ffffff; font-size: 16px" />
|
|
|
|
|
<EyeInvisibleOutlined
|
|
|
|
|
v-if="show.status == 0"
|
|
|
|
|
style="color: #ffffff; font-size: 16px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div @click="setNowShowMarkData(show)">{{ show.name }}</div>
|
|
|
|
|
<div class="buttonRight2" v-if="show.mouse">
|
|
|
|
@ -260,33 +260,35 @@
|
|
|
|
|
props.nowShowAreaData && props.nowShowAreaData.id == show.id
|
|
|
|
|
? '2px solid #2D8CF0'
|
|
|
|
|
: '',
|
|
|
|
|
background:
|
|
|
|
|
props.nowShowAreaData && show.status == 'enable' ? '#3c3c3c' : '#3c3c3c55',
|
|
|
|
|
background: props.nowShowAreaData && show.state == 0 ? '#3c3c3c' : '#3c3c3c55',
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
class="name"
|
|
|
|
|
@click="setNowShowAreaData(show)"
|
|
|
|
|
:style="{
|
|
|
|
|
color: show.status == 'enable' ? '#ffffff' : '#ffffff55',
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
{{ show.name }}
|
|
|
|
|
</div>
|
|
|
|
|
<a-tooltip placement="right">
|
|
|
|
|
<template #title> {{ show.name }} </template>
|
|
|
|
|
<div
|
|
|
|
|
class="name"
|
|
|
|
|
@click="setNowShowAreaData(show)"
|
|
|
|
|
:style="{
|
|
|
|
|
color: show.state == 0 ? '#ffffff' : '#ffffff55',
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
{{ show.name }}
|
|
|
|
|
</div>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
<div
|
|
|
|
|
class="type"
|
|
|
|
|
@click="setNowShowAreaData(show)"
|
|
|
|
|
:style="{
|
|
|
|
|
color: show.status == 'enable' ? '#ffffff' : '#ffffff55',
|
|
|
|
|
color: show.state == 0 ? '#ffffff' : '#ffffff55',
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<!-- 自定义限飞区 -->
|
|
|
|
|
<!-- 自定义禁降区 -->
|
|
|
|
|
<div
|
|
|
|
|
v-if="show.type == 'noland'"
|
|
|
|
|
:style="{
|
|
|
|
|
width: '15px',
|
|
|
|
|
height: '15px',
|
|
|
|
|
background: `linear-gradient(to bottom right, transparent 45%, ${show.content.properties.color} 45%, ${show.content.properties.color} 60%, transparent 60%), #ffffff00`,
|
|
|
|
|
background: `linear-gradient(to bottom right, transparent 45%, #FF9900 45%, #FF9900 60%, transparent 60%), #ffffff00`,
|
|
|
|
|
'margin-right': '6px',
|
|
|
|
|
}"
|
|
|
|
|
/>
|
|
|
|
@ -296,27 +298,27 @@
|
|
|
|
|
:style="{
|
|
|
|
|
width: '13px',
|
|
|
|
|
height: '13px',
|
|
|
|
|
outline: `2px solid ${show.content.properties.color}`,
|
|
|
|
|
outline: `2px solid #00FF00`,
|
|
|
|
|
'margin-right': '6px',
|
|
|
|
|
'border-radius': show.content.geometry.type == 'Circle' ? '6.5px' : '0px',
|
|
|
|
|
'border-radius': show.geomtype == 'Circle' ? '6.5px' : '0px',
|
|
|
|
|
}"
|
|
|
|
|
/>
|
|
|
|
|
<!-- 自定义禁降区 -->
|
|
|
|
|
<!-- 自定义限飞区 -->
|
|
|
|
|
<div
|
|
|
|
|
v-if="show.type == 'nfz'"
|
|
|
|
|
:style="{
|
|
|
|
|
width: '13px',
|
|
|
|
|
height: '13px',
|
|
|
|
|
outline: `2px solid ${show.content.properties.color}`,
|
|
|
|
|
background: `${show.content.properties.color}55`,
|
|
|
|
|
outline: `2px solid #FF0000`,
|
|
|
|
|
background: `#FF000055`,
|
|
|
|
|
'margin-right': '6px',
|
|
|
|
|
'border-radius': show.content.geometry.type == 'Circle' ? '6.5px' : '0px',
|
|
|
|
|
'border-radius': show.geomtype == 'Circle' ? '6.5px' : '0px',
|
|
|
|
|
}"
|
|
|
|
|
/>
|
|
|
|
|
<span>{{ getType(show.type) }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="buttonlist">
|
|
|
|
|
<div class="button" v-if="show.status == 'disable'">
|
|
|
|
|
<div class="button" v-if="show.state == 1">
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="将会影响到项目内设备的作业范围,是否启用该区域?"
|
|
|
|
|
ok-text="启用"
|
|
|
|
@ -332,7 +334,7 @@
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="button" v-if="show.status == 'enable'">
|
|
|
|
|
<div class="button" v-if="show.state == 0">
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="将会影响到项目内设备的作业范围,是否禁用该区域?"
|
|
|
|
|
ok-text="禁用"
|
|
|
|
@ -386,7 +388,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { ref } from 'vue';
|
|
|
|
|
import { ref, watch } from 'vue';
|
|
|
|
|
import {
|
|
|
|
|
CloseOutlined,
|
|
|
|
|
AntDesignOutlined,
|
|
|
|
@ -405,6 +407,12 @@
|
|
|
|
|
CheckCircleOutlined,
|
|
|
|
|
StopOutlined,
|
|
|
|
|
} from '@ant-design/icons-vue';
|
|
|
|
|
import {
|
|
|
|
|
GetWorkAreaList,
|
|
|
|
|
AddWorkArea,
|
|
|
|
|
UpdateWorkArea,
|
|
|
|
|
DeleteWorkArea,
|
|
|
|
|
} from '@/api/demo/mediaLibrary';
|
|
|
|
|
import { cloneDeep } from 'lodash-es';
|
|
|
|
|
import { useMessage } from '@/hooks/web/useMessage';
|
|
|
|
|
const { createMessage, createConfirm } = useMessage();
|
|
|
|
@ -427,14 +435,13 @@
|
|
|
|
|
'setNowShowMarkData',
|
|
|
|
|
'setNowShowImageData',
|
|
|
|
|
'setNowShowAreaData',
|
|
|
|
|
'setAllAreaData',
|
|
|
|
|
'deleteMark',
|
|
|
|
|
'deleteArea',
|
|
|
|
|
]);
|
|
|
|
|
const showMenuInfoList = ref(props.allMarkDataList);
|
|
|
|
|
const showMenuInfoName = ref('地图标注');
|
|
|
|
|
function updateShowMenuInfoList(type) {
|
|
|
|
|
console.log(type);
|
|
|
|
|
|
|
|
|
|
if (type == '地图标注') {
|
|
|
|
|
showMenuInfoList.value = props.allMarkDataList;
|
|
|
|
|
}
|
|
|
|
@ -473,7 +480,7 @@
|
|
|
|
|
// 地图作业区域-------------------------------------------------
|
|
|
|
|
// 地图作业区域-单选
|
|
|
|
|
const areatype = ref('all');
|
|
|
|
|
const areastatus = ref('all');
|
|
|
|
|
const areastate = ref('all');
|
|
|
|
|
// 地图作业区域-获取类别区分
|
|
|
|
|
function getType(type) {
|
|
|
|
|
let name = '';
|
|
|
|
@ -497,24 +504,49 @@
|
|
|
|
|
if (areatype.value !== 'all') {
|
|
|
|
|
filterAreaData = filterAreaData.filter((item) => item.type == areatype.value);
|
|
|
|
|
}
|
|
|
|
|
if (areastatus.value !== 'all') {
|
|
|
|
|
filterAreaData = filterAreaData.filter((item) => item.status == areastatus.value);
|
|
|
|
|
if (areastate.value !== 'all') {
|
|
|
|
|
filterAreaData = filterAreaData.filter((item) => item.state == areastate.value);
|
|
|
|
|
}
|
|
|
|
|
filterAfterAreaDataList.value = filterAreaData;
|
|
|
|
|
showMenuInfoList.value = filterAfterAreaDataList.value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 地图作业区域-启用该区域
|
|
|
|
|
function enableThisArea(value) {
|
|
|
|
|
setNowShowAreaData({
|
|
|
|
|
...value,
|
|
|
|
|
status: 'enable',
|
|
|
|
|
state: 0,
|
|
|
|
|
});
|
|
|
|
|
UpdateWorkArea({
|
|
|
|
|
...value,
|
|
|
|
|
// id: value.id,
|
|
|
|
|
// name: value.name,
|
|
|
|
|
// type: value.type,
|
|
|
|
|
properties: JSON.stringify(value.properties),
|
|
|
|
|
// geom: value.geom,
|
|
|
|
|
// workSpaceId: '1',
|
|
|
|
|
state: 0,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
emits('setAllAreaData');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 地图作业区域-禁用该区域
|
|
|
|
|
function disableThisArea(value) {
|
|
|
|
|
setNowShowAreaData({
|
|
|
|
|
...value,
|
|
|
|
|
status: 'disable',
|
|
|
|
|
state: 1,
|
|
|
|
|
});
|
|
|
|
|
UpdateWorkArea({
|
|
|
|
|
// id: value.id,
|
|
|
|
|
// name: value.name,
|
|
|
|
|
// type: value.type,
|
|
|
|
|
...value,
|
|
|
|
|
properties: JSON.stringify(value.properties),
|
|
|
|
|
// geom: value.geom,
|
|
|
|
|
// workSpaceId: '1',
|
|
|
|
|
state: 1,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
emits('setAllAreaData');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// 地图作业区域-删除此区域
|
|
|
|
@ -538,52 +570,51 @@
|
|
|
|
|
// ------------------------------------------------------------------
|
|
|
|
|
// 移动到中心位置
|
|
|
|
|
function handlerLocation(position) {
|
|
|
|
|
if (showMenuInfoName.value == '地图标注') {
|
|
|
|
|
let coordinates = position.resource.content.geometry.coordinates;
|
|
|
|
|
switch (position.resource.type) {
|
|
|
|
|
case 0:
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: coordinates[0],
|
|
|
|
|
lat: coordinates[1],
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case 1:
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: coordinates[0][0],
|
|
|
|
|
lat: coordinates[0][1],
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: coordinates[0][0][0],
|
|
|
|
|
lat: coordinates[0][0][1],
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: coordinates[0],
|
|
|
|
|
lat: coordinates[1],
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (showMenuInfoName.value == '地图照片') {
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: position.photo_position.lng,
|
|
|
|
|
lat: position.photo_position.lat,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// if (showMenuInfoName.value == '地图标注') {
|
|
|
|
|
// let coordinates = position.coordinates;
|
|
|
|
|
// switch (position.type) {
|
|
|
|
|
// case 0:
|
|
|
|
|
// emits('handlerLocation', {
|
|
|
|
|
// lng: coordinates[0],
|
|
|
|
|
// lat: coordinates[1],
|
|
|
|
|
// });
|
|
|
|
|
// break;
|
|
|
|
|
// case 1:
|
|
|
|
|
// emits('handlerLocation', {
|
|
|
|
|
// lng: coordinates[0][0],
|
|
|
|
|
// lat: coordinates[0][1],
|
|
|
|
|
// });
|
|
|
|
|
// break;
|
|
|
|
|
// case 2:
|
|
|
|
|
// emits('handlerLocation', {
|
|
|
|
|
// lng: coordinates[0][0][0],
|
|
|
|
|
// lat: coordinates[0][0][1],
|
|
|
|
|
// });
|
|
|
|
|
// break;
|
|
|
|
|
// case 3:
|
|
|
|
|
// emits('handlerLocation', {
|
|
|
|
|
// lng: coordinates[0],
|
|
|
|
|
// lat: coordinates[1],
|
|
|
|
|
// });
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (showMenuInfoName.value == '地图照片') {
|
|
|
|
|
// emits('handlerLocation', {
|
|
|
|
|
// lng: position.photo_position.lng,
|
|
|
|
|
// lat: position.photo_position.lat,
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
if (showMenuInfoName.value == '地图作业区域') {
|
|
|
|
|
let coordinates = position.content.geometry.coordinates;
|
|
|
|
|
if (position.content.geometry.type == 'Circle') {
|
|
|
|
|
if (position.geomtype == 'Circle') {
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: coordinates[0],
|
|
|
|
|
lat: coordinates[1],
|
|
|
|
|
lng: position.properties.centerPoint[0],
|
|
|
|
|
lat: position.properties.centerPoint[1],
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
emits('handlerLocation', {
|
|
|
|
|
lng: coordinates[0][0][0],
|
|
|
|
|
lat: coordinates[0][0][1],
|
|
|
|
|
lng: position.properties.centerPoint[0],
|
|
|
|
|
lat: position.properties.centerPoint[1],
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -785,8 +816,12 @@
|
|
|
|
|
left: 6px;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
width: 240px;
|
|
|
|
|
height: 29px;
|
|
|
|
|
width: 90%;
|
|
|
|
|
height: 30px;
|
|
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
}
|
|
|
|
|
.type {
|
|
|
|
|
position: absolute;
|
|
|
|
|