|
|
|
|
@ -6,13 +6,13 @@
|
|
|
|
|
<div class="clue-information-containers">
|
|
|
|
|
|
|
|
|
|
<!-- 左侧列表 -->
|
|
|
|
|
<div class="left-container">
|
|
|
|
|
<div class="left-container" ref="container">
|
|
|
|
|
|
|
|
|
|
<!-- item 1 -->
|
|
|
|
|
<div class="clue-item" v-for="(item,index) in listItem" :key="index">
|
|
|
|
|
<!-- 项目 -->
|
|
|
|
|
<div class="clue-item" v-for="(item,index) in listItem" :key="index" @click="handlerShowInfo($event,item)">
|
|
|
|
|
|
|
|
|
|
<!-- 内容 -->
|
|
|
|
|
<div class="clue-item-information" @click="handlerShowInfo(item)">
|
|
|
|
|
<div class="clue-item-information" >
|
|
|
|
|
<div class="icon">
|
|
|
|
|
<img v-if="item.state == 1" :src="'/public/components/Task/taskassign/'+item.icon+'-active.png'" alt="">
|
|
|
|
|
<img v-else :src="'/public/components/Task/taskassign/'+item.icon+'.png'" alt="">
|
|
|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
<!-- 时间线 -->
|
|
|
|
|
<div class="item-liner">
|
|
|
|
|
<div class="left-line" v-if="index > 0"></div>
|
|
|
|
|
<div class="point" @click="handlerShowInfo(item)"></div>
|
|
|
|
|
<div class="point" ></div>
|
|
|
|
|
<div class="right-line" v-if="index < listItem.length-1"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@ -35,55 +35,58 @@
|
|
|
|
|
{{item.time}}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 点击弹窗 -->
|
|
|
|
|
<div class="verify-container" v-if="item.checked"
|
|
|
|
|
:style="{'background-image': item.state == 1 ? 'url(/public/components/Task/taskassign/detail-bg-active.png)' : 'url(/public/components/Task/taskassign/detail-bg.png)'}"
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 点击弹窗 -->
|
|
|
|
|
<div class="verify-container" v-if="currentTimeNode.checked"
|
|
|
|
|
:style="{
|
|
|
|
|
'background-image': currentTimeNode.state == 1 ? 'url(/public/components/Task/taskassign/detail-bg-active.png)' : 'url(/public/components/Task/taskassign/detail-bg.png)',
|
|
|
|
|
'left': (clickX-212)+'px'
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<div class="title"
|
|
|
|
|
:style="{
|
|
|
|
|
'background': currentTimeNode.state == 1 ? 'linear-gradient( 270deg, #271410 0%, #740B09 47%, #CC0101 100%)' : 'linear-gradient( 270deg, #0A261E 0%, #15AF3F 47%, #17B241 100%)',
|
|
|
|
|
'border-left': currentTimeNode.state == 1 ? '3px solid #F02626' : '3px solid #20C24D'
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
<div class="title"
|
|
|
|
|
:style="{
|
|
|
|
|
'background': item.state == 1 ? 'linear-gradient( 270deg, #271410 0%, #740B09 47%, #CC0101 100%)' : 'linear-gradient( 270deg, #0A261E 0%, #15AF3F 47%, #17B241 100%)',
|
|
|
|
|
'border-left':item.state == 1 ? '3px solid #F02626' : '3px solid #20C24D'
|
|
|
|
|
}"
|
|
|
|
|
>
|
|
|
|
|
{{item.name}}
|
|
|
|
|
<div class="close-button" @click="handlerCloseInfo(item)">
|
|
|
|
|
<img v-if="item.state == 1" src="/public/components/Task/taskassign/close-active.png" alt="">
|
|
|
|
|
<img v-else src="/public/components/Task/taskassign/close.png" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{currentTimeNode.name}}
|
|
|
|
|
<div class="close-button" @click="handlerCloseInfo(currentTimeNode)">
|
|
|
|
|
<img v-if="currentTimeNode.state == 1" src="/public/components/Task/taskassign/close-active.png" alt="">
|
|
|
|
|
<img v-else src="/public/components/Task/taskassign/close.png" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 图片 -->
|
|
|
|
|
<div class="image-container"
|
|
|
|
|
:style="{'border': item.state == 1 ? '2px solid rgba(240, 38, 38, 1)' : '2px solid #20C24D'}"
|
|
|
|
|
>
|
|
|
|
|
<a-carousel autoplay dots-class="slick-dots slick-thumb" preview-disabled v-if="imageLoading" style="height:100px;">
|
|
|
|
|
<div v-for="item in handlerAfterImageList" style="height:100px;">
|
|
|
|
|
<a-image :src="item" style="height:210px;" />
|
|
|
|
|
</div>
|
|
|
|
|
</a-carousel>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 内容 -->
|
|
|
|
|
<div class="description-container">
|
|
|
|
|
<div class="description-item" v-for="(item,index) in detailInfo" :key="index">
|
|
|
|
|
<div class="label">{{item.label}}</div>
|
|
|
|
|
<div class="value">{{item.value}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 图片 -->
|
|
|
|
|
<div class="image-container"
|
|
|
|
|
:style="{'border': currentTimeNode.state == 1 ? '2px solid rgba(240, 38, 38, 1)' : '2px solid #20C24D'}"
|
|
|
|
|
>
|
|
|
|
|
<a-carousel autoplay dots-class="slick-dots slick-thumb" preview-disabled v-if="imageLoading" style="height:100px;">
|
|
|
|
|
<div v-for="currentTimeNode in handlerAfterImageList" style="height:100px;">
|
|
|
|
|
<a-image :src="currentTimeNode" style="height:210px;" />
|
|
|
|
|
</div>
|
|
|
|
|
</a-carousel>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 内容 -->
|
|
|
|
|
<div class="description-container">
|
|
|
|
|
<div class="description-item" v-for="(item,index) in detailInfo" :key="index">
|
|
|
|
|
<div class="label">{{item.label}}</div>
|
|
|
|
|
<div class="value">{{item.value}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 右侧添加项目 -->
|
|
|
|
|
<div class="right-container">
|
|
|
|
|
<div class="add-item-container" @click="methodsShow = true;"></div>
|
|
|
|
|
<div class="add-item-container" @click="methodsShow = !methodsShow;"></div>
|
|
|
|
|
<div class="add-item-text">操作</div>
|
|
|
|
|
<div class="methods-container" v-if="methodsShow">
|
|
|
|
|
|
|
|
|
|
<div class="methods-item" v-for="(item,index) in methods" :key="index" @click="item.icon == 'response' ? clickBtn(item) : selectMethods(item);">
|
|
|
|
|
<div class="methods-item" v-for="(item,index) in methods" :key="index" @click="selectMethods(item)">
|
|
|
|
|
<div class="icon">
|
|
|
|
|
<img :src="'/public/components/Task/taskassign/methods-'+item.icon+'.png'" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
@ -361,28 +364,20 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 视频监控 -->
|
|
|
|
|
<div class="hkversion-video-container" v-drag v-if="hikversionShow">
|
|
|
|
|
<div class="hkversion-video-container" v-if="hikversionShow">
|
|
|
|
|
<div class="title">视频监控
|
|
|
|
|
<div class="close-button" @click="hikversionShow = false">
|
|
|
|
|
<img src="/public/components/Task/taskassign/close.png" alt="" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="ai-control">
|
|
|
|
|
<div class="no-picture" v-if="true">
|
|
|
|
|
<!-- <div class="no-picture" v-if="true">
|
|
|
|
|
<img src="@/assets/images/chart/uav/no-picture.png" alt="" />
|
|
|
|
|
<span>暂无画面 请您耐心等待</span>
|
|
|
|
|
<span>......</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="player" style="height: 200px" v-else>
|
|
|
|
|
<video
|
|
|
|
|
id="player-container-id-live"
|
|
|
|
|
|
|
|
|
|
height="200"
|
|
|
|
|
preload="auto"
|
|
|
|
|
playsinline
|
|
|
|
|
webkit-playsinline
|
|
|
|
|
>
|
|
|
|
|
</video>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="player" style="height: 200px" v-if="hikversionShow">
|
|
|
|
|
<HKMonitor :videourl="playerUrl" :index="1" :width="360" :height="240" :timestamp="1" :nowFullScreenVideo="false"></HKMonitor>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -412,7 +407,9 @@
|
|
|
|
|
import TCPlayer from 'tcplayer.js';
|
|
|
|
|
import 'tcplayer.js/dist/tcplayer.min.css'; //引入插件和样式文件
|
|
|
|
|
import { listDronePort, saveHandFlyTask, endHandFlyTask, endAiInspection } from '@/api/situation';
|
|
|
|
|
import drag from './drag.ts'
|
|
|
|
|
import drag from './drag.ts';
|
|
|
|
|
import HKMonitor from './video/HKMonitor.vue';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var { VITE_GLOB_API_URL } = getAppEnvConfig();
|
|
|
|
|
|
|
|
|
|
@ -524,7 +521,42 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 时间线左右滑动
|
|
|
|
|
function handlerTimeLineScroll(){
|
|
|
|
|
const el = container.value
|
|
|
|
|
let isDown = false
|
|
|
|
|
let startX
|
|
|
|
|
let scrollLeft
|
|
|
|
|
|
|
|
|
|
el.addEventListener('mousedown', (e) => {
|
|
|
|
|
isDown = true
|
|
|
|
|
el.classList.add('active')
|
|
|
|
|
startX = e.pageX - el.offsetLeft
|
|
|
|
|
scrollLeft = el.scrollLeft
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
el.addEventListener('mouseleave', () => {
|
|
|
|
|
isDown = false
|
|
|
|
|
el.classList.remove('active')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
el.addEventListener('mouseup', () => {
|
|
|
|
|
isDown = false
|
|
|
|
|
el.classList.remove('active')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
el.addEventListener('mousemove', (e) => {
|
|
|
|
|
if (!isDown) return
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
const x = e.pageX - el.offsetLeft
|
|
|
|
|
const walk = (x - startX) * 1.5 // 拖动速度倍数
|
|
|
|
|
el.scrollLeft = scrollLeft - walk
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
|
|
|
|
// 时间线左右滑动
|
|
|
|
|
handlerTimeLineScroll();
|
|
|
|
|
// 组件通信
|
|
|
|
|
|
|
|
|
|
// console.log("bindEvents333",props.chartConfig.id + 'dataupdate')
|
|
|
|
|
@ -664,6 +696,11 @@
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
onUnmounted(()=>{
|
|
|
|
|
monitorGraphicLayer ? monitorGraphicLayer.clear() : null;
|
|
|
|
|
userGraphicLayer ? userGraphicLayer.clear() : null;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
window.clearInterval(timer);
|
|
|
|
|
destroySeizeConnection();
|
|
|
|
|
@ -704,7 +741,6 @@
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
const selectMethods = (item) => {
|
|
|
|
|
|
|
|
|
|
switch(item.icon){
|
|
|
|
|
case "monitor":
|
|
|
|
|
handlerGetNearByMonitor(item);
|
|
|
|
|
@ -727,7 +763,7 @@
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "response":
|
|
|
|
|
clickBtn(item);
|
|
|
|
|
changeButton("应急响应")
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -738,22 +774,30 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 点击时间线节点获取详情
|
|
|
|
|
const handlerShowInfo = (item) => {
|
|
|
|
|
|
|
|
|
|
const container = ref(null);
|
|
|
|
|
|
|
|
|
|
const currentTimeNode = ref({})
|
|
|
|
|
|
|
|
|
|
const clickX = ref(0);
|
|
|
|
|
|
|
|
|
|
const handlerShowInfo = (event,item) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detailInfo.value = item.showInfo;
|
|
|
|
|
|
|
|
|
|
const parentRect = container.value.getBoundingClientRect() // 父容器位置
|
|
|
|
|
clickX.value = event.clientX - parentRect.left // 相对父容器的 X 坐标
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
listItem.value.forEach((item,index)=>{
|
|
|
|
|
item.checked = false;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
switch(item.icon){
|
|
|
|
|
case 'monitor':
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
case 'verify':
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
item.checked = true;
|
|
|
|
|
|
|
|
|
|
currentTimeNode.value = item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 关闭
|
|
|
|
|
@ -791,17 +835,6 @@
|
|
|
|
|
let data = res.data.result[0];
|
|
|
|
|
clueInfo.value = data;
|
|
|
|
|
|
|
|
|
|
let timeLineInfo = {
|
|
|
|
|
name:"初始线索",
|
|
|
|
|
icon:"monitor",
|
|
|
|
|
checked:false,
|
|
|
|
|
time:clueInfo.value.reportTime,
|
|
|
|
|
state:1,
|
|
|
|
|
info:clueInfo.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
listItem.value.push(timeLineInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取任务列表
|
|
|
|
|
handlerGetTaskList();
|
|
|
|
|
@ -826,6 +859,18 @@
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
let timeLineInfo = {
|
|
|
|
|
name:"初始线索",
|
|
|
|
|
icon:"monitor",
|
|
|
|
|
checked:false,
|
|
|
|
|
time:clueInfo.value.reportTime,
|
|
|
|
|
state:1,
|
|
|
|
|
info:clueInfo.value,
|
|
|
|
|
showInfo:detailInfo.value,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
listItem.value.push(timeLineInfo);
|
|
|
|
|
|
|
|
|
|
let imageList = [];
|
|
|
|
|
|
|
|
|
|
if(data.image.match(",")){
|
|
|
|
|
@ -908,7 +953,9 @@
|
|
|
|
|
// 获取任务列表
|
|
|
|
|
const handlerGetTaskList = () => {
|
|
|
|
|
let sql = `
|
|
|
|
|
SELECT "Id","Content","Lng","Lat","Address","State","TaskTime","Image","ActOn" from fm_firecluetask where "Fireclueid" = '${clueInfo.value.id}' ORDER BY "TaskTime"
|
|
|
|
|
SELECT "Id","Content","Lng","Lat","Address","State","TaskTime","Image","ActOn"
|
|
|
|
|
from fm_firecluetask where "Fireclueid" = '${clueInfo.value.id}' AND "State" IN (2,3)
|
|
|
|
|
ORDER BY "TaskTime"
|
|
|
|
|
`;
|
|
|
|
|
axios.post(VITE_GLOB_API_URL+'/api/FireResources/GetDataBySql',{
|
|
|
|
|
sql:sql
|
|
|
|
|
@ -918,13 +965,35 @@
|
|
|
|
|
data.forEach((item,index)=>{
|
|
|
|
|
|
|
|
|
|
let method = getMethodsInfo(item.actOn);
|
|
|
|
|
|
|
|
|
|
let showInfo = [
|
|
|
|
|
{
|
|
|
|
|
label:"线索描述",
|
|
|
|
|
key:"Content",
|
|
|
|
|
value:item.content,
|
|
|
|
|
},{
|
|
|
|
|
label:"线索位置",
|
|
|
|
|
key:"Address",
|
|
|
|
|
value:item.address,
|
|
|
|
|
},{
|
|
|
|
|
label:"线索来源",
|
|
|
|
|
key:"sourceType",
|
|
|
|
|
value:item.sourceType,
|
|
|
|
|
},{
|
|
|
|
|
label:"上报时间",
|
|
|
|
|
key:"reportTime",
|
|
|
|
|
value:item.reportTime,
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
let timeLineInfo = {
|
|
|
|
|
name:method?.name,
|
|
|
|
|
icon:method?.icon,
|
|
|
|
|
checked:false,
|
|
|
|
|
time:item.taskTime,
|
|
|
|
|
state:item.state,
|
|
|
|
|
info:item
|
|
|
|
|
info:item,
|
|
|
|
|
showInfo:showInfo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
listItem.value.push(timeLineInfo)
|
|
|
|
|
@ -968,7 +1037,13 @@
|
|
|
|
|
// 附近视频监控
|
|
|
|
|
|
|
|
|
|
const hikversionShow = ref(false);
|
|
|
|
|
const playerUrl = ref(null);
|
|
|
|
|
|
|
|
|
|
let monitorGraphicLayer:mars3d.layer.GraphicLayer;
|
|
|
|
|
|
|
|
|
|
function handlerGetNearByMonitor(item){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
axios({
|
|
|
|
|
method: "get",
|
|
|
|
|
url: VITE_GLOB_API_URL + '/api/Camera/ListCameraWithInRange',
|
|
|
|
|
@ -991,6 +1066,14 @@
|
|
|
|
|
})
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(monitorGraphicLayer){
|
|
|
|
|
monitorGraphicLayer.clear();
|
|
|
|
|
}else{
|
|
|
|
|
monitorGraphicLayer = new mars3d.layer.GraphicLayer({ id: 10086 });
|
|
|
|
|
window.globalMap.addLayer(monitorGraphicLayer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data.forEach((item,index)=>{
|
|
|
|
|
let graphic = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
@ -1024,19 +1107,11 @@
|
|
|
|
|
|
|
|
|
|
graphic.on(mars3d.EventType.click, function (event: any) {
|
|
|
|
|
var data = event.graphic.options.attr;
|
|
|
|
|
|
|
|
|
|
playerUrl.value = data.SerialNumber;
|
|
|
|
|
hikversionShow.value = true;
|
|
|
|
|
// 更新详情弹窗信息
|
|
|
|
|
// let bindEvents = props.chartConfig.events.interactConfigEvents;
|
|
|
|
|
|
|
|
|
|
// for (let i = 0; i < bindEvents.length; i++) {
|
|
|
|
|
// for (let j = 0; j < bindEvents[i].movementList.length; j++) {
|
|
|
|
|
// EventBus.emit(bindEvents[i].movementList[j].elementId[j] + 'graphic', data);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.globalMap.graphicLayer.addGraphic(graphic);
|
|
|
|
|
monitorGraphicLayer.addGraphic(graphic);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -1051,85 +1126,91 @@
|
|
|
|
|
|
|
|
|
|
function handlerUavVerify(item){
|
|
|
|
|
|
|
|
|
|
clueInfo.value.lng = 118.295196;
|
|
|
|
|
clueInfo.value.lat = 35.13456;
|
|
|
|
|
|
|
|
|
|
// 指点飞行位置
|
|
|
|
|
pointData.value = {
|
|
|
|
|
_lng:parseFloat(clueInfo.value.lng),
|
|
|
|
|
_lat:parseFloat(clueInfo.value.lat),
|
|
|
|
|
_alt:window.globalMap.getHeight([parseFloat(clueInfo.value.lng),parseFloat(clueInfo.value.lat)])+100
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// listDronePort({
|
|
|
|
|
// lng: clueInfo.value.lng,
|
|
|
|
|
// lat: clueInfo.value.lat
|
|
|
|
|
// }).then((res) => {
|
|
|
|
|
|
|
|
|
|
// airPortStoreVal.setAirPort('sn', res[0].droneportsn);
|
|
|
|
|
// airPortStoreVal.setUAV('sn', res[0].Sn);
|
|
|
|
|
// airPortStoreVal.setGateway(res[0].GateWay);
|
|
|
|
|
// applyDroneControl({ dronePortSn: res[0].droneportsn }).then((res) => {
|
|
|
|
|
// droneData.value = res;
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
|
|
|
|
|
// try{
|
|
|
|
|
// // 执行飞行
|
|
|
|
|
// execute();
|
|
|
|
|
// ElMessage({
|
|
|
|
|
// message:"操作成功!",
|
|
|
|
|
// type: 'success',
|
|
|
|
|
// })
|
|
|
|
|
// }catch(e){
|
|
|
|
|
// ElMessage({
|
|
|
|
|
// message: "操作失败!",
|
|
|
|
|
// type: 'error',
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// createConnection();
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// // 接收消息
|
|
|
|
|
// getClient().on('message', (topic, message) => {
|
|
|
|
|
// const rs = JSON.parse(message);
|
|
|
|
|
// console.log('接收消息', rs);
|
|
|
|
|
|
|
|
|
|
// if (rs.method === 'takeoff_to_point' && rs.bid == bid) {
|
|
|
|
|
// if (rs.data.result == 0) {
|
|
|
|
|
// createMessage.success('一键起飞成功');
|
|
|
|
|
// // 关联任务
|
|
|
|
|
// saveHandFlyTask({
|
|
|
|
|
// flightId: airPortStoreVal.getFlightId,
|
|
|
|
|
// workspaceId: airPortStoreVal.getProject,
|
|
|
|
|
// }).then((res) => {
|
|
|
|
|
// if (res) {
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
// airPortStoreVal.setTaskId(res.taskId);
|
|
|
|
|
// }, 1000);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// createMessage.error('一键起飞失败,' + errorName(rs.data.result));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// // 指点飞行
|
|
|
|
|
// if (rs.method == 'fly_to_point' && rs.bid == bid) {
|
|
|
|
|
// if (rs.data.result == 0) {
|
|
|
|
|
// createMessage.success('指点飞行成功');
|
|
|
|
|
// } else {
|
|
|
|
|
// createMessage.error('指点飞行失败,' + errorName(rs.data.result));
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// }, 1000);
|
|
|
|
|
// }, 500);
|
|
|
|
|
// });
|
|
|
|
|
// 指点飞行位置
|
|
|
|
|
pointData.value = {
|
|
|
|
|
_lng:parseFloat(clueInfo.value.lng),
|
|
|
|
|
_lat:parseFloat(clueInfo.value.lat),
|
|
|
|
|
_alt:window.globalMap.getHeight([parseFloat(clueInfo.value.lng),parseFloat(clueInfo.value.lat)])+100
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
alert(JSON.stringify(pointData.value));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 下发任务
|
|
|
|
|
// handlerTask(3);
|
|
|
|
|
listDronePort({
|
|
|
|
|
lng: clueInfo.value.lng,
|
|
|
|
|
lat: clueInfo.value.lat
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
|
|
|
|
|
airPortStoreVal.setAirPort('sn', res[0].droneportsn);
|
|
|
|
|
airPortStoreVal.setUAV('sn', res[0].Sn);
|
|
|
|
|
airPortStoreVal.setGateway(res[0].GateWay);
|
|
|
|
|
|
|
|
|
|
console.log("res",res);
|
|
|
|
|
debugger;
|
|
|
|
|
|
|
|
|
|
applyDroneControl({ dronePortSn: res[0].droneportsn }).then((res) => {
|
|
|
|
|
droneData.value = res;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
// 执行飞行
|
|
|
|
|
execute();
|
|
|
|
|
ElMessage({
|
|
|
|
|
message:"操作成功!",
|
|
|
|
|
type: 'success',
|
|
|
|
|
})
|
|
|
|
|
}catch(e){
|
|
|
|
|
ElMessage({
|
|
|
|
|
message: "操作失败!",
|
|
|
|
|
type: 'error',
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
createConnection();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// 接收消息
|
|
|
|
|
getClient().on('message', (topic, message) => {
|
|
|
|
|
const rs = JSON.parse(message);
|
|
|
|
|
console.log('接收消息', rs);
|
|
|
|
|
|
|
|
|
|
if (rs.method === 'takeoff_to_point' && rs.bid == bid) {
|
|
|
|
|
if (rs.data.result == 0) {
|
|
|
|
|
createMessage.success('一键起飞成功');
|
|
|
|
|
// 关联任务
|
|
|
|
|
saveHandFlyTask({
|
|
|
|
|
flightId: airPortStoreVal.getFlightId,
|
|
|
|
|
workspaceId: airPortStoreVal.getProject,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
if (res) {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
airPortStoreVal.setTaskId(res.taskId);
|
|
|
|
|
}, 1000);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.error('一键起飞失败,' + errorName(rs.data.result));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 指点飞行
|
|
|
|
|
if (rs.method == 'fly_to_point' && rs.bid == bid) {
|
|
|
|
|
if (rs.data.result == 0) {
|
|
|
|
|
createMessage.success('指点飞行成功');
|
|
|
|
|
} else {
|
|
|
|
|
createMessage.error('指点飞行失败,' + errorName(rs.data.result));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}, 1000);
|
|
|
|
|
}, 500);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 下发任务
|
|
|
|
|
// handlerTask(3);
|
|
|
|
|
|
|
|
|
|
let graphic = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
position: [118.29662,35.134548],
|
|
|
|
|
@ -1163,10 +1244,19 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 人员核查
|
|
|
|
|
let userGraphicLayer:mars3d.layer.GraphicLayer;
|
|
|
|
|
|
|
|
|
|
function handlerUserVerify(item){
|
|
|
|
|
|
|
|
|
|
handlerTask(1);
|
|
|
|
|
|
|
|
|
|
if(userGraphicLayer){
|
|
|
|
|
userGraphicLayer.clear();
|
|
|
|
|
}else{
|
|
|
|
|
userGraphicLayer = new mars3d.layer.GraphicLayer({ id: 10086 });
|
|
|
|
|
window.globalMap.addLayer(userGraphicLayer);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let graphic = new mars3d.graphic.BillboardEntity({
|
|
|
|
|
position: [118.034137,35.424721],
|
|
|
|
|
attr: item,
|
|
|
|
|
@ -1188,7 +1278,7 @@
|
|
|
|
|
console.log('点击了人员', data);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.globalMap.graphicLayer.addGraphic(graphic);
|
|
|
|
|
userGraphicLayer.addGraphic(graphic);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 下发任务
|
|
|
|
|
@ -1238,18 +1328,11 @@
|
|
|
|
|
// 关闭线索
|
|
|
|
|
function handlerCloseClue(item){
|
|
|
|
|
|
|
|
|
|
console.log(chartEditStore.getComponentList,
|
|
|
|
|
props.chartConfig.events.interactConfigEvents,)
|
|
|
|
|
changeButton("关闭线索")
|
|
|
|
|
|
|
|
|
|
debugger;
|
|
|
|
|
eventHandlerHook(
|
|
|
|
|
chartEditStore.getComponentList,
|
|
|
|
|
props.chartConfig.events.interactConfigEvents,
|
|
|
|
|
'click',
|
|
|
|
|
item,
|
|
|
|
|
);
|
|
|
|
|
monitorGraphicLayer ? monitorGraphicLayer.clear() : null;
|
|
|
|
|
userGraphicLayer ? userGraphicLayer.clear() : null;
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let submitForm = {
|
|
|
|
|
@ -1284,6 +1367,15 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const changeButton = (type) => {
|
|
|
|
|
eventHandlerHook(
|
|
|
|
|
chartEditStore.getComponentList,
|
|
|
|
|
props.chartConfig.events.interactConfigEvents[type],
|
|
|
|
|
'click',
|
|
|
|
|
type,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////
|
|
|
|
|
const airPortStoreVal = airPortStore();
|
|
|
|
|
@ -1428,7 +1520,7 @@
|
|
|
|
|
{
|
|
|
|
|
latitude: Number(pointData.value._lat),
|
|
|
|
|
longitude: Number(pointData.value._lng),
|
|
|
|
|
height: Number(pointData.value._alt) + 100,
|
|
|
|
|
height: Number(pointData.value._alt),
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
@ -1771,6 +1863,10 @@
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
transform: translateZ(0);
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
width: 16px;
|
|
|
|
|
}
|
|
|
|
|
@ -1793,8 +1889,12 @@
|
|
|
|
|
.left-container{
|
|
|
|
|
flex:auto;
|
|
|
|
|
display:flex;
|
|
|
|
|
justify-content: center; /* 水平居中 */
|
|
|
|
|
padding:20px;
|
|
|
|
|
overflow-x:auto;
|
|
|
|
|
-webkit-user-select: none;
|
|
|
|
|
-moz-user-select: none;
|
|
|
|
|
-ms-user-select: none;
|
|
|
|
|
user-select: none;
|
|
|
|
|
.clue-item{
|
|
|
|
|
flex:1;
|
|
|
|
|
flex: 0 0 calc(30% - 40px);
|
|
|
|
|
@ -1916,8 +2016,8 @@
|
|
|
|
|
.methods-container{
|
|
|
|
|
position:absolute;
|
|
|
|
|
padding:30px 4px 10px 10px;
|
|
|
|
|
bottom:88px;
|
|
|
|
|
right:-136px;
|
|
|
|
|
bottom: 114px;
|
|
|
|
|
right: -160px;
|
|
|
|
|
width:160px;
|
|
|
|
|
height:300px;
|
|
|
|
|
background-image:url(@/assets/images/chart/tasks/taskassign/methods-container-bg.png);
|
|
|
|
|
|