gis-map-admin 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gismap.common.js +66 -24
- package/lib/gismap.umd.js +66 -24
- package/lib/gismap.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/gismap.common.js
CHANGED
|
@@ -225284,15 +225284,15 @@ var trafficEventLayer_component = Object(componentNormalizer["a" /* default */])
|
|
|
225284
225284
|
)
|
|
225285
225285
|
|
|
225286
225286
|
/* harmony default export */ var trafficEventLayer = (trafficEventLayer_component.exports);
|
|
225287
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"dab12980-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=
|
|
225288
|
-
var
|
|
225287
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"dab12980-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=dbb3567c&
|
|
225288
|
+
var perceptionEventLayervue_type_template_id_dbb3567c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],staticClass:"perceptionEventLayer",class:{ 'perceptionEventLayer--wide': _vm.showUavPanel },attrs:{"element-loading-background":"rgba(4, 27, 51, 0.5)"}},[_c('div',{staticClass:"discontent"},[_c('div',{staticClass:"content_l"},[_c('div',{staticClass:"topCon"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.videoActive),expression:"videoActive"}],staticClass:"btnsCarousel"},[_c('el-button',{staticClass:"leftCarousel",attrs:{"disabled":_vm.leftCarouselBtn,"icon":"el-icon-caret-left","circle":"","size":"mini"},on:{"click":function($event){return _vm.switchVideo('left')}}}),_c('el-button',{staticClass:"rightCarousel",attrs:{"disabled":_vm.rightCarouselBtn,"icon":"el-icon-caret-right","circle":"","size":"mini"},on:{"click":function($event){return _vm.switchVideo('right')}}})],1),_c('div',{staticClass:"videoBox"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.videoActive),expression:"videoActive"}],staticClass:"el-icon-full-screen",class:_vm.fullScreenZoom,attrs:{"title":_vm.fullscreen ? '退出全屏' : '全屏'},on:{"click":function($event){return _vm.handleFullScreen($event)}}}),_c('video',{directives:[{name:"show",rawName:"v-show",value:(_vm.videoActive),expression:"videoActive"}],ref:"videoElement",staticStyle:{"object-fit":"fill"},attrs:{"autoplay":"","width":"100%","height":"100%","id":"videoElement"}})]),_c('img',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgActive),expression:"imgActive"}],staticClass:"xcImg",staticStyle:{"cursor":"pointer"},attrs:{"src":_vm.imgUrl,"alt":""},on:{"click":function($event){return _vm.imgx2($event)}}}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgVideoActive),expression:"imgVideoActive"}],staticClass:"videoBox"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgVideoActive),expression:"imgVideoActive"}],staticClass:"el-icon-full-screen",class:_vm.fullScreenZoom2,attrs:{"title":_vm.fullscreen ? '退出全屏' : '全屏'},on:{"click":function($event){return _vm.handleFullScreen($event)}}}),_c('video',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgVideoActive),expression:"imgVideoActive"}],staticStyle:{"object-fit":"fill"},attrs:{"autoplay":"","loop":"","width":"100%","height":"100%","src":_vm.imgVideoUrl}})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.popupAttr.dataSource == 2),expression:"popupAttr.dataSource == 2"}],staticClass:"btns"},[_c('div',{class:_vm.btnImgActive,on:{"click":function($event){return _vm.showActive('video')}}},[_vm._v("视频")]),_c('div',{class:_vm.btnVideoActive,on:{"click":function($event){return _vm.showActive('img')}}},[_vm._v("图像")])])]),_c('div',{staticClass:"dmcll"},[(_vm.echartsIsShow)?_c('div',{staticClass:"noInfoText"},[_vm._v("断面车流量暂无数据")]):_vm._e(),_c('div',{ref:"etCharts",staticStyle:{"height":"1.2rem","width":"100%"}})])]),_c('div',{staticClass:"content_r"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.popupAttr.eventType == '设施监测预警'),expression:"popupAttr.eventType == '设施监测预警'"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("道路名称:")]),_c('span',[_vm._v(_vm._s(_vm.popupAttr.roadName))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("发生时间:")]),_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.incidentTime))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("告警时间:")]),_c('span',[_vm._v(_vm._s(_vm.popupAttr.occurTime))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件地点:")]),_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.location))]),_vm._v(" "),(_vm.popupAttr.eventType !== '大雾')?_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.stakeNumber))]):_vm._e(),_vm._v(" "),(_vm.popupAttr.eventType === '大雾')?_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.beginPile)+" ~")]):_vm._e(),_vm._v(" "),(_vm.popupAttr.eventType === '大雾')?_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.endPile))]):_vm._e(),_vm._v(" "),(_vm.popupAttr.eventType !== '大雾')?_c('span',[_vm._v(_vm._s(_vm.eventDirection))]):_vm._e()]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件类型:")]),_c('el-select',{staticStyle:{"width":"70%"},on:{"change":_vm.mainCodeChange},model:{value:(_vm.popupAttr.trafficMainCode),callback:function ($$v) {_vm.$set(_vm.popupAttr, "trafficMainCode", $$v)},expression:"popupAttr.trafficMainCode"}},_vm._l((_vm.eventTypeList),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.trafficMainName,"value":item.trafficMainCode}})}),1)],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("细分类别:")]),_c('el-select',{staticStyle:{"width":"70%"},on:{"change":_vm.subCodeChange},model:{value:(_vm.popupAttr.trafficSubCode),callback:function ($$v) {_vm.$set(_vm.popupAttr, "trafficSubCode", $$v)},expression:"popupAttr.trafficSubCode"}},_vm._l((_vm.subEventTypeList),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.trafficSubName,"value":item.trafficSubCode}})}),1)],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件来源:")]),_c('span',[_vm._v(_vm._s(_vm.popupAttr.eventSource))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件描述:")]),_c('el-input',{attrs:{"type":"textarea","rows":4},on:{"blur":_vm.updataEvent},model:{value:(_vm.eventForm.eventDis),callback:function ($$v) {_vm.$set(_vm.eventForm, "eventDis", $$v)},expression:"eventForm.eventDis"}})],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("影响车道:")]),_c('el-checkbox-group',{attrs:{"text-color":"#fff !important"},on:{"input":_vm.updataEvent},model:{value:(_vm.eventForm.enentCd),callback:function ($$v) {_vm.$set(_vm.eventForm, "enentCd", $$v)},expression:"eventForm.enentCd"}},[_c('el-checkbox-button',{key:"1",attrs:{"label":"1"}},[_vm._v("1")]),_c('el-checkbox-button',{key:"2",attrs:{"label":"2"}},[_vm._v("2")]),_c('el-checkbox-button',{key:"4",attrs:{"label":"4"}},[_vm._v("3")]),_c('el-checkbox-button',{key:"5",attrs:{"label":"5"}},[_vm._v("4")]),_c('el-checkbox-button',{key:"3",attrs:{"label":"3"}},[_vm._v("应急")])],1)],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("告警时长:")]),_c('span',[_vm._v(_vm._s(_vm.duration))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.popupAttr.eventType !== '设施监测预警'),expression:"popupAttr.eventType !== '设施监测预警'"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("天气情况:")]),_c('span',[_vm._v(_vm._s(_vm.weatherDescription))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.perceptionEventReleaseShow),expression:"perceptionEventReleaseShow"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("解除原因:")]),_c('el-radio-group',{staticStyle:{"width":"1.3rem"},model:{value:(_vm.popupAttr.releaseReason),callback:function ($$v) {_vm.$set(_vm.popupAttr, "releaseReason", $$v)},expression:"popupAttr.releaseReason"}},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-radio',{attrs:{"label":1}},[_vm._v("误报解除")])],1),_c('el-col',{attrs:{"span":12}},[_c('el-radio',{attrs:{"label":2}},[_vm._v("事件已结束")])],1),_c('el-col',{attrs:{"span":12}},[_c('el-radio',{attrs:{"label":3}},[_vm._v("无需处理事件")])],1)],1)],1)],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.perceptionEventReleaseShow),expression:"perceptionEventReleaseShow"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("解除描述:")]),_c('el-input',{attrs:{"type":"textarea","rows":2},on:{"blur":_vm.updataEvent},model:{value:(_vm.popupAttr.reasonDesc),callback:function ($$v) {_vm.$set(_vm.popupAttr, "reasonDesc", $$v)},expression:"popupAttr.reasonDesc"}})],1)]),_c('div',{staticStyle:{"clear":"both"}}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.shouldShow),expression:"shouldShow"}],staticClass:"content_b"},[_c('div',{staticClass:"btn",on:{"click":_vm.schedulingSettings}},[_vm._v("事件确认")]),_c('div',{staticClass:"btn btn_c",on:{"click":_vm.terminationOfAlarm}},[_vm._v("事件解除")]),(
|
|
225289
225289
|
_vm.popupAttr.eventTypeCode === 53 ||
|
|
225290
225290
|
_vm.popupAttr.eventTypeCode === '53'
|
|
225291
225291
|
)?_c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.dispatching),expression:"dispatching"}],staticClass:"btn",class:{ btn_disabled: !_vm.hasReachableDrones },attrs:{"title":_vm.hasReachableDrones ? '无人机调度' : '暂无可调度的无人机'},on:{"click":_vm.UAVControl}},[_vm._v(" "+_vm._s(_vm.uavBtnText)+" ")]):_vm._e()])]),_c('transition',{attrs:{"name":"uav-panel-fade"}},[(_vm.showUavPanel)?_c('div',{staticClass:"uavDispatchPanel"},[_c('div',{staticClass:"uavDispatchPanel__body"},[_c('UVAScheduling',{attrs:{"eventData":_vm.uavEventData,"uavId":_vm.dispatchedUavId},on:{"return-home":_vm.onReturnHome}})],1)]):_vm._e()])],1)}
|
|
225292
|
-
var
|
|
225292
|
+
var perceptionEventLayervue_type_template_id_dbb3567c_staticRenderFns = []
|
|
225293
225293
|
|
|
225294
225294
|
|
|
225295
|
-
// CONCATENATED MODULE: ./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=
|
|
225295
|
+
// CONCATENATED MODULE: ./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=dbb3567c&
|
|
225296
225296
|
|
|
225297
225297
|
// CONCATENATED MODULE: ./packages/gis-map/src/component/api/wurenji.js
|
|
225298
225298
|
/* ==================== 无人机调度接口 ==================== */
|
|
@@ -226786,9 +226786,14 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
226786
226786
|
hasActiveDrone: false,
|
|
226787
226787
|
// 是否已成功下发返航指令:置为已收到后,关闭弹窗不再拦截
|
|
226788
226788
|
returnHomeIssued: false,
|
|
226789
|
-
// 是否已从 OSD
|
|
226790
|
-
// 否则刚下发调度、还未起飞时会被误判为已返航
|
|
226789
|
+
// 是否已从 OSD 观察到「离开机巢」:只有离开过,之后再回到在巢状态才算已返航
|
|
226791
226790
|
droneFlyingSeen: false,
|
|
226791
|
+
// OSD 中「在巢」的状态基准值(首帧记录):判定不依赖 devStatus 具体取值含义
|
|
226792
|
+
nestDevStatus: null,
|
|
226793
|
+
// 观察到离巢的时间戳:用于过滤起飞瞬间的状态抖动
|
|
226794
|
+
droneLeftNestAt: 0,
|
|
226795
|
+
// 上一次 OSD devStatus:仅用于输出状态变化日志,便于排查
|
|
226796
|
+
lastDroneOsdStatus: null,
|
|
226792
226797
|
// 调度中
|
|
226793
226798
|
dispatching: false,
|
|
226794
226799
|
// 返航中
|
|
@@ -226882,6 +226887,9 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
226882
226887
|
this.hasActiveDrone = false;
|
|
226883
226888
|
this.returnHomeIssued = false;
|
|
226884
226889
|
this.droneFlyingSeen = false;
|
|
226890
|
+
this.nestDevStatus = null;
|
|
226891
|
+
this.droneLeftNestAt = 0;
|
|
226892
|
+
this.lastDroneOsdStatus = null;
|
|
226885
226893
|
this.dispatching = false;
|
|
226886
226894
|
this.returning = false;
|
|
226887
226895
|
window.addEventListener("fullscreenchange", () => {
|
|
@@ -227747,9 +227755,12 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227747
227755
|
this.usedUavId = uavId;
|
|
227748
227756
|
this.hasActiveDrone = true;
|
|
227749
227757
|
this.showUavPanel = true;
|
|
227750
|
-
//
|
|
227758
|
+
// 新一轮调度:返航指令标记与 OSD 判定状态全部复位
|
|
227751
227759
|
this.returnHomeIssued = false;
|
|
227752
227760
|
this.droneFlyingSeen = false;
|
|
227761
|
+
this.nestDevStatus = null;
|
|
227762
|
+
this.droneLeftNestAt = 0;
|
|
227763
|
+
this.lastDroneOsdStatus = null;
|
|
227753
227764
|
this.$message({ message: "无人机调度指令已下发!", type: "success" });
|
|
227754
227765
|
// 记录当前事件调用的无人机
|
|
227755
227766
|
droneRecordSave({
|
|
@@ -227782,6 +227793,9 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227782
227793
|
this.returnHomeIssued = true;
|
|
227783
227794
|
this.hasActiveDrone = false;
|
|
227784
227795
|
this.droneFlyingSeen = false;
|
|
227796
|
+
this.nestDevStatus = null;
|
|
227797
|
+
this.droneLeftNestAt = 0;
|
|
227798
|
+
this.lastDroneOsdStatus = null;
|
|
227785
227799
|
// 必须同时清空已调度设备编码:hasReachableDrones 依赖 !dispatchedUavId,
|
|
227786
227800
|
// 不清空按钮会一直保持禁用;清空后再次调度时 uavId 由空变为新值,
|
|
227787
227801
|
// 也能重新触发子组件 uavId 的 watch,让操控台重新进入
|
|
@@ -227807,35 +227821,54 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227807
227821
|
const num = Number(value);
|
|
227808
227822
|
return isNaN(num) ? null : num;
|
|
227809
227823
|
},
|
|
227810
|
-
// OSD
|
|
227824
|
+
// OSD 推送:识别「离巢 → 回到机巢」,实时解除调度标记
|
|
227825
|
+
// 判定不依赖 devStatus 的具体取值含义:以首帧记录的在巢基准值为准,
|
|
227826
|
+
// 偏离基准=已离巢,回到基准=已返航(避免不同环境 0/1 含义相反造成误判)
|
|
227811
227827
|
handleDroneOsd(payload) {
|
|
227812
227828
|
if (!payload || !payload.osdData) return;
|
|
227813
227829
|
if (!this.dispatchedUavId || payload.sn !== this.dispatchedUavId) return;
|
|
227814
227830
|
const status = this.normalizeDroneStatus(payload.osdData.devStatus);
|
|
227815
227831
|
if (status === null) return;
|
|
227816
|
-
|
|
227817
|
-
|
|
227832
|
+
if (status !== this.lastDroneOsdStatus) {
|
|
227833
|
+
this.lastDroneOsdStatus = status;
|
|
227834
|
+
console.log("[无人机OSD] devStatus =", status, payload.osdData);
|
|
227835
|
+
}
|
|
227836
|
+
// 还没有在巢基准值:以首帧状态作为基准(此时无人机尚在机巢)
|
|
227837
|
+
if (this.nestDevStatus === null) {
|
|
227838
|
+
this.nestDevStatus = status;
|
|
227839
|
+
console.log("[无人机OSD] 记录在巢基准 devStatus =", status);
|
|
227840
|
+
return;
|
|
227841
|
+
}
|
|
227842
|
+
// 偏离基准:说明无人机已离巢(起飞 / 作业中)
|
|
227843
|
+
if (status !== this.nestDevStatus) {
|
|
227818
227844
|
if (!this.droneFlyingSeen) {
|
|
227819
227845
|
this.droneFlyingSeen = true;
|
|
227820
|
-
|
|
227846
|
+
this.droneLeftNestAt = Date.now();
|
|
227847
|
+
console.log("[无人机OSD] 无人机已离巢,devStatus =", status);
|
|
227821
227848
|
}
|
|
227822
227849
|
return;
|
|
227823
227850
|
}
|
|
227824
|
-
//
|
|
227825
|
-
if (
|
|
227826
|
-
|
|
227851
|
+
// 回到基准:且离巢时间足够长(过滤起飞瞬间的状态抖动)→ 判定已返航
|
|
227852
|
+
if (
|
|
227853
|
+
this.droneFlyingSeen &&
|
|
227854
|
+
this.droneLeftNestAt &&
|
|
227855
|
+
Date.now() - this.droneLeftNestAt > 15000
|
|
227856
|
+
) {
|
|
227857
|
+
console.log("[无人机OSD] 无人机已回到机巢,自动解除调度标记");
|
|
227827
227858
|
this.$message({ message: "无人机已返航至机巢", type: "success" });
|
|
227828
227859
|
this.onReturnHome();
|
|
227829
227860
|
}
|
|
227830
227861
|
},
|
|
227831
|
-
// 依据 OSD
|
|
227862
|
+
// 依据 OSD 判断已调度的无人机是否已回到机巢
|
|
227863
|
+
// 判定与 devStatus 取值含义无关:离过巢,且当前状态回到「在巢基准值」即视为已返航
|
|
227832
227864
|
isDroneBackToNest() {
|
|
227833
227865
|
if (!this.dispatchedUavId) return true;
|
|
227834
|
-
//
|
|
227866
|
+
// 未观察到离巢,说明可能还没起飞或刚起飞,不能判定为已返航
|
|
227835
227867
|
if (!this.droneFlyingSeen) return false;
|
|
227868
|
+
if (this.nestDevStatus === null) return false;
|
|
227836
227869
|
const osd = droneMqtt.getDroneOsd(this.dispatchedUavId);
|
|
227837
227870
|
if (!osd) return false;
|
|
227838
|
-
return this.normalizeDroneStatus(osd.devStatus) ===
|
|
227871
|
+
return this.normalizeDroneStatus(osd.devStatus) === this.nestDevStatus;
|
|
227839
227872
|
},
|
|
227840
227873
|
// 用 OSD 实时状态复核一次:无人机已在机巢时同步解除调度标记
|
|
227841
227874
|
// (无人机自行返航、或由其它入口返航时,本地 hasActiveDrone 会一直为 true)
|
|
@@ -227848,9 +227881,10 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227848
227881
|
return true;
|
|
227849
227882
|
},
|
|
227850
227883
|
// 弹窗关闭前校验(由 gis-map 的 closePopup 调用)
|
|
227851
|
-
//
|
|
227852
|
-
//
|
|
227853
|
-
//
|
|
227884
|
+
// 1) 已收到返航指令 / OSD 显示已回巢 → 直接放行;
|
|
227885
|
+
// 2) 否则先「保底」强制补发一次返航指令(指令可重复下发,避免无人机滞留),
|
|
227886
|
+
// 再提醒用户并拦截本次关闭;指令下发成功后 returnHomeIssued 会置位,
|
|
227887
|
+
// 用户再点一次关闭即可直接通过
|
|
227854
227888
|
beforeClosePopup() {
|
|
227855
227889
|
// 没有正在执行任务的无人机(或无设备编码):直接放行
|
|
227856
227890
|
if (!this.hasActiveDrone || !this.dispatchedUavId) return true;
|
|
@@ -227859,9 +227893,17 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227859
227893
|
// 兜底:本地没收到返航指令,但 OSD 显示无人机已回到机巢
|
|
227860
227894
|
// (自行返航、或由其它入口下发过返航),同步标记后直接放行
|
|
227861
227895
|
if (this.syncDroneReturnedState()) return true;
|
|
227862
|
-
//
|
|
227896
|
+
// 保底中的保底:不管用户有没有去点右下角「一键返航」,关闭时都强制补发一次返航指令
|
|
227897
|
+
if (!this.returning) {
|
|
227898
|
+
console.log("[无人机] 关闭弹窗保底:强制补发一次返航指令");
|
|
227899
|
+
this.returning = true;
|
|
227900
|
+
this.doReturnHome().finally(() => {
|
|
227901
|
+
this.returning = false;
|
|
227902
|
+
});
|
|
227903
|
+
}
|
|
227904
|
+
// 仍拦截本次关闭并给出提示,避免用户在指令未下发成功时误以为已返航
|
|
227863
227905
|
this.$alert(
|
|
227864
|
-
"
|
|
227906
|
+
"关闭弹窗前已为无人机下发返航指令,请待指令下发成功后再关闭;也可点击右下角「一键返航」手动确认",
|
|
227865
227907
|
"提示",
|
|
227866
227908
|
{
|
|
227867
227909
|
confirmButtonText: "知道了",
|
|
@@ -228101,8 +228143,8 @@ var perceptionEventLayervue_type_style_index_1_lang_css_ = __webpack_require__("
|
|
|
228101
228143
|
|
|
228102
228144
|
var perceptionEventLayer_component = Object(componentNormalizer["a" /* default */])(
|
|
228103
228145
|
eventLayer_perceptionEventLayervue_type_script_lang_js_,
|
|
228104
|
-
|
|
228105
|
-
|
|
228146
|
+
perceptionEventLayervue_type_template_id_dbb3567c_render,
|
|
228147
|
+
perceptionEventLayervue_type_template_id_dbb3567c_staticRenderFns,
|
|
228106
228148
|
false,
|
|
228107
228149
|
null,
|
|
228108
228150
|
null,
|
package/lib/gismap.umd.js
CHANGED
|
@@ -225293,15 +225293,15 @@ var trafficEventLayer_component = Object(componentNormalizer["a" /* default */])
|
|
|
225293
225293
|
)
|
|
225294
225294
|
|
|
225295
225295
|
/* harmony default export */ var trafficEventLayer = (trafficEventLayer_component.exports);
|
|
225296
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"dab12980-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=
|
|
225297
|
-
var
|
|
225296
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"dab12980-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=dbb3567c&
|
|
225297
|
+
var perceptionEventLayervue_type_template_id_dbb3567c_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loading),expression:"loading"}],staticClass:"perceptionEventLayer",class:{ 'perceptionEventLayer--wide': _vm.showUavPanel },attrs:{"element-loading-background":"rgba(4, 27, 51, 0.5)"}},[_c('div',{staticClass:"discontent"},[_c('div',{staticClass:"content_l"},[_c('div',{staticClass:"topCon"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.videoActive),expression:"videoActive"}],staticClass:"btnsCarousel"},[_c('el-button',{staticClass:"leftCarousel",attrs:{"disabled":_vm.leftCarouselBtn,"icon":"el-icon-caret-left","circle":"","size":"mini"},on:{"click":function($event){return _vm.switchVideo('left')}}}),_c('el-button',{staticClass:"rightCarousel",attrs:{"disabled":_vm.rightCarouselBtn,"icon":"el-icon-caret-right","circle":"","size":"mini"},on:{"click":function($event){return _vm.switchVideo('right')}}})],1),_c('div',{staticClass:"videoBox"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.videoActive),expression:"videoActive"}],staticClass:"el-icon-full-screen",class:_vm.fullScreenZoom,attrs:{"title":_vm.fullscreen ? '退出全屏' : '全屏'},on:{"click":function($event){return _vm.handleFullScreen($event)}}}),_c('video',{directives:[{name:"show",rawName:"v-show",value:(_vm.videoActive),expression:"videoActive"}],ref:"videoElement",staticStyle:{"object-fit":"fill"},attrs:{"autoplay":"","width":"100%","height":"100%","id":"videoElement"}})]),_c('img',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgActive),expression:"imgActive"}],staticClass:"xcImg",staticStyle:{"cursor":"pointer"},attrs:{"src":_vm.imgUrl,"alt":""},on:{"click":function($event){return _vm.imgx2($event)}}}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgVideoActive),expression:"imgVideoActive"}],staticClass:"videoBox"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgVideoActive),expression:"imgVideoActive"}],staticClass:"el-icon-full-screen",class:_vm.fullScreenZoom2,attrs:{"title":_vm.fullscreen ? '退出全屏' : '全屏'},on:{"click":function($event){return _vm.handleFullScreen($event)}}}),_c('video',{directives:[{name:"show",rawName:"v-show",value:(_vm.imgVideoActive),expression:"imgVideoActive"}],staticStyle:{"object-fit":"fill"},attrs:{"autoplay":"","loop":"","width":"100%","height":"100%","src":_vm.imgVideoUrl}})]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.popupAttr.dataSource == 2),expression:"popupAttr.dataSource == 2"}],staticClass:"btns"},[_c('div',{class:_vm.btnImgActive,on:{"click":function($event){return _vm.showActive('video')}}},[_vm._v("视频")]),_c('div',{class:_vm.btnVideoActive,on:{"click":function($event){return _vm.showActive('img')}}},[_vm._v("图像")])])]),_c('div',{staticClass:"dmcll"},[(_vm.echartsIsShow)?_c('div',{staticClass:"noInfoText"},[_vm._v("断面车流量暂无数据")]):_vm._e(),_c('div',{ref:"etCharts",staticStyle:{"height":"1.2rem","width":"100%"}})])]),_c('div',{staticClass:"content_r"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.popupAttr.eventType == '设施监测预警'),expression:"popupAttr.eventType == '设施监测预警'"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("道路名称:")]),_c('span',[_vm._v(_vm._s(_vm.popupAttr.roadName))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("发生时间:")]),_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.incidentTime))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("告警时间:")]),_c('span',[_vm._v(_vm._s(_vm.popupAttr.occurTime))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件地点:")]),_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.location))]),_vm._v(" "),(_vm.popupAttr.eventType !== '大雾')?_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.stakeNumber))]):_vm._e(),_vm._v(" "),(_vm.popupAttr.eventType === '大雾')?_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.beginPile)+" ~")]):_vm._e(),_vm._v(" "),(_vm.popupAttr.eventType === '大雾')?_c('span',{staticStyle:{"padding-top":"0.0104166rem"}},[_vm._v(_vm._s(_vm.popupAttr.endPile))]):_vm._e(),_vm._v(" "),(_vm.popupAttr.eventType !== '大雾')?_c('span',[_vm._v(_vm._s(_vm.eventDirection))]):_vm._e()]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件类型:")]),_c('el-select',{staticStyle:{"width":"70%"},on:{"change":_vm.mainCodeChange},model:{value:(_vm.popupAttr.trafficMainCode),callback:function ($$v) {_vm.$set(_vm.popupAttr, "trafficMainCode", $$v)},expression:"popupAttr.trafficMainCode"}},_vm._l((_vm.eventTypeList),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.trafficMainName,"value":item.trafficMainCode}})}),1)],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("细分类别:")]),_c('el-select',{staticStyle:{"width":"70%"},on:{"change":_vm.subCodeChange},model:{value:(_vm.popupAttr.trafficSubCode),callback:function ($$v) {_vm.$set(_vm.popupAttr, "trafficSubCode", $$v)},expression:"popupAttr.trafficSubCode"}},_vm._l((_vm.subEventTypeList),function(item,i){return _c('el-option',{key:i,attrs:{"label":item.trafficSubName,"value":item.trafficSubCode}})}),1)],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件来源:")]),_c('span',[_vm._v(_vm._s(_vm.popupAttr.eventSource))])]),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("事件描述:")]),_c('el-input',{attrs:{"type":"textarea","rows":4},on:{"blur":_vm.updataEvent},model:{value:(_vm.eventForm.eventDis),callback:function ($$v) {_vm.$set(_vm.eventForm, "eventDis", $$v)},expression:"eventForm.eventDis"}})],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("影响车道:")]),_c('el-checkbox-group',{attrs:{"text-color":"#fff !important"},on:{"input":_vm.updataEvent},model:{value:(_vm.eventForm.enentCd),callback:function ($$v) {_vm.$set(_vm.eventForm, "enentCd", $$v)},expression:"eventForm.enentCd"}},[_c('el-checkbox-button',{key:"1",attrs:{"label":"1"}},[_vm._v("1")]),_c('el-checkbox-button',{key:"2",attrs:{"label":"2"}},[_vm._v("2")]),_c('el-checkbox-button',{key:"4",attrs:{"label":"4"}},[_vm._v("3")]),_c('el-checkbox-button',{key:"5",attrs:{"label":"5"}},[_vm._v("4")]),_c('el-checkbox-button',{key:"3",attrs:{"label":"3"}},[_vm._v("应急")])],1)],1),_c('div',{staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("告警时长:")]),_c('span',[_vm._v(_vm._s(_vm.duration))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.popupAttr.eventType !== '设施监测预警'),expression:"popupAttr.eventType !== '设施监测预警'"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("天气情况:")]),_c('span',[_vm._v(_vm._s(_vm.weatherDescription))])]),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.perceptionEventReleaseShow),expression:"perceptionEventReleaseShow"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("解除原因:")]),_c('el-radio-group',{staticStyle:{"width":"1.3rem"},model:{value:(_vm.popupAttr.releaseReason),callback:function ($$v) {_vm.$set(_vm.popupAttr, "releaseReason", $$v)},expression:"popupAttr.releaseReason"}},[_c('el-row',[_c('el-col',{attrs:{"span":12}},[_c('el-radio',{attrs:{"label":1}},[_vm._v("误报解除")])],1),_c('el-col',{attrs:{"span":12}},[_c('el-radio',{attrs:{"label":2}},[_vm._v("事件已结束")])],1),_c('el-col',{attrs:{"span":12}},[_c('el-radio',{attrs:{"label":3}},[_vm._v("无需处理事件")])],1)],1)],1)],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.perceptionEventReleaseShow),expression:"perceptionEventReleaseShow"}],staticClass:"item"},[_c('span',{staticClass:"lable"},[_vm._v("解除描述:")]),_c('el-input',{attrs:{"type":"textarea","rows":2},on:{"blur":_vm.updataEvent},model:{value:(_vm.popupAttr.reasonDesc),callback:function ($$v) {_vm.$set(_vm.popupAttr, "reasonDesc", $$v)},expression:"popupAttr.reasonDesc"}})],1)]),_c('div',{staticStyle:{"clear":"both"}}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.shouldShow),expression:"shouldShow"}],staticClass:"content_b"},[_c('div',{staticClass:"btn",on:{"click":_vm.schedulingSettings}},[_vm._v("事件确认")]),_c('div',{staticClass:"btn btn_c",on:{"click":_vm.terminationOfAlarm}},[_vm._v("事件解除")]),(
|
|
225298
225298
|
_vm.popupAttr.eventTypeCode === 53 ||
|
|
225299
225299
|
_vm.popupAttr.eventTypeCode === '53'
|
|
225300
225300
|
)?_c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.dispatching),expression:"dispatching"}],staticClass:"btn",class:{ btn_disabled: !_vm.hasReachableDrones },attrs:{"title":_vm.hasReachableDrones ? '无人机调度' : '暂无可调度的无人机'},on:{"click":_vm.UAVControl}},[_vm._v(" "+_vm._s(_vm.uavBtnText)+" ")]):_vm._e()])]),_c('transition',{attrs:{"name":"uav-panel-fade"}},[(_vm.showUavPanel)?_c('div',{staticClass:"uavDispatchPanel"},[_c('div',{staticClass:"uavDispatchPanel__body"},[_c('UVAScheduling',{attrs:{"eventData":_vm.uavEventData,"uavId":_vm.dispatchedUavId},on:{"return-home":_vm.onReturnHome}})],1)]):_vm._e()])],1)}
|
|
225301
|
-
var
|
|
225301
|
+
var perceptionEventLayervue_type_template_id_dbb3567c_staticRenderFns = []
|
|
225302
225302
|
|
|
225303
225303
|
|
|
225304
|
-
// CONCATENATED MODULE: ./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=
|
|
225304
|
+
// CONCATENATED MODULE: ./packages/gis-map/src/component/eventLayer/perceptionEventLayer.vue?vue&type=template&id=dbb3567c&
|
|
225305
225305
|
|
|
225306
225306
|
// CONCATENATED MODULE: ./packages/gis-map/src/component/api/wurenji.js
|
|
225307
225307
|
/* ==================== 无人机调度接口 ==================== */
|
|
@@ -226795,9 +226795,14 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
226795
226795
|
hasActiveDrone: false,
|
|
226796
226796
|
// 是否已成功下发返航指令:置为已收到后,关闭弹窗不再拦截
|
|
226797
226797
|
returnHomeIssued: false,
|
|
226798
|
-
// 是否已从 OSD
|
|
226799
|
-
// 否则刚下发调度、还未起飞时会被误判为已返航
|
|
226798
|
+
// 是否已从 OSD 观察到「离开机巢」:只有离开过,之后再回到在巢状态才算已返航
|
|
226800
226799
|
droneFlyingSeen: false,
|
|
226800
|
+
// OSD 中「在巢」的状态基准值(首帧记录):判定不依赖 devStatus 具体取值含义
|
|
226801
|
+
nestDevStatus: null,
|
|
226802
|
+
// 观察到离巢的时间戳:用于过滤起飞瞬间的状态抖动
|
|
226803
|
+
droneLeftNestAt: 0,
|
|
226804
|
+
// 上一次 OSD devStatus:仅用于输出状态变化日志,便于排查
|
|
226805
|
+
lastDroneOsdStatus: null,
|
|
226801
226806
|
// 调度中
|
|
226802
226807
|
dispatching: false,
|
|
226803
226808
|
// 返航中
|
|
@@ -226891,6 +226896,9 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
226891
226896
|
this.hasActiveDrone = false;
|
|
226892
226897
|
this.returnHomeIssued = false;
|
|
226893
226898
|
this.droneFlyingSeen = false;
|
|
226899
|
+
this.nestDevStatus = null;
|
|
226900
|
+
this.droneLeftNestAt = 0;
|
|
226901
|
+
this.lastDroneOsdStatus = null;
|
|
226894
226902
|
this.dispatching = false;
|
|
226895
226903
|
this.returning = false;
|
|
226896
226904
|
window.addEventListener("fullscreenchange", () => {
|
|
@@ -227756,9 +227764,12 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227756
227764
|
this.usedUavId = uavId;
|
|
227757
227765
|
this.hasActiveDrone = true;
|
|
227758
227766
|
this.showUavPanel = true;
|
|
227759
|
-
//
|
|
227767
|
+
// 新一轮调度:返航指令标记与 OSD 判定状态全部复位
|
|
227760
227768
|
this.returnHomeIssued = false;
|
|
227761
227769
|
this.droneFlyingSeen = false;
|
|
227770
|
+
this.nestDevStatus = null;
|
|
227771
|
+
this.droneLeftNestAt = 0;
|
|
227772
|
+
this.lastDroneOsdStatus = null;
|
|
227762
227773
|
this.$message({ message: "无人机调度指令已下发!", type: "success" });
|
|
227763
227774
|
// 记录当前事件调用的无人机
|
|
227764
227775
|
droneRecordSave({
|
|
@@ -227791,6 +227802,9 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227791
227802
|
this.returnHomeIssued = true;
|
|
227792
227803
|
this.hasActiveDrone = false;
|
|
227793
227804
|
this.droneFlyingSeen = false;
|
|
227805
|
+
this.nestDevStatus = null;
|
|
227806
|
+
this.droneLeftNestAt = 0;
|
|
227807
|
+
this.lastDroneOsdStatus = null;
|
|
227794
227808
|
// 必须同时清空已调度设备编码:hasReachableDrones 依赖 !dispatchedUavId,
|
|
227795
227809
|
// 不清空按钮会一直保持禁用;清空后再次调度时 uavId 由空变为新值,
|
|
227796
227810
|
// 也能重新触发子组件 uavId 的 watch,让操控台重新进入
|
|
@@ -227816,35 +227830,54 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227816
227830
|
const num = Number(value);
|
|
227817
227831
|
return isNaN(num) ? null : num;
|
|
227818
227832
|
},
|
|
227819
|
-
// OSD
|
|
227833
|
+
// OSD 推送:识别「离巢 → 回到机巢」,实时解除调度标记
|
|
227834
|
+
// 判定不依赖 devStatus 的具体取值含义:以首帧记录的在巢基准值为准,
|
|
227835
|
+
// 偏离基准=已离巢,回到基准=已返航(避免不同环境 0/1 含义相反造成误判)
|
|
227820
227836
|
handleDroneOsd(payload) {
|
|
227821
227837
|
if (!payload || !payload.osdData) return;
|
|
227822
227838
|
if (!this.dispatchedUavId || payload.sn !== this.dispatchedUavId) return;
|
|
227823
227839
|
const status = this.normalizeDroneStatus(payload.osdData.devStatus);
|
|
227824
227840
|
if (status === null) return;
|
|
227825
|
-
|
|
227826
|
-
|
|
227841
|
+
if (status !== this.lastDroneOsdStatus) {
|
|
227842
|
+
this.lastDroneOsdStatus = status;
|
|
227843
|
+
console.log("[无人机OSD] devStatus =", status, payload.osdData);
|
|
227844
|
+
}
|
|
227845
|
+
// 还没有在巢基准值:以首帧状态作为基准(此时无人机尚在机巢)
|
|
227846
|
+
if (this.nestDevStatus === null) {
|
|
227847
|
+
this.nestDevStatus = status;
|
|
227848
|
+
console.log("[无人机OSD] 记录在巢基准 devStatus =", status);
|
|
227849
|
+
return;
|
|
227850
|
+
}
|
|
227851
|
+
// 偏离基准:说明无人机已离巢(起飞 / 作业中)
|
|
227852
|
+
if (status !== this.nestDevStatus) {
|
|
227827
227853
|
if (!this.droneFlyingSeen) {
|
|
227828
227854
|
this.droneFlyingSeen = true;
|
|
227829
|
-
|
|
227855
|
+
this.droneLeftNestAt = Date.now();
|
|
227856
|
+
console.log("[无人机OSD] 无人机已离巢,devStatus =", status);
|
|
227830
227857
|
}
|
|
227831
227858
|
return;
|
|
227832
227859
|
}
|
|
227833
|
-
//
|
|
227834
|
-
if (
|
|
227835
|
-
|
|
227860
|
+
// 回到基准:且离巢时间足够长(过滤起飞瞬间的状态抖动)→ 判定已返航
|
|
227861
|
+
if (
|
|
227862
|
+
this.droneFlyingSeen &&
|
|
227863
|
+
this.droneLeftNestAt &&
|
|
227864
|
+
Date.now() - this.droneLeftNestAt > 15000
|
|
227865
|
+
) {
|
|
227866
|
+
console.log("[无人机OSD] 无人机已回到机巢,自动解除调度标记");
|
|
227836
227867
|
this.$message({ message: "无人机已返航至机巢", type: "success" });
|
|
227837
227868
|
this.onReturnHome();
|
|
227838
227869
|
}
|
|
227839
227870
|
},
|
|
227840
|
-
// 依据 OSD
|
|
227871
|
+
// 依据 OSD 判断已调度的无人机是否已回到机巢
|
|
227872
|
+
// 判定与 devStatus 取值含义无关:离过巢,且当前状态回到「在巢基准值」即视为已返航
|
|
227841
227873
|
isDroneBackToNest() {
|
|
227842
227874
|
if (!this.dispatchedUavId) return true;
|
|
227843
|
-
//
|
|
227875
|
+
// 未观察到离巢,说明可能还没起飞或刚起飞,不能判定为已返航
|
|
227844
227876
|
if (!this.droneFlyingSeen) return false;
|
|
227877
|
+
if (this.nestDevStatus === null) return false;
|
|
227845
227878
|
const osd = droneMqtt.getDroneOsd(this.dispatchedUavId);
|
|
227846
227879
|
if (!osd) return false;
|
|
227847
|
-
return this.normalizeDroneStatus(osd.devStatus) ===
|
|
227880
|
+
return this.normalizeDroneStatus(osd.devStatus) === this.nestDevStatus;
|
|
227848
227881
|
},
|
|
227849
227882
|
// 用 OSD 实时状态复核一次:无人机已在机巢时同步解除调度标记
|
|
227850
227883
|
// (无人机自行返航、或由其它入口返航时,本地 hasActiveDrone 会一直为 true)
|
|
@@ -227857,9 +227890,10 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227857
227890
|
return true;
|
|
227858
227891
|
},
|
|
227859
227892
|
// 弹窗关闭前校验(由 gis-map 的 closePopup 调用)
|
|
227860
|
-
//
|
|
227861
|
-
//
|
|
227862
|
-
//
|
|
227893
|
+
// 1) 已收到返航指令 / OSD 显示已回巢 → 直接放行;
|
|
227894
|
+
// 2) 否则先「保底」强制补发一次返航指令(指令可重复下发,避免无人机滞留),
|
|
227895
|
+
// 再提醒用户并拦截本次关闭;指令下发成功后 returnHomeIssued 会置位,
|
|
227896
|
+
// 用户再点一次关闭即可直接通过
|
|
227863
227897
|
beforeClosePopup() {
|
|
227864
227898
|
// 没有正在执行任务的无人机(或无设备编码):直接放行
|
|
227865
227899
|
if (!this.hasActiveDrone || !this.dispatchedUavId) return true;
|
|
@@ -227868,9 +227902,17 @@ var swiper_min = __webpack_require__("f4bd");
|
|
|
227868
227902
|
// 兜底:本地没收到返航指令,但 OSD 显示无人机已回到机巢
|
|
227869
227903
|
// (自行返航、或由其它入口下发过返航),同步标记后直接放行
|
|
227870
227904
|
if (this.syncDroneReturnedState()) return true;
|
|
227871
|
-
//
|
|
227905
|
+
// 保底中的保底:不管用户有没有去点右下角「一键返航」,关闭时都强制补发一次返航指令
|
|
227906
|
+
if (!this.returning) {
|
|
227907
|
+
console.log("[无人机] 关闭弹窗保底:强制补发一次返航指令");
|
|
227908
|
+
this.returning = true;
|
|
227909
|
+
this.doReturnHome().finally(() => {
|
|
227910
|
+
this.returning = false;
|
|
227911
|
+
});
|
|
227912
|
+
}
|
|
227913
|
+
// 仍拦截本次关闭并给出提示,避免用户在指令未下发成功时误以为已返航
|
|
227872
227914
|
this.$alert(
|
|
227873
|
-
"
|
|
227915
|
+
"关闭弹窗前已为无人机下发返航指令,请待指令下发成功后再关闭;也可点击右下角「一键返航」手动确认",
|
|
227874
227916
|
"提示",
|
|
227875
227917
|
{
|
|
227876
227918
|
confirmButtonText: "知道了",
|
|
@@ -228110,8 +228152,8 @@ var perceptionEventLayervue_type_style_index_1_lang_css_ = __webpack_require__("
|
|
|
228110
228152
|
|
|
228111
228153
|
var perceptionEventLayer_component = Object(componentNormalizer["a" /* default */])(
|
|
228112
228154
|
eventLayer_perceptionEventLayervue_type_script_lang_js_,
|
|
228113
|
-
|
|
228114
|
-
|
|
228155
|
+
perceptionEventLayervue_type_template_id_dbb3567c_render,
|
|
228156
|
+
perceptionEventLayervue_type_template_id_dbb3567c_staticRenderFns,
|
|
228115
228157
|
false,
|
|
228116
228158
|
null,
|
|
228117
228159
|
null,
|